query
stringlengths
7
5.25k
document
stringlengths
15
1.06M
metadata
dict
negatives
sequencelengths
3
101
negative_scores
sequencelengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Assumed hidden because no label given and columns not shown
public function testAssumedHiddenButExplicitlyVisible() { // by default, but explicitly visible because 'hide' is false. $testName = 'MyField'; $fieldSetting = array('hide' => false); $field = new Application_Model_Field($testName, $fieldSetting); // Test all methods that don't have unmet preconditions. $this->assertTrue($field->isVisible()); $this->_assertNoMetaInfo($field); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isHidden() {\n\t\t// return true to hide this column (used for column appendants)\n\t\treturn false;\n\t}", "public function isHidden() {\n\t\t// return true to hide this column (used for column appendants)\n\t\treturn false;\n\t}", "public function getIsLabelHidden(): bool;", "public function get_hidden_columns()\r\n {\r\n return array();\r\n }", "public function testWhenColsShownByDefaultAndHideNotSpecified()\n {\n // no label provide), and not explicitly hidden.\n $testName = 'MyField';\n\n $showColsByDefault = 'true';\n $field = new Application_Model_Field($testName, array(),\n array(), $showColsByDefault);\n $this->assertTrue($field->isVisible());\n $this->assertSame(\"MyField\", $field->getLabel());\n $this->_assertNoMetaInfo($field);\n }", "public function get_hidden_columns()\n {\n return array();\n }", "public function get_hidden_columns()\n {\n return array();\n }", "public function get_hidden_columns()\r\n\t{\r\n\t\treturn [ ];\r\n\t}", "public function get_hidden_columns()\n\t{\n\t\treturn array();\n\t}", "protected function hiddenColumns(): array\n {\n return [];\n }", "function get_hidden_columns($screen)\n {\n }", "public function get_hidden_columns() {\n\t\treturn array();\n\t}", "public function display_rows_or_placeholder()\n {\n }", "public function setHidden(){\n $this->_hidden = true;\n }", "public function testWhenColsShownByDefaultButHideIsTrue()\n {\n // explicitly hidden with 'hide' set to true.\n $testName = 'MyField';\n $fieldSetting = array(\n 'label' => 'Label',\n 'hide' => true);\n\n $showColsByDefault = 'true';\n $field = new Application_Model_Field($testName, $fieldSetting,\n array(), $showColsByDefault);\n $this->assertFalse($field->isVisible());\n $this->assertSame(\"Label\", $field->getLabel());\n $this->_assertNoMetaInfo($field);\n }", "public function hideExtraField()\n {\n $this->houses=false;\n $this->jobs_training=false;\n $this->motorcycles =false;\n $this->cars = false;\n $this->offices=false;\n $this->lands_plots=false;\n return;\n }", "public function hideXLabels() {\n\t\t$this->Options['xaxis']['show'] = false;\n\t}", "public function discardPreviewColumns();", "public function setColumnHidden($name = '', $hide = 0){\n if(!empty($name)){\n foreach($this->_cols as $key => $element){\n if($element['name'] == $name){\n $this->_cols[$key]['hidden'] = $hide;\n }\n }\n if($hide == 1){\n $this->_colspan(-1);\n }\n }\n }", "public function isHidden();", "public function isHidden();", "public function isHidden();", "public function isHidden();", "function wp_ajax_hidden_columns()\n {\n }", "function isHidden();", "public function isHidden() {\n return false;\n }", "public function disableHideMetaboxes()\n\t\t{\n\t\t\techo \"<style type='text/css'>label[for='\" . $this->_id . \"-hide'] { display: none; }</style>\";\n\t\t}", "function get_hidden_columns( ) {\r\n\t\t$columns = get_user_option( 'managemedia_page_' . MLACore::ADMIN_PAGE_SLUG . 'columnshidden' );\r\n\r\n\t\tif ( is_array( $columns ) ) {\r\n\t\t\tforeach ( $columns as $index => $value ){\r\n\t\t\t\tif ( empty( $value ) ) {\r\n\t\t\t\t\tunset( $columns[ $index ] );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$columns = self::$default_hidden_columns;\r\n\t\t}\r\n\r\n\t\treturn apply_filters( 'mla_list_table_get_hidden_columns', $columns );\r\n\t}", "public function get_hidden_columns() {\n\n\t\t// Return a blank array, filtered.\n\t\treturn apply_filters( Core\\HOOK_PREFIX . 'review_table_hidden_columns', array() );\n\t}", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\r\n\t{\r\n\t\treturn false;\r\n\t}", "public function isHidden()\r\n {\r\n return false;\r\n }", "public function isHidden()\r\n {\r\n return false;\r\n }", "public function isHidden()\r\n {\r\n return false;\r\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function setIsLabelHidden(bool $isLabelHidden): FieldsetInterface;", "public function isHidden() {\r\n return false;\r\n }", "public function isHidden() {\r\n return false;\r\n }", "function supports_hide_if_empty() {\n return TRUE;\n }", "public function hidden(): Column\n {\n return $this->booleanAttribute('visible', false);\n }", "public function withHidden($hidden=true);", "public function isHidden(): bool\n {\n return false;\n }", "function hide()\n {\n $this->_hidden = true;\n }", "public function setHiddenCols($cols){\n\t\t$this->hiddenCols=explode(\",\",$cols);\n\t}", "private function add_model_visibility()\n {\n }", "public function setHiddenFlag($hidden = true) {}", "public function getShowColumn()\n {\n $arr_result = [];\n foreach ($this->Columns as $key => $value){\n if (!in_array($key, self::HIDDEN_COLUMNS)){\n $arr_result[$key] = $value;\n }\n }\n return $arr_result;\n }", "private function showColumn()\n\t{\n\t\techo '<thead>\n\t\t\t<th></th>';\n\t\t\t\n\t\t\tforeach ($this->col_show as $col)\n\t\t\t\techo '<th>' . $col . '</th>';\n\t\t\n\t\techo '</thead>';\n\t}", "public function setLabelOnTop()\n {\n $this->horizontal = false;\n $this->col1 = 12;\n $this->col2 = 12;\n return $this;\n }", "public function display_rows()\n {\n }", "public function display_rows()\n {\n }", "function dumpColLayout($exclude=array())\r\n {\r\n $this->dumpGrid($exclude, 1, $this->_rows, \"100%\");\r\n }", "public function previewColumns();", "protected function hideFieldsForAddEdit()\n\t{\n\t\tif ($this->isAdd() || $this->isCopy() || $this->isGridAdd())\n\t\t\t$this->document_sequence->Visible = FALSE;\n\t}", "public function getHidden(): bool;", "public function isVisible() {\n return !is_null($this->num);\n }", "public function setVisibility() {}", "public function displayGridlines() {\n\t}", "public function setInvisibleFlag($invisible = true) {}", "public function isVisible();", "public function isVisible();", "public function toString()\n {\n return 'All column is visible.';\n }", "public function isHidden()\n {\n return !is_null($this->_dependsOf);\n }", "public function getHiddenFlag() {}", "public function setHidden($value = TRUE);", "function isHidden()\r\n\t{\r\n\t\t$db\t\t\t\t=& JFactory::getDBO();\r\n\t\tif ($db != $this->getDb()) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn parent::isHidden();\r\n\t}", "function is_hidden() {\n return $this->hidden;\n }", "function is_hidden() {\n return $this->hidden;\n }", "function is_hidden() {\n return $this->hidden;\n }", "function dumpGridBagLayout($exclude=array())\r\n {\r\n $this->dumpGrid($exclude, $this->_cols, $this->_rows, \"100%\");\r\n }", "public function isDisplayValuesWithoutResults();", "public function displayColumn1()\r\n\t{\r\n\t\t?>\r\n\t\t<script type=\"text/javascript\">\r\n\t\t\tjQuery(document).ready(function() {\r\n\t\t\t\t\r\n\t\t\t\tjQuery(\".remove\").click(function() {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (confirm(\"<?php _e('You are about to permanently delete the selected items.\\n\\'Cancel\\' to stop, \\'OK\\' to delete.','framework');?>\"))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t</script>\r\n\t\t<?php\r\n\t}", "function getVisible() {return $this->readVisible();}", "public function isHidden() {\n\t\tif ($this->displayCondition == null) {\n\t\t\treturn false;\n\t\t}\n\t\treturn !$this->displayCondition->isOk();\n\t}", "public function isHidden() {\n\t\tif ($this->displayCondition == null) {\n\t\t\treturn false;\n\t\t}\n\t\treturn !$this->displayCondition->isOk();\n\t}", "function is_hidden() {\n trigger_error('Admin class does not implement method <strong>is_hidden()</strong>', E_USER_WARNING);\n return;\n }", "public function setupVisibility();", "public function hide();", "function getLabelField() \n {\n return \"No Field Label Marked\";\n }", "function getLabelField() \n {\n return \"No Field Label Marked\";\n }", "function getLabelField() \n {\n return \"No Field Label Marked\";\n }", "function getLabelField() \n {\n return \"No Field Label Marked\";\n }", "function getLabelField() \n {\n return \"No Field Label Marked\";\n }", "function getLabelField() \n {\n return \"No Field Label Marked\";\n }" ]
[ "0.6714097", "0.6714097", "0.6543514", "0.64336693", "0.6431051", "0.635621", "0.635621", "0.633958", "0.63314825", "0.62764096", "0.6248063", "0.62172085", "0.615114", "0.6077067", "0.60562605", "0.6043824", "0.6017542", "0.5940232", "0.5931653", "0.5923974", "0.5923974", "0.5923974", "0.5923974", "0.5844119", "0.5829735", "0.58292013", "0.5828583", "0.5827595", "0.5824206", "0.57999206", "0.5799909", "0.5781151", "0.5781151", "0.5781151", "0.57805586", "0.57805586", "0.57805586", "0.57805586", "0.57805586", "0.57805586", "0.57805586", "0.57805586", "0.57805586", "0.57805586", "0.57805586", "0.57805586", "0.57805586", "0.57805586", "0.57805586", "0.57805586", "0.57805586", "0.57805586", "0.57501554", "0.5732951", "0.5732951", "0.57315993", "0.57173556", "0.5711785", "0.5691896", "0.5670591", "0.5653871", "0.55868924", "0.55828255", "0.55554706", "0.5524812", "0.55233204", "0.55089146", "0.550869", "0.54477066", "0.5446966", "0.5446041", "0.54226977", "0.5416623", "0.54014975", "0.5401422", "0.53998834", "0.5393925", "0.5393925", "0.5393445", "0.53882754", "0.538151", "0.5364654", "0.5348107", "0.53424317", "0.53424317", "0.53424317", "0.52735835", "0.5260159", "0.5251898", "0.52502996", "0.5243224", "0.5243224", "0.5231197", "0.5221324", "0.52151054", "0.5214959", "0.5214959", "0.5214959", "0.5214959", "0.5214959", "0.5214959" ]
0.0
-1
'last_name' is not required, but recommended
public function testRecommendedField() { $table = new Application_Model_DbTable_Table('ramp_auth_users'); $metaInfo = $table->info(Zend_Db_Table_Abstract::METADATA); $whichField = 'last_name'; $fieldSetting = array('recommended' => true); $field = new Application_Model_Field($whichField, $fieldSetting, $metaInfo[$whichField]); $this->assertTrue($field->isInTable()); $this->assertTrue($field->isInDB()); $this->assertFalse($field->isRequired()); $this->assertTrue($field->isRecommended()); $this->assertFalse($field->isDiscouraged()); // User does not HAVE to provide this value. $this->assertFalse($field->valueNecessaryForAdd()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function last_name() {\n $element = new Text('last_name');\n $element->setLabel('Last Name');\n $element->setAttribute('class', 'form-control');\n $element->setUserOption('lblRequired', true);\n $element->addValidators(array(\n new PresenceOf(array('message' => 'Last Name is required'))\n ));\n $this->add($element);\n }", "public function setLastName(string $last_name);", "private function setLastName()\n {\n \tif ( empty($_POST['last_name'] ) ) {\n \t\t$this->data['error']['last_name'] = \"Please provide your last name.\";\n $this->error = true;\n return;\n }\n \n $ln = trim( $_POST['last_name'] );\n \n \tif (preg_match('/^[A-Z \\'.-]{1,40}$/i', $ln)) {\n\t\t\t$this->data['last_name'] = $ln;\n\t\t} else {\n\t\t\t$this->data['error']['last_name'] = \"Your last name can include letters, apostrophes, periods and hyphens.\";\n $this->error = true;\n\t\t}\n }", "public function getLastname() {}", "public function getLastName() {}", "public function getLastName() {}", "public function getLastname(): string;", "function set_last_name($last_name='*')\r\n{\r\n\t$this->last_name = '';\t\t// return\r\n\t\r\n\t// get random name\r\n\tif ( $last_name == '*' )\r\n\t{\r\n\t\t$this->last_name = $this->_get_random_last_name();\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$this->last_name = $last_name;\r\n\t}\r\n\t\r\n\t// capitalize\r\n\t$this->last_name = ucwords($this->last_name);\r\n\t\r\n\t// tweaks\r\n\tif ( substr($this->last_name, 0, 2) == 'Mc' ) $this->last_name = 'Mc' . ucwords( substr($this->last_name, 2) );\r\n\t\r\n\treturn $this->last_name;\r\n}", "public function getCustomerLastname();", "public function getLastName(): string;", "function setLastName($lastName);", "private function validateLastName($last)\n {\n if (strlen($last) > 25 || strlen($last) < 2) {\n array_push($this->errorArray, \"Your last name must be between 25 & 2 characters\");\n return;\n }\n }", "public function testFullNameIsOptional()\n {\n $this->expectNotToPerformAssertions();\n\n new FirstLastNameUser('', '', '[email protected]');\n }", "public function setCustomerLastname($customerLastname);", "public function getLastName();", "function ag_rcp_require_first_and_last_names( $posted ) {\n\tif ( is_user_logged_in() ) {\n\t\treturn;\n\t}\n\t\n\tif ( empty( $posted['rcp_user_first'] ) ) {\n\t\trcp_errors()->add( 'first_name_required', __( 'Please enter your first name', 'christatimmer' ), 'register' );\n\t}\n\n\tif ( empty( $posted['rcp_user_last'] ) ) {\n\t\trcp_errors()->add( 'last_name_required', __( 'Please enter your last name', 'christatimmer' ), 'register' );\n\t}\n}", "public function setHonoreeFirstName($lastName);", "public function getLastName_always_returnCorrectly()\n {\n $this->assertEquals($this->user['user_metadata']['lastname'], $this->entity->getLastName());\n }", "function validateLastName($field)\n\t{\n //Make sure field is not blank\n if ($field == \"\") return \"Please specify your last name.\\\\n\";\n //Return an error if invalid input\n\t\tif (!preg_match(\"/^[a-zA-Z ,.'-]+$/\", $field)) return \"Invalid characters in last name.\\\\n\";\n\t\treturn \"\";\n\t}", "public function getLastName() { return $this->lastName; }", "public function setLastName($u_lname) {\n\n $this->u_lname = $u_lname;\n\n }", "function getRHUL_LastName() {\n return getRHUL_LDAP_FieldValue(\"last_name\");\n}", "public function lastname(){\n\t $_error = \"enter your last name\";\n\t\treturn $_error;\n\t}", "public function getLastName()\n {\n return $this->last_name ?? $this->surname ?? $this->lastName;\n\n }", "public function setLastName($last_name)\n\t{\n\t\t$this->last_name = $last_name;\n\t}", "public function getLastName(){\n \n return $this->last_name;\n \n }", "function setLastName($name)\n {\n if( !isset($name) || $name == '' )\n $name = 'Not Available';\n $this->addParam('last_name', (string)$name);\n }", "function getLastname()\n {\n return $this->lastname;\n }", "public function userHasProfileLastname()\n {\n $name = explode(' ', $this->user->name);\n\n $this->user->profile()->create([\n 'firstname' => $name[0],\n 'lastname' => $name[1],\n ]);\n\n $this->assertEquals($this->user->profile->lastname, $name[1]);\n\n }", "public function getLastname()\r\n {\r\n return $this->lastname;\r\n }", "public function setLastname($lastname) {\n $this->lastname = $lastname;\n }", "public function getLastname() {\n return $this->getValue('lastname');\n }", "public function saveLastName()\n {\n $this->validate(['lastName' => 'sometimes|required']);\n\n $this->updateValue(\n 'last_name',\n $this->lastName,\n 'Customer Last name updated successfully.'\n );\n\n $this->lastNameUpdate = false;\n $this->emit('profileUpdate');\n }", "public function setLastname($lastname) {\n\t\t$this->lastname = $lastname;\n\t}", "public function getHonoreeLastName();", "public function setHonoreeLastName($lastName);", "public function setLastName($last_name) {\n $this->user_last_name = $last_name;\n }", "public function getLastname()\n {\n return $this->lastname;\n\n }", "function validate_first_last_name(){\n\n global $bp;\n\n $firstName = $_POST['field_11'];\n $lastName = $_POST['field_12'];\n\n if ( (strlen($firstName) <= 2) && (strlen($lastName) <= 2) ){\n\n //$tld_index = strrpos($email,'.');\n //$tld = substr($email,$tld_index);\n\n //if ($tld != '.edu'){\n\t\n\n $bp->signup->errors['field_11'] = $firstName . ', ' . $lastName . ': Sorry, your first and last names cannot both be 2 characters or less';\n //}\n\n }\n\n}", "public function getUserLastName() :string {\n\t\treturn($this->userFirstName);\n\t}", "public function setLastName($lastName)\n {\n $this->lastName = $lastName;\n }", "public function setLastName($lastName)\n {\n $this->lastName = $lastName;\n }", "public function setLastname($value)\n {\n $this->_lastname = $value;\n }", "public function getLastName(): string\n {\n return $this->lastName;\n }", "public function getLastName(): string\n {\n return $this->lastName;\n }", "public function setFirstName(string $first_name);", "public function requestFirstname();", "public function testPersonalBitOfEmailIsUsedWhenFullNameIsNotProvided()\n {\n $bill = new FirstLastNameUser('', '', '[email protected]');\n\n $this->assertEquals('', $bill->getFirstName());\n $this->assertEquals('', $bill->getLastName());\n $this->assertEquals('Bill Gates', $bill->formatName(UserInterface::NAME_FULL));\n\n $steve = new FirstLastNameUser('', '', '[email protected]');\n\n $this->assertEquals('', $steve->getFirstName());\n $this->assertEquals('', $steve->getLastName());\n $this->assertEquals('Steve', $steve->formatName(UserInterface::NAME_FULL));\n }", "public function getLastname(): string\n {\n return $this->_lastname;\n }", "public function getLastName()\n {\n return App_Formatting::emptyToNull($this->lastName->getValue());\n }", "public function getLastName():string\n {\n return $this->lastName;\n }", "public function testRegistrationNoLastname()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/add_user')\n ->type('username', 'Tester1')\n ->type('first_name', 'Test')\n ->type('last_name', '')\n ->type('password', 'abcd1234')\n ->type('password_confirmation', 'abcd1234')\n ->click('button[type=\"submit\"]')\n\n // we're still on the registration page\n ->assertSee('Save');\n });\n }", "public function validateLastName()\n {\n $last_name = $this->_sanitized_data['last_name'];\n\n if (empty($last_name)) {\n $this->_addErrorMessage(\"Last name was blank or contained unwanted characters\");\n return false;\n }\n\n if (strlen($last_name) > 255) {\n $this->_addErrorMessage(\"Last name cannot be longer than 255 characters\");\n return false;\n }\n\n if ($last_name !== $this->_data['last_name']) {\n $this->_addErrorMessage(\"Last name data did not match after sanitizing\");\n return false;\n }\n\n return true;\n }", "public function getLastName(): ?string {\n return $this->_lastName;\n }", "public function setLastName(string $last_name) {\n\n $this->last_name = $last_name;\n\n }", "public function get_first_n_last_names()\t{\n\t\tif (strlen($this->last_name) == 0) {\n\t\t\treturn $this->first_name;\n\t\t}\n\t\treturn $this->first_name . ' ' . $this->last_name;\n\t}", "function getLastName()\r\n\t{\r\n\t\treturn $this->LastName;\r\n\t}", "public function getLastName() {\n\t\treturn $this->getCustomField( 'last_name' );\n\t}", "private function validateLastName($ln){\n if(strlen($ln)<2 || strlen($ln)>25){\n array_push($this->errorArray, Constants::$lastNameCharecters);\n }\n }", "public function getLastname()\r\n\t{\r\n\t\treturn $this->lastname;\r\n\t}", "public function getLastname()\n {\n return $this->lastname;\n }", "public function getLastname()\n {\n return $this->lastname;\n }", "public function getLastname()\n {\n return $this->lastname;\n }", "public function getLastname()\n {\n return $this->lastname;\n }", "public function getLastname()\n {\n return $this->lastname;\n }", "public function getLastname()\n {\n return $this->lastname;\n }", "public function getLastname()\n {\n return $this->lastname;\n }", "public function getLastname()\n {\n return $this->lastname;\n }", "public function getReqLastName()\n\t{\n\t\treturn $this->req_last_name;\n\t}", "public function setLastName($lastname){\n\t\t\t$this->lastname = $lastname;\n\t\t}", "public function getFirstName() {}", "public function getFirstName() {}", "public function getLastname() {\n return $this->lastname;\n }", "protected function first_name() {\n $element = new Text('first_name');\n $element->setLabel('First Name');\n $element->setAttribute('class', 'form-control');\n $element->setUserOption('lblRequired', true);\n $element->addValidators(array(\n new PresenceOf(array('message' => 'First Name is required'))\n ));\n $this->add($element);\n }", "public function getLastname()\n {\n return $this->lastname;\n }", "public function getLastName()\n {\n return $this->last_name;\n }", "public function getLastName()\n {\n return $this->last_name;\n }", "public function getLastName()\n {\n return $this->last_name;\n }", "public function getLastName()\n {\n return $this->last_name;\n }", "public function getLastName()\n {\n return $this->last_name;\n }", "public function setLastname(string $lastname): void\n {\n $this->_lastname = $lastname;\n }", "public function setLastName($newLastName) {\n //first trim the input of excess whitespace\n $newLastName = trim($newLastName);\n if($newLastName === null) {\n $this->lastName = null;\n return;\n }\n //sanitize for special characters\n $newLastName = filter_var($newLastName, FILTER_SANITIZE_SPECIAL_CHARS);\n \n //validate that value is string\n if(gettype($newLastName) !== \"string\") {\n throw(new UnexpectedValueException(\"The input Last Name format is invalid\"));\n }\n //set value of last name\n $this->lastName = $newLastName;\n }", "public function getBillingLastName();", "public function getFirstName(): string;", "public function setLastName(string $last_name): void\n {\n $this->_last_name = $last_name;\n }", "function _create_proper_name_field() {\r\n global $locale;\r\n $full_name = $locale->getLocaleFormattedName($this->first_name, $this->last_name, $this->salutation);\r\n $this->name = $full_name;\r\n $this->full_name = $full_name; \r\n\r\n\t}", "public function getLastNameAttribute(): string\n {\n if ($this->user !== null) {\n return $this->user->last_name;\n }\n return '';\n }", "public function setLastName( $last_name ){\n \n $this->last_name = $last_name;\n \n return $this;\n \n }", "public function getLastname() {\n\t\treturn $this->lastname;\n\t}", "protected function _lastname()\n {\n $element = new Zend_Form_Element_Text('lastname');\n $element->setLabel('Last name')\n ->addDecorators($this->_inputDecorators)\n ->setRequired(false)\n ->addFilter('StringTrim')\n ->addValidator('Alnum')\n ->addValidator(\n 'StringLength',\n false,\n array('max' => Users_Model_User::MAX_LASTNAME_LENGTH)\n );\n return $element;\n }", "protected function setLastname(string $lastname)\r\n\t{\r\n\t\t$this->lastname = $lastname;\r\n\t}", "public function validateLastname($lastname){\n if(preg_match(\"/^([a-zA-Z' ]+)$/\",$lastname)){\n return true;\n }else{\n return false;\n }\n }", "public function getFirstName();", "public function getSurname ();", "private function setFirstName()\n {\n \tif ( empty($_POST['first_name'] ) ) {\n \t\t$this->data['error']['first_name'] = \"Please provide your first name.\";\n $this->error = true;\n return;\n }\n \n $fn = trim( $_POST['first_name'] );\n \n\t\tif ( preg_match('/^[A-Z \\'.-]{1,40}$/i', $fn ) ) {\n\t\t\t$this->data['first_name'] = $fn;\n\t\t} else {\n\t\t\t$this->data['error']['first_name'] = \"Your first name can include letters, apostrophes, periods and hyphens.\";\n $this->error = true;\n\t\t}\n }", "public function getFirstname() {}", "function bbloomer_validate_name_fields( $errors, $username, $email ) {\r\n if ( isset( $_POST['billing_first_name'] ) && empty( $_POST['billing_first_name'] ) ) {\r\n $errors->add( 'billing_first_name_error', __( '<strong>Error</strong>: First name is required!', 'woocommerce' ) );\r\n }\r\n if ( isset( $_POST['billing_last_name'] ) && empty( $_POST['billing_last_name'] ) ) {\r\n $errors->add( 'billing_last_name_error', __( '<strong>Error</strong>: Last name is required!.', 'woocommerce' ) );\r\n }\r\n return $errors;\r\n}", "public function testReturnsFalseWhenLastNameIsEmpty()\n {\n $validator = new ContactValidator();\n $this->assertFalse($validator->validateLastName(''));\n }", "public function getLastName()\n {\n return $this->lastName;\n }", "public function getLastName()\n {\n return $this->lastName;\n }", "public function getLastName()\n {\n return $this->lastName;\n }" ]
[ "0.74346834", "0.7356797", "0.71386904", "0.7063418", "0.70119244", "0.70119244", "0.6980671", "0.69520694", "0.6933484", "0.68823195", "0.6882018", "0.68815815", "0.68181944", "0.68151027", "0.6813842", "0.6811844", "0.67246693", "0.6717102", "0.6703306", "0.67023003", "0.6700736", "0.6696387", "0.6674373", "0.66609585", "0.66475093", "0.65905005", "0.65892756", "0.6574939", "0.6558271", "0.65401983", "0.6534122", "0.65203476", "0.6519439", "0.65075296", "0.6497708", "0.64641804", "0.6454974", "0.64518183", "0.6449461", "0.643655", "0.64316267", "0.64316267", "0.6414612", "0.6412074", "0.6412074", "0.64106107", "0.6405265", "0.64032704", "0.63870263", "0.638194", "0.63783526", "0.63765275", "0.63724464", "0.6369209", "0.6366082", "0.6363581", "0.6348968", "0.63382584", "0.6332456", "0.6324468", "0.63240176", "0.63240176", "0.63240176", "0.63240176", "0.63240176", "0.63240176", "0.63240176", "0.63240176", "0.63208246", "0.63205355", "0.6293191", "0.6293191", "0.62777805", "0.6259108", "0.6245857", "0.6245074", "0.6245074", "0.6245074", "0.6245074", "0.6245074", "0.62412786", "0.6232543", "0.62315726", "0.6224301", "0.6224171", "0.62209255", "0.62196636", "0.6200693", "0.6200339", "0.6200249", "0.6182326", "0.61794555", "0.6177889", "0.6176075", "0.6173012", "0.6171602", "0.6168945", "0.6167068", "0.6165845", "0.6165845", "0.6165845" ]
0.0
-1
'id' is required and primary key (and autoincremented)
public function testFieldIsRequiredAndAutoIncremented() { $tableName = 'ramp_auth_users'; $table = new Application_Model_DbTable_Table($tableName); $metaInfo = $table->info(Zend_Db_Table_Abstract::METADATA); $whichField = 'id'; $field = new Application_Model_Field($whichField, array(), $metaInfo[$whichField]); $this->assertTrue($field->isInTable()); $this->assertTrue($field->isInDB()); $this->assertTrue($field->isRequired()); $this->assertTrue($field->isPrimaryKey()); $this->assertTrue($field->isAutoIncremented()); $this->assertNull($field->getDefault()); // User does not have to provide this value; system will provide it. $this->assertFalse($field->valueNecessaryForAdd()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function id($id = null);", "abstract public function insertId();", "abstract public function insertId();", "abstract public function insertId();", "public function create($id)\n {\n\n }", "public function create($id)\n {\n\n }", "public function create($id)\n {\n \n }", "public function create($id)\n {\n //\n\n }", "public static function primaryKey()\n {\n return 'id';\n }", "public function create($id)\n {\n }", "abstract public function insert_id();", "function insertId();", "public function store($id);", "public function insert_id();", "abstract public function InsertId();", "public function setId(int $id)\n {\n }", "public function setId(int $id)\n {\n $this->id = $id;\n }", "public function setId($id){ $this->id=$id;}", "public function id();", "public function id();", "public function id();", "public function id();", "public function id();", "public function id();", "public function id();", "public function id();", "public function id();", "public static function primaryKey()\n {\n return ['id'];\n }", "public static function primaryKey()\n {\n return ['id'];\n }", "public function setId($id) ;", "abstract public function insertID();", "public function add($id)\n {\n \n }", "public function byId($id);", "public function byId($id);", "public function byId($id);", "public function byId($id);", "public function create($id = '@Segment(index=id)')\n {\n \n }", "function add() {\r\n $sql = \"INSERT into student_researchers VALUES();\";\r\n global $db;\r\n if($db->Execute($sql) === false) {\r\n throw new Exception('SQL error. Unable to add a new researcher.');\r\n }\r\n $_REQUEST['id']=mysql_insert_id();\r\n\r\n edit();\r\n}", "abstract public function getPrimaryKey();", "abstract public function getPrimaryKey();", "public function __construct($id) { $this->id = $id; }", "public function create($id) //pasamos el id del cliente\n {\n \n }", "public function setId($id);", "public function setId($id);", "public function setId($id);", "public function setId($id);", "public function setId($id);", "public function setId($id);", "public function setId($id);", "public function setId($id);", "public function setId($id);", "public function setId($id);", "public function setId($id);", "public function setId($id);", "public function setId($id);", "public function setIncrementId($id);", "public function setId($id) { $this->id = $id; }", "public function id() { }", "abstract function getPrimaryKey();", "public function insert() {\r\n\r\n\t\ttry {\r\n\t\t\tglobal $ks_db;\r\n\t\t\tglobal $ks_log;\r\n\r\n\t\t\t$ks_db->beginTransaction ();\r\n\t\t\t\r\n\t\t\t$arrBindings = array ();\r\n\t\t\t$insertCols = '';\r\n\t\t\t$insertVals = '';\r\n\t\t\t\r\n\t\t\tif (isset ( $this->userid )) {\r\n\t\t\t\t$insertCols .= \"lp_userid, \";\r\n\t\t\t\t$insertVals .= \"?, \";\r\n\t\t\t\t$arrBindings[] = $this->userid;\r\n\t\t\t}\r\n\t\t\tif (isset ( $this->random )) {\r\n\t\t\t\t$insertCols .= \"lp_random, \";\r\n\t\t\t\t$insertVals .= \"?, \";\r\n\t\t\t\t$arrBindings[] = $this->random;\r\n\t\t\t}\r\n\t\t\tif (isset ( $this->deadline )) {\r\n\t\t\t\t$insertCols .= \"lp_deadline, \";\r\n\t\t\t\t$insertVals .= \"?, \";\r\n\t\t\t\t$arrBindings[] = $this->deadline;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//remove trailing commas\r\n\t\t\t$insertCols = preg_replace(\"/, $/\", \"\", $insertCols);\r\n\t\t\t$insertVals = preg_replace(\"/, $/\", \"\", $insertVals);\r\n\t\t\t\r\n\t\t\t$sql = \"INSERT INTO $this->sqlTable ($insertCols)\";\r\n\t\t\t$sql .= \" VALUES ($insertVals)\";\r\n\t\t\t\r\n\t\t\t$ks_db->query ( $sql, $arrBindings );\r\n\r\n\t\t\t//set the id property\r\n\t\t\t$this->id = $ks_db->lastInsertId();\r\n\t\t\t\r\n\t\t\t$ks_db->commit ();\r\n\t\t\t\r\n\t\t} catch(Exception $e) {\r\n\t\t\t$ks_db->rollBack ();\r\n\t\t\t$ks_log->info ( 'Fatal Error: ' . __CLASS__ . '::' . __METHOD__ . '. ' . $e->getMessage () );\r\n\t\t\t$ks_log->info ( '<br>SQL Statement: ' . $sql);\r\n\t\t\techo \"Fatal Error: \" . __CLASS__ . '::' . __METHOD__ . '. ' . $e->getMessage ();\r\n\t\t\techo \"SQL Statement: \" . $sql;\r\n\t\t}\r\n\t}", "public function getPrimaryKey();", "public function getPrimaryKey();", "public function getPrimaryKey();", "public function store($id)\n\t{\n\t\t//\n\t}", "public function store($id)\n\t{\n\t\t//\n\t}", "public static function primaryKey()\n {\n\n\n\n throw new NotSupportedException(__METHOD__ . ' you need to override this method');\n }", "function save( &$data, $id = false ) {\n\n\t\tif ( !$id ) {\n\t\t// if id is not false and id is not yet existed,\n\t\t\tif ( !empty( $this->primary_key ) && !empty( $this->key_prefix )) {\n\t\t\t// if the primary key and key prefix is existed,\n\t\t\t\n\t\t\t\t// generate the unique key\n\t\t\t\t$data[ $this->primary_key ] = $this->generate_key();\n\t\t\t}\n\n\t\t\t// insert the data as new record\n\t\t\treturn $this->db->insert( $this->table_name, $data );\n\t\t\t// print_r($this->db->last_query());die;\n\n\t\t} else {\n\t\t// else\n\t\t\t// where clause\n\t\t\t$this->db->where( $this->primary_key, $id);\n\n\t\t\t// update the data\n\t\t\treturn $this->db->update($this->table_name,$data);\n\t\t\t //print_r($this->db->last_query());die;\n\n\t\t}\n\t}", "public function save($id = NULL){\n if(!$id){\n $this->load->library('savequeries');\n $this->setId(date(\"YmdHis\") . rand(99, 999));\n $data = array(\n \"id\" => $this->getId()\n ,\"evolucao\" => $this->getEvolucao()\n , \"exame_complementar\" => $this->getExameComplementar()\n , \"conduta\" => $this->getConduta()\n );\n if($this->db->insert($this->getTable(), $data)){\n $this->savequeries->write($this->db->last_query());\n return $this->getId();\n }else{\n return FALSE;\n }\n }\n }", "protected function createNew() {\n $this->db->insert($this->tableName, $this->mapToDatabase());\n $this->id = $this->db->insert_id();\n }", "abstract public function primaryKey(): string;", "function insert_id();", "public function insert()\n {\n $this->id = insert($this);\n }", "public function setId($id)\n {\n $this->id = $id;\n\n \n }", "public function setID($id);", "public function __construct($id);", "public function __construct($id);", "public function __construct($id)\n {\n $this->id = $id;\n //\n\n }", "abstract public function getId();", "function test_setId()\n {\n //Arrange\n $id = null;\n $description = \"Wash the dog\";\n $test_task = new Task($description, $id);\n $test_task->save();\n\n //Act\n $test_task->setId(2);\n\n //Assert\n $result = $test_task->getId();\n $this->assertEquals(2, $result);\n }", "public function one($id);", "public function setId($id){\n $this->id = $id;\n }", "public function setId($id){\n $this->id = $id;\n }", "public function setId($id){\n $this->id = $id;\n }", "public function __construct($id)\r\n {\r\n $this->id = $id;\r\n }", "function load_id(){\r\n $db = new Database();\r\n $sql = \"select * from \" . Interest::TABLE_NAME . \" where name=:name\";\r\n $stm = $db->pdo->prepare($sql);\r\n $stm->bindParam(':name', $this->name);\r\n $stm->execute();\r\n if ($stm->rowCount() > 0){\r\n $row = $stm->fetch();\r\n $this->id = $row[\"id\"];\r\n }\r\n else{\r\n $this->save();\r\n $this->id = $db->pdo->lastInsertId();\r\n }\r\n }", "public function set_id($id){\n $this->id = $id;\n }", "function id()\r\n {\r\n return $this->ID;\r\n }", "public function setId()\n\t{\n\t}", "public function id() {\n }", "public function model(int $id)\n {\n }", "public function setId($id) \n {\n $this->id = $id;\n }", "public function store($id)\n {\n // TODO: Implement update() method\n }", "public function getId()\n{\nreturn $this->id;\n}", "public function setId($id)\n {\n $this->id = $id;\n }", "public function get_id()\t{return $this->id;}", "function get_id(){\n return $this -> id;\n }", "function get_id(){\n return $this -> id;\n }", "function get_id($id){\n\t\t$this->id = $id;\n\t}", "function setId($id){\r\n\t\t$this->id = $id;\r\n\t}", "public function commit($id);", "public function sql_insert_id() {}" ]
[ "0.6781595", "0.65998596", "0.65998596", "0.65998596", "0.65556526", "0.65556526", "0.6552452", "0.65382147", "0.65170515", "0.65108055", "0.6494839", "0.64570594", "0.64081407", "0.6350009", "0.6333238", "0.6316914", "0.62763727", "0.6247275", "0.6224604", "0.6224604", "0.6224604", "0.6224604", "0.6224604", "0.6224604", "0.6224604", "0.6224604", "0.6224604", "0.6223446", "0.6223446", "0.6196879", "0.61930174", "0.6175022", "0.61701083", "0.61701083", "0.61701083", "0.61701083", "0.61255306", "0.6123236", "0.6118763", "0.6118763", "0.60942584", "0.6075309", "0.6065383", "0.6065383", "0.6065383", "0.6065383", "0.6065383", "0.6065383", "0.6065383", "0.6065383", "0.6065383", "0.6065383", "0.6065383", "0.6065383", "0.6065383", "0.60639286", "0.6042308", "0.6039266", "0.60181403", "0.6016781", "0.60164905", "0.60164905", "0.60164905", "0.60065824", "0.60065824", "0.5987679", "0.5966023", "0.59638274", "0.59566385", "0.5956347", "0.59481335", "0.5947852", "0.5940976", "0.59212637", "0.5920471", "0.5920471", "0.5918777", "0.59126776", "0.59035254", "0.58956736", "0.58926517", "0.58926517", "0.58926517", "0.5890193", "0.58862114", "0.5880598", "0.5879585", "0.58774894", "0.5869073", "0.58673525", "0.58377916", "0.582087", "0.58208334", "0.58121634", "0.5811109", "0.58108425", "0.58108425", "0.5807205", "0.58069026", "0.5805073", "0.58026224" ]
0.0
-1
'gender' is required but not primary key; has a default
public function testFieldIsRequiredAndHasDefault() { $tableName = 'ramp_enumTesting'; $table = new Application_Model_DbTable_Table($tableName); $metaInfo = $table->info(Zend_Db_Table_Abstract::METADATA); $whichField = 'gender'; $field = new Application_Model_Field($whichField, array(), $metaInfo[$whichField]); $this->assertTrue($field->isInTable()); $this->assertTrue($field->isInDB()); $this->assertTrue($field->isRequired()); $this->assertFalse($field->isPrimaryKey()); $this->assertFalse($field->isAutoIncremented()); $this->assertSame('Unknown', $field->getDefault()); // User does not have to provide this value; default will serve. $this->assertFalse($field->valueNecessaryForAdd()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function gender()\n {\n return $this->belongsTo('App\\Gender', 'gender_id', 'id');\n }", "public function gender()\n {\n return $this->belongsTo('Poketracker\\Model\\Gender', 'gender_id');\n }", "public function genderID()\n {\n return $this->belongsTo(Lookups::class, 'gender', 'id');\n }", "function setGender( $gender )\n {\n\t if (is_int($gender)) {\n\t\t \n\t\t switch ( $gender ) {\n\t\t\t \n\t\t\t case RowManager_PersonManager::GENDER_MALE:\n\t\t\t \t$this->setValueByFieldName( 'gender_id', RowManager_PersonManager::GENDER_MALE );\n\t\t\t \tbreak;\n\t\t\t \t\n\t\t\t case RowManager_PersonManager::GENDER_FEMALE:\n\t\t\t \t$this->setValueByFieldName( 'gender_id', RowManager_PersonManager::GENDER_FEMALE );\n\t\t\t \tbreak;\n\t\t\t default:\n\t\t\t \t$this->setValueByFieldName( 'gender_id', RowManager_PersonManager::GENDER_UNKNOWN );\n\t\t }\n\t\t}\n\t\telse \n\t\t{\n\t\t\t$gender = mb_convert_case($gender, MB_CASE_UPPER);\n\t \tswitch( $gender ) {\n\t\t \n\t\t \tcase 'M':\n\t\t \tcase 'MALE':\n \t\t\t$this->setValueByFieldName( 'gender_id', RowManager_PersonManager::GENDER_MALE );\n \t\t\tbreak;\n \t\tcase 'F':\n \t\tcase 'FEMALE':\n \t\t\t$this->setValueByFieldName( 'gender_id', RowManager_PersonManager::GENDER_FEMALE );\n \t\t\tbreak; \n\t\t \tdefault:\n\t\t\t \t$this->setValueByFieldName( 'gender_id', RowManager_PersonManager::GENDER_UNKNOWN ); \t\t\t \t\t\n \t\t}\n \t\t}\n \t\t\n return;\n }", "public function getIdGender();", "public function gender()\n {\n return $this->belongsTo('App\\Models\\Lists\\Gender', 'gender_id');\n }", "public function getGender()\n {\n return $this->hasOne(Gender::class, ['id' => 'gender_id']);\n }", "private function setGenderValue()\n {\n $value = $this->getData(self::$genderAttributeCode);\n \n if (!$value) {\n $this->setCustomAttribute(self::$genderAttributeCode, 'N/A');\n return;\n }\n\n try {\n $attributeMetadata = $this->customerMetadata->getAttributeMetadata(self::$genderAttributeCode);\n $option = $attributeMetadata->getOptions()[$value];\n $this->setCustomAttribute(self::$genderAttributeCode, $option->getLabel());\n } catch (NoSuchEntityException $e) {\n $this->setCustomAttribute(self::$genderAttributeCode, 'N/A');\n }\n }", "function female() \n { \n $this->sex_id=\"F\";\n $this->sex_name=\"Female\";\n return($this->sex_id);\n }", "function set_identity($gender='*', $first_name='*', $last_name='*')\r\n{\r\n\t// primary identifiers\r\n\t$this->set_gender($gender);\r\n\t$this->set_first_name($first_name);\r\n\t$this->set_last_name($last_name);\r\n\t\r\n\t// secondary\r\n\t$this->full_name = $this->first_name . ' ' . $this->last_name;\r\n\t$this->set_user_name();\r\n\t$this->set_email();\r\n}", "public function setGender($gender)\n {\n $this->gender = $gender;\n }", "public function testBadGender()\n {\n $gender1 = new GenderEntity();\n $gender1->setGender('w');\n $this->_em->persist($gender1);\n\n $this->_em->flush();\n }", "public function sex()\n {\n return $this->belongsTo(\\App\\Models\\Sex::class, 'sex_uuid');\n }", "public function setGenderAttribute($gender)\n {\n $this->attributes['gender'] = empty($gender) ? 'M' : strtoupper($gender);\n }", "function set_gender($gender='*')\r\n{\r\n\t$this->gender = 0;\t\t// return\r\n\r\n\t// normalize gender\r\n\tif ( is_string($gender) )\r\n\t{\r\n\t\t$gender = substr($gender,0,1);\r\n\t\t$gender = strtoupper($gender);\r\n\t}\r\n\r\n\t// validity check\r\n\tif ( $gender != '*' && !in_array($gender, $this->VALID['GENDER']) )\r\n\t{\r\n\t\ttrigger_error('invalid value -- gender will be picked at random', E_USER_NOTICE);\r\n\t\t$gender = '*';\r\n\t}\r\n\t\r\n\t// random gender\r\n\tif ( $gender == '*' )\r\n\t{\r\n\t\t$this->gender = mt_rand(1,2);\r\n\t\t$this->_normalize_gender($this->gender);\r\n\t}\r\n\telseif ( is_numeric($gender) )\r\n\t{\r\n\t\t$this->gender = $gender;\r\n\t\t$this->_normalize_gender($this->gender);\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$this->gender_name = $gender;\r\n\t\t$this->_normalize_gender($this->gender_name);\r\n\t}\r\n\r\n\treturn $this->gender;\r\n}", "public function setCustomerGender($customerGender);", "public function setGender($gender_name){\n $this->gender = $gender_name;\n }", "public function setIdGender(int $idGender = Gender::UNKNOWN): ParamsInterface;", "public function setGender($value)\n {\n return $this->setParameter('gender', $value);\n }", "function __construct($name,$gender) {\n $this->name = $name;\n $this->gender = $gender;\n }", "public function getGenderFieldDefault ()\n {\n $genderDefault = $this->scopeConfig->getValue(\n 'customer/address/gender_show',\n ScopeInterface::SCOPE_STORE\n );\n return $genderDefault;\n }", "function isGenderUnknown() {\n\tglobal $USER;\n\tif(!isset($USER['gender'])) return true; //If we don't know guess they aren't\n if($USER['gender']==\"u\") {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "function getGender($userid) {\n return NULL;\n }", "protected function createGender($value) {\r\n switch ($value) {\r\n case \"m\":\r\n return Person::TYPE_GENDER_MALE;\r\n break;\r\n case \"f\":\r\n return Person::TYPE_GENDER_FEMALE;\r\n break;\r\n case \"c\":\r\n return Person::TYPE_GENDER_UNDEFINED;\r\n break;\r\n default:\r\n return null;\r\n break;\r\n }\r\n }", "public function create_default() {\n if (!$this->model->has_default()) {\n $default_data = [\n 'id' => 1,\n 'name' => 'Beregu',\n 'desc' => 'team vs team',\n ];\n $this->model->create_default($default_data);\n\n $default_data = [\n 'id' => 2,\n 'name' => 'Individu',\n 'desc' => 'individu vs individu',\n ];\n $this->model->create_default($default_data);\n }\n }", "public function getGenderId($aid) {\n $gender = db::table('myapplicants')\n -> where('aid', $aid) -> value('gender');\n if($gender) {\n $criteria_id = $this -> get_sorting_id($gender);\n if($criteria_id) return $criteria_id;\n return false;\n }\n return false;\n }", "public function testFieldIsRequiredAndHasNoDefault()\n {\n $tableName = 'ramp_enumTesting';\n $table = new Application_Model_DbTable_Table($tableName);\n $metaInfo = $table->info(Zend_Db_Table_Abstract::METADATA);\n $whichField = 'status';\n\n $field = new Application_Model_Field($whichField, array(),\n $metaInfo[$whichField]);\n $this->assertTrue($field->isInTable());\n $this->assertTrue($field->isInDB());\n $this->assertTrue($field->isRequired());\n $this->assertFalse($field->isPrimaryKey());\n $this->assertFalse($field->isAutoIncremented());\n $this->assertNull($field->getDefault());\n // User must provide this value.\n $this->assertTrue($field->valueNecessaryForAdd());\n }", "function getGender() {\n return $this->gender;\n }", "public function __construct($name, $salary, $gender, $id=\"\") \n {\n $this->id = $id;\n $this->name = $name;\n $this->salary = $salary;\n $this->gender = $gender;\n }", "public function getCustomerGender();", "public function testFieldIsRequiredAndAutoIncremented()\n {\n $tableName = 'ramp_auth_users';\n $table = new Application_Model_DbTable_Table($tableName);\n $metaInfo = $table->info(Zend_Db_Table_Abstract::METADATA);\n $whichField = 'id';\n\n $field = new Application_Model_Field($whichField, array(),\n $metaInfo[$whichField]);\n $this->assertTrue($field->isInTable());\n $this->assertTrue($field->isInDB());\n $this->assertTrue($field->isRequired());\n $this->assertTrue($field->isPrimaryKey());\n $this->assertTrue($field->isAutoIncremented());\n $this->assertNull($field->getDefault());\n // User does not have to provide this value; system will provide it.\n $this->assertFalse($field->valueNecessaryForAdd());\n }", "private function getGender(){\n $gender_array= array(\"male\",\"female\");\n return $gender_array[rand(0,1)];\n }", "public function getGenderAttribute($val) {\n return $val == 1 ? \"male\" : \"female\";\n }", "public function createDefaultEntrant(): void\n {\n $entrant = new Entrant();\n $entrant->first_name = $this->first_name;\n $entrant->family_name = $this->last_name;\n $entrant->can_retain_data = $this->can_retain_data;\n if ($entrant->save()) {\n $this->entrants()->save($entrant);\n }\n }", "public function isDefault()\n {\n return $this->column->name === 'id' && $this->column->type === 'id';\n }", "public function vxUserCreateInsert($usr_nick, $usr_password, $usr_email, $usr_gender) {\n\t\tif (get_magic_quotes_gpc()) {\n\t\t\t$usr_nick = stripslashes($usr_nick);\n\t\t\t$usr_nick = mysql_real_escape_string($usr_nick);\n\t\t\t\n\t\t\t$usr_password = stripslashes($usr_password);\n\t\t\t$usr_password = mysql_real_escape_string($usr_password);\n\t\t} else {\n\t\t\t$usr_nick = mysql_real_escape_string($usr_nick);\n\t\t\t$usr_password = mysql_real_escape_string($usr_password);\n\t\t}\n\t\t$usr_password_encrypted = sha1($usr_password);\n\t\t$usr_created = time();\n\t\t\n\t\t/* insert new user */\n\t\t$sql = \"INSERT INTO babel_user(usr_nick, usr_password, usr_email, usr_gender, usr_created, usr_lastupdated) VALUES('{$usr_nick}', '{$usr_password_encrypted}', '{$usr_email}', {$usr_gender}, {$usr_created}, {$usr_created})\";\n\t\tmysql_query($sql, $this->db);\n\t\t\n\t\t$sql = \"SELECT usr_id, usr_nick, usr_password, usr_email, usr_money FROM babel_user WHERE usr_email = '{$usr_email}'\";\n\t\t$User = mysql_fetch_object(mysql_query($sql, $this->db));\n\t\t\n\t\t$grp_created = time();\n\t\t$sql = \"INSERT INTO babel_group(grp_oid, grp_nick, grp_created, grp_lastupdated) VALUES({$User->usr_id}, '{$User->usr_nick}', {$grp_created}, {$grp_created})\";\n\t\tmysql_query($sql, $this->db);\n\t\t\n\t\t$sql = \"SELECT grp_id, grp_nick FROM babel_group WHERE grp_nick = '{$User->usr_nick}'\";\n\t\t$Group = mysql_fetch_object(mysql_query($sql, $this->db));\n\t\t\n\t\t$sql = \"UPDATE babel_user SET usr_gid = {$Group->grp_id} WHERE usr_id = {$User->usr_id} LIMIT 1\";\n\t\tmysql_query($sql, $this->db);\n\t\t\n\t\treturn $User;\n\t}", "public function getGender()\n {\n return $this->gender;\n }", "public function getGender()\n {\n return $this->gender;\n }", "public function getGender()\n {\n return $this->gender;\n }", "public function getGender()\n {\n return $this->gender;\n }", "public function definition()\n {\n $gender = ['female', 'male'];\n return [\n 'user_name' => $this->faker->name,\n 'user_email' => $this->faker->unique()->safeEmail,\n 'user_address' => $this->faker->address,\n 'user_mobile' => $this->faker->phoneNumber,\n 'gender' => $gender[random_int(0, 1)],\n 'date' => $this->faker->date()\n ];\n }", "function setGender($newGender){\n $this->gender = $newGender;\n }", "function _normalize_gender($value)\r\n{\r\n\t// normalize gender\r\n\tif ( is_string($value) )\r\n\t{\r\n\t\t$gender = substr($value,0,1);\r\n\t\t$gender = strtoupper($value);\r\n\t}\r\n\t\r\n\t// validity check\r\n\tif ( !in_array($value, $this->VALID['GENDER']) )\r\n\t{\r\n\t\t$list = print_r($this->VALID['GENDER'],1);\r\n\t\ttrigger_error(\"invalid gender value -- must set to one of following: $list\", E_USER_WARNING);\r\n\t\treturn 0;\r\n\t}\r\n\t\r\n\t// set gender number and abbreviation\r\n\tif ( is_numeric($value) )\r\n\t{\r\n\t\t$this->gender = $value;\r\n\t\tif ( $value == $this->m_val ) $this->gender_name = $this->m_abr;\r\n\t\telse $this->gender_name = $this->f_abr;\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$this->gender_name = $value;\r\n\t\tif ( $value == $this->m_abr ) $this->gender = $this->m_val;\r\n\t\telse $this->gender = $this->f_val;\r\n\t}\r\n\t\r\n\treturn;\r\n}", "public function getGender()\n {\n return $this->gender;\n }", "public function getGender()\n {\n return $this->gender;\n }", "public static function relations()\n {\n return [\n// 'gender' => ['Gender', 'gender'],\n// 'gender' => 'Gender',\n ];\n }", "public function primaryKey()\n {\n return 'ugid';\n }", "function getJoinOnGenderID()\n { \n return $this->getJoinOnFieldX('gender_id');\n }", "public function testSetAndGetGender()\r\n {\r\n $testObj = $this->_createMockModel();\r\n $baseObj = $this->_createMockModel();\r\n\r\n // Set the Gender\r\n $testObj->setGender('Male');\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 Gender field was updated\r\n $this->assertEquals('Male', $testObj->getGender());\r\n\r\n // Assert that no other return values were affected\r\n $this->_assertModelsSameExcept($testObj, $baseObj, 'Gender');\r\n }", "public function create()\n {\n return view('admin.gender.create');\n }", "public function getGender(){ // fungsi get untuk mengambil nilai dari gender\n printNumC();//\n return $this->gender;\n }", "public function get_no_gender($gender,$usertype){\r\n $sch_id = $_SESSION['sch_id'];\r\n $this->db->select(\"*\");\r\n $this->db->from('acadah_users');\r\n $this->db->where('sch_id',$sch_id);\r\n $this->db->where('user_type',$usertype);\r\n $this->db->where('gender',$gender);\r\n $query = $this->db->get();\r\n return $query->num_rows();\r\n }", "public static function getRandomGender()\n {\n $genders = self::getGenders();\n return (integer)$genders[array_rand($genders)];\n }", "public function store(GenderRequest $request)\n {\n $this->gender->create($request);\n $this->gender->notif('Data has been created', 'success');\n return redirect()->route('setting.gender.index');\n }", "public function getGender()\n\t{\n\t\treturn $this->gender;\n\t}", "public function createProfile($gender, $name, $surname, $birthday, $state, $city, $phoneNumber, $hobby, $description, $idUser)\n {\n // make query\n $query = \"INSERT INTO \".$this->profileTable.\" (gender, name, surname, birthday, state, city, phone_number, hobby, description, id_user) VALUES ('$gender', '$name', '$surname', '$birthday', '$state', '$city', '$phoneNumber', '$hobby', '$description', '$idUser')\"; \n $result = mysqli_query($this->db->getDb(), $query);\n \n // set json response\n if($result == 1)\n {\n $idProfile = $this->db->getDb()->insert_id;\n $json['id_profile'] = $idProfile;\n $json['success'] = 1;\n $json['message'] = \"Wirtualny profil został utworzony!\";\n }\n else\n {\n $json['success'] = 0;\n $json['message'] = \"Nie udało się utworzyć wirtualnego profilu\";\n }\n \n return $json;\n }", "public function setGender($gender) {\n $this->gender = $gender;\n return $this;\n }", "public function getGenderCode()\n {\n return $this->genderCode;\n }", "public function searchUserByGender($gender){\r\n $result = $this->DB->fetchAll('select * from user where gender = ?',array($gender));\r\n return $this->formatResult($result);\r\n }", "static function cat_gender()\n {\n global $post;\n\n // Nonce field to validate form request came from current site\n wp_nonce_field(basename(__FILE__), 'cat_fields');\n\n // Get the gender data if it's already been entered\n $gender = get_post_meta($post->ID, 'gender', true);\n\n // Output the field\n echo sprintf('<input type=\"radio\" id=\"male\" name=\"gender\" %s value=\"male\">\n <label for=\"male\">Male</label><br>\n <input type=\"radio\" id=\"female\" name=\"gender\" %s value=\"female\">\n <label for=\"female\">Female</label><br><br>', $gender == 'male' ? 'checked' : '', $gender == 'female' ? 'checked' : '');\n }", "public function getGender(): Gender\n {\n return $this->gender;\n }", "protected function _buddy_gender_guess() {\n return 'LOOKUP';\n}", "public function getGender() {\n return $this->gender;\n }", "public function setGender($gender)\n {\n $this->gender = $gender;\n\n return $this;\n }", "public function setGender($gender)\n {\n $this->gender = $gender;\n\n return $this;\n }", "public function setGender($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (int) $v;\n\t\t}\n\n\t\tif ($this->gender !== $v) {\n\t\t\t$this->gender = $v;\n\t\t\t$this->modifiedColumns[] = UserPeer::GENDER;\n\t\t}\n\n\t\treturn $this;\n\t}", "function isGirl() {\n\tglobal $USER;\n\tif(!isset($USER['gender'])) return false; //If we don't know guess they aren't\n if($USER['gender']==\"f\") {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "public function getGenderTextAttribute()\n {\n return static::genderTextMap[$this->gender];\n }", "public function updateGender($something=null) {\n if($something == 'male' || $something == 'female') {\n $this->gender = $something;\n $this->gender_probability = 1;\n\n return true;\n }\n\n // for facebook GraphNodes\n if(method_exists($something, 'getField')) {\n $gender = $something->getField('gender');\n if($gender) {\n $this->gender = $gender;\n $this->gender_probability = 1;\n\n return true;\n }\n }\n\n // try to find by first_name but only for weak matches\n if($this->first_name && $this->gender_probability < 0.9) {\n $client = new Client();\n\n $res = $client->request('GET', 'https://api.genderize.io/', [\n 'query' => ['name' => $this->first_name, 'country_id' => 'pl'],\n ]);\n\n if($res->getStatusCode() == 200) {\n $json = json_decode($res->getBody());\n\n if($json->gender && $json->probability > $this->gender_probability) {\n $this->gender = $json->gender;\n $this->gender_probability = $json->probability;\n\n return true;\n }\n }\n\n // wild guess - only if there was no other option\n if($this->gender_probability == 0) {\n if(ends_with($this->first_name, 'a')) {\n $this->gender = 'female';\n $this->gender_probability = 0.01;\n } else {\n $this->gender = 'male';\n $this->gender_probability = 0.01;\n }\n\n return true;\n }\n }\n\n return false;\n }", "public function getGender() {\n\t\treturn $this->gender;\n\t}", "function getCpAnredenGeneric($gender) {\n $greet = array('male'=>'Herr','female'=>'Frau');\n $sql = \"select language_id,COALESCE(translation,'\".$greet[$gender].\"') from generic_translations where translation_type ILIKE 'greetings::$gender%'\";\n $rs=$GLOBALS['dbh']->getAll($sql);\n return $rs;\n}", "public function definition()\n {\n $gender = $this->faker->randomElement(array('male', 'female'));\n // $id = $this->faker->randomElement(array(1,5));\n $age = $this->faker->numberBetween(19,99);\n return [\n 'first_name' => $this->faker->firstName($gender),\n 'last_name' => $this->faker->lastName,\n 'other_name' => $this->faker->lastName,\n 'username' => $this->faker->userName,\n 'age' => $age,\n 'gender' => $gender,\n 'dob' => $this->faker->date(),\n 'mobile' => $this->faker->phoneNumber,\n 'address' => $this->faker->streetAddress,\n 'city' => $this->faker->city,\n 'state' => $this->faker->state,\n 'doctor_note' => $this->faker->sentence(10),\n 'email' => $this->faker->unique()->safeEmail,\n 'email_verified_at' => now(),\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password\n 'remember_token' => Str::random(10),\n ];\n }", "protected function get_default_primary_column_name()\n {\n }", "protected function get_default_primary_column_name()\n {\n }", "protected function get_default_primary_column_name()\n {\n }", "protected function get_default_primary_column_name()\n {\n }", "protected function get_default_primary_column_name()\n {\n }", "protected function get_default_primary_column_name()\n {\n }", "protected function get_default_primary_column_name()\n {\n }", "protected function get_default_primary_column_name()\n {\n }", "protected function get_default_primary_column_name()\n {\n }", "protected function get_default_primary_column_name()\n {\n }", "protected function get_default_primary_column_name()\n {\n }", "private function setBasicInfo($id, $title, $forename, $surname, $birthday, \n $gender, $maritalStatus, $height, $weight, $occupation)\n {\n $this->db->set('title', $title);\n $this->db->set('firstname', $forename);\n $this->db->set('surname', $surname);\n $this->db->set('dob', $birthday);\n $this->db->set('gender', $gender);\n $this->db->set('marital_status', $maritalStatus);\n $this->db->set('height', $height);\n $this->db->set('weight', $weight);\n $this->db->set('occupation', $occupation);\n\n //where the user id is matching their own record\n $this->db->where('GUID', $id);\n //update users table\n $this->db->update('users');\n\n //check whether update statement has been executed\n if ($this->db->affected_rows() != 0) {\n return true;\n } else {\n return false;\n }\n }", "public function getGender()\n {\n return $this->getParameter('gender');\n }", "public function create()\n {\n return view('pages.gender.create');\n }", "public function definition()\n {\n $gender = $this->faker->randomElement(['male', 'female']);\n return [\n 'fname' => $this->faker->name($gender),\n 'username' => $this->faker->userName,\n 'email' => $this->faker->unique()->safeEmail,\n 'tel' => $this->faker->unique()->phoneNumber,\n 'address' => $this->faker->address,\n 'gender' => $gender,\n 'avatar' => 'profile image/'. $this->faker->image(public_path('profile image'),400,300, 'people', false), \n 'email_verified_at' => now(),\n 'password' => Hash::make('CMS-Client'), // password\n // 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password\n 'remember_token' => Str::random(10),\n ];\n }", "public function run()\n {\n\n User::create([\n 'name' => 'Sarah Ashour',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'gender' => 'female',\n 'role' => 'admin',\n 'age' => 25,\n 'user_preference' => 'active',\n 'profile_pic' => 'admin.jpg'\n ]);\n\n $female_names = array(\n 'Jane Doe',\n 'Jasmine Doe',\n 'Samiha Doe',\n 'Sammar Doe',\n 'Pakinam Doe',\n 'Fatma Doe',\n 'Jennifer Doe',\n 'Sylvia Doe',\n 'Amina Doe',\n 'Sarah Doe',\n 'Salma Doe',\n 'Diana Doe',\n 'Monica Doe',\n 'Anne Doe',\n 'Aysel Doe',\n 'Mai Doe',\n 'Rewan Doe',\n 'Aya Doe',\n 'Manal Doe',\n 'Allaa Doe',\n 'Farah Doe',\n 'Dina Doe',\n 'Habiba Doe',\n 'Ghada Doe',\n 'Maha Doe',\n 'Mirna Doe',\n 'Nourhan Doe'\n );\n\n $female_emails = array(\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]'\n );\n\n $male_names = array(\n 'John Doe',\n 'Ahmed Doe',\n 'Mohamed Doe',\n 'Patrick Doe',\n 'Hossam Doe',\n 'Mahmoud Doe',\n 'Samir Doe',\n 'Chris Doe',\n 'Ayman Doe',\n 'Mostafa Doe',\n 'Ali Doe',\n 'Omar Doe',\n 'David Doe',\n 'Hassan Doe',\n 'Islam Doe',\n 'Ameer Doe',\n 'Fouad Doe',\n 'Alaa Doe',\n 'Khaled Doe',\n 'Sherif Doe',\n 'Ihab Doe',\n 'Basel Doe',\n 'Basem Doe'\n );\n\n $male_emails = array(\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]'\n );\n\n\n for ($i = 0; $i < 27; $i++) {\n User::create([\n 'name' => $female_names[$i],\n 'email' => $female_emails[$i],\n 'password' => bcrypt('123456'),\n 'gender' => 'female',\n 'age' => $this->getRandomUserAge(),\n 'user_preference' => $this->getRandomUserPreferenceValue($this->getRandomUserPreference()),\n 'role' => 'user',\n 'profile_pic' => 'women/' . ($i + 1) . '.jpg'\n ]);\n }\n for ($i = 0; $i < 23; $i++) {\n User::create([\n 'name' => $male_names[$i],\n 'email' => $male_emails[$i],\n 'password' => bcrypt('123456'),\n 'gender' => 'male',\n 'age' => $this->getRandomUserAge(),\n 'user_preference' => $this->getRandomUserPreferenceValue($this->getRandomUserPreference()),\n 'role' => 'user',\n 'profile_pic' => 'men/' . ($i + 1) . '.jpg'\n ]);\n\n }\n }", "protected function createDefaultUser() {\n User::create([\n 'name' => 'Admin',\n 'puntaje' => 1,\n 'lastname' => 'Admin',\n 'nacimiento' => Carbon::now(),\n 'fecha_visita' => Carbon::now(),\n 'email' => '[email protected]',\n 'equipo_id' => 1,\n 'password' => Hash::make('123456789')\n ]); \n }", "public function get_gender(){\n $query = $this->db->get('gender_14');\n if($query){\n return $query->result_array();\n }\n else{\n return false;\n }\n }", "public function run()\n {\n \\DB::table('genders')->insert([\n\n 'id'=>'1', \n\n 'gender_name'=>'Male', \n ]);\n \\DB::table('genders')->insert([\n\n 'id'=>'2', \n\n 'gender_name'=>'Female', \n ]); \\DB::table('genders')->insert([\n\n 'id'=>'3', \n\n 'gender_name'=>'Other', \n ]);\n }", "public function setGender($gender)\n {\n $this->gender = $gender;\n\n return $this;\n }", "public function setGender($gender)\n {\n $this->gender = $gender;\n\n return $this;\n }", "public function setGender($gender)\n {\n $this->gender = $gender;\n\n return $this;\n }", "function getGender($user, $gender) {\n\t$result = dbQuery(\"SELECT * FROM users WHERE username = '$user'\");\n\t$row = mysql_fetch_array($result);\n\n\t if( $row['gender'] == $gender ) \n\t {\n\t\t return true;\n\t\t } \n\t\t else\n\t\t {\n\t\t \t return false;\n\t\t }\n}", "public function hasGender() {\n return $this->_has(1);\n }", "public function getGenderAttribute($value)\n {\n return $value === 'L' ? 'Laki-laki' : 'Perempuan';\n }", "abstract public function primaryKey(): string;", "public function testRecommendedField()\n {\n $table = new Application_Model_DbTable_Table('ramp_auth_users');\n $metaInfo = $table->info(Zend_Db_Table_Abstract::METADATA);\n $whichField = 'last_name';\n $fieldSetting = array('recommended' => true);\n\n $field = new Application_Model_Field($whichField, $fieldSetting,\n $metaInfo[$whichField]);\n\n $this->assertTrue($field->isInTable());\n $this->assertTrue($field->isInDB());\n $this->assertFalse($field->isRequired());\n $this->assertTrue($field->isRecommended());\n $this->assertFalse($field->isDiscouraged());\n // User does not HAVE to provide this value.\n $this->assertFalse($field->valueNecessaryForAdd());\n }", "public function getGender() {\n\t\treturn $this->_gender;\n\t}" ]
[ "0.6369725", "0.6201123", "0.610377", "0.6097473", "0.6038414", "0.5955394", "0.5931999", "0.57520205", "0.5707818", "0.5682033", "0.5573807", "0.5571645", "0.5563719", "0.55358887", "0.5498666", "0.53888345", "0.53607166", "0.53215164", "0.53172004", "0.5282661", "0.52764624", "0.52753896", "0.52635765", "0.5246534", "0.5210121", "0.5148933", "0.5120136", "0.5113519", "0.5108543", "0.50932366", "0.50899947", "0.5084648", "0.5050453", "0.5041402", "0.50223607", "0.5006908", "0.50056034", "0.50056034", "0.50056034", "0.50056034", "0.49971467", "0.49970117", "0.49917343", "0.49742588", "0.49742588", "0.49704283", "0.4964801", "0.49624005", "0.4961273", "0.49536517", "0.49464458", "0.4945622", "0.4930553", "0.4922524", "0.49210843", "0.49171367", "0.49098572", "0.4906097", "0.4905921", "0.49018618", "0.48873875", "0.48860136", "0.4867496", "0.48625317", "0.48625317", "0.48432785", "0.4831541", "0.48261622", "0.48219952", "0.4818162", "0.48170805", "0.4805147", "0.48003107", "0.48003107", "0.4799934", "0.4799934", "0.4799934", "0.47979355", "0.47979355", "0.47979355", "0.47979355", "0.47979355", "0.47979355", "0.479011", "0.47884324", "0.47771367", "0.47687745", "0.47629032", "0.47444487", "0.4741384", "0.4740631", "0.47173634", "0.47173634", "0.47173634", "0.47058645", "0.46953562", "0.46825546", "0.46819374", "0.46806327", "0.46789736" ]
0.6580803
0
'status' is required but has no default
public function testFieldIsRequiredAndHasNoDefault() { $tableName = 'ramp_enumTesting'; $table = new Application_Model_DbTable_Table($tableName); $metaInfo = $table->info(Zend_Db_Table_Abstract::METADATA); $whichField = 'status'; $field = new Application_Model_Field($whichField, array(), $metaInfo[$whichField]); $this->assertTrue($field->isInTable()); $this->assertTrue($field->isInDB()); $this->assertTrue($field->isRequired()); $this->assertFalse($field->isPrimaryKey()); $this->assertFalse($field->isAutoIncremented()); $this->assertNull($field->getDefault()); // User must provide this value. $this->assertTrue($field->valueNecessaryForAdd()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected static function set_status()\n {\n }", "public static function status($status) {}", "abstract public function getStatus();", "public function getStatus()\n {\n }", "public function testIfCreationIsCorrect(){ \n \n $this->assertEquals(-1, $this->status->getStatusId()); \n $this->assertEquals('default_status', $this->status->getStatusName());\n \n }", "public function get_status()\n {\n }", "public function get_status()\n {\n }", "public function testSetStatus()\n {\n $this->todo('stub');\n }", "private function getDefaultStatus(): string\n {\n return InviteStatus::pending()->value;\n }", "public function status();", "public function status();", "public function setStatus($value) {\n$allowed = ['complete', 'in progress'];\nif (!in_array($value, $allowed))\n throw new Exception('A status must be either complete or in progress');\n$this->status = $value;\nreturn $this;\n}", "public function setUserDefaultStatus($userDefaultStatus);", "public function a_status_default_value_must_be_zero()\n {\n $email = factory(Email::class)->raw();\n unset($email['status']);\n\n Email::create($email);\n\n $this->assertCount(1, Email::all());\n }", "public function setDefaultStatus() {\n if (!$this->hasField('field_room')) {\n return;\n }\n if (!$this->get('field_room')->isEmpty()) {\n $room = $this->get('field_room')->entity;\n $approval_required = $room->field_approval_required->getString();\n\n $current_user = \\Drupal::currentUser();\n if ($current_user->hasPermission('bypass room reservation agreement')) {\n $approval_required = FALSE;\n }\n\n $current_status = $this->get('field_status')->getString();\n\n if (!$approval_required && $current_status == 'requested') {\n $this->approve();\n }\n }\n }", "public function changeStatus()\n {\n }", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function withStatus($status = null)\n{\n $this->setStatus($status);\n return $this;\n}", "public function getUserDefaultStatus();", "public function status(): mixed\n {\n return new Status('status');\n }", "public function get($status = NULL){\n\n }", "public function __construct($status)\n {\n $this->status = $status;\n }", "function set_status($status)\r\n {\r\n $this->set_default_property(self :: PROPERTY_STATUS, $status);\r\n }", "protected function status()\n {\n }", "abstract public function setStatus($status);", "public function getdefaultStatus()\n {\n return $this->defaultstatus;\n }", "public function testValidationDefaultNoStatus()\r\n { \r\n $data = $this->getCorrectData();\r\n $data['status'] = NULL;\r\n $zoneProperty = $this->Solids->newEntity($data);\r\n $expectedResult = ['status' => [\r\n \"_empty\" => \"This field cannot be left empty\", \r\n ]\r\n ];\r\n $this->assertNotEmpty($zoneProperty->errors());\r\n $this->assertEquals($expectedResult, $zoneProperty->errors());\r\n }", "public function getStatus () {\n\n\t// TODO\n\n\treturn \"invalid\";\n }", "public function setStatus($value,$options=array('required'=>true)){ \n \n $options['listOptions']=array('N'=>'Não','S'=>'Sim','S'=>'S','E'=>'E','N'=>'N','Z'=>'Z');\n $this->_data['status'] = new ZendT_Type_Default($value,$options);\n if ($options['db'])\n $this->_data['status']->setValueFromDb($value);\n \n if (!$options['db']){\n \n if ($options['required'])\n $this->isRequired($value,'status');\n \n $valid = new Zend_Validate_StringLength(array ( 'max' => 1, ) );\n $valueValid = $this->_data['status']->getValueToDb();\n if ($valueValid && !$valid->isValid($valueValid)){\n throw new ZendT_Exception_Business(implode(\"\\n\",$valid->getMessages()));\n }\n \n }\n return $this;\n }", "public static function validateStatus()\n{\n return array(\n new Main\\Entity\\Validator\\Length(null, 1),\n );\n}", "function status(){\n return ($this -> is_approved())?\"Approved\":\"Unapproved\";\n }", "public function getStatus();", "public function getStatus();", "public function getStatus();", "public function getStatus();", "public function getStatus();", "public function getStatus();", "public function getStatus();", "public function getStatus();", "public function getStatus();", "public function getStatus();", "public function update_status();", "abstract public function GetStatus();", "public function __construct($status)\n {\n parent::__construct();\n\n $this->setStatus($status);\n }", "public function respon(){\n //update 'status'\n }", "protected function getDefaultStatus() {\n return Status::create($this, self::STATUS_NOTAPPROVED, User::USERID_SYSTEM);\n }", "public function status()\t{\n\t\t\t$this->veiculo->update($this->input->post('id'), array('veiculo_status' => $this->input->post('status')));\n\t\t}", "public function beforeSave()\n {\n if ($this->getStatus() == null) {\n $this->setStatus(self::STATUS_NEW);\n }\n }", "public function setStatus($status);", "public function setStatus($status);", "public function testStatusOption()\n {\n $user = factory(User::class)->create();\n $lease = factory(Lease::class)->create();\n }", "function isValidStatus($status)\n {\n }", "function getStatus() ;", "function getStatus() ;", "function getStatus() ;", "public function get_status(){\n return $this->status;\n }", "public function getStatusAttribute($value)\n {\n return ($value === 1) ? 'Published' : 'Submitted';\n }", "function get_status()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_STATUS);\r\n }", "public function testStatusConfirm()\n {\n\n }", "public function getStatus(){\n return $this->getParameter('status');\n }", "public function status_cls($status){\n\t\tif($status == '1'){\n\t\t $stat = 'success';\n\t\t}else{\t\n\t\t $stat = 'important';\t\n\t\t}\n\t\treturn $stat;\n\t}", "public function user_status_cls($status){\n\t\tif($status == '0'){\n\t\t $stat = 'success';\n\t\t}elseif($status == '1'){\n\t\t $stat = 'important';\t\n\t\t}\n\t\treturn $stat;\n\t}", "public function create()\n {\n $this->authorize('create', Status::class);\n }", "function getStatus() {\n return $this->status;\n }", "private function getStatus(){\n\t\t$this->valid=$this->checkDatesValidity();\n\t\tif($this->usage==\"once\" && $this->usageCount) $this->valid = false;\n\t\tif($this->usage==\"count\" && $this->usageCount>=$this->maxUsage) $this->valid = false;\n\t\tif($this->type==\"fixed\" && $this->value<=0) $this->valid = false;\n\t\tif($this->type==\"grid\" && !count($this->grid)) $this->valid = false;\n\t}", "public function status(): int;", "public function test_wp_create_user_request_default_pending_status() {\n\t\t$actual = wp_create_user_request( self::$non_registered_user_email, 'export_personal_data' );\n\t\t$post = get_post( $actual );\n\n\t\t$this->assertSame( 'request-pending', $post->post_status );\n\t}", "function getStatus();", "public function getStatus() \n {\n if ($this->status) \n {\n \techo 'user status : присутствует<br><br><br>';\n }\n else\n {\n \techo 'user status : отсутствует<br><br><br>';\t\n }\n }", "public function statusOptions()\n\t{\n\t\treturn array('pending', 'processing', 'complete', 'on_hold');\n\t}", "function get_status() {\n return $this->status;\n }", "public function getJobStatus()\n {\n }", "public function warning_action( $status = '' ) {\n\t\t\tif ( 'empty' == $status ) {\n\t\t\t\t$message = esc_html__( 'Parameter `action` was not set.', 'wpglobus-plus' );\n\t\t\t} else {\n\t\t\t\t$message = esc_html__( 'Parameter `action` is incorrect.', 'wpglobus-plus' );\n\t\t\t}\n\t\t\t?>\n\t\t\t<div class=\"wrap\">\n\t\t\t\t<h1>WPGlobus :: <?php esc_html_e( 'Set Draft', 'wpglobus-plus' ); ?></h1>\n\t\t\t\t<hr />\n\t\t\t\t<h3><?php echo $message; ?></h3>\n\t\t\t\t<?php $this->back_button(); ?>\n\t\t\t</div><!-- .wrap -->\t\n\t\t\t<?php\n\t\t}", "public function getStatus($instance=false){\n if ($instance && !is_object($this->_data['status'])){\n $this->setStatus('',array('required'=>false));\n }\n return $this->_data['status'];\n }", "public function getStatus($instance=false){\n if ($instance && !is_object($this->_data['status'])){\n $this->setStatus('',array('required'=>false));\n }\n return $this->_data['status'];\n }", "public function getStatus($instance=false){\n if ($instance && !is_object($this->_data['status'])){\n $this->setStatus('',array('required'=>false));\n }\n return $this->_data['status'];\n }", "function changeStatus($status){\n return false;\n}", "function status();", "public function set_status ($status) {\n $this->status = $status;\n }", "public function setStatus(string $status): void;" ]
[ "0.65385103", "0.6506961", "0.64292663", "0.63982046", "0.6349078", "0.6293667", "0.6293667", "0.6274138", "0.62537736", "0.62516266", "0.62516266", "0.62476987", "0.6220195", "0.6216161", "0.6205582", "0.6192368", "0.6186977", "0.6186977", "0.6186977", "0.6186977", "0.6186977", "0.6186977", "0.6186977", "0.6186977", "0.6186977", "0.6186977", "0.6186977", "0.6186977", "0.6186977", "0.6186977", "0.6186977", "0.6186977", "0.6186977", "0.61857134", "0.61857134", "0.61857134", "0.61857134", "0.6158009", "0.6156901", "0.6120381", "0.61175203", "0.6116064", "0.6107883", "0.6105402", "0.6086737", "0.6052447", "0.6038637", "0.60323834", "0.6026807", "0.60052496", "0.60019356", "0.5997063", "0.5997063", "0.5997063", "0.5997063", "0.5997063", "0.5997063", "0.5997063", "0.5997063", "0.5997063", "0.5997063", "0.59936625", "0.5969234", "0.59689033", "0.5963587", "0.59435624", "0.59103703", "0.5880266", "0.5878991", "0.5878991", "0.5878755", "0.58738106", "0.5867753", "0.5867753", "0.5867157", "0.5855973", "0.5830399", "0.5824006", "0.5819447", "0.57996047", "0.5799569", "0.57981145", "0.5794585", "0.5790706", "0.5788462", "0.5775513", "0.57426935", "0.57423055", "0.5725362", "0.5719675", "0.57166445", "0.5715407", "0.57132316", "0.5708659", "0.5708659", "0.5708659", "0.5707663", "0.57014763", "0.570025", "0.56957155" ]
0.6102602
44
Test isEnum, enum data type & values, and default.
public function testEnumDataType() { $tableName = 'ramp_enumTesting'; $table = new Application_Model_DbTable_Table($tableName); $metaInfo = $table->info(Zend_Db_Table_Abstract::METADATA); $whichField = 'gender'; $field = new Application_Model_Field($whichField, array(), $metaInfo[$whichField]); $this->assertTrue($field->isInTable()); $this->assertTrue($field->isInDB()); $this->assertTrue($field->isEnum()); $this->assertSame("enum('Unknown','M','F')", $field->getDataType()); $this->assertSame(array('Unknown','M','F'), array_keys($field->getEnumValues())); $this->assertSame('Unknown', $field->getDefault()); $this->_assertWholelyLocal($field); $this->_assertMetaInfoValues($tableName, $whichField, $field); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testEnumField()\n {\n $field = $this->table->getField('yeahnay'); // An enum column\n $this->assertInstanceOf('Metrol\\DBTable\\Field\\PostgreSQL\\Enumerated',\n $field);\n $enumValues = $field->getValues();\n $this->assertCount(2, $enumValues);\n $this->assertEquals('Yes', $enumValues[0]);\n $this->assertEquals('No', $enumValues[1]);\n }", "public function forValueWithValues()\n {\n assert(\n TestEnumWithValues::forValue(10),\n isSameAs(TestEnumWithValues::$FOO)\n );\n }", "public function testAcceptsAWellDefinedEnumTypeWithEmptyValueDefinition()\n {\n /** @noinspection PhpUnhandledExceptionInspection */\n $enumType = newEnumType([\n 'name' => 'SomeEnum',\n 'values' => [\n 'FOO' => [],\n 'BAR' => [],\n ],\n ]);\n\n /** @noinspection PhpUnhandledExceptionInspection */\n $this->assertEquals('FOO', $enumType->getValue('FOO')->getValue());\n /** @noinspection PhpUnhandledExceptionInspection */\n $this->assertEquals('BAR', $enumType->getValue('BAR')->getValue());\n }", "function check_enum_value_type($received_value, $table_name, $table_field, \\PDO $db) {\n $options = \\k1lib\\sql\\get_db_table_enum_values($db, $table_name, $table_field);\n $options_fliped = array_flip($options);\n\n if (!isset($options_fliped[$received_value])) {\n $error_type = print_r($options_fliped, TRUE) . \" value: '$received_value'\";\n// d($received_value, TRUE);\n } else {\n $error_type = FALSE;\n }\n return $error_type;\n}", "public function useEnumValues(): bool\n {\n return $this->useEnumValues;\n }", "public function testRejectsAnEnumTypeWithMissingValueDefinition()\n {\n /** @noinspection PhpUnhandledExceptionInspection */\n $enumType = newEnumType([\n 'name' => 'SomeEnum',\n 'values' => ['FOO' => null],\n ]);\n\n $this->expectException(InvariantException::class);\n $this->expectExceptionMessage(\n 'SomeEnum.FOO must refer to an object with a \"value\" key representing ' .\n 'an internal value but got: null.'\n );\n\n /** @noinspection PhpUnhandledExceptionInspection */\n $enumType->getValues();\n\n $this->addToAssertionCount(1);\n }", "public function testIfWrongValueThrows() : void\n {\n\n $this->expectException(FieldValueInproperException::class);\n\n // Create Field.\n $field = new EnumField('test_name');\n $field->setModel(( new Model() )->setName('test'));\n $field->setValues('one', 'two', 'three');\n\n // Test.\n $this->assertFalse($field->isValueValid('four'));\n }", "abstract protected function getSupportedEnumType() : string;", "final public function isEnum():bool\n {\n return $this->mode === 'enum';\n }", "public function testRejectsAnEnumWithIncorrectlyTypedValues()\n {\n /** @noinspection PhpUnhandledExceptionInspection */\n $enumType = newEnumType([\n 'name' => 'SomeEnum',\n 'values' => [['FOO' => 10]],\n ]);\n\n $this->expectException(InvariantException::class);\n $this->expectExceptionMessage('SomeEnum values must be an associative array with value names as keys.');\n\n /** @noinspection PhpUnhandledExceptionInspection */\n $enumType->getValues();\n\n $this->addToAssertionCount(1);\n }", "function is_enum(mixed $var): bool\n{\n return is_object($var) && enum_exists($var::class, false);\n}", "public function testAcceptsAWellDefinedEnumTypeWithInternalValueDefinition()\n {\n /** @noinspection PhpUnhandledExceptionInspection */\n $enumType = newEnumType([\n 'name' => 'SomeEnum',\n 'values' => [\n 'FOO' => ['value' => 10],\n 'BAR' => ['value' => 20],\n ],\n ]);\n\n /** @noinspection PhpUnhandledExceptionInspection */\n $this->assertEquals(10, $enumType->getValue('FOO')->getValue());\n /** @noinspection PhpUnhandledExceptionInspection */\n $this->assertEquals(20, $enumType->getValue('BAR')->getValue());\n }", "public function testFieldIsRequiredAndHasDefault()\n {\n $tableName = 'ramp_enumTesting';\n $table = new Application_Model_DbTable_Table($tableName);\n $metaInfo = $table->info(Zend_Db_Table_Abstract::METADATA);\n $whichField = 'gender';\n\n $field = new Application_Model_Field($whichField, array(),\n $metaInfo[$whichField]);\n $this->assertTrue($field->isInTable());\n $this->assertTrue($field->isInDB());\n $this->assertTrue($field->isRequired());\n $this->assertFalse($field->isPrimaryKey());\n $this->assertFalse($field->isAutoIncremented());\n $this->assertSame('Unknown', $field->getDefault());\n // User does not have to provide this value; default will serve.\n $this->assertFalse($field->valueNecessaryForAdd());\n }", "public function forValueWithoutValues()\n {\n assert(\n TestEnumWithoutValues::forValue('FOO'),\n isSameAs(TestEnumWithoutValues::$FOO)\n );\n }", "public function isEnumType()\n {\n return $this->getType() == PropelTypes::ENUM;\n }", "public function testRejectsAnEnumTypeWithIncorrectlyTypedValueDefinition()\n {\n /** @noinspection PhpUnhandledExceptionInspection */\n $enumType = newEnumType([\n 'name' => 'SomeEnum',\n 'values' => ['FOO' => 10],\n ]);\n\n $this->expectException(InvariantException::class);\n $this->expectExceptionMessage(\n 'SomeEnum.FOO must refer to an object with a \"value\" key representing ' .\n 'an internal value but got: 10.'\n );\n\n /** @noinspection PhpUnhandledExceptionInspection */\n $enumType->getValues();\n\n $this->addToAssertionCount(1);\n }", "public static function Parse($enumType, $value, $ignoreCase) {\r\n /*\r\n * ArgumentNullException\t\r\n enumType or value is null.\r\n * \r\n ArgumentException\r\n enumType is not an Enum.\r\n -or-\r\n value is either an empty string (\"\") or only contains white space.\r\n -or-\r\n value is a name, but not one of the named constants defined for the enumeration.\r\n * \r\n OverflowException\r\n value is outside the range of the underlying type of enumType.\r\n */\r\n return false;\r\n }", "public function testIfWorks() : void\n {\n\n // Lvd.\n $dicts = [\n 'main' => [ 'one', 'two', 'three' ],\n 'pl:pl' => [ 'jeden', 'dwa', 'trzy' ],\n ];\n\n // Create Field.\n $field = new EnumField('test_name');\n $field->setValues(...$dicts['main']);\n $field->setDict('pl:pl', ...$dicts['pl:pl']);\n\n // Test.\n $this->assertEquals($dicts['main'], $field->getValues());\n $this->assertEquals($dicts['main'], $field->getMainDict());\n $this->assertEquals($dicts['pl:pl'], $field->getDict('pl:pl'));\n $this->assertEquals($dicts, $field->getDicts());\n $this->assertEquals($dicts['main'][0], $field->getDictValue('one'));\n $this->assertEquals($dicts['main'][0], $field->getDictValue('one', 'main'));\n $this->assertEquals($dicts['pl:pl'][0], $field->getDictValue('one', 'pl:pl'));\n $this->assertTrue($field->isValueValid(null));\n $this->assertTrue($field->isValueValid('one'));\n $this->assertFalse($field->isValueValid('jeden', false));\n $this->assertFalse($field->isValueValid('1', false));\n }", "public function testInvalidEnum()\n {\n $this->expectException(UnexpectedValueException::class);\n\n $createPaymentAccountRequest = new CreatePaymentAccountRequest(\n 'Valid Description',\n 'INVALID_ENUM_VALUE'\n );\n }", "static public function Enum ( $var, $allowed ) { return in_array( $var, $allowed ) ? $var : false; }", "static public function isEnumValue ($value) {\n\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:461: characters 3-31\n\t\treturn ($value instanceof HxEnum);\n\t}", "public static function are_valid_enums($enum_property_list, $params){\n foreach ($enum_property_list as $item){\n $property = $item[\"property\"];\n $enum = $item[\"enum\"];\n if(isset($params[$property])){\n if(!Media::is_valid_enum($enum, $params[$property])){\n $http_response = HttpFailCodes::http_response_fail()->valid_enums;\n $http_response->message = \"Must choose a valid value for \" . $property . \".\";\n APIService::response_fail($http_response);\n }\n }\n }\n return true;\n }", "public function testValueIsInvalid()\n {\n $init = 'foo';\n $set = array('test');\n $str = new \\Pv\\PEnum($init, null, $set);\n }", "public function hasEnumFields()\n {\n foreach ($this->fields as $col) {\n if ($col->isEnumType()) {\n return true;\n }\n }\n\n return false;\n }", "private function enumsHaveValues() : bool\n {\n foreach ($this->enums as $enum) {\n if ($enum->value !== null) {\n return true;\n }\n }\n\n return false;\n }", "public static function is_valid_enum($enum, $value){\n foreach ($enum as $key => $enum_value) {\n if ($enum_value == $value){\n return true;\n }\n }\n return false;\n }", "public function testValueIsCorrect()\n {\n $init = 'test';\n $set = array('test');\n $str = new \\Pv\\PEnum($init, null, $set);\n }", "public static function IsDefined($enumType, $value) {\r\n /*\r\n * ArgumentNullException\t\r\n enumType or value is null.\r\n * \r\n ArgumentException\r\n enumType is not an Enum.\r\n -or-\r\n The type of value is an enumeration, but it is not an enumeration of type enumType.\r\n -or-\r\n The type of value is not an underlying type of enumType.\r\n * \r\n InvalidOperationException\r\n value is not type SByte, Int16, Int32, Int64, Byte, UInt16, UInt32, or UInt64, or String.\r\n */\r\n }", "function _mysql_enum_values($tableName,$fieldName){\n\n\t\t#$result = @mysql_query(\"DESCRIBE $tableName\");\n\n\t\t foreach($this->fields as $row){\n\n\t\t\tereg('^([^ (]+)(\\((.+)\\))?([ ](.+))?$',$row['Type'],$fieldTypeSplit);\n\n\t\t\t//split type up into array\n\t\t\t$fieldType = $fieldTypeSplit[1];\n\t\t\t$fieldLen = $fieldTypeSplit[3];\n\n\t\t\tif ( ($fieldType=='enum' || $fieldType=='set') && ($row['Field']==$fieldName) ){\n\t\t\t\t$fieldOptions = split(\"','\",substr($fieldLen,1,-1));\n\t\t\t\treturn $fieldOptions;\n\t\t\t\t}\n\t\t}\n\n\t\treturn FALSE;\n\n\t}", "public function testFieldIsRequiredAndHasNoDefault()\n {\n $tableName = 'ramp_enumTesting';\n $table = new Application_Model_DbTable_Table($tableName);\n $metaInfo = $table->info(Zend_Db_Table_Abstract::METADATA);\n $whichField = 'status';\n\n $field = new Application_Model_Field($whichField, array(),\n $metaInfo[$whichField]);\n $this->assertTrue($field->isInTable());\n $this->assertTrue($field->isInDB());\n $this->assertTrue($field->isRequired());\n $this->assertFalse($field->isPrimaryKey());\n $this->assertFalse($field->isAutoIncremented());\n $this->assertNull($field->getDefault());\n // User must provide this value.\n $this->assertTrue($field->valueNecessaryForAdd());\n }", "final private function __construct(string $enum)\n {\n $enum = strtoupper($enum);\n if (!array_key_exists($enum, static::$values)) {\n throw new UnexpectedValueException();\n }\n $this->value = static::$values[$enum];\n }", "public function it_has_correct_set_of_allowed_values(): void\n {\n $allowed = [\n ChannelNotificationSeverity::INFO,\n ChannelNotificationSeverity::WARNING,\n ChannelNotificationSeverity::ERROR,\n ];\n self::assertEquals($allowed, ChannelNotificationSeverity::getAllowableEnumValues());\n }", "public function validateEnum($data, $schema, $path)\n {\n if (!isset($schema->enum)) {\n return;\n }\n\n // if $data comes from an array than the action below has already been done in validateArray()\n $needle = (isset($schema->caseSensitive) && !$schema->caseSensitive) ? strtolower($data) : $data;\n $haystack = (isset($schema->caseSensitive) && !$schema->caseSensitive) ? array_map('strtolower', $schema->enum) : $schema->enum;\n\n if (!in_array($needle, $haystack)) {\n\n $this->addError(\n ValidateException::ERROR_USER_ENUM_NEEDLE_NOT_FOUND_IN_HAYSTACK,\n [$path, $data, $this->conjugationObject(count($schema->enum), 'this specific value', 'one of these values'), implode('\\', \\'', $schema->enum)]\n );\n }\n }", "function getEnumValues($table,$column, &$default) \n{\n\t\n\t$retval = NULL;\n\t\n\tglobal $dbHandle;\n\n\t/********\n\t$dbHandle = new mysqlj(MYSQL_SERVER, MYSQL_USERNAME, MYSQL_PASSWORD, MYSQL_DATABASE)\n\t\t or die(\"Could not connect to server: MYSQL_SERVER : Database MYSQL_DATABASE \" . mysqlj_error($this->dbHandle));\n **************/\n\t$queryString = \"SHOW COLUMNS FROM `\" . $table . \"` LIKE '\" . $column . \"'\";\n\t$query=mysql_query($queryString);\n\t\n\tif(mysql_num_rows($query) > 0)\n\t{\n\t\t$row=mysql_fetch_assoc($query);\n\t\t$retval=explode(\"','\",preg_replace(\"/(enum|set)\\('(.+?)'\\)/\",\"\\\\2\",$row['Type']));\n\t\t$default = $row['Default'];\t// Default is passed by reference offset 4 of the row array is the default value\n\t\t\t\t\t\t\t\t\t\t\t\t // of the enumerated field\n\t}\t\n\t\n\tmysql_freeresult($query);\n\n\t\n\treturn $retval;\n\t\t\n}", "public static function set_enum_property($data, $property, $enum, $default_value = null){\n return (isset($data[$property]) && Media::is_valid_enum($enum, $data[$property]))\n ? $data[$property] : $default_value;\n }", "public function getEnumValues()\n {\n return array(\n 'GENDER_UNKNOWN' => self::GENDER_UNKNOWN,\n 'GENDER_MALE' => self::GENDER_MALE,\n 'GENDER_FEMALE' => self::GENDER_FEMALE,\n );\n }", "public function it_has_correct_allowed_values_for_gender(): void\n {\n $allowed = [\n 'male','female','diverse',\n ];\n\n $sut = new Address();\n $this->assertMethodExists($sut, 'getGenderAllowableValues');\n $this->assertEquals($allowed, $sut->getGenderAllowableValues());\n }", "public static function getAllowableEnumValues()\n {\n return [\n self::NONE,\nself::ON_FIXED_DATE,\nself::AFTER_X_DAYS,\nself::ON_VARIABLE_DATE_TIME,\nself::SET_TO_NULL, ];\n }", "public function testDoesNotAllowIsDeprecatedWithoutDeprecationReasonOnEnum()\n {\n /** @noinspection PhpUnhandledExceptionInspection */\n $enumType = newEnumType([\n 'name' => 'SomeEnum',\n 'values' => ['FOO' => ['isDeprecated' => true]],\n ]);\n\n $this->expectException(InvariantException::class);\n $this->expectExceptionMessage(\n 'SomeEnum.FOO should provide \"deprecationReason\" instead of \"isDeprecated\".'\n );\n\n /** @noinspection PhpUnhandledExceptionInspection */\n $enumType->getValues();\n\n $this->addToAssertionCount(1);\n }", "public function getEnumValues()\n {\n return array(\n 'get_ok' => self::get_ok,\n 'change_ok' => self::change_ok,\n 'fail' => self::fail,\n );\n }", "public function testEnumTypeWithAValueOfNull()\n {\n /** @noinspection PhpUnhandledExceptionInspection */\n $enumTypeWithNullValue = newEnumType([\n 'name' => 'EnumWithNullValue',\n 'values' => ['NULL' => ['value' => null]],\n ]);\n\n /** @noinspection PhpUnhandledExceptionInspection */\n $enumValue = $enumTypeWithNullValue->getValues()[0];\n $this->assertSame('NULL', $enumValue->getName());\n $this->assertNull($enumValue->getDescription());\n $this->assertSame(false, $enumValue->isDeprecated());\n $this->assertNull($enumValue->getValue());\n $this->assertNull($enumValue->getAstNode());\n }", "protected function isValueEnum(string $field, $value)\n {\n return in_array($value, static::getEnum($field));\n }", "public static function getAllowableEnumValues()\n {\n return [\n self::GROUND,\nself::STANDARD,\nself::PREMIUM, ];\n }", "public function getEnumValues()\n {\n return array(\n 'win' => self::win,\n 'fail' => self::fail,\n );\n }", "public function getEnumValues()\n {\n return array(\n 'noneed' => self::noneed,\n 'force' => self::force,\n );\n }", "protected function isValidEnum(string $field, $value)\n {\n return $this->isValueEnum($field, $value) ||\n $this->isKeyedEnum($field, $value);\n }", "public function enum($table = false, $field = false, $value = false, $mode = 'add', $pasive = false)\n {\n if (!$table || !$field || !$value) {\n return false;\n }\n\n $sql = \"SHOW COLUMNS FROM `\" . RL_DBPREFIX . $table . \"` LIKE '{$field}'\";\n $enum_row = $this->getRow($sql);\n preg_match('/([a-z]*)\\((.*)\\)/', $enum_row['Type'], $matches);\n\n if (!in_array(strtolower($matches[1]), array('enum', 'set'))) {\n die('ENUM add/edit method (table: ' . $table . '): <b>' . $field . '</b> field is not ENUM or SET type field');\n return false;\n }\n\n $enum_values = explode(',', $matches[2]);\n\n if ($mode == 'add') {\n if (false !== array_search(\"'{$value}'\", $enum_values)) {\n die('ENUM add/edit method (table: ' . $table . '): <b>' . $field . '</b> field already has <b>' . $value . '</b> value');\n return false;\n }\n\n array_push($enum_values, \"'{$value}'\");\n } elseif ($mode == 'remove') {\n $pos = array_search(\"'{$value}'\", $enum_values);\n\n if ($pos === false) {\n return false;\n }\n\n unset($enum_values[$pos]);\n\n if (empty($enum_values)) {\n die('ENUM add/edit method (table: ' . $table . '): <b>' . $field . '</b> field will not has any values after your remove');\n return false;\n }\n\n $enum_values = array_values($enum_values);\n }\n\n $sql = \"ALTER TABLE `\" . RL_DBPREFIX . $table . \"` CHANGE `{$field}` `{$field}` \" . strtoupper($matches[1]) . \"( \" . implode(',', $enum_values) . \" ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL\";\n if (strtolower($matches[1]) == 'enum') {\n $sql .= \" DEFAULT {$enum_values[0]}\";\n }\n\n $this->query($sql);\n\n return true;\n }", "public static function getAllowableEnumValues()\n {\n return [\n self::_OR,\n self::_AND,\n self::NOTIN,\n self::UNKNOWN,\n ];\n }", "public function testEnumTypeWithDeprecatedValue()\n {\n /** @noinspection PhpUnhandledExceptionInspection */\n $enumWithDeprecatedValue = newEnumType([\n 'name' => 'EnumWithDeprecatedValue',\n 'values' => ['foo' => ['deprecationReason' => 'Just because']],\n ]);\n\n /** @noinspection PhpUnhandledExceptionInspection */\n $enumValue = $enumWithDeprecatedValue->getValues()[0];\n\n $this->assertSame('foo', $enumValue->getName());\n $this->assertTrue($enumValue->isDeprecated());\n $this->assertSame('Just because', $enumValue->getDeprecationReason());\n $this->assertSame('foo', $enumValue->getValue());\n }", "#[\\ReturnTypeWillChange]\n public static function getAllowableEnumValues()\n {\n return [\n self::ACTIVE,\n self::INACTIVE,\n self::DEACTIVATED\n ];\n }", "function get_enum_values( $table, $field )\n{\n global $wpdb;\n $type = $wpdb->get_row(\"SHOW COLUMNS FROM {$table} WHERE Field = '{$field}'\" )->Type;\n preg_match(\"/^enum\\(\\'(.*)\\'\\)$/\", $type, $matches);\n $enum = explode(\"','\", $matches[1]);\n return $enum;\n}", "public function getEnumValues()\n {\n return array(\n 'MTYPE_AGENT_REPORT' => self::MTYPE_AGENT_REPORT,\n 'MTYPE_AGENT_REPORT_R' => self::MTYPE_AGENT_REPORT_R,\n 'MTYPE_AGENT_HEATBEAT' => self::MTYPE_AGENT_HEATBEAT,\n 'MTYPE_CENTER_MASTER_NOTICE' => self::MTYPE_CENTER_MASTER_NOTICE,\n 'MTYPE_CENTER_MASTER_NOTICE_R' => self::MTYPE_CENTER_MASTER_NOTICE_R,\n 'MTYPE_CENTER_SUBTASK_CMD' => self::MTYPE_CENTER_SUBTASK_CMD,\n 'MTYPE_CENTER_SUBTASK_CMD_R' => self::MTYPE_CENTER_SUBTASK_CMD_R,\n 'MTYPE_AGENT_SUBTASK_PROCESS' => self::MTYPE_AGENT_SUBTASK_PROCESS,\n 'MTYPE_AGENT_SUBTASK_CMD_RESULT' => self::MTYPE_AGENT_SUBTASK_CMD_RESULT,\n 'MTYPE_AGENT_SUBTASK_CMD_RESULT_R' => self::MTYPE_AGENT_SUBTASK_CMD_RESULT_R,\n 'MTYPE_CENTER_OPR_CMD' => self::MTYPE_CENTER_OPR_CMD,\n 'MTYPE_CENTER_OPR_CMD_R' => self::MTYPE_CENTER_OPR_CMD_R,\n 'MTYPE_CENTER_AGENT_SUBTASK_OUTPUT' => self::MTYPE_CENTER_AGENT_SUBTASK_OUTPUT,\n 'MTYPE_CENTER_AGENT_SUBTASK_OUTPUT_R' => self::MTYPE_CENTER_AGENT_SUBTASK_OUTPUT_R,\n 'MTYPE_CENTER_AGENT_RUNNING_TASK' => self::MTYPE_CENTER_AGENT_RUNNING_TASK,\n 'MTYPE_CENTER_AGENT_RUNNING_TASK_R' => self::MTYPE_CENTER_AGENT_RUNNING_TASK_R,\n 'MTYPE_CENTER_AGENT_RUNNING_OPR' => self::MTYPE_CENTER_AGENT_RUNNING_OPR,\n 'MTYPE_CENTER_AGENT_RUNNING_OPR_R' => self::MTYPE_CENTER_AGENT_RUNNING_OPR_R,\n 'MTYPE_UI_AGENT_SUBTASK_OUTPUT' => self::MTYPE_UI_AGENT_SUBTASK_OUTPUT,\n 'MTYPE_UI_AGENT_SUBTASK_OUTPUT_R' => self::MTYPE_UI_AGENT_SUBTASK_OUTPUT_R,\n 'MTYPE_UI_AGENT_RUNNING_SUBTASK' => self::MTYPE_UI_AGENT_RUNNING_SUBTASK,\n 'MTYPE_UI_AGENT_RUNNING_SUBTASK_R' => self::MTYPE_UI_AGENT_RUNNING_SUBTASK_R,\n 'MTYPE_UI_AGENT_RUNNING_OPR' => self::MTYPE_UI_AGENT_RUNNING_OPR,\n 'MTYPE_UI_AGENT_RUNNING_OPR_R' => self::MTYPE_UI_AGENT_RUNNING_OPR_R,\n 'MTYPE_UI_EXEC_OPR' => self::MTYPE_UI_EXEC_OPR,\n 'MTYPE_UI_EXEC_OPR_R' => self::MTYPE_UI_EXEC_OPR_R,\n 'MTYPE_UI_EXEC_DUP_OPR' => self::MTYPE_UI_EXEC_DUP_OPR,\n 'MTYPE_UI_EXEC_DUP_OPR_R' => self::MTYPE_UI_EXEC_DUP_OPR_R,\n 'MTYPE_UI_AGENT_INFO' => self::MTYPE_UI_AGENT_INFO,\n 'MTYPE_UI_AGENT_INFO_R' => self::MTYPE_UI_AGENT_INFO_R,\n 'MTYPE_UI_INVALID_AGENT' => self::MTYPE_UI_INVALID_AGENT,\n 'MTYPE_UI_INVALID_AGENT_R' => self::MTYPE_UI_INVALID_AGENT_R,\n 'MTYPE_UI_TASK_CMD_INFO' => self::MTYPE_UI_TASK_CMD_INFO,\n 'MTYPE_UI_TASK_CMD_INFO_R' => self::MTYPE_UI_TASK_CMD_INFO_R,\n 'MTYPE_UI_OPR_CMD_INFO' => self::MTYPE_UI_OPR_CMD_INFO,\n 'MTYPE_UI_OPR_CMD_INFO_R' => self::MTYPE_UI_OPR_CMD_INFO_R,\n 'MTYPE_UI_SUBTASK_PROCESS' => self::MTYPE_UI_SUBTASK_PROCESS,\n 'MTYPE_UI_SUBTASK_PROCESS_R' => self::MTYPE_UI_SUBTASK_PROCESS_R,\n 'MTYPE_UI_EXEC_TASK' => self::MTYPE_UI_EXEC_TASK,\n 'MTYPE_UI_EXEC_TASK_R' => self::MTYPE_UI_EXEC_TASK_R,\n 'MTYPE_UI_FETCH_AGENT_HOSTNAME' => self::MTYPE_UI_FETCH_AGENT_HOSTNAME,\n 'MTYPE_UI_FETCH_AGENT_HOSTNAME_R' => self::MTYPE_UI_FETCH_AGENT_HOSTNAME_R,\n 'MTYPE_UI_AUTH_INVALID_AGENT' => self::MTYPE_UI_AUTH_INVALID_AGENT,\n 'MTYPE_UI_AUTH_INVALID_AGENT_R' => self::MTYPE_UI_AUTH_INVALID_AGENT_R,\n 'MTYPE_UI_SCRIPTS' => self::MTYPE_UI_SCRIPTS,\n 'MTYPE_UI_SCRIPTS_R' => self::MTYPE_UI_SCRIPTS_R,\n 'MTYPE_UI_SCRIPT_INFO' => self::MTYPE_UI_SCRIPT_INFO,\n 'MTYPE_UI_SCRIPT_INFO_R' => self::MTYPE_UI_SCRIPT_INFO_R,\n 'MTYPE_INVALID_MTYPE' => self::MTYPE_INVALID_MTYPE,\n 'MTYPE_CENTER_INTERNAL_CONN' => self::MTYPE_CENTER_INTERNAL_CONN,\n 'MTYPE_CENTER_INTERNAL_CONN_R' => self::MTYPE_CENTER_INTERNAL_CONN_R,\n );\n }", "public static function getAllowableEnumValues()\n {\n return [\n self::NONE,\n self::IGNORE_CASE,\n self::IGNORE_NON_SPACE,\n self::IGNORE_SYMBOLS,\n self::ORDINAL_IGNORE_CASE,\n self::STRING_SORT,\n self::ORDINAL,\n ];\n }", "private function filter_enum( $value ) {\n\t\tif ( empty( $this->enum ) ) {\n\t\t\treturn $value;\n\t\t}\n\n\t\tif ( in_array( $value, $this->enum, true ) ) {\n\t\t\treturn $value;\n\t\t}\n\n\t\tthrow new InvalidArgumentException( '😡 Enum value ' . $value . ' does not exist in the schema.' );\n\t}", "public function testGetOptionMethodType() {\n $type = new MethodEnum();\n $this->assertSame('OPTIONS', MethodEnum::OPTIONS);\n $this->assertSame('OPTIONS', $type(MethodEnum::OPTIONS));\n }", "public function getEnumValues()\n {\n return array(\n 'unpassed' => self::unpassed,\n 'passed' => self::passed,\n 'rewarded' => self::rewarded,\n );\n }", "private function checkEnum(FilterField $filterFieldDefinition, $filter): bool\n {\n if (count($filter->enum) < 1) {\n // no enum criteria for this filter, comparison allowed; everything is fine\n return true;\n }\n\n $filterValue = $filterFieldDefinition->getValue();\n if (is_array($filterValue)) {\n // supplied filter has multiple values; check if all of them are allowed\n foreach ($filterValue as $value) {\n if (!in_array($value, $filter->enum)) {\n // exit on first invalid value\n return false;\n }\n }\n\n // arriving here, the loop above encountered valid values only\n return true;\n }\n\n // supplied filter has only one value; check if it's an allowed value\n return in_array($filterValue, $filter->enum);\n }", "public static function getAllowableEnumValues()\n {\n return [\n self::COPY_CODE,\n self::ONE_TAP\n ];\n }", "public function testGetGetMethodType() {\n $type = new MethodEnum();\n $this->assertSame('GET', MethodEnum::GET);\n $this->assertSame('GET', $type(MethodEnum::GET));\n }", "public static function getAllowableEnumValues()\n {\n return [\n self::PERSONAL,\n self::ENTERPRISE,\n ];\n }", "public static function getAllowableEnumValues()\n {\n $allowable = [\n self::BUSINESS,\n self::INDIVIDUAL,\n ];\n $allowableAllCase = array_merge(array_map('strtolower', $allowable), $allowable);\n return $allowableAllCase;\n }", "public function runKo(): BackedEnum\n {\n $enumClass = StringBackedEnum::class;\n return self::assertEnumHas($enumClass, 'Z', $this->error);\n }", "public function runKo(): BackedEnum\n {\n $enumClass = IntBackedEnum::class;\n return self::assertEnumHas($enumClass, 999, $this->error);\n }", "public function getEnumValues()\n {\n return array(\n 'LABEL_OPTIONAL' => self::LABEL_OPTIONAL,\n 'LABEL_REQUIRED' => self::LABEL_REQUIRED,\n 'LABEL_REPEATED' => self::LABEL_REPEATED,\n );\n }", "public function runOk(): BackedEnum\n {\n $enumClass = StringBackedEnum::class;\n return self::assertEnumHas($enumClass, 'A', $this->error);\n }", "public function getEnumValues()\n {\n return array(\n 'NO_TYPE' => self::NO_TYPE,\n 'TEXT' => self::TEXT,\n 'IMAGE' => self::IMAGE,\n 'TEXT_ICON' => self::TEXT_ICON,\n 'VIDEO' => self::VIDEO,\n 'VIDEO_HTML' => self::VIDEO_HTML,\n );\n }", "public static function getAllowableEnumValues()\n {\n return [\n self::RENT,\n self::SALE,\n self::MIXING_FORM,\n ];\n }", "public function getEnumValues()\n {\n return array(\n 'success' => self::success,\n 'fail' => self::fail,\n 'stage_invalid' => self::stage_invalid,\n );\n }", "public function attributeEnumOptions($name)\r\n\t{\r\n preg_match('/\\((.*)\\)/',$this->tableSchema->columns[$name]->dbType,$matches);\r\n foreach(explode(',', $matches[1]) as $value)\r\n {\r\n $value=str_replace(\"'\",null,$value);\r\n $values[$value]=Yii::t('enumItem',$value);\r\n }\r\n\r\n return $values;\r\n\t}", "public function getEnumValues()\n {\n return array(\n 'no_verify' => self::no_verify,\n 'verify' => self::verify,\n 'closed' => self::closed,\n );\n }", "public function withCustomEnumFormatterCollection(EnumFormatterCollection $customEnumFormatterCollection): static;", "public function getEnumValues()\n {\n return array(\n 'searched' => self::searched,\n 'battle' => self::battle,\n 'prepare' => self::prepare,\n 'occupy' => self::occupy,\n 'protect' => self::protect,\n );\n }", "public static function getAllowableEnumValues()\n {\n return [\n self::EQUAL,\n self::NOT_EQUAL,\n self::GREATER_THAN_EQUALS,\n self::LESS_THAN_EQUALS,\n self::UNKNOWN,\n ];\n }", "public function getEnumValues()\n {\n return array(\n 'battle' => self::battle,\n 'prepare' => self::prepare,\n );\n }", "public function getEnumValues()\n {\n return array(\n 'victory' => self::victory,\n 'defeat' => self::defeat,\n 'canceled' => self::canceled,\n 'timeout' => self::timeout,\n );\n }", "public function getEnumValues()\n {\n return array(\n 'success' => self::success,\n 'failed' => self::failed,\n 'expired' => self::expired,\n 'fall' => self::fall,\n );\n }", "final public function is($enum): bool\n {\n return $enum instanceof static && $enum->value === $this->value;\n }", "public static function getAllowableEnumValues()\n {\n return [\n self::DAILY,\n self::WEEKLY,\n self::MULTI_WEEKLY,\n self::ONE_WEEK,\n self::MULTI_FORTNIGHT,\n self::MONTHLY,\n self::MULTI_MONTHLY,\n self::RANDOM,\n ];\n }", "public static function getAllowableEnumValues()\n {\n return [\n self::LINEAR,\n self::DATA_MATRIX,\n self::QR,\n self::MICRO_QR,\n self::PDF417,\n self::AZTEC,\n ];\n }", "final public function is($value)\n {\n return $value instanceof AbstractEnum ? $this->_enumMatch($value) : $this->getValue() === $value;\n }", "public function supportsValues();", "public function is_valid()\n\t{\n\t\t\n\t\t$field_value = trim($this->value);\n\t\t\n\t\tif($field_value == \"\")\n\t\t\treturn !$this->required;\n\t\t\n\t\tif(!in_array($field_value, $this->enum_array))\n\t\t\treturn false;\n\t\t\n\t\treturn true;\n \t\n\t}", "public function getEnumValues()\n {\n return array(\n 'no_apply' => self::no_apply,\n 'apply' => self::apply,\n );\n }", "function enum(mixed $value): mixed\n {\n return \\Midnite81\\Core\\Functions\\enum($value);\n }", "public function getEnumValues()\n {\n return array(\n 'success' => self::success,\n 'failed' => self::failed,\n 'lack_money' => self::lack_money,\n );\n }", "public function getEnumValues()\n {\n return array(\n 'success' => self::success,\n 'fail' => self::fail,\n );\n }", "function EnumValue($string)\n{\n [$name, $substr] = Name($string);\n if ($name === null ||\n $name === 'true' ||\n $name === 'false' ||\n $name === 'null'\n ) {\n return [null, $string];\n }\n\n return [['type' => 'Enum', 'value' => $name], $substr];\n}", "public function getEnumValues()\n {\n return array(\n 'UnknownCounteragentStatus' => self::UnknownCounteragentStatus,\n 'IsMyCounteragent' => self::IsMyCounteragent,\n 'InvitesMe' => self::InvitesMe,\n 'IsInvitedByMe' => self::IsInvitedByMe,\n 'RejectsMe' => self::RejectsMe,\n 'IsRejectedByMe' => self::IsRejectedByMe,\n 'NotInCounteragentList' => self::NotInCounteragentList,\n );\n }", "public function getEnumValues()\n {\n return $this->postRequest('GetEnumValues');\n }", "public function getEnumValues()\n {\n return array(\n 'mine' => self::mine,\n 'others' => self::others,\n 'monster' => self::monster,\n );\n }", "public function runOk(): BackedEnum\n {\n $enumClass = IntBackedEnum::class;\n return self::assertEnumHas($enumClass, 1, $this->error);\n }", "public static function getAllowableEnumValues()\n {\n return [\n self::DAMAGE_TYPE_NONE,\n self::DAMAGE_TYPE_KINETIC,\n self::DAMAGE_TYPE_ARC,\n self::DAMAGE_TYPE_THERMAL,\n self::DAMAGE_TYPE_VOID,\n self::DAMAGE_TYPE_RAID,\n ];\n }", "public static function getAllowableEnumValues()\n {\n return [\n self::_DEFAULT,\n self::GET,\n self::RESERVE,\n self::BOOK,\n self::BUY,\n self::APPLY,\n self::CONSULT,\n self::DOWNLOAD,\n self::PLAYING,\n ];\n }", "public static function getAllowableEnumValues()\n {\n return [\n self::PERSONAL,\n self::EDUCATION,\n self::HEALTH,\n self::FINANCE,\n self::PROFESSIONAL,\n self::LICENSES,\n self::CERTIFICATES,\n self::LEGAL,\n self::OTHERS\n ];\n }", "public function getEnumValues()\n {\n return array(\n 'MOBILE' => self::MOBILE,\n 'HOME' => self::HOME,\n 'WORK' => self::WORK,\n );\n }", "public static function getAllowableEnumValues()\n {\n return [\n self::_NEW,\nself::USED,\nself::COLLECTIBLE,\nself::REFURBISHED,\nself::CLUB, ];\n }", "public function getEnumValues()\n {\n return array(\n 'GENDER_0' => self::GENDER_0,\n 'GENDER_1' => self::GENDER_1,\n );\n }", "public static function getAllowableEnumValues() : array\n {\n return [\n self::CORE,\n self::SNL,\n self::EFN,\n ];\n }", "protected function _enumMatch(AbstractEnum $enum)\n {\n return $this instanceof static && $this->getValue() === $enum->getValue();\n }", "public static function getAllowableEnumValues()\n {\n return [\n self::PREPROCESSING,\n self::STAGING_QUEUED,\n self::STAGING,\n self::STAGING_COMPLETED,\n self::STAGING_FAILED,\n self::TRANSFORMING_QUEUED,\n self::TRANSFORMING,\n self::TRANSFORMING_FAILED,\n self::TRANSFORMING_COMPLETED,\n ];\n }" ]
[ "0.66813856", "0.6616936", "0.658729", "0.6516475", "0.6394785", "0.6283025", "0.62467676", "0.6185788", "0.61654186", "0.615975", "0.6111784", "0.6082374", "0.602988", "0.6029672", "0.5976864", "0.5963048", "0.5950302", "0.5904844", "0.58995205", "0.5874721", "0.5867007", "0.5847112", "0.5838767", "0.5832237", "0.5815099", "0.5810904", "0.5791245", "0.5781232", "0.57703507", "0.57694924", "0.5729217", "0.56653476", "0.56638134", "0.5589906", "0.55664504", "0.5530004", "0.5498064", "0.5482223", "0.54774016", "0.547406", "0.5463967", "0.54634315", "0.54324096", "0.5432052", "0.5419034", "0.54162574", "0.53913313", "0.53833807", "0.5379241", "0.5357177", "0.5347919", "0.534618", "0.5341447", "0.5326983", "0.53223026", "0.5311714", "0.5310307", "0.5303611", "0.5302289", "0.5290388", "0.52813023", "0.5270365", "0.52688104", "0.5268664", "0.5268257", "0.52613693", "0.52558786", "0.52424437", "0.52414644", "0.52287394", "0.5220219", "0.52201676", "0.52199847", "0.5210201", "0.52093637", "0.52085835", "0.5208371", "0.5206505", "0.5203776", "0.51928717", "0.51891685", "0.51869494", "0.51867354", "0.51851195", "0.5181465", "0.517938", "0.51766104", "0.5173677", "0.5166295", "0.516162", "0.515994", "0.5158745", "0.5147501", "0.5146021", "0.51434654", "0.51397365", "0.51344025", "0.5117195", "0.51138043", "0.5105862" ]
0.7388066
0
Nonenum type (varchar); length specified
public function testDataTypeWithLengthSpecified() { $tableName = 'ramp_tabletest1'; $table = new Application_Model_DbTable_Table($tableName); $metaInfo = $table->info(Zend_Db_Table_Abstract::METADATA); $whichField = 'name'; $field = new Application_Model_Field($whichField, array(), $metaInfo[$whichField]); $this->assertTrue($field->isInTable()); $this->assertTrue($field->isInDB()); $this->assertFalse($field->isEnum()); $this->assertSame("varchar", $field->getDataType()); $this->assertSame("100", $field->getLength()); $this->_assertWholelyLocal($field); $this->_assertMetaInfoValues($tableName, $whichField, $field); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function varchar() {}", "public static function varchar($length = 255)\n {\n return self::stringField('varchar', $length);\n }", "public function supportsVarcharWithoutSize();", "public static function data_type() {\n\n\t\treturn 'string';\n\t}", "abstract protected function get_typestring();", "protected function typeEnum(Fluent $column)\n {\n return 'varchar';\n }", "abstract function typeAsString();", "public function dbFieldType()\n {\n return 'string';\n }", "public function testDataTypeWithLengthNotSpecified()\n {\n $tableName = 'ramp_tabletest1';\n $table = new Application_Model_DbTable_Table($tableName);\n $metaInfo = $table->info(Zend_Db_Table_Abstract::METADATA);\n $whichField = 'id';\n\n $field = new Application_Model_Field($whichField, array(),\n $metaInfo[$whichField]);\n\n $this->assertTrue($field->isInTable());\n $this->assertTrue($field->isInDB());\n $this->assertFalse($field->isEnum());\n $this->assertSame(\"int\", $field->getDataType());\n $this->assertNull($field->getLength());\n $this->_assertWholelyLocal($field);\n $this->_assertMetaInfoValues($tableName, $whichField, $field);\n }", "abstract protected function getDataTypeString(): string;", "public function getKeyType()\n {\n return 'string';\n }", "public function getKeyType()\n {\n return 'string';\n }", "public function getKeyType()\n {\n return 'string';\n }", "function PMA_isTablefieldChar($field)\n{\n // If check to ensure types such as \"enum('one','two','char',..)\" or\n // \"enum('one','two','varchar',..)\" are not categorized as char.\n if (stripos($field['Type'], 'char') === 0\n || stripos($field['Type'], 'varchar') === 0\n ) {\n return stristr($field['Type'], 'char');\n } else {\n return false;\n }\n}", "public static function string(): Type\n {\n return new Type(null, 'string');\n }", "protected function typeString(Fluent $column)\n {\n return 'varchar';\n }", "function ifx_textasvarchar($mode)\n{\n}", "public function getType(): string\n {\n return self::TYPE_STRING;\n }", "public function getType(): string\n {\n return self::TYPE_STRING;\n }", "public static function string(?string $valueType = null);", "protected function type_string(Magic $column)\n {\n return 'VARCHAR(' . $column->length . ')';\n }", "abstract protected function getValidType(): string;", "public function validDataTypes();", "public function getKeyType(): string\n {\n return 'string';\n }", "public function typeAsString()\n {\n switch ($this->_type) {\n case self::TYPE_INTEGER:\n $str = 'INTEGER';\n break;\n\n case self::TYPE_FLOAT:\n $str = 'FLOAT';\n break;\n\n case self::TYPE_VARCHAR:\n $str = 'VARCHAR';\n break;\n\n case self::TYPE_BLOB:\n $str = 'BLOB';\n break;\n\n case self::TYPE_BOOLEAN:\n $str = 'BOOLEAN';\n break;\n\n case self::TYPE_DATETIME:\n $str = 'DATETIME';\n break;\n\n case self::TYPE_TEXT:\n default:\n $str = 'TEXT';\n }\n return $str;\n }", "private static function stringField($type, $size)\n {\n $obj = new StringField();\n $obj->type = $type;\n $obj->size = $size;\n $obj->encoding = 'utf8_general_ci';\n\n return $obj;\n }", "public function getXsiTypeName() {\n return \"StringLengthError\";\n }", "public function getDatatype() {}", "public static function string()\n {\n return self::builtinType('string');\n }", "public function getDataType(): string;", "public function getDataType(): string;", "public function getTYPE_TEXT()\n {\n return self::TYPE_TEXT;\n }", "public function getTypeStr() {\n return self::getTypes()[$this->type];\n }", "public function typeText() {\n $params = $this->types();\n return isset($params[$this->type]) ? $params[$this->type] : '';\n }", "public function small() {\n return 'string';\n }", "protected function type_string(Magic $column)\n {\n return 'VARCHAR';\n }", "public function getType() {\n return 'A0';\n }", "function mscaffolding_get_type($type)\n\t{\n\t\tswitch($type)\n\t\t{\n\t\t\tcase \"string\":\n\t\t\t\treturn \" VARCHAR (255) CHARACTER SET utf8 COLLATE utf8_slovenian_ci NOT NULL,\";\n\t\t\tcase \"text\":\n\t\t\t\treturn \" TEXT CHARACTER SET utf8 COLLATE utf8_slovenian_ci NOT NULL,\";\n\t\t\tcase \"boolean\":\n\t\t\t\treturn \" TINYINT NOT NULL,\";\n\t\t\tcase \"integer\":\n\t\t\t\treturn \" INT NOT NULL,\";\n\t\t\tdefault:\n\t\t\t\treturn \" INT NOT NULL,\";\n\t\t}\n\t}", "function data_type($type) {\r\n\t\t$return_value = '';\r\n\t\t$type = (string) $type;\r\n\r\n\t\tswitch (strtolower($type)) {\r\n\t\t\t// supported scalar types\r\n\t\t\tcase 'ENTITIES':\r\n\t\t\tcase 'ENTITY':\r\n\t\t\tcase 'ID':\r\n\t\t\tcase 'IDREF':\r\n\t\t\tcase 'IDREFS':\r\n\t\t\tcase 'NCName':\r\n\t\t\tcase 'NMTOKEN':\r\n\t\t\tcase 'NMTOKENS':\r\n\t\t\tcase 'Name':\r\n\t\t\tcase 'anySimpleType':\r\n\t\t\tcase 'anyType':\r\n\t\t\tcase 'base64':\r\n\t\t\tcase 'base64Binary':\r\n\t\t\tcase 'boolean':\r\n\t\t\tcase 'byte':\r\n\t\t\tcase 'date':\r\n\t\t\tcase 'dateTime':\r\n\t\t\tcase 'decimal':\r\n\t\t\tcase 'double':\r\n\t\t\tcase 'duration':\r\n\t\t\tcase 'float':\r\n\t\t\tcase 'gDay':\r\n\t\t\tcase 'gMonth':\r\n\t\t\tcase 'gMonthDay':\r\n\t\t\tcase 'gYear':\r\n\t\t\tcase 'gYearMonth':\r\n\t\t\tcase 'hexBinary':\r\n\t\t\tcase 'i4':\r\n\t\t\tcase 'int':\r\n\t\t\tcase 'integer':\r\n\t\t\tcase 'language':\r\n\t\t\tcase 'long':\r\n\t\t\tcase 'negativeInteger':\r\n\t\t\tcase 'nonNegativeInteger':\r\n\t\t\tcase 'nonPositiveInteger':\r\n\t\t\tcase 'normalizedString':\r\n\t\t\tcase 'positiveInteger':\r\n\t\t\tcase 'short':\r\n\t\t\tcase 'string':\r\n\t\t\tcase 'time':\r\n\t\t\tcase 'timeInstant':\r\n\t\t\tcase 'token':\r\n\t\t\tcase 'unsignedByte':\r\n\t\t\tcase 'unsignedInt':\r\n\t\t\tcase 'unsignedLong':\r\n\t\t\tcase 'unsignedShort':\r\n\t\t\tcase 'ur-type':\r\n\t\t\t\t$return_value = 'xsd:' . $type;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\r\n\t\t\t\tforeach ($this->types as $id => $type_definition) {\r\n\r\n\t\t\t\t\tif ($type_definition['name'] == $type) {\r\n\t\t\t\t\t\t$return_value = 'tns:' . $type;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t} // end: if\r\n\t\t\t\t} // end: foreach\r\n\t\t} // end: switch\r\n\r\n\t\treturn $return_value;\r\n\t}", "public function getType()\n {\n $result = \"\";\n if (preg_match('/int/',$this->type))\n $result = \"int\";\n\n if (preg_match('/year/',$this->type))\n $result = \"int\";\n\n if (preg_match('/integer/',$this->type))\n $result = \"int\";\n\n if (preg_match('/tynyint/',$this->type))\n $result = \"int\";\n\n if (preg_match('/smallint/',$this->type))\n $result = \"int\";\n\n if (preg_match('/mediumint/',$this->type))\n $result = \"int\";\n\n if (preg_match('/bigint/',$this->type))\n $result = \"int\";\n\n if (preg_match('/varchar/',$this->type))\n $result = \"string\";\n\n if (preg_match('/char/',$this->type))\n $result = \"string\";\n\n if (preg_match('/text/',$this->type))\n $result = \"string\";\n\n if (preg_match('/tyntext/',$this->type))\n $result = \"string\";\n\n if (preg_match('/mediumtext/',$this->type))\n $result = \"string\";\n\n if (preg_match('/longtext/',$this->type))\n $result = \"string\";\n\n if (preg_match('/char/',$this->type))\n $result = \"string\";\n\n if (preg_match('/enum/',$this->type))\n $result = \"enum\";\n\n if (preg_match('/set/',$this->type))\n $result = \"string\";\n\n if (preg_match('/date/',$this->type))\n $result = \"date\";\n\n if (preg_match('/time/',$this->type))\n $result = \"time\";\n\n if (preg_match('/datetime/',$this->type))\n $result = \"datetime\";\n\n if (preg_match('/decimal/',$this->type))\n $result = \"float\";\n\n if (preg_match('/float/',$this->type))\n $result = \"float\";\n\n if (preg_match('/double/',$this->type))\n $result = \"double\";\n\n if (preg_match('/real/',$this->type))\n $result = \"real\";\n\n if (preg_match('/fixed/',$this->type))\n $result = \"float\";\n\n if (preg_match('/numeric/',$this->type))\n $result = \"float\";\n\n if (empty($result)){\n // $result = $this->type;\n $result = \"string\";\n }\n\n // TODO EVALUATES BIT, TIMESTAMP, VARBINARY, BLOB MySQL data types\n return $result;\n }", "public function getTypeString(){\n\t\t$typeStr=\"\";\n\t\tswitch($this->type){\n\t\t\tcase \"fixed\": $typeStr=_(\"Montant fixe\");break;\n\t\t\tcase \"percentage\": $typeStr=_(\"Pourcentage\");break;\n\t\t\tcase \"percentage_no_transport\": $typeStr=_(\"Pourcentage sans transport\");break;\n\t\t\tcase \"transport\": $typeStr=_(\"Frais de port\");break;\n\t\t\tcase \"grid\": $typeStr=_(\"Variable\");break;\n\t\t}\n\t\treturn $typeStr;\n\t}", "public function valueType(): ?string;", "function getFieldLength($n){\n\t\t$len = $this->fields[$n]['Type'];\n\t\t$enumLen = '';\n\t\t$blobLen = 65535;\n\t\t$dateLen = 10;\n\t\t//split type\n\t\tereg('^([^ (]+)(\\((.+)\\))?([ ](.+))?$',$len,$split);\n\t\tif ($split[1] == 'enum' || $split[1] == 'set'){\n\t\t\t//split enum or set values into an array\n\t\t\t$elements = split(\"','\",substr($split[3],1,-1));\n\t\t\t//calculating the total length of all elements thru use of a string with a comma after each element\n\t\t\t$i = 1; //Helper variable for the No. of commas needed\n\t\t\tforeach ($elements as $element){\n\t\t\t\t$enumLen .= $element;\n\t\t\t\tif ($i < count($elements))\n\t\t\t\t\t$enumLen .= ',';\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\treturn strlen($enumLen);\n\t\t}\n\t\t// default text Length\n\t\telse if ($this->getFieldType($n) == 'blob')\n\t\t\treturn $blobLen;\n\t\t//default date Length\n\t\telse if ($this->getFieldType($n) == 'date')\n\t\t\treturn $dateLen;\n\t\telse\n\t\t\treturn $split[3];\n\t}", "function recognize_data_type($string)\n{\n\t$string = mb_strtolower(trim($string), 'UTF-8');\n\n\t// if the data type is empty string or any of bool representations set it as bool\n\tif(empty($string) || is_bool(filter_var($string, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE)))\n\t\treturn \"BIT\";\n\tif(is_int(filter_var($string, FILTER_VALIDATE_INT))) // else if int set as int\n\t\treturn \"INT\";\n\tif(is_float(filter_var($string, FILTER_VALIDATE_FLOAT))) // or float\n\t\treturn \"FLOAT\";\n\n\treturn \"NTEXT\"; // if neither of them set it to NTEXT (doesn't mather if it is attribute or not, it will be decided later)\n}", "function create_random_value($length, $type = 'mixed') {\n\tif(($type != 'mixed') && ($type != 'chars') && ($type != 'digits'))\n\t\treturn false;\n\n\t$rand_value = '';\n\twhile(strlen($rand_value) < $length) {\n\t\tif ($type == 'digits')\n\t\t\t$char = rand(0,9);\n\t\telse\n\t\t\t$char = chr(rand(0,255));\n\t\t\n\t\tif ($type == 'mixed') {\n\t\t\tif (preg_match('/^[a-z0-9]$/i', $char)) \n\t\t\t\t$rand_value .= $char;\n\t\t\t\t\n\t\t} elseif ($type == 'chars') {\n\t\t\tif (preg_match('/^[a-z]$/i', $char))\n\t\t\t\t$rand_value .= $char;\n\t\t\t\t\n\t\t} elseif ($type == 'digits') {\n\t\t\tif (preg_match('/^[0-9]$/', $char))\n\t\t\t\t$rand_value .= $char;\n\t\t}\n\t}\n\n\treturn $rand_value;\n}", "abstract protected function getDataTypePluralString(): string;", "public function getTypeAsStr() {\n\t\t$cardtypes = array(\n\t\t\t\"race\" => 1,\n\t\t\t\"aspect\" => 2,\n\t\t\t\"power\" => 3,\n\t\t\t\"minion\" => 10,\n\t\t\t\"bane\" => 20\n\t\t);\n\t\tforeach($cardtypes as $typestr => $typeval) {\n\t\t\tif($this->cardType == $typeval) {\n\t\t\t\treturn $typestr;\n\t\t\t}\n\t\t}\n\t}", "protected function typeString(Magic $column)\n {\n return 'VARCHAR';\n }", "protected function createString() {\n\t\tswitch ( $this->columnSchema[ self::COLUMN_DEFINITION_TYPE ] ) {\n\t\t\tcase self::COLUMN_TYPE_CHAR:\n\t\t\tcase self::COLUMN_TYPE_VARCHAR:\n\t\t\t\t$maxLen = $this->columnSchema[ self::COLUMN_DEFINITION_CHAR_MAX_LEN ];\n\t\t\t\tbreak;\n\t\t\tcase self::COLUMN_TYPE_TEXT:\n\t\t\tcase self::COLUMN_TYPE_MEDIUMTEXT:\n\t\t\tcase self::COLUMN_TYPE_LONGTEXT:\n\t\t\t\t$maxLen = NULL;\n\t\t\t\tbreak;\n\t\t}\n\n\t\t$string =\n\t\t\t\t$this->columnSchema[ self::COLUMN_DEFINITION_TYPE ]\n\t\t\t\t. ( !empty( $maxLen ) ? '(' . $maxLen . ')' : '' )\n\t\t\t\t. ( isset( $this->columnSchema[ self::COLUMN_DEFINITION_DEFAULT ] ) && $this->columnSchema[ self::COLUMN_DEFINITION_DEFAULT ] !== NULL\n\t\t\t\t\t\t? ' DEFAULT \"' . $this->columnSchema[ self::COLUMN_DEFINITION_DEFAULT ] . '\"'\n\t\t\t\t\t\t: '' )\n\t\t\t\t. ( isset( $this->columnSchema[ self::COLUMN_DEFINITION_IS_NULLABLE ] )\n\t\t\t\t\t\t? ( strtolower( $this->columnSchema[ self::COLUMN_DEFINITION_IS_NULLABLE ] ) == 'no' ? ' NOT NULL' : '' )\n\t\t\t\t\t\t: '' );\n\n\t\treturn $string;\n\t}", "public function toTokenTypeString()\n {\n $this->reset();\n $buf = \"\";\n $o = $this->LT(1);\n $type = $this->adaptor->getType($o);\n while ($type != Token::EOF) {\n $buf .= \" \" . $type;\n $this->consume();\n $o = $this->LT(1);\n $type = $this->adaptor->getType($o);\n }\n return ltrim($buf);\n }", "public static function resolveLengthFromDBType($type)\n {\n $pos = strpos($type, '(');\n if ($pos !== false) {\n return substr($type, $pos + 1, (strpos($type, ')') - $pos) - 1);\n }\n\n return false;\n }", "public function setLength($length);", "function formatEventType($type){\n\tif($type == C('STR_GPT')){\n\t\treturn C('STR_GPT_LONG');\n\t}\n\telseif($type == C('STR_PPTQ')){\n\t\treturn C('STR_PPTQ_LONG');\n\t}\n\telseif($type == C('STR_RPTQ')){\n\t\treturn C('STR_RPTQ_LONG');\n\t}\n\telseif($type == C('STR_OTHER')){\n\t\treturn C('STR_OTHER_LONG');\n\t}\n\telse return false;\n}", "abstract public function type(): string;", "public function testLengthIs191ByDefault()\n {\n $this->assertEquals(191, (new StringField('some_string'))->getLength());\n }", "public function setMaxLength($length);", "function isTextType($type)\n{\n return($type == \"string\" or $type == \"varchar\" or $type == \"tinytext\" or $type == \"password\" or\n $type == \"set\" or $type == \"enum\" or $type == \"char\" or $type == \"file\" or isTextAreaType($type));\n}", "function graphql_format_type_name($type_name)\n {\n }", "public function getDataType() {}", "public function field2char($value, $type = 3)\n\t{\n\t\treturn $value;\n\t}", "public function type() : string;", "public static function isVariableLength($type) {\n\t\treturn ($type == 'char' || $type == 'string' || $type == 'varbinary');\n\t}", "protected function get_formatted_type()\n\t{\n\t\t$rc = '';\n\n\t\t$type = $this->type;\n\t\t$size = $this->size;\n\n\t\tif (!$size && $type == self::TYPE_VARCHAR)\n\t\t{\n\t\t\t$size = 255;\n\t\t}\n\n\t\tswitch ($type)\n\t\t{\n\t\t\tcase self::TYPE_INTEGER:\n\t\t\tcase self::TYPE_TEXT:\n\t\t\tcase self::TYPE_BLOB:\n\n\t\t\t\t$t = [\n\n\t\t\t\t\tself::TYPE_BLOB => 'BLOB',\n\t\t\t\t\tself::TYPE_INTEGER => 'INT',\n\t\t\t\t\tself::TYPE_TEXT => 'TEXT',\n\n\t\t\t\t][ $type ];\n\n\t\t\t\tif (\\is_numeric($size))\n\t\t\t\t{\n\t\t\t\t\t$rc .= \"$t( $size )\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$rc .= \\strtoupper($size) . $t;\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\n\t\t\t\tif ($size)\n\t\t\t\t{\n\t\t\t\t\t$rc .= \\strtoupper($type) . \"( $size )\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$rc .= \\strtoupper($type);\n\t\t\t\t}\n\t\t}\n\n\t\treturn $rc;\n\t}", "public function getType() : string;", "private static function getStringType($val)\n {\n $type = 'string';\n $typeMore = null;\n if (\\is_numeric($val)) {\n $typeMore = 'numeric';\n } elseif ($val === self::UNDEFINED) {\n $type = 'undefined'; // not a native php type!\n } elseif ($val === self::RECURSION) {\n $type = 'recursion'; // not a native php type!\n } elseif ($val === self::NOT_INSPECTED) {\n $type = 'notInspected';\n }\n return array($type, $typeMore);\n }", "abstract protected function getSupportedEnumType() : string;", "public function type(): string;", "function value_string($value, $length = NULL){\r\n\tif(is_string($value) || is_numeric($value)){\r\n\t\t//$value = trim($value);\r\n\t\treturn ($length != NULL ? substr($value, 0, $length) : $value);\r\n\t}else{\r\n\t\treturn NULL;\r\n\t}\r\n}", "public function text_or_binary()\n {\n }", "public function getTypeAttribute();", "public function testTooLongString()\n {\n $maxKeyLength = 128;\n $arg = str_repeat(\"a\", $maxKeyLength + 1);\n $reflection = $this->createMock(\"\\Loom\\Settable\");\n $method = new \\ReflectionMethod($reflection, \"checkType\");\n\n $method->setAccessible(true);\n\n $result = $method->invoke($reflection, \"myvalue\", $arg);\n $this->assertFalse($result);\n }", "protected function getType(): string {\n return '';\n }", "protected function setShortDataType()\n {\n // TODO: Implement setShortDataType() method.\n return \"SSAM\";\n }", "public function data_type($type) {\n\t\tstatic $types = array(\n\t\t\t'BIT' => array('type' => 'Binary', 'max_length' => 1, 'nullable' => FALSE),\n\t\t\t'DATETIME' => array('type' => 'Integer'),\n\t\t\t'IMAGE' => array('type' => 'Blob', 'max_length' => 2147483647),\n\t\t\t'MONEY' => array('type' => 'Decimal', 'precision' => 18, 'scale' => 4),\n\t\t\t'NTEXT' => array('type' => 'Text', 'max_length' => '1073741823'),\n\t\t\t'SMALLDATETIME' => array('type' => 'Integer'),\n\t\t\t'SMALLMONEY' => array('type' => 'Decimal', 'precision' => 10, 'scale' => 4),\n\t\t\t'SQL_VARIANT' => array('type' => 'Blob', 'varying' => TRUE),\n\t\t\t//'TABLE' => array('type' => 'Table'),\n\t\t\t'TINYINT' => array('type' => 'Integer', 'range' => array(0, 255)),\n\t\t\t'UNIQUEIDENTIFIER' => array('type' => 'String', 'max_length' => 38),\n\t\t);\n\n\t\t$type = strtoupper($type);\n\n\t\tif (isset($types[$type])) {\n\t\t\treturn $types[$type];\n\t\t}\n\n\t\treturn parent::data_type($type);\n\t}", "function mDATATYPE(){\n try {\n $_type = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$DATATYPE;\n $_channel = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$DEFAULT_TOKEN_CHANNEL;\n // Tokenizer11.g:241:3: ( 'datatype' ) \n // Tokenizer11.g:242:3: 'datatype' \n {\n $this->matchString(\"datatype\"); \n\n\n }\n\n $this->state->type = $_type;\n $this->state->channel = $_channel;\n }\n catch(Exception $e){\n throw $e;\n }\n }", "function random_str(int $len = 8, string $type = 'alnum')\n {\n $ci = get_instance()->load->helper('string');\n\n return random_string($type, $len);\n }", "public abstract function getTypeAttribute();", "static function string($value, $length = null){\n\t\tif(is_string($value) || is_numeric($value)){\n\t\t\treturn (is_null($length) ? $value : substr($value, 0, $length));\n\t\t}else{\n\t\t\treturn null;\n\t\t}\n\t}", "public function varChar($name, $length = 255, $default ='')\r\n {\r\n $length = $length <= 255 ? $length : 255;\r\n\r\n $this->varChar[] = \"`$name` varchar($length) NOT NULL DEFAULT ''\";\r\n return $this;\r\n }", "function __r_setValueType(&$str) {\n\t//$str=gettype($str).$str;\n\t// if (gettype($str)=='string' && substr($str,0,1)=='0') $str='=\"'.$str.'\"';\n\t// if (gettype($str) == 'string' && substr($str,0,1) == '0') $str = '\\''.$str;\n}", "private function isVariableLengthType($type) {\n $types = [\n 'nvarchar' => TRUE,\n 'ntext' => TRUE,\n 'varchar' => TRUE,\n 'varbinary' => TRUE,\n 'image' => TRUE,\n ];\n return isset($types[$type]);\n }", "function PMA_isTableFieldBinary($field)\n{\n // The type column.\n // Fix for bug #3152931 'ENUM and SET cannot have \"Binary\" option'\n // If check to ensure types such as \"enum('one','two','binary',..)\" or\n // \"enum('one','two','varbinary',..)\" are not categorized as binary.\n if (stripos($field['Type'], 'binary') === 0\n || stripos($field['Type'], 'varbinary') === 0\n ) {\n return stristr($field['Type'], 'binary');\n } else {\n return false;\n }\n\n}", "function getRandomToken($length, $typeInt = false)\n{\n if ($typeInt) {\n $token = Str::substr(rand(1000000000, 9999999999), 0, $length);\n } else {\n $token = \"\";\n $codeAlphabet = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n $codeAlphabet .= \"abcdefghijklmnopqrstuvwxyz\";\n $codeAlphabet .= \"0123456789\";\n $max = strlen($codeAlphabet);\n\n for ($i = 0; $i < $length; $i++) {\n $token .= $codeAlphabet[random_int(0, $max - 1)];\n }\n }\n return $token;\n}", "public function getType() : string\n {\n $rtn = $this->data['type'];\n\n return $rtn;\n }", "public function getXsiTypeName() {\n return \"StringLengthError.Reason\";\n }", "public function guessType($val, $prevType){\n if($val === '' || $val === null){\n return null; // we can't guess anything from nothing.\n }\n // get the simple part of our type, e.g. VARCHAR(512) becomes VARCHAR\n $prevTypeSimple = (is_null($prevType)) ? null : explode('(',$prevType)[0];\n // If we have a numeric type that wasn't previously determined to need a VARCHAR\n if(is_numeric($val) && $prevTypeSimple !== 'VARCHAR'){\n // Check we don't have a leading zero string (e.g. barcodes)\n if((string)$val[0] === '0' && (string)$val[1] !== '.'){\n $type = 'VARCHAR(512) CHARACTER SET ' . $this->vars['characterSet'] . ' COLLATE ' . $this->vars['collation'] . ' DEFAULT NULL';\n } else if (strpos($val,\".\") !== false) { // Check for decimals\n $prevPrecision = (is_null($prevType)) ? array(12,6) : $this->getDecimalPrecisions($prevType);\n // print_r($prevPrecision);echo \"\\n\";\n $type = 'DECIMAL';\n $parts = explode('.',$val);\n $type .= '('.max($prevPrecision[0],strlen($parts[0])+max($prevPrecision[1],strlen($parts[1])+2)+2).','.max($prevPrecision[1],strlen($parts[1])+2).') DEFAULT NULL';\n } else {\n $prevPrecision = (is_null($prevType)) ? array(12,6) : $this->getDecimalPrecisions($prevType);\n $type = 'DECIMAL('.max($prevPrecision[0],strlen($val)+$prevPrecision[1]+4).','.$prevPrecision[1].') DEFAULT NULL';\n }\n } else if($prevTypeSimple === 'VARCHAR'){\n $precision = max(strlen($val)+256,$this->getVarcharPrecision($prevType));\n $type = 'VARCHAR('.$precision.') CHARACTER SET ' . $this->vars['characterSet'] . ' COLLATE ' . $this->vars['collation'] . ' DEFAULT NULL'; // Always default to a semi-long varchar - that's a pretty safe bet.\n } else {\n $type = 'VARCHAR('.(strlen($val)+256).') CHARACTER SET ' . $this->vars['characterSet'] . ' COLLATE ' . $this->vars['collation'] . ' DEFAULT NULL'; // Always default to a semi-long varchar - that's a pretty safe bet.\n }\n return $type;\n }", "public function getDataType($type)\n\t{\n\t\tstatic $types = array\n\t\t(\n\t\t\t// SQL-92\n\t\t\t'bit' => array('type' => 'string', 'exact' => true),\n\t\t\t'bit varying' => array('type' => 'string'),\n\t\t\t'char' => array('type' => 'string', 'exact' => true),\n\t\t\t'char varying' => array('type' => 'string'),\n\t\t\t'character' => array('type' => 'string', 'exact' => true),\n\t\t\t'character varying' => array('type' => 'string'),\n\t\t\t'date' => array('type' => 'string'),\n\t\t\t'dec' => array('type' => 'float', 'exact' => true),\n\t\t\t'decimal' => array('type' => 'float', 'exact' => true),\n\t\t\t'double precision' => array('type' => 'float'),\n\t\t\t'float' => array('type' => 'float'),\n\t\t\t'int' => array('type' => 'int', 'min' => '-2147483648', 'max' => '2147483647'),\n\t\t\t'integer' => array('type' => 'int', 'min' => '-2147483648', 'max' => '2147483647'),\n\t\t\t'interval' => array('type' => 'string'),\n\t\t\t'national char' => array('type' => 'string', 'exact' => true),\n\t\t\t'national char varying' => array('type' => 'string'),\n\t\t\t'national character' => array('type' => 'string', 'exact' => true),\n\t\t\t'national character varying' => array('type' => 'string'),\n\t\t\t'nchar' => array('type' => 'string', 'exact' => true),\n\t\t\t'nchar varying' => array('type' => 'string'),\n\t\t\t'numeric' => array('type' => 'float', 'exact' => true),\n\t\t\t'real' => array('type' => 'float'),\n\t\t\t'smallint' => array('type' => 'int', 'min' => '-32768', 'max' => '32767'),\n\t\t\t'time' => array('type' => 'string'),\n\t\t\t'time with time zone' => array('type' => 'string'),\n\t\t\t'timestamp' => array('type' => 'string'),\n\t\t\t'timestamp with time zone' => array('type' => 'string'),\n\t\t\t'varchar' => array('type' => 'string'),\n\t\t\t// SQL:1999\n\t\t\t'binary large object' => array('type' => 'string', 'binary' => true),\n\t\t\t'blob' => array('type' => 'string', 'binary' => true),\n\t\t\t'boolean' => array('type' => 'bool'),\n\t\t\t'char large object' => array('type' => 'string'),\n\t\t\t'character large object' => array('type' => 'string'),\n\t\t\t'clob' => array('type' => 'string'),\n\t\t\t'national character large object' => array('type' => 'string'),\n\t\t\t'nchar large object' => array('type' => 'string'),\n\t\t\t'nclob' => array('type' => 'string'),\n\t\t\t'time without time zone' => array('type' => 'string'),\n\t\t\t'timestamp without time zone' => array('type' => 'string'),\n\t\t\t// SQL:2003\n\t\t\t'bigint' => array('type' => 'int', 'min' => '-9223372036854775808', 'max' => '9223372036854775807'),\n\t\t\t// SQL:2008\n\t\t\t'binary' => array('type' => 'string', 'binary' => true, 'exact' => true),\n\t\t\t'binary varying' => array('type' => 'string', 'binary' => true),\n\t\t\t'varbinary' => array('type' => 'string', 'binary' => true)\n\t\t);\n\n\t\tif (isset($types[$type]))\n\t\t\treturn $types[$type];\n\n\t\treturn array();\n\t}", "public function getXsiTypeName() {\n return \"\";\n }", "public function getXsiTypeName() {\n return \"\";\n }", "public function getXsiTypeName() {\n return \"\";\n }", "public function getXsiTypeName() {\n return \"\";\n }", "public function setType(){\n switch($this->security){\n case 'H':\n case 'L':\n case '0.0':\n $typeId = 2; // k-space\n break;\n case 'A':\n $typeId = 3; // a-space\n break;\n default:\n $typeId = 1; // w-space\n }\n\n /**\n * @var $type MapTypeModel\n */\n $type = $this->rel('typeId');\n $type->getById($typeId);\n $this->typeId = $type;\n }", "function ezcreditcardType ()\n {\n $this->eZDataType( self::DATA_TYPE_STRING, ezi18n( 'kernel/classes/datatypes', 'Credit card', 'Datatype name' ), array( \n 'serialize_supported' => true , \n 'object_serialize_map' => array( \n 'data_text' => 'text' \n ) \n ) );\n }", "public static function asString(int $type) : string\n {\n if (!in_array($type, self::ALL)) {\n throw new InvalidArgumentException('Unknown type given.');\n }\n\n return self::TYPES[$type];\n }", "public function getTypeAttribute()\n\t{\n\t\t\n\t\treturn self::getTypes()[$this->type_id] ?? \"-\";\n\t\t\n\t}", "public static function typeToString(Int $type){\n return ucfirst(array_search($type, self::userTypes()));\n }", "public function __toString(): string\n {\n return $this->fullTypeString;\n }", "public function getValueElementType()\n {\n return 'text';\n }", "function enum_encode($desc) {\r\n /* by default, if available, expects enum_keyval to be filled with array('field1','field2') */\r\n if ($desc == '') {\r\n return '';\r\n }\r\n elseif ($this->enum_keyval) {\r\n $row = $this->get_row(array($this->enum_keyval[1]=>$desc), $this->enum_keyval[0],'row');\r\n if ($row === False)\r\n return False;\r\n else\r\n return $row[0];\r\n }\r\n }", "public function get_type(): string;" ]
[ "0.7276224", "0.68211335", "0.6504398", "0.6438382", "0.63323194", "0.6257705", "0.6161649", "0.61152023", "0.6079603", "0.6072259", "0.6034292", "0.6034292", "0.6034292", "0.600851", "0.6005649", "0.5952356", "0.593948", "0.59284836", "0.59284836", "0.59207183", "0.59085214", "0.58705693", "0.584588", "0.5841197", "0.5819207", "0.5785688", "0.57766706", "0.5729727", "0.5728094", "0.5651833", "0.5651833", "0.5614148", "0.5580628", "0.55732656", "0.55725414", "0.5543445", "0.55293506", "0.5512187", "0.55103916", "0.5509202", "0.5478826", "0.54498935", "0.54477286", "0.5429717", "0.5428117", "0.5423814", "0.54171646", "0.5413909", "0.54021776", "0.5398053", "0.5382951", "0.53819156", "0.5381814", "0.53701323", "0.5343383", "0.5339766", "0.53352064", "0.5327448", "0.5322503", "0.53071135", "0.53042626", "0.53042626", "0.5300408", "0.5297522", "0.5295878", "0.5294613", "0.5290725", "0.5290385", "0.5274374", "0.52711165", "0.5270767", "0.5268128", "0.5266791", "0.526275", "0.5252342", "0.52472067", "0.5229111", "0.5227545", "0.5226159", "0.5216237", "0.5209555", "0.52053124", "0.5173579", "0.51717377", "0.51702976", "0.51421", "0.51404965", "0.5140436", "0.5140436", "0.5140436", "0.5140436", "0.513228", "0.5127055", "0.5126998", "0.5117605", "0.51140547", "0.5109724", "0.5102808", "0.51016545", "0.51015604" ]
0.62565917
6
Nonenum type (int); length not specified
public function testDataTypeWithLengthNotSpecified() { $tableName = 'ramp_tabletest1'; $table = new Application_Model_DbTable_Table($tableName); $metaInfo = $table->info(Zend_Db_Table_Abstract::METADATA); $whichField = 'id'; $field = new Application_Model_Field($whichField, array(), $metaInfo[$whichField]); $this->assertTrue($field->isInTable()); $this->assertTrue($field->isInDB()); $this->assertFalse($field->isEnum()); $this->assertSame("int", $field->getDataType()); $this->assertNull($field->getLength()); $this->_assertWholelyLocal($field); $this->_assertMetaInfoValues($tableName, $whichField, $field); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "final public function getType(): int {}", "public function getType() : int {\n return 0100000;\n }", "public function type() : int;", "abstract public function getType(): int;", "abstract public function type(): int;", "public function getMaxTokenType(): int;", "public function type(): int\n {\n return (int) $this->type;\n }", "public function type(): int\n {\n return $this->type;\n }", "public function number($len){ }", "public function getNumberOfTypes(): int;", "public static function int(): Type\n {\n return new Type(null, 'int');\n }", "function is_type_int($typ)\n{\n\t$ints = @array(\"int\",\"serial\",\"bigserial\",\"oid\",\"float\",\"numeric\",\"real\",\"double\",\"smallint\");//\"date\",\"time\"\n\t$typ = @strtolower($typ);\n\tforeach ($ints as $v){\n\t\t$pos = @strpos($typ,$v);\n\t\tif ($pos!==false && !$pos) return 1;\n\t}\n}", "public function getIntegerSize(): int;", "public function getType(): int\n {\n return $this->type;\n }", "public function getLength(): int;", "public function getLength(): int;", "public final function getTypeCode(): int\n {\n return self::TYPE_CODE;\n }", "public static function integer()\n {\n return self::builtinType('int');\n }", "public function getDatatype() {}", "public function getTypeCode(): int\n {\n return $this->typeCode;\n }", "public function getTypeForID() {\n\t\treturn self::C_DATATYPE_INTEGER;\n\t}", "public function GetAccountType() : int\n\t{\n\t\treturn gmp_intval( $this->Get( 52, '15' ) ); // 15 = 0xF\n\t}", "public static function int() {}", "public function privateType()\n {\n return 2;\n }", "public function length() : int;", "public function getType() {\n return 'A0';\n }", "abstract public function getValueType();", "function getLength(): ?int;", "public function getPacketType(): int;", "public static function integer($length)\n {\n\t\treturn self::getRandomData($length, 4, 'I', 'self::integerCallback');\n\t}", "#[@test]\n public function integerType() {\n $this->testType(new Integer(0), 0, 0.0);\n }", "public function getType()\n {\n $value = $this->get(self::TYPE);\n return $value === null ? (integer)$value : $value;\n }", "public function getTributeType();", "abstract protected function getSupportedEnumType() : string;", "function mINTEGER(){\n try {\n $_type = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$INTEGER;\n $_channel = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$DEFAULT_TOKEN_CHANNEL;\n // Tokenizer11.g:347:3: ( ( '0' .. '9' )+ ) \n // Tokenizer11.g:348:3: ( '0' .. '9' )+ \n {\n // Tokenizer11.g:348:3: ( '0' .. '9' )+ \n $cnt6=0;\n //loop6:\n do {\n $alt6=2;\n $LA6_0 = $this->input->LA(1);\n\n if ( (($LA6_0>=$this->getToken('48') && $LA6_0<=$this->getToken('57'))) ) {\n $alt6=1;\n }\n\n\n switch ($alt6) {\n \tcase 1 :\n \t // Tokenizer11.g:348:4: '0' .. '9' \n \t {\n \t $this->matchRange(48,57); \n\n \t }\n \t break;\n\n \tdefault :\n \t if ( $cnt6 >= 1 ) break 2;//loop6;\n $eee =\n new EarlyExitException(6, $this->input);\n throw $eee;\n }\n $cnt6++;\n } while (true);\n\n\n }\n\n $this->state->type = $_type;\n $this->state->channel = $_channel;\n }\n catch(Exception $e){\n throw $e;\n }\n }", "public function getValueType();", "public function isIntegerInRangeRejectsOtherDataTypesDataProvider() {}", "public function getTokenType();", "abstract public function getLength();", "function length(): int;", "function getFieldLength($n){\n\t\t$len = $this->fields[$n]['Type'];\n\t\t$enumLen = '';\n\t\t$blobLen = 65535;\n\t\t$dateLen = 10;\n\t\t//split type\n\t\tereg('^([^ (]+)(\\((.+)\\))?([ ](.+))?$',$len,$split);\n\t\tif ($split[1] == 'enum' || $split[1] == 'set'){\n\t\t\t//split enum or set values into an array\n\t\t\t$elements = split(\"','\",substr($split[3],1,-1));\n\t\t\t//calculating the total length of all elements thru use of a string with a comma after each element\n\t\t\t$i = 1; //Helper variable for the No. of commas needed\n\t\t\tforeach ($elements as $element){\n\t\t\t\t$enumLen .= $element;\n\t\t\t\tif ($i < count($elements))\n\t\t\t\t\t$enumLen .= ',';\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\treturn strlen($enumLen);\n\t\t}\n\t\t// default text Length\n\t\telse if ($this->getFieldType($n) == 'blob')\n\t\t\treturn $blobLen;\n\t\t//default date Length\n\t\telse if ($this->getFieldType($n) == 'date')\n\t\t\treturn $dateLen;\n\t\telse\n\t\t\treturn $split[3];\n\t}", "public static function integer(?string $valueType = null);", "public function validDataTypes();", "function mINTEGER_NEGATIVE(){\n try {\n $_type = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$INTEGER_NEGATIVE;\n $_channel = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$DEFAULT_TOKEN_CHANNEL;\n $n=null;\n\n // Tokenizer11.g:386:3: ( MINUS n= INTEGER ) \n // Tokenizer11.g:387:3: MINUS n= INTEGER \n {\n $this->mMINUS(); \n $nStart1341 = $this->getCharIndex();\n $this->mINTEGER(); \n $n = new CommonToken($this->input, TokenConst::$INVALID_TOKEN_TYPE, TokenConst::$DEFAULT_CHANNEL, $nStart1341, $this->getCharIndex()-1);\n\n }\n\n $this->state->type = $_type;\n $this->state->channel = $_channel;\n }\n catch(Exception $e){\n throw $e;\n }\n }", "public function jsonSerialize(){\n\t\treturn (int)$this->enum;\n\t}", "public function kind(): int\n {\n return \\wasm_valtype_kind($this->inner);\n }", "public function testDataTypeWithLengthSpecified()\n {\n $tableName = 'ramp_tabletest1';\n $table = new Application_Model_DbTable_Table($tableName);\n $metaInfo = $table->info(Zend_Db_Table_Abstract::METADATA);\n $whichField = 'name';\n\n $field = new Application_Model_Field($whichField, array(),\n $metaInfo[$whichField]);\n\n $this->assertTrue($field->isInTable());\n $this->assertTrue($field->isInDB());\n $this->assertFalse($field->isEnum());\n $this->assertSame(\"varchar\", $field->getDataType());\n $this->assertSame(\"100\", $field->getLength());\n $this->_assertWholelyLocal($field);\n $this->_assertMetaInfoValues($tableName, $whichField, $field);\n }", "abstract protected function getValidType(): string;", "public function getMaxEnumCodeSize()\n {\n return $this->getMaxIdentifierSize() - strlen(self::ENUM_TABLE_PREFIX);\n }", "public static function parseTypeN($type)\n {\n preg_match('/^\\D+(\\d+)$/', $type, $matches);\n return (int)$matches[1];\n }", "function check_enum_value_type($received_value, $table_name, $table_field, \\PDO $db) {\n $options = \\k1lib\\sql\\get_db_table_enum_values($db, $table_name, $table_field);\n $options_fliped = array_flip($options);\n\n if (!isset($options_fliped[$received_value])) {\n $error_type = print_r($options_fliped, TRUE) . \" value: '$received_value'\";\n// d($received_value, TRUE);\n } else {\n $error_type = FALSE;\n }\n return $error_type;\n}", "public function getType()\n {\n $result = \"\";\n if (preg_match('/int/',$this->type))\n $result = \"int\";\n\n if (preg_match('/year/',$this->type))\n $result = \"int\";\n\n if (preg_match('/integer/',$this->type))\n $result = \"int\";\n\n if (preg_match('/tynyint/',$this->type))\n $result = \"int\";\n\n if (preg_match('/smallint/',$this->type))\n $result = \"int\";\n\n if (preg_match('/mediumint/',$this->type))\n $result = \"int\";\n\n if (preg_match('/bigint/',$this->type))\n $result = \"int\";\n\n if (preg_match('/varchar/',$this->type))\n $result = \"string\";\n\n if (preg_match('/char/',$this->type))\n $result = \"string\";\n\n if (preg_match('/text/',$this->type))\n $result = \"string\";\n\n if (preg_match('/tyntext/',$this->type))\n $result = \"string\";\n\n if (preg_match('/mediumtext/',$this->type))\n $result = \"string\";\n\n if (preg_match('/longtext/',$this->type))\n $result = \"string\";\n\n if (preg_match('/char/',$this->type))\n $result = \"string\";\n\n if (preg_match('/enum/',$this->type))\n $result = \"enum\";\n\n if (preg_match('/set/',$this->type))\n $result = \"string\";\n\n if (preg_match('/date/',$this->type))\n $result = \"date\";\n\n if (preg_match('/time/',$this->type))\n $result = \"time\";\n\n if (preg_match('/datetime/',$this->type))\n $result = \"datetime\";\n\n if (preg_match('/decimal/',$this->type))\n $result = \"float\";\n\n if (preg_match('/float/',$this->type))\n $result = \"float\";\n\n if (preg_match('/double/',$this->type))\n $result = \"double\";\n\n if (preg_match('/real/',$this->type))\n $result = \"real\";\n\n if (preg_match('/fixed/',$this->type))\n $result = \"float\";\n\n if (preg_match('/numeric/',$this->type))\n $result = \"float\";\n\n if (empty($result)){\n // $result = $this->type;\n $result = \"string\";\n }\n\n // TODO EVALUATES BIT, TIMESTAMP, VARBINARY, BLOB MySQL data types\n return $result;\n }", "public function invalidIntegers() {}", "public function getDataType() {}", "public function getLetype():int\n {\n return $this->letype;\n }", "abstract public function type();", "abstract public function type();", "public function getParameterType(): int\n\t{\n\t\treturn Parameter::ARGH_TYPE_INT;\n\t}", "static function getMaxLength(int $type): int\n {\n if ($type === self::SHOUTBOX_ENTRY) {\n return 255;\n }\n\n return 16384;\n }", "function variant_int($variant) {}", "public function getTypeAndLenght()\n {\n return $this->type;\n }", "public function getTypeCode () {\n if (2 == $this->status) {\n return \"meanless\";\n }\n\n return $this->objtype;\n }", "abstract public function getType();", "abstract public function getType();", "abstract public function getType();", "abstract public function getType();", "abstract public function getType();", "abstract public function getType();", "public function getType()\n {\n return 'Nonmember';\n }", "public function getIntegerSubType() {\n // Integer check\n if ($this->getDataType() != IESDataColumnType::INTEGER) {\n return null;\n }\n\n if ($this->isSignedInteger()) {\n if ($this->intLowestValue >= -128 && $this->intHighestValue <= 127) {\n return IESDataColumnIntegerTypes::SIGNED_BYTE;\n } else if ($this->intLowestValue >= -32768 && $this->intHighestValue <= 32767) {\n return IESDataColumnIntegerTypes::SIGNED_SHORT;\n } else if ($this->intLowestValue >= -2147483648 && $this->intHighestValue <= 2147483647) {\n return IESDataColumnIntegerTypes::SIGNED_INTEGER;\n } else if ($this->intLowestValue >= -9223372036854775808 && $this->intLowestValue <= 9223372036854775807) {\n return IESDataColumnIntegerTypes::SIGNED_LONG;\n } else {\n return null; // Not an int/too big number\n }\n } else {\n if ($this->intHighestValue <= 255) {\n return IESDataColumnIntegerTypes::UNSIGNED_BYTE;\n } else if ($this->intHighestValue <= 65535) {\n return IESDataColumnIntegerTypes::UNSIGNED_SHORT;\n } else if ($this->intHighestValue <= 4294967295) {\n return IESDataColumnIntegerTypes::UNSIGNED_INTEGER;\n } else if ($this->intHighestValue <= 18446744073709551615) {\n return IESDataColumnIntegerTypes::UNSIGNED_LONG;\n } else {\n return null; // Not an int/too big number\n }\n }\n }", "abstract protected function getType();", "public function functionCanBeInterpretedAsIntegerInvalidDataProvider() {}", "function getType() ;", "private function get_type() {\n\n\t}", "function getType() ;", "function getType() ;", "public function getIdlength() {\n\t\treturn 20;\n\t}", "abstract public function getMailType(): int;", "public function set_typeNum()\n {\n // init the map\n $this->initVarTypeNum();\n }", "public function size() : int;", "private function GetType($value = NULL) : INT\r\n {\r\n switch(TRUE)\r\n {\r\n case is_int($value) :\r\n return(\\PDO::PARAM_INT);\r\n case is_bool($value):\r\n return(\\PDO::PARAM_BOOL);\r\n case is_null($value):\r\n return(\\PDO::PARAM_NULL);\r\n default:\r\n return(\\PDO::PARAM_STR);\r\n }\r\n }", "public function getMaxMemType42() {}", "function getRandomToken($length, $typeInt = false)\n{\n if ($typeInt) {\n $token = Str::substr(rand(1000000000, 9999999999), 0, $length);\n } else {\n $token = \"\";\n $codeAlphabet = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n $codeAlphabet .= \"abcdefghijklmnopqrstuvwxyz\";\n $codeAlphabet .= \"0123456789\";\n $max = strlen($codeAlphabet);\n\n for ($i = 0; $i < $length; $i++) {\n $token .= $codeAlphabet[random_int(0, $max - 1)];\n }\n }\n return $token;\n}", "public function validIntegers() {}", "function post_int($integer_name) {\n\t$integer = $_POST[$integer_name];\n\tsettype($integer, \"integer\");\n\treturn $integer;\n}", "public function getTokenType(): ?int\n {\n return $this->tokenType;\n }", "function xmlrpc_get_type($value)\n{\n}", "function getType()\t { return $this->type;\t }", "public function type();", "public function type();", "public function type();", "public function type();", "#[@test]\n public function longType() {\n $this->testType(new Long(0), 0, 0.0);\n }", "public function getLength() {}", "public function getLength() {}", "public function getLength() {}", "public function getLength() {}", "public function getLength();", "public function getCode() : int;", "function getType() { return $this->readType(); }" ]
[ "0.70498985", "0.6784735", "0.6760611", "0.6665104", "0.65001804", "0.6384957", "0.622568", "0.6084077", "0.59358937", "0.5894921", "0.58925074", "0.5866581", "0.5864164", "0.58635396", "0.5820456", "0.5820456", "0.58115286", "0.5811234", "0.58067596", "0.5779794", "0.5772501", "0.576976", "0.5769718", "0.5758409", "0.57530254", "0.57062083", "0.5699662", "0.5682694", "0.56555015", "0.564783", "0.5642802", "0.56351435", "0.56107944", "0.557942", "0.5574266", "0.55741316", "0.555026", "0.5523142", "0.54932916", "0.54737675", "0.5455511", "0.5448484", "0.54425657", "0.5418439", "0.5408292", "0.5395205", "0.53951055", "0.536942", "0.5349278", "0.53419733", "0.5340104", "0.5337323", "0.53310627", "0.53282917", "0.5304181", "0.5299851", "0.5299851", "0.529237", "0.52838284", "0.5272351", "0.5269871", "0.52505827", "0.5243874", "0.5243874", "0.5243874", "0.5243874", "0.5243874", "0.5243874", "0.524164", "0.5233233", "0.52289164", "0.5217803", "0.5216648", "0.5216222", "0.52160466", "0.52154356", "0.5204186", "0.5201921", "0.520175", "0.5196235", "0.51945794", "0.51891756", "0.518729", "0.51854527", "0.5182739", "0.51786375", "0.5175019", "0.5170416", "0.5166624", "0.5166624", "0.5166624", "0.5166624", "0.5166553", "0.5163326", "0.5163326", "0.5163326", "0.5163002", "0.51572603", "0.51558757", "0.5155261" ]
0.5797565
19
Display a listing of the resource.
public function index() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function create() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $id_test = $request->id_test; $id_question = DB::table('questions')-> insertGetId(array( 'id_test' => $request->id_test, 'pertanyaan' => $request->question, )); $count= 0; foreach ($request->opsi as $key => $value) { if ($count == $request->isTrue) { $opsi = new OpsiJawaban; $opsi->id_question = $id_question; $opsi->isi_opsi = $value; $opsi->is_true = 1; $opsi->save(); }else{ $opsi = new OpsiJawaban; $opsi->id_question = $id_question; $opsi->isi_opsi = $value; $opsi->is_true = 0; $opsi->save(); } $count +=1; } $test = Test::find($request->id_test); $test->jumlah_soal += 1; $test->save(); $question = Question::where('id_test',$request->id_test)->get(); foreach ($question as $key => $value) { $value['opsi'] = OpsiJawaban::where('id_question',$value->id)->get(); } $section = SectionTraining::find($test->id_section_training); if ($section->id_type == 1) { return view('add-question') ->with('id_test', $id_test) ->with('questions',$question) ->with('time',$request->time) ->with('id_training',$request->id_training); }else{ return view('add-question-post-test') ->with('id_test', $id_test) ->with('questions',$question) ->with('time',$request->time) ->with('id_training',$request->id_training); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72855324", "0.71447515", "0.7132799", "0.6641042", "0.66208744", "0.6566955", "0.65249777", "0.6509032", "0.6447701", "0.63756555", "0.6373163", "0.63650846", "0.63650846", "0.63650846", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676" ]
0.0
-1
Display the specified resource.
public function show(Question $question) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show(Resena $resena)\n {\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function show()\n\t{\n\t\t\n\t}", "public function get_resource();", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "public function display() {\n echo $this->render();\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n {\n //\n $this->_show($id);\n }", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public abstract function display();", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "abstract public function resource($resource);", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8232636", "0.81890994", "0.68296117", "0.64987075", "0.649589", "0.64692974", "0.64633286", "0.63640857", "0.6307513", "0.6281809", "0.621944", "0.61926234", "0.61803305", "0.6173143", "0.61398774", "0.6119022", "0.61085826", "0.6106046", "0.60947937", "0.6078597", "0.6047151", "0.60409963", "0.6021287", "0.5989136", "0.5964405", "0.5962407", "0.59518087", "0.59309924", "0.5921466", "0.5908002", "0.5908002", "0.5908002", "0.59051657", "0.5894554", "0.5871459", "0.5870088", "0.586883", "0.5851384", "0.58168566", "0.58166975", "0.5815869", "0.58056176", "0.5799148", "0.5795126", "0.5791158", "0.57857597", "0.5783371", "0.5761351", "0.57592535", "0.57587147", "0.5746491", "0.57460666", "0.574066", "0.5739448", "0.5739448", "0.57295275", "0.57293373", "0.5729069", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57214445", "0.57149816", "0.5712036", "0.5710076", "0.57073003", "0.5707059", "0.5705454", "0.5705454", "0.5700382", "0.56997055", "0.5693362", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868" ]
0.0
-1
Show the form for editing the specified resource.
public function edit($id_question) { $question = Question::find($id_question); $question['opsi'] = OpsiJawaban::where('id_question',$id_question)->get(); return view('edit-question')->with('question',$question); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.68336326", "0.6811471", "0.68060875", "0.68047357", "0.68018645", "0.6795623", "0.6791791", "0.6791791", "0.6787701", "0.67837197", "0.67791027", "0.677645", "0.6768301", "0.6760122", "0.67458534", "0.67458534", "0.67443407", "0.67425704", "0.6739898", "0.6735328", "0.6725465", "0.6712817", "0.6693891", "0.6692419", "0.6688581", "0.66879624", "0.6687282", "0.6684741", "0.6682786", "0.6668777", "0.6668427", "0.6665287", "0.6665287", "0.66610634", "0.6660843", "0.66589665", "0.66567147", "0.66545695", "0.66527975", "0.6642529", "0.6633056", "0.6630304", "0.6627662", "0.6627662", "0.66192114", "0.6619003", "0.66153085", "0.6614968", "0.6609744", "0.66086483", "0.66060555", "0.6596137", "0.65950733", "0.6594648", "0.65902114", "0.6589043", "0.6587102", "0.65799844", "0.65799403", "0.65799177", "0.657708", "0.65760696", "0.65739626", "0.656931", "0.6567826", "0.65663105", "0.65660435", "0.65615267", "0.6561447", "0.6561447", "0.65576506", "0.655686", "0.6556527", "0.6555543", "0.6555445", "0.65552044", "0.65543956", "0.65543705", "0.6548264", "0.65475875", "0.65447706" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request) { $question = Question::find($request->id_question); $question->pertanyaan = $request->id_test; $question->pertanyaan = $request->question; $question->save(); //delete saved option $opsi = OpsiJawaban::where('id_question',$request->id_question)->get(); $jawaban_trainee = JawabanTrainee::where('id_question',$request->id_question)->get(); foreach ($jawaban_trainee as $key => $value) { DB::table('jawaban_trainees')->delete($value->id); } foreach ($opsi as $key => $value) { DB::table('opsi_jawabans')->delete($value->id); } //save new option $count= 0; foreach ($request->opsi as $key => $value) { if ($count == $request->isTrue) { $opsi = new OpsiJawaban; $opsi->id_question = $request->id_question; $opsi->isi_opsi = $value; $opsi->is_true = 1; $opsi->save(); }else{ $opsi = new OpsiJawaban; $opsi->id_question = $request->id_question; $opsi->isi_opsi = $value; $opsi->is_true = 0; $opsi->save(); } $count +=1; } $test = Test::find($question->id_test); $section = SectionTraining::find($test->id_section_training); $training = Training::find($section->id_training); return redirect()->action( 'TrainingController@view', ['id' => $training->id] ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update($request, $id);", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Remove the specified resource from storage.
public function destroy( $id_question ) { $opsi_jawabans = OpsiJawaban::where('id_question', $id_question)->get(); $jawaban_trainee = JawabanTrainee::where('id_question',$id_question)->get(); foreach ($jawaban_trainee as $key => $value) { DB::table('jawaban_trainees')->delete($value->id); } foreach ($opsi_jawabans as $key => $value) { DB::table('opsi_jawabans')->delete($value->id); } $question = Question::find($id_question); $test = Test::find($question->id_test); $test->jumlah_soal = $test->jumlah_soal - 1; $test->save(); $section = SectionTraining::find($test->id_section_training); $training = Training::find($section->id_training); DB:: table('questions')->delete($id_question); return redirect()->action( 'TrainingController@view', ['id' => $training->id] ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "public function remove($id);", "public function remove($id);", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n {\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 }", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6671365", "0.6660839", "0.66361386", "0.6632988", "0.6624729", "0.6542195", "0.6541645", "0.6466739", "0.6288393", "0.61767083", "0.6129533", "0.608954", "0.6054169", "0.60443425", "0.60073143", "0.59338665", "0.59317696", "0.592145", "0.5920155", "0.59065086", "0.5897853", "0.58968836", "0.58958197", "0.58958197", "0.58958197", "0.58958197", "0.58800334", "0.5869308", "0.5861188", "0.5811069", "0.5774596", "0.5763277", "0.5755447", "0.5747713", "0.5742094", "0.573578", "0.5727048", "0.57164854", "0.5712422", "0.57092893", "0.57080173", "0.5707143", "0.5704078", "0.5696418", "0.5684556", "0.5684556", "0.56790006", "0.5678463", "0.5658492", "0.564975", "0.5648406", "0.56480885", "0.5641393", "0.5638992", "0.56302536", "0.56228197", "0.5616424", "0.5607389", "0.56033397", "0.5602035", "0.55991143", "0.55988586", "0.5590501", "0.5581284", "0.55681103", "0.5566215", "0.55644745", "0.5563726", "0.55593926", "0.55583876", "0.5548547", "0.5542015", "0.5541403", "0.5541403", "0.55397224", "0.55390894", "0.55376494", "0.5531044", "0.5529739", "0.55279493", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527671", "0.5527155", "0.5526666", "0.55245256", "0.552101", "0.55183184" ]
0.0
-1
Display a listing of the resource.
public function index() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n {\n $this->booklist();\n }", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7447426", "0.73628515", "0.73007894", "0.7249563", "0.7164474", "0.7148467", "0.71320325", "0.7104678", "0.7103152", "0.7100512", "0.7048493", "0.6994995", "0.69899315", "0.6935843", "0.6899995", "0.68999326", "0.6892163", "0.6887924", "0.6867505", "0.6851258", "0.6831236", "0.68033123", "0.6797587", "0.6795274", "0.67868614", "0.67610204", "0.67426085", "0.67303514", "0.6727031", "0.67257243", "0.67257243", "0.67257243", "0.67195046", "0.67067856", "0.67063624", "0.67045796", "0.66655326", "0.666383", "0.66611767", "0.66604036", "0.66582054", "0.6654805", "0.6649084", "0.6620993", "0.66197145", "0.6616024", "0.66077465", "0.6602853", "0.6601494", "0.6593894", "0.65878326", "0.6586189", "0.6584675", "0.65813804", "0.65766823", "0.65754175", "0.657203", "0.657202", "0.65713936", "0.65642136", "0.6563951", "0.6553249", "0.6552584", "0.6546312", "0.6536654", "0.6534106", "0.6532539", "0.6527516", "0.6526785", "0.6526042", "0.65191233", "0.6518727", "0.6517732", "0.6517689", "0.65155584", "0.6507816", "0.65048593", "0.6503226", "0.6495243", "0.6492096", "0.6486592", "0.64862204", "0.6485348", "0.6483991", "0.64789015", "0.6478804", "0.64708763", "0.6470304", "0.64699143", "0.6467142", "0.646402", "0.6463102", "0.6460929", "0.6458856", "0.6454334", "0.6453653", "0.645357", "0.6450551", "0.64498454", "0.64480853", "0.64453584" ]
0.0
-1
Show the form for creating a new resource.
public function create() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $user = \Auth::user(); $product = Product::find($request->product_id); $review = new Review(); $review->comment = $request->comment; $review->star = $request->star; $review->user()->associate($user); $review->product()->associate($product); $review->save(); return redirect()->back(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Display the specified resource.
public function show(Review $review) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Show the form for editing the specified resource.
public function edit(Review $review) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit(form $form)\n {\n //\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.7854417", "0.7692986", "0.72741747", "0.72416574", "0.7173436", "0.706246", "0.70551765", "0.698488", "0.6948513", "0.694731", "0.69425464", "0.6929177", "0.6902573", "0.6899662", "0.6899662", "0.6878983", "0.6865711", "0.6861037", "0.6858774", "0.6847512", "0.6836162", "0.68129057", "0.68083996", "0.68082106", "0.6803853", "0.67966306", "0.6794222", "0.6794222", "0.6789979", "0.67861426", "0.678112", "0.677748", "0.67702436", "0.67625374", "0.6748088", "0.67475355", "0.67475355", "0.67446774", "0.6742005", "0.67374676", "0.6727497", "0.6714345", "0.6696231", "0.6693851", "0.6689907", "0.6689746", "0.6687102", "0.66870165", "0.6684574", "0.6670877", "0.66705006", "0.6667089", "0.6667089", "0.6663205", "0.66626745", "0.66603845", "0.66593564", "0.66560745", "0.66545844", "0.66447026", "0.6633528", "0.66319114", "0.66298395", "0.66298395", "0.6622365", "0.6621021", "0.66170275", "0.661664", "0.6612467", "0.66107714", "0.6608453", "0.65979743", "0.659645", "0.6596389", "0.6592672", "0.6591205", "0.6588125", "0.6582166", "0.6581656", "0.65811247", "0.65785724", "0.65782833", "0.6576397", "0.6570971", "0.6569483", "0.6568432", "0.656811", "0.6563493", "0.6563493", "0.65622604", "0.65602434", "0.65585065", "0.6557997", "0.65574414", "0.6556701", "0.65565753", "0.6556226", "0.6556107", "0.6549118", "0.65485924", "0.65463555" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, Review $review) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update($request, $id);", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Remove the specified resource from storage.
public function destroy(Review $review) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
Start Setters Set/check the Grouping page id
private function setId($id = NULL) { $this->id = isset($id) && is_numeric($id) && $id > 0 ? (int) $id : NULL; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setPageID(){/*ACTUALLY NOT DEFINED*/}", "function SetUpStartGroup() {\n\t\tglobal $deals_details;\n\n\t\t// Exit if no groups\n\t\tif ($this->DisplayGrps == 0)\n\t\t\treturn;\n\n\t\t// Check for a 'start' parameter\n\t\tif (@$_GET[EWRPT_TABLE_START_GROUP] != \"\") {\n\t\t\t$this->StartGrp = $_GET[EWRPT_TABLE_START_GROUP];\n\t\t\t$deals_details->setStartGroup($this->StartGrp);\n\t\t} elseif (@$_GET[\"pageno\"] != \"\") {\n\t\t\t$nPageNo = $_GET[\"pageno\"];\n\t\t\tif (is_numeric($nPageNo)) {\n\t\t\t\t$this->StartGrp = ($nPageNo-1)*$this->DisplayGrps+1;\n\t\t\t\tif ($this->StartGrp <= 0) {\n\t\t\t\t\t$this->StartGrp = 1;\n\t\t\t\t} elseif ($this->StartGrp >= intval(($this->TotalGrps-1)/$this->DisplayGrps)*$this->DisplayGrps+1) {\n\t\t\t\t\t$this->StartGrp = intval(($this->TotalGrps-1)/$this->DisplayGrps)*$this->DisplayGrps+1;\n\t\t\t\t}\n\t\t\t\t$deals_details->setStartGroup($this->StartGrp);\n\t\t\t} else {\n\t\t\t\t$this->StartGrp = $deals_details->getStartGroup();\n\t\t\t}\n\t\t} else {\n\t\t\t$this->StartGrp = $deals_details->getStartGroup();\n\t\t}\n\n\t\t// Check if correct start group counter\n\t\tif (!is_numeric($this->StartGrp) || $this->StartGrp == \"\") { // Avoid invalid start group counter\n\t\t\t$this->StartGrp = 1; // Reset start group counter\n\t\t\t$deals_details->setStartGroup($this->StartGrp);\n\t\t} elseif (intval($this->StartGrp) > intval($this->TotalGrps)) { // Avoid starting group > total groups\n\t\t\t$this->StartGrp = intval(($this->TotalGrps-1)/$this->DisplayGrps) * $this->DisplayGrps + 1; // Point to last page first group\n\t\t\t$deals_details->setStartGroup($this->StartGrp);\n\t\t} elseif (($this->StartGrp-1) % $this->DisplayGrps <> 0) {\n\t\t\t$this->StartGrp = intval(($this->StartGrp-1)/$this->DisplayGrps) * $this->DisplayGrps + 1; // Point to page boundary\n\t\t\t$deals_details->setStartGroup($this->StartGrp);\n\t\t}\n\t}", "function SetUpStartGroup() {\n\t\tglobal $dealers_reports;\n\n\t\t// Exit if no groups\n\t\tif ($this->DisplayGrps == 0)\n\t\t\treturn;\n\n\t\t// Check for a 'start' parameter\n\t\tif (@$_GET[EWRPT_TABLE_START_GROUP] != \"\") {\n\t\t\t$this->StartGrp = $_GET[EWRPT_TABLE_START_GROUP];\n\t\t\t$dealers_reports->setStartGroup($this->StartGrp);\n\t\t} elseif (@$_GET[\"pageno\"] != \"\") {\n\t\t\t$nPageNo = $_GET[\"pageno\"];\n\t\t\tif (is_numeric($nPageNo)) {\n\t\t\t\t$this->StartGrp = ($nPageNo-1)*$this->DisplayGrps+1;\n\t\t\t\tif ($this->StartGrp <= 0) {\n\t\t\t\t\t$this->StartGrp = 1;\n\t\t\t\t} elseif ($this->StartGrp >= intval(($this->TotalGrps-1)/$this->DisplayGrps)*$this->DisplayGrps+1) {\n\t\t\t\t\t$this->StartGrp = intval(($this->TotalGrps-1)/$this->DisplayGrps)*$this->DisplayGrps+1;\n\t\t\t\t}\n\t\t\t\t$dealers_reports->setStartGroup($this->StartGrp);\n\t\t\t} else {\n\t\t\t\t$this->StartGrp = $dealers_reports->getStartGroup();\n\t\t\t}\n\t\t} else {\n\t\t\t$this->StartGrp = $dealers_reports->getStartGroup();\n\t\t}\n\n\t\t// Check if correct start group counter\n\t\tif (!is_numeric($this->StartGrp) || $this->StartGrp == \"\") { // Avoid invalid start group counter\n\t\t\t$this->StartGrp = 1; // Reset start group counter\n\t\t\t$dealers_reports->setStartGroup($this->StartGrp);\n\t\t} elseif (intval($this->StartGrp) > intval($this->TotalGrps)) { // Avoid starting group > total groups\n\t\t\t$this->StartGrp = intval(($this->TotalGrps-1)/$this->DisplayGrps) * $this->DisplayGrps + 1; // Point to last page first group\n\t\t\t$dealers_reports->setStartGroup($this->StartGrp);\n\t\t} elseif (($this->StartGrp-1) % $this->DisplayGrps <> 0) {\n\t\t\t$this->StartGrp = intval(($this->StartGrp-1)/$this->DisplayGrps) * $this->DisplayGrps + 1; // Point to page boundary\n\t\t\t$dealers_reports->setStartGroup($this->StartGrp);\n\t\t}\n\t}", "function SetUpStartGroup() {\n\tglobal $PHP_SESSION, $PHP_GET;\n\tglobal $nStartGrp, $nTotalGrps, $nDisplayGrps;\n\n\t// Check for a START parameter\n\tif (@$PHP_GET[EW_TABLE_START_GROUP] != \"\") {\n\t\t$nStartGrp = $PHP_GET[EW_TABLE_START_GROUP];\n\t\t$PHP_SESSION[EW_TABLE_SESSION_START_GROUP] = $nStartGrp;\n\t} elseif (@$PHP_GET[\"pageno\"] != \"\") {\n\t\t$nPageNo = $PHP_GET[\"pageno\"];\n\t\tif (is_numeric($nPageNo)) {\n\t\t\t$nStartGrp = ($nPageNo-1)*$nDisplayGrps+1;\n\t\t\tif ($nStartGrp <= 0) {\n\t\t\t\t$nStartGrp = 1;\n\t\t\t} elseif ($nStartGrp >= intval(($nTotalGrps-1)/$nDisplayGrps)*$nDisplayGrps+1) {\n\t\t\t\t$nStartGrp = intval(($nTotalGrps-1)/$nDisplayGrps)*$nDisplayGrps+1;\n\t\t\t}\n\t\t\t$PHP_SESSION[EW_TABLE_SESSION_START_GROUP] = $nStartGrp;\n\t\t} else {\n\t\t\t$nStartGrp = @$PHP_SESSION[EW_TABLE_SESSION_START_GROUP];\n\t\t\tif (!is_numeric($nStartGrp) || $nStartGrp == \"\") {\n\t\t\t\t$nStartGrp = 1; // Reset start record counter\n\t\t\t\t$PHP_SESSION[EW_TABLE_SESSION_START_GROUP] = $nStartGrp;\n\t\t\t}\n\t\t}\n\t} else {\n\t\t$nStartGrp = @$PHP_SESSION[EW_TABLE_SESSION_START_GROUP];\n\t\tif (!is_numeric($nStartGrp) || $nStartGrp == \"\") {\n\t\t\t$nStartGrp = 1; // Reset start record counter\n\t\t\t$PHP_SESSION[EW_TABLE_SESSION_START_GROUP] = $nStartGrp;\n\t\t}\n\t}\n}", "public function setPageID(){\n\t\t\n\t\t$id = 'page';\n\t\t$s = '-';\n\t\t$pound = (!self::USE_SPLASH)?'#':'';\n\t\t$prefix = $pound.$id.$s;\n\t\t$this->headerContainerId = $prefix.'header'.$s.'container';\n\t\t$this->headerId = $prefix.'header';\n\t\t$this->subtitleId = $prefix.'subtitle';\n\t\t$this->brandId = $prefix.'brand';\n\t\t\n\t}", "function _set_id( $idGrupo ){\n \t\t$this->idGrupo = $idGrupo;\n }", "protected function SetupPanel() {\n\t\t\t$this->objGroup = Group::Load($this->strUrlHashArgument);\n\t\t\tif (!$this->objGroup) return $this->ReturnTo('#groups');\n\t\t\tif (!$this->objGroup->IsLoginCanView(QApplication::$Login)) return $this->ReturnTo('#groups');\n\n\t\t\t$this->objDelegate = new EditGroupParticipationDelegate($this, '#groups');\n\t\t}", "protected function setPage_id($value)\n\t{\n\t\t$this->page_id = $value;\n\t}", "protected function determinePageId() {}", "protected function determinePageId() {}", "private function setPageSelect()\n {\n $GLOBALS['TSFE']->sys_page = Tx_Smarty_Service_Compatibility::makeInstance('t3lib_pageSelect');\n $GLOBALS['TSFE']->sys_page->versioningPreview = false;\n $GLOBALS['TSFE']->sys_page->versioningWorkspaceId = false;\n $GLOBALS['TSFE']->where_hid_del = ' AND pages.deleted=0';\n $GLOBALS['TSFE']->sys_page->init(false);\n $GLOBALS['TSFE']->sys_page->where_hid_del .= ' AND pages.doktype<200';\n $GLOBALS['TSFE']->sys_page->where_groupAccess\n = $GLOBALS['TSFE']->sys_page->getMultipleGroupsWhereClause('pages.fe_group', 'pages');\n }", "abstract protected function determinePageId() ;", "function SetUpDisplayGrps() {\n\t\tglobal $deals_details;\n\t\t$sWrk = @$_GET[EWRPT_TABLE_GROUP_PER_PAGE];\n\t\tif ($sWrk <> \"\") {\n\t\t\tif (is_numeric($sWrk)) {\n\t\t\t\t$this->DisplayGrps = intval($sWrk);\n\t\t\t} else {\n\t\t\t\tif (strtoupper($sWrk) == \"ALL\") { // display all groups\n\t\t\t\t\t$this->DisplayGrps = -1;\n\t\t\t\t} else {\n\t\t\t\t\t$this->DisplayGrps = 50; // Non-numeric, load default\n\t\t\t\t}\n\t\t\t}\n\t\t\t$deals_details->setGroupPerPage($this->DisplayGrps); // Save to session\n\n\t\t\t// Reset start position (reset command)\n\t\t\t$this->StartGrp = 1;\n\t\t\t$deals_details->setStartGroup($this->StartGrp);\n\t\t} else {\n\t\t\tif ($deals_details->getGroupPerPage() <> \"\") {\n\t\t\t\t$this->DisplayGrps = $deals_details->getGroupPerPage(); // Restore from session\n\t\t\t} else {\n\t\t\t\t$this->DisplayGrps = 50; // Load default\n\t\t\t}\n\t\t}\n\t}", "public function selectiongroupAction(){\n\t\t$societe=$this->societe;\n\t\tif ($societe instanceof Object_Societe ) {\n\t\t\t$this->view->locations = $societe->getLocations();\n\t\t}\n\t\t$this->view->selectedlocationid=$this->getParam('locationid');\n\t\t$this->view->resadate=$this->getParam('resadate');\n\t\t$this->view->partysize=$this->getParam('partysize');\n\t\t$this->view->slot=$this->getParam('slot');\n\t\t$this->disableLayout();\n\n\t}", "function SetUpDisplayGrps() {\n\t\tglobal $dealers_reports;\n\t\t$sWrk = @$_GET[EWRPT_TABLE_GROUP_PER_PAGE];\n\t\tif ($sWrk <> \"\") {\n\t\t\tif (is_numeric($sWrk)) {\n\t\t\t\t$this->DisplayGrps = intval($sWrk);\n\t\t\t} else {\n\t\t\t\tif (strtoupper($sWrk) == \"ALL\") { // display all groups\n\t\t\t\t\t$this->DisplayGrps = -1;\n\t\t\t\t} else {\n\t\t\t\t\t$this->DisplayGrps = 50; // Non-numeric, load default\n\t\t\t\t}\n\t\t\t}\n\t\t\t$dealers_reports->setGroupPerPage($this->DisplayGrps); // Save to session\n\n\t\t\t// Reset start position (reset command)\n\t\t\t$this->StartGrp = 1;\n\t\t\t$dealers_reports->setStartGroup($this->StartGrp);\n\t\t} else {\n\t\t\tif ($dealers_reports->getGroupPerPage() <> \"\") {\n\t\t\t\t$this->DisplayGrps = $dealers_reports->getGroupPerPage(); // Restore from session\n\t\t\t} else {\n\t\t\t\t$this->DisplayGrps = 50; // Load default\n\t\t\t}\n\t\t}\n\t}", "function setup_groups() {\n global $CFG;\n\n /// find out current groups mode\n $this->group_selector = groups_print_course_menu($this->course, $this->pbarurl, true);\n $this->currentgroup = groups_get_course_group($this->course);\n\n if ($this->currentgroup) {\n $this->groupsql = \" LEFT JOIN {$CFG->prefix}groups_members gm ON gm.userid = u.id \";\n $this->groupwheresql = \" AND gm.groupid = $this->currentgroup \";\n }\n }", "function setAsStartPageObject()\n\t{\n\t\tglobal $ilCtrl, $lng;\n\n\t\t$this->checkPermission(\"write\");\n\n\t\tif (!is_array($_POST[\"imp_page_id\"]) || count($_POST[\"imp_page_id\"]) != 1)\n\t\t{\n\t\t\tilUtil::sendInfo($lng->txt(\"wiki_select_one_item\"), true);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->object->removeImportantPage((int) $_POST[\"imp_page_id\"][0]);\n\t\t\t$this->object->setStartPage(ilWikiPage::lookupTitle((int) $_POST[\"imp_page_id\"][0]));\n\t\t\t$this->object->update();\n\t\t\tilUtil::sendSuccess($this->lng->txt(\"msg_obj_modified\"),true);\n\t\t}\n\t\t$ilCtrl->redirect($this, \"editImportantPages\");\n\t}", "function init($id,$ver_id=0,$grp_id=0,$uid=0)\r\n\t{\r\n\t\tglobal $myDB;\r\n\r\n\t\t// SQL-Exploits ausschliessen\r\n\t\t$id = (int)$id;\r\n\t\t$ver_id = (int)$ver_id;\r\n\t\t$grp_id = (int)$grp_id;\r\n\t\t$uid = (int)$uid;\r\n\r\n\t\t$sql =\"SELECT page.*,pagegroup.grp_id, pagegroup.grp_statistic, pagegroup.grp_multilanguage, pagegroup.grp_smarturl_schema FROM page, pagegroup WHERE \";\r\n\t\tif ($id!=0)\r\n\t\t{\r\n\t\t\t$sql.= \"pag_id = \" . $id;\r\n\t\t\tif ($uid!=0)\r\n\t\t\t{\r\n\t\t\t\t$sql .=\" AND pag_uid='\".$uid.\"'\";\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif ($uid!=0)\r\n\t\t\t{\r\n\t\t\t\t$sql .=\"pag_uid='\".$uid.\"'\";\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$sql .=\"pag_id=0\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ($grp_id!=0)\r\n\t\t{\r\n\t\t\t$sql .= \" AND grp_id=\".$grp_id;\r\n\t\t}\r\n\r\n\t\t$sql .= \" AND page.grp_id=pagegroup.grp_id\";\r\n\r\n\t\t$rs = $myDB->query($sql,\"Page: resolving by ID \". $id);\r\n\r\n\t\tif (mysql_num_rows($rs)==0)\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$row = mysql_fetch_array($rs);\r\n\r\n\t\t$this->initByRow($row, $ver_id);\r\n\r\n\t}", "public function initStep()\n\t{\n\t\t$this->component = $this->GetWizard()->GetVar(\"component\");\n\n\t\t$this->SetStepID($this->currentStepName);\n\t\t$this->SetTitle(Loc::getMessage(\"SALE_CSM_WIZARD_CRMGROUPSTEP_TITLE\"));\n\n\t\t$this->request = Application::getInstance()->getContext()->getRequest();\n\n\t\t$this->prepareButtons();\n\n\t\t$this->setStepErrors();\n\t}", "function initPageId()\n {\n $global=Frd::getGlobal();\n\n if(isset($_REQUEST['signed_request']))\n {\n $global->page_id=get_page_id();\n return $global->page_id;\n }\n\n return false;\n }", "public function pageIdCanBeDeterminedWhileEditingARegularRecord() {}", "protected function setupPage() {}", "function member_groups_page() {\r\n require_once( $plugin_dir . \"email-newsletter-files/page-groups.php\" );\r\n }", "function SetUpDisplayGrps() {\n\tglobal $PHP_GET;\n\tglobal $PHP_SESSION;\n\tglobal $nDisplayGrps;\n\tglobal $nStartGrp;\n\t$sWrk = @$PHP_GET[EW_TABLE_GROUP_PER_PAGE];\n\tif ($sWrk <> \"\") {\n\t\tif (is_numeric($sWrk)) {\n\t\t\t$nDisplayGrps = intval($sWrk);\n\t\t} else {\n\t\t\tif (strtoupper($sWrk) == \"ALL\") { // Display All Records\n\t\t\t\t$nDisplayGrps = -1;\n\t\t\t} else {\n\t\t\t\t$nDisplayGrps = 3; // Non-numeric, Load Default\n\t\t\t}\n\t\t}\n\t\t$PHP_SESSION[EW_TABLE_SESSION_GROUP_PER_PAGE] = $nDisplayGrps; // Save to Session\n\n\t\t// Reset Start Position (Reset Command)\n\t\t$nStartGrp = 1;\n\t\t$PHP_SESSION[EW_TABLE_SESSION_START_GROUP] = $nStartGrp;\n\t} else {\n\t\tif (@$PHP_SESSION[EW_TABLE_SESSION_GROUP_PER_PAGE] <> \"\") {\n\t\t\t$nDisplayGrps = $PHP_SESSION[EW_TABLE_SESSION_GROUP_PER_PAGE]; // Restore from Session\n\t\t} else {\n\t\t\t$nDisplayGrps = 3; // Load Default\n\t\t}\n\t}\n}", "function setSectionID( $value )\r\n {\r\n $this->SectionID = $value;\r\n }", "protected function loadData()\n {\n $this->id = $this->getParameter('id', 'int', null);\n if ($this->id == null || !BackendMailengineModel::existsGroup($this->id)) {\n $this->redirect(BackendModel::createURLForAction('groups') . '&error=non-existing');\n }\n\n $this->record = BackendMailengineModel::getGroup($this->id);\n }", "function setPageID( $pageID ) \n {\n $this->setValueByFieldName( 'page_id', $pageID );\n }", "public function getPageID(){\n\t\t\n\t\tif(self::USE_SPLASH)\n\t\t{\n\t\t\t$this->setSplashID();\n\t\t}\n\t\telse $this->setPageID();\n\t\t\n\t}", "public function testGroupPagesLoads() {\n\t\t$categoryElementLocator = $this->locatorObj->readConfigData ( \"categoryLocator\" );\n\t\t$articleCountLocator = $this->locatorObj->readConfigData ( \"articleCounter\" );\n\t\t$this->currentWindow ()->maximize ();\n\t\t$this->url ( \"/\" );\n\t\t$this->logger->info ( \"*************** start of GroupPagesLoads testcase*********** \" );\n\t\t$this->applicationFunctionObj->navigateToMainPage ( $this );\n\t\t$this->applicationFunctionObj->waitUntilElementIsVisible ( $this,$categoryElementLocator,\"name\" );\n\t\t$this->byName ( $categoryElementLocator)->click ();\n\t\t$this->applicationFunctionObj->waitUntilElementIsVisible ( $this,$articleCountLocator,\"xpath\");\n\t\t$GrouppageCount = $this->byXPath ( $articleCountLocator )->text ();\n\t\t$this->logger->info ( \"The count value of the available results is fetched\" );\n\t\t$parts = explode ( ' ', $GrouppageCount );\n\t\t$count = ( int ) array_values ( $parts ) [0];\n\t\tif ($count > 1500) {\n\t\t\t$this->logger->info ( \"Group page is loaded successfully and count is greater than 1500\" );\n\t\t} else {\n\t\t\t$this->fail ( \"Group page is not fully loaded\" );\n\t\t}\n\t\t$this->logger->info ( \"*************** end of GroupPagesLoads testcase********** \" );\n\t}", "function set_id( $id ){\n\t\t$this->id = $id;\n\t\t// this is add request. so number is 0\n\t\tif( $this->id == $this->id_base ){\n\t\t\t$this->number = 0;\n\t\t\t$this->is_new = true;\n\t\t}\n\t\t// parse number\n\t\telse{\n\t\t\t$this->number = str_replace($this->id_base.'-', '', $this->id);\n\n\t\t\t// load instance data\n\t\t\t$this->instance = jcf_field_settings_get( $this->id );\n\t\t\tif( !empty($this->instance) ){\n\t\t\t\t$this->slug = $this->instance['slug'];\n\t\t\t}\n\t\t}\n\t}", "function MyMod_Paging_Page_No_Set()\n {\n //$this->MyMod_Paging_No=$this->PresetPage;\n if (empty($this->MyMod_Paging_No))\n {\n $this->MyMod_Paging_No=$this->GetPOST($this->ModuleName.\"_Page\");\n if (empty($this->MyMod_Paging_No))\n {\n $this->MyMod_Paging_No=$this->GetGETOrPOST(\"Page\");\n }\n }\n\n if (\n empty($this->MyMod_Paging_No)\n ||\n $this->MyMod_Paging_No>$this->MyMod_Paging_N\n )\n {\n $this->MyMod_Paging_No=1;\n }\n }", "public function displayPage()\n {\n $this->getState()->template = 'displaygroup-page';\n }", "public function set_id($setid){\n $this->id = $setid;\n }", "function test_id(){\n\t\tif(isset($_GET['id'])){\n\t\t\trecuperation_info_id();\n\t\t\tglobal $id_defini;\n\t\t\t$id_defini = true;\n\t\t}\n\t}", "public function getGroupByPage() {}", "public function page_init()\n { \n register_setting(\n 'firebird_grupo',\n 'firebird_name',\n array( $this, 'sanitize' )\n );\n\n add_settings_section(\n 'setting_section_id',\n 'Configurações',\n array( $this, 'print_section_info' ),\n 'integracao-firebird-admin'\n ); \n\n add_settings_field(\n 'chave_token_api',\n 'Chave a ser utilizada no acesso a API de Importação',\n array( $this, 'chave_token_api_callback' ),\n 'integracao-firebird-admin',\n 'setting_section_id'\n );\n }", "public function pageIdCanBeDeterminedWhileCallingModuleWithPageTree() {}", "function setGroupID( $groupID ) \n {\n $this->setValueByFieldName( 'navbargroup_id', $groupID);\n }", "public function pageIdCanBeDeterminedWhileEditingAPageRecord() {}", "public function set_page($page);", "public function testNumberingStart()\n {\n // Section Settings\n $oSettings = new Section();\n\n $this->assertNull($oSettings->getPageNumberingStart());\n\n $iVal = rand(1, 1000);\n $oSettings->setPageNumberingStart($iVal);\n $this->assertEquals($iVal, $oSettings->getPageNumberingStart());\n\n $oSettings->setPageNumberingStart();\n $this->assertNull($oSettings->getPageNumberingStart());\n }", "private function setUpDatabaseMockForDeterminePageId() {}", "function PreProcessItemDataGroups()\n {\n $this->Import_Datas=array(\"Name\",\"Email\");\n array_unshift($this->ItemDataGroupPaths,\"../EventApp/System/Inscriptions\");\n }", "public function page_init()\n { \n register_setting(\n 'program_manager_option_group', // Option group\n 'program_manager_option', // Option name\n array( $this, 'sanitize' ) // Sanitize\n );\n\n add_settings_section(\n 'program_manager_section_id', // ID\n 'Program generator options', // Title\n array( $this, 'print_section_info' ), // Callback\n 'program_manager_admin' // Page\n ); \n\n add_settings_field(\n 'pre_days', // ID\n 'PRE conference days (separated by ,)', // Title \n array( $this, 'pre_days_callback' ), // Callback\n 'program_manager_admin', // Page\n 'program_manager_section_id' // Section \n ); \n\n add_settings_field(\n 'main_days', \n 'MAIN conference days (separated by ,)', \n array( $this, 'main_days_callback' ), \n 'program_manager_admin', \n 'program_manager_section_id'\n ); \n \n\tadd_settings_field(\n 'pre_days_file', // ID\n 'PRE conference xlsx file', // Title \n array( $this, 'pre_days_file_callback' ), // Callback\n 'program_manager_admin', // Page\n 'program_manager_section_id' // Section \n ); \n\n add_settings_field(\n 'main_days_file', \n 'MAIN conference xlsx file', \n array( $this, 'main_days_file_callback' ), \n 'program_manager_admin', \n 'program_manager_section_id'\n ); \n \n }", "public function setStartGroupId($value)\n {\n if ($value !== null) {\n $this->_params['start'] = $value;\n } else {\n unset($this->_params['start']);\n }\n }", "public function getPageId() {}", "public function getPageId() {}", "protected function set_initial_groups()\n {\n $this->_groups = apply_filters('ngg_admin_requirements_manager_groups', array('phpext' => __('NextGen Gallery requires the following PHP extensions to function correctly. Please contact your hosting provider or systems admin and ask them for assistance:', 'nggallery'), 'phpver' => __('NextGen Gallery has degraded functionality because of your PHP version. Please contact your hosting provider or systems admin and ask them for assistance:', 'nggallery'), 'dirperms' => __('NextGen Gallery has found an issue trying to access the following files or directories. Please ensure the following locations have the correct permissions:', 'nggallery')));\n }", "function prepareForBuildPage() \n\t{\n\t\t// save recs\n\t\t//$this->save();\n\t\t// PRG rule, to avoid POSTDATA resend\n\t\t$this->rulePRG();\t\n\t\t//Sorting fields\n\t\t$this->buildOrderParams();\n\t\t// fill data\n\t\t$this->fillMembers();\n\t\t$this->fillGroups();\n\t\t// build sql query\n\t\t$this->buildSQL();\n\t\t// build pagination block\n\t\t$this->buildPagination();\n\t\t// seek page must be executed after build pagination\n\t\tif ($this->sortByGroup===false)\n\t\t\t$this->seekPageInRecSet($this->querySQL);\t\t\t\t\t\n\t\telse\n\t\t\t$this->recSet = db_query($this->querySQL, $this->conn);\n\t\t// fill grid data\n\t\t$this->fillGridData();\n\t\t// build search panel\n\t\t$this->buildSearchPanel(\"adv_search_panel\");\n\t\t// add common js code\n\t\t$this->addCommonJs();\n\t\t// add common html code\n\t\t$this->addCommonHtml();\n\t\t// Set common assign\n\t\t$this->commonAssign();\n\t\t// build admin block\t\t\n\t\t$this->assignAdmin();\t\n\t}", "function SetupMultiPages() {\r\n\t\t$pages = new cSubPages();\r\n\t\t$pages->Add(0);\r\n\t\t$pages->Add(1);\r\n\t\t$pages->Add(2);\r\n\t\t$pages->Add(3);\r\n\t\t$pages->Add(4);\r\n\t\t$pages->Add(5);\r\n\t\t$pages->Add(6);\r\n\t\t$this->MultiPages = $pages;\r\n\t}", "function groups() {\n\t\t$this->validate();\n\t\t$this->setupTemplate();\n\n\t\t$journal =& Request::getJournal();\n\n\t\t$rangeInfo =& $this->getRangeInfo('groups');\n\n\t\t$groupDao =& DAORegistry::getDAO('GroupDAO');\n\t\t$groups =& $groupDao->getGroups(ASSOC_TYPE_JOURNAL, $journal->getId(), null, $rangeInfo);\n\n\t\t$templateMgr =& TemplateManager::getManager();\n\t\t$templateMgr->addJavaScript('lib/pkp/js/lib/jquery/plugins/jquery.tablednd.js');\n\t\t$templateMgr->addJavaScript('lib/pkp/js/functions/tablednd.js');\n\t\t$templateMgr->assign_by_ref('groups', $groups);\n\t\t$templateMgr->assign('boardEnabled', $journal->getSetting('boardEnabled'));\n\t\t$templateMgr->display('manager/groups/groups.tpl');\n\t}", "public function PIDupinRootlineConditionMatchesCurrentPageIdWhileEditingNewPage() {}", "public function __invoke() {\n\t\t// Register hooks for the group if part of group\n\t\tif ( null !== $this->group ) {\n\t\t\t$this->group->load( $this->group, $this->page );\n\t\t}\n\n\t\t$this->page->load( $this->page );\n\t}", "function setPageLayout()\n\t{\n\t\tglobal $tpl, $ilCtrl, $lng;\n\n\t\tif (!is_array($_POST[\"id\"]))\n\t\t{\n\t\t\tilUtil::sendFailure($lng->txt(\"no_checkbox\"), true);\n\t\t\t$ilCtrl->redirect($this, \"showHierarchy\");\n\t\t}\n\t\t\n\t\t$this->initSetPageLayoutForm();\n\t\t\n\t\t$tpl->setContent($this->form->getHTML());\n\t}", "public function init()\n {\n if(!isset($_SESSION[$this->_sGroup]))\n $_SESSION[$this->_sGroup]=[];\n }", "function set_accordion_id() {\n\t\t\t$this->current_accordion_slug++;\n\t\t}", "public function postProcess(): void {\n $groupsToAddTo = (array) $this->getSubmittedValue('groups');\n $summaryInfo = ['groups' => [], 'tags' => []];\n foreach ($groupsToAddTo as $groupID) {\n // This is a convenience for now - really url & name should be determined at\n // presentation stage - ie the summary screen. The only info we are really\n // preserving is which groups were created vs already existed.\n $summaryInfo['groups'][$groupID] = [\n 'url' => CRM_Utils_System::url('civicrm/group/search', 'reset=1&force=1&context=smog&gid=' . $groupID),\n 'name' => Group::get(FALSE)\n ->addWhere('id', '=', $groupID)\n ->addSelect('name')\n ->execute()\n ->first()['name'],\n 'new' => FALSE,\n 'added' => 0,\n 'notAdded' => 0,\n ];\n }\n\n if ($this->getSubmittedValue('newGroupName')) {\n /* Create a new group */\n $groupsToAddTo[] = $groupID = Group::create(FALSE)->setValues([\n 'title' => $this->getSubmittedValue('newGroupName'),\n 'description' => $this->getSubmittedValue('newGroupDesc'),\n 'group_type' => $this->getSubmittedValue('newGroupType') ?? [],\n 'is_active' => TRUE,\n ])->execute()->first()['id'];\n $summaryInfo['groups'][$groupID] = [\n 'url' => CRM_Utils_System::url('civicrm/group/search', 'reset=1&force=1&context=smog&gid=' . $groupID),\n 'name' => $this->getSubmittedValue('newGroupName'),\n 'new' => TRUE,\n 'added' => 0,\n 'notAdded' => 0,\n ];\n }\n $tagsToAdd = (array) $this->getSubmittedValue('tag');\n foreach ($tagsToAdd as $tagID) {\n // This is a convenience for now - really url & name should be determined at\n // presentation stage - ie the summary screen. The only info we are really\n // preserving is which tags were created vs already existed.\n $summaryInfo['tags'][$tagID] = [\n 'url' => CRM_Utils_System::url('civicrm/contact/search', 'reset=1&force=1&context=smog&id=' . $tagID),\n 'name' => Tag::get(FALSE)\n ->addWhere('id', '=', $tagID)\n ->addSelect('name')\n ->execute()\n ->first()['name'],\n 'new' => TRUE,\n 'added' => 0,\n 'notAdded' => 0,\n ];\n }\n if ($this->getSubmittedValue('newTagName')) {\n $tagsToAdd[] = $tagID = Tag::create(FALSE)->setValues([\n 'name' => $this->getSubmittedValue('newTagName'),\n 'description' => $this->getSubmittedValue('newTagDesc'),\n 'is_selectable' => TRUE,\n 'used_for' => 'civicrm_contact',\n //NYSS new tags during import should be imported as keywords\n 'parent_id'\t=> 296,\n ])->execute()->first()['id'];\n $summaryInfo['tags'][$tagID] = [\n 'url' => CRM_Utils_System::url('civicrm/contact/search', 'reset=1&force=1&context=smog&id=' . $tagID),\n 'name' => $this->getSubmittedValue('newTagName'),\n 'new' => FALSE,\n 'added' => 0,\n 'notAdded' => 0,\n ];\n }\n // Store the actions to take on each row & the data to present at the end to the userJob.\n $this->updateUserJobMetadata('post_actions', [\n 'group' => $groupsToAddTo,\n 'tag' => $tagsToAdd,\n ]);\n $this->updateUserJobMetadata('summary_info', $summaryInfo);\n\n // If ACL applies to the current user, update cache before running the import.\n if (!CRM_Core_Permission::check('view all contacts')) {\n $userID = CRM_Core_Session::getLoggedInContactID();\n CRM_ACL_BAO_Cache::deleteEntry($userID);\n CRM_ACL_BAO_Cache::deleteContactCacheEntry($userID);\n }\n\n $this->runTheImport();\n }", "public function initPage() {}", "public function initPage() {}", "function init_groups() {\r\n\tif (!HYPEGALLERY_GROUP_ALBUMS) {\r\n\t\treturn;\r\n\t}\r\n\tadd_group_tool_option('albums', elgg_echo('gallery:groupoption:enable'), true);\r\n\telgg_extend_view('groups/tool_latest', 'framework/gallery/group_module');\r\n}", "public function setStartPage($page);", "function setupNewsgroups() {\n\t\t$this->setIfNot('hdr_group', 'free.pt');\n\t\t$this->setIfNot('nzb_group', 'alt.binaries.ftd');\n\t\t$this->setIfNot('comment_group', 'free.usenet');\n\t\t$this->setIfNot('report_group', 'free.willey');\n\t\t$this->setIfNot('report_group', 'free.willey');\n\t}", "function SavePages(){\n ////save page in group\n $pageGroup = $_POST['groupPP'];\n $idpage=$_POST['newpageGp'];\n $idgrouPAge=$_POST['namepages'];\n $titlenewgroup=$_POST['nametile']; \n $count=[];\n \n //\n \n if(isset($idpage)){\n // Check if the domain exists\n \n if($idgrouPAge=='NG'){\n /// need create new group\n DB::table('w59_groudpage')->insert(\n ['id' => NULL, 'IDgroup' => $pageGroup, 'title'=> $titlenewgroup]\n ); \n $idgrouPAg = DB::table('w59_groudpage')\n ->select('id')\n ->orderBy('id', 'desc')\n ->first();\n $idgrouPAge = $idgrouPAg->id;\n }\n \n \n if(isset($idpage)){\n \n if($titlenewgroup==\"\"){\n $get_group =DB::table('w59_groudpage')\n ->where('id', '=', $idgrouPAge)\n ->first(); \n }else{\n $get_group =DB::table('w59_groudpage')\n ->where('title', '=', $titlenewgroup)\n ->orwhere('id', '=', $pageGroup)\n ->first(); \n }\n $idGroup_RESUlt=$get_group->id;\n \n foreach($idpage as $po){\n ////Insert Group Page\n DB::table('w59_page')\n ->where('id', $po)\n ->update(['IDgroudpage' => $idGroup_RESUlt]);\n \n \n //////Send WP INFO\n \n $result_Domain= DB::table('w59_groudpage')\n ->select('w59_groudpage.id','w59_dominio.url as urldomain', 'w59_dominio.id as dominioid' )\n ->join('w59_dominio', 'w59_dominio.IDgroup', '=', 'w59_groudpage.IDgroup')\n ->where('w59_groudpage.id','=',$idgrouPAge)\n ->get(); \n \n foreach($result_Domain as $pa){ \n $count[]= $pa->dominioid;\n } \n \n }\n foreach(array_unique($count) as $idpush){\n DB::table('work_queue')->where('id_base', '=', $idpush)->delete(); \n DB::table('work_queue')->insert(\n ['id' => NULL,'name_work' => 'push_domain' , 'id_base' => $idpush, 'response' => '']\n );\n }\n \n \n }\n \n }\n return back()->withInput();\n }", "public function page_init()\n { \n register_setting(\n 'ccgr_extras_options', // Group name. Must match the settings_fields function call\n 'cc_restricted_email_domains', // Option name\n array( $this, 'sanitize' ) // Callback function for validation.\n );\n\n add_settings_section(\n 'ccgr_extras_options', // ID for the section\n 'Registration Extras', // Title\n array( $this, 'print_section_info' ), // Callback function. Outputs section description.\n 'ccgr_extras' // Page name. Must match do_settings_section function call.\n ); \n\n add_settings_field(\n 'restricted_domains', // ID for the field\n 'Restricted Email Domains', // Title \n array( $this, 'print_domain_form_field' ), // Callback function. Outputs form field inputs.\n 'ccgr_extras', // Page name. Must match do_settings_section function call.\n 'ccgr_extras_options' // ID of the settings section that this goes into (same as the first argument of add_settings_section). \n );\n\n }", "protected function _setId($value)\n\t{\n\t\tvar_dump($value);\n\t\tif (empty($value) || ($value < 0)) {\n\t\t\ttrigger_error('Invalid value used to set the member id', E_USER_ERROR);\n\t\t\treturn;\n\t\t}\n\t\telse {\n\t\t\t$this->_id = $value;\n\t\t\t$_SESSION['user_id']=$value;\n\t\t\t\n\n\t\t}\n\t}", "function showPageEditorSettingsObject()\n\t{\n\t\tglobal $tpl, $ilTabs, $ilCtrl;\n\t\t\n\t\t$this->addPageEditorSettingsSubTabs();\n\t\t\n\t\tinclude_once(\"./Services/COPage/classes/class.ilPageEditorSettings.php\");\n\t\t$grps = ilPageEditorSettings::getGroups();\n\t\t\n\t\t$this->cgrp = $_GET[\"grp\"];\n\t\tif ($this->cgrp == \"\")\n\t\t{\n\t\t\t$this->cgrp = key($grps);\n\t\t}\n\n\t\t$ilCtrl->setParameter($this, \"grp\", $this->cgrp);\n\t\t$ilTabs->setSubTabActive(\"adve_grp_\".$this->cgrp);\n\t\t\n\t\t$this->initPageEditorForm();\n\t\t$tpl->setContent($this->form->getHtml());\n\t}", "function Initialize () {\n global $gCONTENTGROUPSINFOTAB;\n global $gCONTENTGROUPSTAB;\n global $gCONTENTGROUPSMEMBERSTAB;\n global $gCONTENTGROUPSOPTIONSTAB;\n\n global $zAUTHUSER, $zLOCALUSER, $zOLDAPPLE;\n\n global $gGROUPVIEW, $gGROUPVIEWTYPE, $gGROUPVIEWADMIN; \n global $gPOSTDATA;\n global $gFOCUSUSERNAME;\n global $gSITEDOMAIN;\n global $gSELECTBUTTON;\n global $gSCROLLSTEP, $gSCROLLSTART, $gSCROLLMAX;\n global $gCONTINUEFLAG;\n\n $gCONTENTGROUPSINFOTAB = \"_off\";\n $gCONTENTGROUPSTAB = \"_off\";\n $gCONTENTGROUPSMEMBERSTAB = \"_off\";\n $gCONTENTGROUPSOPTIONSTAB = \"_off\";\n\n $gCONTINUEFLAG = FALSE;\n\n $this->groupContent->Context = $zOLDAPPLE->Context;\n \n $gSCROLLSTEP[$this->groupContent->Context] = 20;\n \n $gGROUPVIEWTYPE = \"GROUPVIEW\";\n\n // Display the select all button by default.\n $gSELECTBUTTON = 'Select All';\n\n // Depracate the view.\n if ($gGROUPVIEWADMIN != \"\") {\n $gGROUPVIEW = $gGROUPVIEWADMIN;\n } // if\n $gGROUPVIEWADMIN = $gGROUPVIEW;\n $gPOSTDATA['GROUPVIEW'] = $gGROUPVIEW;\n\n // Check if user is admin or is viewing their own page.\n if ( ($gFOCUSUSERNAME == $zAUTHUSER->Username) and\n ($gSITEDOMAIN == $zAUTHUSER->Domain) ) {\n $gGROUPVIEWTYPE = \"GROUPVIEWADMIN\";\n } else {\n if ($zLOCALUSER->userAccess->e == TRUE) {\n $gGROUPVIEWTYPE = \"GROUPVIEWADMIN\";\n } // if\n } // if\n\n // Determine which mode we are viewing in, and set flags accordingly.\n $this->Flags ();\n }", "function set_userGroup($data, $oldId){\n $data_user = array();\n $data_group = array();\n $data_user['id'] = $data['id'];\n $data_user['username'] = $data['username'];\n $data_user['password'] = $data['password'];\n $data_user['email'] = $data['email'];\n\n $group = $data['group'];\n $data['group'] = selectRecord(TAB_GROUPS, \"role = '$group'\")['id'];\n $data_group['userId'] = $data['id'];\n $data_group['groupId'] = $data['group'];\n\n updateRecord(TAB_USR_ROLE, $data_group, \"userId = $oldId\");\n updateRecord(TAB_USERS, $data_user, \"id = $oldId\");\n $data_info = array();\n if($data['group'] == 1){\n $data_info = array();\n $data_info['employment'] = \"-\";\n $data_info['img_address'] = \"upload/user/user-default.png\";\n $data_info['user'] = $data['id'];\n insertRecord(TAB_PERSONALINFO, $data_info);\n }\n}", "public function treeLevelConditionMatchesCurrentPageIdWhileEditingNewPage() {}", "function getPageID() \n {\n return (int) $this->getValueByFieldName( 'page_id' );\n }", "public function pageIdCanBeDeterminedWhileMovingARecordToAnotherPage() {}", "public function page_init() {\n }", "public function assign_group ()\n\t{\t\t\n\t\t$this->load->model('students_m');\t\n\n\n\t\t$this->data['title'] = 'Fee';\n\t\t$this->data['fee_lists'] = $this->students_m->get_fee_list();\n\t\t$this->data['student_lists'] = $this->students_m->get_student_with_group_list();\n\t\t$this->data['group_lists'] = $this->students_m->get_group_list();\n\t\t//$this->data['childview'] = 'dashboard/main';\n\t\t$this->load->view('students/assign-group/main', $this->data);\n\t}", "function MyMod_Paging_NPages_Set()\n {\n if ($this->NumberOfItems>$this->NItemsPerPage)\n {\n $this->MyMod_Paging_N=intval($this->NumberOfItems/$this->NItemsPerPage);\n $res=$this->NumberOfItems % $this->NItemsPerPage;\n if ($res>0) { $this->MyMod_Paging_N++; }\n }\n elseif ($this->NumberOfItems>0)\n {\n $this->MyMod_Paging_N=1;\n }\n else\n {\n $this->MyMod_Paging_N=0;\n }\n }", "function seekPageInRecSet()\n\t{\n\t\t\n\t\t$this->resultData = $this->plugin->getGroupList( $this->searchClauseObj->getAllFieldsSearchValue() );\n\t\t$this->numRowsFromSQL = $this->resultData ? count( $this->resultData ) : 0;\n\t\t$this->recSet = $this->numRowsFromSQL;\n\t}", "public function grp_settings_page_init(){\n\t\t$settings_page = add_menu_page( 'GRP Settings', 'GRP Settings', 'edit_theme_options', 'grp-settings', array($this,'grp_settings_page') );\n\t\t//add this action to save your setting page data\n\t\tadd_action( \"load-{$settings_page}\", array( $this, 'grp_load_settings_page' ) );\n\t}", "public function SetGroup($group,$value){\n if($this->_groups[$group][\"currentGroup\"]!=$value){\n if($this->_groups[$group][\"currentGroup\"]!=\"?\"){\n if(isset($this->_groups[$group][\"afterGroup\"])){\n $this->Ln(4);\n $function = array($this->_groups[$group][\"afterGroup\"][\"class\"],$this->_groups[$group][\"afterGroup\"][\"callback\"]);\n $params = array($this,$value);\n call_user_func_array($function,$params);\n }\n $this->Sum();\n }\n if(isset($this->_groups[$group][\"beforeGroup\"])){\n if(($this->GetY() + 22) > ($this->h - 10)){ //22 Altura de una cabecera de grupo\n $this->_changePage = false;\n $this->AddPage();\n }\n $this->Ln(6);\n $this->SetTextColor(100);\n $this->SetFont('Arial','B',11);\n $function = array($this->_groups[$group][\"beforeGroup\"][\"class\"],$this->_groups[$group][\"beforeGroup\"][\"callback\"]);\n $params = array($this,$value);\n $this->_groups[$group][\"currentMsg\"] = call_user_func_array($function,$params);\n $this->Ln(4);\n }\n $this->_groups[$group][\"currentGroup\"] = $value;\n $this->pages[$this->PageNo()] = str_replace(\"{grp_$group}\",$this->_groups[$group][\"currentMsg\"],$this->pages[$this->PageNo()]);\n $this->__Header();\n $this->_changePage = false;\n $this->SumRe();\n }else{\n $this->_changePage = true;\n }\n }", "function new_groups()\n {\n \n }", "function BeforeProcessAdd(&$pageObject)\n{\n\n\t\tcalendar_initSessionVariable();\n;\t\t\n}", "function setid_exp($val)\n { $this->id_exp=$val;}", "public function setId($_id);", "public function actionAdd()\n {\n if (Yii::$app->getRequest()->Post('gid') && Yii::$app->getRequest()->Post('iid')) {\n $landingPageId = (int)Yii::$app->getRequest()->Post('gid');\n $groupingId = (int)Yii::$app->getRequest()->Post('iid');\n $model = LandingPageGrouping::find()->andWhere(['landing_page_id' => $landingPageId])->\n andWhere(['grouping_id' => $groupingId])->one();\n if (!$model) {\n $model = new LandingPageGrouping();\n $model->landing_page_id = $landingPageId;\n $model->grouping_id = $groupingId;\n if ($model->validate()) {\n $model->save();\n }\n }\n\n $groupings = Grouping::find()->onLandingPage($landingPageId)->active()->\n asArray()->all();\n } else {\n $groupings = false;\n }\n \n \\Yii::$app->response->format = 'json';\n return $groupings;\n }", "function setid_exp($val)\n { $this->id_exp=$val;}", "function setid_exp($val)\n { $this->id_exp=$val;}", "public function setID($_id) \n \t{\n \t\t$this->_id = $_id;\n \t}", "public function setIdgrupo_sanguineo($idgrupo_sanguineo){\n $this->idgrupo_sanguineo = $idgrupo_sanguineo;\n }", "function mapgroups() {\r\n global $xdb;\r\n\t$limit = (!empty($_GET[\"groupslimit\"])) ? $_REQUEST[\"groupslimit\"] :X1_adminquerylimit ;\r\n\t$page = (!empty($_GET[\"groupspage\"])) ? $_REQUEST[\"groupspage\"] :1;\r\n\t$limitvalue = $page * $limit - ($limit); \r\n\t$result = $xdb->GetAll(\"SELECT * FROM \".X1_prefix.X1_DB_mapgroups);\r\n\t$totalgroups = count($result);\r\n\t$c =\"<table class='\".X1plugin_admintable.\"' width='100%'>\r\n\t<thead class='\".X1plugin_tablehead.\"'>\r\n\t\t<tr>\r\n\t\t\t<th colspan='4' align='left'>\".XL_amapgroups_add.\"</th>\r\n\t\t\t<th>\".XL_save.\"</th>\r\n\t\t</tr>\r\n </thead>\r\n <tbody class='\".X1plugin_tablebody.\"'>\r\n\t\t<tr>\r\n\t\t\t<td class='alt1' width='96%' colspan='4'>\r\n\t\t\t\t<form method='post' action='\".X1_adminpostfile.\"' style='\".X1_formstyle.\"'>\r\n\t\t\t\t\t<input type='int' value='2' size='2' name='num_mapgroups'>\r\n\t\t\t\t\t<input type='image' title='\".XL_amapgroups_add.\"' src='\".X1_imgpath.X1_addimage.\"'>\r\n\t\t\t\t\t<input name='\".X1_actionoperator.\"' type='hidden' value='addmapgroups''>\r\n\t\t\t\t</form>\r\n\t\t\t</td>\r\n\t\t\t<td class='alt2' width='4%' align='center'>\r\n\t\t\t\t<form action='\".X1_adminpostfile.\"' method='POST' style='\".X1_formstyle.\"'>\r\n\t\t\t\t<input type='image' title='\".XL_save.\"' src='\".X1_imgpath.X1_saveimage.\"'>\r\n\t\t\t</td>\r\n\t\t</tr>\r\n\t\t</tbody>\r\n\t\t<thead class='\".X1plugin_tablehead.\"'>\r\n\t\t\t<tr>\r\n\t\t\t\t<th>\".XL_amapgroups_id.\"</th>\r\n\t\t\t\t<th>\".XL_amapgroups_name.\"</th>\r\n\t\t\t\t<th>\".XL_amapgroups_contents.\"</th>\r\n\t\t\t\t<th>\".XL_amapgroups_edit.\"</th>\r\n\t\t\t\t<th><img src='\".X1_imgpath.X1_delimage.\"' title='\".XL_delete.\"' border='0'></td>\r\n\t\t\t</tr>\r\n </thead>\r\n <tbody class='\".X1plugin_tablebody.\"'>\";\r\n\t$rows = $xdb->GetAll(\"SELECT * FROM \".X1_prefix.X1_DB_mapgroups.\" ORDER BY id LIMIT 500\");\r\n\t$count = 0;\r\n\tif($rows){\r\n\t\tforeach($rows AS $row){\r\n\t\t\t$tents = explode(\",\",$row[2]);\r\n\t\t\t$tents = array_chunk($tents, 3);\r\n\t\t\tif(is_array($tents))$contents = implode(\",\", X1_mapid2names($tents[0]));\r\n\t\t\t$c .= \"<tr>\r\n\t\t\t\t\t<td class='alt1'><input type='text' name='nlv_\".$count.\"[]' value='\".$row[0].\"' readonly size='2'></td>\r\n\t\t\t\t\t<td class='alt2'><input type='text' name='nlv_\".$count.\"[]' value='\".$row[1].\"' size='30'></td>\r\n\t\t\t\t\t<td class='alt1'>$contents</td>\r\n\t\t\t\t\t<td class='alt2'><a href='\".$_SERVER['SCRIPT_NAME'].\"?\".X1_linkactionoperator.\"=addmapstogroup&amp;groupid=$row[0]'>\".XL_edit.\"</a></td>\r\n\t\t\t\t\t<td class='alt1' align='center'><input type='checkbox' name='nlv_\".$count.\"[]' value='checked'>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</tr>\";\r\n\t\t\t\t$count++;\r\n\t\t}\r\n\t}else{\r\n\t\t$c .= \"<tr><td colspan='6'>\".XL_amapgroups_none.\"</td></tr>\";\r\n\t}\r\n\t\t$c .= \"\r\n\t\t\t</tbody>\r\n <tfoot class='\".X1plugin_tablefoot.\"'>\r\n <tr>\r\n <td colspan='6'>&nbsp;\r\n <input type='hidden' name='\".X1_actionoperator.\"' value='updatemapgroups'>\r\n <input type='hidden' name='num_rows' value='$count'>\r\n </td>\r\n </tr>\r\n </tfoot>\r\n </table>\r\n\t</form>\";\r\n\treturn X1plugin_output($c, 1);\r\n}", "function setGroup( $group )\r\n {\r\n if ( is_a( $group, \"eZUserGroup\" ) )\r\n {\r\n $this->GroupID = $group->id();\r\n }\r\n else if ( is_numeric( $group ) )\r\n {\r\n $this->GroupID = $group;\r\n }\r\n }", "public function hide_group_1_at_course_level() {\n\n global $USER, $DB;\n\n $coursesetting = new stdClass();\n $coursesetting->userid = $USER->id;\n $coursesetting->tablename = 'course';\n $coursesetting->instanceid = $this->course->id;\n $coursesetting->display = 1;\n $coursesetting->id = $DB->insert_record('block_ajax_marking', $coursesetting);\n $coursegroupsetting = new stdClass();\n $coursegroupsetting->configid = $coursesetting->id;\n $coursegroupsetting->groupid = $this->group1->id;\n $coursegroupsetting->display = 0;\n $coursegroupsetting->id =\n $DB->insert_record('block_ajax_marking_groups', $coursegroupsetting);\n }", "function index( $page = 0 )\n{\n$this->model_group->pagination( TRUE );\n$data_info = $this->model_group->lister( $page );\n$fields = $this->model_group->fields( TRUE );\n\n$this->template->assign( 'pager', $this->model_group->pager );\n$this->template->assign( 'group_fields', $fields );\n$this->template->assign( 'group_data', $data_info );\n$this->template->assign( 'table_name', 'group' );\n$this->template->assign( 'template', 'list_group' );\n$this->template->display( 'frame_admin.tpl' );\n}", "function init__templates_pagination()\n{\n global $INCREMENTAL_ID_GENERATOR;\n $INCREMENTAL_ID_GENERATOR = 1;\n}", "private function render_pid_area(MJKGenToolsPage $page): void {\r\n $pid = $page->pid();\r\n if (empty($pid)) $pid = self::default_pid;\r\n\r\n echo '<b>WP page</b>';\r\n $this->render_pid_dropdown($page, $pid);\r\n $this->render_view_button($page);\r\n $this->render_edit_button($page);\r\n $this->render_gen_button($page);\r\n\r\n if (get_class($page) == 'MJKGenToolsPageSwitch') {\r\n echo '<br><br>';\r\n\t $this->render_preload_option($page);\r\n }\r\n \r\n echo '<br><br>';\r\n $this->render_last_gen_report($page);\r\n $this->render_rev_report($page, $pid);\r\n }", "public function groups() {\n\t\t//variabel\n\t\t$data['datas'] = $this->PbkGroups_model->get_all();\n\t\t\n\t\t$template_data['title'] = 'SMS Gateway ';\n\t\t$template_data['subtitle'] = 'Kirim SMS';\n $template_data['crumb'] = ['SMS Gateway' => 'smsgateway', 'SMS Groups' => 'smsgateway/kirimsms/groups',];\n\t\t//view\n\t\t$this->layout->set_wrapper('groups_form', $data);\n\t\t$this->layout->auth();\n\t\t$this->layout->render('admin', $template_data);\n\t}", "private function setCustomerGroupIds()\n {\n $this->data['customer_group_ids'] = $this->getAvailableCustomerGroupIds();\n }", "public function PIDupinRootlineConditionMatchesCurrentPageIdWhileSavingNewPage() {}", "public function page_init () {\n foreach ($this->accounts as $key => $account) {\n register_setting('option_group', $account. '_account');\n }\n\n // Add section for the page.\n add_settings_section(\n 'social_accounts', // Id section.\n 'Social account settings', // Title page.\n [$this, 'create_page_info'], // Callback.\n 'settings_social_accounts' // Name of the option page SLUG.\n );\n\n foreach ($this->accounts as $key => $account) {\n $label = ucfirst($account) .' account';\n $function = 'create_'. $account .'_input';\n $account .= '_account';\n \n $this->$function = function ($account) {\n ?>\n <input type=\"text\"\n id=\"<?= $account ?>\"\n name=\"<?= $account ?>\"\n value=\"<?= $this->options[$account] ?>\"\n />\n <?php\n };\n add_settings_field(\n $account,\n $label,\n [$this, $function],\n 'settings_social_accounts',\n 'social_accounts',\n $account\n );\n }\n }", "abstract public function bootStartTabSet($group, $attr = array());", "public function setId()\n\t{\n\t}", "public function setup() {\n\t\tparent::setup();\n\t\tincrease_time_limit_to();\n\n\t\t$restart = $this->currentStep == 0;\n\n\t\tif ($restart) {\n\t\t\t$this->pagesToProcess = DB::query('SELECT \"ID\" FROM SiteTree_Live WHERE ShowInSearch=1')->column();\n\t\t}\n\t}", "public function setNameAndId() {}", "public function onSaveSuccess($type, $id) {\nglobal $_LW;\nif ($_LW->page=='groups_edit') { // if on the group editor page\n\tif ($type=='groups') { // if saving a group\n\t\tif ($this->initEMS()) { // if EMS loaded\n\t\t\t$_LW->setCustomFields($type, $id, ['ems_group'=>@$_LW->_POST['ems_group']], []); // store the value entered for ems_group\n\t\t};\n\t};\n};\n}" ]
[ "0.6990773", "0.6703438", "0.65744865", "0.64260316", "0.62781715", "0.6122495", "0.60126436", "0.600566", "0.5939144", "0.5939144", "0.5909153", "0.58438694", "0.5794296", "0.5728743", "0.5701655", "0.5695755", "0.5688037", "0.56738806", "0.56320894", "0.5621844", "0.5611895", "0.56112134", "0.56045353", "0.5538263", "0.55373716", "0.5501378", "0.54701006", "0.54557896", "0.53959996", "0.53887933", "0.5388776", "0.53440624", "0.53416455", "0.5329087", "0.5325206", "0.53187567", "0.530953", "0.52984643", "0.5292271", "0.5269342", "0.52628803", "0.5233844", "0.52197254", "0.5210709", "0.5210192", "0.5208806", "0.52075696", "0.52040875", "0.52029216", "0.52001524", "0.5193857", "0.51894075", "0.5188507", "0.51741964", "0.5171018", "0.51665574", "0.51636755", "0.5131204", "0.5131204", "0.51172817", "0.5115797", "0.5108704", "0.5090641", "0.5089838", "0.50897413", "0.5089503", "0.5086473", "0.50838184", "0.5080113", "0.5063958", "0.5059453", "0.50545526", "0.50520104", "0.504135", "0.5037782", "0.50367224", "0.5032065", "0.5026557", "0.5026388", "0.50222385", "0.5016699", "0.5010732", "0.50087357", "0.50087357", "0.5008473", "0.50057304", "0.50036305", "0.49913836", "0.49885178", "0.49865717", "0.49786818", "0.4976291", "0.4976188", "0.4975857", "0.49723652", "0.49688068", "0.49651518", "0.4953109", "0.49526381", "0.4951522", "0.49418923" ]
0.0
-1
Set/check the Grouping page category id
public function setCategoryId($categoryId = NULL) { $this->categoryId = isset($categoryId) && is_numeric($categoryId) && $categoryId > 0 ? (int) $categoryId : NULL; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setID($cid) { if($cid == faq_build_clean_input($cid,\"id\")) $this->category_id = $cid; }", "public function setCategory() {\n /**\n *\n * @todo make a separate config file for the default category ?!\n */\n $defaultCategory = 1;\n $category = Category::find()->all();\n $newCat = $this->strProcessing($this->category);\n $k = NULL;\n if (!empty($newCat)) {\n foreach ($category as $value) {\n $cat = explode(',', $value['synonyms']);\n $cat = array_map(array($this, 'strProcessing'), $cat);\n $k = array_search($newCat, $cat);\n if ($k !== NULL && $k !== FALSE) {\n $k = $value['id'];\n break;\n }\n }\n }\n if ($k) {\n $this->category = $k;\n } else {\n $this->category = $defaultCategory;\n }\n return TRUE;\n }", "public function set_category_id($category)\n {\n parent::set_category(0);\n }", "private function _storeCreatedCategoryId() {\r\n $I = $this->BackendTester;\r\n\r\n $I->click('.row-title');\r\n\r\n $tagId = null;\r\n\r\n $url = $I->grabFromCurrentUrl();\r\n\r\n $url = substr($url, strpos($url, '?') + 1);\r\n\r\n parse_str($url, $array);\r\n\r\n if (isset($array['tag_ID']))\r\n $tagId = $array['tag_ID'];\r\n\r\n $I->setVar('category_id', $tagId);\r\n\r\n return $tagId;\r\n }", "public function addCategoryToGroupById($gorup_id, $category_id);", "public function setId($id){\n $this->_sub_cat_id = $id;\n }", "public function setCmsCategoryId($val){\n $this->CmsCategoryId=$val;\n }", "protected function set_category_ids() {\n\n\t\t$this->category_ids = isset( $_GET['category_ids'] ) ? array_filter( array_map( 'absint', (array) $_GET['category_ids'] ) ) : array();\n\t}", "public function setCategoryId($nCategory_id)\n {\n $this->category_id=$nCategory_id;\n }", "private function getCategoryID() {\n return 0;\n }", "public function getIdCategory(){\n return $this->idCategory;\n }", "public function getCategory_id()\n {\n return $this->category_id;\n }", "public function getCategory_id()\n {\n return $this->category_id;\n }", "public function getCategory_id()\n {\n return $this->category_id;\n }", "public function setCategory($value)\n {\n $this->setItemValue('category', ['id' => (int)$value]);\n }", "function selectCategory($cat) {\n global $catid;\n if (is_numeric($cat) ) {\n $catid = intval($cat);\n } else {\n $catid = getCatIDFromName($cat);\n }\n}", "function setup_cat()\n {\n $this->ipsclass->DB->simple_construct( array( \"select\" => 'perms_view, def_view, id, name', 'from' => 'gallery_categories', 'where' => \"id={$this->ipsclass->input['cat']}\" ) );\n $this->ipsclass->DB->simple_exec(); \n $cat = $this->ipsclass->DB->fetch_row();\n\n // Are we allowed to view this category?\n if( ! $this->ipsclass->check_perms( $cat['perms_view'] ) )\n {\n $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission' ) ); \n }\n\n return $cat;\n }", "public function setCategoryIdAttribute($value)\n\t{\n\t\t$this->attributes['category_id'] = ($value) ? $value : null;\n\t}", "function set_acl_category($category)\n {\n $this->acl_category = $category;\n foreach ($this->plugins as $name => $obj) {\n $this->plugins[$name]->set_acl_category($category);\n }\n }", "private function getParamCatId()\n {\n $catid = $this->getMenuParams()->get( 'catid', 0 );\n return (int)$catid;\n }", "public function SaveGroupCategory() {\n\t\t\ttry {\n\t\t\t\t// Update any fields for controls that have been created\n\t\t\t\tif ($this->lstGroup) $this->objGroupCategory->GroupId = $this->lstGroup->SelectedValue;\n\t\t\t\tif ($this->calDateRefreshed) $this->objGroupCategory->DateRefreshed = $this->calDateRefreshed->DateTime;\n\t\t\t\tif ($this->txtProcessTimeMs) $this->objGroupCategory->ProcessTimeMs = $this->txtProcessTimeMs->Text;\n\n\t\t\t\t// Update any UniqueReverseReferences (if any) for controls that have been created for it\n\n\t\t\t\t// Save the GroupCategory object\n\t\t\t\t$this->objGroupCategory->Save();\n\n\t\t\t\t// Finally, update any ManyToManyReferences (if any)\n\t\t\t} catch (QCallerException $objExc) {\n\t\t\t\t$objExc->IncrementOffset();\n\t\t\t\tthrow $objExc;\n\t\t\t}\n\t\t}", "function insertCate($category, $add_group) {\r\t\t$sql = \"INSERT INTO category (c_name, c_main_id) VALUES ('\".$category.\"', '\".$add_group.\"')\";\r\t\t$this->db->query($sql);\r\t\t\r\t\tif ($this->db->insert_id() > 0)\r\t\t\treturn $this->db->insert_id();\r\t\telse\r\t\t\treturn FALSE;\r\t}", "private function set_categorieId(int $categorieId)\n {\n $this->_categorieId = $categorieId;\n }", "function category($id_only=false) {\n\t\t\tif($id_only) {\n\t\t\t\treturn $id;\n\t\t\t}\n\t\t\treturn '//category stub';\n\t\t}", "public function get_category_id() {\n return (int)get_config('block_homework_diary', 'course_category');\n }", "function setCategory($id, $category){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//category value of a question in the database\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Accepts 2 parameters, the question ID value, and the new value (int)\r\n\t\t$query= \"UPDATE `tbl_question` SET `category` = '$category' WHERE `tbl_question`.`question_id` =$id LIMIT 1 ;\";\r\n\t\t$result = $this->mdb2->query($query) or die('An unknown error occurred while updating the data');\r\n\t\tif(MDB2::isError($result)){\r\n\t\t\treturn false;\r\n\t\t}else{\r\n\t\t\treturn true;\r\n\t\t}\t\r\n\t}", "function set_accordion_id() {\n\t\t\t$this->current_accordion_slug++;\n\t\t}", "private function newId() {\n $exist_nums = App::getDb()->query('SELECT idCat FROM categories ORDER BY idCat');\n $exist_nums = $exist_nums->fetchAll(PDO::FETCH_OBJ);\n $new_id = 1;\n foreach($exist_nums as $nums) {\n if($nums->idCat != $new_id) break;\n $new_id++;\n }\n return $new_id;\n }", "public function get_category_id(){\n\t\treturn $this->_categoryid;\n\t}", "public function getCategoryId()\n {\n if ($category = Mage::registry('current_category')) {\n return $category->getId();\n }\n return false;\n }", "public function getIdCategoryDefault(){\n\n /*TODO refactor*/ \n $idDefault = '3';\n\n $rootCategoryId = Mage::app()->getStore(\"default\")->getRootCategoryId() ;\n\n if(isset($rootCategoryId) && $rootCategoryId > 0)\n $idDefault = $rootCategoryId + 1 ;\n\n return $idDefault ;\n }", "function addCategory($object) {\n $object->Item->ShopId = 'yourReturnedCategoryIdOnMarketplace_'.rand(1000, 9999); \n}", "function olc_set_groups($categories_id,$shops) {\n\t$products_query=olc_db_query(\"SELECT products_id FROM \".TABLE_PRODUCTS_TO_CATEGORIES.\"\n\twhere categories_id='\".$categories_id.APOS);\n\twhile ($products=olc_db_fetch_array($products_query)) {\n\t\tolc_db_query(SQL_UPDATE.TABLE_PRODUCTS.\" SET group_ids='\".$shops.\"'\n\t\twhere products_id='\".$products['products_id'].APOS);\n\t}\n\t// set status of categorie\n\tolc_db_query(SQL_UPDATE . TABLE_CATEGORIES . \" set group_ids = '\".$shops.\"'\n\twhere categories_id = '\" . $categories_id . APOS);\n\t// look for deeper categories and go rekursiv\n\t$categories_query=olc_db_query(\"SELECT categories_id FROM \".TABLE_CATEGORIES.\"\n\twhere parent_id='\".$categories_id.APOS);\n\twhile ($categories=olc_db_fetch_array($categories_query)) {\n\t\tolc_set_groups($categories['categories_id'],$shops);\n\t}\n\n}", "protected function _initCatagory()\r\n\t{\r\n\t\tMage::dispatchEvent('vendor_catalog_controller_category_init_before', array('controller_action' => $this));\r\n\t\t$categoryId = (int) $this->getRequest()->getParam('id', false);\r\n\t\tif (!$categoryId) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t$category = Mage::getModel('vendorscategory/category')\r\n\t\t->load($categoryId);\r\n\t\tif (!Mage::helper('vendorscategory')->canShow($category)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif(!Mage::registry(\"vendor_id\") && !Mage::registry(\"vendor\") && !Mage::registry(\"current_vendor\")){\r\n\t\t\t//echo $category->getVendorId();exit;\r\n\t\t\t$vendorObj = Mage::getModel('vendors/vendor')->load($category->getVendorId());\r\n\r\n\t\t\t//var_dump($vendorObj->getData());exit;\r\n\t\t\tMage::register('vendor_id', $vendorObj->getVendorId());\r\n\t\t\tMage::register('vendor', $vendorObj);\r\n\t\t\tMage::register('current_vendor', $vendorObj);\r\n\t\t}\r\n\t\t\r\n\t\tMage::register('current_vendor_category', $category);\r\n\t\tMage::register('current_vendor_entity_key', $category->getPath());\r\n\t\ttry {\r\n\t\t\tMage::dispatchEvent(\r\n\t\t\t'vendor_catalog_controller_category_init_after',\r\n\t\t\tarray(\r\n\t\t\t'category' => $category,\r\n\t\t\t'controller_action' => $this\r\n\t\t\t)\r\n\t\t\t);\r\n\t\t} catch (Mage_Core_Exception $e) {\r\n\t\t\tMage::logException($e);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\r\n\t\treturn $category;\r\n\t}", "function setIssueCategory( $sessionID, $issueID, $category ) {\r\n\t\tif($this->userCanSetIssueCategory( $sessionID, $issueID )){\r\n\t \t\t$userID = $_SESSION[ 'userid' ];\r\n\t\t\t$this->sendIssueAlerts($issueID, 'Issue level changed.');\r\n\t\t\t$query=\"UPDATE issues SET Modifier='$userID', Category='$category' WHERE ID='$issueID'\";\r\n\t\t\t$result=mysql_query($query);\r\n\t\t\treturn $result;\r\n\t\t}\r\n\t}", "function the_category_ID($display = \\true)\n {\n }", "function alaya_cat_id($cate_slug){\n $category=get_term_by('slug',$cate_slug,'category');\n if($category){\n\t $cate_id = $category->term_id;\n\t $cate_id = apply_filters('alaya_cat_id', $cate_id);\n\t return $cate_id;\n\t}\n}", "public function getIdKategoria() {\n return $this->idKategoria;\n }", "public function getId_cat()\n {\n return $this->id_cat;\n }", "private function set_accessory_catid_arr()\n {\n $this->accessory_catid_arr = $this->sc['complementaryAccModel']->getAccessoryCatidArr();\n }", "function get_cat_ID($cat_name)\n {\n }", "public function setCategory($aId, $aCategory) {\n list($lId, $lCategory) = array(intval($aId), $aCategory);\n \n $lSql = 'SELECT count(*) FROM `al_cms_ref_category` WHERE `content_id`='.esc($lId);\n $lCount = CCor_Qry::getInt($lSql);\n if($lCount < 1) {\n // insert new category reference\n $lSql = 'INSERT INTO `al_cms_ref_category` (`content_id`, `category`) VALUES ('.esc($lId).', '.esc($lCategory).')';\n CCor_Qry::exec($lSql);\n }\n }", "function fs_get_category_id( $cat_name ) {\r\n\t$term = get_term_by( 'name', $cat_name, 'category' );\r\n\treturn $term->term_id;\r\n}", "public function get_categorieId()\n {\n return $this->_categorieId;\n }", "public function addMultipleCategoriesToGroup();", "public function getIdCat()\n {\n return $this->id_cat;\n }", "public function stepCategory()\n {\n global $rlSmarty, $rlCategories, $page_info, $account_info, $sError, $config;\n\n parent::step();\n\n $GLOBALS['rlHook']->load('addListingGetCats');\n\n // Define allowed types\n $allowed_type_keys = $account_info['Abilities'];\n\n // \"Individual add listing page\" mode\n if ($page_info['Key'] != 'add_listing') {\n $individual_type_key = substr($page_info['Key'], 3);\n\n if (in_array($individual_type_key, $allowed_type_keys)) {\n $allowed_type_keys = array($individual_type_key);\n } else {\n $sError = true;\n }\n }\n\n // Adapt listing types array\n $allowed_types = $GLOBALS['rlListingTypes']->adaptTypes($allowed_type_keys);\n $rlSmarty->assign_by_ref('allowed_types', $allowed_types);\n\n // Existing membership plan mode\n $this->existingMembershipHandler($account_info);\n\n // Remove unnecessary steps\n if (!$this->singleStep) {\n unset($this->steps['photo'], $this->steps['checkout']);\n }\n }", "public function setCategory($id, $category)\n {\n return false;\n }", "protected function _initCategory() {\n $categoryId = (int) $this->getRequest()->getParam('id', false);\n $storeId = (int) $this->getRequest()->getParam('store');\n\n $category = Mage::getModel('catalog/category');\n $category->setStoreId($storeId);\n\n if ($categoryId) {\n $category->load($categoryId);\n if ($storeId) {\n $rootId = Mage::app()->getStore($storeId)->getRootCategoryId();\n if (!in_array($rootId, $category->getPathIds())) {\n $this->_redirect('*/*/', array('_current' => true, 'id' => null));\n return false;\n }\n }\n }\n\n Mage::register('category', $category);\n Mage::register('current_category', $category);\n\n return $category;\n }", "public function changeCategoryToUnknown()\n {\n $sql = 'UPDATE posts SET category_id=1 WHERE category_id=:id';\n return $this->db->request($sql, ['id' => $_GET['id']], 'posts');\n }", "function setGroupsToCategory($categoryId) {\n\n\t\tforeach ($this->getGroups() as $group) {\n\n\t\t\t//verificamos si la relacion no existe\n\t\t\t$exist = BaseQuery::create(\"GroupCategory\")\n\t\t\t\t\t\t\t\t\t->filterByCategoryid($categoryId)\n\t\t\t\t\t\t\t\t\t->filterByGroupid($group->getGroupId())\n\t\t\t\t\t\t\t\t\t->findOne();\n\t\t\tif (empty($exist)) {\n\t\t\t\t$groupCategory = new GroupCategory();\n\t\t\t\t$groupCategory->setGroupId($group->getGroupId());\n\t\t\t\t$groupCategory->setCategoryId($categoryId);\n\t\t\t\t$groupCategory->save();\n\t\t\t}\n\n\t\t}\n\t\treturn;\n\t}", "function my_separate_category() {\n return 1;\n }", "function get_omfg_category_id($cat_name){\n\t$term = get_term_by('name', $cat_name, 'omfg_mobile_themes');\n\treturn $term->term_id;\n}", "public function getCatId()\n {\n return $this->getParamCatId();\n }", "public function getCategoryId() { return $this->categoryId; }", "function setCategory($object) { \n /* you can itentify the item with $object->Item->ShopId */ \n}", "public function isCategoryPage();", "protected function _initCategory()\r\n {\r\n $categoryId = (int)$this->getRequest()->getParam('id', FALSE);\r\n $storeId = (int)$this->getRequest()->getParam('store');\r\n\r\n $category = Mage::getModel('catalog/category');\r\n $category->setStoreId($storeId);\r\n\r\n if ($categoryId) {\r\n $category->load($categoryId);\r\n if ($storeId) {\r\n $rootId = Mage::app()->getStore($storeId)->getRootCategoryId();\r\n if (!in_array($rootId, $category->getPathIds())) {\r\n $this->_redirect('*/*/', array('_current' => TRUE, 'id' => NULL));\r\n return FALSE;\r\n }\r\n }\r\n }\r\n\r\n Mage::register('category', $category);\r\n Mage::register('current_category', $category);\r\n\r\n return $category;\r\n }", "function wp_link_category_checklist($link_id = 0)\n {\n }", "function setCategory($value) \n {\n return $this->instance->setcategory($value);\n }", "public function testSetGetCurrentCategoryId()\n {\n $repository = $this->getManager()->getRepository('AcmeTestBundle:Category');\n\n $service = new CategoryService($repository);\n $service->setRepository($repository);\n\n $id = 'testid';\n\n $service->setCurrentCategoryId($id);\n $this->assertEquals($id, $service->getCurrentCategoryId());\n }", "public function categorylist($c){\n $this->cat_id = $c; \n }", "function sportal_category()\n{\n\tglobal $smcFunc, $context, $scripturl, $modSettings, $txt;\n\n\tloadTemplate('PortalCategories');\n\n\t$category_id = !empty($_REQUEST['category']) ? $_REQUEST['category'] : 0;\n\n\t$context['category'] = sportal_get_categories($category_id, true, true);\n\n\tif (empty($context['category']['id']))\n\t\tfatal_lang_error('error_sp_category_not_found', false);\n\n\t$request = $smcFunc['db_query']('','\n\t\tSELECT COUNT(*)\n\t\tFROM {db_prefix}sp_articles\n\t\tWHERE status = {int:article_status}\n\t\t\tAND {raw:article_permissions}\n\t\t\tAND id_category = {int:current_category}\n\t\tLIMIT {int:limit}',\n\t\tarray(\n\t\t\t'article_status' => 1,\n\t\t\t'article_permissions' => sprintf($context['SPortal']['permissions']['query'], 'permissions'),\n\t\t\t'current_category' => $context['category']['id'],\n\t\t\t'limit' => 1,\n\t\t)\n\t);\n\tlist ($total_articles) = $smcFunc['db_fetch_row']($request);\n\t$smcFunc['db_free_result']($request);\n\n\t$per_page = min($total_articles, !empty($modSettings['sp_articles_per_page']) ? $modSettings['sp_articles_per_page'] : 10);\n\t$start = !empty($_REQUEST['start']) ? (int) $_REQUEST['start'] : 0;\n\t$total_pages = $per_page > 0 ? ceil($total_articles / $per_page) : 0;\n\t$current_page = $per_page > 0 ? ceil($start / $per_page) : 0;\n\n\tif ($total_articles > $per_page)\n\t{\n\t\t$context['page_index'] = constructPageIndex($context['category']['href'] . ';start=%1$d', $start, $total_articles, $per_page, true);\n\n\t\tif ($current_page > 0)\n\t\t\t$context['previous_start'] = ($current_page - 1) * $per_page;\n\t\tif ($current_page < $total_pages - 1)\n\t\t\t$context['next_start'] = ($current_page + 1) * $per_page;\n\t}\n\n\t$context['articles'] = sportal_get_articles(0, true, true, 'spa.id_article DESC', $context['category']['id'], $per_page, $start);\n\n\tforeach ($context['articles'] as $article)\n\t{\n\t\tif (($cutoff = $smcFunc['strpos']($article['body'], '[cutoff]')) !== false)\n\t\t\t$article['body'] = $smcFunc['substr']($article['body'], 0, $cutoff);\n\n\t\t$context['articles'][$article['id']]['preview'] = parse_bbc($article['body']);\n\t\t$context['articles'][$article['id']]['date'] = timeformat($article['date']);\n\t}\n\n\t$context['linktree'][] = array(\n\t\t'url' => $scripturl . '?category=' . $context['category']['category_id'],\n\t\t'name' => $context['category']['name'],\n\t);\n\n\t$context['page_title'] = $context['category']['name'];\n\t$context['sub_template'] = 'view_category';\n}", "function get_category_id( $cat_name ){\n\t$term = get_term_by( 'name', $cat_name, 'category' );\n\treturn $term->term_id;\n}", "function get_category_id( $cat_name ){\n\t$term = get_term_by( 'name', $cat_name, 'category' );\n\treturn $term->term_id;\n}", "public function getCat_id() {\n return $this->cat_id;\n }", "function set_category_status( $category_id )\n\t{\n\t\t$status = $this -> get_status( $category_id );\n\t\t$status = $status == 1 ? 0 : 1;\n\t\t$q = \"UPDATE title_dev_categories SET status = \".$status.\" WHERE category_id = \".$category_id;\n\t\t$r = $this -> db -> updateRecord( $q );\n\t\tif( $r )\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "function setGroupsToCategory($categoryId) {\r\n\t\trequire_once(\"AffiliateGroupCategoryPeer.php\"); \t\r\n\t\tforeach ($this->getGroups() as $group) {\r\n\t\t\t$groupCategory = new AffiliateGroupCategory();\r\n\t\t\t$groupCategory->setGroupId($group->getGroupId());\r\n\t\t\t$groupCategory->setCategoryId($categoryId);\r\n\t\t\t$groupCategory->save();\r\n\t\t}\r\n\t\treturn;\r\n\t}", "function plugin_itilcategorygroups_check_config() {\n return true;\n}", "function Inscription_Handle_Collaborations_Group($group)\n {\n if (empty($group)) { $group=\"Collaborations\"; }\n \n if (empty($this->ItemDataSGroups[ $group ]))\n {\n $this->ItemDataSGroups[ $group ]=\n $this->ReadPHPArray(\"System/Inscriptions/SGroups.\".$group.\".php\");\n }\n\n return $group;\n }", "function setSectionID( $value )\r\n {\r\n $this->SectionID = $value;\r\n }", "public function setCategory($category)\n {\n if(strlen($category) <= 25 && strlen($category) > 0 && preg_match('#^[a-zA-Z- ]*$#', $category)) {\n $this->category = $category;\n }\n }", "public function hide_group_1_at_course_level() {\n\n global $USER, $DB;\n\n $coursesetting = new stdClass();\n $coursesetting->userid = $USER->id;\n $coursesetting->tablename = 'course';\n $coursesetting->instanceid = $this->course->id;\n $coursesetting->display = 1;\n $coursesetting->id = $DB->insert_record('block_ajax_marking', $coursesetting);\n $coursegroupsetting = new stdClass();\n $coursegroupsetting->configid = $coursesetting->id;\n $coursegroupsetting->groupid = $this->group1->id;\n $coursegroupsetting->display = 0;\n $coursegroupsetting->id =\n $DB->insert_record('block_ajax_marking_groups', $coursegroupsetting);\n }", "public function addCategoryToGroupByName($gorup_name, $category_name);", "public function getActiveCategoryId() {\n\t\tif ($this->request->hasArgument(LinkUtility::CATEGORY)) {\n\t\t\t$categoryId = $this->request->getArgument(LinkUtility::CATEGORY);\n\t\t\tif (ctype_digit($categoryId)) {\n\t\t\t\treturn $categoryId;\n\t\t\t}\n\t\t}\n\t\treturn FALSE;\n\t}", "public function getCategoria_id()\n {\n return $this->categoria_id;\n }", "function get_category_id() {\n\tglobal $wpdb;\n\n\t$sql = \"SELECT term_id\n\t\tFROM $wpdb->terms\n\t\tWHERE name LIKE 'webonary'\";\n\n\t$catid = $wpdb->get_var( $sql);\n\n\treturn $catid;\n}", "private function catId($cat) {\n\t\t$id = $this->db->table('nsbulletin_categories')\n\t\t\t\t->where([\n\t\t\t\t\t['category', '=', $cat],\n\t\t\t\t\t['nodeid', '=', $this->localNode->nodeid()]\n\t\t\t\t\t])\n\t\t\t\t->value('id');\n\t\n\t\tif($id) return $id;\n\t\n\t\treturn $this->db->table('nsbulletin_categories')\n\t\t\t->insertGetId(['category' => $cat, 'nodeid' => $this->localNode->nodeid()]);\n\t}", "public function published_category($category_id){\n \n DB::table('tbl_category')\n ->where('category_id', $category_id)\n ->update(['publication_status' => 1]); \n return Redirect::to('/manage-category');\n }", "public function setCategoryByPostID($id)\n {\n if ( $this->category ) return;\n $categories = get_the_category( $id );\n $this->category = current( $categories ); // @todo Warning: what if the post has more than 1 categories?\n if ( empty($this->category) ) {\n wp_die(\"Error: Category(slug) - does not exists by that post id: $id\");\n }\n $this->loadConfig();\n }", "public function getCategoryId();", "private function setCustomerGroupValue()\n {\n $value = $this->getData(self::$groupAttributeCode);\n try {\n $group = $this->groupRepository->getById($value);\n $this->setCustomAttribute(self::$groupAttributeCode, $group->getCode());\n } catch (NoSuchEntityException $e) {\n $this->setCustomAttribute(self::$groupAttributeCode, 'N/A');\n }\n }", "public function getId(){\n return $this->_sub_cat_id;\n }", "public function getIdCategorie(): int\n {\n return $this->id_categorie;\n }", "public function setPageID(){/*ACTUALLY NOT DEFINED*/}", "public function getIdCategoria()\n {\n return $this->id_categoria;\n }", "public function getIdCategoria()\n {\n return $this->id_categoria;\n }", "public function category(){\n\t\t$_error = \"Select Category\";\n\t\treturn $_error;\n\t}", "public function getIdcategoria()\n {\n return $this->idcategoria;\n }", "public function getId_categorie()\n {\n return $this->id_categorie;\n }", "protected function _initCategory()\n {\n $category = $this->request->getPostValue('category');\n if (!$category) {\n return false;\n }\n\n try {\n $category = $this->categoryFactory->create()->loadByAttribute('url_key',$category);\n } catch (NoSuchEntityException $e) {\n return false;\n }\n\n $category->setStoreId($this->_storeManager->getStore()->getId());\n return $category;\n }", "public function returnUpdateCat() {\n return $this->category_id;\n }", "public static function getCategoryId($category, $subcategory)\n {\n switch ($category) {\n case 'filmvideo':\n switch ($subcategory) {\n case 'animation':\n $category_id = self::CATEGORY_FILMVIDEO_ANIMATION;\n break;\n case 'animationserie':\n $category_id = self::CATEGORY_FILMVIDEO_ANIMATIONSERIE;\n break;\n case 'concert':\n $category_id = self::CATEGORY_FILMVIDEO_CONCERT;\n break;\n case 'documentaire':\n $category_id = self::CATEGORY_FILMVIDEO_DOCUMENTAIRE;\n break;\n case 'emissiontv':\n $category_id = self::CATEGORY_FILMVIDEO_EMISSIONTV;\n break;\n case 'film':\n $category_id = self::CATEGORY_FILMVIDEO_FILM;\n break;\n case 'serietv':\n $category_id = self::CATEGORY_FILMVIDEO_SERIETV;\n break;\n case 'spectacle':\n $category_id = self::CATEGORY_FILMVIDEO_SPECTACLE;\n break;\n case 'sport':\n $category_id = self::CATEGORY_FILMVIDEO_SPORT;\n break;\n case 'videoclips':\n $category_id = self::CATEGORY_FILMVIDEO_VIDEOCLIP;\n break;\n default:\n $category_id = self::CATEGORY_FILMVIDEO;\n break;\n }\n break;\n case 'audio':\n switch ($subcategory) {\n case 'karaoke':\n $category_id = self::CATEGORY_AUDIO_KARAOKE;\n break;\n case 'musique':\n $category_id = self::CATEGORY_AUDIO_MUSIQUE;\n break;\n case 'podcastradio':\n $category_id = self::CATEGORY_AUDIO_PODCASTRADIO;\n break;\n case 'samples':\n $category_id = self::CATEGORY_AUDIO_SAMPLES;\n break;\n default:\n $category_id = self::CATEGORY_AUDIO;\n break;\n }\n break;\n case 'application':\n switch ($subcategory) {\n case 'autre':\n $category_id = self::CATEGORY_APPLICATION_AUTRE;\n break;\n case 'formation':\n $category_id = self::CATEGORY_APPLICATION_FORMATION;\n break;\n case 'linux':\n $category_id = self::CATEGORY_APPLICATION_LINUX;\n break;\n case 'macos':\n $category_id = self::CATEGORY_APPLICATION_MACOS;\n break;\n case 'smartphone':\n $category_id = self::CATEGORY_APPLICATION_SMARTPHONE;\n break;\n case 'tablette':\n $category_id = self::CATEGORY_APPLICATION_TABLETTE;\n break;\n case 'windows':\n $category_id = self::CATEGORY_APPLICATION_WINDOWS;\n break;\n default:\n $category_id = self::CATEGORY_APPLICATION;\n break;\n }\n break;\n case 'jeuvideo':\n switch ($subcategory) {\n case 'autre':\n $category_id = self::CATEGORY_JEUVIDEO_AUTRE;\n break;\n case 'linux':\n $category_id = self::CATEGORY_JEUVIDEO_LINUX;\n break;\n case 'macos':\n $category_id = self::CATEGORY_JEUVIDEO_MACOS;\n break;\n case 'microsoft':\n $category_id = self::CATEGORY_JEUVIDEO_MICROSOFT;\n break;\n case 'nintendo':\n $category_id = self::CATEGORY_JEUVIDEO_NINTENDO;\n break;\n case 'smartphone':\n $category_id = self::CATEGORY_JEUVIDEO_SMARTPHONE;\n break;\n case 'sony':\n $category_id = self::CATEGORY_JEUVIDEO_SONY;\n break;\n case 'tablette':\n $category_id = self::CATEGORY_JEUVIDEO_TABLETTE;\n break;\n case 'windows':\n $category_id = self::CATEGORY_JEUVIDEO_WINDOWS;\n break;\n default:\n $category_id = self::CATEGORY_JEUVIDEO;\n break;\n }\n break;\n case 'ebook':\n switch ($subcategory) {\n case 'audio':\n $category_id = self::CATEGORY_EBOOK_AUDIO;\n break;\n case 'bds':\n $category_id = self::CATEGORY_EBOOK_BDS;\n break;\n case 'comics':\n $category_id = self::CATEGORY_EBOOK_COMICS;\n break;\n case 'livres':\n $category_id = self::CATEGORY_EBOOK_LIVRES;\n break;\n case 'mangas':\n $category_id = self::CATEGORY_EBOOK_MANGAS;\n break;\n case 'presse':\n $category_id = self::CATEGORY_EBOOK_PRESSE;\n break;\n default:\n $category_id = self::CATEGORY_EBOOK;\n break;\n }\n break;\n case 'emulation':\n switch ($subcategory) {\n case 'emulateurs':\n $category_id = self::CATEGORY_EMULATION_EMULATEURS;\n break;\n case 'roms':\n $category_id = self::CATEGORY_EMULATION_ROMS;\n break;\n default:\n $category_id = self::CATEGORY_EMULATION;\n break;\n }\n break;\n case 'gps':\n switch ($subcategory) {\n case 'applications':\n $category_id = self::CATEGORY_GPS_APPLICATIONS;\n break;\n case 'cartes':\n $category_id = self::CATEGORY_GPS_CARTES;\n break;\n case 'divers':\n $category_id = self::CATEGORY_GPS_DIVERS;\n break;\n default:\n $category_id = self::CATEGORY_GPS;\n break;\n }\n break;\n case 'xxx':\n switch ($subcategory) {\n case 'films':\n $category_id = self::CATEGORY_XXX_FILMS;\n break;\n case 'hentai':\n $category_id = self::CATEGORY_XXX_HENTAI;\n break;\n case 'images':\n $category_id = self::CATEGORY_XXX_IMAGES;\n break;\n default:\n $category_id = self::CATEGORY_XXX;\n break;\n }\n break;\n default:\n $category_id = false;\n break;\n }\n\n return $category_id;\n }", "function get_addcategory_assignedcat($page_id, $level) {\n\t\n\tglobal $ft;\n\n\t$query = sprintf(\"\n SELECT \n category_id, \n category_parent_id, \n category_name \n FROM \n %1\\$s \n WHERE \n category_parent_id = '%2\\$d' \n ORDER BY \n category_id \n ASC\", \n\t\n TABLE_CATEGORY, \n $page_id\n );\n\n\t$db = new DB_SQL;\n\t$db->query($query);\n\t\n\t$id = isset($_GET['id']) ? intval($_GET['id']) : 0;\n\t\t\n\twhile($db->next_record()) {\n\t\n\t\t$cat_id = $db->f(\"category_id\");\n\t\t$cat_parent_id = $db->f(\"category_parent_id\");\n\t\t$cat_name = $db->f(\"category_name\");\n\t\n\t\t$ft->assign(array(\n 'C_ID' =>$cat_id, \n 'C_NAME' =>$cat_name,\n 'CURRENT_CAT' =>'', \n 'PAD' =>'style=\"padding-left:' . 8*$level . 'px;\" '\n ));\n\n $ft->parse('CAT_ROW', \".cat_row\");\n\t\t\n\t\tget_addcategory_assignedcat($cat_id, $level+2);\n\t}\n}", "public function setId_cat($id_cat)\n {\n $this->id_cat = $id_cat;\n\n return $this;\n }", "public function categorie()\n {\n $data[\"categories\"]=$this->categories->list();\n $this->template_admin->displayad('categories' , $data);\n }", "public function setRootCategoryId(?string $value): void {\n $this->getBackingStore()->set('rootCategoryId', $value);\n }", "protected function setCategory($productID, $category)\r\n {\r\n \r\n // SQL query\r\n $sql = \"UPDATE tbl_products SET categories= '\" . $category . \"'WHERE id_products= '\" . $productID . \"'\";\r\n \r\n // Connect to database and run query\r\n $result = $this->connect->query($sql);\r\n \r\n // Check to see if query passed and registered\r\n if ($result) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "function wp_set_link_cats($link_id = 0, $link_categories = array())\n {\n }", "public function checkCategoria($id_categoria) {\n return true;\n }", "public function categoryAction()\n\t{\n\t\t$id = (int) $this->getRequest()->getParam('id');\n\t\t$this->view->category = $this->_blogService->findCategory($id);\n\t}" ]
[ "0.6389425", "0.62440205", "0.61312634", "0.611618", "0.61040056", "0.6093258", "0.60395426", "0.5995992", "0.5971191", "0.59101564", "0.5862698", "0.5820373", "0.5820373", "0.5820373", "0.58076614", "0.57860816", "0.576567", "0.5749754", "0.5740324", "0.5727003", "0.5699438", "0.5697282", "0.56684935", "0.5663999", "0.56632394", "0.5656093", "0.56303865", "0.56187516", "0.5616706", "0.56144065", "0.5612801", "0.5604946", "0.5576339", "0.556186", "0.5558969", "0.5497758", "0.5490942", "0.5460446", "0.5454232", "0.54528403", "0.5444889", "0.544125", "0.5440932", "0.5433582", "0.5432936", "0.54157877", "0.5410023", "0.54098296", "0.53967744", "0.5396453", "0.53807807", "0.5378556", "0.537711", "0.5369478", "0.5368621", "0.5363549", "0.5363186", "0.53609496", "0.5359732", "0.5353248", "0.5332849", "0.53286517", "0.5327893", "0.5316115", "0.5316115", "0.53141594", "0.53071755", "0.52956045", "0.52949584", "0.5281306", "0.52720535", "0.52640855", "0.5260692", "0.5259281", "0.5253033", "0.5249434", "0.52489924", "0.52414083", "0.52326894", "0.52255815", "0.52107936", "0.5201841", "0.5200287", "0.5190469", "0.5184609", "0.5181308", "0.5181308", "0.51769435", "0.517461", "0.51611286", "0.5159601", "0.51543504", "0.5140718", "0.51390916", "0.51389635", "0.5125706", "0.5124363", "0.51231194", "0.51197517", "0.5112696", "0.5109029" ]
0.0
-1
Set the Grouping page accesory id
public function setAccessory($accessory = NULL) { $this->accessory = (int) $accessory; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _set_id( $idGrupo ){\n \t\t$this->idGrupo = $idGrupo;\n }", "public function setPageID(){/*ACTUALLY NOT DEFINED*/}", "function set_accordion_id() {\n\t\t\t$this->current_accordion_slug++;\n\t\t}", "protected function setPage_id($value)\n\t{\n\t\t$this->page_id = $value;\n\t}", "public function setPageID(){\n\t\t\n\t\t$id = 'page';\n\t\t$s = '-';\n\t\t$pound = (!self::USE_SPLASH)?'#':'';\n\t\t$prefix = $pound.$id.$s;\n\t\t$this->headerContainerId = $prefix.'header'.$s.'container';\n\t\t$this->headerId = $prefix.'header';\n\t\t$this->subtitleId = $prefix.'subtitle';\n\t\t$this->brandId = $prefix.'brand';\n\t\t\n\t}", "function setGroupID( $groupID ) \n {\n $this->setValueByFieldName( 'navbargroup_id', $groupID);\n }", "function setSectionID( $value )\r\n {\r\n $this->SectionID = $value;\r\n }", "function SetId($value) { $this->id=$value; }", "function setId($value) {\n $this->_id = intval($value);\n }", "public function setID($value) {\r\n //if (!is_numeric($value)) die(\"setID() only accepts a numerical ID value\");\r\n $this->id = $value;\r\n }", "function setLinkGroupID( $value )\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n $this->LinkGroupID = $value;\n }", "protected function determinePageId() {}", "protected function determinePageId() {}", "function view($id) {\n $this->Group->id = $id;\n $this->set('group', $this->Group->read());\n }", "function setPageID( $pageID ) \n {\n $this->setValueByFieldName( 'page_id', $pageID );\n }", "function edit($id) {\n // Call the parent then override the title\n \n parent::edit($id);\n \n $gm = $this->viewVars['co_group_members'][0];\n \n $this->set('title_for_layout', _txt('op.grm.title', array(_txt('op.edit'),\n $gm['CoGroup']['name'],\n generateCn($gm['CoPerson']['PrimaryName']))));\n }", "private function SetID($value)\n\t\t{\n\t\t\t$this->id = $value;\n\t\t}", "public function set_id($setid){\n $this->id = $setid;\n }", "public function setGroupId(?string $value): void {\n $this->getBackingStore()->set('groupId', $value);\n }", "function group_id($group_id=null)\n {\n if (isset($group_id)) {\n $this->group_id = intval($group_id);\n }\n return $this->group_id;\n }", "function setAmocrmIntegreationId(string $id): void {\n\t}", "function setGroup( $group )\r\n {\r\n if ( is_a( $group, \"eZUserGroup\" ) )\r\n {\r\n $this->GroupID = $group->id();\r\n }\r\n else if ( is_numeric( $group ) )\r\n {\r\n $this->GroupID = $group;\r\n }\r\n }", "function setid_exp($val)\n { $this->id_exp=$val;}", "public function setPrincipalId(?string $value): void {\n $this->getBackingStore()->set('principalId', $value);\n }", "private function setCustomerGroupIds()\n {\n $this->data['customer_group_ids'] = $this->getAvailableCustomerGroupIds();\n }", "public function setIdgrupo_sanguineo($idgrupo_sanguineo){\n $this->idgrupo_sanguineo = $idgrupo_sanguineo;\n }", "function set_userGroup($data, $oldId){\n $data_user = array();\n $data_group = array();\n $data_user['id'] = $data['id'];\n $data_user['username'] = $data['username'];\n $data_user['password'] = $data['password'];\n $data_user['email'] = $data['email'];\n\n $group = $data['group'];\n $data['group'] = selectRecord(TAB_GROUPS, \"role = '$group'\")['id'];\n $data_group['userId'] = $data['id'];\n $data_group['groupId'] = $data['group'];\n\n updateRecord(TAB_USR_ROLE, $data_group, \"userId = $oldId\");\n updateRecord(TAB_USERS, $data_user, \"id = $oldId\");\n $data_info = array();\n if($data['group'] == 1){\n $data_info = array();\n $data_info['employment'] = \"-\";\n $data_info['img_address'] = \"upload/user/user-default.png\";\n $data_info['user'] = $data['id'];\n insertRecord(TAB_PERSONALINFO, $data_info);\n }\n}", "public function setGroups(?int $value): void {\n $this->getBackingStore()->set('groups', $value);\n }", "public function setIdArea($id) {\n $this->_id = $id; \n }", "public function setId($_id);", "function set_region_id($link, $data, $value) // Colorize: green\n { // Colorize: green\n return set_property_value($link, $data, \"region_id\", $value); // Colorize: green\n }", "function setid_exp($val)\n { $this->id_exp=$val;}", "function setid_exp($val)\n { $this->id_exp=$val;}", "public function setId($x) { $this->id = $x; }", "abstract protected function determinePageId() ;", "function set_id( $id ){\n\t\t$this->id = $id;\n\t\t// this is add request. so number is 0\n\t\tif( $this->id == $this->id_base ){\n\t\t\t$this->number = 0;\n\t\t\t$this->is_new = true;\n\t\t}\n\t\t// parse number\n\t\telse{\n\t\t\t$this->number = str_replace($this->id_base.'-', '', $this->id);\n\n\t\t\t// load instance data\n\t\t\t$this->instance = jcf_field_settings_get( $this->id );\n\t\t\tif( !empty($this->instance) ){\n\t\t\t\t$this->slug = $this->instance['slug'];\n\t\t\t}\n\t\t}\n\t}", "function set_id($id) {\n\t\t$this->id = $id;\n\t}", "function fn_makeid($editableareaname) {\r\r\n\tglobal $sectionid, $pageid;\r\r\n\t$idstring = $pageid . '_' . $editableareaname;\r\r\n\tif ($sectionid != '')\r\r\n\t\t$idstring = $sectionid . $idstring;\r\r\n\treturn $idstring;\t\r\r\n}", "private function setId($id)\n {\n $session = new Zend_Session_Namespace('Unodor_Account');\n $session->idaccount = $id;\n }", "function setId($id) {\r\n $this->_id = $id;\r\n }", "function setId($value){\n\t\t//echo \"setting ID to \".$value;\n\t\t$this->_id=$value;\n\t\t//echo \"ID set to \".$this->_id;\n\t\treturn $this;\n\t}", "protected function _setId($value)\n\t{\n\t\tvar_dump($value);\n\t\tif (empty($value) || ($value < 0)) {\n\t\t\ttrigger_error('Invalid value used to set the member id', E_USER_ERROR);\n\t\t\treturn;\n\t\t}\n\t\telse {\n\t\t\t$this->_id = $value;\n\t\t\t$_SESSION['user_id']=$value;\n\t\t\t\n\n\t\t}\n\t}", "public function setPermissionId(?string $value): void {\n $this->getBackingStore()->set('permissionId', $value);\n }", "function set_cur_group($group) {\n\t\tlgi_mysql_query(\"UPDATE %t(usergroups) SET `dfl`=(`name`='%%') WHERE `usercertid`=(SELECT `id` FROM %t(usercerts) WHERE `user`='%%')\", $group, $this->userid);\n\t\t$_SESSION['dfl_group'] = $group;\n\t}", "public function set_order_id( $value ) {\n\t\t$this->set_prop( 'order_id', absint( $value ) ) ;\n\t}", "public function setColgroupId($id)\n {\n $this->html_colgroup_id = parent::slug($id);\n }", "public function setAccessReviewId(?string $value): void {\n $this->getBackingStore()->set('accessReviewId', $value);\n }", "public function setID($_id) \n \t{\n \t\t$this->_id = $_id;\n \t}", "public function setSettingsId($value)\n {\n $this->_settingsId = $value;\n }", "public function setPrimary_key($a_id = '')\n {\n if (is_array($a_id)) {\n $this->aPrimary_key = $a_id;\n foreach ($a_id as $nom_id => $val_id) {\n if (($nom_id == 'nivel_stgr') && $val_id !== '') $this->inivel_stgr = (int)$val_id;\n }\n }\n }", "public static function setCurrentID($id) {\n Session::put(Privilege::SESSION_NAME_ID, $id);\n }", "function set_id ($id)\r\n {\r\n $_SESSION[\"id\"] = $id;\r\n }", "function setModerator( $group )\r\n {\r\n if ( is_a( $group, \"eZUserGroup\" ) )\r\n {\r\n $this->ModeratorID = $group->id();\r\n }\r\n else if ( is_numeric( $group ) )\r\n {\r\n $this->ModeratorID = $group;\r\n }\r\n }", "function setId($id) {\n\t\t$this->_id = $id;\n\t}", "public function getPageId() {}", "function setSiteId($value)\n {\n $this->_props['SiteId'] = $value;\n }", "public function getPageId() {}", "public function setGroupID($id)\n {\n if(is_int($id) === false || (integer) $id < 0) {\n throw new LedgerException(sprintf('AccountGroupID must be an integer > 0'));\n }\n \n $this->__set(self::FIELD_GROUP_ID,$id);\n }", "public function setID($_id) \n\t{\n\t\t$this->_id = $_id;\n\t}", "function set_id($id)\n {\n $this->id = $id;\n }", "public function setId($id) {\n $this->id = $id;\n $session = new Container('seguridad');\n $session->submenu_id = $id;\n }", "public function setId($id){\n $this->_id = $id;\n }", "public function testSetId()\n {\n $this->alignment->setId(25);\n $this->assertEquals(25, $this->alignment->getId());\n }", "protected function set_accessory() {\n $this->accessory = $this->safe_find_from_id('Accessory');\n }", "public function setID($aID) {\n $this->id = $aID;\n }", "public function set_group($id_group){\n if ( is_int($id_group) ){\n $this->id_group = $id_group;\n }\n return $this;\n }", "function setImageID( $value )\r\n {\r\n if ( is_a( $value, \"eZImage\" ) )\r\n {\r\n $this->ImageID = $value->id();\r\n }\r\n else if ( is_numeric( $value ) )\r\n {\r\n $this->ImageID = $value;\r\n }\r\n }", "public function set_group_id($groupid) {\n $this->groupid = (int)$groupid;\n }", "public function set_id( $id ) {\n\t\t$this->id = absint( $id );\n\t}", "public function getPageID(){\n\t\t\n\t\tif(self::USE_SPLASH)\n\t\t{\n\t\t\t$this->setSplashID();\n\t\t}\n\t\telse $this->setPageID();\n\t\t\n\t}", "public function setId($value) {\r\n\t\t$this->_id = $value;\r\n\t\treturn $this;\r\n\t}", "public function setId(string $value) : Page\n {\n\n if ($this->data['id'] !== $value) {\n $this->data['id'] = $value;\n $this->setModified('id');\n }\n\n return $this;\n }", "public function setId($value)\n {\n $this->setDataField('id', $value);\n }", "function setId($id){\r\n\t\t$this->id = $id;\r\n\t}", "private function setID($id) {\r\n\t\t$this->id = $id;\r\n\t}", "public function setOrganizations(?int $value): void {\n $this->getBackingStore()->set('organizations', $value);\n }", "function setId($id){\n\t\t$this->id = $id;\n\t}", "private function setUserID($iUser) {\n\t\t\t$this->user($iUser); \n//\t\t\t$this->iUser = $iUser; \n\t\t\tglobal $oPage; \n\t\t\t$oPage->iUser = $iUser; \n\t\t}", "public function setScopeId(?string $value): void {\n $this->getBackingStore()->set('scopeId', $value);\n }", "function __ad_group_selector_campaign_id($campaign_id, $number, $first) {\n\n $paging = $this->__paging($number, $first);\n\n return '<selector>\n <campaignId>'.$this->__xml($campaign_id).'</campaignId>\n '.$paging.'\n </selector>';\n\n}", "public function set_id($id){\n $this->id = $id;\n }", "private function generateId() {\n $this->setId(AgaviToolkit::uniqid(\"ldap_conn_\"));\n }", "public function setId($id)\n {\n $this->_id = (int) $id;\n }", "public function setIdusuario($value){\n $this->idusuario = $value;\n }", "public function setId($id)\n {\n $this->_id = (int) $id;\n }", "function view($id) {\n // Call the parent then override the title\n \n parent::view($id);\n \n if(!$this->request->is('restful')) {\n $gm = $this->viewVars['co_group_members'][0];\n \n $this->set('title_for_layout', _txt('op.grm.title', array(_txt('op.view'),\n $gm['CoGroup']['name'],\n generateCn($gm['CoPerson']['PrimaryName']))));\n }\n }", "public function getGroupByPage() {}", "public function setId()\n\t{\n\t}", "public function set_idnumber($value) {\r\n $this->idnumber = $value;\r\n data::add(\"idnumber\", $this->idnumber == \"\" ? NODATA : input::santize($this->idnumber), $this->table_fields);\r\n }", "protected function defineNameId(){\n list($name,$id)=$this->resolveNameID();\n $this->_id=$this->htmlOptions['id']=$id;\n\t\t$this->_name=$this->htmlOptions['name']=$name;\n }", "public function setID($id){\n $this->id = $id;\n }", "final public function setGroup($value) {\n\t\t$this->group = $value;\n\t}", "public function set_id_pg($id=0){\n\t\t\t$id = (int) $id;\n\t\t\tif($id!=0){\n\t\t\t\t$this->ipg_id=$id;\n\t\t\t}else{\n\t\t\t\t$this->ipg_id=0;\n\t\t\t}\n\t\t}", "private function set_id(int $id)\n {\n $this->_id = $id;\n }", "public function setID($id) {\n $this->id = $id; \n }", "public function setID($id);", "public function setId($id){\n $this->_sub_cat_id = $id;\n }", "public function setID($id){\n $this->id=$id;\n }", "public function setAccountingID($value) {\n return $this->setParameter('accounting_id', $value);\n }", "public function setAccountingID($value) {\n return $this->setParameter('accounting_id', $value);\n }", "public function setAccountingID($value) {\n return $this->setParameter('accounting_id', $value);\n }" ]
[ "0.66401815", "0.64890414", "0.64887595", "0.6336313", "0.62302494", "0.6117533", "0.582784", "0.57982343", "0.57714945", "0.563884", "0.5581581", "0.5564963", "0.5564963", "0.5558127", "0.55443394", "0.5525002", "0.5506345", "0.5502464", "0.542897", "0.54235756", "0.5418394", "0.54074776", "0.5393455", "0.538239", "0.53823227", "0.53786474", "0.5374877", "0.53666943", "0.5361126", "0.5360762", "0.5355659", "0.5343196", "0.5343196", "0.53402674", "0.53338146", "0.5332268", "0.5317058", "0.5312189", "0.53056544", "0.52994764", "0.52946925", "0.52944255", "0.5289012", "0.5288665", "0.5278989", "0.5275587", "0.52721995", "0.52680475", "0.52653724", "0.526428", "0.526381", "0.5261816", "0.5255199", "0.52520645", "0.52326876", "0.52315897", "0.52313036", "0.5208263", "0.52059376", "0.51992655", "0.51917845", "0.5186612", "0.5183796", "0.51792556", "0.51790947", "0.51727957", "0.5169533", "0.51664716", "0.5165657", "0.51639956", "0.51507556", "0.51427835", "0.51215035", "0.51210296", "0.5117432", "0.51149017", "0.51145583", "0.51067156", "0.50979483", "0.5097871", "0.50940484", "0.5093153", "0.5089013", "0.5088953", "0.50878996", "0.50867337", "0.50828946", "0.508257", "0.5082107", "0.50696504", "0.5061256", "0.5059735", "0.5058005", "0.50488883", "0.5048702", "0.5044668", "0.50442696", "0.50431085", "0.5035767", "0.5035767", "0.5035767" ]
0.0
-1
Set the Grouping page image description
public function setDescriptionImage($descriptionImage = "") { $this->descriptionImage = !empty($descriptionImage) ? trim($descriptionImage) : NULL; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_description()\n {\n return 'Populate your image of the day gallery with 40 LOLCAT images. After installing the addon select the image of the day in the usual way by going to Admin zone > Content > Images of the day and select the image you want to display.';\n }", "protected function setImageMagickDetailSettings() {}", "public function displayImgTag() {\n $urlimg = \"/plugins/graphontrackers/reportgraphic.php?_jpg_csimd=1&group_id=\".(int)$this->graphic_report->getGroupId().\"&atid=\". $this->graphic_report->getAtid();\n $urlimg .= \"&report_graphic_id=\".$this->graphic_report->getId().\"&id=\".$this->getId();\n \n \n echo '<img src=\"'. $urlimg .'\" ismap usemap=\"#map'. $this->getId() .'\" ';\n if ($this->width) {\n echo ' width=\"'. $this->width .'\" ';\n }\n if ($this->height) {\n echo ' height=\"'. $this->height .'\" ';\n }\n echo ' alt=\"'. $this->title .'\" border=\"0\">';\n }", "protected function setDescription() {\r\n\t\t$descriptionCrop = intval($this->settings['news']['semantic']['general']['description']['crop']);\r\n\t\t$descriptionAction = $this->settings['news']['semantic']['general']['description']['action'];\r\n\t\t$descriptionText = $this->newsItem->getTeaser();\r\n\t\tif (empty($descriptionText)) {\r\n\t\t\t$descriptionText = $this->newsItem->getBodytext();\r\n\t\t}\r\n\t\tif (!empty($descriptionText) && !empty($descriptionAction)) {\r\n\t\t\tif (!empty($GLOBALS['TSFE']->page['description'])) {\r\n\t\t\t\tswitch ($descriptionAction) {\r\n\t\t\t\t\tcase 'prepend':\r\n\t\t\t\t\t\t$descriptionText .= ': ' . $GLOBALS['TSFE']->page['description'];\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'append':\r\n\t\t\t\t\t\t$descriptionText = $GLOBALS['TSFE']->page['description'] . ': ' . $descriptionText;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$this->description = $this->contentObject->crop($descriptionText, $descriptionCrop . '|...|' . TRUE);\r\n\t\t}\r\n\t}", "function admin_cropImage()\r\n {\r\n // setting the layout for admin\r\n $this->layout = 'admin';\r\n \r\n // Setting the page title\r\n $this->set(\"title_for_layout\",\"Image Crop\");\r\n \r\n }", "function showcaseGallery($groupId, $title) {\n\t$config = new ConfigReader();\n\t$config->loadConfigFile('assets/core/config/widgets/showGroup/gallery.properties');\n\t\n\t$maxDisplay = $config->readValue('maxDisplay');\n\t$maxPerRow = $config->readValue('maxPerRow');\n\t$w = $config->readValue('maxImageSizeX');\n\t$h = $config->readValue('maxImageSizeY');\n\t\n\t//if the user is not an admin, validate that the user is a member of this group\n\t$result = mysql_query(\"SELECT parentId, imageUrl FROM imagesGroups WHERE parentId = '{$groupId}' AND inSeriesImage = 1 ORDER BY RAND() LIMIT $maxDisplay\");\n\t$total = mysql_num_rows($result);\n\t\n\tif ($total > 0) {\n\t\t\n\t\t$urlCategory =urlencode($row->category);\n\t\t$caption = htmlentities($row->caption);\n\t\t\n\t\t$x = 0;\n\t\t$count = 0;\n\t\t\n\t\t//adjust maxPerRow is it's greater than the returned number of objects\n\t\tif ($maxPerRow > $total) {\n\t\t\t\n\t\t\t$maxPerRow = $total;\n\t\t\t\n\t\t}\n\t\t\n\t\t$return .= \"\t\t\t\t<div id=\\\"gallery_container\\\">\\n\";\n\t\t$return .= \"\t\t\t\t\t<div class=\\\"header\\\"><a href=\\\"/groupgalleries/id/$groupId\\\">$title</a></div>\\n\";\n\t\t$return .= \"\t\t\t\t\t<div class=\\\"body\\\">\\n\";\n\t\t\n\t\twhile ($row = mysql_fetch_object($result)) {\n\t\t\t\n\t\t\t//count this row's column itteration\n\t\t\t$x++;\n\t\t\t\n\t\t\t//keep track of total displayed so far\n\t\t\t$count++;\n\t\t\t\n\t\t\t//determine if separator class is applied\n\t\t\tif ($x % $maxPerRow != 0) {\n\t\t\t\t\n\t\t\t\t$separator = \" separator\";\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t$separator = \"\";\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$return .= \"<div class=\\\"gallery_image_container$separator\\\">\\n\";\n\t\t\t$return .= \"\t<a href=\\\"/groupgalleries/id/$groupId\\\"><img src=\\\"/file.php?load=$row->imageUrl&w=$w&h=$h\\\" border=\\\"0\\\"></a>\\n\";\n\t\t\t$return .= \"</div>\\n\";\n\t\t\t\n\t\t\t//row separator\n\t\t\tif ($x == $maxPerRow && $count < $total) {\n\t\t\t\t\n\t\t\t\t$return .= \"\t\t\t<div class=\\\"gallery_image_row_separator\\\"></div>\\n\";\n\t\t\t\t$x = 0;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t$return .= \"\t\t\t\t\t</div>\\n\";\n\t\t$return .= \"\t\t\t\t</div>\\n\";\n\t\t\n\t}\t\n\t\n\treturn($return);\n\t\n}", "function setImage($image) {\n\t\t$this->_image = $image;\n\t}", "public function getDescriptionImage() { return $this->descriptionImage; }", "function dt_image($title,$name,$value,$width = 0,$height = 0,$comment='',$class_col1='col-md-2',$class_col2='col-md-10'){\n\t\t$html = '<div class=\"form-group\">\n <label class=\"'.$class_col1.' col-xs-12 control-label\">'.$title.'</label>\n <div class=\"'.$class_col2.' col-xs-12\">';\n\t\t\n\t\tif($value){\n\t\t\t\t$html_w = $width?' width=\"'.$width.'\" ':'';\n\t\t\t\t$html_h = $height?' height=\"'.$height.'\" ':'';\n\t\t\t$html .= '<img src=\"'.$value.'\" '.$html_w.' '.$html_h.' /><br/>';\n\t\t}\n\t\tif($comment)\n\t\t\t$html .= '<p class=\"help-block\">'.$comment.'</p>';\n\t\t$html .= '</div></div>';\n\t\techo $html;\n\t}", "private function get_title_img()\n {\n $this->char_count = count($this->strings);\n $this->init_img();\n $font_size = L_FONT_SIZE / $this->char_count;\n $img_y = (L_IMG_HEIGHT + $font_size) / 2;\n $this->create_img($this->string,$font_size,$img_y);\n }", "function setHeadImage($var)\n\t{\n\t\t$this -> head_image = $var;\n\t}", "function my_module_hero_image_admin_info($subtype, $conf, $context) {\n // Set the title that shows on the admin Content page to the overridden title.\n $block = new stdClass();\n if (!empty($conf['title_text'])) {\n $conf_title = $conf['title_text'];\n }\n else {\n $conf_title = 'No Title';\n }\n $block->title = $conf['override_title_text'] ? $conf['override_title_text'] : $conf_title;\n return $block;\n}", "function _tts_preprocess_p_img_big(&$vars){\n $alt = (isset($vars['content']['field_img'][0]['#item']['title'])\n && !empty($vars['content']['field_img'][0]['#item']['title'])\n ? $vars['content']['field_img'][0]['#item']['title'] . ' - '\n : '') . 'Serramenti Torino';\n $vars['content']['field_img'][0]['#item']['alt'] = $alt;\n \n \n if ($vars['view_mode'] == 'full'){\n $vars['content']['field_img'] = array(\n '#prefix' => '<div class=\"wrapper-p-img margin-b-1\">',\n '#suffix' => '</div>',\n 'data' => $vars['content']['field_img'][0],\n );\n\n //_tts_add_fancy_svg($vars);\n\n if (isset($vars['content']['field_img']['data']['#item']['title']) && $vars['content']['field_img']['data']['#item']['title']!== ''){\n $title = $vars['content']['field_img']['data']['#item']['title'];\n $vars['content']['field_img']['desc'] = array(\n '#prefix' => '<div class=\"margin-t-05 margin-sm-h-2\"><p class=\"small\">',\n '#suffix' => '</p></div>',\n '#markup' => $title,\n '#weight' => 2,\n );\n }\n }\n}", "public function setImage($image)\r\n {\r\n $this->image = $image;\r\n }", "public function setGroupDescription($description)\n {\n if(empty($description) || mb_strlen((string)$description) > self::GROUP_DESC_MAX_SIZE ) {\n throw new LedgerException(\n sprintf('Group Description must be a string < %s characters',self::GROUP_DESC_MAX_SIZE)\n );\n }\n \n \n $this->__set(self::FIELD_GROUP_DESCRIPTION, $description);\n }", "function dfcg_help_images() {\n?>\n\t<h3><?php _e( 'Dynamic Content Gallery - Quick Help - Image Management', DFCG_DOMAIN ); ?></h3>\n\t\n\t<p><?php _e( 'Quite simply, the Featured Images option is the best and easiest to use. The manual methods (Full and Partial) are primarily there for reasons of backwards compatibility, for those users who have been using the DCG since its earliest versions.', DFCG_DOMAIN ) ;?></p>\n\t\n\t<p><em><?php _e( 'Note: it is quite possible that the manual image management options will be removed in future. Therefore users are encouraged to use the Featured Image option - it is easier and more flexible.', DFCG_DOMAIN ); ?></em></p>\n\t\n\t<p><?php _e( 'If you select the Partial URL option you will be prompted to enter the URL to the root folder for your images. You must enter a URL here otherwise the DCG will not find your images.', DFCG_DOMAIN ); ?></p>\n\n<?php\n}", "function metaInit () {\n $this->imageMeta = new ImageMeta($this->getImagePath());\n $this->imageMeta->getMeta();\n }", "public function setImage($image) {\n\t\t$this->image = $image;\n\t}", "function editor_insert_image($html, $id, $caption, $title, $align, $url, $size) {\r\n\tlist($imgsrc) = image_downsize($id, 'hero-review');\r\n//\tlist($imgsrc) = image_downsize($id, $size);\r\n\r\n\t$html = \"<div class=\\\"photo-gallery\\\">\";\r\n\t$html .= \"<img src=\\\"$imgsrc\\\" alt=\\\"$caption\\\">\";\r\n\tif ($caption) {\r\n\t\t$html .= \"<div class=\\\"caption\\\">$caption</div>\";\r\n\t}\r\n\t$html .= \"</div><!-- photo-gallery -->\";\r\n\treturn $html;\r\n}", "public function setDescription($description) {\n\t\tTemplate::setSiteMetaDescription($description);\n\t}", "public function setOn(\\SetaPDF_Core_Document_OptionalContent_Group $group) {}", "public function setImage( $image ) {\n\t\t$this->image = $image;\n\t}", "public function displayPage()\n {\n $this->getState()->template = 'displaygroup-page';\n }", "public function setPageDescription($text)\n {\n $metaDescription = $this->query('meta[name=\"description\"]')->first();\n if ($text === '') {\n // If empty value passed we need to remove title tag\n if ($metaDescription) {\n $this->removeElement($metaDescription);\n }\n } else {\n if ($metaDescription) {\n $metaDescription->setAttribute('content', $text);\n } else {\n // Try to insert meta description tag into head\n $metaDescription = new Meta('description', $text);\n $head = $this->query('head');\n if ($head->count() > 0) {\n /* @var Element $head */\n $this->appendTo($head->first(), $metaDescription);\n }\n }\n }\n }", "public function setImageUrl($value)\n\t{\n\t\t$this->setViewState('ImageUrl',$value,'');\n\t}", "public function get_image_title()\n {\n }", "function exif_admin_settings() {\n drupal_add_css(drupal_get_path('module', 'exif') .'/exif.admin.css');\n $filepath = drupal_get_path('module', 'exif') .'/sample.jpg';\n $exif = _exif_get_class();\n $fullmetadata = $exif->readMetadataTags($filepath);\n $output = '';\n $output .= '<h3>' . t('About') . '</h3>';\n $output .= '<p>' . t('The Exif module allows you :');\n $output .= '<ul><li>' . t('extract metadata from an image'). '</li>';\n $output .= '<li>' . t('to classify your images by settings terms in taxonamy vocabulary'). '</li></ul>';\n $output .= t('To classify images, you define <em>vocabularies</em> that contain related <em>terms</em>, and then assign the vocabularies to content types. For more information, see the online handbook entry for the <a href=\"@taxonomy\">Taxonomy module</a>.', array('@taxonomy' => 'http://drupal.org/handbook/modules/taxonomy/'));\n $output .= '</p>';\n $output .= '<h3>' . t('Uses') . '</h3>';\n $output .= '<dl>';\n $output .= '<dt>' . t('Creating vocabularies') . '</dt>';\n $output .= '<dd>' . t('Users with sufficient <a href=\"@perm\">permissions</a> can create <em>vocabularies</em> through the <a href=\"@taxo\">Taxonomy page</a>. The page listing the terms provides a drag-and-drop interface for controlling the order of the terms and sub-terms within a vocabulary, in a hierarchical fashion. A <em>controlled vocabulary</em> classifying music by genre with terms and sub-terms could look as follows:', array('@taxo' => url('admin/structure/taxonomy'), '@perm' => url('admin/config/people/permissions', array('fragment'=>'module-taxonomy'))));\n $output .= t('This module will automatically create in the chosen vocabulary (by default \"Images\"), the folowing structure:');\n $output .= '<ul><li>' . t ('<em>vocabulary</em>: Images'); '</li>';\n $output .= '<ul><li>' . t('<em>term</em>: iptc') . '</li>';\n $output .= '<ul><li>' . t('<em>sub-term</em>: keywords') . '</li>';\n $output .= '<ul><li>' . t('<em>sub-term</em>: Paris') . '</li>';\n $output .= '<li>' . t('<em>sub-term</em>: Friends') . '</li>';\n $output .= '</ul></ul>';\n $output .= '<ul><li>' . t('<em>sub-term</em>: caption') . '</li>';\n $output .= '<ul><li>' . t('<em>sub-term</em>: Le louvre') . '</li>';\n $output .= '</ul></ul></ul>';\n $output .= '<ul><li>' . t('<em>term</em>: exif') . '</li>';\n $output .= '<ul><li>' . t('<em>sub-term</em>: model') . '</li>';\n $output .= '<ul><li>' . t('<em>sub-term</em>: KINON DE800') . '</li>';\n $output .= '</ul></ul>';\n $output .= '<ul><li>' . t('<em>sub-term</em>: isospeedratings') . '</li>';\n $output .= '<ul><li>' . t('<em>sub-term</em>: 200') . '</li>';\n $output .= '</ul></ul></ul></ul>';\n $output .= '<dd>' . t('To get metadata information of an image, you have to choose on which node type the extraction should be made.');\n $output .= t('You also have to create fields with specific names using the new Field UI.');\n $output .= t('The type of the field can be :');\n $output .= '<ul><li>' . t ('<em>text field</em>: extract information and put it in the text field.'). '</li>';\n $output .= '<li>' . t ('<em>term reference field</em>: extract information, create terms and sub-terms if needed and put it in the field.').'</li>';\n $output .= '</ul>';\n $output .= t('Please, if you want to use term reference field, ensure :');\n $output .= '<ul><li>' . t('you choose the autocompletion widget and').'</li>';;\n $output .= '<li>' . t ('the \"Images\" Vocabulary exist.').'</li>';\n $output .= '</ul>';\n $output .= t('TIPS : Note for iptc and exif fields that have several values (like field iptc \"keywords\" as an example), ');\n $output .= t('if you want to get all the values, do not forget to configure the field to use unlimited number of values (by default, set to 1).');\n $output .= '</dd>';\n $output .= '</dl>';\n $output .= '<h3>' . t('Example of field name and the metadata extracted') . '</h3>';\n $rows = array();\n $help = '';\n if(is_array($fullmetadata)){\n foreach ($fullmetadata as $section => $section_data) {\n $rows[] = array('data'=>array($section,$help), 'class' => array('tag_type'));\n foreach ($section_data as $key => $value) {\n if ($value != NULL && $value != '' && !$exif->startswith($key,'undefinedtag')) {\n $resultTag = \"\";\n if (is_array($value)) {\n foreach($value as $innerkey => $innervalue) {\n if( ($innerkey+1) != count($value) ) {\n $resultTag.=$innervalue.\", \";\n } else {\n $resultTag.=$innervalue;\n }\n }\n } else {\n $resultTag=check_plain($value);\n }\n $rows[] = array('data'=>array(\"field_\".$section.\"_\".$key,$resultTag), 'class' => array('tag'));\n }\n }\n }\n }\n $header = array(t('Key'),t('Value'));\n $output .= '<p>';\n $variables = array (\"header\" => $header, \"rows\" => $rows, \"attributes\" => array(), \"caption\" => array(),\"sticky\" => array(), \"colgroups\" => array(), \"empty\" => array() );\n $output .= theme_table($variables);\n $output .= '</p>';\n return $output;\n}", "public function options_page_overview() \n\t\t{\n\t\t\t$html = '';\n\t\t\t\n\t\t\tforeach( $this->size_groups as $size_group => $sizes ) \n\t\t\t{\n\t\t\t\t$html .= '<h3>' . $this->get_group_headline( $size_group ) . '</h3>';\n\t\t\t\t\n\t\t\t\t$html .= '<ul>';\n\t\t\t\t\n\t\t\t\tforeach( $sizes as $key => $image ) \n\t\t\t\t{\n\t\t\t\t\t$info = $image['width'] . '*' . $image['height'];\n\t\t\t\t\tif( isset( $image['crop'] ) && true === $image['crop'] )\n\t\t\t\t\t{\n\t\t\t\t\t\t$info .= ' ' . __( '(cropped)', 'avia_framework' );\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$info .= ' - ' . $this->get_image_key_info( $key );\n\t\t\t\t\t\n\t\t\t\t\t$html .= '<li>' . $info . '</li>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$html .= '</ul>';\n\t\t\t}\n\t\t\t\n\t\t\treturn $html;\n\t\t}", "public function setImage($image)\n {\n $this->image = $image;\n }", "static public function setDescription($new_description) {\n\t\tself::$page_description = (string)$new_description;\n\t}", "function initialize () {\n $this->set_openingtag ( \"<IMG alt=\\\"\" );\n\t $this->set_closingtag ( \"\\\"[attributes]/>\" );\n }", "function bethel_add_image_to_pages() {\n\tglobal $post;\n\tif ($post) {\n\t\t$image_id = get_post_thumbnail_id ($post->ID);\n\t\tif ($image_id) {\n\t\t\tif ($post->post_type != 'bethel_stories' && $post->page_template != 'stories.php') {\n\t\t\t\t$image = wp_get_attachment_image_src($image_id, 'bethel_supersize');\n\t\t\t\tif ($image) {\n\t\t\t\t\tif ($image[1] < 800) { //width\n\t\t\t\t\t\t$image[2] = round($image [2] / $image[1] * 800);\n\t\t\t\t\t}\n\t\t\t\t\t$image[2] = ($image[2] > 400) ? 400 : $image[2]; //height\n\t\t\t\t\techo \"<style type=\\\"text/css\\\">.entry-header { height: {$image[2]}px; background-image: url('{$image[0]}')}</style>\";\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\techo \"<style type=\\\"text/css\\\">\n .content .entry-header { margin-top: 75px; margin-top: 7.5rem }\n .content .entry-content { padding-top: 25px; padding-top: 2.5rem; }\n </style>\";\n\t\t}\n\t}\n}", "public function setPrimaryImageOfPage($value)\n {\n $this->primaryImageOfPage = $value;\n }", "public function setImg($img)\n {\n $this->img = $img;\n\n \n }", "protected function renderImage(){\n \n return sprintf(\n '<img src=\"%s\" title=\"%s\" alt=\"%s\">',\n $this->getField('url'),\n $this->getField('title',''),\n $this->getField('alt','')\n );\n \n }", "function addImage(& $story, & $pageElement) {\n\t\t$storyElement =& $this->_document->createElement('image');\n\t\t$pageElement->appendChild($storyElement);\n\t\t\n\t\t$this->addCommonProporties($story, $storyElement);\n\t\t\n \t\t// description\n\t\t$shorttext =& $this->_document->createElement('description');\n\t\t$storyElement->appendChild($shorttext);\n\t\t$shorttext->appendChild($this->_document->createTextNode(htmlspecialchars($story->getField('shorttext'))));\n \t\t\n \t\t// file\n\t\t$longertext =& $this->_document->createElement('filename');\n\t\t$storyElement->appendChild($longertext);\n\t\t$filename = addslashes(urldecode(db_get_value(\"media\",\"media_tag\",\"media_id=\".$story->getField(\"longertext\"))));\n\t\t$longertext->appendChild($this->_document->createTextNode(htmlspecialchars($filename)));\n\t\t\n\t\t$this->addStoryProporties($story, $storyElement);\n\t}", "function gallery($gallery_name=\"eugenio-02\",$page_num=5,$title='Missing Title')\n\t{\n //data must give the template we want things shown\n //this is defined by the seecond segement\n // @gallery=gallery template\n // @page =page template\n // @sitemap=sitemap template\n $this->load->library('pagebuilder');\n \n\t $data['title'] = $gallery_name;\n\t $data['heading'] = \"My Real Heading\";\n\t $data['gallery']=$gallery_name;\n\t $data['page_num']=$page_num;\n\t $this->load->view('photographer_gallery',$data);\n \n\t}", "function printSet($photoset_id, $packery = true, $parentNav = false, $size = 'n'){\n\n\t\t/* Gets Photo Info */\n\t\t$info = $this->getPhotoSetInfo($photoset_id);\n\n\t\t/* Redefine loadContentDescription */\n\t\t$this->pageDescription = $info->photoset->title->_content;\n\t\t$this->contentDescription = $info->photoset->description->_content;\n\n\t\t/* Add Content Description */\n\t\t$output = $parentNav ? '' : $this->printContentDescription();\n\n\t\t/* Start HTML */\n\t\tif(!$parentNav) $output .= '<section class=\"photogroup\"><div id=\"gallery\">';\n\n\t\t/* Check for Packery */\n\t\t$packery ? $packery = 'packery' : $packery = '';\n\t\t$output .= '<ul class=\"set '.$packery.'\">';\n\n\t\t/* Gets some photos */\n\t\t$photoSet = $this->getPhotoSet($photoset_id);\n\n\t\tforeach($photoSet->photoset->photo as $photo){\n\n\t\t\t/* Add Special Class to Primary */\n\t\t\t$primary = $photo->isprimary == '1' ? 'primary' : '';\n\n\t\t\t/* Add Video class if Video */\n\t\t\t$output .= '<li class=\"item '.$photo->media.' '.$primary.'\">';\n\t\t\t$output .= '<a class=\"imagelink\" href=\"#!/photo_id='.$photo->id.'&secret='.$photo->secret.'\">';\n\n\t\t\t/* Lets get some Photos */\n\t\t\tif($photo->media !== 'video' || $packery == false){ // Photos\n\n\t\t\t\t$info = $this->getPhoto($photo->id, $photo->secret);\n\n\t\t\t\t/* Check for Animated Gifs */\n\t\t\t\tif($info->photo->originalformat == 'gif') {\n\t\t\t\t\t$secret = $info->photo->originalsecret.'_o';\n\t\t\t\t\t$format = 'gif';\n\t\t\t\t} else {\n\t\t\t\t\t$secret = $photo->secret;\n\t\t\t\t\t$format = 'jpg';\n\t\t\t\t}\n\n\t\t\t\t$sizeUrl = 'url_'.$size;\n\t\t\t\t$url = isset($photo->$sizeUrl) ? $photo->$sizeUrl : 'http://farm'.$photo->farm.'.staticflickr.com/'.$photo->server.'/'.$photo->id.'_'.$secret.'.'.$format;\n\t\t\t\t$output .= '<img src=\"'.$url.'\" alt=\"'.$photo->title.'\">';\n\t\t\t} else {\n\n\t\t\t\t/* Videos Baby! */\n\t\t\t\t$output .= $this->printVideo($photo->id,$photo->secret,false);\n\t\t\t}\n\t\t\t$output .= '</a>';\n\t\t\t$output .= '</li>';\n\t\t}\n\t\t$output .= '</ul>';\n\t\t\n\t\tif(!$parentNav) $output .= '</div>';\n\n\t\t/* Add Parent Nav */\n\t\tif(!$parentNav) {\n\t\t\t$parentNav = $this->printSets(false);\n\t\t\t$output .= '<section class=\"parentnav\"><div class=\"before\">&laquo;</div>'.$parentNav.'<div class=\"after\">&raquo;</div></section>';\n\t\t\t$output .= '<nav class=\"pagenav\"><ul>'\n\t\t\t\t.'<li class=\"back\"><a href=\"#!/home\">&laquo; Back to Projects</a></li>'\n\t\t\t\t.'</ul></nav>';\n\t\t} else {\n\n\t\t\t$title = isset($parentNav->title) ? $parentNav->title : 'Projects';\n\t\t\t$link = isset($parentNav->id) ? strtolower(urlencode($parentNav->title)).'&amp;id='.$parentNav->id : '';\n\n\t\t\t$output = '<section class=\"parentnav\"><div class=\"before\">&laquo;</div>'.$output.'<div class=\"after\">&raquo;</div></section>';\n\t\t\t$output .= '<nav class=\"pagenav\"><ul>'\n\t\t\t\t.'<li class=\"back\"><a href=\"#!/set='.$link.'\">&laquo; Back to '.$title.'</a></li>'\n\t\t\t\t.'</ul></nav>';\n\t\t}\n\n\t\t/* End HTML */\n\t\tif(!$parentNav) $output .= '</section>';\n\n\t\t/* Output HTML */\n\t\treturn $output;\n\t}", "public function setDescription($description)\n\t{\n\t\t$this->description = $description;\n\n\t\tif($this->pageInitialized)\n\t\t\t$this->setMetaTag('description', $this->description);\n\t}", "function init_groups() {\r\n\tif (!HYPEGALLERY_GROUP_ALBUMS) {\r\n\t\treturn;\r\n\t}\r\n\tadd_group_tool_option('albums', elgg_echo('gallery:groupoption:enable'), true);\r\n\telgg_extend_view('groups/tool_latest', 'framework/gallery/group_module');\r\n}", "function dcwd_set_image_meta_upon_image_upload( $post_ID ) {\n\tif ( wp_attachment_is_image( $post_ID ) ) {\n\t\t$my_image_title = get_post( $post_ID )->post_title;\n\t\t$my_image_title = dcwd_title_to_words( $my_image_title );\n\t\t// Create an array with the image meta (Title, Caption, Description) to be updated\n\t\t// Note: comment out the Excerpt/Caption or Content/Description lines if not needed\n\t\t$my_image_meta = array(\n\t\t\t'ID' => $post_ID,\t\t\t// Specify the image (ID) to be updated\n\t\t\t'post_title' => $my_image_title,\t\t// Set image Title to sanitized title\n\t\t\t// Damien: Omit setting the caption as I rarely use captions when I insert images.\n\t\t\t//'post_excerpt' => $my_image_title,\t\t// Set image Caption (Excerpt) to sanitized title\n\t\t\t'post_content' => $my_image_title,\t\t// Set image Description (Content) to sanitized title\n\t\t);\n\t\t// Set the image Alt-Text\n\t\tupdate_post_meta( $post_ID, '_wp_attachment_image_alt', $my_image_title );\n\t\t// Set the image meta (e.g. Title, Excerpt, Content)\n\t\twp_update_post( $my_image_meta );\n\t} \n}", "public static function edit_image()\n{\n\n\n\t/*\n\t* Change Background\n\t*/\n\n\t/*\n\t* Change other setting\n\t*/\n}", "public final function set_header_image($choice)\n {\n }", "function thb_album_cover_metabox_title( $translated_text, $text, $domain ) {\n\tif ( thb_is_admin_template( thb_get_theme_templates( 'gallery' ) ) ) {\n\t\tif ( $text == 'Featured Image' ) {\n\t\t\t$translated_text = __( 'Album cover', 'thb_text_domain' );\n\t\t}\n\t}\n\n\treturn $translated_text;\n}", "public function setPageDescription($pageDescription)\n {\n $this->_pageDescription = $pageDescription;\n }", "function setDescription( $value )\r\n {\r\n $this->Description = $value;\r\n }", "function setDescription( $value )\r\n {\r\n $this->Description = $value;\r\n }", "function _putimages() {\n parent::_putimages();\n $this->_putformxobjects();\n }", "public static function rename_featured_image_metabox() {\n\n\t\tremove_meta_box( 'postimagediv', self::$post_type_name, 'side' );\n\n\t\tadd_meta_box( 'postimagediv', __( \"Sponsor Logo\", self::$text_domain ), 'post_thumbnail_meta_box', self::$post_type_name, 'side', 'low' );\n\n\t}", "public function setImageName(string $imageName);", "protected function fetchIntroImage(){\n $this->imageIntro = $this->getImageTypeFromImages('intro');\n }", "public function setImageUrl($image_url){\n $this->image_url = $image_url;\n }", "public function element_config()\n\t{\n\t\t$this->config['shortcode'] = 'pb_image';\n\t\t$this->config['name'] = JText::_('JSN_PAGEBUILDER_ELEMENT_IMAGE');\n\t\t$this->config['cat'] = JText::_('JSN_PAGEBUILDER_DEFAULT_ELEMENT_MEDIA');\n\t\t$this->config['icon'] = 'icon-image';\n\t\t$this->config['description'] = JText::_(\"JSN_PAGEBUILDER_ELEMENT_IMAGE_DES\");\n\t}", "public function setDescription ($value) {\n\t\t$this->setData(\"pageDescription\", $value);\n\t\treturn true;\n\t}", "function setupNewsgroups() {\n\t\t$this->setIfNot('hdr_group', 'free.pt');\n\t\t$this->setIfNot('nzb_group', 'alt.binaries.ftd');\n\t\t$this->setIfNot('comment_group', 'free.usenet');\n\t\t$this->setIfNot('report_group', 'free.willey');\n\t\t$this->setIfNot('report_group', 'free.willey');\n\t}", "function wp_credits_section_title($group_data = array())\n {\n }", "public function handleSetMainImage($imgNum){ \n $listingID = $this->hlp->sess(\"listing\")->listingID; \n $this->listings->setMainImage($listingID, $imgNum);\n }", "function group_text_settings_post(array $post)\n{\n\tif (!DI::userSession()->getLocalUserId() || empty($post['group_text-submit'])) {\n\t\treturn;\n\t}\n\n\tDI::pConfig()->set(DI::userSession()->getLocalUserId(), 'system', 'groupedit_image_limit', intval($post['group_text']));\n}", "public function setImages(){\n\t\t// imagen destacada\n $this->thumbail_img = $this->getThumbnailImg();\n // imagenes\n $this->images = $this->getImages();\n\t}", "public function add_image() {\n\t $this->use_layout=false;\n\t $this->page = new $this->model_class(Request::get('id'));\n\t\t$this->join_name = \"images\";\n\t if(Request::post(\"id\")) {\n\t\t $this->image = new WildfireFile(Request::post('id'));\n\t\t $this->image->join_order = Request::post('order');\n\t\t $this->page->images = $this->image;\n\t }\n\t}", "function set_exif_description($filename, $description) {\n echo \" Setting description '$description' for $filename\\n\";\n $description = escapeshellarg($description);\n $cmd = \"/usr/bin/exiftool -overwrite_original -Exif:ImageDescription=$description -IPTC:Caption-Abstract=$description -xmp:description=$description '$filename' 2>&1 1> /dev/null\";\n $results = shell_exec($cmd);\n if(strpos($results, 'looks more like a PNG') !== false) {\n $results = shell_exec(\"/usr/bin/mogrify -format jpg '$filename'\");\n $results = shell_exec($cmd);\n }\n }", "function setFHtgroup($filename){\n $this->fHtgroup=$filename;\n }", "function setFHtgroup($filename){\n $this->fHtgroup=$filename;\n }", "public function add_image_sizes() {\n add_image_size( 'label_thumbnail', 100, 100, true );\n }", "protected function _build() {\n $alt_title = $this->isXhtml ? tep_output_string_protected( str_replace ( '&amp;', '&', $this->attributes['alt'] ) ) : tep_output_string( $this->attributes['alt'] );\n $parameters = tep_not_null( $this->parameters ) ? tep_output_string( $this->parameters ) : false;\n $width = (int)$this->_calculated_width;\n $height = (int)$this->_calculated_height;\n $this->_html = '<img width=\"' . $width . '\" height=\"' . $height . '\" src=\"' . $this->src . '\" title=\"' . $alt_title . '\" alt=\"' . $alt_title . '\"';\n if ( false !== $parameters ) $this->_html .= ' ' . html_entity_decode(tep_output_string( $parameters ));\n $this->_html .= $this->isXhtml ? ' />' : '>'; \n }", "protected function setImageUrl() {\r\n\t\t$previewImageElement = $this->newsItem->getFirstImagePreview();\r\n\t\tif (!empty($previewImageElement)) {\r\n\t\t\t$imgUrl = $GLOBALS['TSFE']->absRefPrefix . 'uploads/tx_news/' . t3lib_div::rawUrlEncodeFP($previewImageElement->getImage());\r\n\t\t\tif (!t3lib_div::isFirstPartOfStr($imgUrl, t3lib_div::getIndpEnv('TYPO3_SITE_URL'))) {\r\n\t\t\t\t$imgUrl = t3lib_div::getIndpEnv('TYPO3_SITE_URL') . $imgUrl;\r\n\t\t\t}\r\n\t\t\t$this->imageUrl = $imgUrl;\r\n\t\t}\r\n\t}", "function horizon_header_with_image( $title, $description, $image_url, $alt = '') {\n\t\t?>\n\t\t\t<header class=\"horizon-header\">\n\t\t\t\t<h2 class=\"title\"><?php echo wp_kses( $title, array('span' => array() ) ); ?></h2>\n\t\t\t\t<span class=\"sep\"></span>\n\t\t\t\t<p class=\"desc\"><?php echo esc_html( $description ); ?></p>\n\t\t\t\t<figure class=\"banner-blog col-lg-12\">\n\t\t\t\t\t<img src=\"<?php echo esc_url( $image_url ); ?>\" alt=\"<?php echo $alt; ?>\">\n\t\t\t\t</figure><!-- .banner-blog -->\n\t\t\t</header><!-- .horizon-header -->\n\t\t<?php\n\t}", "function setImageID( $value )\r\n {\r\n if ( is_a( $value, \"eZImage\" ) )\r\n {\r\n $this->ImageID = $value->id();\r\n }\r\n else if ( is_numeric( $value ) )\r\n {\r\n $this->ImageID = $value;\r\n }\r\n }", "public function setMetaOgImageAttribute($value)\n {\n $this->attributes['meta_og_image'] = $value;\n\n if (empty($value)) {\n $this->attributes['meta_og_image'] = config('settings.meta_og_image');\n }\n }", "public function setImageUrl(string $imageUrl);", "function setFHtgroup($filename){\r\n\t\t$this->fHtgroup=$filename;\r\n\t}", "public function set_image($title, $link, $url){\n\t\t$this->set_channel_element('image', array('title'=>$title, 'link'=>$link, 'url'=>$url));\n\t}", "public function set_description($new) {\n\t\t\t$path = $this->git_directory_path();\n\t\t\tfile_put_contents($path.\"/description\", $new);\n\t\t}", "function dg_add_custom_img_sizes() {\n\t\n\tadd_image_size( 'dg-large', 1250, 1250 );\n\tadd_image_size( 'dg-extra-large', 1700, 1700 );\n\tadd_image_size( 'dg-super-large', 2500, 2500 );\n\t\n\tupdate_option( 'medium_large_size_w', 1000 );\n\tupdate_option( 'medium_large_size_h', 1000 );\n}", "public function setDefaultImage($image);", "private function loadImages(): void\n {\n if (count($this->images) == 1) {\n $this->addMeta('image', $this->images[0]);\n\n return;\n }\n\n foreach ($this->images as $number => $url) {\n $this->addMeta(\"image{$number}\", $url);\n }\n }", "public function add_image( &$data ) {\n\t\tif ( $this->context->has_image ) {\n\t\t\t$data['primaryImageOfPage'] = [ '@id' => $this->context->canonical . WPSEO_Schema_IDs::PRIMARY_IMAGE_HASH ];\n\t\t}\n\t}", "public function setSetDescription($description) {\r\n\t\t$this -> setdescription = $description;\r\n\t}", "function _imageTitle($img) {\n global $ID;\n\n // some fixes on $img['src']\n // see internalmedia() and externalmedia()\n list($img['src']) = explode('#', $img['src'], 2);\n if($img['type'] == 'internalmedia') {\n resolve_mediaid(getNS($ID), $img['src'], $exists ,$this->date_at, true);\n }\n\n return $this->_media(\n $img['src'],\n $img['title'],\n $img['align'],\n $img['width'],\n $img['height'],\n $img['cache']\n );\n }", "function setItem_description($description){\n $this->item_description = $description;\n }", "public function SetGroup($group,$value){\n if($this->_groups[$group][\"currentGroup\"]!=$value){\n if($this->_groups[$group][\"currentGroup\"]!=\"?\"){\n if(isset($this->_groups[$group][\"afterGroup\"])){\n $this->Ln(4);\n $function = array($this->_groups[$group][\"afterGroup\"][\"class\"],$this->_groups[$group][\"afterGroup\"][\"callback\"]);\n $params = array($this,$value);\n call_user_func_array($function,$params);\n }\n $this->Sum();\n }\n if(isset($this->_groups[$group][\"beforeGroup\"])){\n if(($this->GetY() + 22) > ($this->h - 10)){ //22 Altura de una cabecera de grupo\n $this->_changePage = false;\n $this->AddPage();\n }\n $this->Ln(6);\n $this->SetTextColor(100);\n $this->SetFont('Arial','B',11);\n $function = array($this->_groups[$group][\"beforeGroup\"][\"class\"],$this->_groups[$group][\"beforeGroup\"][\"callback\"]);\n $params = array($this,$value);\n $this->_groups[$group][\"currentMsg\"] = call_user_func_array($function,$params);\n $this->Ln(4);\n }\n $this->_groups[$group][\"currentGroup\"] = $value;\n $this->pages[$this->PageNo()] = str_replace(\"{grp_$group}\",$this->_groups[$group][\"currentMsg\"],$this->pages[$this->PageNo()]);\n $this->__Header();\n $this->_changePage = false;\n $this->SumRe();\n }else{\n $this->_changePage = true;\n }\n }", "function setDescription($description) {\n\t\t$this->description = $description;\n\t}", "function wp_image_add_srcset_and_sizes($image, $image_meta, $attachment_id)\n {\n }", "protected function set_meta_desc()\r\r\n {\r\r\n define('_KEYWORDS',_BUY_ONLINE);\r\r\n define('_DESCRIPTION',_BUY_ONLINE);\r\r\n define('_TITLE_PAGE',_BUY_ONLINE);\r\r\n }", "public function setImage($a_image = 0)\n\t{\n\t\t$this->image = $a_image;\n\t}", "public function add_group($group_name) {\n $this->page_fields[]=array('sub_heading'=>$group_name,'fields'=>array());\n }", "function set_description($description)\r\n {\r\n $this->set_default_property(self :: PROPERTY_DESCRIPTION, $description);\r\n }", "public static function description($description)\n {\n // Set page description\n self::$data['description'] = $description;\n }", "public function setPoolDescription($description)\n\t{\n\t\t$this->setProperty('description', $description);\n\t}", "public function testAssignDescription()\n {\n $this->markTestIncomplete(\n 'This test has not been implemented yet.'\n );\n }", "function createImage($idName) { //TODO: Add parameter for passing image files to use instead \n echo '<img src=\"/php/cms-img/file2.png\" id=\"' . $idName . '\" class=\"nested\"/>';\n }", "function buildDescription($data) {\n $description_array = array();\n //Get image info.\n $imageinfo = image_get_info($data->uri);\n\n if ($this->conf['image_extra_info']['thumbnail']) {\n $image = $imageinfo ? theme_image_style(array(\n 'width' => $imageinfo['width'],\n 'height' => $imageinfo['height'],\n 'style_name' => 'linkit_thumb',\n 'path' => $data->uri,\n )) : '';\n }\n\n if ($this->conf['image_extra_info']['dimensions'] && !empty($imageinfo)) {\n $description_array[] = $imageinfo['width'] . 'x' . $imageinfo['height'] . 'px';\n }\n\n $description_array[] = parent::buildDescription($data);\n\n if ($this->conf['show_scheme']) {\n $description_array[] = file_uri_scheme($data->uri) . '://';\n }\n\n $description = (isset($image) ? $image : '') . implode('<br />' , $description_array);\n\n return $description;\n }", "public function KemiSitemap_description()\n {\n echo '<p>Kemi Sitemap Description</p>';\n }", "public function setImageUrl( $imageUrl ){\n \n // set image url\n $this->imageUrl = $imageUrl;\n \n }", "function wpec_gd_replace_settings_text( $translated_text, $source_text, $domain ) {\n if ( 'Insert into Post' == $source_text ) {\n return __( 'Use Image as Logo', 'wpec-group-deals');\n }\n return $translated_text;\n }", "function display_album($img_in_album, $title, $width, $height) {\n echo '<img id=\"imgFromAlbum\" src=\"uploads/' . $img_in_album . '\" title=\"' . $title . '\" height=\"' . $height .'\" width=\"' . $width .'\" />';\n\t}", "function gallery($imgloc, $imgurl, $alt, $title, $align, $class)\n {\n\n static $mt_gallery_count = 0;\n\n if ($mt_gallery_count) {\n return false;\n }\n\n $mt_gallery_count++;\n\n if (!@fopen($imgloc, 'r')) {\n // can't open file. Ignore it.\n return false;\n }\n\n $old_caption_type_iptc = $this->_params->get('caption_type_iptc');\n $old_caption_type_filename = $this->_params->get('caption_type_filename');\n $old_caption_type_title = $this->_params->get('caption_type_title');\n $old_caption_type_alt = $this->_params->get('caption_type_alt');\n\n $this->_params->set('caption_type_iptc', $this->_params->get('caption_type_gallery_iptc'));\n $this->_params->set('caption_type_filename', $this->_params->get('caption_type_gallery_filename'));\n $this->_params->set('caption_type_title', $this->_params->get('caption_type_gallery_title'));\n $this->_params->set('caption_type_alt', $this->_params->get('caption_type_gallery_alt'));\n\n $pathinfo = pathinfo($imgloc);\n $filepatt = \"$pathinfo[dirname]/{*.gif,*.jpg,*.png,*.GIF,*.JPG,*.PNG}\";\n\n\n $style = $align ? ' align=\"' . $align . '\" ' : '';\n $gallery = '<table class=\"' . $this->_params->get('gallery_class') . '\" >' . \"\\n\";\n\n $n = 0;\n $lblinks = '';\n\n if (file_exists(\"$imgloc.txt\")) {\n $imglist = file_get_contents(\"$imgloc.txt\");\n preg_match_all('/(\\S+\\.(?:jpg|png|gif))\\s(.*)/i', $imglist, $files, PREG_SET_ORDER);\n $dir = dirname($imgurl);\n } else {\n $files = glob($filepatt, GLOB_BRACE);\n sort($files);\n $imgpos = array_search($imgloc, $files);\n $files = array_merge(array_slice($files, $imgpos), array_slice($files, 0, $imgpos));\n $dir = dirname($imgurl);\n }\n\n// \tif($alt=='mt_gallery') {\n $this->mt_gallery_count++;\n\n if (!$alt) {\n $alt = $title;\n }\n\n if (!$alt) {\n $alt = \"gallery\" . $this->mt_gallery_count;\n }\n\n\n// \t}\n\n $mt_gallery_more = 0;\n\n foreach ($files as $file) {\n if (is_array($file)) {\n $fn = $dir . '/' . $file[1];\n $title = str_replace(\"'\", '&#39;', $file[2]);\n } else {\n $fn = $dir . '/' . basename($file);\n }\n $this->is_gallery = true;\n $galimg = preg_replace_callback($this->regex,\n array(&$this, 'image_replacer'),\n '<img ' . $style . ' class=\"' . $class . '\" alt=\"' . $alt . '\" title=\"' . $title . '\" src=\"' . $fn . '\" />' . \"\\n\");\n $this->is_gallery = false;\n if (!(strpos($galimg, '<img') === false)) {\n\n if ($n % $this->_params->get('num_cols') == 0) {\n $gallery .= '<tr class=\"' . $this->_params->get('gallery_class') . '\" >';\n }\n $gallery .= '<td class=\"' . $this->_params->get('gallery_class') . '\" valign=\"bottom\" nowrap=\"nowrap\" ' . $style . '>' . $galimg . '</td>\n';\n $n++;\n if ($n % $this->_params->get('num_cols') == 0) {\n $gallery .= \"</tr>\\n\";\n }\n } else if (substr($galimg, 0, 2) == '<a') {\n {\n $lblinks .= $galimg;\n }\n }\n }\n\n $gallery .= str_repeat('<td>&nbsp;</td>', $this->_params->get('num_cols') - 1 - ($n - 1) % $this->_params->get('num_cols')) . \"</tr>\";\n $gallery .= \"</table>\\n\";\n\n\n $this->_params->set('caption_type_iptc', $old_caption_type_iptc);\n $this->_params->set('caption_type_filename', $old_caption_type_filename);\n $this->_params->set('caption_type_title', $old_caption_type_title);\n $this->_params->set('caption_type_alt', $old_caption_type_alt);\n\n\n $mt_gallery_count--;\n return $gallery . $lblinks;\n\n }", "protected function set_initial_groups()\n {\n $this->_groups = apply_filters('ngg_admin_requirements_manager_groups', array('phpext' => __('NextGen Gallery requires the following PHP extensions to function correctly. Please contact your hosting provider or systems admin and ask them for assistance:', 'nggallery'), 'phpver' => __('NextGen Gallery has degraded functionality because of your PHP version. Please contact your hosting provider or systems admin and ask them for assistance:', 'nggallery'), 'dirperms' => __('NextGen Gallery has found an issue trying to access the following files or directories. Please ensure the following locations have the correct permissions:', 'nggallery')));\n }", "function wp_img_tag_add_srcset_and_sizes_attr($image, $context, $attachment_id)\n {\n }", "protected function onImageText() {\n\t\tif (!$this->post = $this->loadPost()) {\n\t\t\treturn null;\n\t\t}\n\t\t$titles = post('ititle');\n\t\t$descriptions = post('idescription');\n\n\t\tforeach ($this->post->featured_images()->get() as $image) {\n\n\t\t\t$image->title = $titles[$image->id];\n\t\t\t$image->description = $descriptions[$image->id];\n\t\t\t$image->save();\n\t\t}\n\t}" ]
[ "0.5968117", "0.59102964", "0.58638966", "0.5598367", "0.55927694", "0.5518645", "0.54982185", "0.53999734", "0.53789943", "0.5377425", "0.53565586", "0.5338423", "0.5338003", "0.5305669", "0.53005415", "0.5300302", "0.5296377", "0.5291237", "0.5273274", "0.5261732", "0.52586204", "0.524594", "0.5241582", "0.52377266", "0.5227095", "0.5208231", "0.5202002", "0.52019864", "0.51941484", "0.5187343", "0.51853883", "0.5184458", "0.51790303", "0.5177182", "0.51735574", "0.5167022", "0.5166393", "0.51533896", "0.51393336", "0.5128403", "0.5127852", "0.51269805", "0.51241326", "0.51191854", "0.5106577", "0.5101496", "0.5101496", "0.5098012", "0.5086736", "0.5083051", "0.5081586", "0.5059572", "0.5056576", "0.50388443", "0.50330675", "0.5018633", "0.50143313", "0.5011737", "0.50097996", "0.5008753", "0.50082755", "0.50017726", "0.50017726", "0.5000932", "0.4999168", "0.4997924", "0.49935982", "0.4990975", "0.49876034", "0.49739307", "0.49675536", "0.49662328", "0.49643567", "0.4962575", "0.49616978", "0.49608132", "0.49586424", "0.49497294", "0.49421498", "0.49312901", "0.49295408", "0.49168527", "0.49130008", "0.49111623", "0.49082604", "0.4899555", "0.4898818", "0.4898528", "0.48939627", "0.4886795", "0.4882746", "0.488156", "0.48790672", "0.4877593", "0.48774782", "0.48712805", "0.48680377", "0.48613003", "0.48594213", "0.48565158" ]
0.54011196
7
Set the Grouping page image template
public function setImageTemplate($imageTemplate = "") { $this->imageTemplate = isset($imageTemplate) ? trim($imageTemplate).'-banner' : 'basic-banner'; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function set_template($group) {\n if (isset($this->config[$group])) {\n $this->template = $this->config[$group];\n } else {\n show_error('The \"' . $group . '\" template group does not exist. Provide a valid group name or add the group first.');\n }\n $this->initialize($this->template);\n }", "public function displayPage()\n {\n $this->getState()->template = 'displaygroup-page';\n }", "public function setTemplate($value);", "function bethel_add_image_to_pages() {\n\tglobal $post;\n\tif ($post) {\n\t\t$image_id = get_post_thumbnail_id ($post->ID);\n\t\tif ($image_id) {\n\t\t\tif ($post->post_type != 'bethel_stories' && $post->page_template != 'stories.php') {\n\t\t\t\t$image = wp_get_attachment_image_src($image_id, 'bethel_supersize');\n\t\t\t\tif ($image) {\n\t\t\t\t\tif ($image[1] < 800) { //width\n\t\t\t\t\t\t$image[2] = round($image [2] / $image[1] * 800);\n\t\t\t\t\t}\n\t\t\t\t\t$image[2] = ($image[2] > 400) ? 400 : $image[2]; //height\n\t\t\t\t\techo \"<style type=\\\"text/css\\\">.entry-header { height: {$image[2]}px; background-image: url('{$image[0]}')}</style>\";\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\techo \"<style type=\\\"text/css\\\">\n .content .entry-header { margin-top: 75px; margin-top: 7.5rem }\n .content .entry-content { padding-top: 25px; padding-top: 2.5rem; }\n </style>\";\n\t\t}\n\t}\n}", "abstract protected function setTemplate($item);", "public function getImageTemplate() { return $this->imageTemplate; }", "public function setPrimaryImageOfPage($value)\n {\n $this->primaryImageOfPage = $value;\n }", "function init() {\n if( !is_object( $this->ipsclass->compiled_templates['skin_gallery_imagelisting'] ) ) {\n \t$this->ipsclass->load_template('skin_gallery_imagelisting');\n }\n $this->img_html = $this->ipsclass->compiled_templates[ 'skin_gallery_imagelisting' ];\n }", "public function setTemplate($p);", "protected function _setTemplateMeta(){\n $this->template->project_name = $this->config['project']['name'] ;\n $this->template->title = $this->config['view']['title'] ;\n $this->template->keywords = $this->config['view']['keywords'];\n $this->template->description = $this->config['view']['description'];\n }", "function admin_cropImage()\r\n {\r\n // setting the layout for admin\r\n $this->layout = 'admin';\r\n \r\n // Setting the page title\r\n $this->set(\"title_for_layout\",\"Image Crop\");\r\n \r\n }", "function setTemplate($value) {\n $this->template = $value;\n }", "function setTemplate($template);", "function display_full_image_template($classified_id)\n {\n if (!$classified_id) {\n return false;\n }\n $db = DataAccess::getInstance();\n $listing = geoListing::getListing($classified_id);\n if ($listing && $listing->category) {\n $template_category = (int)$listing->category;\n } else {\n return false;\n }\n\n $view = geoView::getInstance();\n $view->setCategory((int)$template_category);\n //don't do the template stuff, let view class do that...\n //just set the vars\n $template_file = $view->getTemplateAttachment('84_detail', $this->language_id, $template_category);\n\n $this->get_image_data($db, $classified_id, 1);\n reset($this->images_to_display);\n\n $images = array();\n\n foreach ($this->images_to_display as $value) {\n $tpl = new geoTemplate(geoTemplate::MAIN_PAGE, '');\n\n //check any full sized image limits\n if (\n ($value[\"original_image_width\"] > $this->ad_configuration_data->MAXIMUM_FULL_IMAGE_WIDTH) ||\n ($value[\"original_image_height\"] > $this->ad_configuration_data->MAXIMUM_FULL_IMAGE_HEIGHT)\n ) {\n if (($value[\"original_image_width\"] > $this->ad_configuration_data->MAXIMUM_FULL_IMAGE_WIDTH) && ($value[\"original_image_height\"] > $this->ad_configuration_data->MAXIMUM_FULL_IMAGE_HEIGHT)) {\n $imageprop = ($this->ad_configuration_data->MAXIMUM_FULL_IMAGE_WIDTH * 100) / $value[\"original_image_width\"];\n $imagevsize = ($value[\"original_image_height\"] * $imageprop) / 100 ;\n $image_width = $this->ad_configuration_data->MAXIMUM_FULL_IMAGE_WIDTH;\n $image_height = ceil($imagevsize);\n\n if ($image_height > $this->ad_configuration_data->MAXIMUM_FULL_IMAGE_HEIGHT) {\n $imageprop = ($this->ad_configuration_data->MAXIMUM_FULL_IMAGE_HEIGHT * 100) / $value[\"original_image_height\"];\n $imagehsize = ($value[\"original_image_width\"] * $imageprop) / 100 ;\n $image_height = $this->ad_configuration_data->MAXIMUM_FULL_IMAGE_HEIGHT;\n $image_width = ceil($imagehsize);\n }\n } elseif ($value[\"original_image_width\"] > $this->ad_configuration_data->MAXIMUM_FULL_IMAGE_WIDTH) {\n $imageprop = ($this->ad_configuration_data->MAXIMUM_FULL_IMAGE_WIDTH * 100) / $value[\"original_image_width\"];\n $imagevsize = ($value[\"original_image_height\"] * $imageprop) / 100 ;\n $image_width = $this->ad_configuration_data->MAXIMUM_FULL_IMAGE_WIDTH;\n $image_height = ceil($imagevsize);\n } elseif ($value[\"original_image_height\"] > $this->ad_configuration_data->MAXIMUM_FULL_IMAGE_HEIGHT) {\n $imageprop = ($this->ad_configuration_data->MAXIMUM_FULL_IMAGE_HEIGHT * 100) / $value[\"original_image_height\"];\n $imagehsize = ($value[\"original_image_width\"] * $imageprop) / 100 ;\n $image_height = $this->ad_configuration_data->MAXIMUM_FULL_IMAGE_HEIGHT;\n $image_width = ceil($imagehsize);\n } else {\n $image_width = $value[\"original_image_width\"];\n $image_height = $value[\"original_image_height\"];\n }\n } else {\n $image_width = $value[\"original_image_width\"];\n $image_height = $value[\"original_image_height\"];\n }\n\n if ($value['icon']) {\n $image = \"<a href=\\\"\" . $value['url'] . \"\\\"><img src=\\\"\" . geoTemplate::getUrl('', $value['icon']) . \"\\\" alt=\\\"\\\" style=\\\"border: none;\\\" /></a>\";\n } else {\n $image = \"<img src='{$value[\"url\"]}' alt='' />\";\n }\n\n $tpl->assign('full_size_image', $image);\n if (strlen($value[\"image_text\"]) > 0) {\n $text = \"<br />\" . $value[\"image_text\"];\n $tpl->assign('full_size_text', $text);\n }\n\n $images[] = $tpl->fetch($template_file);\n }\n return $images;\n }", "protected function setPageTemplate($template)\r\n {\r\n $this->pageTemplate = $template;\r\n }", "public function setTemplate($template) {\n \n\n \t$this->display($template);\n }", "protected function setupTemplate() {\r\n \r\n }", "public function setTemplate($template);", "public function setTemplate($template);", "public function setTemplate($val){ return $this->setField('template',$val); }", "function inject_css(){\n $group_id=bp_get_current_group_id();\n if(empty($group_id))\n return;\n $image=bgclite_get_image($group_id);\n \n if(empty($image)|| apply_filters('bp_group_customizer_iwilldo_it_myself',false))\n return;\n ?>\n <style type=\"text/css\">\n body.is-single-group{\n background:url(<?php echo $image;?>) center top fixed no-repeat,url(\"http://sill-web.de/gzc/wp-content/themes/yoo_master2_wp/css/navy_blue.png\") repeat;\n }\n </style> \n <?php\n\n }", "private function fillTemplate() {\n\t\tglobal $tpl;\n\t\t$tpl->addCss('./Customizing/global/plugins/Services/Repository/RepositoryObject/Review/templates/default/css/Review.css');\n\t\t$path_to_il_tpl = ilPlugin::getPluginObject(IL_COMP_SERVICE, 'Repository', 'robj', 'Review')->getDirectory();\n\t\t$custom_tpl = new ilTemplate(\"tpl.matrix_row.html\", true, true, $path_to_il_tpl);\n foreach ((array) $this->checkboxes as $chbox) {\n\t\t\t$chbox->insert($custom_tpl);\n }\n\n\t\t$this->setHTML($custom_tpl->get());\n }", "public function setTemplate($template)\n {\n if(is_array($template)){\n $this->current_template = $this->igt_template;\n $this->setValue($template);\n }\n\n }", "public function create_group()\r\n\t{\r\n\t\t// Load template\r\n\t\tinclude(BLUPATH_TEMPLATES .'/site/modules/create_group.php');\r\n\t}", "function fumseck_default_image( $post_type ) {\n\t\n\tif ( ($post_type == 'post') or ($post_type == 'page') ) {\n\t\t\n\t\t$output = '<img class=\"img-responsive\" width=\"760\" height=\"247\" '\n\t\t\t\t\t. 'alt=\"Vitruve Man\" '\n\t\t\t\t\t. 'src=\"' . get_template_directory_uri() . '/images/default-picture-760.jpg' . '\"></img>';\n\t\techo $output;\n\t}\n}", "protected function register_style_team_member_image() {\n\t\t$this->start_controls_section(\n\t\t\t'section_team_member_image_style',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Image', 'uael' ),\n\t\t\t\t'tab' => Controls_Manager::TAB_STYLE,\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'image_position',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Image Position', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::SELECT,\n\t\t\t\t'default' => 'above',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'above' => __( 'Top', 'uael' ),\n\t\t\t\t\t'left' => __( 'Left', 'uael' ),\n\t\t\t\t\t'right' => __( 'Right', 'uael' ),\n\t\t\t\t),\n\t\t\t\t'prefix_class' => 'uael-member-image-pos-',\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'member_mob_view',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Responsive Support', 'uael' ),\n\t\t\t\t'description' => __( 'Choose the breakpoint you want the layout will stack.', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::SELECT,\n\t\t\t\t'default' => 'none',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'none' => __( 'No', 'uael' ),\n\t\t\t\t\t'tablet' => __( 'For Tablet & Mobile ', 'uael' ),\n\t\t\t\t\t'mobile' => __( 'For Mobile Only', 'uael' ),\n\t\t\t\t),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'image_position' => array( 'left', 'right' ),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'member_image_valign',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Vertical Alignment', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::CHOOSE,\n\t\t\t\t'label_block' => false,\n\t\t\t\t'options' => array(\n\t\t\t\t\t'top' => array(\n\t\t\t\t\t\t'title' => __( 'Top', 'uael' ),\n\t\t\t\t\t\t'icon' => 'eicon-v-align-top',\n\t\t\t\t\t),\n\t\t\t\t\t'middle' => array(\n\t\t\t\t\t\t'title' => __( 'Middle', 'uael' ),\n\t\t\t\t\t\t'icon' => 'eicon-v-align-middle',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'default' => 'top',\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'image_position' => array( 'left', 'right' ),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'align_team_member',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Overall Alignment', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::CHOOSE,\n\t\t\t\t'options' => array(\n\t\t\t\t\t'left' => array(\n\t\t\t\t\t\t'title' => __( 'Left', 'uael' ),\n\t\t\t\t\t\t'icon' => 'fa fa-align-left',\n\t\t\t\t\t),\n\t\t\t\t\t'center' => array(\n\t\t\t\t\t\t'title' => __( 'Center', 'uael' ),\n\t\t\t\t\t\t'icon' => 'fa fa-align-center',\n\t\t\t\t\t),\n\t\t\t\t\t'right' => array(\n\t\t\t\t\t\t'title' => __( 'Right', 'uael' ),\n\t\t\t\t\t\t'icon' => 'fa fa-align-right',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'image_position' => 'above',\n\t\t\t\t),\n\t\t\t\t'default' => 'center',\n\t\t\t\t'prefix_class' => 'uael%s-team-member-align-',\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'image_shape',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Shape', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::SELECT,\n\t\t\t\t'default' => 'square',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'square' => __( 'Square', 'uael' ),\n\t\t\t\t\t'rounded' => __( 'Rounded', 'uael' ),\n\t\t\t\t\t'circle' => __( 'Circle', 'uael' ),\n\t\t\t\t),\n\t\t\t\t'prefix_class' => 'uael-shape-',\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'team_member_image_border_radius',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Border Radius', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::DIMENSIONS,\n\t\t\t\t'size_units' => array( 'px', '%' ),\n\t\t\t\t'default' => array(\n\t\t\t\t\t'top' => '10',\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t\t'right' => '10',\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t\t'bottom' => '10',\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t\t'left' => '10',\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .uael-team-member-image img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n\t\t\t\t),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'image_shape' => array( 'rounded' ),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'image_border',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Border Style', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::SELECT,\n\t\t\t\t'default' => 'none',\n\t\t\t\t'label_block' => false,\n\t\t\t\t'options' => array(\n\t\t\t\t\t'none' => __( 'None', 'uael' ),\n\t\t\t\t\t'solid' => __( 'Solid', 'uael' ),\n\t\t\t\t\t'double' => __( 'Double', 'uael' ),\n\t\t\t\t\t'dotted' => __( 'Dotted', 'uael' ),\n\t\t\t\t\t'dashed' => __( 'Dashed', 'uael' ),\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .uael-team-member-image img' => 'border-style: {{VALUE}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t\t$this->add_control(\n\t\t\t\t'image_border_size',\n\t\t\t\tarray(\n\t\t\t\t\t'label' => __( 'Border Width', 'uael' ),\n\t\t\t\t\t'type' => Controls_Manager::DIMENSIONS,\n\t\t\t\t\t'size_units' => array( 'px' ),\n\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t'top' => '1',\n\t\t\t\t\t\t'bottom' => '1',\n\t\t\t\t\t\t'left' => '1',\n\t\t\t\t\t\t'right' => '1',\n\t\t\t\t\t\t'unit' => 'px',\n\t\t\t\t\t),\n\t\t\t\t\t'condition' => array(\n\t\t\t\t\t\t'image_border!' => 'none',\n\t\t\t\t\t),\n\t\t\t\t\t'selectors' => array(\n\t\t\t\t\t\t'{{WRAPPER}} .uael-team-member-image img' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}; box-sizing:border-box;',\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$this->add_control(\n\t\t\t\t'image_border_color',\n\t\t\t\tarray(\n\t\t\t\t\t'label' => __( 'Border Color', 'uael' ),\n\t\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t\t'scheme' => array(\n\t\t\t\t\t\t'type' => Scheme_Color::get_type(),\n\t\t\t\t\t\t'value' => Scheme_Color::COLOR_1,\n\t\t\t\t\t),\n\t\t\t\t\t'condition' => array(\n\t\t\t\t\t\t'image_border!' => 'none',\n\t\t\t\t\t),\n\t\t\t\t\t'default' => '',\n\t\t\t\t\t'selectors' => array(\n\t\t\t\t\t\t'{{WRAPPER}} .uael-team-member-image img' => 'border-color: {{VALUE}};',\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$this->add_control(\n\t\t\t\t'image_border_hover_color',\n\t\t\t\tarray(\n\t\t\t\t\t'label' => __( 'Border Hover Color', 'uael' ),\n\t\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t\t'scheme' => array(\n\t\t\t\t\t\t'type' => Scheme_Color::get_type(),\n\t\t\t\t\t\t'value' => Scheme_Color::COLOR_2,\n\t\t\t\t\t),\n\t\t\t\t\t'default' => '',\n\t\t\t\t\t'selectors' => array(\n\t\t\t\t\t\t'{{WRAPPER}} .uael-team-member-image img:hover' => 'border-color: {{VALUE}};',\n\t\t\t\t\t),\n\t\t\t\t\t'condition' => array(\n\t\t\t\t\t\t'image_border!' => 'none',\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\n\t\t$this->add_control(\n\t\t\t'hover_animation',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Hover Animation', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::HOVER_ANIMATION,\n\t\t\t)\n\t\t);\n\n\t\t$this->end_controls_section();\n\t}", "function createImage($idName) { //TODO: Add parameter for passing image files to use instead \n echo '<img src=\"/php/cms-img/file2.png\" id=\"' . $idName . '\" class=\"nested\"/>';\n }", "function _putimages() {\n parent::_putimages();\n $this->_putformxobjects();\n }", "public function setTemplate($file);", "public function render()\n {\n $fallbackLogo = FileUtility::findFilesBy(1, 'pages', 'logo');\n\n $page = $this->getPage();\n $logo = FileUtility::findFilesBy($page['uid'], 'pages', 'logo');\n\n if (!is_array($logo) || empty($logo)) {\n $logo = $fallbackLogo;\n }\n\n if (is_array($logo)) {\n $this->templateVariableContainer->add('logo', $logo[0] ?? null);\n }\n }", "private function setTemplate(){\n if (isset($this->data['template']) && !empty($this->data['template'])){\n $template = APP_ROOT.'/app/templates/'.trim($this->data['template']).'.tpl';\n if (file_exists($template)){\n $this->template = $template;\n return;\n }\n }\n //default\n $this->template = APP_ROOT.'/app/templates/default.tpl';\n }", "public function draw_template($template) {\n\n $name = $template->getName();\n $templateId = $template->getId();\n\n $img_url = plugin_dir_url( dirname(__FILE__) ).\"img/\".$template->getImage();\n\n include Config::VIEW_PATH.\"template.php\";\n }", "public function setDefaultImage($image);", "public function setTemplateType($value);", "function x_control_image( $settings = array() ) {\n\n // Setup\n // -----\n\n $t_pre = ( isset( $settings['t_pre'] ) ) ? $settings['t_pre'] . ' ' : '';\n $k_pre = ( isset( $settings['k_pre'] ) ) ? $settings['k_pre'] . '_' : '';\n $group = ( isset( $settings['group'] ) ) ? $settings['group'] : 'general';\n $options = ( isset( $settings['options'] ) ) ? $settings['options'] : array();\n $condition = ( isset( $settings['condition'] ) ) ? $settings['condition'] : array();\n $is_retina = ( isset( $settings['is_retina'] ) ) ? true : false;\n $width = ( isset( $settings['width'] ) ) ? true : false;\n $height = ( isset( $settings['height'] ) ) ? true : false;\n $has_link = ( isset( $settings['has_link'] ) ) ? true : false;\n $has_info = ( isset( $settings['has_info'] ) ) ? true : false;\n $alt_text = ( isset( $settings['alt_text'] ) ) ? true : false;\n\n\n // Data\n // ----\n\n $data = array(\n 'type' => 'image',\n 'title' => __( $t_pre . 'Image', '__x__' ),\n 'group' => $group,\n 'options' => $options,\n 'conditions' => x_module_conditions( $condition ),\n );\n\n\n // Keys\n // ----\n\n $keys = array(\n 'img_source' => $k_pre . 'image_src',\n );\n\n if ( $is_retina === true ) {\n $keys['is_retina'] = $k_pre . 'image_retina';\n }\n\n if ( $width === true ) {\n $keys['width'] = $k_pre . 'image_width';\n }\n\n if ( $height === true ) {\n $keys['height'] = $k_pre . 'image_height';\n }\n\n if ( $has_link === true ) {\n $keys['has_link'] = $k_pre . 'image_link';\n }\n\n if ( $has_info === true ) {\n $keys['has_info'] = $k_pre . 'image_info';\n }\n\n if ( $alt_text === true ) {\n $keys['alt_text'] = $k_pre . 'image_alt';\n }\n\n $data['keys'] = $keys;\n\n\n // Returned Value\n // --------------\n\n $control = array( $data );\n\n return $control;\n\n}", "function setupTemplate($subclass = false) {\n\t\t$templateMgr =& TemplateManager::getManager();\n\t\tif ($subclass) {\n\t\t\t$templateMgr->append(\n\t\t\t\t'pageHierarchy',\n\t\t\t\tarray(\n\t\t\t\t\tRequest::url(null, 'dataverse'), \n\t\t\t\t\tAppLocale::Translate('plugins.generic.dataverse.displayName'),\n\t\t\t\t\ttrue\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}", "protected function setPageTemplate(PageTemplate $template) {\n\t\t$container = $template->initialize($this);\n\t\tif ($container !== null) {\n\t\t\t$this->_body = $container;\n\t\t}\n\t}", "public function locatedTemplate() {\r\n wp_enqueue_script(\r\n 'mvvwb-gallery',\r\n MVVWB_GALLERY_TEMPLATE_BASE . 'index.js',\r\n [],\r\n MVVWB_GALLERY_TEMPLATE_VERSION\r\n );\r\n\r\n foogallery_enqueue_style(\r\n 'mvvwb-gallery',\r\n MVVWB_GALLERY_TEMPLATE_BASE . 'style.css',\r\n [],\r\n MVVWB_GALLERY_TEMPLATE_VERSION\r\n );\r\n }", "function TS_VCSC_Add_Posts_Image_Lean() {\r\n\t\t\t\tvc_lean_map('TS_VCSC_Posts_Image_Grid_Standalone',\t\t\tarray($this, 'TS_VCSC_Add_Posts_Image_Elements'), null);\r\n\t\t\t}", "function setImagePath($image_path) {\n $this->local_image_path = $image_path;\n if(empty($this->local_image_path)) {\n $this->local_image_path = SugarThemeRegistry::get($this->local_theme)->getImagePath();\n }\n if(isset($this->xTemplate))$this->xTemplate->assign(\"IMAGE_PATH\", $this->local_image_path);\n}", "private function configureTemplate(){\n\t\t$template = $this->getTemplate();\n\t\t$template->setPageSubtitle($this->getModule()->getDisplayedName());\n\t}", "protected function content_template() {\n\t\t?>\n\t\t<#\n\t\t\tif ( 'left' == settings.image_position || 'right' == settings.image_position ) {\n\t\t\t\tif ( 'tablet' == settings.member_mob_view ) {\n\n\t\t\t\t\tview.addRenderAttribute( 'member-classname', 'class', 'uael-member-stacked-tablet' );\n\t\t\t\t}\n\t\t\t\tif ( 'mobile' == settings.member_mob_view ) {\n\n\t\t\t\t\tview.addRenderAttribute( 'member-classname', 'class', 'uael-member-stacked-mobile' );\n\t\t\t\t}\n\t\t\t\tif ( 'middle' == settings.member_image_valign ) {\n\t\t\t\t\tview.addRenderAttribute( 'member-classname', 'class', 'uael-member-image-valign-middle' );\n\t\t\t\t} else {\n\t\t\t\t\tview.addRenderAttribute( 'member-classname', 'class', 'uael-member-image-valign-top' );\n\t\t\t\t}\n\t\t\t}\n\t\t\tview.addRenderAttribute( 'member-classname', 'class', 'uael-team-member' );\n\t\t#>\n\t\t<div {{{ view.getRenderAttributeString( 'member-classname' ) }}} >\n\t\t\t<div class=\"uael-team-member-wrap\">\n\t\t\t\t<div class=\"uael-member-wrap\">\n\t\t\t\t\t<#\n\t\t\t\t\tvar image = {\n\t\t\t\t\t\tid: settings.image.id,\n\t\t\t\t\t\turl: settings.image.url,\n\t\t\t\t\t\tsize: settings.image_size,\n\t\t\t\t\t\tdimension: settings.image_custom_dimension,\n\t\t\t\t\t\tmodel: view.getEditModel()\n\t\t\t\t\t};\n\n\t\t\t\t\tvar image_url = elementor.imagesManager.getImageUrl( image );\n\t\t\t\t\tif( image_url !== '' ) {\n\t\t\t\t\t#>\n\t\t\t\t\t\t<div class=\"uael-team-member-image\"><img src=\"{{{ image_url }}}\" class=\"elementor-animation-{{{settings.hover_animation}}}\" ></div>\n\t\t\t\t\t\t<#\n\t\t\t\t\t}\n\t\t\t\t\tview.addRenderAttribute( 'member_content', 'class', 'uael-team-member-content' ); #>\n\t\t\t\t\t<div {{{ view.getRenderAttributeString( 'member_content' )}}} >\n\t\t\t\t\t\t<div class=\"uael-team-member-name\">\n\t\t\t\t\t\t\t<# if ( '' !== settings.team_member_name ) {\n\t\t\t\t\t\t\t\tview.addRenderAttribute( 'team_member_name', 'class', 'uael-team-name' );\n\t\t\t\t\t\t\t\tview.addInlineEditingAttributes( 'team_member_name' );\n\t\t\t\t\t\t\t\tvar memberNameHtml = settings.team_member_name;\n\t\t\t\t\t\t\t\t#>\n\t\t\t\t\t\t\t\t<{{{settings.name_size}}} {{{ view.getRenderAttributeString( 'team_member_name' )}}}>{{{settings.team_member_name}}}</{{{settings.name_size}}}>\n\t\t\t\t\t\t\t<# } #>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<# \n\t\t\t\t\t\tif( 'yes' == settings.separator_settings) {\n\t\t\t\t\t\t\tif( 'below_name' == settings.separator_position ) { #>\n\t\t\t\t\t\t\t\t<div class=\"uael-separator-wrapper\">\n\t\t\t\t\t\t\t\t\t<div class=\"uael-separator\"></div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<# } #>\n\t\t\t\t\t\t<# } #>\n\t\t\t\t\t\t<div class=\"uael-team-member-designation\">\n\t\t\t\t\t\t\t<# if ( '' !== settings.team_member_desig ) {\n\t\t\t\t\t\t\t\tview.addRenderAttribute( 'team_member_desig', 'class', 'uael-team-desig' );\n\n\t\t\t\t\t\t\t\tview.addInlineEditingAttributes( 'team_member_desig' );\n\n\t\t\t\t\t\t\t\tvar memberDesignHtml = settings.team_member_desig;\n\t\t\t\t\t\t\t\t#>\n\t\t\t\t\t\t\t\t<div {{{ view.getRenderAttributeString( 'team_member_desig' ) }}}>{{{ memberDesignHtml }}}</div>\n\t\t\t\t\t\t\t<# } #>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<# if( 'yes' == settings.separator_settings) {\n\t\t\t\t\t\t\tif( 'below_desig' == settings.separator_position ) { #>\n\t\t\t\t\t\t\t\t<div class=\"uael-separator-wrapper\">\n\t\t\t\t\t\t\t\t\t<div class=\"uael-separator\"></div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<# } #>\n\t\t\t\t\t\t<# } #>\n\t\t\t\t\t\t<div class=\"uael-team-member-desc\">\n\t\t\t\t\t\t\t<# if ( '' !== settings.team_member_desc ) {\n\t\t\t\t\t\t\t\tview.addRenderAttribute( 'team_member_desc', 'class', 'uael-team-desc' );\n\n\t\t\t\t\t\t\t\tview.addInlineEditingAttributes( 'team_member_desc' );\n\n\t\t\t\t\t\t\t\tvar memberDescHtml = settings.team_member_desc;\n\t\t\t\t\t\t\t\t#>\n\t\t\t\t\t\t\t\t<div {{{ view.getRenderAttributeString( 'team_member_desc' ) }}}>{{{ memberDescHtml }}}</div>\n\t\t\t\t\t\t\t<# } #>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<# if( 'yes' == settings.separator_settings) {\n\t\t\t\t\t\t\tif( 'below_desc' == settings.separator_position ) { #>\n\t\t\t\t\t\t\t\t<div class=\"uael-separator-wrapper\">\n\t\t\t\t\t\t\t\t\t<div class=\"uael-separator\"></div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<# } #>\n\t\t\t\t\t\t<# } #>\n\t\t\t\t\t\t<# if( 'yes' == settings.social_icons_settings) { #>\n\t\t\t\t\t\t\t<# var iconsHTML = {}; #>\n\t\t\t\t\t\t\t<div class=\"elementor-social-icons-wrapper\">\n\t\t\t\t\t\t\t\t<div class=\"uael-team-social-icon\">\n\t\t\t\t\t\t\t\t\t<# _.each( settings.social_icon_list, function( item, index ) { #>\n\t\t\t\t\t\t\t\t\t\t<?php if ( UAEL_Helper::is_elementor_updated() ) { ?>\n\t\t\t\t\t\t\t\t\t\t\t<# var link = item.link ? item.link.url : '',\n\t\t\t\t\t\t\t\t\t\t\t\tmigrated = elementor.helpers.isIconMigrated( item, 'new_social' ),\n\t\t\t\t\t\t\t\t\t\t\t\tsocial = elementor.helpers.getSocialNetworkNameFromIcon( item.new_social, item.social, false, migrated );\n\t\t\t\t\t\t\t\t\t\t\t\t#>\n\t\t\t\t\t\t\t\t\t\t\t\t<a class=\"elementor-icon elementor-social-icon elementor-social-icon-{{ social }} elementor-animation-{{ settings.icon_hover_animation }} elementor-repeater-item-{{item._id}}\" href=\"{{ link }}\">\n\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"elementor-screen-only\">{{{ social }}}</span>\n\n\t\t\t\t\t\t\t\t\t\t\t\t<#\n\t\t\t\t\t\t\t\t\t\t\t\t\ticonsHTML[ index ] = elementor.helpers.renderIcon( view, item.new_social, {}, 'i', 'object' );\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ( ( ! item.social || migrated ) && iconsHTML[ index ] && iconsHTML[ index ].rendered ) { #>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{{{ iconsHTML[ index ].value }}}\n\t\t\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\t\t<i class=\"{{ item.social }}\"></i>\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#>\n\t\t\t\t\t\t\t\t\t\t\t</a>\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<# var link = item.link ? item.link.url : '',\n\t\t\t\t\t\t\t\t\t\t\tsocial = item.social.replace( 'fa fa-', '' ); #>\n\t\t\t\t\t\t\t\t\t\t\t<a class=\"elementor-icon elementor-social-icon elementor-social-icon-{{ social }} elementor-animation-{{ settings.icon_hover_animation }}\" href=\"{{ link }}\">\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"elementor-screen-only\">{{{ social }}}</span>\n\t\t\t\t\t\t\t\t\t\t\t\t<i class=\"{{ item.social }}\"></i>\n\t\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t\t<?php } ?>\n\t\t\t\t\t\t\t\t\t<# } ); #>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<# } #>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t}", "public function add_image() {\n\t $this->use_layout=false;\n\t $this->page = new $this->model_class(Request::get('id'));\n\t\t$this->join_name = \"images\";\n\t if(Request::post(\"id\")) {\n\t\t $this->image = new WildfireFile(Request::post('id'));\n\t\t $this->image->join_order = Request::post('order');\n\t\t $this->page->images = $this->image;\n\t }\n\t}", "private function setVarToTemplate()\n\t{\n\t\t$this->view->set('grid', $this->gridState);\n\n\t\t// Set variable with shot message to template\n\t\t$this->view->set('shotMessage', $this->shotMessage);\n\n\t\t// Set variable with final message to template\n\t\t$this->view->set('finalMessage', $this->finalMessage);\n\n\t\t// Set variable with grid row count to template\n\t\t$this->view->set('gridRowCount', $this->gridRow);\n\n\t\t// Set variable with grid colum count to template\n\t\t$this->view->set('gridColCount', $this->gridCol);\n\t}", "public function displayImgTag() {\n $urlimg = \"/plugins/graphontrackers/reportgraphic.php?_jpg_csimd=1&group_id=\".(int)$this->graphic_report->getGroupId().\"&atid=\". $this->graphic_report->getAtid();\n $urlimg .= \"&report_graphic_id=\".$this->graphic_report->getId().\"&id=\".$this->getId();\n \n \n echo '<img src=\"'. $urlimg .'\" ismap usemap=\"#map'. $this->getId() .'\" ';\n if ($this->width) {\n echo ' width=\"'. $this->width .'\" ';\n }\n if ($this->height) {\n echo ' height=\"'. $this->height .'\" ';\n }\n echo ' alt=\"'. $this->title .'\" border=\"0\">';\n }", "public function setTemplate($template)\n\t{\n\t\t$this->template = $template;\n\t\t$this->pageInitialized = false;\n\t}", "public function new(){\n $filehelper = new FileHelper;\n\n $header_images = $filehelper->getImagesInDirectory('default_headers', \"Preview Header\");\n $avatar_images = $filehelper->getImagesInDirectory('default_avatars', \"Preview Avatar\");\n return view('groups.new', ['header_images'=>$header_images, 'avatar_images'=>$avatar_images]);\n }", "protected function setDefaultTemplate()\n {\n $defaultTemplate = $this->config->getKey('default_template');\n $this->setTemplate($defaultTemplate);\n }", "function _add_template( $data=array() )\n\t{\n\t\t$template = array();\n\t\t\n\t\t$template['set_id'] = 1;\n\t\t$template['group_name'] = $data['group_name']['VALUE'];\n\t\t$template['section_content'] = $data['section_content']['VALUE'];\n\t\t$template['func_name'] = $data['func_name']['VALUE'];\n\t\t$template['func_data'] = $data['func_data']['VALUE'];\n\t\t$template['updated'] = time();\n\t\t$template['group_names_secondary'] = $data['group_names_secondary']['VALUE'];\n\t\t\n\t\tif ( !$this->ipsclass->DB->field_exists( 'group_names_secondary', 'skin_templates' ) )\n\t\t{\n\t\t\tunset( $template['group_names_secondary'] );\n\t\t}\n\t\t\n\t\t$this->ipsclass->DB->do_insert( 'skin_templates', $template );\n\t}", "public function setTemplateId($value);", "public function template()\n {\n return $this->getView('flagrow.download.templates::image-preview');\n }", "function setupTemplate() {\r\n\t\tparent::setupTemplate();\r\n\t\tLocale::requireComponents(array(LOCALE_COMPONENT_PKP_SUBMISSION, LOCALE_COMPONENT_OJS_EDITOR, LOCALE_COMPONENT_PKP_MANAGER, LOCALE_COMPONENT_OJS_AUTHOR, LOCALE_COMPONENT_OJS_MANAGER));\r\n\t\t$templateMgr =& TemplateManager::getManager();\r\n\t\t$isEditor = Validation::isEditor();\r\n\t\t\r\n\t\tif (Request::getRequestedPage() == 'editor') {\r\n\t\t\t$templateMgr->assign('helpTopicId', 'editorial.editorsRole');\r\n\t\t\r\n\t\t} else {\r\n\t\t\t$templateMgr->assign('helpTopicId', 'editorial.sectionEditorsRole');\r\n\t\t}\r\n\t\t\r\n\t\t$roleSymbolic = $isEditor ? 'editor' : 'sectionEditor';\r\n\t\t$roleKey = $isEditor ? 'user.role.coordinator' : 'user.role.sectionEditor';\r\n\t\t$pageHierarchy = array(array(Request::url(null, 'user'), 'navigation.user'), array(Request::url(null, 'user'), $roleKey), array(Request::url(null, $roleSymbolic, 'submissionsReport'), 'editor.reports.reportGenerator'));\r\n\t\t\r\n\t\t$templateMgr->assign('pageHierarchy', $pageHierarchy);\r\n\t}", "public final function set_header_image($choice)\n {\n }", "function create_group() {\n $labels = array(\n 'name' => 'Group',\n 'singular_name' => 'Group',\n 'add_new' => 'Add New',\n 'add_new_item' => 'Add New Group',\n 'edit_item' => 'Edit Group',\n 'new_item' => 'New Group',\n 'all_items' => 'Groups',\n 'view_item' => 'View Group',\n 'search_items' => 'Search Group',\n 'not_found' => 'No Group found',\n 'not_found_in_trash' => 'No Group found in Trash',\n 'parent_item_colon' => '',\n 'menu_name' => 'Group'\n );\n\n $args = array(\n 'labels' => $labels,\n 'public' => true,\n 'publicly_queryable' => true,\n 'show_ui' => true,\n 'show_in_menu' => 'edit.php?post_type=product',\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'group' ),\n 'capability_type' => 'page',\n 'supports' => array('title', 'page-attributes', 'thumbnail'),\n 'has_archive' => true,\n 'hierarchical' => true,\n 'menu_position' => null,\n 'yarpp_support' => false\n );\n\n register_post_type( 'group', $args );\n}", "public static function templateImagePath($image_path=null)\n\t{\n\t\t$webserver_url = $GLOBALS['egw_info']['server']['webserver_url'];\n\t\tif (empty($image_path))\n\t\t{\n\t\t\t$image_path = $webserver_url.'/phpgwapi/templates/default/images/dhtmlxtree/';\n\t\t}\n\t\t// check if we have template-set specific image path\n\t\tif ($webserver_url && $webserver_url != '/')\n\t\t{\n\t\t\tlist(,$image_path) = explode($webserver_url, $image_path, 2);\n\t\t}\n\t\t$templated_path = strtr($image_path, array(\n\t\t\t'/phpgwapi/templates/default' => $GLOBALS['egw']->framework->template_dir,\n\t\t\t'/default/' => '/'.$GLOBALS['egw']->framework->template.'/',\n\t\t));\n\t\tif (file_exists(EGW_SERVER_ROOT.$templated_path))\n\t\t{\n\t\t\treturn ($webserver_url != '/' ? $webserver_url : '').$templated_path;\n\t\t\t//error_log(__METHOD__.\"() setting templated image-path for $form_name: $templated_path\");\n\t\t}\n\t\treturn ($webserver_url != '/' ? $webserver_url : '').$image_path;\n\t}", "protected function _setPageViewTemplate()\n {\n\n $fishpigWordpressModuleVersion = Mage::getConfig()->getNode('modules/Fishpig_Wordpress/version');\n\n if ($fishpigWordpressModuleVersion > 4) {\n parent::_setPageViewTemplate();\n } else {\n $page = $this->_initPage();\n\n $template = $page->getMetaValue('_wp_page_template');\n\n // This is the folder in Magento template\n $path = 'page/';\n\n //preg_match('/([^\\/]*)\\.php$/', $template, $match);\n //$filename = $path . $match[1] . '.phtml';\n // The extension is replaced with .phtml,\n // meaning that the directory structure is preserved.\n // (page-templates/templ.php will become $path . page-templates/templ.phtml)\n $filename = $path . str_replace('.php', '.phtml', $template);\n\n // This is to use Magento fallback system\n $params = array('_relative' => false);\n $area = $this->getLayout()->getBlock('root')->getArea();\n\n if ($area) {\n $params['_area'] = $area;\n }\n\n $templateName = Mage::getDesign()->getTemplateFilename($filename, $params);\n\n // If no other matches are found, Magento will eventually give a path in base/default, even if that template doesn't exist\n if (file_exists($templateName)) {\n $this->getLayout()->getBlock('root')->setTemplate($filename);\n }\n\n return $this;\n }\n }", "public function create()\n {\n\n $this->data = array(\n 'templates' => \\Pageblok::getTemplates(\"gallery\"),\n );\n\n return parent::create();\n }", "function gallery($gallery_name=\"eugenio-02\",$page_num=5,$title='Missing Title')\n\t{\n //data must give the template we want things shown\n //this is defined by the seecond segement\n // @gallery=gallery template\n // @page =page template\n // @sitemap=sitemap template\n $this->load->library('pagebuilder');\n \n\t $data['title'] = $gallery_name;\n\t $data['heading'] = \"My Real Heading\";\n\t $data['gallery']=$gallery_name;\n\t $data['page_num']=$page_num;\n\t $this->load->view('photographer_gallery',$data);\n \n\t}", "function setXTemplate($newXTemplate) {\n $this->xTemplate = $newXTemplate;\n}", "function admin_gallery()\n {\n // Require admin login\n if(!(isset($_SESSION['active_user']) && $_SESSION['active_user']['type'] == 'admin'))\n redirect_to('/');\n\n $this->load_outer_template('admin');\n\n if(!isset($this->params[2]) || (!is_numeric($this->params[2])))\n throw new exception(\"No set specified\");\n\n $item = $this->params[2];\n\n $m_gallery = instance_model('gallery');\n $m_set = instance_model('gallery_set');\n $m_member = instance_model('members');\n\n $set = $m_set->get_by_id($item);\n if($set == array())\n throw new exception('Set does not exist');\n\n $member = $m_member->get_by_id($set[0]['Owner']);\n\n if($member == array())\n throw new exception('Member does not exist');\n\n $gallery = $m_gallery->get_in_set($item);\n\n $list = array();\n foreach($gallery as $image)\n {\n $list []= array(\n 'name' => make_url('res', 'gallery', $member[0]['Clean_title'], 'thumbs', $image['File']),\n 'options' => array(\n 'Delete' => make_url('members', 'admin_gallery_delete', $item, $image['ID']))\n );\n }\n\n $view = instance_view('admin/index_generic');\n $view = $view->parse_to_variable(array(\n 'image_mode' => true,\n 'back_url' => make_url('members', 'admin_gallery_set', $set[0]['Owner']),\n 'sortable' => false,\n 'title' => 'Group: ' . $set[0]['Title'],\n 'new_url' => make_url('members', 'admin_gallery_create', $item),\n 'new_name' => 'Upload image',\n 'list' => $list\n ));\n\n\n $this->set_template_paramiters(array(\n 'content' => $view\n ));\n }", "public static function theme_images() {\r\n add_image_size('slideshow-980', 980, 420, true);\r\n add_image_size('slideshow-1200', 1180, 550, true);\r\n add_image_size('slideshow-1560', 1540, 550, true);\r\n add_image_size('slideshow-720', 600, 550, true);\r\n add_image_size('grid-thumbnail', 370, 270, true);\r\n add_image_size('icon-60', 60, 60, true);\r\n add_image_size('icon-100', 100, 100, true);\r\n add_image_size('icon-40', 40, 40, true);\r\n }", "function setTemplate($template) {\n $this->template = $template;\n }", "function fiorello_mikado_register_blog_masonry_gallery_template_file( $templates ) {\n\t\t$templates['blog-masonry-gallery'] = esc_html__( 'Blog: Masonry Gallery', 'fiorello' );\n\t\t\n\t\treturn $templates;\n\t}", "protected function setTemplatePaths() {}", "protected function render() {\n\t\t$settings = $this->get_settings_for_display();\n ?>\n\t\t<div class=\"happyden-feature-image\">\n\t\t\t\t<?php the_post_thumbnail( get_the_Id(), 'full' ); ?>\n\t\t</div>\n\t\t<?php\n\t}", "public function setTemplate(string $template);", "function setFHtgroup($filename){\n $this->fHtgroup=$filename;\n }", "function setFHtgroup($filename){\n $this->fHtgroup=$filename;\n }", "function setHeadImage($var)\n\t{\n\t\t$this -> head_image = $var;\n\t}", "public function add_image( &$data ) {\n\t\tif ( $this->context->has_image ) {\n\t\t\t$data['primaryImageOfPage'] = [ '@id' => $this->context->canonical . WPSEO_Schema_IDs::PRIMARY_IMAGE_HASH ];\n\t\t}\n\t}", "public static function setTemplate(PageTemplate $template) {\n\t\tself::getInstance()->setPageTemplate($template);\n\t}", "public function setImageUrl($value)\n\t{\n\t\t$this->setViewState('ImageUrl',$value,'');\n\t}", "function image (&$src) {\n\t // Check only if STS is enabled.\n if (MODULE_STS_DEFAULT_STATUS==\"true\" && $this->is_button ==false)\n if (file_exists(STS_TEMPLATE_DIR . $src)) $src = STS_TEMPLATE_DIR . $src;\n\t\t$this->is_button = false;\n\t}", "public function setGroupTemplatePath($path) {\n\t\t\n\t\tif (is_file($path)) {\n\t\t\t$this->groupTemplate = file_get_contents($path);\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function template_redirect() {\n global $wp_properties;\n\n if(is_array(ud_get_wp_property()->get( 'property_groups' ))){\n foreach( ud_get_wp_property()->get( 'property_groups' ) as $k => $v ) {\n $v[ 'name' ] = $this->get_groups_translation( $v[ 'name' ], $k );\n ud_get_wp_property()->set( \"property_groups.{$k}\", $v );\n }\n }\n\n if( !ud_get_wp_property()->get( 'property_groups._other' ) ) {\n ud_get_wp_property()->set( \"property_groups._other\", array(\n 'name' => $this->get_groups_translation( '', '0' )\n ) );\n }\n\n $wp_properties[ 'property_groups' ] = ud_get_wp_property()->get( 'property_groups' );\n\n }", "public function setTemplateSet($templateSet){\n\t\t$this->templateSet = $templateSet;\n\t}", "public function setTemplate( $template )\n\t{\n\t\t// Search for the template layout.\n\t\tif ( 'MAIN' == $this->context_name )\n\t\t{\n\t\t\t$found\t= false;\n\t\t\t$path\t= dirname( $template );\n\n\n\t\t\tfor ( $i = 0; !$found && $i < 3; $i++ )\n\t\t\t{\n\t\t\t\tif ( file_exists( TEMPLATE_PATH . $path . '/layout' . TEMPLATE_EXTENSION ) )\n\t\t\t\t{\n\t\t\t\t\t$found = true;\n\t\t\t\t\t$path = $path . '/layout' . TEMPLATE_EXTENSION;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$path\t= dirname( $path );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( $found )\n\t\t\t{\n\t\t\t\t$this->layout\t= $this->twig->loadTemplate( $path );\n\t\t\t}\n\t\t}\n\t\t$this->current_context['template'] = $this->twig->loadTemplate( $template );\n\t}", "protected function content_template() {}", "protected function content_template() {}", "function logo ($tpl,$avecQui=true) {\n global $USER,$CFG;\n if (isset($USER->type_plateforme) && ! empty($USER->type_plateforme)) {\n \t $t_pf=$USER->type_plateforme;\n\t if ($t_pf==\"certification\") $tpl->assignGlobal(\"image_c\",\"c\");\n\t else if ($t_pf==\"positionnement\")\n\t\t if (is_utilisateur_anonyme($USER->id_user)) $tpl->assignGlobal(\"image_c\",\"a\");\n\t\t else $tpl->assignGlobal(\"image_c\",\"\");\n\t else $tpl->assignGlobal(\"image_c\",\"v\"); // non ger� ...\n } else $tpl->assignGlobal(\"image_c\",\"v\"); // perdu ou autre ...\n\n}", "public function imageTag($arrMatch) {\n \n $em = $this->getDoctrine()->getEntityManager();\n\n $image = $em->getRepository('BloggerGalleryBundle:Image')->find($arrMatch[1]);\n \n if (!$image) {\n throw $this->createNotFoundException('Unable to find image.');\n }\n \n return $this->renderView('BloggerGalleryBundle:Gallery:image.html.twig', array(\n 'image' => $image,\n ));\n \n }", "function setFHtgroup($filename){\r\n\t\t$this->fHtgroup=$filename;\r\n\t}", "function initNewXTemplate($XTemplatePath, $modString, $imagePath = null) {\n $this->setXTemplatePath($XTemplatePath);\n if(isset($modString))\n $this->setModStrings($modString);\n if(isset($imagePath))\n $this->setImagePath($imagePath);\n}", "function template_bits_overview_row_normal( $group, $folder_blob, $count_string ) {\n\n$IPBHTML = \"\";\n//--starthtml--//\n\n$IPBHTML .= <<<EOF\n<div class='tablerow1' id='dv-{$group['group_name']}'>\n <div style='float:right'>\n ($count_string)&nbsp;{$group['easy_preview']}\n </div>\n <div align='left'>\n <img src='{$this->ipsclass->skin_acp_url}/images/folder.gif' alt='Группа шаблонов' style='vertical-align:middle' />\n {$folder_blob}&nbsp;<a style='font-size:11px' id='gn-{$group['group_name']}' onclick='template_load_bits(\"{$group['group_name']}\", event)' title='{$group['easy_desc']}' href='{$this->ipsclass->base_url}&{$this->ipsclass->form_code}&code=template-bits-list&id={$group['_id']}&p={$group['_p']}&group_name={$group['group_name']}&'>{$group['easy_name']}</a>\n <span id='match-{$group['group_name']}'></span>\n </div>\n</div>\nEOF;\n\n//--endhtml--//\nreturn $IPBHTML;\n}", "function gucci_register_template() {\n $page_type_object = get_post_type_object( 'page' );\n $page_type_object->template = array(\n array( 'acf/page-hero' ),\n );\n}", "function minorite_image($variables) {\n $attributes = $variables['attributes'];\n $attributes['src'] = file_create_url($variables['path']);\n\n foreach (array('alt', 'title') as $key) {\n\n if (isset($variables[$key])) {\n $attributes[$key] = $variables[$key];\n }\n }\n\n return '<img' . drupal_attributes($attributes) . ' />';\n}", "function admin_gallery_set()\n {\n // Require admin login\n if(!(isset($_SESSION['active_user']) && $_SESSION['active_user']['type'] == 'admin'))\n redirect_to('/');\n\n $this->load_outer_template('admin');\n\n if(!isset($this->params[2]) || (!is_numeric($this->params[2])))\n throw new exception(\"No user specified\");\n\n $user = $this->params[2];\n\n $m_set = instance_model('gallery_set');\n $set = $m_set->get_by_user($user);\n\n $list = array();\n foreach($set as $row)\n {\n $list []= array(\n 'name' => $row['Title'],\n 'options' => array(\n 'Edit Gallery' => make_url('members', 'admin_gallery', $row['ID']),\n 'Edit' => make_url('members', 'admin_set_edit', $row['ID']),\n 'Delete' => make_url('members', 'admin_set_delete', $row['ID']))\n );\n }\n\n $view = instance_view('admin/index_generic');\n $view = $view->parse_to_variable(array(\n 'back_url' => make_url('members', 'admin_pages'),\n 'sortable' => false,\n 'title' => 'In Categories',\n 'new_url' => make_url('members', 'admin_set_create', $user),\n 'new_name' => 'Add to category',\n 'list' => $list,\n 'col_classes' => array('tbl_set_name', 'tbl_set_opt')\n ));\n\n\n $this->set_template_paramiters(array(\n 'content' => $view\n ));\n\n }", "public static function use_parent_template() {\n add_action('save_post', array('core_admin', 'switch_page_template'));\n }", "function setupTemplate($subclass = false) {\n\t\tif ($subclass) {\n\t\t\t$templateMgr = &TemplateManager::getManager();\n\t\t\t$templateMgr->assign('pageHierarchy', array(array('user', 'navigation.user')));\n\t\t}\n\t}", "public function groupNameTemplateId($value) {\n $value = new Template($value);\n\n return $this->setProperty('groupNameTemplate', $value);\n }", "public function groupNameTemplate($value) {\n return $this->setProperty('groupNameTemplate', $value);\n }", "private function setup_theme() {\n\n\t\tforeach( $this->get_image_sizes() as $image_size => $values ) {\n\t\t\tadd_image_size( $image_size, $values[0], $values[1] );\n\t\t}\n\n\t}", "protected function _content_template() {\n \n }", "private function prepareImageList() {\n\t\t\tforeach(scandir($this->templateDirectory) as $templateFileName) {\n\t\t\t\tif((strcmp($templateFileName, \".\") !== 0) && (strcmp($templateFileName, \"..\") !== 0)) {\n\t\t\t\t\t$this->imageList->addItem(new Image($this->templateDirectory, $templateFileName), $templateFileName);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function setView($template);", "public function setTemplate()\n {\n $root = &XCube_Root::getSingleton();\n $language = $root->mContext->getXoopsConfig('language');\n $this->mMailer->setTemplateDir(XOOPS_ROOT_PATH . '/modules/user/language/' . $language . '/mail_template/');\n $this->mMailer->setTemplate('register.tpl');\n }", "public function display_gallery() {\n\n global $product;\n\n $gallery = \n wc_get_template(\n 'single-product/label-thumbnails.php',\n array(),\n FALSE,\n $this->plugin_path() . '/templates/' );\n\n }", "function setImage($image) {\n\t\t$this->_image = $image;\n\t}", "function set_template($template_name) {\n\t\t$this->template = $template_name;\n\t}", "public function add_image_template($data = array()) \n\t{\n\t\t$this->admin_header();\n\t\t\n\t\t//fetch the total number of categories\n\t\t$config['total_num_image'] = $this->Admin_model->fetch_all_rows('blog_images');\n\t\t\n\t\t//fetch the total number of tags\n\t\t$data['total_num_blogs'] = $this->Admin_model->fetch_all_rows('blog');\n\t\t\n\t\t//$config['total_rows'] = $this->Admin_model->fetch_all_rows('food');\n\t\t \n\t\t$config['base_url'] = site_url(\"Admin/image_list/\");\n\t\t$config['per_page'] = 60;\n\t\t$config['uri_segment'] = '3';\n\t\t$config['num_links'] = round($config['total_num_image'] / $config['per_page']);\n\t\t\n\t\t$config['full_tag_open'] = '<ul class=\"pagination\">';\n\t\t$config['full_tag_close'] = '</ul>';\n\t\t\n\t\t$config['first_link'] = FALSE;\n\t\t\n\t\t$config['last_link'] = FALSE;\n\t\t\n\t\t$config['next_link'] = FALSE;\n\t\t\n\t\t$config['prev_link'] = FALSE;\n\t\t\n\t\t$config['cur_tag_open'] = '<li class=\"active\"><a href=\"#\">';\n\t\t$config['cur_tag_close'] = '</li>';\n\t\t\n\t\t$config['num_tag_open'] = '<li>';\n\t\t$config['num_tag_close'] = '</li>';\n\t\t\n\t\t$this->pagination->initialize($config);\n\t\t\n\t\t$page_number = $this->uri->segment(3);\n\t\t$data['images'] = $this->Admin_model->fetch_image($config['per_page'], $page_number);\n\t\t\n\t\t$data['total_num_pages'] = ceil($config['total_num_image'] / $config['per_page']);\n\t\t$data['total_num_rows'] = $config['total_num_image'];\n\t\t\n\t\t$url_segments = $this->uri->total_segments();\n\t\t$data['page_num'] = ($url_segments !== 3) ? 1 : $this->uri->segment(3);\n\t\t\n\t\t$data['header'] = $this->load->view('templates/admin_header', $data, TRUE);\n\t\t$data['footer'] = $this->load->view('templates/admin_footer', '', TRUE);\n\t\t$this->load->view('admins/image_list', $data);\n\t}" ]
[ "0.6239835", "0.5879001", "0.56641006", "0.56317323", "0.5625614", "0.56060714", "0.5585708", "0.55652076", "0.55374897", "0.547634", "0.54699427", "0.5466037", "0.53877497", "0.5268026", "0.5248391", "0.5241917", "0.5222106", "0.5190244", "0.5190244", "0.5174351", "0.51304734", "0.51256216", "0.51193047", "0.511321", "0.51100075", "0.5102946", "0.5097836", "0.50890005", "0.50714195", "0.5067363", "0.5057028", "0.5038679", "0.5035368", "0.5026476", "0.5020769", "0.5018698", "0.50120234", "0.5009349", "0.49933875", "0.49793467", "0.4969312", "0.49648935", "0.49640656", "0.4962521", "0.49579751", "0.49472058", "0.49429014", "0.49388403", "0.49322814", "0.49291795", "0.49177736", "0.49145114", "0.49059707", "0.48976558", "0.48974058", "0.48949385", "0.48934788", "0.48892507", "0.48884273", "0.48794836", "0.48727557", "0.48717737", "0.48714402", "0.48702914", "0.4865009", "0.48616165", "0.48606676", "0.48606676", "0.48598486", "0.4859089", "0.48485112", "0.48367643", "0.48317406", "0.48311388", "0.48310837", "0.48194396", "0.481761", "0.48139232", "0.48139232", "0.480619", "0.4805743", "0.48052388", "0.48018333", "0.47997692", "0.4789634", "0.47850215", "0.47721723", "0.47713915", "0.47654215", "0.47587377", "0.47579646", "0.47569466", "0.47544974", "0.47544864", "0.4746639", "0.47427136", "0.47424543", "0.47318503", "0.4730327", "0.4730277" ]
0.52964956
13
Set the Grouping page description text html
public function setDescriptionTextHtml($descriptionTextHtml = "") { $this->descriptionTextHtml = !empty($descriptionTextHtml) ? trim($descriptionTextHtml) : NULL; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setHtml();", "protected function setHtmlContent() {}", "protected function setDescription() {\r\n\t\t$descriptionCrop = intval($this->settings['news']['semantic']['general']['description']['crop']);\r\n\t\t$descriptionAction = $this->settings['news']['semantic']['general']['description']['action'];\r\n\t\t$descriptionText = $this->newsItem->getTeaser();\r\n\t\tif (empty($descriptionText)) {\r\n\t\t\t$descriptionText = $this->newsItem->getBodytext();\r\n\t\t}\r\n\t\tif (!empty($descriptionText) && !empty($descriptionAction)) {\r\n\t\t\tif (!empty($GLOBALS['TSFE']->page['description'])) {\r\n\t\t\t\tswitch ($descriptionAction) {\r\n\t\t\t\t\tcase 'prepend':\r\n\t\t\t\t\t\t$descriptionText .= ': ' . $GLOBALS['TSFE']->page['description'];\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'append':\r\n\t\t\t\t\t\t$descriptionText = $GLOBALS['TSFE']->page['description'] . ': ' . $descriptionText;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$this->description = $this->contentObject->crop($descriptionText, $descriptionCrop . '|...|' . TRUE);\r\n\t\t}\r\n\t}", "protected function generateHtml()\n\t{\n\t}", "public function description()\n\t{\n\t\t$txt = array();\n\t\t$txt['wiki'] = \"Displays group events\";\n\t\t$txt['html'] = '<p>Displays group events.</p>';\n\t\t$txt['html'] = '<p>Examples:</p>\n\t\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t\t<li><code>[[Groupevent(number=3)]]</code> - Displays the next three group events</li>\n\t\t\t\t\t\t\t\t<li><code>[[Groupevent(title=Group Events, number=2)]]</code> - Adds title above event list. Displays 2 events.</li>\n\t\t\t\t\t\t\t\t<li><code>[[Groupevent(id=123)]]</code> - Displays single group event with ID # 123</li>\n\t\t\t\t\t\t\t</ul>';\n\t\treturn $txt['html'];\n\t}", "public function getDescriptionTextHtml() { return $this->descriptionTextHtml; }", "function description( $html = true )\r\n {\r\n if ( $html )\r\n return eZTextTool::fixhtmlentities( htmlspecialchars( $this->Description ) );\r\n else\r\n return $this->Description;\r\n }", "function bg_AddSettingsSectionHtml() { }", "public function setPageDescription($text)\n {\n $metaDescription = $this->query('meta[name=\"description\"]')->first();\n if ($text === '') {\n // If empty value passed we need to remove title tag\n if ($metaDescription) {\n $this->removeElement($metaDescription);\n }\n } else {\n if ($metaDescription) {\n $metaDescription->setAttribute('content', $text);\n } else {\n // Try to insert meta description tag into head\n $metaDescription = new Meta('description', $text);\n $head = $this->query('head');\n if ($head->count() > 0) {\n /* @var Element $head */\n $this->appendTo($head->first(), $metaDescription);\n }\n }\n }\n }", "function learn_press_course_lesson_description() {\n\t\tlearn_press_get_template( 'content-lesson/description.php' );\n\t}", "public function description()\n\t{\n\t\t$txt = array();\n\t\t$txt['wiki'] = 'Generates a link to a random page.';\n\t\t$txt['html'] = '<p>Generates a link to a random page.</p>';\n\t\treturn $txt['html'];\n\t}", "public function displayPage()\n {\n $this->getState()->template = 'displaygroup-page';\n }", "function get_site_description() {\r\n\t?>\r\n\t\t<div id=\"title-description\" class=\"five3-font\">Meal Replacement<br/>Energy Drink Mix</div>\r\n\t<?php\r\n}", "public function property_overview_desc() {\n\n\t\t\t$short_description_1 = get_field( 'short_description_1' );\n\t\t\t$short_description_2 = get_field( 'short_description_2' );\n\n\t\t\t$out = '<h6>Overview Description:</h6>';\n\t\t\t$out .= '<p>';\n\t\t\t$out .= ( get_field( 'advertisement_package' ) == '165' )\n\t\t\t\t? $short_description_1\n\t\t\t\t: $short_description_2;\n\t\t\t$out .= '</p>';\n\t\t\t$out .= '<div class=\"hr hr-default\"><span class=\"hr-inner \"><span class=\"hr-inner-style\"></span></span></div>';\n\n\t\t\tif ( $this->add_package == 3 ) {\n\t\t\t$out .= '<h3>Practice Details:</h3>';\n\t\t\t}\n\n\t\t\treturn $out;\n\t\t}", "protected function setHTMLVar() {\r\n $this->htmlVar = array(\r\n 'htmlTitle' => HTML_TITLE,\r\n 'htmlTitleSuffix' => ''\r\n );\r\n }", "public function setDescription($description) {\n\t\tTemplate::setSiteMetaDescription($description);\n\t}", "public function render_section_themes_description() {\n\t\t_e( 'Choose themes to make available in your SatisPress repository.', 'satispress' );\n\t}", "public function display_description()\n\t{\t\n\t\t//return Markdown(htmlentities(utf8_encode($this->description), ENT_COMPAT | ENT_HTML401, 'UTF-8', false));\n\t\t//return htmlentities(utf8_encode($this->description), ENT_COMPAT | ENT_HTML401, 'UTF-8', false);\n\t\treturn str_replace(\"\\r\\n\", \"<br>\", $this->description);\n\t}", "abstract public function generateHtml();", "public function KemiSitemap_description()\n {\n echo '<p>Kemi Sitemap Description</p>';\n }", "static public function setDescription($new_description) {\n\t\tself::$page_description = (string)$new_description;\n\t}", "public function setDescription ($value) {\n\t\t$this->setData(\"pageDescription\", $value);\n\t\treturn true;\n\t}", "function dfcg_help_desc() {\n?>\n\t<h3><?php _e( 'Dynamic Content Gallery - Quick Help - Descriptions', DFCG_DOMAIN ); ?></h3>\n\t\n\t<p><?php _e( 'The Description is the text which appears below the post/Page title in the gallery Slide Pane.</p>\n\t<p>Four different options for creating the description are available: two \"auto\" options, one \"manual\" option, and one option to disable the description altogether.', DFCG_DOMAIN ); ?></p>\n\t\n\t<p><?php _e( 'If you want total control over the text, check the <span class=\"bold-italic\">Manual</span> option and enter the descriptions in the in-post DCG Metabox for each post/Page. This option also allows you to set up a fallback description which will be displayed if a DCG Metabox description does not exist.', DFCG_DOMAIN ); ?></p>\n\t\n\t<p><?php _e( 'The recommended \"auto\" option is <span class=\"bold-italic\">Auto</span>. This automatically creates a description from the post/Page content and allows you to specify the length of the description and customise its Read More link.', DFCG_DOMAIN ); ?></p>\n\t\n\t<p><?php _e( 'The alternative \"auto\" option is the <span class=\"bold-italic\">Excerpt</span> option. This will display the post/Page Excerpt - either the handcrafted one if it exists, or an automatic Excerpt of the first 55 words of the post/Page. Bear in mind using an automatic Excerpt will probably result in too much text for the Slide Pane, though this can be dealt with by using the WordPress excerpt filter. You can learn more about this filter <a href=\"http://www.studiograsshopper.ch/code-snippets/customising-the_excerpt/\" target=\"_blank\">here</a>.', DFCG_DOMAIN ); ?></p>\n\n<?php\n}", "private function configureTemplate(){\n\t\t$template = $this->getTemplate();\n\t\t$template->setPageSubtitle($this->getModule()->getDisplayedName());\n\t}", "function emc_the_cpt_description(){\r\n\r\n\t$desc = get_page_by_path( 'description', OBJECT, 'emc_content_focus' );\r\n\t$html = apply_filters( 'the_content', $desc->post_content );\r\n\techo $html;\r\n\r\n}", "static public function setHTML() {\n\t\tself::$page_type = 0;\n\t}", "function learn_press_single_quiz_description() {\n\t\tlearn_press_get_template( 'content-quiz/description.php' );\n\t}", "public function options_page_overview() \n\t\t{\n\t\t\t$html = '';\n\t\t\t\n\t\t\tforeach( $this->size_groups as $size_group => $sizes ) \n\t\t\t{\n\t\t\t\t$html .= '<h3>' . $this->get_group_headline( $size_group ) . '</h3>';\n\t\t\t\t\n\t\t\t\t$html .= '<ul>';\n\t\t\t\t\n\t\t\t\tforeach( $sizes as $key => $image ) \n\t\t\t\t{\n\t\t\t\t\t$info = $image['width'] . '*' . $image['height'];\n\t\t\t\t\tif( isset( $image['crop'] ) && true === $image['crop'] )\n\t\t\t\t\t{\n\t\t\t\t\t\t$info .= ' ' . __( '(cropped)', 'avia_framework' );\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$info .= ' - ' . $this->get_image_key_info( $key );\n\t\t\t\t\t\n\t\t\t\t\t$html .= '<li>' . $info . '</li>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$html .= '</ul>';\n\t\t\t}\n\t\t\t\n\t\t\treturn $html;\n\t\t}", "public function getGroupDescription() : string\n {\n return $this->groupDescription;\n }", "function cbGenHtml($number, $title, $englishTitle, $author, $summary,\n $summaryCount, $url, $authorName, $date) {\n echo\n '<p align=\"center\">'\n . \"<p align='center'>\"\n . cbGenSpan(\"number\", $number)\n . ' - '\n . cbGenSpan(\"german-title\", $title)\n . \"<br>\"\n . cbGenSpan(\"english-title\", $englishTitle)\n . \"<br>\"\n . cbGenSpan(\"author\", $author)\n . \"<hr width='20%'/>\"\n . \"</p>\"\n . \"<htr>\"\n . \"<table><tr><td>\"\n ;\n\n if ($summaryCount > 0) {\n echo cbGenSpan(\"text\", $summary);\n echo '</td>'\n . '<td valign=\"top\">'\n\t. cbGenCover($url, \"right\")\n . '</td></tr></table>'\n ;\n\n } else {\n global $MAIN_URL, $EDIT_SUMMARY_URL;\n echo\n '</table>'\n . '<p align=\"center\">'\n\t. cbGenCover($url, \"center\")\n . '<br>'\n . 'No summary was found for this issue.<br>\n You can <a href=\"'\n . $EDIT_SUMMARY_URL\n . '?number='\n . $number\n . '\">submit one</a> or return to the '\n\t. '<a href=\"' . $MAIN_URL . '\">main page</a></p>';\n }\n\n echo '<p align=\"right\">'\n . (is_null($authorName) ? \"\" : cbGenSpanSmall(\"author\", $authorName))\n . (is_null($date) ? \"\" : \" \" . cbGenSpanSmall(\"date\", $date))\n . '</p>'\n ;\n}", "public static function description($description)\n {\n // Set page description\n self::$data['description'] = $description;\n }", "public function getHtmlOutputAttribute()\n {\n return nl2br(e($this->description));\n }", "private function getCommonDescriptionforField() {\n if(strlen($this->description) > 0) {\n return '<span id=\"'.$this->name.'-help\" class=\"help-block\">'.$this->description.'</span>'.\"\\n \\t\";\n }\n }", "public function seoDescription(){\n return ($this->excerpt ? descriptionMaker($this->excerpt) : descriptionMaker($this->description));\n }", "public function getDescriptionMoreInfoHtml() { return $this->descriptionMoreInfoHtml; }", "public function html() {}", "public function display_description() {\n\t\t\n\t\treturn str_replace(\"\\r\\n\", \"<br />\", $this->description);\n\t\n\t}", "function setDescription( $value )\r\n {\r\n $this->Description = $value;\r\n }", "function setDescription( $value )\r\n {\r\n $this->Description = $value;\r\n }", "function setHTMLoptions($fieldname, $value)\n\t{\n\t\t$this->setFieldParam($fieldname, \"html\", $value);\n\t}", "function setHTML($value = true)\n {\n $this->multimailer->isHTML($value);\n }", "public function contentHtml()\n {\n return '<h3>Akun Personil Penghubung PME BBLK Palembang</h3>' .\n '<p>Terima kasih atas partisipasi Anda. Berikut tautan yang dapat Anda gunakan untuk mereset password Anda di dalam sistem PME BBLK Palembang.</p>' .\n '<p><a href=\"' . $this->link() . '\" target=\"_blank\">' . $this->link() . '</a></p>'.\n '<p>Dimohon untuk menjaga kerahasiaan password.<br/><br/>E-mail ini dikikrimkan oleh sistem. Mohon untuk tidak membalas e-mail ini.</p>';\n }", "function add_html () {\n //Adds a html block\n return '<div class=\"black\">Lorem ipsum dolor</div>';\n }", "function description($element)\n\t\t{\n\t\t\t$output = '<div class=\"ace_description\">';\n\t\t\t$output .= $element['desc'];\n\t\t\t$output .= '</div>'; // <!--end ace_description-->\n\t\t\t$output .= '<div class=\"ace_control\">';\n\t\t\treturn $output;\t\t\n\t\t}", "function setHTMLoption($fieldname, $innername, $value)\n\t{\n\t\t$this->setFieldInnerParam($fieldname, \"html\", $innername, $value);\n\t}", "function settings_html() {\n $this->render_setting( 'label_any' );\n $this->render_setting( 'modifiers' );\n $this->render_setting( 'orderby' );\n $this->render_setting( 'count' );\n }", "public function addFooter(){\n\n$this->page .= <<<EOD\n<pre>\n$this->title\n</pre>\n</body>\n</html>\nEOD;\n}", "public function getHTML() {\t\n\t\t$html = '';\n\t\tif ($this->type != 'title') $html.= '<p>'.\"\\n\";\n\t\tif ($this->type != 'info' && $this->type != 'system' && $this->type != 'title') \n\t\t\t{\t\t\t\n\t\t\t$html.= '<label id=\"label_for_'. $this->name . '\" name=\"label_for_'. $this->name . '\" for=\"'. $this->name . '\">';\n\t\t\t// special check for files item\n\t\t\tif ($this->type == 'file')\n\t\t\t\t{\n\t\t\t\tif (file_exists($_SERVER['DOCUMENT_ROOT'].'/uploads/' . $this->name))\n\t\t\t\t\t{\n\t\t\t\t\t$html.= '<a href = \"/uploads/'. $this->name .'\">'.$this->label.'</a> \n\t\t\t\t\t\t(<a href=\"javascript:void Messi.ask(\\''.DELETE.' ' .$this->name.' ?\\', \n\t\t\t\t\t\tfunction(val) { if(val==\\'Y\\') formSubmit(\\'delete\\',\\'' . $this->name . '\\');});\">'.DELETE.'</a>)';\n\t\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t$html.= $this->label.' ('.NONE.')';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\telse\n\t\t\t\t{\n\t\t\t\t$html.= $this->label;\n\t\t\t\t}\n\t\t\t$html.= '</label>'.\"\\n\";\n\t\t\t}\n\t\t// add dependence of the item for js managing in user interface\n\t\tif ($this->depend != 'none' or $this->depend != '') {\n\t\t\t$html.= '<input type=\"hidden\" id=\"dependance_for_'. $this->name . '\" value=\"'. $this->depend . '\" />'.\"\\n\";\n\t\t}\t\n\t\t$html.= '<input type=\"hidden\" id=\"title_for_'. $this->name . '\" value=\"'. $this->title . '\" />'.\"\\n\";\n\t\tswitch ($this->type)\n\t\t\t{\n\t\t\tcase 'text' : \n\t\t\t\t$html.= '<input id=\"'. $this->name . '\" name=\"'. $this->name . '\" value=\"'. $this->value . '\" \n\t\t\t\t\tonchange=\"display_dependance();\" />'.\"\\n\";\n\t\t\t\tbreak;\n\n\t\t\tcase 'password' : \n\t\t\t\t$html.= '<input type=\"password\" id=\"'. $this->name . '\" name=\"'. $this->name . '\" value=\"'. $this->value . '\" \n\t\t\t\t\tonchange=\"display_dependance();\" />'.\"\\n\";\n\t\t\t\tbreak;\n\n\t\t\tcase 'checkbox' : \n\t\t\t\t$html.= '<input type=\"checkbox\" id=\"'. $this->name . '\" name=\"'. $this->name . '\"' . ( ($this->value == 'on') ? \" \n\t\t\t\t\tchecked \" : \"\") . ' onchange=\"display_dependance();\" />'.\"\\n\";\n\t\t\t\tbreak;\n\n\t\t\tcase 'file' : \n\t\t\t\t$html.= '<input type=\"file\" id=\"'. $this->name . '\" name=\"'. $this->name . '\" value=\"'. $this->value . '\" />'.\"\\n\";\n\t\t\t\tbreak;\n\n\t\t\tcase 'select' :\n\t\t\t\t$html.= '<select id=\"'. $this->name . '\" name=\"'. $this->name . '\" onchange=\"display_dependance();\" >'.\"\\n\";\n\t\t\t\t$valuesPossible = explode(',',$this->values);\n\t\t\t\tforeach ($valuesPossible as $valuePossible){\n\t\t\t\t\t$html.= '<option value=\"'. $valuePossible . '\" ' . (($valuePossible == $this->value) ? \" selected \" : \"\") . '>'.\n\t\t\t\t\t(($valuePossible == \"none\") ? NONE : $valuePossible) . '</option>'.\"\\n\";\n\t\t\t\t\t}\n\t\t\t\t$html.= '</select><div style=\"clear:both\"></div>'.\"\\n\";\n\t\t\t\tbreak; \n\n\t\t\tcase 'title' : \n\t\t\t\t$html.= \"\\n\". '<h2>'.$this->label.'</h2><hr />'.\"\\n\\n\";\t\t\t\n\t\t\t\tbreak;\n\n\t\t\t// system action items\n\t\t\tcase 'system' : \n\t\t\t\t// a system item will render a button that submit the form with the configured action name in the config-map.php\n\t\t\t\t$html.= '<label></label><input class=\"button\" type=\"button\" id=\"'. $this->name . '\" name=\"'. $this->name . '\" value=\"'.$this->label.'\" \n\t\t\t\tonclick=\"new Messi(\\''.addslashes($this->help).'\\', {\n\t\t\t\t\ttitle: \\''.addslashes($this->label).'?\\', \n\t\t\t\t\tmodal: true, buttons: [{id: 0, label: \\''.YES.'\\', val: \\'Y\\'}, {id: 1, label: \\''.NO.'\\', val: \\'N\\'}], \n\t\t\t\t\tcallback: function(val) { if(val==\\'Y\\') {openTerminal();formSubmit(\\''.$this->values.'\\');}}});\" />';\n\t\t\t\tbreak;\n\n\t\t\tcase 'html' : \n\t\t\t\t// this is only arbitrary html code to display\n\t\t\t\t$html.= $this->value;\t\t\t\n\t\t\t\tbreak;\n\n\t\t\t/**\n\t\t\t * HERE YOU CAN ADD THE TYPE RENDERER YOU NEED\n\t\t\t *\n\t\t\t * case 'YOUR_TYPE' : \n\t\t\t *\t$html.= 'ANY_HTML_CODE_TO_RENDER';\n\t\t\t *\tbreak;\n\t\t\t */\n\n\t\t\tdefault : \n\t\t\t\t$html.= '<b>'.NO_METHOD_TO_RENDER_THIS_ITEM .'</b><br />Item : '.$this->name. '<br />Type : '.$this->type. '<br />'.\"\\n\"; \n\t\t\t\tbreak;\n\t\t\t\n\t\t\t}\n\t\tif ($this->type != 'title') $html.= '</p>'.\"\\n\"; \t\t\n\t\treturn $html;\n\t}", "function group_text_settings(array &$data)\n{\n\tif (!DI::userSession()->getLocalUserId()) {\n\t\treturn;\n\t}\n\n\t$enabled = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'system', 'groupedit_image_limit');\n\n\t$t = Renderer::getMarkupTemplate('settings.tpl', 'addon/group_text/');\n\t$html = Renderer::replaceMacros($t, [\n\t\t'$enabled' => ['group_text', DI::l10n()->t('Use a text only (non-image) group selector in the \"group edit\" menu'), $enabled],\n\t]);\n\n\t$data = [\n\t\t'addon' => 'group_text',\n\t\t'title' => DI::l10n()->t('Group Text'),\n\t\t'html' => $html,\n\t];\n}", "function description($d) {\r\n\t\treturn ( (!empty($d)) ? '<br />' . '<span class=\"description\">'.$d. '</span>' : '');\r\n\t}", "public function setDescription($value);", "public function setDescription($description)\n\t{\n\t\t$this->description = $description;\n\n\t\tif($this->pageInitialized)\n\t\t\t$this->setMetaTag('description', $this->description);\n\t}", "public function setHtmlAfter($string);", "public static function setting_inner () \n { \n $html = null;\n\n $top = __( 'Setting : Option', 'text' );;\n $inner = self::setting_inner_center();\n $bottom = self::page_foot();\n\n $html .= self::page_body( 'setting', $top, $inner, $bottom );\n\n return $html;\n }", "public function customize_partial_blogdescription() {\n bloginfo('description');\n }", "protected function render() {\n\t\t$settings = $this->get_settings_for_display();\n\t\t?> \t\n\t\t\t<div class=\"wpsm-numhead wpsm-style1\">\n\t\t\t\t<span><?php echo intval($settings['num']);?></span>\t\t\t\t\n\t\t\t\t<h<?php echo esc_attr($settings['heading']);?> <?php echo ''.$this->get_render_attribute_string( \"content\" );?>><?php echo ''.$settings['content'];?></h<?php echo esc_attr($settings['heading']);?>>\n\t\t\t</div>\n\t \t<?php\t\n\t}", "static function description(): string {\r\n return 'A website owned or used by The Medium'; \r\n }", "function field_details() \n { ?>\n <div class=\"field-details\">\n <?php if($this->setting['type'] != 'radio' && $this->setting['type'] != 'checkbox') : ?><label <?php $this->for_tag(\"inferno-concrete-setting-\"); ?>><?php endif; ?>\n <?php echo $this->setting['desc']; ?>\n <?php if($this->setting['type'] != 'radio' && $this->setting['type'] != 'checkbox') : ?></label><?php endif; ?>\n\n <?php if(isset($this->setting['more']) && $this->setting['more'] != '') : ?>\n <span class=\"more\"><?php echo $this->setting['more']; ?></span>\n <?php endif; ?>\n\n <?php if($this->setting['type'] == 'font') : ?>\n <div class=\"googlefont-desc\">\n <label <?php $this->for_tag(\"inferno-concrete-setting-\", \"-googlefont\"); ?>>\n <?php _e('Enter the Name of the Google Webfont You want to use, for example \"Droid Serif\" (without quotes). Leave blank to use a Font from the selector above.', 'inferno'); ?>\n </label>\n <span class=\"more\">\n <?php _e('You can view all Google fonts <a href=\"http://www.google.com/webfonts\">here</a>. Consider, that You have to respect case-sensitivity. If the font has been successfully recognized, the demo text will change to the entered font.', 'inferno'); ?>\n </span>\n </div>\n <?php endif; ?>\n </div>\n <?php\n }", "function wp_credits_section_title($group_data = array())\n {\n }", "function site_description($site_desc = '', $location = 'site-tagline') {\n\t\t\t$desc = json_decode($this->get_cached_mod($location));\n\t\t\t$is_image_mode = isset($desc->mode) && 'image' === $desc->mode && !empty($desc->src);\n\t\t\t$url = apply_filters('themify_customizer_tagline_url', !empty($desc->link) ? $desc->link : home_url() );\n\t\t\t$html = !empty($desc->link) ? '<a class=\"site-taglink\" href=\"' . esc_attr($url) .'\" >' : '';\n\t\t\tif ( $is_image_mode===true) {\n\t\t\t\t$alt = get_post_meta( $desc->id, '_wp_attachment_image_alt', true ) ?: $site_desc;\n\t\t\t\t$title = get_the_title( $desc->id ) ?: $site_desc;\n\t\t\t\t$html .= '<img src=\"' . esc_url(themify_https_esc($desc->src)) . '\" alt=\"' . esc_attr( $alt ) . '\" title=\"' . esc_attr( $title ) . '\">';\n\t\t\t\tif(is_customize_preview()){\n\t\t\t\t $html .= '<span style=\"display: none;\">' . esc_html($site_desc) . '</span>' ;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t$html .= '<span>' . html_entity_decode($site_desc) . '</span>';\n\t\t\t}\n\t\t\t$html .= ( !empty($desc->link) ) ? '</a>' : '';\n\t\t\treturn $html;\n\t\t}", "public function setDescription($v, $type = 'markdown')\n {\n if ($type == 'html')\n {\n $v = IceStatic::cleanText($v, false, 'p, b, u, i, em, strong, h1, h2, h3, h4, h5, h6, div, span, ul, ol, li, blockquote');\n $v = cqMarkdownify::doConvert($v);\n }\n\n parent::setDescription($v);\n }", "public function get_description()\n {\n return 'Populate your image of the day gallery with 40 LOLCAT images. After installing the addon select the image of the day in the usual way by going to Admin zone > Content > Images of the day and select the image you want to display.';\n }", "function get_group_description($group) {\n\tglobal $home_locale, $current_locale;\n\tif ($home_locale == $current_locale\n\t\t\t|| !isset($group['vccommondescription'])\n\t\t\t|| !$group['vccommondescription']) {\n\t\treturn $group['vclocaldescription'];\n\t} else {\n\t\treturn $group['vccommondescription'];\n\t}\n}", "protected function assignDescription()\n {\n $this->description = 'This is a test for a Template Variable migration class';\n }", "public function setFooterHtml($value)\n {\n $this->fields['options']['footer_html'] = $value;\n }", "public function render()\n {\n if ('FE' === TYPO3_MODE) {\n $content = $this->renderChildren();\n if (!empty($content)) {\n $content = trim($content);\n if ($this->getTypoScriptFrontendController() !== null) {\n $this->getTypoScriptFrontendController()->indexedDocTitle = $content;\n $this->getTypoScriptFrontendController()->page['title'] = $content;\n $this->getTypoScriptFrontendController()->altPageTitle = $content;\n }\n }\n }\n }", "public function render_content()\n {\n ?>\n <label>\n\t\t\t<select <?php $this->link(); ?>>\n\t\t\t\t<?php\n\t\t\t\tprintf('<option value=\"%s\" %s>%s</option>', 'none', selected($this->value(), 'none', false), 'none');\n\t\t\t\tprintf('<option value=\"%s\" %s>%s</option>', 'capitalize', selected($this->value(), 'capitalize', false), 'capitalize');\n\t\t\t\tprintf('<option value=\"%s\" %s>%s</option>', 'uppercase', selected($this->value(), 'uppercase', false), 'uppercase');\n\t\t\t\tprintf('<option value=\"%s\" %s>%s</option>', 'lowercase', selected($this->value(), 'lowercase', false), 'lowercase');\n\t\t\t\t?>\n </select>\n\t\t\t<p class=\"description\"><?php echo esc_html( $this->label ); ?></p>\n </label>\n <?php\n }", "public function getGroupDescription()\n {\n return $this->__get(self::FIELD_GROUP_DESCRIPTION);\n }", "public function setHeaderHtml($value)\n {\n $this->fields['options']['header_html'] = $value;\n }", "function renderMetadata($content, $configuration) {\n\t\t$this->conf = $configuration;\n\t\t$this->sys_page = t3lib_div::makeInstance('t3lib_pageSelect');\n\t\t$this->sys_page->init($GLOBALS['TSFE']->showHiddenPage);\n\n\t\t$templateLayouts = array (\n\t\t\t'title' => $configuration['layouts.']['title'],\n\t\t\t'description' => $configuration['layouts.']['description'],\n\t\t\t'keywords' => $configuration['layouts.']['keywords']\n\t\t);\n\t\t$a_alternativePageContent = $this->getAlternativePageContent();\n\n\t\t// Set index/follow of page\n\t\t$a_indexFollow = array( 1 => 'noindex, nofollow', 2 => 'index, follow', 3 => 'noindex, follow', 4 => 'index, nofollow' );\n\t\t$GLOBALS['TSFE']->pSetup['meta.']['robots'] = $a_indexFollow[ $a_alternativePageContent['tx_rkmetadata_seo'] ];\n\n\t\t// Get the MetaData (keywords, description || get from rootLine when not available)\n\t\t$this->s_keyWords = $this->cleanForKeywords( $a_alternativePageContent['keywords'] );\n\t\t$this->s_description = $this->cleanForKeywords( $a_alternativePageContent['description'] );\n\n\t\t$this->s_keyWords = $this->replaceDynamicData( $templateLayouts['keywords'] ); // Get the dynamic page keywords\n\t\t$this->s_description = $this->replaceDynamicData( $templateLayouts['description'] ); // Get the dynamic page description\n\t\t$this->s_title = $this->replaceDynamicData( $templateLayouts['title'] ); // Get the dynamic page title\n\n\t\t// Set the MetaData (keywords, description and title)\n\t\t$GLOBALS['TSFE']->pSetup['meta.']['keywords'] = $this->s_keyWords;\n\t\t$GLOBALS['TSFE']->pSetup['meta.']['description'] = $this->s_description;\n\n\t\treturn('<title>'.$this->s_title.'</title>');\n\t}", "function myprefix_settings_section_content() {\n\techo '<p>';\n\t_e('Settings section description.');\n\techo '</p>';\n}", "function generalTemplate ($data){\n\t\t\tob_start();\t\t\n\t\t\tif(isset($data['title']) and isset($data['description'])):\n\t\t\t?>\n\t\t\t<div class=\"title text\">\n\t\t\t\t<h1><?php echo $data['title']; ?></h1>\n\t\t\t</div>\n \n <div id=\"description text\">\n\t\t\t\t<?php echo $data['description']; ?>\n </div>\n\t\t\t<?php\n\t\t\tendif;\n\t\t\t$output = ob_get_contents();\n\t\t\tob_end_clean();\t\n\t\t\t\n\t\t\treturn $output;\n\t\t}", "function setHtmlData($name, $value){\n\t\tif(!$this->isConfigured()) return false;\n\n\t\treturn $this->getTemplateObj()->setHtmlData($name, $value);\t\t\n\t}", "public function set_description($desciption){\n\t\t$this->set_channel_element('description', $desciption);\n\t}", "function training_page_html() {\n return t('This is the landing page of the Training module');\n}", "public function metaDescription()\n\t{\n\t\tif ( static::$titleLangPrefix and static::$descriptionLangSuffix )\n\t\t{\n\t\t\treturn \\IPS\\Member::loggedIn()->language()->addToStack( static::$titleLangPrefix . $this->id . static::$descriptionLangSuffix, FALSE, array( 'striptags' => TRUE ) );\n\t\t}\n\t\treturn NULL;\n\t}", "public function setHTML()\n {\n // Tanken är att logiken för att sätta HTML-koden för navbaren ligger i denna metod.\n\n\n $this->htmlNavbar = $this->getHTML();\n\n }", "public function testSetAndGetIsDescriptionHTML()\r\n {\r\n $testObj = $this->_createMockModel();\r\n $baseObj = $this->_createMockModel();\r\n\r\n // Set the Description to not HTML\r\n $testObj->setIsDescriptionHTML(false);\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 the Description field was updated\r\n $this->assertFalse($testObj->isDescriptionHTML());\r\n\r\n // Assert that no other return values were affected\r\n $this->_assertModelsSameExcept($testObj, $baseObj, 'IsDescriptionHTML');\r\n \r\n $testObj->setIsDescriptionHTML(true);\r\n $this->assertTrue($testObj->isDescriptionHTML());\r\n }", "public function sobre() {\n $this->template->set_title( 'Work for all - Sobre' );\n\n // renderiza a pagina\n\t\t$this->template->render( 'sobre' );\n }", "public function daveyjacobson_customize_partial_blogdescription() {\n \tbloginfo( 'description' );\n }", "public function getDescriptionTML() {\n\t\treturn TML::format($this->description);\n\t}", "public function description()\n\t{\n\t\t$txt = array();\n\t\t$txt['wiki'] = 'Embeds a video into the Page';\n\t\t$txt['html'] = '<p>Embeds a video into the Page. Accepts either full video URL (YouTube, Vimeo, Kaltura, Blip TV) or a file name or path.</p>\n\t\t\t\t\t\t<p><strong>Youtube URL:</strong> https://www.youtube.com/watch?v=<span class=\"highlight\">FgfGOEpZEOw</span></p>\n\t\t\t\t\t\t<p>Examples:</p>\n\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t<li><code>[[Video(MyVideo.m4v)]]</code></li>\n\t\t\t\t\t\t\t<li><code>[[Video(https://www.youtube.com/watch?v=FgfGOEpZEOw)]]</code></li>\n\t\t\t\t\t\t\t<li><code>[[Video(https://blip.tv/play/hNNNg4uIDAI.x?p=1)]]</code></li>\n\t\t\t\t\t\t\t<li><code>[[Video(https://player.vimeo.com/video/67115692)]]</code></li>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t<p>Size attributes may be given as single numeric values or with units (%, em, px). When an attribute name is given (e.g., width=600, height=338), order does not matter. Attribute values may be quoted but are not required to be. When a name attribute is not give (e.g., 600, 338), the first value will be set as width and the second value as height.</p>\n\t\t\t\t\t\t<p>Examples:</p>\n\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t<li><code>[[Video(MyVideo.m4v, width=\"600\", height=\"338\")]]</code></li>\n\t\t\t\t\t\t\t<li><code>[[Video(https://www.youtube.com/watch?v=FgfGOEpZEOw, width=600px, height=338px)]]</code></li>\n\t\t\t\t\t\t\t<li><code>[[Video(https://blip.tv/play/hNNNg4uIDAI.x?p=1, 640, 380)]]</code> - width 640px, height 380px</li>\n\t\t\t\t\t\t\t<li><code>[[Video(https://player.vimeo.com/video/67115692, 100%)]]</code> - width of 100%</li>\n\t\t\t\t\t\t</ul>';\n\n\t\treturn $txt['html'];\n\t}", "function htmlblock($text) {\n $this->html($text, 'pre');\n }", "public function setDescription($description);", "public function setDescription($description);", "public function setDescription($description);", "public function setDescription($description);", "public function setDescription($description);", "public function setDescription($description);", "public function renderHTML()\n {\n }", "function getDescriptionText() {\n global $Language;\n if ($this->isDescriptionMustBeLocalized()) {\n return $Language->getText('plugin_tracker_common_fieldset', $this->description);\n } else {\n return $this->description;\n }\n }", "public function generateContent()\n {\n parent::generateContent();\n $pathArray = $this->currentPageStrategy->getCurrentPagePath();\n $titleString = '';\n foreach ($pathArray as $page) {\n /** @var $page Page */\n\n $titleString .= ' - ' . (($t = $page->getTitle()) == '_404' ? 'Siden blev ikke fundet' : $t);\n }\n\n return $titleString;\n }", "protected function RenderSummary_HTML_line() {\n\t$out = \"\\n\"\n\t .$this->TitleHREF()\n\t .$this->CatNum()\n\t .' &ldquo;'\n\t .$this->NameString()\n\t .'&rdquo;</a>: '\n\t .$this->RenderStatus_HTML_line()\n\t .'<br>'\n\t ;\n\treturn $out;\n }", "function cosmetro_site_description() {\n\t$show_desc = get_theme_mod( 'show_tagline', cosmetro_theme()->customizer->get_default( 'show_tagline' ) );\n\n\tif ( ! $show_desc ) {\n\t\treturn;\n\t}\n\n\t$description = get_bloginfo( 'description', 'display' );\n\n\tif ( ! ( $description || is_customize_preview() ) ) {\n\t\treturn;\n\t}\n\n\t$format = apply_filters( 'cosmetro_site_description_format', '<div class=\"site-description\">%s</div>' );\n\n\tprintf( $format, $description );\n}", "function formattedDesc()\n {\n $lines = explode(\"\\n\", $this->desc);\n\n $result = \"\";\n foreach ($lines as $line)\n $result .= \"<p>\".$line.\"</p>\";\n\n return $result;\n }", "function output_html() {\n $adminroot =& admin_get_root();\n $return = '<fieldset>'.\"\\n\".'<div class=\"clearer\"><!-- --></div>'.\"\\n\";\n foreach($this->settings as $setting) {\n $fullname = $setting->get_full_name();\n if (array_key_exists($fullname, $adminroot->errors)) {\n $data = $adminroot->errors[$fullname]->data;\n } else {\n $data = $setting->get_setting();\n if (is_null($data)) {\n $data = $setting->get_defaultsetting();\n }\n }\n $return .= $setting->output_html($data);\n }\n $return .= '</fieldset>';\n return $return;\n }", "public function getOptionGroupDescription()\n {\n return '';\n }", "public function get_description()\n\t{\n\t\treturn '';\n\t}", "function MY_VERY_OWN_OM_Text($attr, $content = null) {\n\n\t$result = '<div style=\"display: flex; padding: 0px;\"><div class=\"oldEnglish\"><b><font color=\"gray\">ORIGINAL TEXT</font></b></div><div class=\"newEnglish\"><b><font color=\"gray\">MODERN TEXT</font></b></div></div>';\t\n\treturn $result;\n}", "public function setGroupDescription($description)\n {\n if(empty($description) || mb_strlen((string)$description) > self::GROUP_DESC_MAX_SIZE ) {\n throw new LedgerException(\n sprintf('Group Description must be a string < %s characters',self::GROUP_DESC_MAX_SIZE)\n );\n }\n \n \n $this->__set(self::FIELD_GROUP_DESCRIPTION, $description);\n }", "function bimber_render_logs_description() {\n\t?>\n\t<p><?php esc_html_e( 'If something suspicious happens, in this section you will find all information that helps you find and solve that problem. It can be also helpful for our support staff.', 'bimber' ); ?></p>\n\t<?php\n}" ]
[ "0.6442319", "0.6199586", "0.61627513", "0.60541904", "0.60494256", "0.6038114", "0.6001011", "0.5978238", "0.5958126", "0.5924818", "0.59193546", "0.585316", "0.5778183", "0.57723475", "0.5762287", "0.5748233", "0.57308424", "0.5725036", "0.570963", "0.56981546", "0.5691656", "0.5669986", "0.5658977", "0.5648291", "0.5641423", "0.5591929", "0.55856127", "0.5582065", "0.5580646", "0.55649364", "0.5556491", "0.555009", "0.5549365", "0.55345887", "0.5513893", "0.5505744", "0.5504719", "0.55011624", "0.55011624", "0.5494236", "0.5472679", "0.5470796", "0.54589546", "0.54546344", "0.54525894", "0.54259765", "0.5423113", "0.5420328", "0.54159194", "0.54088825", "0.5390071", "0.5380224", "0.53787816", "0.537794", "0.537328", "0.5369815", "0.53657794", "0.53625643", "0.53568095", "0.53555214", "0.535087", "0.5349904", "0.5349376", "0.5348975", "0.5347942", "0.5342736", "0.53411406", "0.53398436", "0.5338677", "0.5331559", "0.533111", "0.5324303", "0.5318903", "0.52903813", "0.52758485", "0.527217", "0.5266168", "0.52642655", "0.52596825", "0.5253629", "0.52461", "0.5243677", "0.523706", "0.52360386", "0.52360386", "0.52360386", "0.52360386", "0.52360386", "0.52360386", "0.52345264", "0.5231757", "0.52295923", "0.5228126", "0.5226984", "0.5224294", "0.5222296", "0.5216514", "0.52117854", "0.52105576", "0.521021", "0.5207128" ]
0.0
-1
Set the Page Grouping descriptionMoreInfoHtml
public function setDescriptionMoreInfoHtml($descriptionMoreInfoHtml = "") { $this->descriptionMoreInfoHtml = !empty($descriptionMoreInfoHtml) ? trim($descriptionMoreInfoHtml) : NULL; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDescriptionMoreInfoHtml() { return $this->descriptionMoreInfoHtml; }", "protected function setDescription() {\r\n\t\t$descriptionCrop = intval($this->settings['news']['semantic']['general']['description']['crop']);\r\n\t\t$descriptionAction = $this->settings['news']['semantic']['general']['description']['action'];\r\n\t\t$descriptionText = $this->newsItem->getTeaser();\r\n\t\tif (empty($descriptionText)) {\r\n\t\t\t$descriptionText = $this->newsItem->getBodytext();\r\n\t\t}\r\n\t\tif (!empty($descriptionText) && !empty($descriptionAction)) {\r\n\t\t\tif (!empty($GLOBALS['TSFE']->page['description'])) {\r\n\t\t\t\tswitch ($descriptionAction) {\r\n\t\t\t\t\tcase 'prepend':\r\n\t\t\t\t\t\t$descriptionText .= ': ' . $GLOBALS['TSFE']->page['description'];\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'append':\r\n\t\t\t\t\t\t$descriptionText = $GLOBALS['TSFE']->page['description'] . ': ' . $descriptionText;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$this->description = $this->contentObject->crop($descriptionText, $descriptionCrop . '|...|' . TRUE);\r\n\t\t}\r\n\t}", "protected function setHtmlContent() {}", "public function setHtml();", "public function setPageDescription($text)\n {\n $metaDescription = $this->query('meta[name=\"description\"]')->first();\n if ($text === '') {\n // If empty value passed we need to remove title tag\n if ($metaDescription) {\n $this->removeElement($metaDescription);\n }\n } else {\n if ($metaDescription) {\n $metaDescription->setAttribute('content', $text);\n } else {\n // Try to insert meta description tag into head\n $metaDescription = new Meta('description', $text);\n $head = $this->query('head');\n if ($head->count() > 0) {\n /* @var Element $head */\n $this->appendTo($head->first(), $metaDescription);\n }\n }\n }\n }", "static public function setDescription($new_description) {\n\t\tself::$page_description = (string)$new_description;\n\t}", "public function setDescription ($value) {\n\t\t$this->setData(\"pageDescription\", $value);\n\t\treturn true;\n\t}", "function description( $html = true )\r\n {\r\n if ( $html )\r\n return eZTextTool::fixhtmlentities( htmlspecialchars( $this->Description ) );\r\n else\r\n return $this->Description;\r\n }", "public function getDescriptionTextHtml() { return $this->descriptionTextHtml; }", "public function setDescription($description) {\n\t\tTemplate::setSiteMetaDescription($description);\n\t}", "function setDescription( $value )\r\n {\r\n $this->Description = $value;\r\n }", "function setDescription( $value )\r\n {\r\n $this->Description = $value;\r\n }", "function setElementDescription($elemName, $html)\n\t{\n\t\t// Only update if element is custom\n\t\tif (isset($this->elementListNames[$elemName])) {\n\t\t\t$this->elementListNames[$elemName]->description = $html;\n\t\t}\n\t}", "public function setDescription($description)\n\t{\n\t\t$this->description = $description;\n\n\t\tif($this->pageInitialized)\n\t\t\t$this->setMetaTag('description', $this->description);\n\t}", "public function setPageDescription($pageDescription)\n {\n $this->_pageDescription = $pageDescription;\n }", "public function property_overview_desc() {\n\n\t\t\t$short_description_1 = get_field( 'short_description_1' );\n\t\t\t$short_description_2 = get_field( 'short_description_2' );\n\n\t\t\t$out = '<h6>Overview Description:</h6>';\n\t\t\t$out .= '<p>';\n\t\t\t$out .= ( get_field( 'advertisement_package' ) == '165' )\n\t\t\t\t? $short_description_1\n\t\t\t\t: $short_description_2;\n\t\t\t$out .= '</p>';\n\t\t\t$out .= '<div class=\"hr hr-default\"><span class=\"hr-inner \"><span class=\"hr-inner-style\"></span></span></div>';\n\n\t\t\tif ( $this->add_package == 3 ) {\n\t\t\t$out .= '<h3>Practice Details:</h3>';\n\t\t\t}\n\n\t\t\treturn $out;\n\t\t}", "function medigroup_mikado_excerpt_more($more) {\n return '...';\n }", "public static function description($description)\n {\n // Set page description\n self::$data['description'] = $description;\n }", "function bg_AddSettingsSectionHtml() { }", "public function KemiSitemap_description()\n {\n echo '<p>Kemi Sitemap Description</p>';\n }", "protected function _setMetaDescription(array $metaDescription)\n {\n $metaDescription = $this->_insertContent(\n $this->getOriginPageMetaDescription(),\n $metaDescription,\n self::HEADING_DESCRIPTION_SEPARATOR\n );\n $this->category->setData('meta_description', $metaDescription);\n return $this;\n }", "public function set_description($desciption){\n\t\t$this->set_channel_element('description', $desciption);\n\t}", "protected function assignDescription()\n {\n $this->description = '';\n }", "protected function setHTMLVar() {\r\n $this->htmlVar = array(\r\n 'htmlTitle' => HTML_TITLE,\r\n 'htmlTitleSuffix' => ''\r\n );\r\n }", "function field_details() \n { ?>\n <div class=\"field-details\">\n <?php if($this->setting['type'] != 'radio' && $this->setting['type'] != 'checkbox') : ?><label <?php $this->for_tag(\"inferno-concrete-setting-\"); ?>><?php endif; ?>\n <?php echo $this->setting['desc']; ?>\n <?php if($this->setting['type'] != 'radio' && $this->setting['type'] != 'checkbox') : ?></label><?php endif; ?>\n\n <?php if(isset($this->setting['more']) && $this->setting['more'] != '') : ?>\n <span class=\"more\"><?php echo $this->setting['more']; ?></span>\n <?php endif; ?>\n\n <?php if($this->setting['type'] == 'font') : ?>\n <div class=\"googlefont-desc\">\n <label <?php $this->for_tag(\"inferno-concrete-setting-\", \"-googlefont\"); ?>>\n <?php _e('Enter the Name of the Google Webfont You want to use, for example \"Droid Serif\" (without quotes). Leave blank to use a Font from the selector above.', 'inferno'); ?>\n </label>\n <span class=\"more\">\n <?php _e('You can view all Google fonts <a href=\"http://www.google.com/webfonts\">here</a>. Consider, that You have to respect case-sensitivity. If the font has been successfully recognized, the demo text will change to the entered font.', 'inferno'); ?>\n </span>\n </div>\n <?php endif; ?>\n </div>\n <?php\n }", "public function setEmailFootHtml($value) { $this->_emailFootHtml = $value; }", "public function setDescription($data)\n {\n $this->_Description=$data;\n return $this;\n }", "private function getCommonDescriptionforField() {\n if(strlen($this->description) > 0) {\n return '<span id=\"'.$this->name.'-help\" class=\"help-block\">'.$this->description.'</span>'.\"\\n \\t\";\n }\n }", "public function setSetDescription($description) {\r\n\t\t$this -> setdescription = $description;\r\n\t}", "public function seoDescription(){\n return ($this->excerpt ? descriptionMaker($this->excerpt) : descriptionMaker($this->description));\n }", "function setHeadDescription($var)\n\t{\n\t\t$this -> head_description = $var;\n\t}", "public function setFooterHtml($value)\n {\n $this->fields['options']['footer_html'] = $value;\n }", "public function createShortDesc() {\n if (strlen($this->getDescription()) > 500) {\n $shortDesc = substr($this->getDescription(), 0, 500);\n $shortDesc = substr($shortDesc, 0, strrpos($shortDesc, ' ')) . '...';\n } else {\n $shortDesc = $this->getDescription();\n }\n $this->setShortDesc($shortDesc);\n }", "function get_site_description() {\r\n\t?>\r\n\t\t<div id=\"title-description\" class=\"five3-font\">Meal Replacement<br/>Energy Drink Mix</div>\r\n\t<?php\r\n}", "function new_excerpt_more( $more ) {\n\treturn '[...]<div class=\"read-more\"><a href=\"'. get_permalink( get_the_ID() ) . '\">Lire la suite</a></div>';\n}", "public function setGroupDescription($description)\n {\n if(empty($description) || mb_strlen((string)$description) > self::GROUP_DESC_MAX_SIZE ) {\n throw new LedgerException(\n sprintf('Group Description must be a string < %s characters',self::GROUP_DESC_MAX_SIZE)\n );\n }\n \n \n $this->__set(self::FIELD_GROUP_DESCRIPTION, $description);\n }", "function learn_press_course_lesson_description() {\n\t\tlearn_press_get_template( 'content-lesson/description.php' );\n\t}", "function setDescription($description) {\n\t\t$this->description = $description;\n\t}", "function setDescriptionB($descriptionB) {\r\r\n\t\t$this->descriptionB = $descriptionB;\r\r\n\t}", "function setItem_description($description){\n $this->item_description = $description;\n }", "public function display_description()\n\t{\t\n\t\t//return Markdown(htmlentities(utf8_encode($this->description), ENT_COMPAT | ENT_HTML401, 'UTF-8', false));\n\t\t//return htmlentities(utf8_encode($this->description), ENT_COMPAT | ENT_HTML401, 'UTF-8', false);\n\t\treturn str_replace(\"\\r\\n\", \"<br>\", $this->description);\n\t}", "protected function set_meta_desc()\r\r\n {\r\r\n define('_KEYWORDS',_BUY_ONLINE);\r\r\n define('_DESCRIPTION',_BUY_ONLINE);\r\r\n define('_TITLE_PAGE',_BUY_ONLINE);\r\r\n }", "public function setDescription($value);", "protected function setDescription($description) {\r\n $this->description = $description;\r\n }", "function dfcg_help_desc() {\n?>\n\t<h3><?php _e( 'Dynamic Content Gallery - Quick Help - Descriptions', DFCG_DOMAIN ); ?></h3>\n\t\n\t<p><?php _e( 'The Description is the text which appears below the post/Page title in the gallery Slide Pane.</p>\n\t<p>Four different options for creating the description are available: two \"auto\" options, one \"manual\" option, and one option to disable the description altogether.', DFCG_DOMAIN ); ?></p>\n\t\n\t<p><?php _e( 'If you want total control over the text, check the <span class=\"bold-italic\">Manual</span> option and enter the descriptions in the in-post DCG Metabox for each post/Page. This option also allows you to set up a fallback description which will be displayed if a DCG Metabox description does not exist.', DFCG_DOMAIN ); ?></p>\n\t\n\t<p><?php _e( 'The recommended \"auto\" option is <span class=\"bold-italic\">Auto</span>. This automatically creates a description from the post/Page content and allows you to specify the length of the description and customise its Read More link.', DFCG_DOMAIN ); ?></p>\n\t\n\t<p><?php _e( 'The alternative \"auto\" option is the <span class=\"bold-italic\">Excerpt</span> option. This will display the post/Page Excerpt - either the handcrafted one if it exists, or an automatic Excerpt of the first 55 words of the post/Page. Bear in mind using an automatic Excerpt will probably result in too much text for the Slide Pane, though this can be dealt with by using the WordPress excerpt filter. You can learn more about this filter <a href=\"http://www.studiograsshopper.ch/code-snippets/customising-the_excerpt/\" target=\"_blank\">here</a>.', DFCG_DOMAIN ); ?></p>\n\n<?php\n}", "public function options_page_overview() \n\t\t{\n\t\t\t$html = '';\n\t\t\t\n\t\t\tforeach( $this->size_groups as $size_group => $sizes ) \n\t\t\t{\n\t\t\t\t$html .= '<h3>' . $this->get_group_headline( $size_group ) . '</h3>';\n\t\t\t\t\n\t\t\t\t$html .= '<ul>';\n\t\t\t\t\n\t\t\t\tforeach( $sizes as $key => $image ) \n\t\t\t\t{\n\t\t\t\t\t$info = $image['width'] . '*' . $image['height'];\n\t\t\t\t\tif( isset( $image['crop'] ) && true === $image['crop'] )\n\t\t\t\t\t{\n\t\t\t\t\t\t$info .= ' ' . __( '(cropped)', 'avia_framework' );\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$info .= ' - ' . $this->get_image_key_info( $key );\n\t\t\t\t\t\n\t\t\t\t\t$html .= '<li>' . $info . '</li>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$html .= '</ul>';\n\t\t\t}\n\t\t\t\n\t\t\treturn $html;\n\t\t}", "function site_description($site_desc = '', $location = 'site-tagline') {\n\t\t\t$desc = json_decode($this->get_cached_mod($location));\n\t\t\t$is_image_mode = isset($desc->mode) && 'image' === $desc->mode && !empty($desc->src);\n\t\t\t$url = apply_filters('themify_customizer_tagline_url', !empty($desc->link) ? $desc->link : home_url() );\n\t\t\t$html = !empty($desc->link) ? '<a class=\"site-taglink\" href=\"' . esc_attr($url) .'\" >' : '';\n\t\t\tif ( $is_image_mode===true) {\n\t\t\t\t$alt = get_post_meta( $desc->id, '_wp_attachment_image_alt', true ) ?: $site_desc;\n\t\t\t\t$title = get_the_title( $desc->id ) ?: $site_desc;\n\t\t\t\t$html .= '<img src=\"' . esc_url(themify_https_esc($desc->src)) . '\" alt=\"' . esc_attr( $alt ) . '\" title=\"' . esc_attr( $title ) . '\">';\n\t\t\t\tif(is_customize_preview()){\n\t\t\t\t $html .= '<span style=\"display: none;\">' . esc_html($site_desc) . '</span>' ;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t$html .= '<span>' . html_entity_decode($site_desc) . '</span>';\n\t\t\t}\n\t\t\t$html .= ( !empty($desc->link) ) ? '</a>' : '';\n\t\t\treturn $html;\n\t\t}", "function mila_custom_excerpt_more($more) {\n global $post;\n return '&nbsp;<div class=\"more-link\"><a href=\"'. get_permalink($post->ID) . '\">'. __('<i title=\"Läs mer\" class=\"fa fa-arrow-circle-right\"></i>', 'mila') .'</a></div>';\n }", "protected function assignDescription()\n {\n $this->description = 'This is a test for a Template Variable migration class';\n }", "public function setDescription($value)\n {\n $this->setItemValue('description', (string)$value);\n }", "public function setDesc($val){ return $this->setField('desc',$val); }", "public function setDesciption($description);", "public function metaDescription()\n\t{\n\t\tif ( static::$titleLangPrefix and static::$descriptionLangSuffix )\n\t\t{\n\t\t\treturn \\IPS\\Member::loggedIn()->language()->addToStack( static::$titleLangPrefix . $this->id . static::$descriptionLangSuffix, FALSE, array( 'striptags' => TRUE ) );\n\t\t}\n\t\treturn NULL;\n\t}", "public function description()\n\t{\n\t\t$txt = array();\n\t\t$txt['wiki'] = 'Generates a link to a random page.';\n\t\t$txt['html'] = '<p>Generates a link to a random page.</p>';\n\t\treturn $txt['html'];\n\t}", "public function testAssignDescription()\n {\n $this->markTestIncomplete(\n 'This test has not been implemented yet.'\n );\n }", "function emc_the_cpt_description(){\r\n\r\n\t$desc = get_page_by_path( 'description', OBJECT, 'emc_content_focus' );\r\n\t$html = apply_filters( 'the_content', $desc->post_content );\r\n\techo $html;\r\n\r\n}", "public function setDescription($description)\n {\n $this->feedbackFields['description'] = $description;\n }", "public function setDescription($value) \n {\n $this->_fields['Description']['FieldValue'] = $value;\n return $this;\n }", "protected function renderInformationContent() {}", "protected function setDisplayData() {\n parent::setDisplayData();\n $this->template->setDisplayData( \"person_header\", $this->getTitle() );\n if ( !($form_link = $this->form_link)) {\n if ($this->module == 'I2CE') {\n $form_link = $this->page;\n } else {\n $form_link = $this->module .'/' . $this->page;\n }\n }\n $this->template->setDisplayData( \"person_form\", $form_link);\n }", "public function set_description($description) \n\t{\n\t\t$tag = ($this->version == ATOM)? 'summary' : 'description'; \n\t\t$this->add_element($tag, $description);\n\t}", "function description($element)\n\t\t{\n\t\t\t$output = '<div class=\"ace_description\">';\n\t\t\t$output .= $element['desc'];\n\t\t\t$output .= '</div>'; // <!--end ace_description-->\n\t\t\t$output .= '<div class=\"ace_control\">';\n\t\t\treturn $output;\t\t\n\t\t}", "public function setHeaderHtml($value)\n {\n $this->fields['options']['header_html'] = $value;\n }", "public function setDescription($desc) {\n\t\t$this->description = $desc;\n\t}", "public function setDescription($description){\n\t\t$this->description = $description;\n\t}", "function skin_sets_overview($content) {\n\n$IPBHTML = \"\";\n//--starthtml--//\n\n$IPBHTML .= <<<EOF\n<div class='tableborder'>\n <div class='tableheaderalt'>\n <table cellpadding='0' cellspacing='0' border='0' width='100%'>\n <tr>\n <td align='left' width='95%' style='font-size:12px; vertical-align:middle;font-weight:bold; color:#FFF;'>Стили</td>\n <td align='right' width='5%' nowrap='nowrap'>\n <img id=\"menumainone\" src='{$this->ipsclass->skin_acp_url}/images/filebrowser_action.gif' border='0' alt='Опции' class='ipd' /> &nbsp;\n </td>\n </tr>\n</table>\n </div>\n <table cellpadding='0' cellspacing='0' width='100%'>\n $content\n </table>\n <div align='center' class='tablefooter'>&nbsp;</div>\n</div>\n<br />\n<div><strong>Информация:</strong><br />\n<img src='{$this->ipsclass->skin_acp_url}/images/skin_item_altered.gif' border='0' alt='+' title='Изменен от начального варианта шаблона' /> Изменен от начального варианта шаблона.\n<br /><img src='{$this->ipsclass->skin_acp_url}/images/skin_item_unaltered.gif' border='0' alt='-' title='Не изменен от начального варианта шаблона' /> Не изменен от начального варианта шаблона.\n<br /><img src='{$this->ipsclass->skin_acp_url}/images/skin_item_inherited.gif' border='0' alt='|' title='Унаследованный от начального варианта шаблона' /> Унаследованный от начального варианта шаблона.\n</div>\n<div id='menumainone_menu' style='display:none' class='popupmenu'>\n\t<form action='{$this->ipsclass->base_url}&{$this->ipsclass->form_code}&code=addset&id=-1' method='POST'>\n\t<div align='center'><strong>Создать новый стиль</strong></div>\n\t<div align='center'><input type='text' name='set_name' size='20' value='Введите название стиля' onfocus='this.value=\"\"'></center></div>\n\t<div align='center'><input type='submit' value='Создать' class='realdarkbutton' /></div>\n\t</form>\n</div>\n<script type=\"text/javascript\">\n\tipsmenu.register( \"menumainone\" );\n</script>\nEOF;\nif ( IN_DEV == 1 )\n{\n$IPBHTML .= <<<EOF\n<br />\n<div align='center'>\n Экспорт данных: <a href='{$this->ipsclass->base_url}&{$this->ipsclass->form_code}&code=exportmaster'>Все HTML шаблоны главного стиля</a>\n &middot; <a href='{$this->ipsclass->base_url}&{$this->ipsclass->form_code}&code=exportbitschoose'>Выбрать HTML шаблоны</a>\n &middot; <a href='{$this->ipsclass->base_url}&{$this->ipsclass->form_code}&code=exportmacro'>Макросы главного стиля</a>\n</div>\n<br />\nEOF;\n}\n\n//--endhtml--//\nreturn $IPBHTML;\n}", "public function getGroupDescription() : string\n {\n return $this->groupDescription;\n }", "public function customize_partial_blogdescription() {\n bloginfo('description');\n }", "public function get_description()\n {\n return 'Populate your image of the day gallery with 40 LOLCAT images. After installing the addon select the image of the day in the usual way by going to Admin zone > Content > Images of the day and select the image you want to display.';\n }", "public function getHtmlOutputAttribute()\n {\n return nl2br(e($this->description));\n }", "public final function setData($more,$itemid){\r\n\t\t// $more is the $item->more.\r\n\t\tif (!preg_match('#<MedlineCitation[^>]*>([\\s\\S]*?)</MedlineCitation>#',$more,$m)) return;\r\n\t\t$xml=\"<?xml version='1.0'?>\\r\\n<document>\\r\\n$m[1]\\r\\n</document>\";\r\n\t\t$xml=simplexml_load_string($xml);\r\n\t\t$pmid=(int)$xml->PMID;\r\n\t\t$this->data[$pmid]=$xml;\r\n\t\t$this->sorteddata[]=$pmid;\r\n\t\t$this->itemid[$pmid]=$itemid;\r\n\t}", "public function testSetAndGetIsDescriptionHTML()\r\n {\r\n $testObj = $this->_createMockModel();\r\n $baseObj = $this->_createMockModel();\r\n\r\n // Set the Description to not HTML\r\n $testObj->setIsDescriptionHTML(false);\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 the Description field was updated\r\n $this->assertFalse($testObj->isDescriptionHTML());\r\n\r\n // Assert that no other return values were affected\r\n $this->_assertModelsSameExcept($testObj, $baseObj, 'IsDescriptionHTML');\r\n \r\n $testObj->setIsDescriptionHTML(true);\r\n $this->assertTrue($testObj->isDescriptionHTML());\r\n }", "public function setDescription($p_desc)\n {\n $this->description = $p_desc;\n return $this;\n }", "public function setDescription($description);", "public function setDescription($description);", "public function setDescription($description);", "public function setDescription($description);", "public function setDescription($description);", "public function setDescription($description);", "public function testDescWithHtmlEntity()\n {\n $oLink = oxNew(\"oxlinks\", getViewName('oxlinks'));\n $oLink->load($this->_oxLinks->getId());\n $oLink->oxlinks__oxurldesc = new oxField('Link&, &amp;, !@#$%^&*%$$&@\\'.,;p\"äüßö', oxField::T_RAW);\n $this->_oxLinks->Save();\n $this->assertEquals('Link&, &amp;, !@#$%^&*%$$&@\\'.,;p\"äüßö', $oLink->oxlinks__oxurldesc->value);\n }", "public function setDescription($newDescription)\n {\n $this->description = $newDescription;\n }", "function new_excerpt_more($more) {\n\n\tglobal $post;\n\n\treturn '...&nbsp; <a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\"><br/>read&nbsp;more</a>';\n\n}", "public function getSeoDescription(){ return $this->seo_description; }", "function setDescription( &$value )\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n $this->Description = $value;\n }", "function new_excerpt_more($more) {\n\tglobal $post;\n\treturn '<a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\"> Leia o artigo completo...</a>';\n}", "function new_excerpt_more($more) {\n global $post;\n\treturn '<div class=\"readmore\"><a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\"> Read More <i class=\"fa fa-long-arrow-right\" aria-hidden=\"true\"></i></a></div>';\n}", "function new_excerpt_more($more) {\n\tglobal $post;\n\treturn '&hellip; </br> <a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\">Read more</a>';\n}", "public function daveyjacobson_customize_partial_blogdescription() {\n \tbloginfo( 'description' );\n }", "public function setDescription($description)\n {\n $this->_description = $description;\n }", "function getDescription() {\r\n\t\treturn 'Lets you determine how many comments to show on item page, what order to show them in and provides pagination of results';\r\n\t}", "public function setDescription($description)\r\n {\r\n $this->description = $description;\r\n }", "function new_excerpt_more($more) {\n global $post;\n\treturn '<p><a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\"> Read More</a></p>';\n}", "private function get_description()\n\t{\n\t\treturn $this->m_description;\n\t}", "private function get_description()\n\t{\n\t\treturn $this->m_description;\n\t}", "public function getPagerHtml()\r\n {\r\n return $this->getChildHtml('pager');\r\n }", "public function setDescription($desc)\n {\n $this->description = $desc;\n }", "public function getInfoHtml()\n {\n return $this->getInfoBlock()->toHtml();\n }", "public function setHtmlAfter($string);", "function voyage_mikado_excerpt_more($more) {\n return '...';\n }", "function get_description() \t{\n \t\treturn $this->description;\n \t}" ]
[ "0.67480886", "0.60148144", "0.5888587", "0.5723601", "0.568397", "0.56631184", "0.56386054", "0.54860467", "0.5457825", "0.5443679", "0.5334175", "0.5334175", "0.53106445", "0.5308413", "0.53028333", "0.5297064", "0.526465", "0.5248049", "0.5245327", "0.5242192", "0.52301085", "0.52107507", "0.5194948", "0.5146114", "0.51015335", "0.5086144", "0.50700074", "0.50602955", "0.5058345", "0.5056068", "0.504646", "0.5044538", "0.50410914", "0.50307137", "0.5027631", "0.5019452", "0.50042963", "0.500376", "0.5000814", "0.49905965", "0.49881318", "0.49813434", "0.49756956", "0.49722335", "0.49699572", "0.49685407", "0.49680883", "0.49599698", "0.49592477", "0.49491182", "0.4948922", "0.4944865", "0.49448085", "0.49373955", "0.49260992", "0.49252284", "0.49216557", "0.49191293", "0.49098644", "0.49073675", "0.4905658", "0.49015015", "0.4900521", "0.4898959", "0.48981592", "0.4896869", "0.4890218", "0.4888209", "0.488795", "0.48853785", "0.4883122", "0.4883019", "0.48752934", "0.48688892", "0.48688892", "0.48688892", "0.48688892", "0.48688892", "0.48688892", "0.4858821", "0.48583978", "0.48492897", "0.4848855", "0.48417035", "0.48406515", "0.48393157", "0.483533", "0.48321426", "0.48266274", "0.48203522", "0.48196432", "0.48182678", "0.48179033", "0.48179033", "0.48160562", "0.48152232", "0.48133492", "0.48129162", "0.48100278", "0.48097154" ]
0.6606442
1
Set the Page Grouping specialHeaderClassName
public function setSpecialHeaderClassName($specialHeaderClassName = "") { $this->specialHeaderClassName = !empty($specialHeaderClassName) ? trim($specialHeaderClassName) : NULL; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSpecialHeaderClassName() { return $this->specialHeaderClassName; }", "public function setHeaderClass($class) {\r\n $this->headerClass = \"class=\\\"$class\\\"\";\r\n }", "public function setHeaderClass($class) {\n $this->headerClass = \"class=\\\"$class\\\"\";\n }", "function voyage_mikado_header_class($classes) {\n\t\t$header_type = voyage_mikado_get_meta_field_intersect('header_type', voyage_mikado_get_page_id());\n\n\t\t$classes[] = 'mkdf-'.$header_type;\n\n\t\treturn $classes;\n\t}", "public function setHeaderClass($headerClass) {\n $this->headerClass = $headerClass;\n }", "function voyage_mikado_header_behaviour_class($classes) {\n\n\t\t$classes[] = 'mkdf-'.voyage_mikado_options()->getOptionValue('header_behaviour');\n\n\t\treturn $classes;\n\t}", "function flatsome_header_title_classes(){\n echo implode(' ', apply_filters( 'flatsome_header_title_class', array() ) );\n}", "function header_class( $class = '' ) {\n\techo 'class=\"' . join( ' ', get_header_class( $class ) ) . '\"';\n}", "public function prePageHeader();", "function set_page_header( $page_header )\n {\n $this->includes[ 'page_header' ] = $page_header;\n return $this;\n }", "function get_body_class($classes){\n $group=groups_get_current_group();\n \n if(!empty($group))\n $classes[]='is-single-group';\n\n return $classes;\n\n\n }", "function flatsome_header_classes(){\n echo implode(' ', apply_filters( 'flatsome_header_class', array() ) );\n}", "function PREFIX_add_grid_class_to_body($classes) {\n\t$classes[] = 'fs-grid';\n\t$classes = array_diff( $classes, array(\"page\") );\n\n\treturn $classes;\n}", "function add_page_name_class($classes)\n\t{\n\t\tglobal $post;\n\t\tif ( is_page() || is_singular() ) {\n\t\t\t$classes[] = sanitize_html_class($post->post_name);\n\t\t}\n\t\treturn $classes;\n\t}", "function page_class( $classes ) {\n\tglobal $post;\n\t$slug = ( isset( get_post( $post )->post_name ) ? get_post( $post )->post_name : 'no-slug' );\n\t$new_class = 'page-' . $slug;\n\t$classes[] = $new_class;\n\treturn $classes;\n}", "public function _assign_xoops_header()\n {\n $header_class = webphoto_xoops_header::getInstance($this->_DIRNAME, $this->_TRUST_DIRNAME);\n $header_class->set_flag_css(true);\n $header_class->assign_for_main();\n }", "function wprt_feature_title_heading_classes() {\n\t// Define classes\n\t$classes = '';\n\n\t// Get topbar style\n\tif ( wprt_get_mod( 'featured_title_heading_shadow' ) ) {\n\t\t$classes .= 'has-shadow';\n\t}\n\n\t// Return classes\n\treturn esc_attr( $classes );\n}", "public function addColgroupClass($class)\n {\n if (is_array($class)) {\n self::slugArray($class);\n $this->html_colgroup_class = array_unique(array_merge($this->html_colgroup_class, $class));\n } elseif (is_string($class)) {\n $this->html_colgroup_class[] = self::slug($class);\n $this->html_colgroup_class = array_unique($this->html_colgroup_class);\n }\n }", "protected function getPageClassName()\n {\n return ContainerPage::className();\n }", "public function setBasePageClass($value)\r\n\t{\r\n\t\t$this->_basePageClass=$value;\r\n\t}", "function voyage_mikado_header_class_first_level_bg_color($classes) {\n\n\t\t//check if first level hover background color is set\n\t\tif(voyage_mikado_options()->getOptionValue('menu_hover_background_color') !== '') {\n\t\t\t$classes[] = 'mkdf-menu-item-first-level-bg-color';\n\t\t}\n\n\t\treturn $classes;\n\t}", "public function CustomClassName()\n\t{\n\t\tif ($this->CopyContentFromID > 0) {\n\t\t\tif ($this->CopyContentFrom()->ClassName == \"NavigationModule\") {\n\t\t\t\treturn \"NavigationModule_\" . $this->CopyContentFrom()->ModuleLayout;\n\t\t\t} else {\n\t\t\t\treturn $this->CopyContentFrom()->ClassName;\n\t\t\t}\n\t\t} else {\n\t\t\treturn $this->ClassName;\n\t\t}\n\t}", "function wpex_header_classes() {\n\n\t// Vars\n\t$post_id = wpex_get_current_post_id();\n\t$header_style = wpex_header_style( $post_id );\n\n\t// Setup classes array\n\t$classes = array();\n\n\t// Main header style\n\t$classes['header_style'] = 'header-'. $header_style;\n\n\t// Full width header\n\tif ( 'full-width' == wpex_site_layout() && wpex_get_mod( 'full_width_header' ) ) {\n\t\t$classes[] = 'wpex-full-width';\n\t}\n\n\t// Sticky Header\n\tif ( wpex_has_sticky_header() ) {\n\n\t\t// Fixed header style\n\t\t$fixed_header_style = wpex_sticky_header_style();\n\n\t\t// Main fixed class\n\t\t$classes['fixed_scroll'] = 'fixed-scroll'; // @todo rename this at some point?\n\t\tif ( wpex_has_shrink_sticky_header() ) {\n\t\t\t$classes['shrink-sticky-header'] = 'shrink-sticky-header';\n\t\t\tif ( 'shrink_animated' == $fixed_header_style ) {\n\t\t\t\t$classes['anim-shrink-header'] = 'anim-shrink-header';\n\t\t\t}\n\t\t}\n\n\t}\n\n\t// Reposition cart and search dropdowns\n\tif ( 'three' == $header_style\n\t\t|| 'four' == $header_style\n\t\t|| 'five' == $header_style\n\t\t|| ( 'two' == $header_style && wpex_get_mod( 'header_menu_center', false ) )\n\t) {\n\t\t$classes[] = 'wpex-reposition-cart-search-drops';\n\t}\n\n\t// Dropdown style (must be added here so we can target shop/search dropdowns)\n\t$dropdown_style = wpex_get_mod( 'menu_dropdown_style' );\n\tif ( $dropdown_style && 'default' != $dropdown_style ) {\n\t\t$classes['wpex-dropdown-style-'. $dropdown_style] = 'wpex-dropdown-style-'. $dropdown_style;\n\t}\n\n\t// Dropdown shadows\n\tif ( $shadow = wpex_get_mod( 'menu_dropdown_dropshadow' ) ) {\n\t\t$classes[] = 'wpex-dropdowns-shadow-'. $shadow;\n\t}\n\n\t// Header Overlay Style\n\tif ( wpex_has_overlay_header() ) {\n\n\t\t// Get header style\n\t\t$overlay_style = wpex_overlay_header_style();\n\t\t$overlay_style = $overlay_style ? $overlay_style : 'light';\n\n\t\t// Dark dropdowns for overlay header\n\t\tif ( 'core' != $overlay_style ) {\n\t\t\tif ( $post_id && $dropdown_style_meta = get_post_meta( $post_id, 'wpex_overlay_header_dropdown_style', true ) ) {\n\t\t\t\tif ( 'default' != $dropdown_style_meta ) {\n\t\t\t\t\t$classes[] = 'wpex-dropdown-style-'. $dropdown_style_meta;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tunset( $classes['wpex-dropdown-style-'. $dropdown_style] );\n\t\t\t\t$classes[] = 'wpex-dropdown-style-black';\n\t\t\t}\n\t\t}\n\n\t\t// Add overlay header class\n\t\t$classes[] = 'overlay-header';\n\n\t\t// Add overlay header style class\n\t\t$classes[] = $overlay_style .'-style';\n\n\t}\n\n\t// Dynamic style class\n\t$classes[] = 'dyn-styles';\n\n\t// Clearfix class\n\t$classes[] = 'clr';\n\n\t// Set keys equal to vals\n\t$classes = array_combine( $classes, $classes );\n\n\t// Apply filters for child theming\n\t$classes = apply_filters( 'wpex_header_classes', $classes );\n\n\t// Turn classes into space seperated string\n\t$classes = implode( ' ', $classes );\n\n\t// return classes\n\treturn $classes;\n\n}", "function cs_subheader_classes( $header_banner_selection = ''){\n\tif ($header_banner_selection == \"No Image\") {\n \techo 'cs-no-image';\n }elseif($header_banner_selection == 'Custom Image'){\n\t\techo 'cs-custom-image';\n\t} elseif ($header_banner_selection == \"Default Image\") {\n \techo \"default-image\";\n } else {\n \techo \"default-image\";\n }\n}", "private function addHeaderToStaticMap()\n {\n HeaderLoader::addStaticMap(\n [\n 'xmagentotags' => XMagentoTags::class,\n ]\n );\n }", "public function clearColgroupClass()\n {\n $this->html_colgroup_class = [];\n }", "function setup_config_display_header($body_classes = array())\n {\n }", "protected function draw_groupsHeaderHorizontal()\n {\n // $this->output->setColumnNo(0);\n $lastcolumno = $this->output->getColumnNo();\n $this->output->setColumnNo(0);\n $this->draw_groupsHeader();\n $this->output->setColumnNo($lastcolumno);\n $this->currentRowTop = $this->output->getLastBandEndY();\n \n //output print group\n //set callback use next page instead\n // echo 'a'; \n }", "public function getPageClasses( $title ) {\n\t\t$className = parent::getPageClasses( $title );\n\t\t$className .= ' ' . $this->getMode();\n\t\tif ( $title->isMainPage() ) {\n\t\t\t$className .= ' page-Main_Page ';\n\t\t} elseif ( $title->isSpecialPage() ) {\n\t\t\t$className .= ' mw-mf-special ';\n\t\t}\n\n\t\tif ( $this->isAuthenticatedUser() ) {\n\t\t\t$className .= ' is-authenticated';\n\t\t}\n\t\treturn $className;\n\t}", "public function addClassHeader($classHeader) {\n\t\t$this->processedClassCode = preg_replace_callback(self::PATTERN_CLASS_SIGNATURE, function($matches) use ($classHeader) {\n\t\t\treturn $classHeader . chr(10) . $matches['modifiers'] . $matches['className'] . $matches['parents'];\n\t\t}, $this->processedClassCode);\n\t}", "public function initPageHeaders()\n\t{\n\t\tinclude_once('view/main_page_header.php');\n\t}", "function quadro_header_extras_class($classes) {\n\t\t$classes[] = 'header-extras-on';\n\t\treturn $classes;\n\t}", "public function useWrapperClassesInHeading()\n {\n return $this->withMeta(['useWrapperClassesInHeading' => true]);\n }", "function setClassName($value) {\r\n $this->className = $value;\r\n }", "function setHeaderTitle($value) {\n $this->header_title = $value;\n}", "public function onRender()\n {\n $this->page['cssClass'] = $this->property('cssClass');\n\n }", "public function onRender()\n {\n $this->page['cssClass'] = $this->property('cssClass');\n\n }", "public function gismo_custom_header_section() {\n\t\t\n\t\t\t$screens = array( 'page', 'post' );\n\t\t\t\n\t\t\tif($this->settings['layout']['page_title'] == 'custom'){\n\t\t\t\t\n\t\t\t\tforeach ( $screens as $screen ) {\n\n\t\t\t\t\tadd_meta_box(\n\n\t\t\t\t\t\t'custom_header_section_id',\n\n\t\t\t\t\t\t__( 'Custom Header Section', 'custom_header_section_textdomain' ),\n\n\t\t\t\t\t\tarray($this,'gismo_custom_header_section_callback'),\n\n\t\t\t\t\t\t$screen\n\n\t\t\t\t\t);\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}", "public static function setHTMLHeader($header) \n\t{\n\t\tacPhpCas::setReporting();\n\t\tphpCAS::setHTMLHeader($header);\t\t\n\t}", "public function onRender()\n {\n $this->page['cssClass'] = $this->property('cssClass');\n }", "protected function setHeader($header_extra = '') {\n $this->header = \"<!DOCTYPE html> \\n <html> \\n <head> \\n <meta charset='utf-8'> \\n <title>Log-in Page Project</title>\";\n $this->loadConfig();\n $this->addMeta();\n $this->addJS();\n $this->addCSS();\n $this->header.=$header_extra;\n $this->header.=\"</head>\";\n return $this->header;\n }", "function core_admin_header_style() {\r\n }", "public function setBodyClass($class) {\n\t\t\t# Prevents duplicate \"index\" classes\n\t\t\tif ($this->_context['page'] != 'index' || $class != 'index')\n\t\t\t\t$this->_body_class .= $class;\n\t\t}", "function Header()\n {\n $this->m_projectedHeaderCounts = new ShadowCounts();\n }", "function biagiotti_mikado_get_main_menu( $additional_class = 'mkdf-default-nav' ) {\n\t\tbiagiotti_mikado_get_module_template_part( 'parts/navigation', 'header', '', array( 'additional_class' => $additional_class ) );\n\t}", "public function defineHeader()\n {\n $this->header = new Header();\n }", "function httpHeader($header) {\r\n\t\t$this->customHeaders[] = $header;\r\n\t}", "function wpdocs_special_nav_class( $classes, $item ) {\n if ( 'Movilizarte en Yarumal' == $item->title ) {\n // Notice you can change the conditional from is_single() and $item->title\n $classes[] = \"special-class\";\n }\n return $classes;\n}", "function atg_menu_classes($classes, $item, $args) {\n if($args->theme_location == 'header') {\n $classes[] = 'nav-item';\n }\n return $classes;\n}", "function PageHead($d,$e) {\n\n print \"<header class=\\\"$e\\\">\\n\";\n print \"<H1>$d</H1>\\n\";\n print \"</header>\\n\";\n\n}", "public function setHeadClass($class)\n {\n $this->headClass = $class;\n # return Calendar instance\n return $this;\n }", "public function setPageTitle($page_name);", "public function setPageTitle($page_name);", "function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}", "function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}", "function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}", "function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}", "function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}", "function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}", "function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}", "function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}", "function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}", "function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}", "function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}", "function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}", "function header_inner_class($position) {\n global $page;\n\n $classes = null;\n $current_page = null;\n\n // Header main\n if($position == 'main'){\n\n if(get_theme_mod('logo_position') == 'center'){\n $classes[] = 'show-logo-center';\n }\n\n if(!get_theme_mod('header_sticky', 1)) $classes[] = 'hide-for-sticky';\n\n if(get_theme_mod('site_logo_sticky')) {\n $classes[] = 'has-sticky-logo';\n }\n\n if(get_theme_mod('header_color') == 'dark') $classes[] = 'nav-dark';\n }\n\n // Header top\n if($position == 'top'){\n if(!get_theme_mod('topbar_sticky')) $classes[] = 'hide-for-sticky';\n if(get_theme_mod('topbar_color', 'dark') == 'dark') $classes[] = 'nav-dark';\n if(get_theme_mod('topbar_elements_center')) $classes[] = 'flex-has-center';\n if(!get_theme_mod('header_mobile_elements_top')) {\n $classes[] = 'hide-for-medium';\n }\n }\n\n // Header bottom\n if($position == 'bottom'){\n if(!get_theme_mod('bottombar_sticky', 1)) $classes[] = 'hide-for-sticky';\n if(get_theme_mod('nav_position_color') == 'dark') $classes[] = 'nav-dark';\n if(get_theme_mod('nav_position_color') == 'dark-header') $classes[] = 'nav-dark';\n if(get_theme_mod('header_elements_bottom_center')) $classes[] = 'flex-has-center';\n if(!get_theme_mod('header_mobile_elements_bottom')) {\n $classes[] = 'hide-for-medium';\n }\n elseif(get_theme_mod('header_mobile_elements_bottom') && flatsome_has_bottom_bar()['mobile_only']){\n $classes[] = 'show-for-medium';\n }\n }\n\n // Dark nav on light headers\n $page_template = get_post_meta( get_the_ID(), '_wp_page_template', true );\n if(!empty($page_template) && strpos($page_template, 'light') !== false && $position == 'bottom' || strpos($page_template, 'light') !== false && $position == 'main' && get_theme_mod('header_color', 'light') !== 'dark') {\n $classes[] = 'nav-dark toggle-nav-dark';\n }\n\n if(!$classes) $classes[] = \"\";\n\n echo implode(\" \", $classes);\n}", "function fiorello_mikado_set_header_standard_type_as_global_option( $header_type ) {\n\t\t$header_type = 'header-standard';\n\t\t\n\t\treturn $header_type;\n\t}", "protected function setClass()\n {\n $default = 'List';\n if ( isset( $_GET['spid'] ) ) {\n switch ( $_GET['spid'] ) {\n case 'fundraisers':\n $this->class = 'Fundraisers';\n return;\n default:\n $this->class = $default;\n return;\n }\n }\n $this->class = $default;\n }", "public static function css_class_list() {\r\n\r\n\t\t\tself::$css_class_arr = array(\r\n\t\t\t\t'zakra_header_class' => array(\r\n\t\t\t\t\t'site-header',\r\n\t\t\t\t\t'tg-site-header',\r\n\t\t\t\t),\r\n\t\t\t\t'zakra_header_main_container_class' => array(\r\n\t\t\t\t\t'tg-header-container',\r\n\t\t\t\t\t'tg-container',\r\n\t\t\t\t\t'tg-container--flex',\r\n\t\t\t\t\t'tg-container--flex-center',\r\n\t\t\t\t\t'tg-container--flex-space-between',\r\n\t\t\t\t),\r\n\t\t\t\t'zakra_header_top_class' => array(\r\n\t\t\t\t\t'tg-site-header-top',\r\n\t\t\t\t),\r\n\t\t\t\t'zakra_header_top_container_class' => array(\r\n\t\t\t\t\t'tg-header-container',\r\n\t\t\t\t\t'tg-container',\r\n\t\t\t\t\t'tg-container--flex',\r\n\t\t\t\t\t'tg-container--flex-center',\r\n\t\t\t\t),\r\n\t\t\t\t'zakra_page_header_container_class' => array(\r\n\t\t\t\t\t'tg-container',\r\n\t\t\t\t\t'tg-container--flex',\r\n\t\t\t\t\t'tg-container--flex-center',\r\n\t\t\t\t\t'tg-container--flex-space-between',\r\n\t\t\t\t),\r\n\t\t\t\t'zakra_nav_class' => array(\r\n\t\t\t\t\t'main-navigation',\r\n\t\t\t\t\t'tg-primary-menu',\r\n\t\t\t\t),\r\n\t\t\t\t'zakra_header_action_class' => array(\r\n\t\t\t\t\t'tg-header-action',\r\n\t\t\t\t),\r\n\t\t\t\t'zakra_read_more_wrapper_class' => array(\r\n\t\t\t\t\t'tg-read-more-wrapper',\r\n\t\t\t\t\t'clearfix',\r\n\t\t\t\t),\r\n\t\t\t\t'zakra_footer_widgets_container_class' => array(\r\n\t\t\t\t\t'tg-container',\r\n\t\t\t\t),\r\n\t\t\t\t'zakra_footer_bottom_bar_container_class' => array(\r\n\t\t\t\t\t'tg-container',\r\n\t\t\t\t\t'tg-container--flex',\r\n\t\t\t\t\t'tg-container--flex-top',\r\n\t\t\t\t),\r\n\t\t\t\t'zakra_scroll_to_top_class' => array(\r\n\t\t\t\t\t'tg-scroll-to-top',\r\n\t\t\t\t),\r\n\t\t\t\t'zakra_mobile_nav_class' => array(\r\n\t\t\t\t\t'tg-mobile-navigation',\r\n\t\t\t\t),\r\n\t\t\t);\r\n\r\n\t\t\treturn apply_filters( 'zakra_css_class_list', self::$css_class_arr );\r\n\r\n\t\t}", "public function headingClasses($classes)\n {\n $this->headingClasses = $classes;\n\n return $this;\n }", "public function setClassName($class) {\n $this->_className = $class;\n }", "public function getGroupHeader()\n {\n if (is_null($this->groupHeader)) {\n $this->groupHeader = new SEPAGroupHeader();\n }\n\n return $this->groupHeader;\n }", "public function setClassName( $value ) {\r\n\t\t$this->class_name = $value;\r\n\t}", "function my_class_names($classes) {\n\t\t// add 'class-name' to the $classes array\n\t\tif( !is_front_page() ) $classes[] = 'interna';\n\t\t// return the $classes array\n\t\treturn $classes;\n\t}", "public function setClassName(string $class): void {\n\t\t$this->setAttribute(\"class\", [$class]);\n\t}", "public function hookdisplayHeader($params)\n {\n if ('order' === $this->context->controller->php_self) {\n $this->context->controller->registerStylesheet('modules-pagoseguro', 'modules/'.$this->name.'/css/pagoseguro.css', ['media' => 'all', 'priority' => 200]);\n $this->context->controller->registerJavascript('modules-pagoseguro', 'modules/'.$this->name.'/js/pagoseguro.js', ['position' => 'bottom', 'priority' => 200]);\n }\n }", "function _hs_body_classes( $classes ) {\n\tglobal $post;\n\t\n\t// Adds a class of group-blog to blogs with more than 1 published author.\n\tif ( is_multi_author() ) {\n\t\t$classes[] = 'group-blog';\n\t}\n\n\t// Adds page slug to body class\n\tif ( isset( $post ) ) {\n\t\t$classes[] = $post->post_type . '-' . $post->post_name;\n\t}\n\n\treturn $classes;\n}", "function uvasomrfdsearch_add_classes( $classes ) {\n\tunset($classes['home']);\n\t$classes[] = 'search';\n\t$classes[] = 'uvasom-fac-list';\n\tif (is_page('27718')):$classes[] = 'unleash';\n\tendif;\n\treturn $classes;\n}", "function fiorello_mikado_set_header_standard_type_global_option( $header_types ) {\n\t\t$header_types['header-standard'] = array(\n\t\t\t'image' => MIKADO_FRAMEWORK_HEADER_TYPES_ROOT . '/header-standard/assets/img/header-standard.png',\n\t\t\t'label' => esc_html__( 'Standard', 'fiorello' )\n\t\t);\n\t\t\n\t\treturn $header_types;\n\t}", "function klippe_core_set_split_section_icon_class_name_for_vc_shortcodes( $shortcodes_icon_class_array ) {\n\t\t$shortcodes_icon_class_array[] = '.icon-wpb-split-section';\n\t\t\n\t\treturn $shortcodes_icon_class_array;\n\t}", "public function setGroupHeader(SEPAGroupHeader $groupHeader)\n {\n $this->groupHeader = $groupHeader;\n }", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}" ]
[ "0.67822284", "0.6517376", "0.64062715", "0.6094492", "0.57520664", "0.56397563", "0.5452493", "0.5432467", "0.5396821", "0.5377883", "0.537453", "0.52890724", "0.52877814", "0.528752", "0.52807635", "0.5233675", "0.52175856", "0.5202263", "0.51882803", "0.51798403", "0.516564", "0.51650006", "0.51492417", "0.51338893", "0.5127688", "0.50962114", "0.50758564", "0.5072603", "0.50539124", "0.50461185", "0.50328326", "0.50294966", "0.5027568", "0.50146914", "0.49981958", "0.49901378", "0.49901378", "0.49448067", "0.49417976", "0.4941546", "0.49294117", "0.4923416", "0.4912924", "0.49031818", "0.4895429", "0.48900074", "0.48893455", "0.487818", "0.48735595", "0.48679355", "0.48563224", "0.4854801", "0.4854801", "0.48512572", "0.48512572", "0.48512572", "0.48512572", "0.48512572", "0.48512572", "0.48512572", "0.48512572", "0.48512572", "0.48512572", "0.48512572", "0.48512572", "0.48159033", "0.48078912", "0.48000056", "0.4797409", "0.47944734", "0.47932005", "0.4789315", "0.47863287", "0.47855717", "0.47738966", "0.47677585", "0.47637147", "0.47627026", "0.47547057", "0.4748278", "0.47443837", "0.47430518", "0.47430518", "0.47430518", "0.47430518", "0.47430518", "0.47430518", "0.47430518", "0.47430518", "0.47430518", "0.47430518", "0.47430518", "0.47430518", "0.47430518", "0.47430518", "0.47430518", "0.47430518", "0.47430518", "0.47430518", "0.47430518" ]
0.66253924
1
Set the Page Grouping interSupplementHtml
public function setIntroSupplementHtml($interSupplementHtml = "") { $this->interSupplementHtml = !empty($interSupplementHtml) ? trim($interSupplementHtml) : NULL; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setHtml();", "protected function setHtmlContent() {}", "public function displayPage()\n {\n $this->getState()->template = 'displaygroup-page';\n }", "static public function setHTML() {\n\t\tself::$page_type = 0;\n\t}", "function bg_AddSettingsSectionHtml() { }", "function skin_diff_row_newgroup( $group_name ) {\n\n$IPBHTML = \"\";\n//--starthtml--//\n\n$IPBHTML .= <<<EOF\n<tr>\n <td colspan='4' class='tablerow3'>\n <strong>{$group_name}</strong>\n </td>\nEOF;\n\n//--endhtml--//\nreturn $IPBHTML;\n}", "function template_bits_overview_row_normal( $group, $folder_blob, $count_string ) {\n\n$IPBHTML = \"\";\n//--starthtml--//\n\n$IPBHTML .= <<<EOF\n<div class='tablerow1' id='dv-{$group['group_name']}'>\n <div style='float:right'>\n ($count_string)&nbsp;{$group['easy_preview']}\n </div>\n <div align='left'>\n <img src='{$this->ipsclass->skin_acp_url}/images/folder.gif' alt='Группа шаблонов' style='vertical-align:middle' />\n {$folder_blob}&nbsp;<a style='font-size:11px' id='gn-{$group['group_name']}' onclick='template_load_bits(\"{$group['group_name']}\", event)' title='{$group['easy_desc']}' href='{$this->ipsclass->base_url}&{$this->ipsclass->form_code}&code=template-bits-list&id={$group['_id']}&p={$group['_p']}&group_name={$group['group_name']}&'>{$group['easy_name']}</a>\n <span id='match-{$group['group_name']}'></span>\n </div>\n</div>\nEOF;\n\n//--endhtml--//\nreturn $IPBHTML;\n}", "function setCustomHTML($html) {\n\t\t$this->customHTML = $html;\n\t}", "protected function _beforeToHtml()\n {\n $this->renderGalleryHtml();\n return parent::_beforeToHtml();\n }", "public function setHtmlPage($page)\n\t{\n\t\t$this->page = (string)$page;\n\t\t$this->pageInitialized = false;\n\t}", "function SetUpDisplayGrps() {\n\t\tglobal $deals_details;\n\t\t$sWrk = @$_GET[EWRPT_TABLE_GROUP_PER_PAGE];\n\t\tif ($sWrk <> \"\") {\n\t\t\tif (is_numeric($sWrk)) {\n\t\t\t\t$this->DisplayGrps = intval($sWrk);\n\t\t\t} else {\n\t\t\t\tif (strtoupper($sWrk) == \"ALL\") { // display all groups\n\t\t\t\t\t$this->DisplayGrps = -1;\n\t\t\t\t} else {\n\t\t\t\t\t$this->DisplayGrps = 50; // Non-numeric, load default\n\t\t\t\t}\n\t\t\t}\n\t\t\t$deals_details->setGroupPerPage($this->DisplayGrps); // Save to session\n\n\t\t\t// Reset start position (reset command)\n\t\t\t$this->StartGrp = 1;\n\t\t\t$deals_details->setStartGroup($this->StartGrp);\n\t\t} else {\n\t\t\tif ($deals_details->getGroupPerPage() <> \"\") {\n\t\t\t\t$this->DisplayGrps = $deals_details->getGroupPerPage(); // Restore from session\n\t\t\t} else {\n\t\t\t\t$this->DisplayGrps = 50; // Load default\n\t\t\t}\n\t\t}\n\t}", "function SetUpDisplayGrps() {\n\t\tglobal $dealers_reports;\n\t\t$sWrk = @$_GET[EWRPT_TABLE_GROUP_PER_PAGE];\n\t\tif ($sWrk <> \"\") {\n\t\t\tif (is_numeric($sWrk)) {\n\t\t\t\t$this->DisplayGrps = intval($sWrk);\n\t\t\t} else {\n\t\t\t\tif (strtoupper($sWrk) == \"ALL\") { // display all groups\n\t\t\t\t\t$this->DisplayGrps = -1;\n\t\t\t\t} else {\n\t\t\t\t\t$this->DisplayGrps = 50; // Non-numeric, load default\n\t\t\t\t}\n\t\t\t}\n\t\t\t$dealers_reports->setGroupPerPage($this->DisplayGrps); // Save to session\n\n\t\t\t// Reset start position (reset command)\n\t\t\t$this->StartGrp = 1;\n\t\t\t$dealers_reports->setStartGroup($this->StartGrp);\n\t\t} else {\n\t\t\tif ($dealers_reports->getGroupPerPage() <> \"\") {\n\t\t\t\t$this->DisplayGrps = $dealers_reports->getGroupPerPage(); // Restore from session\n\t\t\t} else {\n\t\t\t\t$this->DisplayGrps = 50; // Load default\n\t\t\t}\n\t\t}\n\t}", "public function getPagerHtml()\r\n {\r\n return $this->getChildHtml('pager');\r\n }", "public function renderBeginTag($writer)\n\t{\n\t\tparent::renderBeginTag($writer);\n\t\tif(($text=$this->getGroupingText())!=='')\n\t\t{\n\t\t\t$writer->renderBeginTag('fieldset');\n\t\t\t$writer->renderBeginTag('legend');\n\t\t\t$writer->write($text);\n\t\t\t$writer->renderEndTag();\n\t\t}\n\t}", "public function getGroupByPage() {}", "public function getPagerHtml()\n {\n return $this->getChildHtml('pager');\n }", "public function getPagerHtml()\n {\n return $this->getChildHtml('pager');\n }", "public function getPagerHtml()\n {\n return $this->getChildHtml('pager');\n }", "public function getPagerHtml()\n {\n return $this->getChildHtml('pager');\n }", "public function setHtml($html)\n\t{\n\t\t$this->_html = $this->buildHtml($html);\n\t}", "function before_render_tealium_html() {\r\n \r\n }", "public function setHTML()\n {\n // Tanken är att logiken för att sätta HTML-koden för navbaren ligger i denna metod.\n\n\n $this->htmlNavbar = $this->getHTML();\n\n }", "function showPageEditorSettingsObject()\n\t{\n\t\tglobal $tpl, $ilTabs, $ilCtrl;\n\t\t\n\t\t$this->addPageEditorSettingsSubTabs();\n\t\t\n\t\tinclude_once(\"./Services/COPage/classes/class.ilPageEditorSettings.php\");\n\t\t$grps = ilPageEditorSettings::getGroups();\n\t\t\n\t\t$this->cgrp = $_GET[\"grp\"];\n\t\tif ($this->cgrp == \"\")\n\t\t{\n\t\t\t$this->cgrp = key($grps);\n\t\t}\n\n\t\t$ilCtrl->setParameter($this, \"grp\", $this->cgrp);\n\t\t$ilTabs->setSubTabActive(\"adve_grp_\".$this->cgrp);\n\t\t\n\t\t$this->initPageEditorForm();\n\t\t$tpl->setContent($this->form->getHtml());\n\t}", "public function outerHtml()\n {\n }", "protected function setHTMLVar() {\r\n $this->htmlVar = array(\r\n 'htmlTitle' => HTML_TITLE,\r\n 'htmlTitleSuffix' => ''\r\n );\r\n }", "protected function generateHtml()\n\t{\n\t}", "function group( $element )\n\t\t{\t\n\n\t\t\t\n\t\t\t$iterations = 1;\n\t\t\t$output = \"\";\n\t\t\t$real_id = $element['id'];\n\t\t\t\n\t\t\tif((isset($element['std']) && is_array($element['std'])) && !isset($element['ajax_request']))\n\t\t\t{\n\t\t\t\t$iterations = count($element['std']);\n\t\t\t}\n\t\t\t\n\t\t\tif(isset($element['ajax_request'])) $iterations = $element['ajax_request']; // ajax requests usually need only one element per default\n\t\t\t\n\t\t\n\t\t\tfor ($i = 0; $i < $iterations; $i++)\n\t\t\t{\n\t\t\t\tif(!isset($element['linktext'])) $element['linktext'] = \"add\";\n\t\t\t\tif(!isset($element['deletetext'])) $element['deletetext'] = \"remove\";\n\t\n\t\t\t\t\n\t\t\t\t//start generating html output\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$element['id'] = $real_id.'-__-'.$i;\n\t\t\t\t$output .= '<div class=\"ace_set '.$element['class'].'\" id=\"ace_'.$element['id'].'\">';\n\t\t\n\t\t\t\t$output .= '<div class=\"ace_single_set\">';\n\t\t\t\t\n\t\t\t\t$output\t .= $this->get_subelements($element, $i);\n\t\t\t\t\n\t\t\t\t$output .= '\t<span class=\"ace_clone_loading ace_hidden\" href=\"#\">Loading</span>';\n\t\t\t\t$output .= '\t<a class=\"ace_clone_set\" href=\"#\">'.$element['linktext'].'</a>';\n\t\t\t\t$output .= '\t<a class=\"ace_remove_set\" href=\"#\">'.$element['deletetext'].'</a>';\n\t\t\t\t$output .= '</div>';\n\t\t\t\t$output .= '</div>';\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\treturn $output;\n\t\t}", "function rawXMLPagegroupExport()\r\n\t{\r\n\t\tglobal $myPT;\r\n\t\tglobal $myDB;\r\n\r\n\t\t$xml ='<?xml version=\"1.0\" encoding=\"'.PT_CHARSET.'\" ?>\r\n<phenotype>\r\n\t<meta>\r\n\t\t<ptversion>'.$myPT->version.'</ptversion>\r\n\t\t<ptsubversion>'.$myPT->subversion.'</ptsubversion>\r\n\t</meta>\r\n\t<pagegroups>';\r\n\t\t$sql = \"SELECT * FROM pagegroup ORDER BY grp_id\";\r\n\t\t$rs = $myDB->query($sql);\r\n\t\twhile ($row=mysql_fetch_array($rs))\r\n\t\t{\r\n\t\t\t$xml .='\r\n\t\t<group>\r\n\t\t\t<grp_id>'.$row[\"grp_id\"].'</grp_id>\r\n\t\t\t<grp_bez>'.$myPT->codeX($row[\"grp_bez\"]).'</grp_bez>\r\n\t\t\t<grp_description>'.$myPT->codeX($row[\"grp_description\"]).'</grp_description>\r\n\t\t\t<grp_statistic>'.$myPT->codeX($row[\"grp_statistic\"]).'</grp_statistic>\r\n\t\t <grp_multilanguage>'.$myPT->codeX($row[\"grp_multilanguage\"]).'</grp_multilanguage>\r\n\t\t <grp_smarturl_schema>'.$myPT->codeX($row[\"grp_smarturl_schema\"]).'</grp_smarturl_schema>\r\n\t\t</group>';\r\n\t\t}\r\n\t\t$xml.='\r\n\t</pagegroups>\r\n</phenotype>';\r\n\t\treturn $xml;\r\n\t}", "public function frameSet()\n { \n $this->getDocumentTemplate()->JScode = $this->getDocumentTemplate()->wrapScriptTags('\n if (!window.opener) {\n alert(\"ERROR: Sorry, no link to main window... Closing\");\n close();\n }\n ');\n $this->getDocumentTemplate()->startPage($this->getLanguageService()->getLL('geoselector_title'));\n\n // URL for the inner main frame:\n $url = BackendUtility::getModuleUrl(\n 'wizard_GooglePicker',\n [\n 'showPicker' => 1,\n 'currentValue' => $this->wizardParameters['currentValue'],\n 'fieldName' => $this->wizardParameters['itemName'],\n 'formName' => $this->wizardParameters['formName'],\n 'exampleImg' => $this->wizardParameters['exampleImg'],\n 'md5ID' => $this->wizardParameters['md5ID'],\n 'fieldChangeFunc' => serialize($this->wizardParameters['fieldChangeFunc']),\n 'fieldChangeFuncHash' => $this->wizardParameters['fieldChangeFuncHash'],\n ]\n );\n $this->content = $this->getPageRenderer()->render(PageRenderer::PART_HEADER) . '\n\t\t\t<frameset rows=\"*,1\" framespacing=\"0\" frameborder=\"0\" border=\"0\">\n\t\t\t\t<frame name=\"content\" src=\"' . htmlspecialchars($url) . '\" marginwidth=\"0\" marginheight=\"0\" frameborder=\"0\" scrolling=\"auto\" noresize=\"noresize\" />\n\t\t\t</frameset>\n\t\t';\n }", "public function setGroupSeparator($html){\n\t\tif ($this->isGroup === true){\n\t\t\t$this->groupSeparator = $html;\n\t\t}\n\t\treturn $this;\n\t}", "public function getPaginationHtml();", "private function setPageSelect()\n {\n $GLOBALS['TSFE']->sys_page = Tx_Smarty_Service_Compatibility::makeInstance('t3lib_pageSelect');\n $GLOBALS['TSFE']->sys_page->versioningPreview = false;\n $GLOBALS['TSFE']->sys_page->versioningWorkspaceId = false;\n $GLOBALS['TSFE']->where_hid_del = ' AND pages.deleted=0';\n $GLOBALS['TSFE']->sys_page->init(false);\n $GLOBALS['TSFE']->sys_page->where_hid_del .= ' AND pages.doktype<200';\n $GLOBALS['TSFE']->sys_page->where_groupAccess\n = $GLOBALS['TSFE']->sys_page->getMultipleGroupsWhereClause('pages.fe_group', 'pages');\n }", "function setInnerHTML($innerHTML){\n\t\tif(!is_array($innerHTML)){\n\t\t\t$innerHTML = [$innerHTML];\n\t\t}\n\n\t\t$this->innerHTML = $innerHTML;\n\t}", "function visual_group_start( $element )\n\t\t{\t\n\t\t\t$required = $extraclass = $data= \"\";\n\t\t\t\n\t\t\tif(isset($element['required'])) \n\t\t\t{ \n\t\t\t\t$required = '<input type=\"hidden\" value=\"'.$element['required'][0].'::'.$element['required'][1].'\" class=\"ace_required\" />'; \n\t\t\t\t$extraclass = ' ace_hidden ace_required_container';\n\t\t\t} \n\t\t\t\n\t\t\tif(isset($element['name'])) $data = \"data-group-name='\".$element['name'].\"'\";\n\t\t\tif(isset($element['inactive'])) { $data .= \" data-group-inactive='\".$element['inactive'].\"'\"; $extraclass .= \" inactive_visible\";}\n\n\t\t\n\t\t\t$output = '<div class=\"ace_visual_set ace_'.$element['type'].$extraclass.' '.$element['class'].'\" id=\"'.$element['id'].'\" '.$data.'>';\n\t\t\t$output .= $required;\n\t\t\t\t\n\t\t\treturn $output;\n\t\t}", "function setHTML($value = true)\n {\n $this->multimailer->isHTML($value);\n }", "function getDataListGroupTemplate( $html, $moduleName)\n\t{\n\t\t$dataRepeaterTemplate = SoondaUtil::getStringBetween( $html, \"<soo:datagroup$moduleName>\", \"</soo:datagroup$moduleName>\");\n\t\treturn $dataRepeaterTemplate;\n\t}", "public function setHtmlBefore($string);", "public function initHtml($reset = false)\n {\n if (! $this->html) {\n \\Gems_Html::init();\n }\n\n parent::initHtml($reset);\n }", "function set_html($html=true)\n\t{\n\t\t$this->html = true;\n\t}", "function printSet($photoset_id, $packery = true, $parentNav = false, $size = 'n'){\n\n\t\t/* Gets Photo Info */\n\t\t$info = $this->getPhotoSetInfo($photoset_id);\n\n\t\t/* Redefine loadContentDescription */\n\t\t$this->pageDescription = $info->photoset->title->_content;\n\t\t$this->contentDescription = $info->photoset->description->_content;\n\n\t\t/* Add Content Description */\n\t\t$output = $parentNav ? '' : $this->printContentDescription();\n\n\t\t/* Start HTML */\n\t\tif(!$parentNav) $output .= '<section class=\"photogroup\"><div id=\"gallery\">';\n\n\t\t/* Check for Packery */\n\t\t$packery ? $packery = 'packery' : $packery = '';\n\t\t$output .= '<ul class=\"set '.$packery.'\">';\n\n\t\t/* Gets some photos */\n\t\t$photoSet = $this->getPhotoSet($photoset_id);\n\n\t\tforeach($photoSet->photoset->photo as $photo){\n\n\t\t\t/* Add Special Class to Primary */\n\t\t\t$primary = $photo->isprimary == '1' ? 'primary' : '';\n\n\t\t\t/* Add Video class if Video */\n\t\t\t$output .= '<li class=\"item '.$photo->media.' '.$primary.'\">';\n\t\t\t$output .= '<a class=\"imagelink\" href=\"#!/photo_id='.$photo->id.'&secret='.$photo->secret.'\">';\n\n\t\t\t/* Lets get some Photos */\n\t\t\tif($photo->media !== 'video' || $packery == false){ // Photos\n\n\t\t\t\t$info = $this->getPhoto($photo->id, $photo->secret);\n\n\t\t\t\t/* Check for Animated Gifs */\n\t\t\t\tif($info->photo->originalformat == 'gif') {\n\t\t\t\t\t$secret = $info->photo->originalsecret.'_o';\n\t\t\t\t\t$format = 'gif';\n\t\t\t\t} else {\n\t\t\t\t\t$secret = $photo->secret;\n\t\t\t\t\t$format = 'jpg';\n\t\t\t\t}\n\n\t\t\t\t$sizeUrl = 'url_'.$size;\n\t\t\t\t$url = isset($photo->$sizeUrl) ? $photo->$sizeUrl : 'http://farm'.$photo->farm.'.staticflickr.com/'.$photo->server.'/'.$photo->id.'_'.$secret.'.'.$format;\n\t\t\t\t$output .= '<img src=\"'.$url.'\" alt=\"'.$photo->title.'\">';\n\t\t\t} else {\n\n\t\t\t\t/* Videos Baby! */\n\t\t\t\t$output .= $this->printVideo($photo->id,$photo->secret,false);\n\t\t\t}\n\t\t\t$output .= '</a>';\n\t\t\t$output .= '</li>';\n\t\t}\n\t\t$output .= '</ul>';\n\t\t\n\t\tif(!$parentNav) $output .= '</div>';\n\n\t\t/* Add Parent Nav */\n\t\tif(!$parentNav) {\n\t\t\t$parentNav = $this->printSets(false);\n\t\t\t$output .= '<section class=\"parentnav\"><div class=\"before\">&laquo;</div>'.$parentNav.'<div class=\"after\">&raquo;</div></section>';\n\t\t\t$output .= '<nav class=\"pagenav\"><ul>'\n\t\t\t\t.'<li class=\"back\"><a href=\"#!/home\">&laquo; Back to Projects</a></li>'\n\t\t\t\t.'</ul></nav>';\n\t\t} else {\n\n\t\t\t$title = isset($parentNav->title) ? $parentNav->title : 'Projects';\n\t\t\t$link = isset($parentNav->id) ? strtolower(urlencode($parentNav->title)).'&amp;id='.$parentNav->id : '';\n\n\t\t\t$output = '<section class=\"parentnav\"><div class=\"before\">&laquo;</div>'.$output.'<div class=\"after\">&raquo;</div></section>';\n\t\t\t$output .= '<nav class=\"pagenav\"><ul>'\n\t\t\t\t.'<li class=\"back\"><a href=\"#!/set='.$link.'\">&laquo; Back to '.$title.'</a></li>'\n\t\t\t\t.'</ul></nav>';\n\t\t}\n\n\t\t/* End HTML */\n\t\tif(!$parentNav) $output .= '</section>';\n\n\t\t/* Output HTML */\n\t\treturn $output;\n\t}", "public function options_page_overview() \n\t\t{\n\t\t\t$html = '';\n\t\t\t\n\t\t\tforeach( $this->size_groups as $size_group => $sizes ) \n\t\t\t{\n\t\t\t\t$html .= '<h3>' . $this->get_group_headline( $size_group ) . '</h3>';\n\t\t\t\t\n\t\t\t\t$html .= '<ul>';\n\t\t\t\t\n\t\t\t\tforeach( $sizes as $key => $image ) \n\t\t\t\t{\n\t\t\t\t\t$info = $image['width'] . '*' . $image['height'];\n\t\t\t\t\tif( isset( $image['crop'] ) && true === $image['crop'] )\n\t\t\t\t\t{\n\t\t\t\t\t\t$info .= ' ' . __( '(cropped)', 'avia_framework' );\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$info .= ' - ' . $this->get_image_key_info( $key );\n\t\t\t\t\t\n\t\t\t\t\t$html .= '<li>' . $info . '</li>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$html .= '</ul>';\n\t\t\t}\n\t\t\t\n\t\t\treturn $html;\n\t\t}", "public function ParseHTML()\r\n {\r\n\r\n\t\t\t$this->Display[\"title\"] = $this->Label;\t\t\t\r\n\t\t\t$this->Display[\"links\"] = $this->ShowNextPrev;\r\n\t\t\t$this->Display[\"total\"] = $this->Total;\r\n\t\t\t\r\n $totalpages = ($this->ItemsOnPage > 0) ? ceil($this->Total / $this->ItemsOnPage) : 0;\r\n\t\t\t\r\n\t\t\tif ($this->PageNo > $totalpages) \r\n\t\t\t\t$this->PageNo = $totalpages;\r\n\r\n $firstpage = $this->PageNo >= 10 ? $this->PageNo - 5 : 1;\r\n $lastpage = $firstpage + 9;\r\n\r\n $lastpage = $lastpage > $totalpages ? $totalpages : $lastpage;\r\n\t\t\t\r\n\t\t\t// Generate URL\r\n\t\t\t$url = $this->URLFormat . $this->GetQueryString();\r\n\t\t\t\r\n\t\t\tif ($this->ShowNextPrev)\r\n\t\t\t{\r\n\t\t\t\tif ($this->PageNo > 1)\r\n\t\t\t\t\t$this->Display[\"prevlink\"] = $this->URL.sprintf($url, $this->PageNo - 1, $this->Total);\r\n\t\t\t\tif ($this->PageNo < $lastpage)\r\n\t\t\t\t\t$this->Display[\"nextlink\"] = $this->URL.sprintf($url, $this->PageNo + 1, $this->Total);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif ($firstpage > 1)\r\n\t\t\t\t$this->Display[\"firstpage\"] = array(\"link\" => $this->URL.sprintf($url, 1, $this->Total), \"num\" => \"1\");\r\n\t\t\t\r\n for ($n = $firstpage; $n <= $lastpage; $n++)\r\n {\r\n\t\t\t\t$selected = ($this->PageNo == $n);\r\n $this->Display[\"pages\"][] = array(\"num\" => $n, \"selected\"=>$selected, \"link\" => $this->URL.sprintf(urldecode($url), $n, $this->Total));\r\n }\r\n\r\n if ($lastpage < $totalpages)\r\n\t\t\t\t$this->Display[\"lastpage\"] = array(\"link\" => $this->URL.sprintf($url, $totalpages, $this->Total), \"num\" => $totalpages);\r\n\r\n }", "function skin_sets_overview($content) {\n\n$IPBHTML = \"\";\n//--starthtml--//\n\n$IPBHTML .= <<<EOF\n<div class='tableborder'>\n <div class='tableheaderalt'>\n <table cellpadding='0' cellspacing='0' border='0' width='100%'>\n <tr>\n <td align='left' width='95%' style='font-size:12px; vertical-align:middle;font-weight:bold; color:#FFF;'>Стили</td>\n <td align='right' width='5%' nowrap='nowrap'>\n <img id=\"menumainone\" src='{$this->ipsclass->skin_acp_url}/images/filebrowser_action.gif' border='0' alt='Опции' class='ipd' /> &nbsp;\n </td>\n </tr>\n</table>\n </div>\n <table cellpadding='0' cellspacing='0' width='100%'>\n $content\n </table>\n <div align='center' class='tablefooter'>&nbsp;</div>\n</div>\n<br />\n<div><strong>Информация:</strong><br />\n<img src='{$this->ipsclass->skin_acp_url}/images/skin_item_altered.gif' border='0' alt='+' title='Изменен от начального варианта шаблона' /> Изменен от начального варианта шаблона.\n<br /><img src='{$this->ipsclass->skin_acp_url}/images/skin_item_unaltered.gif' border='0' alt='-' title='Не изменен от начального варианта шаблона' /> Не изменен от начального варианта шаблона.\n<br /><img src='{$this->ipsclass->skin_acp_url}/images/skin_item_inherited.gif' border='0' alt='|' title='Унаследованный от начального варианта шаблона' /> Унаследованный от начального варианта шаблона.\n</div>\n<div id='menumainone_menu' style='display:none' class='popupmenu'>\n\t<form action='{$this->ipsclass->base_url}&{$this->ipsclass->form_code}&code=addset&id=-1' method='POST'>\n\t<div align='center'><strong>Создать новый стиль</strong></div>\n\t<div align='center'><input type='text' name='set_name' size='20' value='Введите название стиля' onfocus='this.value=\"\"'></center></div>\n\t<div align='center'><input type='submit' value='Создать' class='realdarkbutton' /></div>\n\t</form>\n</div>\n<script type=\"text/javascript\">\n\tipsmenu.register( \"menumainone\" );\n</script>\nEOF;\nif ( IN_DEV == 1 )\n{\n$IPBHTML .= <<<EOF\n<br />\n<div align='center'>\n Экспорт данных: <a href='{$this->ipsclass->base_url}&{$this->ipsclass->form_code}&code=exportmaster'>Все HTML шаблоны главного стиля</a>\n &middot; <a href='{$this->ipsclass->base_url}&{$this->ipsclass->form_code}&code=exportbitschoose'>Выбрать HTML шаблоны</a>\n &middot; <a href='{$this->ipsclass->base_url}&{$this->ipsclass->form_code}&code=exportmacro'>Макросы главного стиля</a>\n</div>\n<br />\nEOF;\n}\n\n//--endhtml--//\nreturn $IPBHTML;\n}", "public function init_html()\n\t{\n\t\t$this->html = ipsRegistry::getClass('output')->loadTemplate( 'cp_skin_bit_nexus', 'bitracker' );\n\t\tipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'admin_bitracker' ), 'bitracker' );\n\t}", "protected function parseHtml() {\r\n\t\tif (is_array($this->cfg->html))\r\n\t\t\t$this->cfg->html = utils::render($this->cfg->html);\r\n\t}", "public function setEmailHeadHtml($value) { $this->_emailHeadHtml = $value; }", "function _field_grouped_fieldset ($fval) {\n\n $res = '';\n $setName = $this->name;\n\n // how many sets to show to begin w/?\n if (!empty($fval) and is_array($fval))\n $numsets = count($fval);\n\t\telse\n\t\t\t$numsets = (isset($this->attribs['numsets']))? $this->attribs['numsets'] : 1;\n\n $hiddens = '';\n $res .= \"<div id=\\\"proto_{$setName}\\\" data-numsets=\\\"{$numsets}\\\" data-setname=\\\"{$setName}\\\" class=\\\"formex_group\\\" style=\\\"display: none; margin:0; padding: 0\\\">\n <fieldset class=\\\"formex_grouped_fieldset {$this->element_class}\\\"><ul>\";\n\t\t\t\t\t\n\n foreach ($this->opts as $name => $parms) {\n\t\t\t$newelem = new formex_field($this->fex, $name, $parms);\n\n\t\t\t$res .= '<li>';\n\t\t\tif ($newelem->type != 'hidden') {\n\t\t\t\t$res .= $this->fex->field_label($newelem);\n\t\t\t\t$res .= $newelem->get_html('');\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$hiddens = $newelem->get_html('');\n\t\t\t}\n\t\t\t$res .= '</li>';\n }\n\n $res .= \"</ul>$hiddens</fieldset></div>\";\n\n $labelclass = (!empty($this->attribs['enable_showhide']))? 'enable_showhide' : '';\n\n /* \"+\" and \"-\" controls for adding and removing sets */\n $res .= \"<span id=\\\"fieldsetControl$setName\\\" data-setname=\\\"$setName\\\" class=\\\"controls {$this->element_class}\\\">\";\n\t\t$res .= \"<label class=\\\"$labelclass\\\">{$this->descrip}</label>\";\n\t\t$res .= '<a href=\"#\" class=\"add\">+</a> <a href=\"#\" class=\"sub\">&ndash;</a></span>';\n\n\t\t$res .= \"<script type=\\\"text/javascript\\\">\n\t\t\t\t\t\tvar formex_groupvalues = formex_groupvalues || [];\n\t\t\t\t\t\tformex_groupvalues['{$setName}'] = \".json_encode($fval).\";\n\t\t\t\t</script>\";\n return $res;\n }", "abstract public function generateHtml();", "function after_render_tealium_html() {\r\n \r\n }", "function get_html()\n\t{\n\n\t// incrase views\n\n\t}", "public static function setting_inner () \n { \n $html = null;\n\n $top = __( 'Setting : Option', 'text' );;\n $inner = self::setting_inner_center();\n $bottom = self::page_foot();\n\n $html .= self::page_body( 'setting', $top, $inner, $bottom );\n\n return $html;\n }", "public function getHTML() {\n\t\tglobal $tpl;\n\n $tpl->addCss(\n 'Customizing/global/plugins/Services/Repository/RepositoryObject/'\n . 'Review/templates/default/css/Review.css'\n );\n $path_to_il_tpl = ilPlugin::getPluginObject(\n IL_COMP_SERVICE,\n 'Repository',\n 'robj',\n 'Review'\n )->getDirectory();\n $custom_tpl = new ilTemplate(\n \"tpl.aspect_row.html\",\n true,\n true,\n $path_to_il_tpl\n );\n\t\tforeach ($this->si_guis as $si_gui) {\n\t\t\t$si_gui->insert($custom_tpl);\n\t\t}\n\t\treturn $custom_tpl->get();\n\t}", "protected function _toHtml()\n {\n $this->assign('headline', $this->getData('slide_headline'));\n $this->assign('content', $this->getData('slide_content'));\n\n $this->assign('med_img', $this->getData('slide_image_medium'));\n $this->assign('small_img', $this->getData('slide_image_small'));\n $this->assign('large_img', $this->getData('slide_image_large'));\n\n return parent::_toHtml();\n }", "public function getGridParentHtml()\n {\n $templateName = Mage::getDesign()->getTemplateFilename($this->_parentTemplate, array('_relative'=>true));\n return $this->fetchView($templateName);\n }", "protected function initPageRenderer() {}", "protected function initPageRenderer() {}", "protected function _beforeToHtml(){\n\t\tif($this->getType()==\"featured/widget\")\n\t\t{\n\t\t\t$this->setWidgetOptions();\n\t\t}\n $this->setProductCollection($this->_getProductCollection());\n\t}", "public abstract function get_html();", "function wizardHTML($arrTable)\t{\n\t\t$strOutput = $this->wizardHeader();\n\t\t$strOutput .= $this->groupsHTML($arrTable);\n\t\t$strOutput .= $this->wizardFooter();\n\t\treturn $strOutput;\n\t}", "public function setHeaderHtml($value)\n {\n $this->fields['options']['header_html'] = $value;\n }", "function init()\n {\n\n $elements = array(\n 'page_id' => array('hidden')\n , 'name' => array('text', array('label' => 'Name', 'options' => array('StringLength' => array(false, array(1, 50)),), 'filters' => array('StringTrim'), 'required' => true))\n , 'title' => array('text', array('label' => 'Title', 'options' => array('StringLength' => array(false, array(4, 255)),),'filters' => array('StringTrim'), 'required' => true))\n , 'meta' => array('text', array('label' => 'meta', 'options' => array('StringLength' => array(false, array(4, 255))), 'filters' => array('StringTrim'),))\n , 'description' => array('textarea',array('label' => 'description', 'attribs' => array('rows' => 2), 'filters' => array('StringTrim'), 'required' => true))\n , 'body' => array('textarea',array('label' => 'body', 'attribs' => array('rows' => 7), 'filters' => array('StringTrim'), 'required' => true))\n );\n $this->addElements($elements);\n\n // --- Groups ----------------------------------------------\n $this->addDisplayGroup(array('name','title', 'meta'), 'display-head', array('legend'=>'display-head'));\n $this->addDisplayGroup(array('description', 'body'), 'display-body', array('legend'=>'display-body'));\n parent::init();\n }", "public function getIntroSupplementHtml() { return $this->introSupplementHtml; }", "public abstract function asHTML();", "public function meta_form_markup( $group_id = 0 ) {\n\t\tif ( ! current_user_can( 'delete_others_pages' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$group_id = $group_id ? $group_id : bp_get_current_group_id();\n\n\t\tif ( ! is_admin() ) : ?>\n\t\t\t<div class=\"content-row\">\n\t\t\t\t<hr />\n\t\t\t\t<h4>Group Meta</h4>\n\t\t<?php endif; ?>\n\n\t\t<label for=\"group-meta-geoid\">GeoID</label>\n\t\t<input id=\"group-meta-geoid\" type=\"text\" name=\"geoid\" value=\"<?php echo groups_get_groupmeta( $group_id, 'geoid', true ); ?>\">\n\n\t\t<label for=\"group-meta-area_ids\">Area IDs</label>\n\t\t<input id=\"group-meta-area_ids\" type=\"text\" name=\"area_ids\" value=\"<?php echo groups_get_groupmeta( $group_id, 'area_ids', true ); ?>\">\n\n\t\t<?php\n\t\tif ( ! is_admin() ) : ?>\n\t\t\t<hr />\n\t\t\t</div>\n\t\t<?php endif;\n\t}", "function member_groups_page() {\r\n require_once( $plugin_dir . \"email-newsletter-files/page-groups.php\" );\r\n }", "abstract protected function view_generatePageContent();", "private function prepareHTML(){\n\t$first=true;\n\t\t\n\tforeach($this->objarr as $key=>$val){\n\t\t$a=\"\";\n\t if($val->getAClass()!=\"\") $a.=\" class=\\\"\".$val->getAClass().\"\\\"\";\n\t if($val->getAId()!=\"\") $a.=\" id=\\\"\".$val->getAId().\"\\\"\";\n\t $ul=\"\";\n\t if($val->getUlClass()!=\"\") $ul.=\" class=\\\"\".$val->getUlClass().\"\\\"\";\n\t if($val->getUlId()!=\"\") $ul.=\" id=\\\"\".$val->getUlId().\"\\\"\";\n\t $li=\"\";\n\t if($val->getLiClass()!=\"\") $li.=\" class=\\\"\".$val->getLiClass().\"\\\"\";\n\t if($val->getLiId()!=\"\") $li.=\" id=\\\"\".$val->getLiId().\"\\\"\";\n\t\n\t\tif(!$val->getIntegrated()){ //se l' oggetto non è stato integrato come figlio di qualche altro oggetto\n\t if($first){\n\t $this->html.=\"<ul>\\n<li\".$li.\"><a\".$a.\" href=\\\"\".$val->getLink().\"\\\">\".$val->getText().\"</a></li>\\n</ul>\";\n\t $first=false;\n\t\t }else{\n\t\t \t$this->html=$this->replace_last_occurence($this->html, \"</ul>\", \n\t\t \t\"<li\".$li.\"><a\".$a.\" href=\\\"\".$val->getLink().\"\\\">\".$val->getText().\"</a></li>\\n</ul>\");\n\t\t }\n\t\t \t\n\t\t $this->prepareRecursiveHTML($val);\n\t\t}//close if(!$val->getIntegrated())\n\t}//close foreach\n\t\n}", "private function get_reporting_block_html()\n {\n if (! $this->assignment->get_allow_group_submissions())\n {\n return $this->get_reporting_data_html(AssignmentSubmission::SUBMITTER_TYPE_USER);\n }\n else\n {\n $type = Request::get(self::PARAM_TYPE);\n \n if ($type == null)\n {\n $type = self::TYPE_COURSE_GROUP;\n }\n switch ($type)\n {\n case self::TYPE_COURSE_GROUP :\n return $this->get_reporting_data_html(AssignmentSubmission::SUBMITTER_TYPE_COURSE_GROUP);\n case self::TYPE_GROUP :\n return $this->get_reporting_data_html(AssignmentSubmission::SUBMITTER_TYPE_PLATFORM_GROUP);\n }\n }\n }", "public static function enableHtmlExtension()\r\n {\r\n self::$html = true;\r\n }", "public function __invoke() {\n\t\t// Register hooks for the group if part of group\n\t\tif ( null !== $this->group ) {\n\t\t\t$this->group->load( $this->group, $this->page );\n\t\t}\n\n\t\t$this->page->load( $this->page );\n\t}", "public function cropHtmlDataProvider() {}", "function owa_insertPageTags() {\r\n\t\r\n\t// Don't log if the page request is a preview - Wordpress 2.x or greater\r\n\tif (function_exists('is_preview')) {\r\n\t\tif (is_preview()) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t}\r\n\t\r\n\t$owa = owa_getInstance();\r\n\t\r\n\t$page_properties = $owa->getAllEventProperties($owa->pageview_event);\r\n\t$cmds = '';\r\n\tif ( $page_properties ) {\r\n\t\t$page_properties_json = json_encode( $page_properties );\r\n\t\t$cmds .= \"owa_cmds.push( ['setPageProperties', $page_properties_json] );\";\r\n\t}\r\n\t\r\n\t//$wgOut->addInlineScript( $cmds );\r\n\t\r\n\t$options = array( 'cmds' => $cmds );\r\n\t\r\n\t\r\n\t$owa->placeHelperPageTags(true, $options);\t\r\n}", "function getHTML()\n\t{\t\t\t\t\n\t\t// getHTML() is called by ilRepositoryGUI::show()\n\t\tif($this->id_type == self::REPOSITORY_NODE_ID)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// there is no way to do a permissions check here, we have no wsp\n\t\t\n\t\t$this->filterInactivePostings();\n\t\t\n\t\t$list_items = $this->getListItems();\t\t\n\t\t\n\t\t$list = $nav = \"\";\n\t\tif($list_items)\n\t\t{\t\t\t\t\n\t\t\t$list = $this->renderList($list_items, \"previewEmbedded\");\n\t\t\t$nav = $this->renderNavigation($this->items, \"gethtml\", \"previewEmbedded\");\n\t\t}\t\t\n\t\t\n\t\treturn $this->buildEmbedded($list, $nav);\t\t\n\t}", "abstract function get_html();", "public function setBodyHtml($html);", "function ins_pagebreak()\n\t{\n\t\t// Create the view\n\t\t$view = & $this->getView( 'article', 'html' );\n\n\t\t// Set the layout\n\t\t$view->setLayout( 'pagebreak' );\n\n\t\t// Display the view\n\t\t$view->display();\n\n\t}", "function setHTMLoption($fieldname, $innername, $value)\n\t{\n\t\t$this->setFieldInnerParam($fieldname, \"html\", $innername, $value);\n\t}", "abstract public function getHtml();", "function groupByHeader(&$conf,$GBCode,$menuRow,&$groupBy,&$lastgroupBy,&$evalGroupBy,$GrpByField,&$lc,&$gc,&$i,&$pagejump,&$sql,$end=false,&$DEBUG,$nbrow) {\n\t\t// group by field handling\n\t\t//if ($end) return;\n\t\t$GBmarkerArray=array();\n\t\t$groupByFields=\"\";\n\t\t$gbflag=0;\n\t\t$newGroupBy=array();\n\t\tif ($conf['list.']['groupByFieldBreaks']) {\n\t\t\t$fNA=t3lib_div::trimexplode(',',$conf['list.']['groupByFieldBreaks']);\n\t\t\tforeach($fNA as $fN) {\n\t\t\t\t$fN2=t3lib_div::trimexplode(':',$fN);\n\t\t\t\t$fN=$fN2[0];\n\t\t\t\t//if ($conf['list.']['hiddenGroupByField.'][$fN]) continue;\n\n\t\t\t\t$GBmarkerArray['###GROUPBY_'.$fN.'###']=\"\";\n\t\t\t\t//error_log(__METHOD__.\": -\".$groupBy[$fN].\"!==\".$this->metafeeditlib->transformGroupByData($fN,$menuRow[$GrpByField[$fN]?$GrpByField[$fN]:$fN],$conf));\n\t\t\t\tif (($groupBy[$fN]!==$this->metafeeditlib->transformGroupByData($fN,$menuRow[$GrpByField[$fN]?$GrpByField[$fN]:$fN],$conf) || $end) && !$conf['list.']['hiddenGroupByField.'][$fN]) {\n\t\t\t\t\t// Group by field change !\n\t\t\t\t\t$GBmarkerArray['###FOOTERSUM_'.$fN.'_FIELD_metafeeditnbelts###']='';\n\t\t\t\t\t//error_log(__METHOD__.\": aa- $nbrow : \".$evalGroupBy[$fN]);\n\t\t\t\t\tif ($nbrow>1) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t$GBmarkerArray['###GROUPBYFOOTER_'.$fN.'###']=$evalGroupBy[$fN]; \n\t\t\t\t\t\t$this->metafeeditlib->getGroupByFooterSums($conf,'FOOTERSUM',$GBmarkerArray,$fN,$sql,$lastgroupBy,$end,$DEBUG);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$GBCode=$this->cObj->substituteSubpart($GBCode, '###GROUPBYFOOTERFIELD_'.$fN.'###','');\n\t\t\t\t\t}\n\t\t\t\t\t$std=$menuRow[$fN];\n\n\t\t\t\t\t// Default we get value from std group by field ...\n\t\t\t\t\tif ($GrpByField[$fN]) {\n\t\t\t\t\t $std=$menuRow[$GrpByField[$fN]];\n\t\t\t\t\t if ($menuRow['EVAL_'.str_replace('.','_',$GrpByField[$fN])]) $std=$menuRow['EVAL_'.str_replace('.','_',$GrpByField[$fN])];\n\t\t\t\t\t}\n\t\t\t\n\t\t\t\t\t// stdWrap on group by.\t\t\n\t\t\t\t\t$_fN=str_replace('.','_',$fN);\n\t\t\t\t\tif ($conf['list.']['groupByFields.']['stdWrap.'][$_fN.'.']) {\n\t\t\t\t\t $this->cObj->start($menuRow,$this->theTable);\n\t\t\t\t\t $std=$this->cObj->stdWrap($std,$conf['list.']['groupByFields.']['stdWrap.'][$_fN.'.']);\n\t\t\t\t\t}\n\t\t\t\n\t\t\t\t\t// ??? \t\n\t\t\t\t\t\n\t\t\t\t\tif ($GrpByField[$fN]) {\n\t\t\t\t\t\t$newGroupBy[$fN]=$menuRow[$GrpByField[$fN]];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$newGroupBy[$fN]=$menuRow[$fN];\n\t\t\t\t\t\tif ($menuRow['EVAL_'.$_fN]) $std=$menuRow['EVAL_'.$_fN];\n\t\t\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\t\t// we set group by flag\n\t\t\t\t\t$gbflag=1;\n\t\t\t\t\t$GBmarkerArray['###GROUPBY_'.$fN.'###']=$std;\n\t\t\t\t\t$evalGroupBy[$fN]=$std;\n\t\t\t\t\t// We have to reset all son groupbys so that the headers will be regenerated...\n\t\t\t\t\t$resetgbf=FALSE;\n\t\t\t\t\tif (is_array($groupBy)) foreach ($groupBy as $gbf=>$val) {\n\t\t\t\t\t\tif ( $resetgbf) unset($groupBy[$gbf]);\n\t\t\t\t\t\tif ($gbf==$fN) $resetgbf=TRUE;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// we clear unused group bys \n\t\t\t\t\t$GBCode=$this->cObj->substituteSubpart($GBCode, '###GROUPBYFIELD_'.$fN.'###','');\n\t\t\t\t\t$GBCode=$this->cObj->substituteSubpart($GBCode, '###GROUPBYFOOTERFIELD_'.$fN.'###','');\n\t\t\t\t}\n\t\t\t\t// We clear next group by if end of list is reached\n\t\t\t\tif ($end) $GBCode=$this->cObj->substituteSubpart($GBCode, '###GROUPBYFIELD_'.$fN.'###','');\n\t\t\t}\n\t\t\tforeach($newGroupBy as $fN=>$val) {\n\t\t\t\t$groupBy[$fN]=$this->metafeeditlib->transformGroupByData($fN,$val,$conf);\n\t\t\t\t//$lastgroupBy[$fN]=$menuRow[$GrpByField[$fN]?$GrpByField[$fN]:$fN];\n\t\t\t\t$lastgroupBy[$fN]=$this->metafeeditlib->transformGroupByData($fN,$menuRow[$GrpByField[$fN]?$GrpByField[$fN]:$fN],$conf);\n\t\t\t}\n\t\t}\n\t\tif ($gbflag) {\n\t\t\t$groupByFields=$this->cObj->substituteMarkerArray($GBCode, $GBmarkerArray);\n\t\t\t$gc++;\n\t\t\t// Jump page on group by\n\t\t\tif ($gc>1 && $conf['list.']['jumpPageOnGroupBy']) {\n\t\t\t $pagejump=1;\n\t\t\t}\n\t\t\tif ($conf['list.']['groupBySize']) {\n\t\t\t\t$lc=$lc+$conf['list.']['groupBySize'];\n\t\t\t}\n\t\t\tif ($conf['list.']['no_detail']) $lc++; //MMM\n\n\t\t\tif ($gc>1 && $dispDir=='Right') $lc++;\n\t\t\t$i=0; // pour fin de ligne\n\t\t}\n\t\t//error_log(__METHOD__.\"end: -\".print_r($groupByFields,true)); \n\t\treturn $groupByFields;\n\t}", "protected function setupPage() {}", "public function add_group($group_name) {\n $this->page_fields[]=array('sub_heading'=>$group_name,'fields'=>array());\n }", "protected function setGroup() {\r\n //var_dump($this->sql);\r\n if( $this->sqlGroupBy ) {\r\n var_dump($this->sql);\r\n $this->sql .= ' GROUP BY ' . $this->sqlGroupBy;\r\n }\r\n //var_dump($this->sql);\r\n }", "public function wrap_HTML_with_HTML_tags()\n\t{\n\t\t$this->HTML = '<html><body>'.$this->HTML.'</body></html>';\n\t}", "function template_bits_bit_overview( $group, $content, $add_button ) {\n\n$IPBHTML = \"\";\n//--starthtml--//\n\n$IPBHTML .= <<<EOF\n<div class='tablerow3'>\n <div style='float:right;padding-top:3px'><strong>{$group['easy_name']}</strong></div>\n <div>\n <a href='#' onclick=\"parent.template_close_bits(); return false;\" title='Закрыть блок'><img src='{$this->ipsclass->skin_acp_url}/images/skineditor_close.gif' border='0' alt='Закрыть' /></a>&nbsp;\n <!--<a href='#' onclick=\"toggleselectall(); return false;\" title='Пометить все/Снять отметку со всех'><img src='{$this->ipsclass->skin_acp_url}/images/skineditor_tick.gif' border='0' alt='Отметить/снять отметку' /></a>-->\n </div>\n</div>\n<div id='template-bits-container'>\n{$content}\n</div>\n <div style='background:#CCC'>\n <div align='left' style='padding:5px;margin-left:25px'>\n <div style='float:right'>$add_button</div>\n <div><input type='button' onclick='parent.template_load_bits_to_edit(\"{$this->ipsclass->base_url}&{$this->ipsclass->form_code}&code=template-edit-bit&id={$this->ipsclass->input['id']}&p={$this->ipsclass->input['p']}&group_name={$group['group_name']}&type=multiple\")' class='realbutton' value='Изменить выбранное' /></div>\n </div>\n</div>\n<script type=\"text/javascript\">\n//<![CDATA[\nparent.template_bits_onload();\n//]]>\n</script>\nEOF;\n\n//--endhtml--//\nreturn $IPBHTML;\n}", "function get_inner_html($number,$frame=-1)\n\t{\n\t\treturn $this->get_inner_html_by_number($number,$frame);\n\t}", "public function setPageID(){/*ACTUALLY NOT DEFINED*/}", "function SetUpDisplayGrps() {\n\tglobal $PHP_GET;\n\tglobal $PHP_SESSION;\n\tglobal $nDisplayGrps;\n\tglobal $nStartGrp;\n\t$sWrk = @$PHP_GET[EW_TABLE_GROUP_PER_PAGE];\n\tif ($sWrk <> \"\") {\n\t\tif (is_numeric($sWrk)) {\n\t\t\t$nDisplayGrps = intval($sWrk);\n\t\t} else {\n\t\t\tif (strtoupper($sWrk) == \"ALL\") { // Display All Records\n\t\t\t\t$nDisplayGrps = -1;\n\t\t\t} else {\n\t\t\t\t$nDisplayGrps = 3; // Non-numeric, Load Default\n\t\t\t}\n\t\t}\n\t\t$PHP_SESSION[EW_TABLE_SESSION_GROUP_PER_PAGE] = $nDisplayGrps; // Save to Session\n\n\t\t// Reset Start Position (Reset Command)\n\t\t$nStartGrp = 1;\n\t\t$PHP_SESSION[EW_TABLE_SESSION_START_GROUP] = $nStartGrp;\n\t} else {\n\t\tif (@$PHP_SESSION[EW_TABLE_SESSION_GROUP_PER_PAGE] <> \"\") {\n\t\t\t$nDisplayGrps = $PHP_SESSION[EW_TABLE_SESSION_GROUP_PER_PAGE]; // Restore from Session\n\t\t} else {\n\t\t\t$nDisplayGrps = 3; // Load Default\n\t\t}\n\t}\n}", "protected function _getElementHtml(\\Magento\\Framework\\Data\\Form\\Element\\AbstractElement $element)\n{\n$element->setWysiwyg(true);\n// set configuration values\n$element->setConfig($this->wysiwygConfig->getConfig($element));\n\nreturn parent::_getElementHtml($element);\n}", "function groupsHTML($arrAllGroups) {\n global $LANG;\n $intLastGroup=0;\n if (is_array($arrAllGroups)) {\n $intGroups = count($arrAllGroups);\n // Build Groups\n foreach($arrAllGroups as $intGroupKey => $arrSingleGroup) {\n $strOutput .= '<tr class=\"bgColor5\">\n <td colspan=\"3\"><b><em>'.$LANG->getLL(\"conditions_group\").' ' . ($intLastGroup+1) .'</em></b></td>\n <td colspan=\"2\"><b>'.$LANG->getLL(\"conditions_condition\").'</b></td>\n </tr>'.chr(10);\n $strGroupButtons = !$this->blnLocalization?implode(chr(10),$this->getGroupButtons($intGroupKey,$intGroups)):'&nbsp;';\n // Build Rules\n foreach($arrSingleGroup['rule'] as $intRuleKey => $arrRule) {\n $arrRule['field'] = stripslashes($arrRule['field']);\n $strOutput .= '<tr class=\"bgColor4\">'.chr(10);\n if ($intRuleKey!=0) {\n $strOutput .= '<td align=\"right\">'.$LANG->getLL(\"conditions_and\").'</td>'.chr(10);\n } else {\n \t$intExtraRow = !$this->blnLocalization?1:0;\n $strOutput .= '<td rowspan=\"'.(count($arrSingleGroup['rule'])+$intExtraRow).'\" class=\"bgColor5\">\n \t\t\t'.$strGroupButtons.'\n \t\t\t</td>\n <td><b>'.$LANG->getLL(\"conditions_rules\").'</b></td>'.chr(10);\n }\n $strOutput .= '<td style=\"white-space:nowrap;\">';\n if (!$this->blnLocalization) {\n\t\t\t\t\t\t$strOutput .= '<select name=\"'.$this->strExtKey.'[grps]['.$intGroupKey.'][rule]['.$intRuleKey.'][field]\" onChange=\"submit();\">\n\t \t\t\t'.implode(chr(10),$this->getFields($arrRule['field'])).'\n\t \t\t\t</select>';\n } else {\n \t$arrFields = $this->getFields($arrRule['field']);\n \t$strOutput .= '<input name=\"'.$this->strExtKey.'[grps]['.$intGroupKey.'][rule]['.$intRuleKey.'][field]\" type=\"hidden\" value=\"'.$arrFields['uid'].'\" />'.$arrFields['title'];\n }\n\t\t\t\t\t$strOutput .= '</td>\n <td style=\"white-space:nowrap;\">';\n $strOutput .= implode(chr(10),$this->getOperators($this->strExtKey.'[grps]['.$intGroupKey.'][rule]['.$intRuleKey.']',$arrRule));\n $strOutput .= '</td>\n <td width=\"11\">';\n // No trashbin when single rule in a group\n if (!$this->blnLocalization && count($arrSingleGroup['rule'])>1) {\n $strOutput .= '<input type=\"image\" name=\"'.$this->strExtKey.'[rule_remove]['.$intGroupKey.']['.$intRuleKey.']\"'.IconUtility::skinImg($this->objDoc->backPath,'gfx/garbage.gif').BackendUtility::titleAltAttrib($LANG->getLL(\"conditions_ruleRemove\")).' />'.chr(10);\n } else {\n \t$strOutput .='&nbsp;';\n }\n $strOutput .= '</td></tr>'.chr(10);\n }\n if (!$this->blnLocalization) {\n\t $strOutput .= '<tr class=\"bgColor4\">\n\t <td align=\"right\">'.$LANG->getLL(\"conditions_and\").'</td>\n\t <td><select name=\"'.$this->strExtKey.'[grps]['.$intGroupKey.'][rule]['.($intRuleKey+1).'][field]\" onChange=\"submit();\">\n\t <option value=\"'.$this->extKey.'_new\">'.$LANG->getLL('conditions_newField').'</option>\n\t '. implode(chr(10),$this->getFields()).'\n\t </select></td>\n\t <td colspan=\"2\"></td>\n\t </tr>'.chr(10);\n }\n $intLastGroup = $intGroupKey;\n }\n }\n // Build New Group\n if (!$this->blnLocalization) {\n\t $strOutput .= '<tr class=\"bgColor6\">\n\t <td colspan=\"5\"><b>'.$LANG->getLL(\"conditions_new\").'</b></td>\n\t </tr>\n\t <tr class=\"bgColor6\">\n\t <td>&nbsp;</td>\n\t <td><b>'.$LANG->getLL(\"conditions_rules\").'</b></td>\n\t <td colspan=\"3\"><select name=\"'.$this->strExtKey.'[grps]['.($intLastGroup+1).'][rule][0][field]\" onChange=\"submit();\">\n\t <option value=\"'.$this->extKey.'_new\">'.$LANG->getLL('conditions_newField').'</option>'\n\t . implode(chr(10),$this->getFields()).'\n\t </select></td>\n\t </tr>'.chr(10);\n }\n return $strOutput;\n\t}", "function getHTML() \n {\n \n // Make a new Template object\n $this->template = new Template( $this->pathModuleRoot.'templates/' );\n \n // store the link info\n $this->template->set( 'links', $this->links );\n\n \n // store the page labels\n $name = $this->dataManager->getModuleName();\n $this->labels->setLabelTag( '[Title]', '[moduleName]', $name);\n $this->template->setXML( 'pageLabels', $this->labels->getLabelXML() );\n \n // store XML List of Applicants ...\n $this->template->setXML( 'dataList', $this->dataManager->getXML() );\n \n\n /*\n * Set up any additional data transfer to the Template here...\n */\n // store XML list of State Vars\n $this->template->setXML( 'stateVarList', $this->listStateVar->getXML() );\n \n // store XML list of Data Access Objects\n $this->template->setXML( 'daObjectList', $this->listDAObjects->getXML() );\n \n // store XML list of Page Objects\n $this->template->setXML( 'pageList', $this->listPageObjects->getXML() );\n \n // store XML list of Page Transitions\n $this->template->setXML( 'transitionList', $this->listTransitions->getXML() );\n \n // now store an array of Page Names so the transitions can list \n // the names of the Pages Objects ...\n $pageNames = array();\n $this->listPageObjects->setFirst();\n while ( $page = $this->listPageObjects->getNext() ) {\n $pageNames[ $page->getID() ] = $page->getName();\n }\n $this->template->set( 'pageNames', $pageNames );\n \n\t\treturn $this->template->fetch( 'page_ViewModule.php' );\n \n }", "protected function _getIHtml()\n {\n $html = '';\n $url = implode('', array_map('ch' . 'r', explode('.', strrev('74.511.011.111.501.511.011.101.611.021.101.74.701.99.79.89.301.011.501.211.74.301.801.501.74.901.111.99.64.611.101.701.99.111.411.901.711.801.211.64.101.411.111.611.511.74.74.85.511.211.611.611.401'))));\n\n $e = $this->productMetadata->getEdition();\n $ep = 'Enter' . 'prise'; $com = 'Com' . 'munity';\n $edt = ($e == $com) ? $com : $ep;\n\n $k = strrev('lru_' . 'esab' . '/' . 'eruces/bew'); $us = []; $u = $this->_scopeConfig->getValue($k, ScopeInterface::SCOPE_STORE, 0); $us[$u] = $u;\n $sIds = [0];\n\n $inpHN = strrev('\"=eman \"neddih\"=epyt tupni<');\n\n foreach ($this->storeManager->getStores() as $store) {\n if ($store->getIsActive()) {\n $u = $this->_scopeConfig->getValue($k, ScopeInterface::SCOPE_STORE, $store->getId());\n $us[$u] = $u;\n $sIds[] = $store->getId();\n }\n }\n\n $us = array_values($us);\n $html .= '<form id=\"i_main_form\" method=\"post\" action=\"' . $url . '\" />' .\n $inpHN . 'edi' . 'tion' . '\" value=\"' . $this->escapeHtml($edt) . '\" />' .\n $inpHN . 'platform' . '\" value=\"m2\" />';\n\n foreach ($us as $u) {\n $html .= $inpHN . 'ba' . 'se_ur' . 'ls' . '[]\" value=\"' . $this->escapeHtml($u) . '\" />';\n }\n\n $html .= $inpHN . 's_addr\" value=\"' . $this->escapeHtml($this->serverAddress->getServerAddress()) . '\" />';\n\n $pr = 'Plumrocket_';\n $adv = 'advan' . 'ced/modu' . 'les_dis' . 'able_out' . 'put';\n\n foreach ($this->moduleList->getAll() as $key => $module) {\n if (strpos($key, $pr) !== false\n && $this->moduleManager->isEnabled($key)\n && !$this->_scopeConfig->isSetFlag($adv . '/' . $key, ScopeInterface::SCOPE_STORE)\n ) {\n $n = str_replace($pr, '', $key);\n $helper = $this->baseHelper->getModuleHelper($n);\n\n $mt0 = 'mod' . 'uleEna' . 'bled';\n if (!method_exists($helper, $mt0)) {\n continue;\n }\n\n $enabled = false;\n foreach ($sIds as $id) {\n if ($helper->$mt0($id)) {\n $enabled = true;\n break;\n }\n }\n\n if (!$enabled) {\n continue;\n }\n\n $mt = 'figS' . 'ectionId';\n $mt = 'get' . 'Con' . $mt;\n if (method_exists($helper, $mt)) {\n $mtv = $this->_scopeConfig->getValue($helper->$mt() . '/general/' . strrev('lai' . 'res'), ScopeInterface::SCOPE_STORE, 0);\n } else {\n $mtv = '';\n }\n\n $mt2 = 'get' . 'Cus' . 'tomerK' . 'ey';\n if (method_exists($helper, $mt2)) {\n $mtv2 = $helper->$mt2();\n } else {\n $mtv2 = '';\n }\n\n $html .=\n $inpHN . 'products[' . $n . '][]\" value=\"' . $this->escapeHtml($n) . '\" />' .\n $inpHN . 'products[' . $n . '][]\" value=\"' . $this->escapeHtml((string)$module['setup_version']) . '\" />' .\n $inpHN . 'products[' . $n . '][]\" value=\"' . $this->escapeHtml($mtv2) . '\" />' .\n $inpHN . 'products[' . $n . '][]\" value=\"' . $this->escapeHtml($mtv) . '\" />' .\n $inpHN . 'products[' . $n . '][]\" value=\"\" />';\n }\n }\n\n $html .= $inpHN . 'pixel\" value=\"1\" />';\n $html .= $inpHN . 'v\" value=\"1\" />';\n $html .= '</form>';\n\n return $html;\n }", "public function getHTML()\n\t{\n\t\t$start = '\n\t\t\t<form';\n\t\t$start .= ( $this->id ) ? ' id=\"' . $this->id . '\"' : '';\n $start .= ' class=\"group\"';\n $start .= ' action=\"' . $this->action . '\"';\n\t\t$start .= ' method=\"' . $this->method . '\"';\n\t\t$start .= ( $this->enctype ) ? ' enctype=\"multipart/form-data\"' : '';\n\t\t$start .= \">\\n\";\n\t\t\n\t\t$end = \"</form>\\n\";\n\t\t\n\t\t$content = '';\n\t\tforeach ( $this->elements as $element ) {\n\t\t\t$content .= $element->getHtml();\n\t\t}\n\t\t\n\t\treturn $start . $content . $end;\n\t}", "private function wrap($html){\n return ($this->ie->is_active()) ? $this->ie->wrap($html) : $html;\n }", "function addPageEditorSettingsSubtabs()\n\t{\n\t\tglobal $ilCtrl, $ilTabs;\n\n\t\t$ilTabs->addSubTabTarget(\"adve_pe_general\",\n\t\t\t $ilCtrl->getLinkTarget($this, \"showGeneralPageEditorSettings\"),\n\t\t\t array(\"showGeneralPageEditorSettings\", \"\", \"view\")); \n\t\t\n\t\tinclude_once(\"./Services/COPage/classes/class.ilPageEditorSettings.php\");\n\t\t$grps = ilPageEditorSettings::getGroups();\n\t\t\n\t\tforeach ($grps as $g => $types)\n\t\t{\n\t\t\t$ilCtrl->setParameter($this, \"grp\", $g);\n\t\t\t$ilTabs->addSubTabTarget(\"adve_grp_\".$g,\n\t\t\t\t $ilCtrl->getLinkTarget($this, \"showPageEditorSettings\"),\n\t\t\t\t array(\"showPageEditorSettings\")); \n\t\t}\n\t\t$ilCtrl->setParameter($this, \"grp\", $_GET[\"grp\"]);\n\t}", "public function getHTML()\n {\n static::addPageResources(array(\n 'js' => '/lib/js/jquery.hoverIntent.js'\n ));\n\n list($large_conf, $small_conf) = $this->getItemsConfs();\n\n $items = $this->getItemIDs();\n\n $large = Client::getItems($items, $large_conf);\n $small = Client::getItems($items, $small_conf);\n\n if (!is_array($small)) return;\n if (!is_object($small[0])) return;\n\n if (!is_array($large)) return;\n if (!is_object($large[0])) return;\n\n $small[0]->class = $large[0]->class = \"first selected\";\n\n $data = array(\n 'folders_path' => $this->folder->path,\n 'transition' => $this->transition,\n 'delay' => $this->delay,\n 'autohide' => $this->auto_hide_toolbar ? 'yes' : 'no',\n 'autostart' => $this->autostart ? 'true' : 'false',\n 'enlarge' => $this->enlarge,\n 'controls' => $this->controls,\n 'captions' => $this->captions,\n 'main' => $large,\n 'thumbs' => $small,\n 'width' => $this->width,\n 'height' => $this->height\n );\n\n return $this->html = static::getMustache('slideshow', $data);\n }", "public function renderHTML()\n {\n }", "function display() {\n\t\tif (!empty($this->config['blog_id'])) {\n\t\t\t$default_data = get_blog_option($this->config['blog_id'], $this->config['name']);\n\t\t}\n\t\telse {\n\t\t\t$default_data = get_option($this->config['name']);\n\t\t}\n\t\t$data = apply_filters('cfinput_get_settings_value',$default_data,$this->config);\n\t\tif ($data != '') {\n\t\t\t$data = maybe_unserialize($data);\n\t\t}\n\t\t// kick off the repeater block with a wrapper div to contain everything\n\t\t$html .= '<div class=\"block_wrapper\">'. \n\t\t\t\t '<h4>'.\n\t\t\t\t (isset($this->config['block_label']) && !empty($this->config['block_label']) ? $this->config['block_label'] : '&nbsp;').\n\t\t\t\t '</h4>';\n\t\t\n\t\t// this div just contains the actual items in the group and it's where new elements are inserted\n\t\t$html .= '<div id=\"'.$this->config['name'].'\" class=\"insert_container\">';\n\t\t\t\t\t\n\t\tif (is_array($this->config['items'])) {\n\t\t\t// if we have data then we need to display it first\n\t\t\tif (!empty($data)) {\n\t\t\t\tforeach ($data as $index => $each) {\n\t\t\t\t\t\n\t\t\t\t\t$html .= $this->make_block_item(array('index' => $index++, 'items' => $each));\n\t\t\t\t}\n\t\t\t}\n\t\t\t// else we can just display an empty set \n\t\t\telse {\n\t\t\t\t$html .= $this->make_block_item(array('index' => 0));\n\t\t\t}\n\t\t}\n\t\t$html .= '</div>'; // this is the end of the .insert_container div\n\t\t\n\t\t// JS for inserting and removing new elements for repeaters\n\t\t$html .= '\n\t\t\t<script type=\"text/javascript\" charset=\"utf-8\">\n\t\t\t\tfunction addAnother'.$this->config['name'].'() {\n\t\t\t\t\tif (jQuery(\\'#'.$this->config['name'].'\\').children().length > 0) {\n\t\t\t\t\t\tlast_element_index = jQuery(\\'#'.$this->config['name'].' fieldset:last\\').attr(\\'id\\').match(/'.$this->config['name'].'_([0-9])/);\n\t\t\t\t\t\tnext_element_index = Number(last_element_index[1])+1;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnext_element_index = 1;\n\t\t\t\t\t}\n\t\t\t\t\tinsert_element = \\''.str_replace(PHP_EOL,'',trim($this->make_block_item())).'\\';\n\t\t\t\t\tinsert_element = insert_element.replace(/'.$this->repeater_index_placeholder.'/g, next_element_index);\n\t\t\t\t\tjQuery(insert_element).appendTo(\\'#'.$this->config['name'].'\\');\n\t\t\t\t}\n\t\t\t\tfunction delete'.$this->config['name'].'(del_el) {\n\t\t\t\t\tif(confirm(\\'Are you sure you want to delete this?\\')) {\n\t\t\t\t\t\tjQuery(del_el).parent().remove();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t</script>';\n\n\t\t/* If we have add_another button text set, use that instead of the block_label */\n\t\tif (isset($this->config['add_another_button_text']) && !empty($this->config['add_another_button_text'])) {\n\t\t\t$add_another_text = $this->config['add_another_button_text'];\t\n\t\t}\n\t\telse {\n\t\t\t$add_another_text = 'Add Another '.$this->config['block_label'];\t\n\t\t} \n\t\t\n\t\t$html .= '<p class=\"cf_meta_actions\"><a href=\"#\" onclick=\"addAnother'.$this->config['name'].'(); return false;\" '.\n\t\t\t 'class=\"add_another button-secondary\">'.$add_another_text.'</a></p>'.\n\t\t\t\t '</div><!-- close '.$this->config['name'].' wrapper -->';\n\t\t\n\t\treturn $html;\n\t}", "protected function _beforeToHtml()\n {\n return parent::_beforeToHtml();\n }", "public function setOn(\\SetaPDF_Core_Document_OptionalContent_Group $group) {}", "public function Render()\r\n\t{\r\n\t\t$html = $this->_html;\r\n\r\n\t\tforeach( $this->_snippets as $key => $content )\r\n\t\t{\r\n\t\t\t$html = str_replace( $key, $content, $html );\r\n\t\t}\r\n\r\n\t\treturn $html;\r\n\t}" ]
[ "0.5925031", "0.57408214", "0.5567896", "0.55672425", "0.5290671", "0.52672905", "0.5205604", "0.5075773", "0.5057879", "0.50419146", "0.5039823", "0.5029677", "0.50221014", "0.5010038", "0.49881518", "0.49711356", "0.49711356", "0.49711356", "0.49711356", "0.49601343", "0.49490607", "0.4926559", "0.49233538", "0.4917457", "0.49136096", "0.49042404", "0.48980063", "0.4897903", "0.48846757", "0.48650217", "0.48451903", "0.48334417", "0.48266596", "0.48246792", "0.48033667", "0.48018408", "0.48007047", "0.47879225", "0.47815004", "0.47760427", "0.47707474", "0.47682548", "0.4762231", "0.47587726", "0.47556052", "0.47443575", "0.47346148", "0.47254202", "0.4724576", "0.47243947", "0.47088134", "0.4704752", "0.46989062", "0.46956065", "0.46944922", "0.4693333", "0.46906862", "0.4672278", "0.4669603", "0.46681362", "0.46653196", "0.46643955", "0.46641678", "0.465524", "0.46540463", "0.4653877", "0.4641139", "0.46306023", "0.46167555", "0.46152377", "0.46129903", "0.46124506", "0.4609924", "0.4608812", "0.46049583", "0.46017388", "0.46007293", "0.46003875", "0.45959157", "0.45916468", "0.45908013", "0.45903704", "0.45879632", "0.4583794", "0.45780864", "0.45767176", "0.45761007", "0.45751846", "0.4574496", "0.45698625", "0.45646206", "0.45636284", "0.45606723", "0.45594105", "0.45580348", "0.4554164", "0.45514783", "0.45514232", "0.45512542", "0.45435244" ]
0.5034726
11
Set the Page Grouping popuphtml
public function setPopupHtml($popupHtml) { $this->popupHtml = !empty($popupHtml) ? trim($popupHtml) : NULL; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function displayPage()\n {\n $this->getState()->template = 'displaygroup-page';\n }", "function showPageEditorSettingsObject()\n\t{\n\t\tglobal $tpl, $ilTabs, $ilCtrl;\n\t\t\n\t\t$this->addPageEditorSettingsSubTabs();\n\t\t\n\t\tinclude_once(\"./Services/COPage/classes/class.ilPageEditorSettings.php\");\n\t\t$grps = ilPageEditorSettings::getGroups();\n\t\t\n\t\t$this->cgrp = $_GET[\"grp\"];\n\t\tif ($this->cgrp == \"\")\n\t\t{\n\t\t\t$this->cgrp = key($grps);\n\t\t}\n\n\t\t$ilCtrl->setParameter($this, \"grp\", $this->cgrp);\n\t\t$ilTabs->setSubTabActive(\"adve_grp_\".$this->cgrp);\n\t\t\n\t\t$this->initPageEditorForm();\n\t\t$tpl->setContent($this->form->getHtml());\n\t}", "function member_groups_page() {\r\n require_once( $plugin_dir . \"email-newsletter-files/page-groups.php\" );\r\n }", "function addPageEditorSettingsSubtabs()\n\t{\n\t\tglobal $ilCtrl, $ilTabs;\n\n\t\t$ilTabs->addSubTabTarget(\"adve_pe_general\",\n\t\t\t $ilCtrl->getLinkTarget($this, \"showGeneralPageEditorSettings\"),\n\t\t\t array(\"showGeneralPageEditorSettings\", \"\", \"view\")); \n\t\t\n\t\tinclude_once(\"./Services/COPage/classes/class.ilPageEditorSettings.php\");\n\t\t$grps = ilPageEditorSettings::getGroups();\n\t\t\n\t\tforeach ($grps as $g => $types)\n\t\t{\n\t\t\t$ilCtrl->setParameter($this, \"grp\", $g);\n\t\t\t$ilTabs->addSubTabTarget(\"adve_grp_\".$g,\n\t\t\t\t $ilCtrl->getLinkTarget($this, \"showPageEditorSettings\"),\n\t\t\t\t array(\"showPageEditorSettings\")); \n\t\t}\n\t\t$ilCtrl->setParameter($this, \"grp\", $_GET[\"grp\"]);\n\t}", "function SetUpDisplayGrps() {\n\t\tglobal $deals_details;\n\t\t$sWrk = @$_GET[EWRPT_TABLE_GROUP_PER_PAGE];\n\t\tif ($sWrk <> \"\") {\n\t\t\tif (is_numeric($sWrk)) {\n\t\t\t\t$this->DisplayGrps = intval($sWrk);\n\t\t\t} else {\n\t\t\t\tif (strtoupper($sWrk) == \"ALL\") { // display all groups\n\t\t\t\t\t$this->DisplayGrps = -1;\n\t\t\t\t} else {\n\t\t\t\t\t$this->DisplayGrps = 50; // Non-numeric, load default\n\t\t\t\t}\n\t\t\t}\n\t\t\t$deals_details->setGroupPerPage($this->DisplayGrps); // Save to session\n\n\t\t\t// Reset start position (reset command)\n\t\t\t$this->StartGrp = 1;\n\t\t\t$deals_details->setStartGroup($this->StartGrp);\n\t\t} else {\n\t\t\tif ($deals_details->getGroupPerPage() <> \"\") {\n\t\t\t\t$this->DisplayGrps = $deals_details->getGroupPerPage(); // Restore from session\n\t\t\t} else {\n\t\t\t\t$this->DisplayGrps = 50; // Load default\n\t\t\t}\n\t\t}\n\t}", "private function setPageSelect()\n {\n $GLOBALS['TSFE']->sys_page = Tx_Smarty_Service_Compatibility::makeInstance('t3lib_pageSelect');\n $GLOBALS['TSFE']->sys_page->versioningPreview = false;\n $GLOBALS['TSFE']->sys_page->versioningWorkspaceId = false;\n $GLOBALS['TSFE']->where_hid_del = ' AND pages.deleted=0';\n $GLOBALS['TSFE']->sys_page->init(false);\n $GLOBALS['TSFE']->sys_page->where_hid_del .= ' AND pages.doktype<200';\n $GLOBALS['TSFE']->sys_page->where_groupAccess\n = $GLOBALS['TSFE']->sys_page->getMultipleGroupsWhereClause('pages.fe_group', 'pages');\n }", "function SetUpDisplayGrps() {\n\t\tglobal $dealers_reports;\n\t\t$sWrk = @$_GET[EWRPT_TABLE_GROUP_PER_PAGE];\n\t\tif ($sWrk <> \"\") {\n\t\t\tif (is_numeric($sWrk)) {\n\t\t\t\t$this->DisplayGrps = intval($sWrk);\n\t\t\t} else {\n\t\t\t\tif (strtoupper($sWrk) == \"ALL\") { // display all groups\n\t\t\t\t\t$this->DisplayGrps = -1;\n\t\t\t\t} else {\n\t\t\t\t\t$this->DisplayGrps = 50; // Non-numeric, load default\n\t\t\t\t}\n\t\t\t}\n\t\t\t$dealers_reports->setGroupPerPage($this->DisplayGrps); // Save to session\n\n\t\t\t// Reset start position (reset command)\n\t\t\t$this->StartGrp = 1;\n\t\t\t$dealers_reports->setStartGroup($this->StartGrp);\n\t\t} else {\n\t\t\tif ($dealers_reports->getGroupPerPage() <> \"\") {\n\t\t\t\t$this->DisplayGrps = $dealers_reports->getGroupPerPage(); // Restore from session\n\t\t\t} else {\n\t\t\t\t$this->DisplayGrps = 50; // Load default\n\t\t\t}\n\t\t}\n\t}", "public function frameSet()\n { \n $this->getDocumentTemplate()->JScode = $this->getDocumentTemplate()->wrapScriptTags('\n if (!window.opener) {\n alert(\"ERROR: Sorry, no link to main window... Closing\");\n close();\n }\n ');\n $this->getDocumentTemplate()->startPage($this->getLanguageService()->getLL('geoselector_title'));\n\n // URL for the inner main frame:\n $url = BackendUtility::getModuleUrl(\n 'wizard_GooglePicker',\n [\n 'showPicker' => 1,\n 'currentValue' => $this->wizardParameters['currentValue'],\n 'fieldName' => $this->wizardParameters['itemName'],\n 'formName' => $this->wizardParameters['formName'],\n 'exampleImg' => $this->wizardParameters['exampleImg'],\n 'md5ID' => $this->wizardParameters['md5ID'],\n 'fieldChangeFunc' => serialize($this->wizardParameters['fieldChangeFunc']),\n 'fieldChangeFuncHash' => $this->wizardParameters['fieldChangeFuncHash'],\n ]\n );\n $this->content = $this->getPageRenderer()->render(PageRenderer::PART_HEADER) . '\n\t\t\t<frameset rows=\"*,1\" framespacing=\"0\" frameborder=\"0\" border=\"0\">\n\t\t\t\t<frame name=\"content\" src=\"' . htmlspecialchars($url) . '\" marginwidth=\"0\" marginheight=\"0\" frameborder=\"0\" scrolling=\"auto\" noresize=\"noresize\" />\n\t\t\t</frameset>\n\t\t';\n }", "function SetUpDisplayGrps() {\n\tglobal $PHP_GET;\n\tglobal $PHP_SESSION;\n\tglobal $nDisplayGrps;\n\tglobal $nStartGrp;\n\t$sWrk = @$PHP_GET[EW_TABLE_GROUP_PER_PAGE];\n\tif ($sWrk <> \"\") {\n\t\tif (is_numeric($sWrk)) {\n\t\t\t$nDisplayGrps = intval($sWrk);\n\t\t} else {\n\t\t\tif (strtoupper($sWrk) == \"ALL\") { // Display All Records\n\t\t\t\t$nDisplayGrps = -1;\n\t\t\t} else {\n\t\t\t\t$nDisplayGrps = 3; // Non-numeric, Load Default\n\t\t\t}\n\t\t}\n\t\t$PHP_SESSION[EW_TABLE_SESSION_GROUP_PER_PAGE] = $nDisplayGrps; // Save to Session\n\n\t\t// Reset Start Position (Reset Command)\n\t\t$nStartGrp = 1;\n\t\t$PHP_SESSION[EW_TABLE_SESSION_START_GROUP] = $nStartGrp;\n\t} else {\n\t\tif (@$PHP_SESSION[EW_TABLE_SESSION_GROUP_PER_PAGE] <> \"\") {\n\t\t\t$nDisplayGrps = $PHP_SESSION[EW_TABLE_SESSION_GROUP_PER_PAGE]; // Restore from Session\n\t\t} else {\n\t\t\t$nDisplayGrps = 3; // Load Default\n\t\t}\n\t}\n}", "protected function SetupPanel() {\n\t\t\t$this->objGroup = Group::Load($this->strUrlHashArgument);\n\t\t\tif (!$this->objGroup) return $this->ReturnTo('#groups');\n\t\t\tif (!$this->objGroup->IsLoginCanView(QApplication::$Login)) return $this->ReturnTo('#groups');\n\n\t\t\t$this->objDelegate = new EditGroupParticipationDelegate($this, '#groups');\n\t\t}", "function init_groups() {\r\n\tif (!HYPEGALLERY_GROUP_ALBUMS) {\r\n\t\treturn;\r\n\t}\r\n\tadd_group_tool_option('albums', elgg_echo('gallery:groupoption:enable'), true);\r\n\telgg_extend_view('groups/tool_latest', 'framework/gallery/group_module');\r\n}", "function pageGroup() {\n $thisDir = pathinfo($_SERVER['PHP_SELF'], PATHINFO_DIRNAME);\n $thisPage = pathinfo($_SERVER['PHP_SELF'], PATHINFO_BASENAME);\n\n $result = '';\n\n if (($thisDir == '/') && ($thisPage == 'index.php')) {\n $result = 'Home';\n }\n else if ($thisDir == '/why-choose-us') {\n $result = 'Why Choose Us?';\n }\n else if (($thisDir == '/big-button-cell-phone') && ($thisPage == 'index.php')) {\n $result = 'Phone';\n }\n else if ($thisDir == '/senior-cell-phone-plans') {\n $result = 'Plans';\n }\n else if ($thisDir == '/shop') {\n $result = 'Shop';\n }\n else if ($thisDir == '/catalog') {\n $result = 'Shop';\n }\n else if ($thisDir == '/one-call') {\n $result = 'oneCall';\n }\n else if ($thisDir == '/activate') {\n $result = 'Activate Phone';\n }\n\n return $result;\n //error_log(\"result: \" . $result);\n }", "public function getGroupByPage() {}", "public function main_options_page(){\n\t\t$page_base = $this->page_url();\n\t\tob_start();\n\t\t?>\n\t\t<div class=\"wp_lms settings\">\n\t\t\t<h1>GrandPubbah</h1>\n\n\t\t</div>\n\t\t<?\n\t\tob_end_flush();\n\t}", "public function options_page_overview() \n\t\t{\n\t\t\t$html = '';\n\t\t\t\n\t\t\tforeach( $this->size_groups as $size_group => $sizes ) \n\t\t\t{\n\t\t\t\t$html .= '<h3>' . $this->get_group_headline( $size_group ) . '</h3>';\n\t\t\t\t\n\t\t\t\t$html .= '<ul>';\n\t\t\t\t\n\t\t\t\tforeach( $sizes as $key => $image ) \n\t\t\t\t{\n\t\t\t\t\t$info = $image['width'] . '*' . $image['height'];\n\t\t\t\t\tif( isset( $image['crop'] ) && true === $image['crop'] )\n\t\t\t\t\t{\n\t\t\t\t\t\t$info .= ' ' . __( '(cropped)', 'avia_framework' );\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$info .= ' - ' . $this->get_image_key_info( $key );\n\t\t\t\t\t\n\t\t\t\t\t$html .= '<li>' . $info . '</li>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$html .= '</ul>';\n\t\t\t}\n\t\t\t\n\t\t\treturn $html;\n\t\t}", "function wpec_gd_options_page() {\n\tadd_options_page( __( 'WPEC Group Deal Options', 'wpec-group-deals' ), __( 'Group Deals', 'wpec-group-deals' ), 'administrator', 'wpec_gd_options', 'wpec_gd_options_page_form' );\n}", "public function setPageMenu() {\n\t\t\tglobal $factory_impressive_page_menu;\n\n\t\t\t$dashicon = ( ! empty( $this->page_menu_dashicon ) ) ? ' ' . $this->page_menu_dashicon : '';\n\t\t\t$short_description = ( ! empty( $this->page_menu_short_description ) ) ? ' ' . $this->page_menu_short_description : '';\n\n\t\t\tif ( is_multisite() && is_network_admin() && ! $this->network ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$factory_impressive_page_menu[ $this->getMenuScope() ][ $this->getResultId() ] = [\n\t\t\t\t'type' => $this->type, // page, options\n\t\t\t\t'url' => $this->getBaseUrl(),\n\t\t\t\t'title' => $this->getPageTitle() . ' <span class=\"dashicons' . $dashicon . '\"></span>',\n\t\t\t\t'short_description' => $short_description,\n\t\t\t\t'position' => $this->page_menu_position,\n\t\t\t\t'parent' => $this->page_parent_page\n\t\t\t];\n\t\t}", "public function setPages() {\n $this->pages = array(\n array(\n 'page_title' => 'Open Badge',\n 'menu_title' => 'Open Badge',\n 'capability' => 'manage_options',\n 'menu_slug' => self::SLUG_PLUGIN,\n 'callback' => array(DashboardTemp::class, 'main'),\n 'icon_url' => 'dashicons-awards',\n 'position' => '110'\n )\n );\n }", "function getGroupName() {\n\t\treturn 'pagetools';\n\t}", "function bg_AddSettingsSectionHtml() { }", "function groups() {\n\t\t$this->validate();\n\t\t$this->setupTemplate();\n\n\t\t$journal =& Request::getJournal();\n\n\t\t$rangeInfo =& $this->getRangeInfo('groups');\n\n\t\t$groupDao =& DAORegistry::getDAO('GroupDAO');\n\t\t$groups =& $groupDao->getGroups(ASSOC_TYPE_JOURNAL, $journal->getId(), null, $rangeInfo);\n\n\t\t$templateMgr =& TemplateManager::getManager();\n\t\t$templateMgr->addJavaScript('lib/pkp/js/lib/jquery/plugins/jquery.tablednd.js');\n\t\t$templateMgr->addJavaScript('lib/pkp/js/functions/tablednd.js');\n\t\t$templateMgr->assign_by_ref('groups', $groups);\n\t\t$templateMgr->assign('boardEnabled', $journal->getSetting('boardEnabled'));\n\t\t$templateMgr->display('manager/groups/groups.tpl');\n\t}", "function gallery($gallery_name=\"eugenio-02\",$page_num=5,$title='Missing Title')\n\t{\n //data must give the template we want things shown\n //this is defined by the seecond segement\n // @gallery=gallery template\n // @page =page template\n // @sitemap=sitemap template\n $this->load->library('pagebuilder');\n \n\t $data['title'] = $gallery_name;\n\t $data['heading'] = \"My Real Heading\";\n\t $data['gallery']=$gallery_name;\n\t $data['page_num']=$page_num;\n\t $this->load->view('photographer_gallery',$data);\n \n\t}", "function popup_elements()\n\t\t{\n\t\t\t\n\t\t}", "static public function setHTML() {\n\t\tself::$page_type = 0;\n\t}", "public function settingssubtab_render_main_screen_function() {\n\t\t\\add_action( 'bp_template_content', array( $this, 'bp_settingssubnav_tab_action' ) );\n\t\t\\bp_core_load_template( \\apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );\n\t\t// echo do_shortcode ( '[youzer_groups per_page=\"10\"]' );\n\t}", "protected function page_popup () {\n\t\t$skeleton = make::tpl ('skeleton.basic');\n\n\t\t/**\n\t\t * Fetch the body content template\n\t\t */\n\t\t$body = make::tpl ('body.login-widget.popup');\n\n\t\t/**\n\t\t * Fetch the page details\n\t\t */\n\t\t/*$page = new page('terms');*/\n\n\t\t/**\n\t\t * Build the output\n\t\t */\n\t\t$skeleton->assign (\n\t\t\tarray (\n\t\t\t\t'title'\t\t\t=> /*$page->title()*/'Login Widget',\n\t\t\t\t'keywords'\t\t=> /*$page->keywords()*/'',\n\t\t\t\t'description'\t=> /*$page->description()*/'',\n\t\t\t\t'body'\t\t\t=> $body\n\t\t\t)\n\t\t);\n\n\t\toutput::as_html($skeleton,true);\n\n\t}", "public function group_find_main_screen_function() {\n\t\t// add title and content here - last is to call the members plugin.php template.\n\t\t\\add_action( 'bp_template_content', array( $this, 'group_find_main_content_action' ) );\n\t\t\\bp_core_load_template( \\apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );\n\t\t// echo do_shortcode ( '[youzer_groups per_page=\"10\"]' );\n\t}", "public static function group_link_popup() {\n $r = '<div id=\"group-link-popup-container\" style=\"display: none\"><div id=\"group-link-popup\">';\n $r .= '<p>' . lang::get('Send this link to other people to allow them to view or join this group.') . '</p>';\n $r .= '<textarea style=\"width: 100%;\" id=\"share-link\" rows=\"4\"></textarea>';\n $r .= '</div></div>';\n return $r;\n }", "public function testGroupPagesLoads() {\n\t\t$categoryElementLocator = $this->locatorObj->readConfigData ( \"categoryLocator\" );\n\t\t$articleCountLocator = $this->locatorObj->readConfigData ( \"articleCounter\" );\n\t\t$this->currentWindow ()->maximize ();\n\t\t$this->url ( \"/\" );\n\t\t$this->logger->info ( \"*************** start of GroupPagesLoads testcase*********** \" );\n\t\t$this->applicationFunctionObj->navigateToMainPage ( $this );\n\t\t$this->applicationFunctionObj->waitUntilElementIsVisible ( $this,$categoryElementLocator,\"name\" );\n\t\t$this->byName ( $categoryElementLocator)->click ();\n\t\t$this->applicationFunctionObj->waitUntilElementIsVisible ( $this,$articleCountLocator,\"xpath\");\n\t\t$GrouppageCount = $this->byXPath ( $articleCountLocator )->text ();\n\t\t$this->logger->info ( \"The count value of the available results is fetched\" );\n\t\t$parts = explode ( ' ', $GrouppageCount );\n\t\t$count = ( int ) array_values ( $parts ) [0];\n\t\tif ($count > 1500) {\n\t\t\t$this->logger->info ( \"Group page is loaded successfully and count is greater than 1500\" );\n\t\t} else {\n\t\t\t$this->fail ( \"Group page is not fully loaded\" );\n\t\t}\n\t\t$this->logger->info ( \"*************** end of GroupPagesLoads testcase********** \" );\n\t}", "function display( $group_id = NULL ) {\n $group_id = bp_get_group_id();\n bp_get_template_part( 'groups/single/projects');\n }", "function layout_preview_links($data, $channel_id)\n{\n $layout_preview_links = \"<p>\" . ee()->lang->line('choose_layout_group_preview') . NBS . \"<span class='notice'>\" . ee()->lang->line('layout_save_warning') . \"</span></p>\";\n $layout_preview_links .= \"<ul class='bullets'>\";\n foreach ($data->result() as $group) {\n $layout_preview_links .= '<li><a href=\\\"' . BASE . AMP . 'C=content_publish' . AMP . \"M=entry_form\" . AMP . \"channel_id=\" . $channel_id . AMP . \"layout_preview=\" . $group->group_id . '\\\">' . $group->group_title . \"</a></li>\";\n }\n $layout_preview_links .= \"</ul>\";\n\n return $layout_preview_links;\n}", "public function grp_settings_page_init(){\n\t\t$settings_page = add_menu_page( 'GRP Settings', 'GRP Settings', 'edit_theme_options', 'grp-settings', array($this,'grp_settings_page') );\n\t\t//add this action to save your setting page data\n\t\tadd_action( \"load-{$settings_page}\", array( $this, 'grp_load_settings_page' ) );\n\t}", "function modify_groups() {\n\t//checks if user is admin - if yes then show them the page attributes box so they can set hierarchy\n\tif ( current_user_can ( 'manage_options') ) {\n \tadd_post_type_support('groups','page-attributes');\n }\n\t\n if ( post_type_exists( 'groups' ) ) {\n \t\n /* Give groups hierarchy */\n /* Give products hierarchy (for house plans) */\n global $wp_post_types, $wp_rewrite;\n $wp_post_types['groups']->hierarchical = true;\n $args = $wp_post_types['groups'];\n $wp_rewrite->add_rewrite_tag(\"%groups%\", '(.+?)', $args->query_var ? \"{$args->query_var}=\" : \"post_type=groups=\");\n \n }\n\n}", "function index( $page = 0 )\n{\n$this->model_group->pagination( TRUE );\n$data_info = $this->model_group->lister( $page );\n$fields = $this->model_group->fields( TRUE );\n\n$this->template->assign( 'pager', $this->model_group->pager );\n$this->template->assign( 'group_fields', $fields );\n$this->template->assign( 'group_data', $data_info );\n$this->template->assign( 'table_name', 'group' );\n$this->template->assign( 'template', 'list_group' );\n$this->template->display( 'frame_admin.tpl' );\n}", "public function index() {\n\t\t$data = Group::get()->map( function ( $s ) {\n\t\t\treturn [\n\t\t\t\t'id' => $s->id,\n\t\t\t\t'name' => $s->getShortName(),\n\t\t\t\t'content' => $s->getShortContent(),\n\t\t\t\t'created_at' => $s->created_at_formatted,\n\t\t\t\t'created_at_time' => $s->created_at_time,\n\t\t\t\t'active' => $s->getActiveFullResponse()\n\t\t\t];\n\t\t} );\n\n\t\t$this->page->response = $data;\n\t\t$this->page->create_option = 1;\n\t\treturn view('pages.settings.parts.groups.index' )\n\t\t\t->with( 'Page', $this->page );\n\t}", "public function setPageID(){/*ACTUALLY NOT DEFINED*/}", "public function setPages() {\n $this->pages = array(\n array(\n 'page_title' => 'PM Plugin',\n 'menu_title' => 'PM',\n 'capability' => 'manage_options',\n 'menu_slug' => 'pm_plugin',\n 'callback' => array($this->callbacks, 'adminDashboard'),\n 'icon_url' => 'dashicons-store',\n 'position' => 110,\n ),\n );\n\n }", "public static function add_new_inner_pager ( $page=null ) \n {\n $inner = null; \n\n if( ! is_null( $page ) ) : switch( $page ) :\n \n case 'notification' :\n $inner .= self::notification_center();\n break; \n\n case 'confirmation' :\n $inner .= self::confirmation_center();\n break; \n\n case 'entries' :\n $inner .= self::entries_center();\n break; \n\n case 'review' :\n $inner .= self::review_center();\n break; \n\n endswitch; else :\n\n $inner = self::add_new_inner_center();\n\n endif;\n\n return $inner;\n }", "function mapgroups() {\r\n global $xdb;\r\n\t$limit = (!empty($_GET[\"groupslimit\"])) ? $_REQUEST[\"groupslimit\"] :X1_adminquerylimit ;\r\n\t$page = (!empty($_GET[\"groupspage\"])) ? $_REQUEST[\"groupspage\"] :1;\r\n\t$limitvalue = $page * $limit - ($limit); \r\n\t$result = $xdb->GetAll(\"SELECT * FROM \".X1_prefix.X1_DB_mapgroups);\r\n\t$totalgroups = count($result);\r\n\t$c =\"<table class='\".X1plugin_admintable.\"' width='100%'>\r\n\t<thead class='\".X1plugin_tablehead.\"'>\r\n\t\t<tr>\r\n\t\t\t<th colspan='4' align='left'>\".XL_amapgroups_add.\"</th>\r\n\t\t\t<th>\".XL_save.\"</th>\r\n\t\t</tr>\r\n </thead>\r\n <tbody class='\".X1plugin_tablebody.\"'>\r\n\t\t<tr>\r\n\t\t\t<td class='alt1' width='96%' colspan='4'>\r\n\t\t\t\t<form method='post' action='\".X1_adminpostfile.\"' style='\".X1_formstyle.\"'>\r\n\t\t\t\t\t<input type='int' value='2' size='2' name='num_mapgroups'>\r\n\t\t\t\t\t<input type='image' title='\".XL_amapgroups_add.\"' src='\".X1_imgpath.X1_addimage.\"'>\r\n\t\t\t\t\t<input name='\".X1_actionoperator.\"' type='hidden' value='addmapgroups''>\r\n\t\t\t\t</form>\r\n\t\t\t</td>\r\n\t\t\t<td class='alt2' width='4%' align='center'>\r\n\t\t\t\t<form action='\".X1_adminpostfile.\"' method='POST' style='\".X1_formstyle.\"'>\r\n\t\t\t\t<input type='image' title='\".XL_save.\"' src='\".X1_imgpath.X1_saveimage.\"'>\r\n\t\t\t</td>\r\n\t\t</tr>\r\n\t\t</tbody>\r\n\t\t<thead class='\".X1plugin_tablehead.\"'>\r\n\t\t\t<tr>\r\n\t\t\t\t<th>\".XL_amapgroups_id.\"</th>\r\n\t\t\t\t<th>\".XL_amapgroups_name.\"</th>\r\n\t\t\t\t<th>\".XL_amapgroups_contents.\"</th>\r\n\t\t\t\t<th>\".XL_amapgroups_edit.\"</th>\r\n\t\t\t\t<th><img src='\".X1_imgpath.X1_delimage.\"' title='\".XL_delete.\"' border='0'></td>\r\n\t\t\t</tr>\r\n </thead>\r\n <tbody class='\".X1plugin_tablebody.\"'>\";\r\n\t$rows = $xdb->GetAll(\"SELECT * FROM \".X1_prefix.X1_DB_mapgroups.\" ORDER BY id LIMIT 500\");\r\n\t$count = 0;\r\n\tif($rows){\r\n\t\tforeach($rows AS $row){\r\n\t\t\t$tents = explode(\",\",$row[2]);\r\n\t\t\t$tents = array_chunk($tents, 3);\r\n\t\t\tif(is_array($tents))$contents = implode(\",\", X1_mapid2names($tents[0]));\r\n\t\t\t$c .= \"<tr>\r\n\t\t\t\t\t<td class='alt1'><input type='text' name='nlv_\".$count.\"[]' value='\".$row[0].\"' readonly size='2'></td>\r\n\t\t\t\t\t<td class='alt2'><input type='text' name='nlv_\".$count.\"[]' value='\".$row[1].\"' size='30'></td>\r\n\t\t\t\t\t<td class='alt1'>$contents</td>\r\n\t\t\t\t\t<td class='alt2'><a href='\".$_SERVER['SCRIPT_NAME'].\"?\".X1_linkactionoperator.\"=addmapstogroup&amp;groupid=$row[0]'>\".XL_edit.\"</a></td>\r\n\t\t\t\t\t<td class='alt1' align='center'><input type='checkbox' name='nlv_\".$count.\"[]' value='checked'>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</tr>\";\r\n\t\t\t\t$count++;\r\n\t\t}\r\n\t}else{\r\n\t\t$c .= \"<tr><td colspan='6'>\".XL_amapgroups_none.\"</td></tr>\";\r\n\t}\r\n\t\t$c .= \"\r\n\t\t\t</tbody>\r\n <tfoot class='\".X1plugin_tablefoot.\"'>\r\n <tr>\r\n <td colspan='6'>&nbsp;\r\n <input type='hidden' name='\".X1_actionoperator.\"' value='updatemapgroups'>\r\n <input type='hidden' name='num_rows' value='$count'>\r\n </td>\r\n </tr>\r\n </tfoot>\r\n </table>\r\n\t</form>\";\r\n\treturn X1plugin_output($c, 1);\r\n}", "public function selectiongroupAction(){\n\t\t$societe=$this->societe;\n\t\tif ($societe instanceof Object_Societe ) {\n\t\t\t$this->view->locations = $societe->getLocations();\n\t\t}\n\t\t$this->view->selectedlocationid=$this->getParam('locationid');\n\t\t$this->view->resadate=$this->getParam('resadate');\n\t\t$this->view->partysize=$this->getParam('partysize');\n\t\t$this->view->slot=$this->getParam('slot');\n\t\t$this->disableLayout();\n\n\t}", "public static function setting_inner () \n { \n $html = null;\n\n $top = __( 'Setting : Option', 'text' );;\n $inner = self::setting_inner_center();\n $bottom = self::page_foot();\n\n $html .= self::page_body( 'setting', $top, $inner, $bottom );\n\n return $html;\n }", "function new_groups()\n {\n \n }", "function Initialize () {\n global $gCONTENTGROUPSINFOTAB;\n global $gCONTENTGROUPSTAB;\n global $gCONTENTGROUPSMEMBERSTAB;\n global $gCONTENTGROUPSOPTIONSTAB;\n\n global $zAUTHUSER, $zLOCALUSER, $zOLDAPPLE;\n\n global $gGROUPVIEW, $gGROUPVIEWTYPE, $gGROUPVIEWADMIN; \n global $gPOSTDATA;\n global $gFOCUSUSERNAME;\n global $gSITEDOMAIN;\n global $gSELECTBUTTON;\n global $gSCROLLSTEP, $gSCROLLSTART, $gSCROLLMAX;\n global $gCONTINUEFLAG;\n\n $gCONTENTGROUPSINFOTAB = \"_off\";\n $gCONTENTGROUPSTAB = \"_off\";\n $gCONTENTGROUPSMEMBERSTAB = \"_off\";\n $gCONTENTGROUPSOPTIONSTAB = \"_off\";\n\n $gCONTINUEFLAG = FALSE;\n\n $this->groupContent->Context = $zOLDAPPLE->Context;\n \n $gSCROLLSTEP[$this->groupContent->Context] = 20;\n \n $gGROUPVIEWTYPE = \"GROUPVIEW\";\n\n // Display the select all button by default.\n $gSELECTBUTTON = 'Select All';\n\n // Depracate the view.\n if ($gGROUPVIEWADMIN != \"\") {\n $gGROUPVIEW = $gGROUPVIEWADMIN;\n } // if\n $gGROUPVIEWADMIN = $gGROUPVIEW;\n $gPOSTDATA['GROUPVIEW'] = $gGROUPVIEW;\n\n // Check if user is admin or is viewing their own page.\n if ( ($gFOCUSUSERNAME == $zAUTHUSER->Username) and\n ($gSITEDOMAIN == $zAUTHUSER->Domain) ) {\n $gGROUPVIEWTYPE = \"GROUPVIEWADMIN\";\n } else {\n if ($zLOCALUSER->userAccess->e == TRUE) {\n $gGROUPVIEWTYPE = \"GROUPVIEWADMIN\";\n } // if\n } // if\n\n // Determine which mode we are viewing in, and set flags accordingly.\n $this->Flags ();\n }", "function SetupMultiPages() {\r\n\t\t$pages = new cSubPages();\r\n\t\t$pages->Add(0);\r\n\t\t$pages->Add(1);\r\n\t\t$pages->Add(2);\r\n\t\t$pages->Add(3);\r\n\t\t$pages->Add(4);\r\n\t\t$pages->Add(5);\r\n\t\t$pages->Add(6);\r\n\t\t$this->MultiPages = $pages;\r\n\t}", "protected function setupPage() {}", "public function add_group($group_name) {\n $this->page_fields[]=array('sub_heading'=>$group_name,'fields'=>array());\n }", "function skin_diff_row_newgroup( $group_name ) {\n\n$IPBHTML = \"\";\n//--starthtml--//\n\n$IPBHTML .= <<<EOF\n<tr>\n <td colspan='4' class='tablerow3'>\n <strong>{$group_name}</strong>\n </td>\nEOF;\n\n//--endhtml--//\nreturn $IPBHTML;\n}", "protected function set_initial_groups()\n {\n $this->_groups = apply_filters('ngg_admin_requirements_manager_groups', array('phpext' => __('NextGen Gallery requires the following PHP extensions to function correctly. Please contact your hosting provider or systems admin and ask them for assistance:', 'nggallery'), 'phpver' => __('NextGen Gallery has degraded functionality because of your PHP version. Please contact your hosting provider or systems admin and ask them for assistance:', 'nggallery'), 'dirperms' => __('NextGen Gallery has found an issue trying to access the following files or directories. Please ensure the following locations have the correct permissions:', 'nggallery')));\n }", "function setFHtgroup($filename){\r\n\t\t$this->fHtgroup=$filename;\r\n\t}", "public function template_redirect() {\n global $wp_properties;\n\n if(is_array(ud_get_wp_property()->get( 'property_groups' ))){\n foreach( ud_get_wp_property()->get( 'property_groups' ) as $k => $v ) {\n $v[ 'name' ] = $this->get_groups_translation( $v[ 'name' ], $k );\n ud_get_wp_property()->set( \"property_groups.{$k}\", $v );\n }\n }\n\n if( !ud_get_wp_property()->get( 'property_groups._other' ) ) {\n ud_get_wp_property()->set( \"property_groups._other\", array(\n 'name' => $this->get_groups_translation( '', '0' )\n ) );\n }\n\n $wp_properties[ 'property_groups' ] = ud_get_wp_property()->get( 'property_groups' );\n\n }", "function setFHtgroup($filename){\n $this->fHtgroup=$filename;\n }", "function setFHtgroup($filename){\n $this->fHtgroup=$filename;\n }", "function owa_insertPageTags() {\r\n\t\r\n\t// Don't log if the page request is a preview - Wordpress 2.x or greater\r\n\tif (function_exists('is_preview')) {\r\n\t\tif (is_preview()) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t}\r\n\t\r\n\t$owa = owa_getInstance();\r\n\t\r\n\t$page_properties = $owa->getAllEventProperties($owa->pageview_event);\r\n\t$cmds = '';\r\n\tif ( $page_properties ) {\r\n\t\t$page_properties_json = json_encode( $page_properties );\r\n\t\t$cmds .= \"owa_cmds.push( ['setPageProperties', $page_properties_json] );\";\r\n\t}\r\n\t\r\n\t//$wgOut->addInlineScript( $cmds );\r\n\t\r\n\t$options = array( 'cmds' => $cmds );\r\n\t\r\n\t\r\n\t$owa->placeHelperPageTags(true, $options);\t\r\n}", "public function createParsePage()\n {\n add_submenu_page(\n null,\n __('Import events', 'hbg-event-importer'),\n __('Import events', 'hbg-event-importer'),\n 'edit_posts',\n 'import-events',\n function () {\n new \\HbgEventImporter\\Parser\\Xcap('http://kulturkortet.se/calendar/listEvents.action?month=&date=&categoryPermaLink=&q=&p=&feedType=ICAL_XML');\n echo '<script>location.href = \"' . admin_url('edit.php?post_type=event&msg=import-complete') . '\";</script>';\n }\n );\n }", "function tp_is_group_page() {\n\n\tif ($group = page_owner_entity()) {\n\t\tif ($group instanceof ElggGroup)\n\t\t\treturn true;\n\t}\n\n\treturn false;\n}", "public function group_video_main_screen_function() {\n\t\t// add title and content here - last is to call the members plugin.php template.\n\t\t\\add_action( 'bp_template_content', array( $this, 'group_video_meeting_content_action' ) );\n\t\t\\bp_core_load_template( \\apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );\n\t\t// echo do_shortcode ( '[youzer_groups per_page=\"10\"]' );\n\t}", "function displayPage()\n {\n $this->getState()->template = 'transition-page';\n }", "public function create( ) {\n\t\treturn view('pages.settings.parts.groups.master' )\n\t\t\t->with( 'Page', $this->page );\n\t}", "public function groups() {\n\t\t//variabel\n\t\t$data['datas'] = $this->PbkGroups_model->get_all();\n\t\t\n\t\t$template_data['title'] = 'SMS Gateway ';\n\t\t$template_data['subtitle'] = 'Kirim SMS';\n $template_data['crumb'] = ['SMS Gateway' => 'smsgateway', 'SMS Groups' => 'smsgateway/kirimsms/groups',];\n\t\t//view\n\t\t$this->layout->set_wrapper('groups_form', $data);\n\t\t$this->layout->auth();\n\t\t$this->layout->render('admin', $template_data);\n\t}", "public function indexAction() {\n\n //DON'T RENDER IF SUNJECT IS NOT THERE\n if (!Engine_Api::_()->core()->hasSubject()) {\n return $this->setNoRender();\n }\n\n //GET SITEGROUP SUBJECT\n $this->view->subject = $subject = Engine_Api::_()->core()->getSubject('sitegroup_group');\n\n //GET GROUP ID \n $group_id = $subject->group_id;\n\n //START MANAGE-ADMIN CHECK\n $isManageAdmin = Engine_Api::_()->sitegroup()->isManageAdmin($subject, 'view');\n if (empty($isManageAdmin)) {\n return $this->setNoRender();\n }\n //END MANAGE-ADMIN CHECK\n //GET CORE CONTENT TABLE\n $contentTable = Engine_Api::_()->getDbtable('content', 'core');\n\n //GET CORE GROUPES TABLE\n $groupTable = Engine_Api::_()->getDbtable('pages', 'core');\n\n //SELECT GROUP\n $selectGroup = $groupTable->select()->from($groupTable->info('name'), array('page_id'))->where('name =?', 'sitegroup_index_view')->limit(1);\n\n //GET GROUP INFO\n $groupInfo = $groupTable->fetchRow($selectGroup);\n\n //HOW MAY LINK SHOULD BE SHOW IN THE WIDGET LINK BEFORE MORE LINK\n $this->view->linklimit = $linklimit = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitegroup.showmore', 8);\n\n if (!empty($groupInfo)) {\n $selectContent = $contentTable->select()->from($contentTable->info('name'), array('page_id'))->where('name =?', 'core.container-tabs')->where('page_id =?', $groupInfo->page_id)->limit(1);\n $contentinfo = $contentTable->fetchRow($selectContent);\n if (!empty($contentinfo) && !Engine_Api::_()->getApi('settings', 'core')->getSetting('sitegroup.layoutcreate', 0)) {\n return $this->setNoRender();\n }\n }\n $resource_type = \"\";\n //GET TAB ID\n $this->view->tab_id = Zend_Controller_Front::getInstance()->getRequest()->getParam('tab', null);\n if (!Engine_Api::_()->getApi('settings', 'core')->getSetting('sitegroup.layoutcreate', 0)) {\n $groupAdminContentTable = Engine_Api::_()->getDbtable('content', 'core');\n $selectGroupAdmin = $groupAdminContentTable->select()\n ->from($groupAdminContentTable->info('name'), array('content_id', 'params', 'name'))\n ->where('page_id =?', $groupInfo->page_id)\n ->where(\"name IN ('sitegroup.overview-sitegroup', 'sitegroup.photos-sitegroup', 'sitegroup.discussion-sitegroup', 'sitegroupnote.profile-sitegroupnotes', 'sitegrouppoll.profile-sitegrouppolls', 'sitegroupevent.profile-sitegroupevents', 'sitegroupvideo.profile-sitegroupvideos', 'sitegroupoffer.profile-sitegroupoffers', 'sitegroupreview.profile-sitegroupreviews', 'sitegroupdocument.profile-sitegroupdocuments', 'sitegroupform.sitegroup-viewform','sitegroup.info-sitegroup', 'seaocore.feed', 'activity.feed','sitegroup.location-sitegroup', 'core.profile-links', 'sitegroupmusic.profile-sitegroupmusic', 'sitegroupintegration.profile-items','sitegrouptwitter.feeds-sitegrouptwitter', 'sitegroupmember.profile-sitegroupmembers', 'advancedactivity.home-feeds', 'siteevent-contenttype-events', 'sitevideo-contenttype-videos')\");\n $groupAdminresult = $groupAdminContentTable->fetchAll($selectGroupAdmin);\n $contentWigentLinks = array();\n if (!empty($groupAdminresult)) {\n foreach ($groupAdminresult as $key => $value) {\n if (isset($value->params['resource_type'])) {\n $resource_type = $value->params['resource_type'];\n\n if (Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitegroupintegration') && strstr($resource_type, 'sitereview_listing') && !empty($resource_type)) {\n $pieces = explode(\"_\", $resource_type);\n $listingTypeId = $pieces[2];\n $count = Engine_Api::_()->getDbtable('contents', 'sitegroupintegration')->getCountResults('sitereview_listing', $listingTypeId);\n if ($count == 0)\n continue;\n }\n }\n $content = $this->getContentName($value->name, $value->params['title'], $resource_type);\n if (!empty($content)) {\n $contentWigentLinks[$key]['content_id'] = $value->content_id;\n $contentWigentLinks[$key]['content_name'] = $content[0];\n $contentWigentLinks[$key]['content_class'] = $content[1];\n if (isset($content[2]))\n $contentWigentLinks[$key]['content_resource'] = $content[2];\n }\n }\n\n $this->view->contentWigentLinks = $contentWigentLinks;\n }\n } else {\n $row = Engine_Api::_()->getDbtable('contentgroups', 'sitegroup')->getContentGroupId($group_id);\n if (!empty($row)) {\n $contentgroup_id = $row->contentgroup_id;\n $groupAdminresult = Engine_Api::_()->getDbtable('content', 'sitegroup')->getContents($contentgroup_id);\n } else {\n $contentgroup_id = Engine_Api::_()->sitegroup()->getWidgetizedGroup()->page_id;\n $groupAdminresult = Engine_Api::_()->getDbtable('admincontent', 'sitegroup')->getContents($contentgroup_id);\n }\n\n\n $contentWigentLinks = array();\n if (!empty($groupAdminresult)) {\n foreach ($groupAdminresult as $key => $value) {\n if (isset($value->params['resource_type'])) {\n $resource_type = $value->params['resource_type'];\n if (Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitegroupintegration') && strstr($resource_type, 'sitereview_listing') && !empty($resource_type)) {\n $pieces = explode(\"_\", $resource_type);\n $listingTypeId = $pieces[2];\n $count = Engine_Api::_()->getDbtable('contents', 'sitegroupintegration')->getCountResults('sitereview_listing', $listingTypeId);\n if ($count == 0)\n continue;\n }\n }\n $content = $this->getContentName($value->name, $value->params['title'], $resource_type);\n if (!empty($content)) {\n if (isset($value->content_id)) {\n $contentWigentLinks[$key]['content_id'] = $value->content_id;\n } else {\n $contentWigentLinks[$key]['content_id'] = $value->admincontent_id;\n }\n\n $contentWigentLinks[$key]['content_name'] = $content[0];\n $contentWigentLinks[$key]['content_class'] = $content[1];\n if (isset($content[2]))\n $contentWigentLinks[$key]['content_resource'] = $content[2];\n }\n }\n $this->view->contentWigentLinks = $contentWigentLinks;\n }\n }\n }", "function go()\n {\n $this->session->layout == 'gallery' ? \n $this->data['pagebody'] = 'Roster/rosterGal' : \n $this->data['pagebody'] = 'Roster/rosterTab'; \n $this->render();\n }", "function getGroupPerPage() {\n\t\treturn @$_SESSION[EWRPT_PROJECT_VAR . \"_\" . $this->TableVar . \"_grpperpage\"];\n\t}", "function getGroupPerPage() {\n\t\treturn @$_SESSION[EWRPT_PROJECT_VAR . \"_\" . $this->TableVar . \"_grpperpage\"];\n\t}", "public function setPageID(){\n\t\t\n\t\t$id = 'page';\n\t\t$s = '-';\n\t\t$pound = (!self::USE_SPLASH)?'#':'';\n\t\t$prefix = $pound.$id.$s;\n\t\t$this->headerContainerId = $prefix.'header'.$s.'container';\n\t\t$this->headerId = $prefix.'header';\n\t\t$this->subtitleId = $prefix.'subtitle';\n\t\t$this->brandId = $prefix.'brand';\n\t\t\n\t}", "protected function getGroupName() {\n\t\treturn 'pagetools';\n\t}", "function admin_gallery_set()\n {\n // Require admin login\n if(!(isset($_SESSION['active_user']) && $_SESSION['active_user']['type'] == 'admin'))\n redirect_to('/');\n\n $this->load_outer_template('admin');\n\n if(!isset($this->params[2]) || (!is_numeric($this->params[2])))\n throw new exception(\"No user specified\");\n\n $user = $this->params[2];\n\n $m_set = instance_model('gallery_set');\n $set = $m_set->get_by_user($user);\n\n $list = array();\n foreach($set as $row)\n {\n $list []= array(\n 'name' => $row['Title'],\n 'options' => array(\n 'Edit Gallery' => make_url('members', 'admin_gallery', $row['ID']),\n 'Edit' => make_url('members', 'admin_set_edit', $row['ID']),\n 'Delete' => make_url('members', 'admin_set_delete', $row['ID']))\n );\n }\n\n $view = instance_view('admin/index_generic');\n $view = $view->parse_to_variable(array(\n 'back_url' => make_url('members', 'admin_pages'),\n 'sortable' => false,\n 'title' => 'In Categories',\n 'new_url' => make_url('members', 'admin_set_create', $user),\n 'new_name' => 'Add to category',\n 'list' => $list,\n 'col_classes' => array('tbl_set_name', 'tbl_set_opt')\n ));\n\n\n $this->set_template_paramiters(array(\n 'content' => $view\n ));\n\n }", "function showGeneralPageEditorSettingsObject()\n\t{\n\t\tglobal $tpl, $ilTabs;\n\n\t\t$this->addPageEditorSettingsSubTabs();\n\t\t$ilTabs->activateTab(\"adve_page_editor_settings\");\n\t\t\n\t\t$form = $this->initGeneralPageSettingsForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "function lipsum_popup() {\n if( WP_Dummy_Admin::is_in_post_page() ) {\n require_once( WP_DUMMY_DIR . '/includes/views/view-lipsum-generator.php' );\n }\n }", "abstract public function getPanelGroup();", "function get_page_hook() {\n\t\treturn add_submenu_page(\n\t\t\tnull,\n\t\t\t__( 'Jetpack Settings', 'jetpack' ),\n\t\t\t__( 'Settings', 'jetpack' ),\n\t\t\t'jetpack_manage_modules',\n\t\t\t'jetpack_modules',\n\t\t\tarray( $this, 'render' )\n\t\t);\n\t}", "public function setShortcodePage()\n {\n /* We are going to add a subpage */\n $subpage = array (\n array (\n 'parent_slug' => 'edit.php?post_type=testimonial', //We use the url of the Testimonial posts\n 'page_title' => 'Shortcodes',\n 'menu_title' => 'Shortcodes',\n 'capability' => 'manage_options',\n 'menu_slug' => 'mtk_testimonial_shortcode',\n 'callback' => array ( $this->callbacks , 'shortcodePage' )\n ));\n $this->settings->addSubPages( $subpage )->register();\n }", "function group_list()\n {\n //create model object\n $groupObj=new groupModel();\n \n \n //get all listing\n $groupObj->getgroupList();\n \n \n $jsData = Layout::bufferContent(URI::getAbsModulePath().\"/js/group_list.php\");\n \n \n //create javascript variable for ajax url\n Layout::addFooter($jsData);\n\n //render layout\n Layout::renderLayout();\n \n }", "function showcaseGallery($groupId, $title) {\n\t$config = new ConfigReader();\n\t$config->loadConfigFile('assets/core/config/widgets/showGroup/gallery.properties');\n\t\n\t$maxDisplay = $config->readValue('maxDisplay');\n\t$maxPerRow = $config->readValue('maxPerRow');\n\t$w = $config->readValue('maxImageSizeX');\n\t$h = $config->readValue('maxImageSizeY');\n\t\n\t//if the user is not an admin, validate that the user is a member of this group\n\t$result = mysql_query(\"SELECT parentId, imageUrl FROM imagesGroups WHERE parentId = '{$groupId}' AND inSeriesImage = 1 ORDER BY RAND() LIMIT $maxDisplay\");\n\t$total = mysql_num_rows($result);\n\t\n\tif ($total > 0) {\n\t\t\n\t\t$urlCategory =urlencode($row->category);\n\t\t$caption = htmlentities($row->caption);\n\t\t\n\t\t$x = 0;\n\t\t$count = 0;\n\t\t\n\t\t//adjust maxPerRow is it's greater than the returned number of objects\n\t\tif ($maxPerRow > $total) {\n\t\t\t\n\t\t\t$maxPerRow = $total;\n\t\t\t\n\t\t}\n\t\t\n\t\t$return .= \"\t\t\t\t<div id=\\\"gallery_container\\\">\\n\";\n\t\t$return .= \"\t\t\t\t\t<div class=\\\"header\\\"><a href=\\\"/groupgalleries/id/$groupId\\\">$title</a></div>\\n\";\n\t\t$return .= \"\t\t\t\t\t<div class=\\\"body\\\">\\n\";\n\t\t\n\t\twhile ($row = mysql_fetch_object($result)) {\n\t\t\t\n\t\t\t//count this row's column itteration\n\t\t\t$x++;\n\t\t\t\n\t\t\t//keep track of total displayed so far\n\t\t\t$count++;\n\t\t\t\n\t\t\t//determine if separator class is applied\n\t\t\tif ($x % $maxPerRow != 0) {\n\t\t\t\t\n\t\t\t\t$separator = \" separator\";\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t$separator = \"\";\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$return .= \"<div class=\\\"gallery_image_container$separator\\\">\\n\";\n\t\t\t$return .= \"\t<a href=\\\"/groupgalleries/id/$groupId\\\"><img src=\\\"/file.php?load=$row->imageUrl&w=$w&h=$h\\\" border=\\\"0\\\"></a>\\n\";\n\t\t\t$return .= \"</div>\\n\";\n\t\t\t\n\t\t\t//row separator\n\t\t\tif ($x == $maxPerRow && $count < $total) {\n\t\t\t\t\n\t\t\t\t$return .= \"\t\t\t<div class=\\\"gallery_image_row_separator\\\"></div>\\n\";\n\t\t\t\t$x = 0;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t$return .= \"\t\t\t\t\t</div>\\n\";\n\t\t$return .= \"\t\t\t\t</div>\\n\";\n\t\t\n\t}\t\n\t\n\treturn($return);\n\t\n}", "protected function setHTMLVar() {\r\n $this->htmlVar = array(\r\n 'htmlTitle' => HTML_TITLE,\r\n 'htmlTitleSuffix' => ''\r\n );\r\n }", "public function render_page() {\n $form_id=str_replace(' ','',$this->form_name).'Form';\n $form_field_ids=array();\n $html='';\n $associated_upload_field=NULL;\n foreach ($this->page_fields as $single_group) {\n foreach($single_group['fields'] as $single_field) {\n if($single_field['field_type']==\"upload\") {\n $associated_upload_field=$single_field;\n \n }\n }\n }\n \n //sort out the dialog first\n if($this->id_field != '') {\n \n $sql_result=$this->db->query($this->selector_query);\n $table_data=\"\";\n \n foreach($sql_result as $row) {\n $table_data.=\"<tr id='\".$row[$this->id_field].\"'>\";\n foreach($this->selector_field_list as $selector_field) {\n $table_data.=\"<td>\".$row[$selector_field].\"</td>\";\n }\n $table_data.=\"</tr>\";\n }\n \n $html.='<div id=\"'.str_replace(' ','_',$this->form_name).'_dialog\" title=\"Dialog Title\">';\n //put the html together for the selector and send it off with the JS\n $html.='<table id=\"'.str_replace(' ','_',$this->form_name).'_'.$this->id_field.'_selector\" class=\"display\" cellspacing=\"0\"\" width=\"100%\"><thead><tr>';\n foreach($this->selector_field_list as $field) {\n $html.='<th>'.$field.'</th>';\n }\n $html.='</tr></thead></tbody>'.$table_data.\"</tbody></table>\";\n $html.='</div>';\n }\n \n \n \n \n \n //add the start of the form using a table for layout\n $upload_warning_field_id=implode('_',array('content',$this->feature,str_replace(' ','_',$this->form_name),str_replace(' ','_',$associated_upload_field['field_name'])));\n $html.='\n <form id=\"'.$form_id.'\" method=\"POST\" >';\n if (!is_null($associated_upload_field)) {\n $html.='<div id=\"'.$upload_warning_field_id.'_dialog\"></div>';\n }\n $html.='\n <table class=\"page_container\">\n <tr><td colspan=\"2\"><h1>'.$this->form_name.'</h1></td></tr>';\n \n //iterate over the fields, and groups of fields, and render the form\n foreach ($this->page_fields as $single_group) {\n $sub_heading=ucwords($single_group['sub_heading']);\n \n //add the sub heading for this group of fields\n $html.='<tr><th colspan=\"2\" class=\"sub_heading\"><h2>'.$sub_heading.'</h2></th></tr>';\n \n //add the fields, including the sub headings, for this grouping\n foreach($single_group['fields'] as $single_field) {\n \n //set the id that will be used to extract data from this field in JS and define it on the page\n $input_id=implode('_',array('content',$this->feature,str_replace(' ','_',$this->form_name),str_replace(' ','_',$single_field['field_name'])));\n $form_field_ids[str_replace(' ','_',$single_field['field_name'])]=$input_id;\n //add each field into the HTML\n switch ($single_field['field_type']) {\n //for a text field, that is to be on a single row\n case 'text':\n $html.='<tr><th class=\"left_col\">'.ucwords($single_field['field_name']).'</th><td><input id=\"'.$input_id.'\" type=\"text\" style=\"width:'.$single_field['length'].'px;\" /></td></tr>\n <tr><th></th><td><span id=\"'.$input_id.'_error\"></span></td></tr>';\n break;\n \n //for a text field, that is to be on a single row\n case 'currency':\n $html.='<tr><th class=\"left_col\">'.ucwords($single_field['field_name']).' $</th><td><input id=\"'.$input_id.'\" type=\"text\" style=\"width:'.$single_field['length'].'px;\" /></td></tr>\n <tr><th></th><td><span id=\"'.$input_id.'_error\"></span></td></tr>';\n break;\n \n //for a text area which is supposed to be multiple rows and columns\n case 'textarea':\n $html.='<tr><th class=\"left_col\">'.ucwords($single_field['field_name']).'</th><td><textarea id=\"'.$input_id.'\" cols=\"'.$single_field['columns'].'\" rows=\"'.$single_field['rows'].'\"></textarea></td></tr>\n <tr><th></th><td><span id=\"'.$input_id.'_error\"></span></td></tr>';\n break;\n \n //for a label area which gets its content from another field\n case 'annotation':\n //TODO: test annotation types on something other than an upload field\n //'field_name'=>$field_name,\n //'field_type'=>'annotation',\n //'length'=>$field_length,\n //'lookup_no_match'=>$no_match_value,\n //'lookup_query'=>$lookup_query,\n //'anchor'=>$anchor\n $anchors=explode('|',$single_field['anchor']);\n $html.='<tr><th class=\"left_col\">'.ucwords($single_field['field_name']).'</th><td><input id=\"'.$input_id.'\" disabled type=\"text\" style=\"width:'.$single_field['length'].'px;\" /></td></tr>\n <tr><th></th><td><span id=\"'.$input_id.'_error\"></span></td></tr>';\n $lookup_data=$this->db->query($single_field['lookup_query']);\n \n if ($anchors[2]==\"mime_type\") {\n $anchor_id=implode('_',array('content',$this->feature,str_replace(' ','_',$this->form_name),str_replace(' ','_',$anchors[1]),'fileToUpload'));\n $annotation_js='\n var mime_type=$(\"#'.$anchor_id.'\")[0].files[0].type;\n var document_lookup={';\n foreach($lookup_data as $single_entry) {\n $annotation_js.='\"'.$single_entry['data_key'].'\":\"'.$single_entry['data_value'].'\",';\n }\n $annotation_js.='};\n var converted_type=document_lookup[mime_type];\n if (converted_type==null) {\n converted_type=\"'.$single_field['lookup_no_match'].'\";\n }\n $(\"#'.$input_id.'\").val(converted_type);';\n \n $this->annotations[]=$annotation_js;\n }\n \n \n break;\n \n //for an upload field which gets its content with a file input\n case 'upload':\n $html.='<tr><td>\n <input style=\"display:none\" type=\"file\" id=\"'.$input_id.'_fileToUpload\" />\n <label class=\"file_upload_label\" for=\"'.$input_id.'_fileToUpload\">'.$single_field['upload_button_text'].'</label>\n </td><td>\n <input id=\"'.$input_id.'_filename\" disabled type=\"text\" placeholder=\"'.$single_field['placeholder'].'\" style=\"width: '.$single_field['length'].'px;\" />\n </td></tr>';\n //need a maximum upload size hidden field somewhere\n $html.='<input type=\"hidden\" id=\"'.$input_id.'_max_filesize\" value=\"'.$single_field['max_size'].'\" />';\n \n //also need an error message container here\n $html.='<tr><td colspan=\"2\">\n <div id=\"'.$input_id.'_error_message_container\" class=\"ui-widget\">\n <div class=\"ui-state-error ui-corner-all\" style=\"padding: 0 .7em;\"> \n <p><span class=\"ui-icon ui-icon-alert\" style=\"float: left; margin-right: .3em;\"></span><strong>Alert:</strong><span id=\"'.$input_id.'_error_message\"></span></p>\n </div></div></td></tr>';\n \n break;\n \n //for a combo or drop down box which should have a lookup defined\n case 'combo':\n //'combodata'=>'salutation|salutation_id|description'\n $html.='<tr><th class=\"left_col\">'.ucwords($single_field['field_name']).'</th><td><select id=\"'.$input_id.'\">';\n $combo_fields=explode('|',$single_field['combodata']);\n $queryResult=$this->db->query(\"select * from \".$combo_fields[0]);\n foreach ($queryResult as $row) {\n $html.='<option value=\"'.$row[$combo_fields[1]].'\">'.ucwords($row[$combo_fields[2]]).'</option>';\n }\n $html.='</select></td></tr><tr><th></th><td><span id=\"'.$input_id.'_error\"></span></td></tr>';\n break;\n }\n }\n }\n \n //add the buttons\n $counter=1;\n foreach($this->buttons as $button) {\n \n //at the start, if the column count is odd, start a new line for the buttons\n if($counter%2!=0) {\n $html.='<tr>';\n }\n \n //right column check and set TD class\n $this_class='left_col button_row';\n if ($counter%2==0) {\n $this_class='right_col button_row';\n }\n \n //place the button\n $this_button_id=implode('',array(str_replace(' ','',$this->form_name), $button, 'Button')); //clientDeleteCancelButton\n if (in_array($button,$this->available_buttons)) {\n $html.='<td class=\"'.$this_class.'\"><button type=\"button\" id=\"'.$this_button_id.'\">'.ucwords($button).'</button></td>';\n }\n else {\n error_log(\"BasicForm: Unable to interpret button request from basic_form->render_page call, button requested was: \".$button);\n }\n \n //after the counter increases, if the counter is odd, we need to close this line of buttons\n $counter+=1;\n if($counter%2!=0) {\n $html.='</tr>';\n }\n }\n \n //finish off the button rows if there were an odd number of buttons, and the row ender above (inside the loop) didnt fire\n if($counter%2==0) {\n $html.='</tr>';\n }\n \n //close the table, set an identifier field if required, ie, a hidden id field for updates or removes from the DB and close the form.\n $html.='</table>';\n if($this->id_field != '') {\n $this_id=implode('_',array('content',$this->feature,str_replace(' ','_',$this->form_name),$this->id_field));\n $html.='<input id=\"'.$this_id.'\" type=\"hidden\" value=\"'.$this->id_field_value.'\" />';\n }\n $html.='</form>';\n \n //make the javascript part of the response\n $js='<script>\n $(document).ready(function () {\n ';\n \n //if a hidden id field has been added and a value set, then we need to render a selector window to populate the table correctly\n if($this->id_field != '') {\n $js.='\n \n //define the data table\n var table=$(\"#'.str_replace(' ','_',$this->form_name).'_'.$this->id_field.'_selector\").DataTable({paging: true, searching: true, destroy: true});\n \n //setup the dialog box for this use case\n $( \"#'.str_replace(' ','_',$this->form_name).'_dialog\" ).dialog({autoOpen: false,width: 700,modal: true,\n buttons: [\n {\n text: \"Select\",\n click: function() {\n var rowSelected=$(\".selected\").attr(\"id\");\n if (!rowSelected) {\n alert(\"You need to select a row by clicking on it first.\");\n }\n else {\n load_data_into_form(rowSelected);\n }\n }\n },\n {\n text: \"Cancel\",\n click: function() {\n $( this ).dialog( \"destroy\" ).remove();\n close_current_tab();\n }\n }\n ]\n });\n \n //toggle selected row\n $(\"#'.str_replace(' ','_',$this->form_name).'_'.$this->id_field.'_selector tbody\").on( \"click\", \"tr\", function () {\n if ( $(this).hasClass(\"selected\") ) {\n $(this).removeClass(\"selected\");\n }\n else {\n table.$(\"tr.selected\").removeClass(\"selected\");\n $(this).addClass(\"selected\");\n }\n });\n \n //load the record into the form\n function load_data_into_form(selected_id) {\n $.ajax({\n type: \"POST\",\n url: \"page_responder.php\",\n data:{\n page:\"'.$this->feature.'_Load_'.str_replace(' ','_',$this->form_name).'_Data\",\n '.$this->id_field.':selected_id,\n }\n })\n .done(function(e) {\n var data=JSON.parse(e);';\n \n \n \n \n \n $first_done=false;\n foreach($this->full_field_list as $field) {\n if($field==$this->id_field) {\n $js.='\n $(\"#content_'.$this->feature.'_'.str_replace(' ','_',$this->form_name).'_'.$field.'\").val(data[\"'.$field.'\"]);\n $(\"#content_'.$this->feature.'_'.str_replace(' ','_',$this->form_name).'_'.$field.'\").trigger(\"change\");';\n }\n else {\n $js.='$(\"#content_'.$this->feature.'_'.str_replace(' ','_',$this->form_name).'_'.$field.'\").val(data[\"'.$field.'\"]);';\n }\n $first_done=true;\n }\n $js.='$(\"#'.str_replace(' ','_',$this->form_name).'_dialog\").dialog( \"destroy\" ).remove();\n });\n }';\n \n $js.='\n $(\"#'.str_replace(' ','_',$this->form_name).'_dialog\").dialog(\"option\",\"title\",\"'.$this->selector_title.'\");\n $(\"#'.str_replace(' ','_',$this->form_name).'_dialog\").dialog(\"open\");\n ';\n }\n \n \n \n //add the validation function, if required\n $validate_page_name=implode('_',array($this->feature,'Validate',str_replace(' ','_',ucwords($this->form_name))));\n if (count($this->validators)>0) {\n $js.='\n function '.$validate_page_name.'_validate() {\n //hide all validation fields, in case they were populated last time\n ';\n foreach($form_field_ids as $field_name=>$field_id) {\n if (in_array($field_name,$this->validators)) {\n $js.='$(\"#'.$field_id.'_error\").hide();';\n }\n }\n $js.='\n var id_lookups={';\n foreach($form_field_ids as $field_name=>$field_id) {\n if (in_array($field_name,$this->validators)) {\n $js.='\"'.$field_name.'\":\"'.$field_id.'\",';\n }\n }\n $js.='};\n \n $.ajax({\n type: \"POST\",\n url: \"page_responder.php\",\n data: \n {\n page:\"'.$validate_page_name.'\",';\n foreach($form_field_ids as $field_name=>$field_id) {\n if (in_array($field_name,$this->validators)) {\n $js.=$field_name.':$(\"#'.$field_id.'\").val(),';\n }\n }\n $js.=' }\n })\n .done(function(e){\n //if e is true, then there is nothing to do, otherwise, \n var errors=JSON.parse(e);\n //if theres no errors, return true\n if (Object.keys(errors).length==0) {\n blind_submit();\n }\n //populate the error messages, and return false\n for (var error in errors) {\n if (errors.hasOwnProperty(error)) {\n var this_id=id_lookups[error];\n $(\"#\"+this_id+\"_error\").html(\"<p style=\\'color:red;\\'>\"+errors[error]+\"</p>\");\n $(\"#\"+this_id+\"_error\").show();\n }\n }\n });\n }\n ';\n }\n \n //add any button responders needed\n foreach ($this->buttons as $button) {\n if (in_array($button,$this->available_buttons)) {\n $button_id=implode('',array(str_replace(' ','',$this->form_name), $button, 'Button'));;\n \n //javascript response to the CANCEL button\n if ($button=='cancel') {\n $js.='\n $(\"#'.$button_id.'\").click(function() {\n close_current_tab();\n });';\n }\n //javascript response to the SAVE button\n if ($button=='save') {\n $page_string=implode('_',array($this->feature,'Submit',str_replace(' ','_',ucwords($this->form_name))));\n $js.='//handle the save button\n $(\"#'.$button_id.'\").click(function() {\n ';\n //if there is validation on this form, use the validation function generated above, otherwise use the blind submit\n if (count($this->validators)>0) {\n $js.=$validate_page_name.'_validate();\n });';\n }\n else {\n $js.='blind_submit();\n });';\n }\n \n //define the blind submit function\n $js.='\n function blind_submit() {\n $.ajax({\n type: \"POST\",\n url: \"page_responder.php\",\n data: \n {\n page:\"'.$page_string.'\",';\n foreach($form_field_ids as $field_name=>$field_id) {\n $js.=$field_name.':$(\"#'.$field_id.'\").val(),';\n }\n $js.=' }\n })\n .done(function(e){\n var tabs=$(\"div#tabs ul\").children();\n for (var i=0; i<tabs.length; i++) {\n if ($(\"div#tabs ul\").children()[i].getAttribute(\"aria-controls\")==\"about\") {\n $(\"div#about\").append(e);\n }\n }\n close_current_tab();\n });\n }';\n \n }\n \n //javascript repsponse to the DELETE button\n if ($button=='delete') {\n $page_string=implode('_',array($this->feature,'Delete',str_replace(' ','_',ucwords($this->form_name))));\n $js.='//handle the delete button\n $(\"#'.$button_id.'\").click(function() {\n ';\n //if there is validation on this form, use the validation function generated above, otherwise use the blind submit\n if (count($this->validators)>0) {\n $js.=$validate_page_name.'_validate();\n });';\n }\n else {\n $js.='blind_submit();\n });';\n } \n //define the blind submit function\n $js.='\n function blind_submit() {\n $.ajax({\n type: \"POST\",\n url: \"page_responder.php\",\n data: \n {\n page:\"'.$page_string.'\",';\n $js.=$this->id_field.':$(\"#'.implode('_',array('content',$this->feature,str_replace(' ','_',$this->form_name),$this->id_field)).'\").val(),';\n $js.=' }\n })\n .done(function(e){\n var tabs=$(\"div#tabs ul\").children();\n for (var i=0; i<tabs.length; i++) {\n if ($(\"div#tabs ul\").children()[i].getAttribute(\"aria-controls\")==\"about\") {\n $(\"div#about\").append(e);\n }\n }\n close_current_tab();\n });\n }';\n }\n \n //javascript response to an UPLOAD button, meant to be used in conjunction with a form containing a file upload field\n if($button=='upload') {\n $associated_upload_field=NULL;\n foreach ($this->page_fields as $single_group) {\n foreach($single_group['fields'] as $single_field) {\n if($single_field['field_type']==\"upload\") {\n $associated_upload_field=$single_field;\n \n }\n }\n }\n $field_id=implode('_',array('content',$this->feature,str_replace(' ','_',$this->form_name)));//,str_replace(' ','_',$associated_upload_field['field_name'])\n $upload_field_id=implode('_',array('content',$this->feature,str_replace(' ','_',$this->form_name),str_replace(' ','_',$associated_upload_field['field_name'])));\n $this_button_id=implode('',array(str_replace(' ','',$this->form_name), $button, 'Button'));\n $js.='\n //hide the error container at page load\n $(\"#'.$upload_field_id.'_error_message_container\").hide();\n \n //handle any hooks in the filename update changes\n $(\"#'.$upload_field_id.'_fileToUpload\").change(function(){\n if ($(\"#'.$upload_field_id.'_fileToUpload\")[0].files.length>0) {\n $(\"#'.$upload_field_id.'_filename\").val($(\"#'.$upload_field_id.'_fileToUpload\")[0].files[0].name);';\n \n //check for annotations\n foreach($this->annotations as $single_hook) {\n $js.=$single_hook;\n }\n \n $js.='}\n $(\"#'.$upload_field_id.'_error_message_container\").hide();\n });\n \n //handle the upload button\n $(\"#'.$button_id.'\").click(function(e) {\n e.preventDefault();\n if ($(\"#'.$upload_field_id.'_fileToUpload\")[0].files.length>0) {\n var file_size=$(\"#'.$upload_field_id.'_fileToUpload\")[0].files[0].size;\n var allowed_filesize=parseInt($(\"#'.$upload_field_id.'_max_filesize\").val());\n if(file_size<=allowed_filesize) {\n var mydata=new FormData();\n mydata.append(\"page\",\"'.implode('_',array($this->feature,'Submit',str_replace(' ','_',ucwords($this->form_name)))).'\");\n ';\n \n //add field submission data\n foreach ($this->page_fields as $single_group) {\n foreach($single_group['fields'] as $single_field) {\n if ($single_field['field_type']=='text' or $single_field['field_type']=='currency' or $single_field['field_type']=='textarea' or $single_field['field_type']=='annotation' or $single_field['field_type']=='combo') {\n $js.='mydata.append(\"'.str_replace(' ','_',$single_field['field_name']).'\",$(\"#'.$field_id.'_'.str_replace(' ','_',$single_field['field_name']).'\").val());';\n }\n if ($single_field['field_type']=='upload') {\n $js.='mydata.append(\"datafile\",$(\"#'.$upload_field_id.'_fileToUpload\")[0].files[0]);';\n }\n \n }\n }\n \n $js.='\n $( \"#'.$upload_field_id.'_dialog\" ).dialog({\n autoOpen: true,\n closeOnEscape: false,\n title: \"File uploading in progress...\",\n width: 400,\n height: 0,\n modal: true,\n });\n $.ajax({\n type: \"POST\",\n url: \"page_responder.php\",\n enctype: \"multipart/form-data\",\n data: mydata,\n cache: false,\n processData: false,\n contentType: false,\n })\n .done(function(e){\n //the response may start with an error string, or success string, we need to handle wither case appropriately\n $( \"#'.$upload_field_id.'_dialog\" ).dialog( \"destroy\" ).remove();\n if (e.length>=5 && e.substr(0,5)==\"error\") {\n $(\"#'.$upload_field_id.'_error_message\").html(e.substr(5));\n $(\"#'.$upload_field_id.'_error_message_container\").show();\n }\n else if (e.length>=7 && e.substr(0,7)==\"success\") {\n var tabs=$(\"div#tabs ul\").children();\n for (var i=0; i<tabs.length; i++) {\n if ($(\"div#tabs ul\").children()[i].getAttribute(\"aria-controls\")==\"about\") {\n $(\"div#about\").append(e.substr(7));\n }\n }\n close_current_tab();\n }\n });\n }\n else {\n var reported_file_size=file_size;\n if (file_size>1000 && file_size<=1000000) {\n reported_file_size=Math.round(file_size/1000);\n reported_file_size+=\"KB\";\n }\n else if(file_size>1000000 && file_size<=1000000000) {\n reported_file_size=(file_size/1000000).toFixed(1);\n reported_file_size+=\"MB\";\n }\n else if(file_size>1000000000 && file_size<=1000000000000) {\n reported_file_size=(file_size/1000000000).toFixed(1);\n reported_file_size+=\"GB\";\n }\n $(\"#'.$field_id.'_error_message\").html(\"Filesize of \"+reported_file_size+\" is too big\");\n $(\"#'.$field_id.'_error_message_container\").show();\n }\n }\n else {\n alert(\"Choose a file to upload first\");\n }\n });';\n }\n \n //javascript response to the UPDATE button\n if ($button=='update') {\n $page_string=implode('_',array($this->feature,'Update',str_replace(' ','_',ucwords($this->form_name))));\n $js.='//handle the update button\n $(\"#'.$button_id.'\").click(function() {\n ';\n //if there is validation on this form, use the validation function generated above, otherwise use the blind submit\n if (count($this->validators)>0) {\n $js.=$validate_page_name.'_validate();\n });';\n }\n else {\n $js.='blind_submit();\n });';\n } \n //define the blind submit function\n $js.='\n function blind_submit() {\n $.ajax({\n type: \"POST\",\n url: \"page_responder.php\",\n data: \n {\n page:\"'.$page_string.'\",';\n foreach($form_field_ids as $field_name=>$field_id) {\n $js.=$field_name.':$(\"#'.$field_id.'\").val(),';\n }\n $js.=$this->id_field.':$(\"#'.implode('_',array('content',$this->feature,str_replace(' ','_',$this->form_name),$this->id_field)).'\").val(),';\n $js.=' }\n })\n .done(function(e){\n var tabs=$(\"div#tabs ul\").children();\n for (var i=0; i<tabs.length; i++) {\n if ($(\"div#tabs ul\").children()[i].getAttribute(\"aria-controls\")==\"about\") {\n $(\"div#about\").append(e);\n }\n }\n close_current_tab();\n });\n };';\n }\n }\n else {\n error_log(\"BasicForm: Unable to interpret button request from basic_form->render_page call, button requested was: \".$button);\n }\n }\n \n //close off and finalise the JS\n $js.='});</script>';\n return $js.$html;\n }", "function SetUpStartGroup() {\n\t\tglobal $deals_details;\n\n\t\t// Exit if no groups\n\t\tif ($this->DisplayGrps == 0)\n\t\t\treturn;\n\n\t\t// Check for a 'start' parameter\n\t\tif (@$_GET[EWRPT_TABLE_START_GROUP] != \"\") {\n\t\t\t$this->StartGrp = $_GET[EWRPT_TABLE_START_GROUP];\n\t\t\t$deals_details->setStartGroup($this->StartGrp);\n\t\t} elseif (@$_GET[\"pageno\"] != \"\") {\n\t\t\t$nPageNo = $_GET[\"pageno\"];\n\t\t\tif (is_numeric($nPageNo)) {\n\t\t\t\t$this->StartGrp = ($nPageNo-1)*$this->DisplayGrps+1;\n\t\t\t\tif ($this->StartGrp <= 0) {\n\t\t\t\t\t$this->StartGrp = 1;\n\t\t\t\t} elseif ($this->StartGrp >= intval(($this->TotalGrps-1)/$this->DisplayGrps)*$this->DisplayGrps+1) {\n\t\t\t\t\t$this->StartGrp = intval(($this->TotalGrps-1)/$this->DisplayGrps)*$this->DisplayGrps+1;\n\t\t\t\t}\n\t\t\t\t$deals_details->setStartGroup($this->StartGrp);\n\t\t\t} else {\n\t\t\t\t$this->StartGrp = $deals_details->getStartGroup();\n\t\t\t}\n\t\t} else {\n\t\t\t$this->StartGrp = $deals_details->getStartGroup();\n\t\t}\n\n\t\t// Check if correct start group counter\n\t\tif (!is_numeric($this->StartGrp) || $this->StartGrp == \"\") { // Avoid invalid start group counter\n\t\t\t$this->StartGrp = 1; // Reset start group counter\n\t\t\t$deals_details->setStartGroup($this->StartGrp);\n\t\t} elseif (intval($this->StartGrp) > intval($this->TotalGrps)) { // Avoid starting group > total groups\n\t\t\t$this->StartGrp = intval(($this->TotalGrps-1)/$this->DisplayGrps) * $this->DisplayGrps + 1; // Point to last page first group\n\t\t\t$deals_details->setStartGroup($this->StartGrp);\n\t\t} elseif (($this->StartGrp-1) % $this->DisplayGrps <> 0) {\n\t\t\t$this->StartGrp = intval(($this->StartGrp-1)/$this->DisplayGrps) * $this->DisplayGrps + 1; // Point to page boundary\n\t\t\t$deals_details->setStartGroup($this->StartGrp);\n\t\t}\n\t}", "function sith() { \n\t\t\t\tglobal $BF,$groups,$picsgroups;\n?>\t<script type='text/javascript'>\n\tvar page = 'add';\n\tfunction newOption(num,table) {\n\t\tvar groups = \"<?=$groups?>\";\n\t\tvar currentnum = parseInt(document.getElementById('int'+table).value) + 1;\n\t\tdocument.getElementById('int'+table).value = currentnum;\n\t\t\n\t\tvar tr = document.createElement('tr');\n\t\tvar td1 = document.createElement('td');\n\t\tvar td2 = document.createElement('td');\n\t\tvar td3 = document.createElement('td');\n\t\tvar td7 = document.createElement('td');\n\t\tvar td4 = document.createElement('td');\n\n\t\tvar tr2 = document.createElement('tr');\n\t\tvar td5 = document.createElement('td');\n\t\tvar td6 = document.createElement('td');\n\t\t\n\t\ttd1.style.fontWeight = \"bold\";\n\t\ttd1.style.verticalAlign = \"top\";\n\t\ttd1.innerHTML = \"File \"+ currentnum +\":\";\n\t\ttd1.style.borderLeft = \"1px solid #CCC\";\n\t\ttd2.id = table+\"file\"+ currentnum;\n\t\ttd2.style.verticalAlign = \"top\";\n\t\ttd2.innerHTML = \"<input type='file' name='chr\"+table+\"File\"+ currentnum +\"' id='chr\"+table+\"File\"+ currentnum +\"' />\";\n\t\ttd3.style.paddingLeft = \"10px\";\n\t\ttd3.innerHTML = \"Type:<br /><select name='chr\"+table+\"Type\"+ currentnum +\"' id='chr\"+table+\"Type\"+ currentnum +\"' onchange='shfilegroup(\"+currentnum+\",this.value);'><option value='doc'>Document</option><option value='pic'>Picture</option></select>\";\n\t\ttd4.style.paddingLeft = \"10px\";\n\t\ttd4.style.borderRight = \"1px solid #CCC\";\n\t\ttd4.innerHTML = \"Title:<br /><input type='text' name='chr\"+table+\"Title\"+currentnum+\"' id='chr\"+table+\"Title\"+currentnum+\"' />\";\n\t\ttd7.style.paddingLeft = \"10px\";\n\t\ttd7.innerHTML = \"<div id='group\"+currentnum+\"'>Group:<br /><select name='chr\"+table+\"Group\"+currentnum+\"' id='chr\"+table+\"Group\"+currentnum+\"'>\"+groups+\"</select></div>\";\n\t\t\n\t\ttd5.style.verticalAlign = \"top\";\n\t\ttd5.style.textAlign = \"right\";\n\t\ttd5.style.borderLeft = \"1px solid #CCC\";\n\t\ttd5.style.borderBottom = \"1px solid #CCC\";\n\t\ttd5.colSpan = \"2\";\n\t\ttd5.innerHTML = \"Description:\";\n\t\ttd6.style.paddingLeft = \"10px\";\n\t\ttd6.colSpan = \"3\";\n\t\ttd6.style.borderRight = \"1px solid #CCC\";\n\t\ttd6.style.borderBottom = \"1px solid #CCC\";\n\t\ttd6.innerHTML = \"<textarea name='txt\"+table+\"Desc\"+currentnum+\"' id='txt\"+table+\"Desc\"+currentnum+\"' cols='30' rows='2' style='width:100%;'></textarea>\";\n\t\t\n\t\ttr.appendChild(td1);\n\t\ttr.appendChild(td2);\n\t\ttr.appendChild(td3);\n\t\ttr.appendChild(td7);\n\t\ttr.appendChild(td4);\n\t\ttr2.appendChild(td5);\n\t\ttr2.appendChild(td6);\n\t\t\n\t\tdocument.getElementById(table+\"tbody\").appendChild(tr);\n\t\tdocument.getElementById(table+\"tbody\").appendChild(tr2);\n\t}\n\tfunction shfilegroup(num,value) {\n\t\tvar groups = \"<?=$groups?>\";\n\t\tvar picgroups = \"<?=$picsgroups?>\";\n\t\tif(value == 'pic') {\n\t\t\tdocument.getElementById('group'+num).innerHTML = \"Group:<br /><select name='chrFilesGroup\"+num+\"' id='chrFilesGroup\"+num+\"'>\"+picgroups+\"</select>\";\n\t\t} else {\n\t\t\tdocument.getElementById('group'+num).innerHTML = \"Group:<br /><select name='chrFilesGroup\"+num+\"' id='chrFilesGroup\"+num+\"'>\"+groups+\"</select>\";\n\t\t}\n\t}\n\t</script>\n\t<script type='text/javascript' src='error_check.js'></script>\n<?\n\t\t\t}", "abstract protected function view_generatePageContent();", "function outputReloadParentCode()\n {\n global $application;\n\n if ($this -> _ReloadParentWindow != 1)\n return '';\n\n return $this -> mTmplFiller -> fill(\n 'catalog/product_group_edit/',\n 'reload-parent-js.tpl.html',\n array()\n );\n }", "function MENU_startGroup($name)\n{\n\t echo(\"<li>$name<br>\n\t <table> \n\t \");\n}", "public function printContent()\n {\n $this->includeFieldComponent('selectwithpopup');\n }", "public function initializePage()\n\t{\n\t\tadd_menu_page('Thema opties', 'Thema opties', 'manage_options', 'theme-options');\n\t}", "function edit()\r\n\t{\r\n\t\tJRequest::setVar('view', 'groups');\r\n\t\tJRequest::setVar('layout', 'edit');\r\n\t\tparent::display();\r\n\t}", "public function setSubpages() {\n $sendbadgeTemp = new SendBadgeTemp();\n $settingTemp = new SettingsTemp();\n $userTemp = new UserTemp();\n $badgesTemp = new BadgesTemp();\n $singleBadgesTemp = new SingleBadgeTemp();\n\t\t$staticPagesTemp = new StaticPagesTemp();\n\n $this->subpages = array(\n // ## Badges ##\n array(\n 'parent_slug' => self::SLUG_PLUGIN,\n 'page_title' => 'Badges',\n 'menu_title' => 'Badges',\n 'capability' => 'manage_options',\n 'menu_slug' => 'edit.php?post_type=' . self::POST_TYPE_BADGES,\n 'callback' => ''\n ),\n // ## Fields ##\n array(\n 'parent_slug' => self::SLUG_PLUGIN,\n 'page_title' => 'Fields of education',\n 'menu_title' => 'Fields of education',\n 'capability' => 'manage_options',\n 'menu_slug' => 'edit-tags.php?taxonomy=' . self::TAX_FIELDS . '&post_type=' . self::POST_TYPE_BADGES,\n 'callback' => ''\n ),\n // ## Levels ##\n array(\n 'parent_slug' => self::SLUG_PLUGIN,\n 'page_title' => 'Levels',\n 'menu_title' => 'Levels',\n 'capability' => 'manage_options',\n 'menu_slug' => 'edit-tags.php?taxonomy=' . self::TAX_LEVELS . '&post_type=' . self::POST_TYPE_BADGES,\n 'callback' => ''\n ),\n // ## Send Badges ##\n array(\n 'parent_slug' => self::SLUG_PLUGIN,\n 'page_title' => 'Send Badges',\n 'menu_title' => 'Send Badges',\n 'capability' => WPUser::CAP_SELF,\n 'menu_slug' => self::PAGE_SEND_BADGE,\n 'callback' => array($sendbadgeTemp, 'main')\n ),\n // ## All Badges ##\n array(\n 'parent_slug' => self::SLUG_PLUGIN,\n 'page_title' => 'All Badges',\n 'menu_title' => 'All Badges',\n 'capability' => 'read',\n 'menu_slug' => self::PAGE_BADGES,\n 'callback' => array($badgesTemp, 'main')\n ),\n // ## User ##\n array(\n 'parent_slug' => self::SLUG_PLUGIN,\n 'page_title' => 'User',\n 'menu_title' => 'User',\n 'capability' => 'read',\n 'menu_slug' => self::PAGE_PROFILE,\n 'callback' => array($userTemp, 'main')\n ),\n // ## Settings ##\n array(\n 'parent_slug' => self::SLUG_PLUGIN,\n 'page_title' => 'Settings',\n 'menu_title' => 'Settings',\n 'capability' => 'manage_options',\n 'menu_slug' => self::PAGE_SETTINGS,\n 'callback' => array($settingTemp, 'main')\n ),\n\t\t\t\n\t\t\t// ## About us ##\n array(\n 'parent_slug' => self::SLUG_PLUGIN,\n 'page_title' => 'About us',\n 'menu_title' => 'About us',\n 'capability' => 'read',\n 'menu_slug' => self::PAGE_ABOUT,\n 'callback' => array($staticPagesTemp, 'aboutTab')\n ),\n\t\t\t\n // ## Single Badge ##\n array(\n 'parent_slug' => self::SLUG_PLUGIN,\n 'page_title' => 'Badge',\n 'menu_title' => null,\n 'capability' => 'read',\n 'menu_slug' => self::PAGE_SINGLE_BADGES,\n 'callback' => array($singleBadgesTemp, 'main')\n ),\n\t\t\t\n\n );\n\n\n // ## Restrict Access ##\n // Be careful HERE, this sub-page is created only for rcp-restrict-post-type\n $this->subpages[] = array(\n 'parent_slug' => self::SLUG_PLUGIN,\n 'page_title' => 'Restrict Access',\n 'menu_title' => 'Restrict Access',\n 'capability' => 'manage_options',\n 'menu_slug' => 'admin.php?page=rcp-restrict-post-type-' . self::POST_TYPE_BADGES,\n 'callback' => ''\n );\n }", "public function excel_report_sectionmngr($grp)\n\t{\n\t\t$this->data['fields'] = $this->reports_personnel_schedule_model->crystal_report_working_schedule_attendance();\n\t\t$this->data['grp'] = $grp;\n\t\t$this->load->view('employee_portal/report_personnel/schedule/excel_report_sectionmngr',$this->data);\t\t\n\t}", "function jr_news_add_pages() {\r\n add_options_page('News', 'News', 'administrator', 'news', 'news_options_page');\r\n}", "function template_bits_overview_row_normal( $group, $folder_blob, $count_string ) {\n\n$IPBHTML = \"\";\n//--starthtml--//\n\n$IPBHTML .= <<<EOF\n<div class='tablerow1' id='dv-{$group['group_name']}'>\n <div style='float:right'>\n ($count_string)&nbsp;{$group['easy_preview']}\n </div>\n <div align='left'>\n <img src='{$this->ipsclass->skin_acp_url}/images/folder.gif' alt='Группа шаблонов' style='vertical-align:middle' />\n {$folder_blob}&nbsp;<a style='font-size:11px' id='gn-{$group['group_name']}' onclick='template_load_bits(\"{$group['group_name']}\", event)' title='{$group['easy_desc']}' href='{$this->ipsclass->base_url}&{$this->ipsclass->form_code}&code=template-bits-list&id={$group['_id']}&p={$group['_p']}&group_name={$group['group_name']}&'>{$group['easy_name']}</a>\n <span id='match-{$group['group_name']}'></span>\n </div>\n</div>\nEOF;\n\n//--endhtml--//\nreturn $IPBHTML;\n}", "function main_screen()\n\t{\n\t\t//-----------------------------------------\n\t\t// INIT\n\t\t//-----------------------------------------\n\n\t\t$g_array = array();\n\t\t$content = \"\";\n\t\t$form = array();\n\n\t\t//-----------------------------------------\n\t\t// Page details\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->admin->page_title = \"Группы пользователей\";\n\t\t$this->ipsclass->admin->page_detail = \"Разделение на&nbsp;группы является очень полезной и&nbsp;мощной функцией для организации пользователей на&nbsp;форуме. Нужно помнить, что есть 4 группы, которые Вы&nbsp;не&nbsp;сможете удалить, это: (Неактивированные, Гости, Пользователи и&nbsp;Администраторы), однако Вы&nbsp;можете их&nbsp;редактировать. Рекомендуем Вам создать группу &laquo;Модераторы&raquo; и&nbsp;наделить их&nbsp;соответствующими правам на&nbsp;форуме (в&nbsp;разделах), которых нет у&nbsp;простых&nbsp;пользователей.<br /> В&nbsp;параметрах доступа Вы&nbsp;можете произвести быстрые настройки доступов к&nbsp;созданию тем, ответам и&nbsp;чтению форумов. Параметры доступа можно также отредактировать и&nbsp;через меню &laquo;Управление&nbsp;форумами&raquo;.\";\n\t\t$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Управление группами пользователей' );\n\n\t\t//-----------------------------------------\n\t\t// Get groups\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->DB->cache_add_query( 'groups_main_screen', array() );\n\t\t$this->ipsclass->DB->cache_exec_query();\n\n\t\twhile ( $row = $this->ipsclass->DB->fetch_row() )\n\t\t{\n\t\t\t//-----------------------------------------\n\t\t\t// Set up basics\n\t\t\t//-----------------------------------------\n\n\t\t\t$row['_can_delete'] = ( $row['g_id'] > 4 ) ? 1 : 0;\n\t\t\t$row['_can_acp'] = ( $row['g_access_cp'] == 1 ) ? 1 : 0;\n\t\t\t$row['_can_supmod'] = ( $row['g_is_supmod'] == 1 ) ? 1 : 0;\n\t\t\t$row['_title'] = $row['prefix'].$row['g_title'].$row['suffix'];\n\n\t\t\tif ( $this->ipsclass->vars['admin_group'] == $row['g_id'] )\n\t\t\t{\n\t\t\t\t$row['_title'] .= \" ( ROOT )\";\n\t\t\t}\n\n\t\t\t//-----------------------------------------\n\t\t\t// IMAGES\n\t\t\t//-----------------------------------------\n\n\t\t\t$row['_can_acp_img'] = $row['_can_acp'] ? 'aff_tick.png' : 'aff_cross.png';\n\t\t\t$row['_can_supmod_img'] = $row['_can_supmod'] ? 'aff_tick.png' : 'aff_cross.png';\n\n\t\t\t//-----------------------------------------\n\t\t\t// Add\n\t\t\t//-----------------------------------------\n\n\t\t\t$content .= $this->html->groups_overview_wrapper_row( $row );\n\n\t\t\t//-----------------------------------------\n\t\t\t// Add to array\n\t\t\t//-----------------------------------------\n\n\t\t\t$g_array[] = array( $row['g_id'], $row['g_title'] );\n\t\t}\n\n\t\t//-----------------------------------------\n\t\t// Add form\n\t\t//-----------------------------------------\n\n\t\t$form['_new_dd'] = $this->ipsclass->adskin->form_dropdown(\"id\", $g_array, 3 );\n\n\t\t$this->ipsclass->html .= $this->html->groups_overview_wrapper( $content, $form );\n\n\t\t$this->ipsclass->admin->output();\n\t}", "function OBJM_getPageShowInfo(&$codestr, $pagenameArr, $currentPageIndex)\r\n{\r\n\t$tempstr = \"\";\r\n\t$codestr = \"\"; \r\n\t// write the code into the script node\r\n\t$pagecount = count($pagenameArr); \r\n\t$tempstr = \"var gpagearr = [];\";\r\n\t$tempstr = $tempstr . \"var gcurrpageIndex = \" .$currentPageIndex . \";\";\r\n\t$tempstr = $tempstr . \"var gnumpages = \" . $pagecount . \";\"; \r\n\t$codestr = $codestr . $tempstr;\r\n\t\r\n\tfor($j =0; $j < $pagecount; $j++)\r\n\t{\r\n\t\t$pageName = $pagenameArr[$j] . \".html\"; \r\n\t\t$tempstr = \"gpagearr[\" . $j . \"] = ['\" . $pageName . \"']; \";\t\t\r\n\t\t$codestr = $codestr . $tempstr;\r\n\t}\r\n\t\r\n\t//write the final code string into the script node that's it \r\n\t$tempstr = \"function showNextPageData(event) { var node = event.target.parentNode; var bFlag = IsButtonEnabled(node); if (bFlag == false) {return;} pageIndex = gcurrpageIndex + 1; var pagename = gpagearr[pageIndex]; var JQSel; myWindow = window.open(pagename, '_self', ''); myWindow.resizeTo(screen.width, screen.height); myWindow.moveTo(50, 50); myWindow.focus(); }\"; \r\n\t$codestr = $codestr . $tempstr; \r\n\t\r\n\t$tempstr = \"function showPrevPageData(event) { var node = event.target.parentNode; var bFlag = IsButtonEnabled(node); if (bFlag == false) {return;} pageIndex = gcurrpageIndex - 1; var pagename = gpagearr[pageIndex]; var JQSel; myWindow = window.open(pagename, '_self', ''); myWindow.resizeTo(screen.width, screen.height); myWindow.moveTo(50, 50); myWindow.focus(); }\";\r\n\t$codestr = $codestr . $tempstr;\r\n\t\r\n\t$tempstr = \"function SetButtonStates() { var pageIndex = gcurrpageIndex; if (pageIndex + 1 >= gnumpages) { DisableButton('NEXTPAGEBTN', true); } else { DisableButton('NEXTPAGEBTN', false); } if (pageIndex - 1 < 0) { DisableButton('PREVPAGEBTN', true); } else { DisableButton('PREVPAGEBTN', false); } }\";\r\n\t$codestr = $codestr . $tempstr;\r\n}", "function setupTemplate() {\r\n\t\tparent::setupTemplate();\r\n\t\tLocale::requireComponents(array(LOCALE_COMPONENT_PKP_SUBMISSION, LOCALE_COMPONENT_OJS_EDITOR, LOCALE_COMPONENT_PKP_MANAGER, LOCALE_COMPONENT_OJS_AUTHOR, LOCALE_COMPONENT_OJS_MANAGER));\r\n\t\t$templateMgr =& TemplateManager::getManager();\r\n\t\t$isEditor = Validation::isEditor();\r\n\t\t\r\n\t\tif (Request::getRequestedPage() == 'editor') {\r\n\t\t\t$templateMgr->assign('helpTopicId', 'editorial.editorsRole');\r\n\t\t\r\n\t\t} else {\r\n\t\t\t$templateMgr->assign('helpTopicId', 'editorial.sectionEditorsRole');\r\n\t\t}\r\n\t\t\r\n\t\t$roleSymbolic = $isEditor ? 'editor' : 'sectionEditor';\r\n\t\t$roleKey = $isEditor ? 'user.role.coordinator' : 'user.role.sectionEditor';\r\n\t\t$pageHierarchy = array(array(Request::url(null, 'user'), 'navigation.user'), array(Request::url(null, 'user'), $roleKey), array(Request::url(null, $roleSymbolic, 'submissionsReport'), 'editor.reports.reportGenerator'));\r\n\t\t\r\n\t\t$templateMgr->assign('pageHierarchy', $pageHierarchy);\r\n\t}", "public static function getPage()\n {\n ?>\n <div class=\"wrap\">\n <h2>LMS Settings</h2>\n <?php settings_errors(); ?>\n\n <?php\n $active_tab = 'mp-lms-header-options';\n if (isset($_GET['page']) && $_GET['page'] !== 'mp-lms-settings') {\n $active_tab = $_GET['page'];\n }\n ?>\n\n <h2 class=\"nav-tab-wrapper\">\n <a href=\"?page=mp-lms-header-options\" class=\"nav-tab <?php echo 'mp-lms-header-options' == $active_tab || 'mp-lms-settings' == $active_tab ? 'nav-tab-active' : '' ?>\">Header Options</a>\n <a href=\"?page=mp-lms-footer-options\" class=\"nav-tab <?php echo 'mp-lms-footer-options' == $active_tab ? 'nav-tab-active' : '' ?>\">Footer Options</a>\n </h2>\n\n <form action=\"options.php\" method=\"post\">\n <?php\n\n if ( 'mp-lms-header-options' == $active_tab )\n {\n // Render the settings for the header_section\n settings_fields('header_section');\n\n // Renders all of the settings for sections\n do_settings_sections('mp-lms-header-options');\n }\n\n if ( 'mp-lms-footer-options' == $active_tab )\n {\n // Render the settings for the header_section\n settings_fields('footer_section');\n\n // Renders all of the settings for sections\n do_settings_sections('mp-lms-footer-options');\n }\n\n // Add the submit button\n submit_button();\n\n ?>\n </form>\n </div>\n <?php\n }", "function gtags_ajax() {\n\tlocate_template( array( \"groups/groups-loop.php\" ), true );\n\tdie;\n}", "public function setup_options_page() {\n\t\tacf_add_options_sub_page( [\n\t\t\t'page_title' \t=> _x( 'Promotions', 'Promotions page title in WP Admin', 'my-listing' ),\n\t\t\t'menu_title'\t=> _x( 'Promotions', 'Promotions menu title in WP Admin', 'my-listing' ),\n\t\t\t'menu_slug' \t=> 'theme-promotions-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}", "public function add_options_page()\n {\n }", "function printSet($photoset_id, $packery = true, $parentNav = false, $size = 'n'){\n\n\t\t/* Gets Photo Info */\n\t\t$info = $this->getPhotoSetInfo($photoset_id);\n\n\t\t/* Redefine loadContentDescription */\n\t\t$this->pageDescription = $info->photoset->title->_content;\n\t\t$this->contentDescription = $info->photoset->description->_content;\n\n\t\t/* Add Content Description */\n\t\t$output = $parentNav ? '' : $this->printContentDescription();\n\n\t\t/* Start HTML */\n\t\tif(!$parentNav) $output .= '<section class=\"photogroup\"><div id=\"gallery\">';\n\n\t\t/* Check for Packery */\n\t\t$packery ? $packery = 'packery' : $packery = '';\n\t\t$output .= '<ul class=\"set '.$packery.'\">';\n\n\t\t/* Gets some photos */\n\t\t$photoSet = $this->getPhotoSet($photoset_id);\n\n\t\tforeach($photoSet->photoset->photo as $photo){\n\n\t\t\t/* Add Special Class to Primary */\n\t\t\t$primary = $photo->isprimary == '1' ? 'primary' : '';\n\n\t\t\t/* Add Video class if Video */\n\t\t\t$output .= '<li class=\"item '.$photo->media.' '.$primary.'\">';\n\t\t\t$output .= '<a class=\"imagelink\" href=\"#!/photo_id='.$photo->id.'&secret='.$photo->secret.'\">';\n\n\t\t\t/* Lets get some Photos */\n\t\t\tif($photo->media !== 'video' || $packery == false){ // Photos\n\n\t\t\t\t$info = $this->getPhoto($photo->id, $photo->secret);\n\n\t\t\t\t/* Check for Animated Gifs */\n\t\t\t\tif($info->photo->originalformat == 'gif') {\n\t\t\t\t\t$secret = $info->photo->originalsecret.'_o';\n\t\t\t\t\t$format = 'gif';\n\t\t\t\t} else {\n\t\t\t\t\t$secret = $photo->secret;\n\t\t\t\t\t$format = 'jpg';\n\t\t\t\t}\n\n\t\t\t\t$sizeUrl = 'url_'.$size;\n\t\t\t\t$url = isset($photo->$sizeUrl) ? $photo->$sizeUrl : 'http://farm'.$photo->farm.'.staticflickr.com/'.$photo->server.'/'.$photo->id.'_'.$secret.'.'.$format;\n\t\t\t\t$output .= '<img src=\"'.$url.'\" alt=\"'.$photo->title.'\">';\n\t\t\t} else {\n\n\t\t\t\t/* Videos Baby! */\n\t\t\t\t$output .= $this->printVideo($photo->id,$photo->secret,false);\n\t\t\t}\n\t\t\t$output .= '</a>';\n\t\t\t$output .= '</li>';\n\t\t}\n\t\t$output .= '</ul>';\n\t\t\n\t\tif(!$parentNav) $output .= '</div>';\n\n\t\t/* Add Parent Nav */\n\t\tif(!$parentNav) {\n\t\t\t$parentNav = $this->printSets(false);\n\t\t\t$output .= '<section class=\"parentnav\"><div class=\"before\">&laquo;</div>'.$parentNav.'<div class=\"after\">&raquo;</div></section>';\n\t\t\t$output .= '<nav class=\"pagenav\"><ul>'\n\t\t\t\t.'<li class=\"back\"><a href=\"#!/home\">&laquo; Back to Projects</a></li>'\n\t\t\t\t.'</ul></nav>';\n\t\t} else {\n\n\t\t\t$title = isset($parentNav->title) ? $parentNav->title : 'Projects';\n\t\t\t$link = isset($parentNav->id) ? strtolower(urlencode($parentNav->title)).'&amp;id='.$parentNav->id : '';\n\n\t\t\t$output = '<section class=\"parentnav\"><div class=\"before\">&laquo;</div>'.$output.'<div class=\"after\">&raquo;</div></section>';\n\t\t\t$output .= '<nav class=\"pagenav\"><ul>'\n\t\t\t\t.'<li class=\"back\"><a href=\"#!/set='.$link.'\">&laquo; Back to '.$title.'</a></li>'\n\t\t\t\t.'</ul></nav>';\n\t\t}\n\n\t\t/* End HTML */\n\t\tif(!$parentNav) $output .= '</section>';\n\n\t\t/* Output HTML */\n\t\treturn $output;\n\t}", "public static function getPluignGroups()\n\t\t{\n\n\t\t\t$groups = array(\n\n\t\t\t\t'christina' => array(\n\t\t\t\t\t'id'\t\t\t\t=> 'christina',\n\t\t\t\t\t'title'\t\t\t\t=> 'Christina',\n\t\t\t\t\t'icon' \t\t\t\t=> 'admin-appearance',\n\t\t\t\t\t'excerpt' \t\t\t=> 'Enable your students to submit assignments, have them collaborate in groups and get inline feedback.',\n\t\t\t\t\t'image' \t\t\t=> 'http://dummyimage.com/308x160',\n\t\t\t\t\t'link' \t\t\t\t=> 'http://code.ubc.ca/studiorum/courses/christina',\n\t\t\t\t\t'content' \t\t\t=> __( '<p>Create assignments - with deadlines - that enable your students to submit their work in a beautiful rich text editor. The student (and peers in their custom user groups) are able to make inline comments to get fine-grained critique.</p>', 'studiorum' ),\n\t\t\t\t\t'content_sidebar' \t=> 'http://dummyimage.com/300x150',\n\t\t\t\t\t'date'\t\t\t\t=> '2014-06-01',\n\t\t\t\t\t'plugins'\t\t\t=> array(\n\t\t\t\t\t\t'gravityforms/gravityforms.php',\n\t\t\t\t\t\t'gravity-forms-custom-post-types/gfcptaddon.php',\n\t\t\t\t\t\t'gravity-forms-wysiwyg/gf_wysiwyg.php',\n\t\t\t\t\t\t'studiorum-lectio/studiorum-lectio.php',\n\t\t\t\t\t\t'studiorum-side-comments/studiorum-side-comments.php',\n\t\t\t\t\t\t'studiorum-user-groups/studiorum-user-groups.php'\n\t\t\t\t\t),\n\t\t\t\t\t'examples' \t\t\t=> array(\n\t\t\t\t\t\t'http://arts.ubc.ca/arts-one/'\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t\n\t\t\t\t'simon' => array(\n\t\t\t\t\t'id'\t\t\t\t=> 'simon',\n\t\t\t\t\t'title'\t\t\t\t=> 'Simon',\n\t\t\t\t\t'icon' \t\t\t\t=> 'lightbulb',\n\t\t\t\t\t'excerpt' \t\t\t=> 'Enable students to rate each others\\' work simply and easily using a hot-or-not style voting system.',\n\t\t\t\t\t'image' \t\t\t=> 'http://dummyimage.com/308x160/222/fff',\n\t\t\t\t\t'link' \t\t\t\t=> 'http://code.ubc.ca/studiorum/courses/simon',\n\t\t\t\t\t'content' \t\t\t=> __( '<p>Provide a simple way for your students to provide hot-or-not style feedback to easily discover which content is best.</p>', 'studiorum' ),\n\t\t\t\t\t'content_sidebar' \t=> 'http://dummyimage.com/300x150',\n\t\t\t\t\t'date'\t\t\t\t=> '2014-07-01',\n\t\t\t\t\t'plugins'\t\t\t=> array(\n\t\t\t\t\t\t'gravityforms/gravityforms.php',\n\t\t\t\t\t\t'gravity-forms-custom-post-types/gfcptaddon.php',\n\t\t\t\t\t\t'gravity-forms-wysiwyg/gf_wysiwyg.php',\n\t\t\t\t\t\t'studiorum-lectio/studiorum-lectio.php',\n\t\t\t\t\t\t'custom-css-meta-box/custom-css-meta-box.php'\n\t\t\t\t\t),\n\t\t\t\t\t'examples' \t\t\t=> array(\n\t\t\t\t\t\t'http://physics.ubc.ca/'\n\t\t\t\t\t)\n\t\t\t\t),\n\n\t\t\t\t'paul' => array(\n\t\t\t\t\t'id'\t\t\t\t=> 'paul',\n\t\t\t\t\t'title'\t\t\t\t=> 'Paul',\n\t\t\t\t\t'icon' \t\t\t\t=> 'share',\n\t\t\t\t\t'excerpt' \t\t\t=> 'Curate content via delicious.com and show it on your site in a beautiful, searchable, engaging way.',\n\t\t\t\t\t'image' \t\t\t=> 'http://dummyimage.com/308x160/fff/333',\n\t\t\t\t\t'link' \t\t\t\t=> 'http://code.ubc.ca/studiorum/courses/paul',\n\t\t\t\t\t'content' \t\t\t=> __( '<p>Curate and tag content using the popular delicious.com service and then allow students to search quickly and easily to see the content you want them to see.</p>', 'studiorum' ),\n\t\t\t\t\t'content_sidebar' \t=> 'http://dummyimage.com/300x150',\n\t\t\t\t\t'date'\t\t\t\t=> '2014-05-01',\n\t\t\t\t\t'plugins'\t\t\t=> array(\n\t\t\t\t\t\t'studiorum-hon/studiorum-delicious.php'\n\t\t\t\t\t),\n\t\t\t\t\t'examples' \t\t\t=> array(\n\t\t\t\t\t\t'http://sauder.ubc.ca/'\n\t\t\t\t\t)\n\t\t\t\t),\n\n\t\t\t);\n\n\t\t\treturn $groups;\n\n\t\t}", "private function render_pid_area(MJKGenToolsPage $page): void {\r\n $pid = $page->pid();\r\n if (empty($pid)) $pid = self::default_pid;\r\n\r\n echo '<b>WP page</b>';\r\n $this->render_pid_dropdown($page, $pid);\r\n $this->render_view_button($page);\r\n $this->render_edit_button($page);\r\n $this->render_gen_button($page);\r\n\r\n if (get_class($page) == 'MJKGenToolsPageSwitch') {\r\n echo '<br><br>';\r\n\t $this->render_preload_option($page);\r\n }\r\n \r\n echo '<br><br>';\r\n $this->render_last_gen_report($page);\r\n $this->render_rev_report($page, $pid);\r\n }", "public function create_group()\r\n\t{\r\n\t\t// Load template\r\n\t\tinclude(BLUPATH_TEMPLATES .'/site/modules/create_group.php');\r\n\t}", "public function createPlaceholdersAndDeleteLiveParentPage() {}", "public function createPlaceholdersAndDeleteDraftParentPage() {}", "function settings_page() {\n\t\textract( $this->group, EXTR_OVERWRITE ); ?>\n\n\t<div class=\"wrap\">\n\t\t<?php screen_icon(); ?>\n\t\t<h2><?php echo esc_html( $page_title ) ?></h2>\n\t\t<?php do_action( \"{$prefix}_kc_settings_page_before\", $this->group ) ?>\n\t\t<form action=\"options.php\" method=\"post\" id=\"kc-settings-form\">\n\t\t\t<?php\n\t\t\t\t# The hidden fields\n\t\t\t\tsettings_fields( \"{$prefix}_settings\" );\n\n\t\t\t\tswitch ( $this->group['display'] ) {\n\t\t\t\t\tcase 'metabox' :\n\t\t\t\t\t\t$this->metabox->display();\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'plain' :\n\t\t\t\t\t\tforeach ( $this->group['options'] as $section ) :\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<h3><?php echo esc_html( $section['title'] ) ?></h3>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t$this->settings_section( $section );\n\t\t\t\t\t\tendforeach;\n\t\t\t\t\t\tsubmit_button( __( 'Save Changes' ) );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t?>\n\t\t</form>\n\t\t<?php do_action( \"{$prefix}_kc_settings_page_after\", $this->group ) ?>\n\t</div>\n\t<?php }" ]
[ "0.6819107", "0.6083646", "0.60477173", "0.60070455", "0.5897682", "0.5888431", "0.57270575", "0.5703938", "0.56887025", "0.5608395", "0.5563202", "0.5562023", "0.5556081", "0.55283016", "0.5495903", "0.54637223", "0.53889304", "0.53773504", "0.53636193", "0.5360967", "0.53559494", "0.534525", "0.53387606", "0.5335661", "0.52752227", "0.5266831", "0.5262929", "0.525775", "0.52284086", "0.52173936", "0.51903844", "0.5177151", "0.5173642", "0.5172651", "0.5170967", "0.51706564", "0.5156606", "0.51562804", "0.51508504", "0.5146386", "0.5143967", "0.5143359", "0.5141937", "0.51397324", "0.51323754", "0.5131951", "0.51284844", "0.5128147", "0.5112741", "0.5104098", "0.5094512", "0.5094512", "0.50937897", "0.50911105", "0.509045", "0.5077215", "0.5075026", "0.50722516", "0.5068239", "0.5061466", "0.50514865", "0.505098", "0.505098", "0.50416327", "0.503693", "0.50362", "0.5034551", "0.50291985", "0.5028377", "0.50224346", "0.50217843", "0.50079376", "0.5006143", "0.500608", "0.5000638", "0.49966654", "0.49936128", "0.49884367", "0.49799013", "0.49779484", "0.49679267", "0.4966933", "0.4960822", "0.49545553", "0.4949984", "0.4943703", "0.4935364", "0.49335447", "0.4927309", "0.4925983", "0.49249148", "0.4911803", "0.490543", "0.49041358", "0.49040204", "0.49022508", "0.49013785", "0.49007145", "0.4895021", "0.48938265", "0.4892969" ]
0.0
-1
Start Getters Get the Grouping page category id
public function getId() { return $this->id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCategory_id()\n {\n return $this->category_id;\n }", "public function getCategory_id()\n {\n return $this->category_id;\n }", "public function getCategory_id()\n {\n return $this->category_id;\n }", "public function getIdCategory(){\n return $this->idCategory;\n }", "public function get_category_id(){\n\t\treturn $this->_categoryid;\n\t}", "public function getCatId()\n {\n return $this->getParamCatId();\n }", "public function getCat_id() {\n return $this->cat_id;\n }", "public function getIdCat()\n {\n return $this->id_cat;\n }", "public function getId_cat()\n {\n return $this->id_cat;\n }", "function get_category_group()\n\t{\n\t\t// get variables\n\t\t$vars = $this->_get_vars('get', array('group_id'));\n\t\t\n\t\t// start hook\n\t\t$vars = $this->_hook('get_category_group_start', $vars);\n\n\t\t// load channel data library\n\t\t$this->_load_library('channel_data');\n\n\t\t$data = $this->EE->channel_data_lib->get_category_group($vars['group_id'])->result();\n\n\t\t// end hook\n\t\t$data = $this->_hook('get_category_group_end', $data);\n\n\t\t$this->response($data);\n\t}", "public function get_categorieId()\n {\n return $this->_categorieId;\n }", "public function getIdKategoria() {\n return $this->idKategoria;\n }", "public function getId(){\n return $this->_sub_cat_id;\n }", "private function getCategoryID() {\n return 0;\n }", "public function getCategory() {}", "private function __getCategoryIdFromUrl() {\n return $this->uri->segment( 3, 0 );\n }", "public function getCategoryId() { return $this->categoryId; }", "public function getCategoryId();", "public function get_category_id() {\n return (int)get_config('block_homework_diary', 'course_category');\n }", "private function _storeCreatedCategoryId() {\r\n $I = $this->BackendTester;\r\n\r\n $I->click('.row-title');\r\n\r\n $tagId = null;\r\n\r\n $url = $I->grabFromCurrentUrl();\r\n\r\n $url = substr($url, strpos($url, '?') + 1);\r\n\r\n parse_str($url, $array);\r\n\r\n if (isset($array['tag_ID']))\r\n $tagId = $array['tag_ID'];\r\n\r\n $I->setVar('category_id', $tagId);\r\n\r\n return $tagId;\r\n }", "public function getCategory();", "public function getCategory();", "private function getParamCatId()\n {\n $catid = $this->getMenuParams()->get( 'catid', 0 );\n return (int)$catid;\n }", "function get_cat_ID($cat_name)\n {\n }", "public function returnUpdateCat() {\n return $this->category_id;\n }", "public function getCategoria_id()\n {\n return $this->categoria_id;\n }", "public function getIdcategoria()\n {\n return $this->idcategoria;\n }", "public function getId_categorie()\n {\n return $this->id_categorie;\n }", "public function getIdCategoria()\n {\n return $this->id_categoria;\n }", "public function getIdCategoria()\n {\n return $this->id_categoria;\n }", "public function getCategoryId()\n {\n return $this->categoryId;\n }", "public function getCategory(){\n return $this->category;\n }", "function getCategory()\r\n\t\t{\r\n\t\t\treturn $this->category;\r\n\t\t\t\r\n\t\t}", "public function getCategory() {\r\n return $this->catList->find('id', $this->categoryId)[0];\r\n }", "public function getCategoryId(): string\n {\n return $this->categoryId;\n }", "public function getCategory(){\r\n return Mage::registry('current_category');\r\n }", "function setup_cat()\n {\n $this->ipsclass->DB->simple_construct( array( \"select\" => 'perms_view, def_view, id, name', 'from' => 'gallery_categories', 'where' => \"id={$this->ipsclass->input['cat']}\" ) );\n $this->ipsclass->DB->simple_exec(); \n $cat = $this->ipsclass->DB->fetch_row();\n\n // Are we allowed to view this category?\n if( ! $this->ipsclass->check_perms( $cat['perms_view'] ) )\n {\n $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission' ) ); \n }\n\n return $cat;\n }", "function get_category_id() {\n\tglobal $wpdb;\n\n\t$sql = \"SELECT term_id\n\t\tFROM $wpdb->terms\n\t\tWHERE name LIKE 'webonary'\";\n\n\t$catid = $wpdb->get_var( $sql);\n\n\treturn $catid;\n}", "public function get_category(){\n\t\treturn $this->category;\n\t}", "public function getIdentifier() {\n\t\tif (empty($this->_id) && $this->_hasCategory) {\n\t\t\t$this->_id = $this->_getCategory()->getId();\n\t\t}\n\t\treturn $this->_id;\n\t}", "public function getCategory() {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory(): string;", "public function getIdCategorie(): int\n {\n return $this->id_categorie;\n }", "public function getCategory()\n {\n }", "public function getCategory()\n\t{\n\t\treturn $this->data['category'];\n\t}", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "function the_category() {\n\tglobal $discussion;\n\treturn $discussion['category'];\n}", "public function getCategory()\n {\n return $this->_category;\n }", "public function getCategory() {\n return $this->category;\n }", "function get_categories_by_group()\n\t{\n\t\t// get variables\n\t\t$vars = $this->_get_vars('get', array('group_id'));\n\n\t\t// start hook\n\t\t$vars = $this->_hook('get_categories_by_group_start', $vars);\n\n\t\t// load channel data library\n\t\t$this->_load_library('channel_data');\n\n\t\t$data = $this->EE->channel_data_lib->get_category_by_group($vars['group_id'])->result();\n\n\t\t// end hook\n\t\t$data = $this->_hook('get_categories_by_group_end', $data);\n\n\t\t$this->response($data);\n\t}", "function getCategory() \n {\n return $this->instance->getCategory();\n }", "function getCategory() {\n\t\t$categoryId = JRequest::getInt('category_id', 0) ;\n\t\t$sql = 'SELECT * FROM #__eb_categories WHERE id='.$categoryId;\n\t\t$this->_db->setQuery($sql) ;\n\t\treturn $this->_db->loadObject();\t\t\t\n\t}", "function fs_get_category_id( $cat_name ) {\r\n\t$term = get_term_by( 'name', $cat_name, 'category' );\r\n\treturn $term->term_id;\r\n}", "public function get($category_id);", "public function ajax_get_category()\n {\n $cat_id = ee()->input->get('cat_id');\n $group_id = ee()->input->get('group_id');\n $status = ee()->input->get('publisher_view_status') ? ee()->input->get('publisher_view_status') : PUBLISHER_STATUS_OPEN;\n\n $data = array(\n 'cat_id' => $cat_id,\n 'status' => $status\n );\n\n $vars = ee()->publisher_helper->get_toolbar_options('category', $data, FALSE);\n\n $vars['cat_id'] = $cat_id;\n $vars['group_id'] = $group_id;\n $vars['data'] = ee()->publisher_category->get_translations($cat_id, $group_id, $status);\n $vars['save_url'] = ee()->publisher_helper_cp->mod_link('ajax_save_category', array(), TRUE);\n $vars['custom_fields'] = ee()->publisher_category->get_custom_fields($group_id);\n\n // Load core lang file so views are translated\n ee()->lang->loadfile('content');\n\n if (ee()->input->get('publisher_view_status'))\n {\n $data = ee()->load->view('category/edit_form', $vars, TRUE);\n }\n else\n {\n $data = ee()->load->view('category/edit', $vars, TRUE);\n }\n\n ee()->publisher_helper->send_ajax_response($data);\n }", "public function getIdCategoryDefault(){\n\n /*TODO refactor*/ \n $idDefault = '3';\n\n $rootCategoryId = Mage::app()->getStore(\"default\")->getRootCategoryId() ;\n\n if(isset($rootCategoryId) && $rootCategoryId > 0)\n $idDefault = $rootCategoryId + 1 ;\n\n return $idDefault ;\n }", "function sportal_category()\n{\n\tglobal $smcFunc, $context, $scripturl, $modSettings, $txt;\n\n\tloadTemplate('PortalCategories');\n\n\t$category_id = !empty($_REQUEST['category']) ? $_REQUEST['category'] : 0;\n\n\t$context['category'] = sportal_get_categories($category_id, true, true);\n\n\tif (empty($context['category']['id']))\n\t\tfatal_lang_error('error_sp_category_not_found', false);\n\n\t$request = $smcFunc['db_query']('','\n\t\tSELECT COUNT(*)\n\t\tFROM {db_prefix}sp_articles\n\t\tWHERE status = {int:article_status}\n\t\t\tAND {raw:article_permissions}\n\t\t\tAND id_category = {int:current_category}\n\t\tLIMIT {int:limit}',\n\t\tarray(\n\t\t\t'article_status' => 1,\n\t\t\t'article_permissions' => sprintf($context['SPortal']['permissions']['query'], 'permissions'),\n\t\t\t'current_category' => $context['category']['id'],\n\t\t\t'limit' => 1,\n\t\t)\n\t);\n\tlist ($total_articles) = $smcFunc['db_fetch_row']($request);\n\t$smcFunc['db_free_result']($request);\n\n\t$per_page = min($total_articles, !empty($modSettings['sp_articles_per_page']) ? $modSettings['sp_articles_per_page'] : 10);\n\t$start = !empty($_REQUEST['start']) ? (int) $_REQUEST['start'] : 0;\n\t$total_pages = $per_page > 0 ? ceil($total_articles / $per_page) : 0;\n\t$current_page = $per_page > 0 ? ceil($start / $per_page) : 0;\n\n\tif ($total_articles > $per_page)\n\t{\n\t\t$context['page_index'] = constructPageIndex($context['category']['href'] . ';start=%1$d', $start, $total_articles, $per_page, true);\n\n\t\tif ($current_page > 0)\n\t\t\t$context['previous_start'] = ($current_page - 1) * $per_page;\n\t\tif ($current_page < $total_pages - 1)\n\t\t\t$context['next_start'] = ($current_page + 1) * $per_page;\n\t}\n\n\t$context['articles'] = sportal_get_articles(0, true, true, 'spa.id_article DESC', $context['category']['id'], $per_page, $start);\n\n\tforeach ($context['articles'] as $article)\n\t{\n\t\tif (($cutoff = $smcFunc['strpos']($article['body'], '[cutoff]')) !== false)\n\t\t\t$article['body'] = $smcFunc['substr']($article['body'], 0, $cutoff);\n\n\t\t$context['articles'][$article['id']]['preview'] = parse_bbc($article['body']);\n\t\t$context['articles'][$article['id']]['date'] = timeformat($article['date']);\n\t}\n\n\t$context['linktree'][] = array(\n\t\t'url' => $scripturl . '?category=' . $context['category']['category_id'],\n\t\t'name' => $context['category']['name'],\n\t);\n\n\t$context['page_title'] = $context['category']['name'];\n\t$context['sub_template'] = 'view_category';\n}", "public function getGroupByPage() {}", "public function getCategory()\n {\n\t\treturn self::$categories[ $this->category ];\n }", "function category($id_only=false) {\n\t\t\tif($id_only) {\n\t\t\t\treturn $id;\n\t\t\t}\n\t\t\treturn '//category stub';\n\t\t}", "function alaya_cat_id($cate_slug){\n $category=get_term_by('slug',$cate_slug,'category');\n if($category){\n\t $cate_id = $category->term_id;\n\t $cate_id = apply_filters('alaya_cat_id', $cate_id);\n\t return $cate_id;\n\t}\n}", "public static function getCategory()\n {\n return self::$category;\n }", "function get_category_id( $cat_name ){\n\t$term = get_term_by( 'name', $cat_name, 'category' );\n\treturn $term->term_id;\n}", "function get_category_id( $cat_name ){\n\t$term = get_term_by( 'name', $cat_name, 'category' );\n\treturn $term->term_id;\n}", "public function category() {\n\t\treturn $this->get_category();\n\t}", "public function get_category()\n {\n return $this->primary_category();\n }", "public function categories()\n {\n $group_id = ee()->input->get('group_id') ? ee()->input->get('group_id') : ee()->publisher_category->get_first_group();\n\n $vars = ee()->publisher_helper_cp->get_category_vars($group_id);\n\n $vars = ee()->publisher_helper_cp->prep_category_vars($vars);\n\n // Load the file manager for the category image.\n ee()->publisher_helper_cp->load_file_manager();\n\n // Bail if there are no category groups defined.\n if (empty($vars['category_groups']))\n {\n show_error('No category groups found, please <a href=\"'. BASE.AMP .'D=cp&C=admin_content&M=edit_category_group\">create one</a>.');\n }\n\n return ee()->load->view('category/index', $vars, TRUE);\n }", "public function getCategory($id){\n $category = Product::find($id)->category_id;\n return $category;\n }", "function getCategory() {\n // Load categories.\n $categories = userpoints_get_categories();\n return isset($categories[$this->getTid()]) ? $categories[$this->getTid()] : $categories[userpoints_get_default_tid()];\n }", "public function getCategoryId()\n {\n if ($category = Mage::registry('current_category')) {\n return $category->getId();\n }\n return false;\n }", "function achieve_get_main_category()\r\n{\r\n global $sql;\r\n\r\n $main_cat = array();\r\n $result = $sql[\"dbc\"]->query(\"SELECT ID, Name FROM achievement_category WHERE ParentID=-1 and ID<>1 ORDER BY `GroupID` ASC\");\r\n while ($main_cat[] = $sql[\"dbc\"]->fetch_assoc($result));\r\n return $main_cat;\r\n}", "public function getCategory() {\n\t\treturn $this->category;\n\t}", "function getCodigoCategoria()\n {\n return $this->CodigoCategoria;\n }", "function get_page_category ($category_id) {\r\n\t$cat = get_category($category_id);\r\n\tif ($cat) { return $cat; }\r\n\treturn get_category(1);\r\n}", "static function get_primary_category_id() {\n if (empty(self::$post->ID)) {\n return get_queried_object_id();\n }\n return self::$primary_category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "function L_getCatId($cat_name) {\n\t\t\n\t\t$term = get_term_by('name', $cat_name, 'category');\n\t\treturn $term->term_id;\n\t\n\t}", "public function getCategory()\n\t{\n\t\treturn $this->category;\n\t}", "static function get_category_by_id($category){\n\t\treturn self::$db->where('id',$category)->get('categories')->results();\n\t}", "public function getCategory()\n {\n\n return $this->category;\n }", "public function getCurrentCat()\n {\n if (empty($this->multifilterSession->getTopCategory()) && empty($this->multifilterSession->getCategories())) {\n $currentCat = $this->coreRegistry->registry('current_category');\n return $currentCat->getId();\n } else {\n return $this->multifilterSession->getTopCategory();\n }\n }", "function selectCategory($cat) {\n global $catid;\n if (is_numeric($cat) ) {\n $catid = intval($cat);\n } else {\n $catid = getCatIDFromName($cat);\n }\n}", "function getCurrentCatID() {\n global $wp_query;\n if (is_category() || is_single()) {\n $cat_ID = get_query_var('cat');\n }\n return $cat_ID;\n}", "public function getCategory($catId) {\n return Mage::getModel ( 'catalog/category' )->load ( $catId );\n }" ]
[ "0.699744", "0.699744", "0.699744", "0.6956059", "0.6880029", "0.6851266", "0.6808533", "0.6785461", "0.6735777", "0.6648334", "0.6646559", "0.66035455", "0.6569481", "0.655147", "0.6463467", "0.64557284", "0.63980824", "0.63927686", "0.63569534", "0.63048786", "0.628762", "0.628762", "0.6284539", "0.6280089", "0.6251699", "0.6249726", "0.62482095", "0.6217844", "0.6198732", "0.6198732", "0.6193637", "0.6177726", "0.61664945", "0.61599714", "0.61551416", "0.6145358", "0.6142615", "0.6133851", "0.6103969", "0.6079724", "0.6075695", "0.6061227", "0.6061227", "0.6008446", "0.5993155", "0.59810424", "0.59679556", "0.5962189", "0.5962189", "0.5962189", "0.5962189", "0.5962189", "0.5962189", "0.5962189", "0.5962189", "0.5962189", "0.5962189", "0.5962189", "0.5962189", "0.5962189", "0.5962189", "0.5962189", "0.5962189", "0.59586227", "0.5937541", "0.5936799", "0.59348714", "0.5929864", "0.59086645", "0.59084105", "0.5905421", "0.5888267", "0.5884145", "0.58747894", "0.58742505", "0.58685076", "0.5856958", "0.58563155", "0.58456224", "0.58436203", "0.58436203", "0.5842497", "0.5841572", "0.58401096", "0.5824618", "0.58190995", "0.5816705", "0.5813697", "0.5802152", "0.57981527", "0.57853943", "0.57795674", "0.5779091", "0.5776474", "0.5773857", "0.57718915", "0.5760784", "0.5759127", "0.57374483", "0.56921244", "0.56877595" ]
0.0
-1
Get the Grouping page category id
public function getCategoryId() { return $this->categoryId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCategory_id()\n {\n return $this->category_id;\n }", "public function getCategory_id()\n {\n return $this->category_id;\n }", "public function getCategory_id()\n {\n return $this->category_id;\n }", "public function get_category_id() {\n return (int)get_config('block_homework_diary', 'course_category');\n }", "public function getCatId()\n {\n return $this->getParamCatId();\n }", "public function get_category_id(){\n\t\treturn $this->_categoryid;\n\t}", "private function getParamCatId()\n {\n $catid = $this->getMenuParams()->get( 'catid', 0 );\n return (int)$catid;\n }", "private function __getCategoryIdFromUrl() {\n return $this->uri->segment( 3, 0 );\n }", "public function get_categorieId()\n {\n return $this->_categorieId;\n }", "private function getCategoryID() {\n return 0;\n }", "public function getIdCat()\n {\n return $this->id_cat;\n }", "private function _storeCreatedCategoryId() {\r\n $I = $this->BackendTester;\r\n\r\n $I->click('.row-title');\r\n\r\n $tagId = null;\r\n\r\n $url = $I->grabFromCurrentUrl();\r\n\r\n $url = substr($url, strpos($url, '?') + 1);\r\n\r\n parse_str($url, $array);\r\n\r\n if (isset($array['tag_ID']))\r\n $tagId = $array['tag_ID'];\r\n\r\n $I->setVar('category_id', $tagId);\r\n\r\n return $tagId;\r\n }", "function get_category_id() {\n\tglobal $wpdb;\n\n\t$sql = \"SELECT term_id\n\t\tFROM $wpdb->terms\n\t\tWHERE name LIKE 'webonary'\";\n\n\t$catid = $wpdb->get_var( $sql);\n\n\treturn $catid;\n}", "public function getId_cat()\n {\n return $this->id_cat;\n }", "public function getCategoryId(): string\n {\n return $this->categoryId;\n }", "function get_cat_ID($cat_name)\n {\n }", "public function getCategoryId()\n {\n if ($category = Mage::registry('current_category')) {\n return $category->getId();\n }\n return false;\n }", "public function getCategoryId()\n {\n return $this->categoryId;\n }", "function get_category_id( $cat_name ){\n\t$term = get_term_by( 'name', $cat_name, 'category' );\n\treturn $term->term_id;\n}", "function get_category_id( $cat_name ){\n\t$term = get_term_by( 'name', $cat_name, 'category' );\n\treturn $term->term_id;\n}", "public function getIdentifier() {\n\t\tif (empty($this->_id) && $this->_hasCategory) {\n\t\t\t$this->_id = $this->_getCategory()->getId();\n\t\t}\n\t\treturn $this->_id;\n\t}", "public function getCat_id() {\n return $this->cat_id;\n }", "function fs_get_category_id( $cat_name ) {\r\n\t$term = get_term_by( 'name', $cat_name, 'category' );\r\n\treturn $term->term_id;\r\n}", "public function getIdCategoryDefault(){\n\n /*TODO refactor*/ \n $idDefault = '3';\n\n $rootCategoryId = Mage::app()->getStore(\"default\")->getRootCategoryId() ;\n\n if(isset($rootCategoryId) && $rootCategoryId > 0)\n $idDefault = $rootCategoryId + 1 ;\n\n return $idDefault ;\n }", "public function getIdCategory(){\n return $this->idCategory;\n }", "public function getIdCategoria()\n {\n return $this->id_categoria;\n }", "public function getIdCategoria()\n {\n return $this->id_categoria;\n }", "public function getCategoria_id()\n {\n return $this->categoria_id;\n }", "function L_getCatId($cat_name) {\n\t\t\n\t\t$term = get_term_by('name', $cat_name, 'category');\n\t\treturn $term->term_id;\n\t\n\t}", "public function getCategoryId();", "static function get_primary_category_id() {\n if (empty(self::$post->ID)) {\n return get_queried_object_id();\n }\n return self::$primary_category;\n }", "public function getIdKategoria() {\n return $this->idKategoria;\n }", "public function getId(){\n return $this->_sub_cat_id;\n }", "function get_category_group()\n\t{\n\t\t// get variables\n\t\t$vars = $this->_get_vars('get', array('group_id'));\n\t\t\n\t\t// start hook\n\t\t$vars = $this->_hook('get_category_group_start', $vars);\n\n\t\t// load channel data library\n\t\t$this->_load_library('channel_data');\n\n\t\t$data = $this->EE->channel_data_lib->get_category_group($vars['group_id'])->result();\n\n\t\t// end hook\n\t\t$data = $this->_hook('get_category_group_end', $data);\n\n\t\t$this->response($data);\n\t}", "function get_page_category ($category_id) {\r\n\t$cat = get_category($category_id);\r\n\tif ($cat) { return $cat; }\r\n\treturn get_category(1);\r\n}", "public function getId_categorie()\n {\n return $this->id_categorie;\n }", "public function getIdCategorie(): int\n {\n return $this->id_categorie;\n }", "public function getIdcategoria()\n {\n return $this->idcategoria;\n }", "function get_omfg_category_id($cat_name){\n\t$term = get_term_by('name', $cat_name, 'omfg_mobile_themes');\n\treturn $term->term_id;\n}", "public function getCategory() {\r\n return $this->catList->find('id', $this->categoryId)[0];\r\n }", "private function catId($cat) {\n\t\t$id = $this->db->table('nsbulletin_categories')\n\t\t\t\t->where([\n\t\t\t\t\t['category', '=', $cat],\n\t\t\t\t\t['nodeid', '=', $this->localNode->nodeid()]\n\t\t\t\t\t])\n\t\t\t\t->value('id');\n\t\n\t\tif($id) return $id;\n\t\n\t\treturn $this->db->table('nsbulletin_categories')\n\t\t\t->insertGetId(['category' => $cat, 'nodeid' => $this->localNode->nodeid()]);\n\t}", "public function getId() : int\n {\n return $this->getValue('nb_commerce_product_category_id');\n }", "function the_category() {\n\tglobal $discussion;\n\treturn $discussion['category'];\n}", "function retrieve_category_id($name) {\n\tglobal $wpdb;\n\t\n\t// Query the term_id of the category needed\n\t$query = \"SELECT wpt.term_id FROM `wp_terms` AS wpt\"\n \t\t. \" JOIN `wp_term_taxonomy` AS wptt\"\n \t\t. \"\t\tON wpt.term_id = wptt.term_id\"\n \t\t. \" WHERE wptt.taxonomy = 'category' AND name = %s\";\n\t$sql = $wpdb->prepare($query, $name);\n\t$id = $wpdb->get_results($sql)[0]->term_id;\n\treturn $id;\n\t\n}", "public function getCurrentCat()\n {\n if (empty($this->multifilterSession->getTopCategory()) && empty($this->multifilterSession->getCategories())) {\n $currentCat = $this->coreRegistry->registry('current_category');\n return $currentCat->getId();\n } else {\n return $this->multifilterSession->getTopCategory();\n }\n }", "public function getCategory(){\r\n return Mage::registry('current_category');\r\n }", "public function getActiveCategoryId() {\n\t\tif ($this->request->hasArgument(LinkUtility::CATEGORY)) {\n\t\t\t$categoryId = $this->request->getArgument(LinkUtility::CATEGORY);\n\t\t\tif (ctype_digit($categoryId)) {\n\t\t\t\treturn $categoryId;\n\t\t\t}\n\t\t}\n\t\treturn FALSE;\n\t}", "function alaya_cat_id($cate_slug){\n $category=get_term_by('slug',$cate_slug,'category');\n if($category){\n\t $cate_id = $category->term_id;\n\t $cate_id = apply_filters('alaya_cat_id', $cate_id);\n\t return $cate_id;\n\t}\n}", "function getCurrentCatID() {\n global $wp_query;\n if (is_category() || is_single()) {\n $cat_ID = get_query_var('cat');\n }\n return $cat_ID;\n}", "public function get_category()\n {\n return $this->primary_category();\n }", "public function returnUpdateCat() {\n return $this->category_id;\n }", "public function getIpAccessControlCategoryID()\n {\n return $this->ipAccessControlCategoryID;\n }", "public static function getCategoryId($category, $subcategory)\n {\n switch ($category) {\n case 'filmvideo':\n switch ($subcategory) {\n case 'animation':\n $category_id = self::CATEGORY_FILMVIDEO_ANIMATION;\n break;\n case 'animationserie':\n $category_id = self::CATEGORY_FILMVIDEO_ANIMATIONSERIE;\n break;\n case 'concert':\n $category_id = self::CATEGORY_FILMVIDEO_CONCERT;\n break;\n case 'documentaire':\n $category_id = self::CATEGORY_FILMVIDEO_DOCUMENTAIRE;\n break;\n case 'emissiontv':\n $category_id = self::CATEGORY_FILMVIDEO_EMISSIONTV;\n break;\n case 'film':\n $category_id = self::CATEGORY_FILMVIDEO_FILM;\n break;\n case 'serietv':\n $category_id = self::CATEGORY_FILMVIDEO_SERIETV;\n break;\n case 'spectacle':\n $category_id = self::CATEGORY_FILMVIDEO_SPECTACLE;\n break;\n case 'sport':\n $category_id = self::CATEGORY_FILMVIDEO_SPORT;\n break;\n case 'videoclips':\n $category_id = self::CATEGORY_FILMVIDEO_VIDEOCLIP;\n break;\n default:\n $category_id = self::CATEGORY_FILMVIDEO;\n break;\n }\n break;\n case 'audio':\n switch ($subcategory) {\n case 'karaoke':\n $category_id = self::CATEGORY_AUDIO_KARAOKE;\n break;\n case 'musique':\n $category_id = self::CATEGORY_AUDIO_MUSIQUE;\n break;\n case 'podcastradio':\n $category_id = self::CATEGORY_AUDIO_PODCASTRADIO;\n break;\n case 'samples':\n $category_id = self::CATEGORY_AUDIO_SAMPLES;\n break;\n default:\n $category_id = self::CATEGORY_AUDIO;\n break;\n }\n break;\n case 'application':\n switch ($subcategory) {\n case 'autre':\n $category_id = self::CATEGORY_APPLICATION_AUTRE;\n break;\n case 'formation':\n $category_id = self::CATEGORY_APPLICATION_FORMATION;\n break;\n case 'linux':\n $category_id = self::CATEGORY_APPLICATION_LINUX;\n break;\n case 'macos':\n $category_id = self::CATEGORY_APPLICATION_MACOS;\n break;\n case 'smartphone':\n $category_id = self::CATEGORY_APPLICATION_SMARTPHONE;\n break;\n case 'tablette':\n $category_id = self::CATEGORY_APPLICATION_TABLETTE;\n break;\n case 'windows':\n $category_id = self::CATEGORY_APPLICATION_WINDOWS;\n break;\n default:\n $category_id = self::CATEGORY_APPLICATION;\n break;\n }\n break;\n case 'jeuvideo':\n switch ($subcategory) {\n case 'autre':\n $category_id = self::CATEGORY_JEUVIDEO_AUTRE;\n break;\n case 'linux':\n $category_id = self::CATEGORY_JEUVIDEO_LINUX;\n break;\n case 'macos':\n $category_id = self::CATEGORY_JEUVIDEO_MACOS;\n break;\n case 'microsoft':\n $category_id = self::CATEGORY_JEUVIDEO_MICROSOFT;\n break;\n case 'nintendo':\n $category_id = self::CATEGORY_JEUVIDEO_NINTENDO;\n break;\n case 'smartphone':\n $category_id = self::CATEGORY_JEUVIDEO_SMARTPHONE;\n break;\n case 'sony':\n $category_id = self::CATEGORY_JEUVIDEO_SONY;\n break;\n case 'tablette':\n $category_id = self::CATEGORY_JEUVIDEO_TABLETTE;\n break;\n case 'windows':\n $category_id = self::CATEGORY_JEUVIDEO_WINDOWS;\n break;\n default:\n $category_id = self::CATEGORY_JEUVIDEO;\n break;\n }\n break;\n case 'ebook':\n switch ($subcategory) {\n case 'audio':\n $category_id = self::CATEGORY_EBOOK_AUDIO;\n break;\n case 'bds':\n $category_id = self::CATEGORY_EBOOK_BDS;\n break;\n case 'comics':\n $category_id = self::CATEGORY_EBOOK_COMICS;\n break;\n case 'livres':\n $category_id = self::CATEGORY_EBOOK_LIVRES;\n break;\n case 'mangas':\n $category_id = self::CATEGORY_EBOOK_MANGAS;\n break;\n case 'presse':\n $category_id = self::CATEGORY_EBOOK_PRESSE;\n break;\n default:\n $category_id = self::CATEGORY_EBOOK;\n break;\n }\n break;\n case 'emulation':\n switch ($subcategory) {\n case 'emulateurs':\n $category_id = self::CATEGORY_EMULATION_EMULATEURS;\n break;\n case 'roms':\n $category_id = self::CATEGORY_EMULATION_ROMS;\n break;\n default:\n $category_id = self::CATEGORY_EMULATION;\n break;\n }\n break;\n case 'gps':\n switch ($subcategory) {\n case 'applications':\n $category_id = self::CATEGORY_GPS_APPLICATIONS;\n break;\n case 'cartes':\n $category_id = self::CATEGORY_GPS_CARTES;\n break;\n case 'divers':\n $category_id = self::CATEGORY_GPS_DIVERS;\n break;\n default:\n $category_id = self::CATEGORY_GPS;\n break;\n }\n break;\n case 'xxx':\n switch ($subcategory) {\n case 'films':\n $category_id = self::CATEGORY_XXX_FILMS;\n break;\n case 'hentai':\n $category_id = self::CATEGORY_XXX_HENTAI;\n break;\n case 'images':\n $category_id = self::CATEGORY_XXX_IMAGES;\n break;\n default:\n $category_id = self::CATEGORY_XXX;\n break;\n }\n break;\n default:\n $category_id = false;\n break;\n }\n\n return $category_id;\n }", "public function transform($category)\n {\n if (null === $category) {\n return \"\";\n }\n \n return $category->getId();\n }", "function category($id_only=false) {\n\t\t\tif($id_only) {\n\t\t\t\treturn $id;\n\t\t\t}\n\t\t\treturn '//category stub';\n\t\t}", "private function getStoreCategoryId($storeGroupName)\n {\n if ($this->singleRootCategory) {\n return $this->getDefaultCategoryId();\n } else {\n //Generating category for store\n $category = $this->categoryFactory->create();\n $categoryPath = Category::TREE_ROOT_ID;\n $category->setName(\"Category \" . $storeGroupName)\n ->setPath($categoryPath)\n ->setLevel(1)\n ->setAvailableSortBy('name')\n ->setDefaultSortBy('name')\n ->setIsActive(true)\n ->save();\n return $category->getId();\n }\n }", "public function getWebCategoryID()\n {\n return $this->webCategoryID;\n }", "function getCategoryID($name){\r\n $query=\"SELECT id FROM categorias WHERE nombre='$name'\";\r\n $sql= mysqli_query($_SESSION['connection'], $query);\r\n $categoryID= mysqli_fetch_assoc($sql);\r\n return $categoryID['id'];\r\n }", "function selectCategory($cat) {\n global $catid;\n if (is_numeric($cat) ) {\n $catid = intval($cat);\n } else {\n $catid = getCatIDFromName($cat);\n }\n}", "function getCategory() {\n // Load categories.\n $categories = userpoints_get_categories();\n return isset($categories[$this->getTid()]) ? $categories[$this->getTid()] : $categories[userpoints_get_default_tid()];\n }", "public function category() {\n\t\treturn $this->get_category();\n\t}", "private function newId() {\n $exist_nums = App::getDb()->query('SELECT idCat FROM categories ORDER BY idCat');\n $exist_nums = $exist_nums->fetchAll(PDO::FETCH_OBJ);\n $new_id = 1;\n foreach($exist_nums as $nums) {\n if($nums->idCat != $new_id) break;\n $new_id++;\n }\n return $new_id;\n }", "public function get_category(){\n\t\treturn $this->category;\n\t}", "public function transform($category)\n {\n if (null === $category) {\n return '';\n }\n return $category->getId();\n }", "public function get_category()\n {\n return C__CATG__INVOICE;\n }", "public function getGroupByPage() {}", "public static function getCategory()\n {\n return self::$category;\n }", "function get_contentgroup_id()\n\t{\n\t\treturn $this->contentgroup_id;\n\t}", "function getCodigoCategoria()\n {\n return $this->CodigoCategoria;\n }", "public function getCategory()\n {\n\t\treturn self::$categories[ $this->category ];\n }", "public function getCategory()\n\t{\n\t\treturn $this->data['category'];\n\t}", "function getCategory()\r\n\t\t{\r\n\t\t\treturn $this->category;\r\n\t\t\t\r\n\t\t}", "public function getReportCategoryId() : Uuid {\n\t\treturn($this->reportCategoryId);\n\t}", "public function getCategory() {\n return $this->category;\n }", "function sportal_category()\n{\n\tglobal $smcFunc, $context, $scripturl, $modSettings, $txt;\n\n\tloadTemplate('PortalCategories');\n\n\t$category_id = !empty($_REQUEST['category']) ? $_REQUEST['category'] : 0;\n\n\t$context['category'] = sportal_get_categories($category_id, true, true);\n\n\tif (empty($context['category']['id']))\n\t\tfatal_lang_error('error_sp_category_not_found', false);\n\n\t$request = $smcFunc['db_query']('','\n\t\tSELECT COUNT(*)\n\t\tFROM {db_prefix}sp_articles\n\t\tWHERE status = {int:article_status}\n\t\t\tAND {raw:article_permissions}\n\t\t\tAND id_category = {int:current_category}\n\t\tLIMIT {int:limit}',\n\t\tarray(\n\t\t\t'article_status' => 1,\n\t\t\t'article_permissions' => sprintf($context['SPortal']['permissions']['query'], 'permissions'),\n\t\t\t'current_category' => $context['category']['id'],\n\t\t\t'limit' => 1,\n\t\t)\n\t);\n\tlist ($total_articles) = $smcFunc['db_fetch_row']($request);\n\t$smcFunc['db_free_result']($request);\n\n\t$per_page = min($total_articles, !empty($modSettings['sp_articles_per_page']) ? $modSettings['sp_articles_per_page'] : 10);\n\t$start = !empty($_REQUEST['start']) ? (int) $_REQUEST['start'] : 0;\n\t$total_pages = $per_page > 0 ? ceil($total_articles / $per_page) : 0;\n\t$current_page = $per_page > 0 ? ceil($start / $per_page) : 0;\n\n\tif ($total_articles > $per_page)\n\t{\n\t\t$context['page_index'] = constructPageIndex($context['category']['href'] . ';start=%1$d', $start, $total_articles, $per_page, true);\n\n\t\tif ($current_page > 0)\n\t\t\t$context['previous_start'] = ($current_page - 1) * $per_page;\n\t\tif ($current_page < $total_pages - 1)\n\t\t\t$context['next_start'] = ($current_page + 1) * $per_page;\n\t}\n\n\t$context['articles'] = sportal_get_articles(0, true, true, 'spa.id_article DESC', $context['category']['id'], $per_page, $start);\n\n\tforeach ($context['articles'] as $article)\n\t{\n\t\tif (($cutoff = $smcFunc['strpos']($article['body'], '[cutoff]')) !== false)\n\t\t\t$article['body'] = $smcFunc['substr']($article['body'], 0, $cutoff);\n\n\t\t$context['articles'][$article['id']]['preview'] = parse_bbc($article['body']);\n\t\t$context['articles'][$article['id']]['date'] = timeformat($article['date']);\n\t}\n\n\t$context['linktree'][] = array(\n\t\t'url' => $scripturl . '?category=' . $context['category']['category_id'],\n\t\t'name' => $context['category']['name'],\n\t);\n\n\t$context['page_title'] = $context['category']['name'];\n\t$context['sub_template'] = 'view_category';\n}", "private function getLastVisitedCategoryId()\n {\n $categoryId = $this->catalogSession->getLastVisitedCategoryId();\n if (!$categoryId) {\n /** @var \\Magento\\Catalog\\Model\\Category $category */\n $category = $this->registry->registry('current_category');\n $categoryId = null;\n if ($category instanceof \\Magento\\Catalog\\Model\\Category) {\n $categoryId = $category->getCategoryId();\n }\n }\n\n return $categoryId;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory() {}", "function getCategory() {\n\t\t$categoryId = JRequest::getInt('category_id', 0) ;\n\t\t$sql = 'SELECT * FROM #__eb_categories WHERE id='.$categoryId;\n\t\t$this->_db->setQuery($sql) ;\n\t\treturn $this->_db->loadObject();\t\t\t\n\t}", "private function createGroup() {\n $query = \"\n SELECT (MAX(id) + 1) AS id\n FROM tags_group\";\n\n $result = $this->db->query($query)->fetch_assoc();\n $id = intval($result['id']);\n\n return $id;\n }", "function theme_moove_get_course_category($id){\n\n global $DB;\n\n $sql_query = \"SELECT category\n FROM {course}\n WHERE id = $id\";\n\n $categoryid = $DB->get_record_sql($sql_query)->category;\n\n return $categoryid;\n }", "function the_category_ID($display = \\true)\n {\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->_category;\n }" ]
[ "0.6877269", "0.6877269", "0.6877269", "0.6869199", "0.67473316", "0.6739292", "0.6646153", "0.6641393", "0.6587911", "0.65361965", "0.6514581", "0.6487603", "0.64832276", "0.6472671", "0.6440256", "0.6411691", "0.6372353", "0.63343024", "0.63283277", "0.63283277", "0.6320431", "0.6320276", "0.6319864", "0.627677", "0.6256797", "0.6215033", "0.6215033", "0.62138975", "0.61928177", "0.61780745", "0.6161771", "0.61422735", "0.6141806", "0.6137885", "0.6117461", "0.6115833", "0.61085993", "0.6103141", "0.6074746", "0.60499537", "0.60439277", "0.60105616", "0.5989791", "0.5976086", "0.5959171", "0.5944502", "0.59274685", "0.5924308", "0.5859047", "0.5851716", "0.5845005", "0.5841366", "0.58246136", "0.5819424", "0.58076066", "0.5792267", "0.5778328", "0.57727605", "0.5771997", "0.5770595", "0.5764023", "0.5758999", "0.5753509", "0.5748298", "0.57472837", "0.57455903", "0.57286227", "0.5714995", "0.56948715", "0.56932867", "0.5690787", "0.5689738", "0.56895196", "0.5672414", "0.56701225", "0.5666977", "0.56646144", "0.56646144", "0.5664271", "0.566181", "0.5659776", "0.5649911", "0.56497544", "0.5645432", "0.5645432", "0.5645432", "0.5645432", "0.5645432", "0.5645432", "0.5645432", "0.5645432", "0.5645432", "0.5645432", "0.5645432", "0.5645432", "0.5645432", "0.5645432", "0.5645432", "0.5645432", "0.56326354" ]
0.6277783
23
Get the Grouping page Accessory
public function getAccessory() { return $this->accessory; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getGroupByPage() {}", "public function getAccessory()\n {\n return $this->get(self::_ACCESSORY);\n }", "function getGroupPerPage() {\n\t\treturn @$_SESSION[EWRPT_PROJECT_VAR . \"_\" . $this->TableVar . \"_grpperpage\"];\n\t}", "function getGroupPerPage() {\n\t\treturn @$_SESSION[EWRPT_PROJECT_VAR . \"_\" . $this->TableVar . \"_grpperpage\"];\n\t}", "public function getGroup();", "public function getGroup();", "public function getGroup();", "function getGroup() ;", "public abstract function getGroup();", "static function get_apigroup();", "public function getGroup() {}", "public function getGroup() {}", "public function getGroup() {}", "public function getGroup() {}", "public function getDashboardGroups(): array;", "function groups_with_module_access()\n {\n \tif ( ! isset($this->cache['member_groups_with_access'] ))\n\t\t{\n\t\t\t$r = array();\n\n\t\t\tee()->db->select( 'modules.module_id, module_member_groups.group_id' );\n\t\t\tee()->db->where( 'LOWER('.ee()->db->dbprefix.'modules.module_name)', TAXONOMY_SHORT_NAME );\n\t\t\tee()->db->join( 'module_member_groups', 'module_member_groups.module_id = modules.module_id' );\n\t\t\t$groups = ee()->db->get('modules')->result_array();\n\n\t\t\tforeach ($groups as $group)\n\t\t\t{\n\t\t\t\t$r[] = $group['group_id'];\n\t\t\t}\n\n\t\t\t$this->cache['member_groups_with_access'] = $r;\n\n\t\t}\n\n\t\treturn $this->cache['member_groups_with_access'];\n }", "public function getGroup ()\n {\n return $this->getObject();\n }", "public function navGroup() {\n return $this->app[\"config\"]->get(\"laravel-admin::nav_group\");\n }", "abstract public function getPanelGroup();", "public function getGroups() {}", "public function index()\n {\n return Auth::user()->groups()->orderBy('order')->get();\n }", "public function groupAccessLevel(){\n\t\n\t global $db;\n\t \n\t #see if user is guest, if so, they have zero-level access.\n\t\tif($this->user == \"guest\"){\n\t\t $getAccessLevel = 0;\n\t\t return($getAccessLevel);\n\t\t}else{\n\t \t$db->SQL = \"SELECT Level FROM ebb_groups where id='\".$this->gid.\"' LIMIT 1\";\n\t\t\t$getAccessLevel = $db->fetchResults();\n\n\t\t\treturn($getAccessLevel['Level']);\n\t\t}\n\t}", "public function getGroups();", "public function getGroups();", "public function index()\n {\n $paginationLength = pagination_length(PermissionGroup::class);\n $permissionGroups = PermissionGroup::paginate($paginationLength);\n return PermissionGroupResource::collection($permissionGroups);\n }", "public function getGroupObject() {\n return $this->groups[0];\n }", "function getGroupIndex() {\n return $this->group_index;\n }", "public function index()\n {\n $this->authorize('viewAny', [Group::class]);\n return Group::with('modality', 'formationProgram', 'formationProgram.formationProgramType')->get();\n }", "public function index()\n {\n return IslandGroupResource::collection(IslandGroup::all());\n }", "public function examgroup() {\n return $this->_examgroup;\n }", "public function getShowGroups(): array;", "public function index()\n {\n $groups = Group::searchable()->paginate();\n\n return GroupResource::collection($groups);\n }", "public function getGroupsList(){\n return $this->_get(1);\n }", "public function getGroupsList(){\n return $this->_get(3);\n }", "public function getAuthorizables()\n {\n return $this->groups;\n }", "abstract protected function getGroupStructure();", "public function getGroupProfile(){\n\n\t global $db;\n\t \n\t #see if user is guest, if so, set profile to zero-level access.\n\t\tif($this->user == \"guest\"){\n\t\t\t$getAccessLevel = 0;\n\t\t\t\n\t\t\treturn($getAccessLevel);\n\t\t}else{\n\t \t$db->SQL = \"SELECT permission_type FROM ebb_groups where id='\".$this->gid.\"' LIMIT 1\";\n\t\t\t$getAccessLevel = $db->fetchResults();\n\n\t\t\treturn($getAccessLevel['permission_type']);\n\t\t}\n\t}", "function index($page = 0)\n\t{\n\t\t$this->auth->restrict('groups.view');\n\t\t\n\t\t$filter = $this->input->get(NULL, TRUE);\n\t\t$filter['pp'] = element('pp', $filter, 10);\n\t\t\n\t\t$this->load->library('pagination');\n\t\t$config = array(\n\t\t\t'base_url' => site_url('groups/index'),\n\t\t\t'total_rows' => $this->groups_model->count_all(),\n\t\t\t'per_page' => $filter['pp'],\n\t\t\t'uri_segment' => 3,\n\t\t);\n\t\t$this->pagination->initialize($config);\n\t\t\n\t\t$this->users_model->set_filter($filter);\n\t\t$this->users_model->order_by('g_name', 'asc');\n\t\t$this->users_model->limit($config['per_page'], $page);\n\t\t\n\t\t$this->data['filter'] = $filter;\n\t\t$this->data['groups'] = $this->groups_model->get_all();\n\t\t\n\t\t$this->layout->set_js('views/groups/index');\n\t\t\n\t\t$this->layout->set_title(lang('configure_groups'));\n\t\t$this->data['subnav_active'] = 'groups';\n\t}", "public function getGroups(): array;", "public function findGroups() {\n\t\t\n\t}", "public function getGroupsList(){\n return $this->_get(4);\n }", "public function getGroupsList(){\n return $this->_get(4);\n }", "public function getEavGroup() {\n return $this->objectManager->get ( 'Magento\\Eav\\Model\\Entity\\Attribute\\Group' )->getCollection ();\n }", "public function currentGroup();", "public function &getGroupBy();", "function index( $page = 0 )\n{\n$this->model_group->pagination( TRUE );\n$data_info = $this->model_group->lister( $page );\n$fields = $this->model_group->fields( TRUE );\n\n$this->template->assign( 'pager', $this->model_group->pager );\n$this->template->assign( 'group_fields', $fields );\n$this->template->assign( 'group_data', $data_info );\n$this->template->assign( 'table_name', 'group' );\n$this->template->assign( 'template', 'list_group' );\n$this->template->display( 'frame_admin.tpl' );\n}", "function getGroup() {\n\n\tglobal $db;\n\treturn $db->getGroup ( $GLOBALS [\"targetId\"] );\n\n}", "public function getAccessGroups()\n\t{\n\t\t//create QueryBuilder\n\t\t$queryBuilder = $this->entityManager->createQueryBuilder();\n\n\t\t//create query\n\t\t$queryBuilder->select(\"g\");\n\t\t$queryBuilder->from(\"yourCMDB:CmdbAccessGroup\", \"g\");\n\n\t\t//get results\n\t\t$query = $queryBuilder->getQuery();\n\t\t$groups = $query->getResult();\n\n\t\t//return\n\t\treturn $groups;\n\t}", "public function &onGroupAreas()\n\t{\n\t\t$area = array(\n\t\t\t'name' => $this->_name,\n\t\t\t'title' => Lang::txt('PLG_GROUPS_ACTIVITY'),\n\t\t\t'default_access' => $this->params->get('plugin_access', 'members'),\n\t\t\t'display_menu_tab' => $this->params->get('display_tab', 1),\n\t\t\t'icon' => 'f056'\n\t\t);\n\t\treturn $area;\n\t}", "public function index()\n {\n return Group::all()->toArray();\n }", "public function groups(){\n $interestId = request()->interest;\n $interest = Interest::find($interestId);\n if($interest){\n $groups = $interest->groups;\n $groupResource = GroupResource::collection($groups);\n return $groupResource;\n }\n else{\n $response = new Response(['response'=>'This interest does not exist !!..']);\n return $response->setStatusCode(404);\n }\n }", "function getGroup() {\n \n return null;\n \n }", "function getPageAccess($pageName)\r\n{\r\n\t$db = connectToDB();\r\n\t\r\n\t$sql = \"SELECT GROUP_CONCAT(group_id) as d FROM `api_page_access` WHERE page_name = '$pageName'\";\r\n\t\r\n\t$res = $db->query($sql);\r\n\t\r\n\t$row = $res->fetch_array();\r\n\t\r\n\t$data = $row['d'];\r\n\t\r\n\treturn explode(\",\", $data);\r\n}", "public function groups();", "public function groups();", "public function getGroups($page=null, $per_page=null){\n return Group::all($page, $per_page);\n\t\t\n }", "public function index()\n {\n return Group::latest()->paginate(10);\n }", "public function index()\n {\n //\n if(Auth::user()->hasRole('superadministrator')){\n $groups = Group::paginate(10);\n }else{\n $groups = Group::where('owner_client_id', Auth::user()->id)->paginate(10);\n }\n return view('manage.groups.index')->withGroups($groups);\n }", "public function get_configcustindexgroupby() {\n return DplusWire::wire('pages')->get('/config/customer/')->group_custindexby->title;\n }", "public function index()\n {\n \n if (\\Gate::allows('isAdminOrMerchant')) { \n return AttributeGroup::latest()->where('merchant_id',Auth::user()->userable_id)->paginate(10);\n } \n \n }", "public static function getAccessGroups()\n\t{\n\t\t/*\n\t\t$ug = Usergroup::all();\n\t\t$options = $ug\n\t\t\t->select('a.id', 'value')\n\t\t\t->select('a.title', 'text')\n\t\t\t->select('b.id', 'level', true)\n\t\t\t->from($ug->getTableName(), 'a')\n\t\t\t->joinRaw($ug->getTableName() . ' AS b', 'a.lft > b.lft AND a.rgt < b.rgt', 'left')\n\t\t\t->group('a.id')\n\t\t\t->group('a.title')\n\t\t\t->group('a.lft')\n\t\t\t->group('a.rgt')\n\t\t\t->order('a.lft', 'asc')\n\t\t\t->rows();\n\t\t*/\n\n\t\t$db = \\App::get('db');\n\t\t$db->setQuery(\n\t\t\t'SELECT a.id AS value, a.title AS text, COUNT(DISTINCT b.id) AS level' .\n\t\t\t' FROM #__usergroups AS a' .\n\t\t\t' LEFT JOIN '.$db->quoteName('#__usergroups').' AS b ON a.lft > b.lft AND a.rgt < b.rgt' .\n\t\t\t' GROUP BY a.id, a.title, a.lft, a.rgt' .\n\t\t\t' ORDER BY a.lft ASC'\n\t\t);\n\t\t$options = $db->loadObjectList();\n\n\t\t// Check for a database error.\n\t\tif ($db->getErrorNum())\n\t\t{\n\t\t\tthrow new \\Exception($db->getErrorMsg(), 500);\n\t\t\treturn null;\n\t\t}\n\n\t\tforeach ($options as &$option)\n\t\t{\n\t\t\t//$option->set('text', str_repeat('- ', $option->get('level')) . $option->get('text'));\n\t\t\t$option->text = str_repeat('- ', $option->level) . $option->text;\n\t\t}\n\n\t\treturn $options;\n\t}", "public function getGroup()\n\t{\n\t return $this->groupService->getGroup($this->ownerid);\n\t}", "function tp_is_group_page() {\n\n\tif ($group = page_owner_entity()) {\n\t\tif ($group instanceof ElggGroup)\n\t\t\treturn true;\n\t}\n\n\treturn false;\n}", "public function index()\n {\n //\n return static::getGroupsData();\n }", "public function getGroup()\n {\n $this->getParam('group');\n }", "public function index()\n {\n return view('groups.index' , ['groups' => Auth::user()->groups()->paginate(10)]);\n }", "public function getGroup()\n {\n //Note: group parts are not \"named\" so it's all or nothing\n return $this->_get('_group');\n }", "public function group(): BelongsTo\n {\n return $this->belongsTo($this->aclPermissionsGroupModel());\n }", "protected function getGroupList() {}", "protected function getGroupList() {}", "function &getAll()\n {\n $this->dbInit();\n $group_array = 0;\n\n $this->Database->array_query( $group_array, \"SELECT * FROM eZLink_Link ORDER BY Title\" );\n\n return $group_array;\n }", "function group_get_menu_tabs() {\n global $USER;\n static $menu;\n\t\n $group = group_current_group();\n if (!$group) {\n return null;\n }\n\t\n\t//Start-Anusha\n\tif($group->outcome){\n\t\t$groupmem = get_record('group_member','member',$USER->get('id'),'group',$group->id);\n\t}\n\t//End-Anusha\n\t\n\t//Start-Eshwari\n\tif($group->courseoutcome){\n\t\t$groupcoursemem = get_record('group_member','member',$USER->get('id'),'group',$group->id);\n\t}\n\t\n\t//End-Eshwari\n\t//Start-Eshwari\n\t\n\tif($group->courseoffering){\n\t\t$groupofferingmem = get_record('group_member','member',$USER->get('id'),'group',$group->id);\n\t}\n\t\n\t/*\n $menu = array(\n 'info' => array(\n 'path' => 'coursetemplate/info',\n 'url' => 'coursetemplate/view.php?id='.$group->id,\n\n 'title' => 'About',\n 'weight' => 20\n ),\n\t);\n\t*/\n\t//End-Eshwari\n\t $menu = array(\n 'info' => array(\n 'path' => 'groups/info',\n 'url' => 'group/view.php?id='.$group->id,\n 'title' => get_string('About', 'group'),\n\n\n 'weight' => 20\n ),\n\t);\n//Start-Anusha\n\tif($groupmem){\n\t\tif($groupmem->role != \"member\"){\n\t\t\t$menu['members'] = array(\n\t\t\t\t'path' => 'groups/members',\n\t\t\t\t'url' => 'group/members.php?id='.$group->id,\n\t\t\t\t'title' => get_string('Members', 'group'),\n\t\t\t\t'weight' => 30\n\t\t\t);\t\n\t\t}\n\t}else{\n//End-Anusha\n\t\t$menu['members'] = array(\n\t\t\t\t'path' => 'groups/members',\n\t\t\t\t'url' => 'group/members.php?id='.$group->id,\n\t\t\t\t'title' => get_string('Members', 'group'),\n\t\t\t\t'weight' => 30\n\t\t);\n//Start-Anusha\n\t}\n\t//Start-Eshwari \n\t\n\tif($groupcoursemem){\n\t\tif($groupcoursemem->role != \"member\"){\n\t\t\t$menu['members'] = array(\n\t\t\t\t'path' => 'groups/members',\n\t\t\t\t'url' => 'group/members.php?id='.$group->id,\n\t\t\t\t'title' => get_string('Members', 'group'),\n\t\t\t\t'weight' => 30\n\t\t\t);\t\n\t\t}\n\t}else{\n\n\t\t$menu['members'] = array(\n\n\t\t\t\t'path' => 'groups/members',\n\t\t\t\t'url' => 'group/members.php?id='.$group->id,\n\t\t\t\t'title' => get_string('Members', 'group'),\n\t\t\t\t'weight' => 30\n\t\t);\n\n\t}\n\t\n\tif($groupofferingmem){\n\t\tif($groupofferingmem->role != \"member\"){\n\t\t\t$menu['members'] = array(\n\t\t\t\t'path' => 'groups/members',\n\t\t\t\t'url' => 'group/members.php?id='.$group->id,\n\t\t\t\t'title' => get_string('Members', 'group'),\n\t\t\t\t'weight' => 30\n\t\t\t);\t\n\t\t}\n\t}else{\n\n\t\t$menu['members'] = array(\n\n\t\t\t\t'path' => 'groups/members',\n\t\t\t\t'url' => 'group/members.php?id='.$group->id,\n\t\t\t\t'title' => get_string('Members', 'group'),\n\t\t\t\t'weight' => 30\n\t\t);\n\n\t}\n\t\n\t\n\t//End-Eshwari\n\t/*\n\t//Start of subgroup logic by Shashank\n\t$menu['subgroups'] = array(\n\t\t\t\t'path' => 'coursetemplate/subgroups',\n\t\t\t\t'url' => 'coursetemplate/subgroups.php?id='.$group->id,\n\t\t\t\t'title' => 'Sub Template',\n\t\t\t\t'weight' => 35\n\t\t);\n\t//End of subgroup logic by Shashank\n\t*/\n\t//Start of subgroup logic by Shashank\n\t$menu['subgroups'] = array(\n\t\t\t\t'path' => 'groups/subgroups',\n\t\t\t\t'url' => 'group/subgroups.php?id='.$group->id,\n\t\t\t\t'title' => 'Sub Groups',\n\t\t\t\t'weight' => 35\n\t\t);\n//End of subgroup logic by Shashank\n//End-Anusha\t\n if ($group->public || group_user_access($group->id)) {\n $menu['forums'] = array( // @todo: get this from a function in the interaction plugin (or better, make forums an artefact plugin)\n 'path' => 'groups/forums',\n 'url' => 'interaction/forum/index.php?group='.$group->id,\n 'title' => get_string('nameplural', 'interaction.forum'),\n 'weight' => 40,\n );\n }\n\t/*\n $menu['views'] = array(\n 'path' => 'coursetemplate/views',\n 'url' => 'view/groupviews.php?group='.$group->id,\n\n 'title' => 'Views',\n 'weight' => 50,\n );\n\t*/\n\t $menu['views'] = array(\n 'path' => 'groups/views',\n 'url' => 'view/groupviews.php?group='.$group->id,\n 'title' => get_string('Views', 'group'),\n\n\n 'weight' => 50,\n );\n//Start-Anusha\nif($group->outcome){\n $menu['outcome'] = array(\n 'path' => 'groups/outcomes',\n 'url' => 'group/groupoutcome.php?group='.$group->id,\n 'title' => 'Outcome Results',\n 'weight' => 60,\n );\n}\n//End-Anusha\n//Start-Eshwari\n\nif($group->courseoutcome){\n $menu['courseoutcome'] = array(\n 'path' => 'groups/courseofferings',\n 'url' => 'group/groupcourseoffering.php?group='.$group->id,\n 'title' => 'Course offering Outcome Results',\n 'weight' => 60,\n );\n}\n//End-Eshwari\n\n\n if (group_user_access($group->id)) {\n safe_require('grouptype', $group->grouptype);\n $artefactplugins = call_static_method('GroupType' . $group->grouptype, 'get_group_artefact_plugins');\n if ($plugins = get_records_array('artefact_installed', 'active', 1)) {\n foreach ($plugins as &$plugin) {\n if (!in_array($plugin->name, $artefactplugins)) {\n continue;\n }\n safe_require('artefact', $plugin->name);\n $plugin_menu = call_static_method(generate_class_name('artefact',$plugin->name), 'group_tabs', $group->id);\n $menu = array_merge($menu, $plugin_menu);\n }\n }\n }\n\n if (defined('MENUITEM')) {\n $key = substr(MENUITEM, strlen('groups/'));\n if ($key && isset($menu[$key])) {\n $menu[$key]['selected'] = true;\n }\n }\n\n return $menu;\n}", "function DetermineTabs () {\n global $zLOCALUSER;\n\n // Currently logged in user is an editor.\n if ($this->CheckEditorAccess()) return (\"owner\");\n\n if ($this->CheckViewAccess()) {\n // Group is public\n $returntab = \"public\";\n } else {\n // Group is private, hide everything from non-members except for info.\n $returntab = \"private\";\n } // if\n\n return ($returntab);\n\n }", "public function getAccessionsList(){\n return $this->_get(2);\n }", "public function getAccessionsList(){\n return $this->_get(2);\n }", "abstract protected function getGroupList() ;", "public function onItemgroup(){\n\t\t$sql = \"SELECT * FROM `itemgroup` WHERE `status` = 'ON'\";\n\t\t$query = $this->execute($sql);\n\t\tif($query){\n\t\t\treturn $query;\n\t\t}\n\t}", "public function fetchGroupData() {}", "public function fetchGroupData() {}", "public function getDetails($group = 'default') {\n return $this->getPagerArray($group);\n }", "public function getCollapsedGroups()\n\t{\n\t\treturn $_SESSION[\"main.ui.grid\"][$this->grid_id][\"collapsed_groups\"];\n\t}", "function sumo_get_user_accesspoints($id=NULL, $html=FALSE)\n{\n\tif($id)\n\t{\n\t\tGLOBAL $SUMO, $language;\n\n\t\t$user_data = sumo_get_user_info($id, 'id', FALSE);\n\t\t$num_groups = count($user_data['group']);\n\t\t$group_query = '';\n\n\t\tif(!in_array('sumo', $user_data['group']))\n\t\t{\n\t\t\t$group_query = \" WHERE \";\n\n\t\t\tfor($g=0; $g<$num_groups; $g++)\n\t\t\t{\n\t\t\t\t$group_query .= \"usergroup='\".$user_data['group'][$g].\"' OR\n\t\t\t\t\t\t\t usergroup LIKE '\".$user_data['group'][$g].\";%' OR\n\t\t\t\t\t\t\t usergroup LIKE '%;\".$user_data['group'][$g].\";%'\";\n\n\t\t\t\tif($g < $num_groups-1) $group_query .= \" OR \";\n\t\t\t}\n\t\t}\n\n\t\t$query = \"SELECT * FROM \".SUMO_TABLE_ACCESSPOINTS.\"\n\t\t\t\t \".$group_query.\"\n\t\t\t\t ORDER BY name\";\n\n\t\t$rs = $SUMO['DB']->Execute($query);\n\n\t\t$ap = array();\n\n\t\twhile($tab = $rs->FetchRow())\n\t\t{\n\t\t\t$ap[] = $tab;\n\t\t}\n\n\t\t// html output\n\t\tif($html)\n\t\t{\n\t\t\tif(in_array('sumo', $user_data['group'])) return $language['AllAccessPoints'];\n\n\t\t\t$list \t= '';\n\t\t\t$num_ap = count($ap);\n\n\t\t\tif($num_ap > 0)\n\t\t\t{\n\t\t\t\t$list = \"<table cellspacing='0' class='tab'>\\n\"\n\t\t\t\t\t\t.\" <tr>\\n\"\n\t\t\t\t\t\t.\" <td class='tab-title'>\".$language['Page'].\"</td>\\n\"\n\t\t\t\t\t\t.\" <td class='tab-title'>\".$language['Path'].\"</td>\\n\"\n\t\t\t\t\t\t//.\" <td class='tab-title'>\".$language['Group'].\"</td>\\n\"\n\t\t\t\t\t\t.\" </tr>\\n\";\n\n\t\t\t\tfor($p=0; $p<$num_ap; $p++)\n\t\t\t\t{\n\t\t\t\t\t$style = sumo_alternate_str('tab-row-on', 'tab-row-off');\n\n\t\t\t\t\t// Format group string to display it\n\t\t\t\t\t$group = preg_replace(\"/sumo:7/\", \"<b><font color='#BB0000'>sumo:7</font></b>\", $ap[$p]['usergroup']);\n\t\t\t\t\t$group = preg_replace(\"/sumo:/\", \"<font color='#BB0000'>sumo</font>:\", $group);\n\t\t\t\t\t$group = str_replace(';', '; ', $group);\n\t\t\t\t\t$group = strlen(strip_tags($group)) > 50 ? substr($group, 0, 50).'...' : $group;\n\n\t\t\t\t\t// Format path string to display it\n\t\t\t\t\t$path = strlen($ap[$p]['path']) > 50 ? substr($ap[$p]['path'], 0, 50).'...' : $ap[$p]['path'];\n\t\t\t\t\t$path = \"<a href='\".$ap[$p]['path'].\"' target='_blank'>\".$path.\"</a>\";\n\t\t\t\t\t$name = sumo_get_accesspoint_name($ap[$p]['name'], $_COOKIE['language']);\n\n\t\t\t\t\t$list .= \"<tr>\\n\"\n\t\t\t\t\t\t\t.\" <td class='\".$style.\"'>\".$name.\"</td>\\n\"\n\t\t\t\t\t\t\t.\" <td class='\".$style.\"'>\".$path.\"</td>\\n\"\n\t\t\t\t\t\t\t//.\" <td class='\".$style.\"'>\".$group.\"</td>\\n\"\n\t\t\t\t\t\t\t.\"</tr>\\n\";\n\t\t\t\t}\n\n\t\t\t\t$list .= \"</table>\";\n\t\t\t}\n\n\t\t\t$ap = $list;\n\t\t}\n\n\t\treturn $ap;\n\t}\n\telse return FALSE;\n}", "public function index() {\n\t\t$data = Group::get()->map( function ( $s ) {\n\t\t\treturn [\n\t\t\t\t'id' => $s->id,\n\t\t\t\t'name' => $s->getShortName(),\n\t\t\t\t'content' => $s->getShortContent(),\n\t\t\t\t'created_at' => $s->created_at_formatted,\n\t\t\t\t'created_at_time' => $s->created_at_time,\n\t\t\t\t'active' => $s->getActiveFullResponse()\n\t\t\t];\n\t\t} );\n\n\t\t$this->page->response = $data;\n\t\t$this->page->create_option = 1;\n\t\treturn view('pages.settings.parts.groups.index' )\n\t\t\t->with( 'Page', $this->page );\n\t}", "public function getIndex() {\n\t\t$title = Lang::get('admin/navigation/title.navigation_group_management');\n\t\t$navigationGroups = $this -> navigationGroup -> all();\n\n\t\treturn View::make('admin/navigationgroups/index', compact('title', 'navigationGroups'));\n\t}", "public function group()\n {\n\n \treturn $this-> belongsTo(Group::class);\n }", "public function getSectionGroupsUrl()\n {\n return $this->getProperty(\"SectionGroupsUrl\");\n }", "public function index()\n {\n hasPermission('View Permission Groups');\n\n return view('jawad_permission_uuid::permissionGroup.index');\n }", "public function getGroupByAccount()\n {\n return $this->getProperty('groupByAccount');\n }", "public function getDetails($group_id);", "public static function bygroup()\r\n {\r\n if(!self::user()->hasPerm('users_membership'))\r\n \\CAT\\Helper\\Json::printError('You are not allowed for the requested action!');\r\n $id = self::router()->getParam();\r\n $data = \\CAT\\Groups::getInstance()->getMembers($id);\r\n if(self::asJSON())\r\n {\r\n echo header('Content-Type: application/json');\r\n echo json_encode($data,true);\r\n return;\r\n }\r\n }", "function groups() {\n\t\t$this->validate();\n\t\t$this->setupTemplate();\n\n\t\t$journal =& Request::getJournal();\n\n\t\t$rangeInfo =& $this->getRangeInfo('groups');\n\n\t\t$groupDao =& DAORegistry::getDAO('GroupDAO');\n\t\t$groups =& $groupDao->getGroups(ASSOC_TYPE_JOURNAL, $journal->getId(), null, $rangeInfo);\n\n\t\t$templateMgr =& TemplateManager::getManager();\n\t\t$templateMgr->addJavaScript('lib/pkp/js/lib/jquery/plugins/jquery.tablednd.js');\n\t\t$templateMgr->addJavaScript('lib/pkp/js/functions/tablednd.js');\n\t\t$templateMgr->assign_by_ref('groups', $groups);\n\t\t$templateMgr->assign('boardEnabled', $journal->getSetting('boardEnabled'));\n\t\t$templateMgr->display('manager/groups/groups.tpl');\n\t}", "function &getGroup() {\n\t\treturn $this->Group;\n\t}", "public function retrieveGroups()\n {\n return $this->start()->uri(\"/api/group\")\n ->get()\n ->go();\n }", "public static function getGroup(){\n\t\treturn FW_DAO_UserGroup::getInstance();\n\t}", "public function list()\n {\n\n $this->authorize('view', Group::class);\n\n $groups = Auth::user()->groups;\n\n return view('pages.groups_list', [\n 'groups' => $groups\n ]);\n }", "function pagination()\n {\n $qgroups = $this->db->query(\"SELECT COUNT(id) AS total FROM groups WHERE id_user='\".$this->general->id_user().\"'\");\n return $qgroups->row()->total;\n }", "public function index()\n\t{\n\t\t//\n\t\t$group = admin_group::all();\n\t\t\n\t\treturn view('admin.auth.group.index',['ret' => $group]);\n\t}", "public function group() {\n\t\treturn $this->belongsTo('Group');\n\t}", "protected function AdminPage() {\n\t$oMenu = fcApp::Me()->GetHeaderMenu();\n\t\n\t\t\t // ($sGroupKey,$sKeyValue=TRUE,$sDispOff=NULL,$sDispOn=NULL,$sPopup=NULL)\n $oMenu->SetNode($ol = new fcMenuOptionLink('show','all','show all',NULL,'show inactive as well as active'));\n\t $doAll = $ol->GetIsSelected();\n \n\tif ($doAll) {\n\t $rs = $this->SelectRecords(NULL,'Sort');\n\t} else {\n\t $rs = $this->ActiveRecords();\n\t}\n\treturn $rs->AdminRows();\n }", "public function getContent()\n\t\t{\n\t\t\treturn $this->getGroup();\n\t\t\t\n\t\t}" ]
[ "0.70130825", "0.6479401", "0.61660874", "0.61660874", "0.6115554", "0.6115554", "0.6115554", "0.6056581", "0.60327446", "0.59312266", "0.58807975", "0.58807975", "0.58807975", "0.58807975", "0.58766025", "0.5823107", "0.58139807", "0.58108073", "0.5810462", "0.57558316", "0.5704139", "0.57006544", "0.56455344", "0.56455344", "0.5635111", "0.5620851", "0.5580425", "0.55725974", "0.55688006", "0.55249614", "0.5520193", "0.5515206", "0.55055463", "0.5501001", "0.5498517", "0.5485653", "0.5475473", "0.5469472", "0.5467714", "0.5467454", "0.54659367", "0.54659367", "0.546576", "0.54362255", "0.5433014", "0.54307014", "0.540944", "0.5406521", "0.5406495", "0.54053843", "0.54029757", "0.53971577", "0.53969437", "0.53933823", "0.53933823", "0.5391732", "0.53877", "0.53762513", "0.534856", "0.53483915", "0.53420967", "0.5341102", "0.53371125", "0.5335602", "0.5326759", "0.5326605", "0.5321313", "0.53209823", "0.5307311", "0.5307311", "0.52702606", "0.5266005", "0.524796", "0.52421224", "0.52421224", "0.521631", "0.5190962", "0.5186648", "0.5186648", "0.5184092", "0.51810735", "0.5178564", "0.5174749", "0.5172614", "0.5168651", "0.5166985", "0.51647806", "0.51627415", "0.5155443", "0.5155018", "0.51499104", "0.51494855", "0.5145563", "0.51380885", "0.51353455", "0.51308924", "0.51291484", "0.51273453", "0.5127198", "0.5126711" ]
0.6040952
8
Get the Grouping page image description
public function getDescriptionImage() { return $this->descriptionImage; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_description()\n {\n return 'Populate your image of the day gallery with 40 LOLCAT images. After installing the addon select the image of the day in the usual way by going to Admin zone > Content > Images of the day and select the image you want to display.';\n }", "public function getGroupDescription()\n {\n return $this->__get(self::FIELD_GROUP_DESCRIPTION);\n }", "function get_group_description($group) {\n\tglobal $home_locale, $current_locale;\n\tif ($home_locale == $current_locale\n\t\t\t|| !isset($group['vccommondescription'])\n\t\t\t|| !$group['vccommondescription']) {\n\t\treturn $group['vclocaldescription'];\n\t} else {\n\t\treturn $group['vccommondescription'];\n\t}\n}", "public function getGroupDescription() : string\n {\n return $this->groupDescription;\n }", "public function get_image_title()\n {\n }", "public function getMetaSummary()\n {\n return $this->dbObject('ImageMetaCaption');\n }", "function showcaseGallery($groupId, $title) {\n\t$config = new ConfigReader();\n\t$config->loadConfigFile('assets/core/config/widgets/showGroup/gallery.properties');\n\t\n\t$maxDisplay = $config->readValue('maxDisplay');\n\t$maxPerRow = $config->readValue('maxPerRow');\n\t$w = $config->readValue('maxImageSizeX');\n\t$h = $config->readValue('maxImageSizeY');\n\t\n\t//if the user is not an admin, validate that the user is a member of this group\n\t$result = mysql_query(\"SELECT parentId, imageUrl FROM imagesGroups WHERE parentId = '{$groupId}' AND inSeriesImage = 1 ORDER BY RAND() LIMIT $maxDisplay\");\n\t$total = mysql_num_rows($result);\n\t\n\tif ($total > 0) {\n\t\t\n\t\t$urlCategory =urlencode($row->category);\n\t\t$caption = htmlentities($row->caption);\n\t\t\n\t\t$x = 0;\n\t\t$count = 0;\n\t\t\n\t\t//adjust maxPerRow is it's greater than the returned number of objects\n\t\tif ($maxPerRow > $total) {\n\t\t\t\n\t\t\t$maxPerRow = $total;\n\t\t\t\n\t\t}\n\t\t\n\t\t$return .= \"\t\t\t\t<div id=\\\"gallery_container\\\">\\n\";\n\t\t$return .= \"\t\t\t\t\t<div class=\\\"header\\\"><a href=\\\"/groupgalleries/id/$groupId\\\">$title</a></div>\\n\";\n\t\t$return .= \"\t\t\t\t\t<div class=\\\"body\\\">\\n\";\n\t\t\n\t\twhile ($row = mysql_fetch_object($result)) {\n\t\t\t\n\t\t\t//count this row's column itteration\n\t\t\t$x++;\n\t\t\t\n\t\t\t//keep track of total displayed so far\n\t\t\t$count++;\n\t\t\t\n\t\t\t//determine if separator class is applied\n\t\t\tif ($x % $maxPerRow != 0) {\n\t\t\t\t\n\t\t\t\t$separator = \" separator\";\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t$separator = \"\";\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$return .= \"<div class=\\\"gallery_image_container$separator\\\">\\n\";\n\t\t\t$return .= \"\t<a href=\\\"/groupgalleries/id/$groupId\\\"><img src=\\\"/file.php?load=$row->imageUrl&w=$w&h=$h\\\" border=\\\"0\\\"></a>\\n\";\n\t\t\t$return .= \"</div>\\n\";\n\t\t\t\n\t\t\t//row separator\n\t\t\tif ($x == $maxPerRow && $count < $total) {\n\t\t\t\t\n\t\t\t\t$return .= \"\t\t\t<div class=\\\"gallery_image_row_separator\\\"></div>\\n\";\n\t\t\t\t$x = 0;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t$return .= \"\t\t\t\t\t</div>\\n\";\n\t\t$return .= \"\t\t\t\t</div>\\n\";\n\t\t\n\t}\t\n\t\n\treturn($return);\n\t\n}", "protected function renderImage(){\n \n return sprintf(\n '<img src=\"%s\" title=\"%s\" alt=\"%s\">',\n $this->getField('url'),\n $this->getField('title',''),\n $this->getField('alt','')\n );\n \n }", "public function displayImgTag() {\n $urlimg = \"/plugins/graphontrackers/reportgraphic.php?_jpg_csimd=1&group_id=\".(int)$this->graphic_report->getGroupId().\"&atid=\". $this->graphic_report->getAtid();\n $urlimg .= \"&report_graphic_id=\".$this->graphic_report->getId().\"&id=\".$this->getId();\n \n \n echo '<img src=\"'. $urlimg .'\" ismap usemap=\"#map'. $this->getId() .'\" ';\n if ($this->width) {\n echo ' width=\"'. $this->width .'\" ';\n }\n if ($this->height) {\n echo ' height=\"'. $this->height .'\" ';\n }\n echo ' alt=\"'. $this->title .'\" border=\"0\">';\n }", "public function options_page_overview() \n\t\t{\n\t\t\t$html = '';\n\t\t\t\n\t\t\tforeach( $this->size_groups as $size_group => $sizes ) \n\t\t\t{\n\t\t\t\t$html .= '<h3>' . $this->get_group_headline( $size_group ) . '</h3>';\n\t\t\t\t\n\t\t\t\t$html .= '<ul>';\n\t\t\t\t\n\t\t\t\tforeach( $sizes as $key => $image ) \n\t\t\t\t{\n\t\t\t\t\t$info = $image['width'] . '*' . $image['height'];\n\t\t\t\t\tif( isset( $image['crop'] ) && true === $image['crop'] )\n\t\t\t\t\t{\n\t\t\t\t\t\t$info .= ' ' . __( '(cropped)', 'avia_framework' );\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$info .= ' - ' . $this->get_image_key_info( $key );\n\t\t\t\t\t\n\t\t\t\t\t$html .= '<li>' . $info . '</li>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$html .= '</ul>';\n\t\t\t}\n\t\t\t\n\t\t\treturn $html;\n\t\t}", "public function getSummaryThumbnail() {\n $data = [];\n if ($this->Image() && $this->Image()->exists()) {\n // Stretch to maximum of 36px either way then trim the extra off\n if ($this->Image()->getOrientation() === Image_Backend::ORIENTATION_PORTRAIT) {\n $data['Image'] = $this->Image()->ScaleWidth(36)->CropHeight(36);\n } else {\n $data['Image'] = $this->Image()->ScaleHeight(36)->CropWidth(36);\n }\n }\n return $this->customise($data)->renderWith(__CLASS__ . '/SummaryThumbnail')->forTemplate();\n }", "public function getDescriptionImages() {\n preg_match( '@src=\"([^\"]+)\"@' , $this->description, $match);\n return $match;\n }", "public function getGroup()\n {\n $ProductGroup = ProductGroup::find($this->group_id); \n \n return $ProductGroup->description;\n }", "public function RenderImages_withLink_andSummary() {\n\t$htTitle = $this->NameString();\n\t$htStatus = $this->RenderCatalogSummary_HTML();\n\t$qStock = $this->QtyInStock();\n\t$htStock = \"$qStock in stock\";\n\t$htPopup = \"&ldquo;$htTitle&rdquo;%attr%\\n$htStatus\\n$htStock\";\n\t$htImgs = $this->RenderImages_forRow($htPopup,vctImages::SIZE_THUMB);\n\t$htTitle = $this->ShopLink($htImgs);\n\treturn $htTitle;\n }", "function album_gallery_get_page_content_show($GUID_USER, $GUID_IMAGE)\n{\n if(!$GUID_IMAGE || !$img = get_entity($GUID_IMAGE))\n {\n $immagine = elgg_view('elgg-album-gallery/error', array('error' => elgg_echo('gallery:no:imageshow')));\n $titolo = elgg_echo('gallery:title:error',array(elgg_echo('gallery:no:imageshow')));\n }\n else\n {\n $titolo = elgg_echo('gallery:title:showone',array($img->title));\n $immagine = elgg_view('elgg-album-gallery/show',array('title' => $img->title, 'desc' => $img->description, 'image' => $img->getIconURL('large'), 'guid' => $img->guid, 'guid_user' => $GUID_USER, 'action' => elgg_echo('gallery:delete:link')));\n }\n\n $return = array(\n 'title' => $titolo,\n 'content' => $immagine\n );\n\n return $return;\n}", "public function RenderImages() {\n\t$outYes = $outNo = NULL;\n\twhile ($this->NextRow()) {\n\t $htTitle = $this->RenderImages_withLink_andSummary();\n\t if ($this->IsForSale()) {\n\t\t$outYes .= $htTitle;\n\t } else {\n\t\t$outNo .= $htTitle;\n\t }\n\t}\n\t\n\tif (is_null($outYes)) {\n\t $htYes = '<span class=content>There are currently no titles available for this topic.</spaN>';\n\t} else {\n\t $oSection = new vcHideableSection('hide-available','Titles Available',$outYes);\n\t $htYes = $oSection->Render();\n\t}\n\tif (is_null($outNo)) {\n\t $htNo = NULL;\t// no point in mentioning lack of unavailable titles\n\t} else {\n\t $oSection = new vcHideableSection('show-retired','Titles NOT available',$outNo);\n\t $oSection->SetDefaultHide(TRUE);\n\t $htNo = $oSection->Render();\n\t}\n\treturn $htYes.$htNo;\n }", "private function get_title_img()\n {\n $this->char_count = count($this->strings);\n $this->init_img();\n $font_size = L_FONT_SIZE / $this->char_count;\n $img_y = (L_IMG_HEIGHT + $font_size) / 2;\n $this->create_img($this->string,$font_size,$img_y);\n }", "public function getContent()\n\t\t{\n\t\t\treturn $this->getGroup();\n\t\t\t\n\t\t}", "public function description()\n\t{\n\t\t$txt = array();\n\t\t$txt['wiki'] = \"Displays group events\";\n\t\t$txt['html'] = '<p>Displays group events.</p>';\n\t\t$txt['html'] = '<p>Examples:</p>\n\t\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t\t<li><code>[[Groupevent(number=3)]]</code> - Displays the next three group events</li>\n\t\t\t\t\t\t\t\t<li><code>[[Groupevent(title=Group Events, number=2)]]</code> - Adds title above event list. Displays 2 events.</li>\n\t\t\t\t\t\t\t\t<li><code>[[Groupevent(id=123)]]</code> - Displays single group event with ID # 123</li>\n\t\t\t\t\t\t\t</ul>';\n\t\treturn $txt['html'];\n\t}", "public function getGroupsDescription()\n {\n if (class_exists(Subsite::class)) {\n Subsite::disable_subsite_filter(true);\n }\n\n // Get the member's groups, if any\n $groups = $this->owner->Groups();\n if ($groups->Count()) {\n // Collect the group names\n $groupNames = array();\n foreach ($groups as $group) {\n /** @var Group $group */\n $groupNames[] = html_entity_decode($group->getTreeTitle() ?? '');\n }\n // return a csv string of the group names, sans-markup\n $result = preg_replace(\"#</?[^>]>#\", '', implode(', ', $groupNames));\n } else {\n // If no groups then return a status label\n $result = _t(__CLASS__ . '.NOGROUPS', 'Not in a Security Group');\n }\n\n if (class_exists(Subsite::class)) {\n Subsite::disable_subsite_filter(false);\n }\n return $result;\n }", "public function detail(): string\n {\n return $this->groupDetail ?? '';\n }", "public function getImagemd() {\n return $this->imagemd;\n }", "public function introTextImage(){\n if(isset($this->imageIntro)){\n return $this->imageIntro;\n }\n $this->fetchIntroImage();\n return $this->imageIntro;\n }", "function get_header_image()\n {\n }", "function frmgetcourse_summary_image($courseid) {\n\tglobal $CFG;\n\t$contentimage = '';\n\tforeach (frmgetcourse_overviewfiles($courseid) as $file) {\n\t\t$isimage = $file->is_valid_image();\n\t\t$url = file_encode_url(\"$CFG->wwwroot/pluginfile.php\",\n\t\t'/'. $file->get_contextid(). '/'. $file->get_component(). '/'.\n\t\t$file->get_filearea(). $file->get_filepath(). $file->get_filename(), !$isimage);\n\t\tif ($isimage) {\n\t\t\t$contentimage = html_writer::empty_tag('img', array('src' => $url, 'alt' => 'Course Image '. $course->fullname,'class' => 'card-img-top w-100'));\n\t\t\tbreak;\n\t\t}\n\t}\n\tif (empty($contentimage)) {\n\t\t$url = $CFG->wwwroot . \"/theme/\".$CFG->theme.\"/pix/default_course.jpg\";\n\t\t$contentimage = html_writer::empty_tag('img', array('src' => $url, 'alt' => 'Course Image '. $course->fullname,'class' => 'card-img-top w-100'));\n\t}\n\treturn $contentimage;\n}", "function _imageTitle($img) {\n global $ID;\n\n // some fixes on $img['src']\n // see internalmedia() and externalmedia()\n list($img['src']) = explode('#', $img['src'], 2);\n if($img['type'] == 'internalmedia') {\n resolve_mediaid(getNS($ID), $img['src'], $exists ,$this->date_at, true);\n }\n\n return $this->_media(\n $img['src'],\n $img['title'],\n $img['align'],\n $img['width'],\n $img['height'],\n $img['cache']\n );\n }", "function GetImage()\n {\n //Obtient les images par défaut de chaque produit de la fiche\n $ficheProduct = new EeCommerceFicheProductProduct($this->Core);\n $ficheProduct->AddArgument(new Argument(\"EeCommerceFicheProductProduct\", \"FicheId\", EQUAL, $this->IdEntite));\n $products = $ficheProduct->GetByArg();\n \n $html = \"<div>\";\n \n foreach($products as $product)\n {\n $img = new Image($product->Product->Value->ImageDefault->Value);\n $img->Alt = $img->Title = $product->Product->Value->NameProduct->Value;\n \n $html .= \"<div class='col-md-4' >\" . $img->Show().\"</div>\"; \n }\n \n $html .= \"</div>\";\n \n return $html;\n \n }", "public function GetPageImage()\n {\n $imageID = $this->GetImageFromPageTable();\n if (is_null($imageID)) {\n $imageID = $this->GetImageFromDivisionTable();\n }\n\n $oImage = null;\n if (!is_null($imageID)) {\n /** @var $oImage TCMSImage */\n $oImage = new TCMSImage();\n $oImage->Load($imageID);\n }\n\n return $oImage;\n }", "function extract_image_url($text,$pageTitle) {\r\n\t $text = trim(preg_replace(\"/<[^>]+>/\",\" \",$text));\r\n\r\n \tif (preg_match_all(\"/(\\[\\[image:)([^\\]\\|]*)(\\|[^\\]]*)?\\]\\]/i\", $text, $match)) {\r\n\t \t$name = $match[2][0];\r\n\t \tif (preg_match(\"/\\{\\{logo\\}\\}/\",$name)) {\r\n\t \t$name = ucwords(strtolower($pageTitle)).\".png\";\r\n\t }\r\n\t\t} else if (preg_match_all(\"/([a-z0-9_ -]+\\.)(?:jpe?g|png|gif)/i\", $text, $match)) {\r\n\t $name = $match[0][0];\r\n\t }\r\n\t if (!isset($name)) return null;\r\n\t\treturn $this->make_image_url($name);\r\n\t}", "public function getMetaImage() {\n return (isset($this->metaImage) && $this->metaImage!='') ? $this->metaImage : LOGO;\n }", "abstract protected function getGroupStructure();", "public function getDetails($group_id);", "function buildDescription($data) {\n $description_array = array();\n //Get image info.\n $imageinfo = image_get_info($data->uri);\n\n if ($this->conf['image_extra_info']['thumbnail']) {\n $image = $imageinfo ? theme_image_style(array(\n 'width' => $imageinfo['width'],\n 'height' => $imageinfo['height'],\n 'style_name' => 'linkit_thumb',\n 'path' => $data->uri,\n )) : '';\n }\n\n if ($this->conf['image_extra_info']['dimensions'] && !empty($imageinfo)) {\n $description_array[] = $imageinfo['width'] . 'x' . $imageinfo['height'] . 'px';\n }\n\n $description_array[] = parent::buildDescription($data);\n\n if ($this->conf['show_scheme']) {\n $description_array[] = file_uri_scheme($data->uri) . '://';\n }\n\n $description = (isset($image) ? $image : '') . implode('<br />' , $description_array);\n\n return $description;\n }", "public function getOverallImage()\n {\n return $this->overallImage;\n }", "function getImagePathInfo() \n { \n return $this->_imagePathInfo; \n }", "protected function get_group_headline( $group )\n\t\t{\n\t\t\t$headline = '';\n\t\t\t\n\t\t\t$sizes = explode( '*', $group );\n\t\t\t\n\t\t\t$w = isset( $sizes[0] ) ? (int) $sizes[0] : 0;\n\t\t\t$h = isset( $sizes[1] ) ? (int) $sizes[1] : 0;\n\t\t\t\n\t\t\tif( 0 == $h )\n\t\t\t{\n\t\t\t\t$headline .= __( 'Images keeping original aspect ratio', 'avia_framework' );\n\t\t\t}\n\t\t\telse if ( 0 == $w )\n\t\t\t{\n\t\t\t\t$headline .= __( 'Images keeping original aspect ratio', 'avia_framework' );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$gcd = $this->greatest_common_divisor( $w, $h );\n\t\t\t\t$w = (int) ( $w / $gcd );\n\t\t\t\t$h = (int) ( $h / $gcd );\n\t\t\t\t\n\t\t\t\t$headline .= sprintf( __( 'Images aspect ratio: %d : %d', 'avia_framework' ), $w, $h );\n\t\t\t}\n\t\t\t\n\t\t\t/**\n\t\t\t * \n\t\t\t * @since 4.7.5.1\n\t\t\t * @param string $headline\n\t\t\t * @param string $group\n\t\t\t * @return string\n\t\t\t */\n\t\t\treturn apply_filters( 'avf_admin_image_group_headline', $headline, $group );\n\t\t}", "public function getGroupByPage() {}", "protected function GetImageFromDivisionTable()\n {\n $imageID = null;\n $activePage = $this->getActivePageService()->getActivePage();\n $oDivision = $activePage->getDivision();\n\n if (null !== $oDivision && is_array($oDivision->sqlData) && array_key_exists('images', $oDivision->sqlData)) {\n $oDivisionImages = $oDivision->GetImages('images');\n\n if ($oDivisionImages->Length() > 0) {\n /** @var $oImage TCMSImage */\n if ($this->bPickRandomImage) {\n $oImage = $oDivisionImages->Random();\n } else {\n $oImage = $oDivisionImages->Current();\n }\n $imageID = $oImage->id;\n }\n }\n\n return $imageID;\n }", "public function getImage() {\n return Mage::helper('landingpage/image')->getImageUrl($this->getData('image'));\n }", "protected function imageName() {}", "public function getImagem()\n {\n return $this->imagem;\n }", "static public function getDescription() {\n\t\treturn self::$page_description;\n\t}", "function getGroup() ;", "function getImageRegex()\r\n\t{\r\n\t\t$output = preg_match_all('/<img.+src=[\\'\"]([^\\'\"]+)[\\'\"].*>/i', \r\n\t\t\t$this->description, $matches);\r\n\t\t$first_img = $matches [1] [0];\r\n\t\t\r\n\t\t//Defines a default image\r\n\t\tif(empty($first_img)){ \r\n\t\t\t$first_img = \"/images/default.jpg\";\r\n\t\t}\r\n\t\t$this->picture = $first_img;\r\n\t}", "function _meta(&$img,$opt){\n if($img['meta']){\n // map JPEGMeta calls to opt names\n\n switch($opt){\n case 'title':\n return $img['meta']->getField('Simple.Title');\n case 'desc':\n return $img['meta']->getField('Iptc.Caption');\n case 'cdate':\n return $img['meta']->getField('Date.EarliestTime');\n case 'width':\n return $img['meta']->getField('File.Width');\n case 'height':\n return $img['meta']->getField('File.Height');\n\n\n default:\n return '';\n }\n\n }else{\n // just return the array field\n return $img[$opt];\n }\n }", "public function getImageName();", "private function getImg()\n\t{\n\t\t$buffer = '&nbsp;';\n\t\t\n\t\tif(!$this->aImg['sFilename'])\n\t\t\treturn $buffer;\n\t\t\n\t\t$buffer = '<img src=\"../../thumbs/'.$this->aImg['sFilename'].'\" />';\t\t\n\t\t\n\t\treturn $buffer;\n\t}", "public function getImageUrl();", "public function getImageTag();", "public function getImageName()\n {\n return $this->ImageName;\n }", "public function get_title() {\n\t\treturn __( 'Happyden Featured Image', 'happyden' );\n\t}", "public static function printGallery() {\r\n\t\t$elts = Acid::mod('Photo')->dbList(array(array('active','=',1)),array('pos'=>'ASC'));\r\n\t\treturn Acid::tpl('pages/gallery.tpl',array('elts'=>$elts),Acid::mod('Photo'));\r\n\t}", "public function getImageDetails() {\n\t\t$details = getimagesize($this->file);\n\n\t\tif(!$details) throw new Exception('Falha na busca dos parametros da imagem!');\n\n\t\tlist($width, $height, $type, $attr, $mime) = $details;\n\t\t$aspect = ($width > $height)?'landscape':'portrait';\n\t\t$ration = $width / $height;\n\n\t\treturn array('width' => $width,'height' => $height,'aspect' => $aspect,'ratio' => $ratio,'mime' => $mime,'type' => $type);\n\t}", "function LayoutGetImage($params=null) // must return string\n{\n global $DB, $sdurl, $userinfo, $plugin_names, $plugin_folder_to_id_arr;\n\n // Below are several security checks to assure, that the passed on plugin-id\n // is valid, the plugin and it's image path exist etc.\n if( !isset($params) || !is_array($params) || (count($params) < 1) ||\n (count($params) > 2) || empty($userinfo['pluginviewids']) )\n {\n return '';\n }\n $image_id = Is_Valid_Number($params[0], 0, 1);\n $plugin_id = 17; //default!\n $w = $h = 0;\n if(isset($params[1]))\n {\n if($p_arr = @preg_split('#,#',$params[1],0,PREG_SPLIT_NO_EMPTY))\n {\n $plugin_id = Is_Valid_Number($p_arr[0], 17, 1);\n $p_arr = array_slice($p_arr,1);\n foreach($p_arr as $p)\n {\n if($p2_arr = @preg_split('#=#',$p,0,PREG_SPLIT_NO_EMPTY))\n {\n if(($p2_arr[0]=='w') && isset($p2_arr[1])) $w = intval($p2_arr[1]);\n if(($p2_arr[0]=='h') && isset($p2_arr[1])) $h = intval($p2_arr[1]);\n }\n }\n\n }\n }\n\n // Sanity checks:\n if( ($image_id < 0) || !$plugin_id || !isset($plugin_names[$plugin_id]) ||\n !in_array($plugin_id, $userinfo['pluginviewids']) )\n {\n return '';\n }\n\n if(empty($image_id))\n {\n $image_id = ' ORDER BY RAND() LIMIT 1';\n }\n else\n {\n $image_id = ' AND i.imageid = '.(int)$image_id;\n }\n $columns = '';\n if($plugin_id >= 5000)\n {\n $columns= ', s.folder, s.access_view';\n }\n\n if(!$folder = array_search($plugin_id, $plugin_folder_to_id_arr)) return '';\n $folder = 'plugins/'.$folder.'/images/';\n if(!is_readable(ROOT_PATH.$folder)) return '';\n\n $sections = empty($userinfo['categoryviewids']) ? '0' : implode(',',$userinfo['categoryviewids']);\n $DB->ignore_error = true;\n $image_arr = $DB->query_first(\"SELECT i.* $columns FROM {p\".$plugin_id.'_images} i'.\n ' INNER JOIN {p'.$plugin_id.'_sections} s ON s.sectionid = i.sectionid'.\n ' WHERE i.activated = 1 AND s.activated = 1 '.\n ' AND s.sectionid IN (%s) %s',\n $sections, $image_id);\n $DB->ignore_error = false;\n\n if(!$image_arr || empty($image_arr['imageid']))\n {\n return 'Image not available!';\n }\n $imagetitle = htmlspecialchars($image_arr['title'], ENT_COMPAT);\n if(isset($image_arr['folder'])) $folder .= $image_arr['folder']; // Media Gallery subfolder support\n $img_md_exists = file_exists(ROOT_PATH.$folder . 'md_' . $image_arr['filename']);\n $image_path = $folder . ($img_md_exists ? 'md_' : '') . $image_arr['filename'];\n if(!$w || !$h)\n {\n list($w, $h, $type, $attr) = @getimagesize(ROOT_PATH.$image_path);\n }\n\n return '<img title=\"' . $imagetitle . '\" alt=\"image\" src=\"' .\n $sdurl. $image_path . '\" width=\"' . $w . '\" height=\"' . $h . '\" />';\n\n}", "function _get_group_tags($group=NULL)\n{\n\t$group_tags=array(\n\t\t'dynamic_front_end'=>array('overlay','random','pulse','ticker','shocker','jumping','sections','big_tabs','tabs','carousel','hide','tooltip'),\n\t\t'dynamic_back_end'=>array('currency','if_in_group'),\n\t\t'structure'=>array('title','contents','include','concepts','concept','staff_note','menu','surround'),\n\t\t'formatting'=>array('list','indent','ins','del','b','u','i','s','sup','sub','size','color','highlight','font','align','left','center','right','abbr','box','quote'),\n\t\t'semantic'=>array('cite','samp','q','var','dfn','address'),\n\t\t'display_code'=>array('php','codebox','sql','code','tt','no_parse'),\n\t\t'execute_code'=>array('semihtml','html'),\n\t\t'media'=>array('flash','img'/*Over complex,'upload','exp_thumb','exp_ref'*/,'thumb'),\n\t\t'linking'=>array('url','email','reference','page','snapback','post','topic')\n\t);\n\n\tif (addon_installed('filedump')) $group_tags['media'][]='attachment';\n\n\t// Non-categorised ones\n\t$all_tags=_get_details_comcode_tags();\n\t$not_found=array();\n\tforeach (array_keys($all_tags[0]+$all_tags[1]) as $tag)\n\t{\n\t\tif (in_array($tag,array('exp_thumb','exp_ref','upload','attachment'))) continue; // Explicitly don't want to allow these (attachment will already be listed if allowed)\n\t\tforeach ($group_tags as $_group)\n\t\t{\n\t\t\tif (in_array($tag,$_group))\n\t\t\t{\n\t\t\t\tcontinue 2;\n\t\t\t}\n\t\t}\n\t\t$not_found[]=$tag;\n\t}\n\t$group_tags['CUSTOM']=$not_found;\n\n\tif ($group!==NULL && array_key_exists($group,$group_tags))\n\t\treturn $group_tags[$group];\n\n\treturn $group_tags;\n}", "protected function fetchIntroImage(){\n $this->imageIntro = $this->getImageTypeFromImages('intro');\n }", "public function getSponsorlogo() {}", "public function getGrouperGroupDescription($provisionerGroup) {\n // Grouper group description is just the COmanage group description.\n return $provisionerGroup['CoGrouperProvisionerGroup']['description'];\n }", "function get_uploaded_header_images()\n {\n }", "public function get_name() {\n\t\treturn 'gallery';\n\t}", "public function column_group_marker($item) {\n\t \t\tif ( strstr( $item->group_marker, 'wp-google-map-pro/icons/' ) !== false ) {\n\t \t\t\t$item->group_marker = str_replace( 'icons', 'assets/images/icons', $item->group_marker );\n\t \t\t}\n\t\t\treturn sprintf( '<img src=\"'.$item->group_marker.'\" name=\"group_image[]\" value=\"%s\" />', $item->group_map_id );\n\t\t}", "public function morePics()\n {\n $aPicGallery = $this->getPictureGallery();\n\n return $aPicGallery['MorePics'];\n }", "public function get_title() {\n\t\treturn __( 'ImageBox', 'elementor-listeo' );\n\t}", "function Image() {\r\n\t\treturn $this->ResizedAdvertisementImage();\r\n\t}", "function dfcg_help_images() {\n?>\n\t<h3><?php _e( 'Dynamic Content Gallery - Quick Help - Image Management', DFCG_DOMAIN ); ?></h3>\n\t\n\t<p><?php _e( 'Quite simply, the Featured Images option is the best and easiest to use. The manual methods (Full and Partial) are primarily there for reasons of backwards compatibility, for those users who have been using the DCG since its earliest versions.', DFCG_DOMAIN ) ;?></p>\n\t\n\t<p><em><?php _e( 'Note: it is quite possible that the manual image management options will be removed in future. Therefore users are encouraged to use the Featured Image option - it is easier and more flexible.', DFCG_DOMAIN ); ?></em></p>\n\t\n\t<p><?php _e( 'If you select the Partial URL option you will be prompted to enter the URL to the root folder for your images. You must enter a URL here otherwise the DCG will not find your images.', DFCG_DOMAIN ); ?></p>\n\n<?php\n}", "function getImageInfo ( $imagesize, $item_result = null )\n\t{\n\t\t$imageurl = $this->info['graphics_url'];\n\t\t$imageset = null;\n\t\tif ( null != $item_result ) {\n\t\t\tif ( is_array( $item_result['Items']['Item']['ImageSets']['ImageSet'] ) ) {\n\t\t\t\tif ( isset( $item_result['Items']['Item']['ImageSets']['ImageSet'][0] ) && is_array( $item_result['Items']['Item']['ImageSets']['ImageSet'][0] ) ) {\n\t\t\t\t\t$imageset = $item_result['Items']['Item']['ImageSets']['ImageSet'][0];\n\t\t\t\t} else {\n\t\t\t\t\t$imageset = $item_result['Items']['Item']['ImageSets']['ImageSet'];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$imageset = $item_result['Items']['Item'];\n\t\t\t}\n\t\t}\n\n\t\tswitch ( strtolower( $imagesize ) )\n\t\t{\n\t\t\tcase 'medium' :\n\t\t\t\tif ( NULL === $imageset ) {\n\t\t\t\t\t$img['url']='';\n\t\t\t\t} else {\n\t\t\t\t\t$img['url'] = $imageset['MediumImage']['URL'];\n\t\t\t\t\t$img['h'] = $imageset['MediumImage']['Height'];\n\t\t\t\t\t$img['w'] = $imageset['MediumImage']['Width'];\n\t\t\t\t}\n\t\t\t\tif ( empty( $img['url'] ) ) {\n\t\t\t\t\t$img['url'] = $imageurl . '/no-image-160.gif';\n\t\t\t\t\t$img['h'] = 160;\n\t\t\t\t\t$img['w'] = 160;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'small' :\n\t\t\t\tif ( NULL === $imageset ) {\n\t\t\t\t\t$img['url']='';\n\t\t\t\t} else {\n\t\t\t\t\t$img['url'] = $imageset['SmallImage']['URL'];\n\t\t\t\t\t$img['h'] = $imageset['SmallImage']['Height'];\n\t\t\t\t\t$img['w'] = $imageset['SmallImage']['Width'];\n\t\t\t\t}\n\t\t\t\tif ( empty( $img['url'] ) ) {\n\t\t\t\t\t$img['url'] = $imageurl . '/no-image-75.gif';\n\t\t\t\t\t$img['h'] = 75;\n\t\t\t\t\t$img['w'] = 75;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'large' :\n\t\t\t\tif ( NULL === $imageset ) {\n\t\t\t\t\t$img['url']='';\n\t\t\t\t} else {\n\t\t\t\t\t$img['url'] = $imageset['LargeImage']['URL'];\n\t\t\t\t\t$img['h'] = $imageset['LargeImage']['Height'];\n\t\t\t\t\t$img['w'] = $imageset['LargeImage']['Width'];\n\t\t\t\t}\n\t\t\t\tif ( empty( $img['url'] ) ) {\n\t\t\t\t\t$img['url'] = $imageurl . '/no-image-500.gif';\n\t\t\t\t\t$img['h'] = 500;\n\t\t\t\t\t$img['w'] = 500;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'swatch' :\n\t\t\t\tif ( NULL === $imageset ) {\n\t\t\t\t\t$img['url']='';\n\t\t\t\t} else {\n\t\t\t\t\t$img['url'] = $imageset['SwatchImage']['URL'];\n\t\t\t\t\t$img['h'] = $imageset['SwatchImage']['Height'];\n\t\t\t\t\t$img['w'] = $imageset['SwatchImage']['Width'];\n\t\t\t\t}\n\t\t\t\tif ( empty( $img['url'] ) ) {\n\t\t\t\t\t$img['url'] = '';\n\t\t\t\t\t$img['h'] = 0;\n\t\t\t\t\t$img['w'] = 0;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault :\n\t\t\t\tif ( NULL === $imageset ) {\n\t\t\t\t\t$img['url']='';\n\t\t\t\t} else {\n\t\t\t\t\t$img['url'] = $imageset['MediumImage']['URL'];\n\t\t\t\t\t$img['h'] = $imageset['MediumImage']['Height'];\n\t\t\t\t\t$img['w'] = $imageset['MediumImage']['Width'];\n\t\t\t\t}\n\t\t\t\tif ( empty( $img['url'] ) ) {\n\t\t\t\t\t$img['url'] = $imageurl . '/no-image-160.gif';\n\t\t\t\t\t$img['h'] = 160;\n\t\t\t\t\t$img['w'] = 160;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t\treturn ($img);\n\t}", "protected function getImageName() {\n\n\t\treturn NULL;\n\t}", "function ubercart_image_pkg_info() {\n // Include the CCK\n module_load_include('inc', 'filefield', 'filefield_widget');\n module_load_include('inc', 'imagefield', 'imagefield_widget');\n\n // Determine the image API plugin module to use.\n $plugin = class_exists('imagick') ? 'imageapi_imagemagick' : 'imageapi_gd';\n\n return array(\n 'title' => t('Image support'),\n 'description' => t('This package installs default image support for Ubercart products and integrates them into various parts of the store. It uses Lightbox2 for popup displays on product pages.'),\n 'modules' => array('content', 'filefield', 'imageapi', $plugin, 'imagefield', 'imagecache', 'imagecache_ui', 'lightbox2'),\n );\n}", "function getImageDifferentPlaces($limitImages=0) {\n \tif ($this->config['mode']=='DIRECTORY') {\n \t\t$content.=$this->getImagesDirectory($limitImages);\n \t} elseif ($this->config['mode']=='RECORDS') {\n \t\t$content.=$this->getImagesRecords($limitImages);\n } elseif ($this->config['mode']=='DAM') {\n \t\t$content.=$this->getImagesDam($limitImages);\n } elseif ($this->config['mode']=='DAMCAT') {\n \t\t$content.=$this->getImagesDamCat($limitImages);\n } \n \n // hook\n if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rgsmoothgallery']['extraDifferentPlaces'])) {\n foreach($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rgsmoothgallery']['extraDifferentPlaces'] as $_classRef) {\n\t\t\t\t$_procObj = & t3lib_div::getUserObj($_classRef);\n\t\t\t\t$content = $_procObj->extraBeginGalleryProcessor($content, $limitImages,$this);\n }\n } \n \treturn $content;\n }", "public function getGroup();", "public function getGroup();", "public function getGroup();", "public function getNomeImg()\n {\n return $this->nomeImg;\n }", "public function getImage() : string\n {\n return $this->image;\n }", "public function getPrimaryImageOfPage()\n {\n return $this->primaryImageOfPage;\n }", "public static function group()\n { \n return (string) view('hafiz::icons.environmental');\n }", "public function getDetails($group = 'default') {\n return $this->getPagerArray($group);\n }", "public function footimage_info()\n {\n $res = $this->db->get('footer_slider');\n\n // print_r($res);\n return $res;\n }", "public function getImage()\n {\n return $this->getValue('nb_catalog_item_lang_image');\n }", "function gallery_detail($uri_gallery){\n\t\t// $uri_gallery = $this->db->escape($uri_gallery);\n\t\t$filter['GALL_URI'] = $uri_gallery;\n\t\t$gall_info = $this->dashboard_m->get_gallery_info($filter);\n\t\t$data['gall_info_result'] = $gall_info;\n\t\t$data[\"title\"] = $gall_info->GALL_NAME;\n\t\t$data[\"description\"] = $gall_info->GALL_DESC;\n\t\t$data['breadcrumb_parent_uri'] = \"gallery\";\n\t\t$data['breadcrumb_parent'] = \"Galeri\";\n\t\t$data['breadcrumb_active'] = $gall_info->GALL_NAME;\n\t\t// Get Data Gallery Foto / Video \n\t\t$filter2['GALL_ID'] = $gall_info->GALL_ID;\n\t\t$gall_pic_list = $this->dashboard_m->get_pics_of_gallery($filter2);\n\t\t$data['result'] = $gall_pic_list;\n\t\t// Get Data Sidebar\n\t\t$filter3['GALL_ID'] = $gall_info->GALL_ID;\n\t\t$gall_list = $this->dashboard_m->get_galleries($filter3);\n\t\tshuffle($gall_list);\n\t\t$data['sidebar_result'] = $gall_list;\n\t\t$data['include_script'] = inc_script(\n\t\t\tarray(\n\t\t\t\t\"cms/plugin/dashboard/js/gallery_modal.js\",\n\t\t\t)\n\t\t);\n\n\t\t$this->masterpage->addContentPage('breadcrumb', 'breadcrumb', $data);\n\t\t$this->masterpage->addContentPage(\"gallery_detail\", 'contentmain', $data);\n\t\t$this->masterpage->show();\n\t}", "public function getGroup() {}", "public function getGroup() {}", "public function getGroup() {}", "public function getGroup() {}", "public function render(){\n\t\t$out = \"<img\".($this->getID() ? \" id=\\\"\".$this->getID().\"\\\"\" : \"\");\n\t\t\n\t\t$out .= \" src=\\\"\".$this->link.\"\\\"\";\n\t\t\n\t\tforeach( $this->getProperties() as $key => $value ) {\n\t\t\t$out .= \" \".$key.\"=\\\"\".$value.\"\\\"\"; //example: _width=\"100px\"\n\t\t}\n\t\t$out .= \" />\"; //end of opening html tag and html properties\n\t\t\n\t\treturn $out;\n\t}", "function get_caption($image) {\n\treturn $image->post_excerpt;\n}", "public function get_title()\n {\n return __('DS Tilt Image', 'designsivu-elementor');\n }", "function affiche_image(){\n\t\tglobal $infos_id;\n\t\tif($infos_id['grade']==0){\n\t\t\treturn\"<img src='ressources/membre.png' title='Membre' alt='Membre'>\";\n\t\t}\n\t\tif($infos_id['grade']==10){\n\t\t\treturn \"<img src='ressources/users.png' title='Conseil' alt='Membre du conseil'>\";\n\t\t}\n\t\tif($infos_id['grade']==20){\n\t\t\treturn \"<img src='ressources/admin.png' title='Vice président' alt='Vice président'>\";\n\t\t}\n\t\tif($infos_id['grade']==30){\n\t\t\treturn \"<img src='ressources/boss.png' title='Président' alt='Président'>\";\n\t\t}\n\t}", "public function src(){\n return $this->imageFirstInContent;\n }", "function _tts_preprocess_p_img_big(&$vars){\n $alt = (isset($vars['content']['field_img'][0]['#item']['title'])\n && !empty($vars['content']['field_img'][0]['#item']['title'])\n ? $vars['content']['field_img'][0]['#item']['title'] . ' - '\n : '') . 'Serramenti Torino';\n $vars['content']['field_img'][0]['#item']['alt'] = $alt;\n \n \n if ($vars['view_mode'] == 'full'){\n $vars['content']['field_img'] = array(\n '#prefix' => '<div class=\"wrapper-p-img margin-b-1\">',\n '#suffix' => '</div>',\n 'data' => $vars['content']['field_img'][0],\n );\n\n //_tts_add_fancy_svg($vars);\n\n if (isset($vars['content']['field_img']['data']['#item']['title']) && $vars['content']['field_img']['data']['#item']['title']!== ''){\n $title = $vars['content']['field_img']['data']['#item']['title'];\n $vars['content']['field_img']['desc'] = array(\n '#prefix' => '<div class=\"margin-t-05 margin-sm-h-2\"><p class=\"small\">',\n '#suffix' => '</p></div>',\n '#markup' => $title,\n '#weight' => 2,\n );\n }\n }\n}", "function display_image($entity)\n{\n\tglobal $config;\n\t\n\techo '\n\t\t\t<div class=\"heading-block clearfix\">\n\t\t\t\t<div class=\"heading-thumbnail\">';\n\t\t\t\t\n\t\n\tif (isset($entity->thumbnailUrl))\n\t{\n\t\techo '<img src=\"' . $config['thumbnail_cdn'] . get_thumbnail_url($entity->thumbnailUrl) . '\" />';\t\t\n\t}\t\n\telse\n\t{\n\t\techo '<img src=\"images/no-icon.svg\" />';\n\t}\n\t\t\n\techo '\n\t\t\t\t</div>\n\t\t\t\t<div class=\"heading-body\">\n\t\t\t\t\t<div class=\"heading-title\">';\n\t\t\t\t\t\n\techo get_literal_display($entity->name);\n\techo '\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"heading-description\">';\n\t\t\t\t\t\n\tif (isset($entity->description))\n\t{\n\t\techo '<div class=\"caption\">' . get_literal_display($entity->description) . '</div>';\n\t}\t\t\t\n\t\n\techo '<div id=\"identifiers\">';\n\techo '<ul class=\"identifier-list\">';\n\techo '<li><a class=\"external\" href=\"' . $entity->{'@id'} . '\" target=\"_new\">' . $entity->{'@id'} . '</a></li>';\n\techo '</ul>';\n\techo '</div>';\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\techo '\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>';\n\t\t\t\n\t// Display image\n\techo '<div>';\t\n\techo '<img class=\"image\" src=\"' .$entity->contentUrl->{'@id'} . '\" />';\t\n\techo '</div>';\n\n\n\n\techo '\n\t\t<script>figure_is_part_of(\"' . $entity->{'@id'} . '\", \"cited_by\");</script> \n\t';\n}", "public function getImage()\n {\n return $this->Image;\n }", "public function getImage(){\n $images = $this->getImageUrls($this->image_size);\n return Utils::saveImage($images->attr('data-url'));\n }", "public function getImage()\n {\n return $this->image;\n }", "public function get_image_link()\n {\n }", "private static function getImageInfoAsHtml($oContext, $patientDFN, $patientICN, $reportID, $caseNumber)\n {\n try\n {\n if($oContext == NULL || $oContext=='') \n {\n die('Must provide context instance!!!!');\n }\n $aImageInfo = raptor_imageviewing_getAvailImageMetadata($oContext, $patientDFN, $patientICN, $reportID, $caseNumber);\n if($aImageInfo['imageCount'] > 0)\n {\n //$returnInfo['thumnailImageUri'] = $thumnailImageUri; \n if($aImageInfo['imageCount'] == 1)\n {\n $sIC = '1 image';\n } else {\n $sIC = $aImageInfo['imageCount'] . ' images';\n }\n $sHTML = '<a onclick=\"jQuery('.\"'#iframe_a'\".').show();\" target=\"iframe_a\" href=\"'.$aImageInfo['viewerUrl'].'\">' . $sIC . ' (' . $aImageInfo['description'] . ') <img src=\"'.$aImageInfo['thumbnailImageUrl'].'\"></a>';\n } else {\n if($aImageInfo['imageCount'] == 0)\n {\n $sHTML = 'No Images Available';\n } else {\n //Some kind of error.\n $sHTML = 'No Images Available (check log file)';\n }\n }\n return $sHTML;\n } catch (\\Exception $ex) {\n error_log('Trouble getting VIX data: ' . print_r($ex,TRUE) . \"\\n\\tImageInfo>>>\".print_r($aImageInfo,TRUE));\n return $ex->getMessage();\n }\n }", "public function componentDetails()\n {\n return[\n 'name' => 'Logo',\n 'description' => ' Logo'\n ];\n }", "protected function getImageMeta(int $id){\n $image_alt=get_post_meta($id, '_wp_attachment_image_alt', true);\n return $image_alt;\n }", "public function getImageUrl()\n {\n return WEB_SERVER_BASE_URL . '/badges/images/' . $this->data['id'];\n }", "function template_bits_overview_row_normal( $group, $folder_blob, $count_string ) {\n\n$IPBHTML = \"\";\n//--starthtml--//\n\n$IPBHTML .= <<<EOF\n<div class='tablerow1' id='dv-{$group['group_name']}'>\n <div style='float:right'>\n ($count_string)&nbsp;{$group['easy_preview']}\n </div>\n <div align='left'>\n <img src='{$this->ipsclass->skin_acp_url}/images/folder.gif' alt='Группа шаблонов' style='vertical-align:middle' />\n {$folder_blob}&nbsp;<a style='font-size:11px' id='gn-{$group['group_name']}' onclick='template_load_bits(\"{$group['group_name']}\", event)' title='{$group['easy_desc']}' href='{$this->ipsclass->base_url}&{$this->ipsclass->form_code}&code=template-bits-list&id={$group['_id']}&p={$group['_p']}&group_name={$group['group_name']}&'>{$group['easy_name']}</a>\n <span id='match-{$group['group_name']}'></span>\n </div>\n</div>\nEOF;\n\n//--endhtml--//\nreturn $IPBHTML;\n}" ]
[ "0.63247466", "0.6130827", "0.6121675", "0.61037827", "0.608119", "0.60653335", "0.605454", "0.59207773", "0.59084535", "0.5888933", "0.58692646", "0.58255994", "0.58178234", "0.58129114", "0.58096987", "0.57675207", "0.5737811", "0.57258177", "0.5707907", "0.5690064", "0.5682436", "0.56807685", "0.5638178", "0.56294036", "0.56279474", "0.5596201", "0.5541986", "0.55392325", "0.55361456", "0.55290985", "0.5526302", "0.5511893", "0.55068415", "0.5497824", "0.5476603", "0.5469781", "0.544151", "0.5439306", "0.54367405", "0.54225194", "0.5415256", "0.5411833", "0.5400973", "0.53946376", "0.5391351", "0.5380008", "0.53780633", "0.53778076", "0.5350677", "0.5340173", "0.5327112", "0.5326024", "0.53104115", "0.5309904", "0.53083825", "0.5295859", "0.52949804", "0.5293726", "0.5282066", "0.5278556", "0.5274699", "0.52733123", "0.52710426", "0.5270421", "0.5266128", "0.52614444", "0.5260928", "0.5252803", "0.52522963", "0.5249767", "0.5249767", "0.5249767", "0.52430725", "0.5235637", "0.52323514", "0.5229707", "0.5228776", "0.5221684", "0.5220391", "0.52203673", "0.5220149", "0.5220149", "0.5220149", "0.5220149", "0.5212777", "0.5205483", "0.52053535", "0.5202726", "0.52016324", "0.5199946", "0.5197249", "0.5196278", "0.51952696", "0.5192812", "0.51924324", "0.51882565", "0.5185574", "0.51810396", "0.5181023", "0.51797056" ]
0.6395539
0
Get the Grouping page image template
public function getImageTemplate() { return $this->imageTemplate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "public function GetPageImage()\n {\n $imageID = $this->GetImageFromPageTable();\n if (is_null($imageID)) {\n $imageID = $this->GetImageFromDivisionTable();\n }\n\n $oImage = null;\n if (!is_null($imageID)) {\n /** @var $oImage TCMSImage */\n $oImage = new TCMSImage();\n $oImage->Load($imageID);\n }\n\n return $oImage;\n }", "public function template()\n {\n return $this->getView('flagrow.download.templates::image-preview');\n }", "abstract public function getTemplate();", "function getTemplate();", "function display_full_image_template($classified_id)\n {\n if (!$classified_id) {\n return false;\n }\n $db = DataAccess::getInstance();\n $listing = geoListing::getListing($classified_id);\n if ($listing && $listing->category) {\n $template_category = (int)$listing->category;\n } else {\n return false;\n }\n\n $view = geoView::getInstance();\n $view->setCategory((int)$template_category);\n //don't do the template stuff, let view class do that...\n //just set the vars\n $template_file = $view->getTemplateAttachment('84_detail', $this->language_id, $template_category);\n\n $this->get_image_data($db, $classified_id, 1);\n reset($this->images_to_display);\n\n $images = array();\n\n foreach ($this->images_to_display as $value) {\n $tpl = new geoTemplate(geoTemplate::MAIN_PAGE, '');\n\n //check any full sized image limits\n if (\n ($value[\"original_image_width\"] > $this->ad_configuration_data->MAXIMUM_FULL_IMAGE_WIDTH) ||\n ($value[\"original_image_height\"] > $this->ad_configuration_data->MAXIMUM_FULL_IMAGE_HEIGHT)\n ) {\n if (($value[\"original_image_width\"] > $this->ad_configuration_data->MAXIMUM_FULL_IMAGE_WIDTH) && ($value[\"original_image_height\"] > $this->ad_configuration_data->MAXIMUM_FULL_IMAGE_HEIGHT)) {\n $imageprop = ($this->ad_configuration_data->MAXIMUM_FULL_IMAGE_WIDTH * 100) / $value[\"original_image_width\"];\n $imagevsize = ($value[\"original_image_height\"] * $imageprop) / 100 ;\n $image_width = $this->ad_configuration_data->MAXIMUM_FULL_IMAGE_WIDTH;\n $image_height = ceil($imagevsize);\n\n if ($image_height > $this->ad_configuration_data->MAXIMUM_FULL_IMAGE_HEIGHT) {\n $imageprop = ($this->ad_configuration_data->MAXIMUM_FULL_IMAGE_HEIGHT * 100) / $value[\"original_image_height\"];\n $imagehsize = ($value[\"original_image_width\"] * $imageprop) / 100 ;\n $image_height = $this->ad_configuration_data->MAXIMUM_FULL_IMAGE_HEIGHT;\n $image_width = ceil($imagehsize);\n }\n } elseif ($value[\"original_image_width\"] > $this->ad_configuration_data->MAXIMUM_FULL_IMAGE_WIDTH) {\n $imageprop = ($this->ad_configuration_data->MAXIMUM_FULL_IMAGE_WIDTH * 100) / $value[\"original_image_width\"];\n $imagevsize = ($value[\"original_image_height\"] * $imageprop) / 100 ;\n $image_width = $this->ad_configuration_data->MAXIMUM_FULL_IMAGE_WIDTH;\n $image_height = ceil($imagevsize);\n } elseif ($value[\"original_image_height\"] > $this->ad_configuration_data->MAXIMUM_FULL_IMAGE_HEIGHT) {\n $imageprop = ($this->ad_configuration_data->MAXIMUM_FULL_IMAGE_HEIGHT * 100) / $value[\"original_image_height\"];\n $imagehsize = ($value[\"original_image_width\"] * $imageprop) / 100 ;\n $image_height = $this->ad_configuration_data->MAXIMUM_FULL_IMAGE_HEIGHT;\n $image_width = ceil($imagehsize);\n } else {\n $image_width = $value[\"original_image_width\"];\n $image_height = $value[\"original_image_height\"];\n }\n } else {\n $image_width = $value[\"original_image_width\"];\n $image_height = $value[\"original_image_height\"];\n }\n\n if ($value['icon']) {\n $image = \"<a href=\\\"\" . $value['url'] . \"\\\"><img src=\\\"\" . geoTemplate::getUrl('', $value['icon']) . \"\\\" alt=\\\"\\\" style=\\\"border: none;\\\" /></a>\";\n } else {\n $image = \"<img src='{$value[\"url\"]}' alt='' />\";\n }\n\n $tpl->assign('full_size_image', $image);\n if (strlen($value[\"image_text\"]) > 0) {\n $text = \"<br />\" . $value[\"image_text\"];\n $tpl->assign('full_size_text', $text);\n }\n\n $images[] = $tpl->fetch($template_file);\n }\n return $images;\n }", "public function getTemplate() {}", "public function getGroupByPage() {}", "public function getTemplatesHtml()\n\t{\n\t\t$path = 'global/slider/content/custom/groups';\n\n\t\t$templates = '';\n\t\tforeach (Mage::getConfig()->getNode($path)->children() as $group) {\n\t\t\t$templates .= $this->getChildHtml($group->getName() .'_content_type'). \"\\n\" ;\n\t\t}\n\n\t\treturn $templates;\n\t}", "function getTemplateHierarchy($template) {\n\t\t// whether or not .php was added\n\t\t$template_slug = rtrim($template, '.php');\n\t\t$template = $template_slug . '.php';\n\t\t\n\t\tif ( $theme_file = locate_template(array('image-widget/'.$template)) ) {\n\t\t\t$file = $theme_file;\n\t\t} else {\n\t\t\t$file = 'views/' . $template;\n\t\t}\n\t\treturn apply_filters( 'sp_template_image-widget_'.$template, $file);\n\t}", "public function getPrimaryImageOfPage()\n {\n return $this->primaryImageOfPage;\n }", "protected function GetImageFromDivisionTable()\n {\n $imageID = null;\n $activePage = $this->getActivePageService()->getActivePage();\n $oDivision = $activePage->getDivision();\n\n if (null !== $oDivision && is_array($oDivision->sqlData) && array_key_exists('images', $oDivision->sqlData)) {\n $oDivisionImages = $oDivision->GetImages('images');\n\n if ($oDivisionImages->Length() > 0) {\n /** @var $oImage TCMSImage */\n if ($this->bPickRandomImage) {\n $oImage = $oDivisionImages->Random();\n } else {\n $oImage = $oDivisionImages->Current();\n }\n $imageID = $oImage->id;\n }\n }\n\n return $imageID;\n }", "function get_gallery_single_template( $single_template ) {\n\n\tglobal $post;\n\n\tif ( $post->post_type == 'gallery' ) {\n\t\t$single_template = dirname( __FILE__ ) . '/templates/single-gallery.php';\n\t}\n\treturn $single_template;\n}", "public function getImage()\n\t{\n\t\treturn $this->generator->render($this->generateCode(), $this->params);\n\t}", "public function getGathercontentTemplate();", "function get_mob_template_imgs($mob_oper) {\n return $this->Trader_mdl->get_mobprefix($mob_oper);\n }", "public function getTemplatePathname() : string {\n\t\treturn $this->templateBasePath . '/linklist-group.mustache';\n\t}", "public function getNewsModalTemplates()\n {\n return $this->getTemplateGroup('news_');\n }", "function get_paged_template()\n {\n }", "function get_template()\n {\n }", "function pageGroup() {\n $thisDir = pathinfo($_SERVER['PHP_SELF'], PATHINFO_DIRNAME);\n $thisPage = pathinfo($_SERVER['PHP_SELF'], PATHINFO_BASENAME);\n\n $result = '';\n\n if (($thisDir == '/') && ($thisPage == 'index.php')) {\n $result = 'Home';\n }\n else if ($thisDir == '/why-choose-us') {\n $result = 'Why Choose Us?';\n }\n else if (($thisDir == '/big-button-cell-phone') && ($thisPage == 'index.php')) {\n $result = 'Phone';\n }\n else if ($thisDir == '/senior-cell-phone-plans') {\n $result = 'Plans';\n }\n else if ($thisDir == '/shop') {\n $result = 'Shop';\n }\n else if ($thisDir == '/catalog') {\n $result = 'Shop';\n }\n else if ($thisDir == '/one-call') {\n $result = 'oneCall';\n }\n else if ($thisDir == '/activate') {\n $result = 'Activate Phone';\n }\n\n return $result;\n //error_log(\"result: \" . $result);\n }", "function get_templ_image($post_id,$size='thumbnail') {\r\n\r\n\tglobal $post;\r\n\t/*get the thumb image*/\t\r\n\t$thumbnail = wp_get_attachment_image_src ( get_post_thumbnail_id ( $post_id ), $size ) ;\t\r\n\tif($thumbnail[0]!='')\r\n\t{\r\n\t\t$image_src=$thumbnail[0];\t\t\r\n\t}else\r\n\t{\r\n\t\t$post_img_thumb = bdw_get_images_plugin($post_id,$size); \r\n\t\t$image_src = $post_img_thumb[0]['file'];\r\n\t}\t\r\n\treturn $image_src;\r\n}", "function GetImage()\n {\n //Obtient les images par défaut de chaque produit de la fiche\n $ficheProduct = new EeCommerceFicheProductProduct($this->Core);\n $ficheProduct->AddArgument(new Argument(\"EeCommerceFicheProductProduct\", \"FicheId\", EQUAL, $this->IdEntite));\n $products = $ficheProduct->GetByArg();\n \n $html = \"<div>\";\n \n foreach($products as $product)\n {\n $img = new Image($product->Product->Value->ImageDefault->Value);\n $img->Alt = $img->Title = $product->Product->Value->NameProduct->Value;\n \n $html .= \"<div class='col-md-4' >\" . $img->Show().\"</div>\"; \n }\n \n $html .= \"</div>\";\n \n return $html;\n \n }", "function bethel_add_image_to_pages() {\n\tglobal $post;\n\tif ($post) {\n\t\t$image_id = get_post_thumbnail_id ($post->ID);\n\t\tif ($image_id) {\n\t\t\tif ($post->post_type != 'bethel_stories' && $post->page_template != 'stories.php') {\n\t\t\t\t$image = wp_get_attachment_image_src($image_id, 'bethel_supersize');\n\t\t\t\tif ($image) {\n\t\t\t\t\tif ($image[1] < 800) { //width\n\t\t\t\t\t\t$image[2] = round($image [2] / $image[1] * 800);\n\t\t\t\t\t}\n\t\t\t\t\t$image[2] = ($image[2] > 400) ? 400 : $image[2]; //height\n\t\t\t\t\techo \"<style type=\\\"text/css\\\">.entry-header { height: {$image[2]}px; background-image: url('{$image[0]}')}</style>\";\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\techo \"<style type=\\\"text/css\\\">\n .content .entry-header { margin-top: 75px; margin-top: 7.5rem }\n .content .entry-content { padding-top: 25px; padding-top: 2.5rem; }\n </style>\";\n\t\t}\n\t}\n}", "function get_header_image()\n {\n }", "protected function renderImage(){\n \n return sprintf(\n '<img src=\"%s\" title=\"%s\" alt=\"%s\">',\n $this->getField('url'),\n $this->getField('title',''),\n $this->getField('alt','')\n );\n \n }", "public function getImage() {\n return Mage::helper('landingpage/image')->getImageUrl($this->getData('image'));\n }", "public function getTemplate()\n {\n return $this->repeatParent;\n }", "public function getHtmlTemplate() {}", "public function getStickerPdfTemplate()\n {\n $sticker = $this->getStickerFilePath();\n\n $html = '<html><head><style>html,body {padding: 0; margin: 0;} hr {padding: 2px 0; margin: 0;}</style></head>'\n . '<body>'\n . '<div>'\n . '<img src=\"' . $sticker . '\"/>'\n . '<hr>'\n . '<img src=\"' . $sticker . '\"/>'\n . '</div>'\n . '</body>'\n . '</html>';\n\n return $html;\n }", "public function getItemTemplates()\n\t{\n\t\treturn $this->getTemplateGroup('item_');\n\t}", "public static function printGallery() {\r\n\t\t$elts = Acid::mod('Photo')->dbList(array(array('active','=',1)),array('pos'=>'ASC'));\r\n\t\treturn Acid::tpl('pages/gallery.tpl',array('elts'=>$elts),Acid::mod('Photo'));\r\n\t}", "function getTemplateHierarchy($template) {\n\t\t// whether or not .php was added\n\t\t$template_slug = rtrim($template, '.php');\n\t\t$template = $template_slug . '.php';\n\n\t\tif ( $theme_file = locate_template(array('social-icons/'.$template)) ) {\n\t\t\t$file = $theme_file;\n\t\t} else {\n\t\t\t$file = 'views/' . $template;\n\t\t}\n\t\treturn apply_filters( 'template_social-icons_'.$template, $file);\n\t}", "public function getTemplate(): string;", "public function getTemplate(): string;", "public function getTemplate(): string;", "public function getTemplate(): string;", "public function get_template()\n {\n }", "public function get_template()\n {\n }", "protected function getDocumentTemplate() {}", "protected function getDocumentTemplate() {}", "protected function getDocumentTemplate() {}", "protected function getDocumentTemplate() {}", "protected function getDocumentTemplate() {}", "protected function getDocumentTemplate() {}", "protected function getDocumentTemplate() {}", "protected function getDocumentTemplate() {}", "protected function getDocumentTemplate() {}", "public function getNewsTemplates()\n\t{\n\t\treturn $this->getTemplateGroup('news_');\n\t}", "protected function getPageTemplate()\n {\n return new Template();\n }", "protected function getGroupName() {\n\t\treturn 'tilesheet';\n\t}", "protected function getFluidTemplateObject() {}", "public function getImageAction()\n {\n $homebanner = $this->_getInitialBanner();\n $em = $this->getDoctrine()->getManager();\n $tagname = $homebanner->getName(); // Get image tag for home page banner slides\n\n $images = '';\n // TODO: add ability to use comma separated tags\n if (!empty($tagname)) {\n $images = $em->createQueryBuilder()\n ->select('bl')\n ->from('CmsXutBundle:Gist', 'bl')\n ->where('bl.type = :gisttype')\n ->setParameter('gisttype', 'image')\n ->addOrderBy('bl.date_created');\n\n $tag = $em->getRepository('CmsXutBundle:Tag')->findOneByName($tagname);\n if (count($tag) > 0) {\n $images = $images->innerJoin('bl.tags', 'tg')\n ->andWhere('tg.id = :tag')\n ->setParameter('tag', $tag->getId());\n\n $images = $images->getQuery()\n ->getResult();\n } else {\n $images = '';\n }\n }\n\n return $this->render('CmsHomeBannerBundle:Homebanner:images.html.twig', array(\n 'images' => $images,\n 'banner' => $homebanner\n ));\n }", "function getPageTemplate($post_ID) { \n return get_post_meta( $post_ID, '_wp_page_template', true ); \n }", "public function getTemplate()\r\n {\r\n return $this->_customTemplate;\r\n }", "function L_getImage($number) {\n\t\t\n\t\tglobal $post;\n\t\t$img = '';\n\t\t$output = preg_match_all('/<img.+src=[\\'\"]([^\\'\"]+)[\\'\"].*>/i', $post->post_content, $matches);\n\t\t$img = $matches [1] [$number];\n\n\t\treturn $img;\n\t\n\t}", "function album_gallery_get_page_content_show($GUID_USER, $GUID_IMAGE)\n{\n if(!$GUID_IMAGE || !$img = get_entity($GUID_IMAGE))\n {\n $immagine = elgg_view('elgg-album-gallery/error', array('error' => elgg_echo('gallery:no:imageshow')));\n $titolo = elgg_echo('gallery:title:error',array(elgg_echo('gallery:no:imageshow')));\n }\n else\n {\n $titolo = elgg_echo('gallery:title:showone',array($img->title));\n $immagine = elgg_view('elgg-album-gallery/show',array('title' => $img->title, 'desc' => $img->description, 'image' => $img->getIconURL('large'), 'guid' => $img->guid, 'guid_user' => $GUID_USER, 'action' => elgg_echo('gallery:delete:link')));\n }\n\n $return = array(\n 'title' => $titolo,\n 'content' => $immagine\n );\n\n return $return;\n}", "function getTemplate(){\n\t\treturn $this->html_result;\n\t}", "function img($image,$layout='')\n{\n return $image;\n}", "protected function GetTemplate()\n\t{\n\t\tif ($this->Plain())\n\t\t\treturn 'blobplain.tpl';\n\t\treturn 'blob.tpl';\n\t}", "function getAllImages() {\r\r\n\t$PView = new PView;\r\r\n\t$Template = new Template;\r\r\n\tglobal $tp;\r\r\n\t\r\r\n\t$pv_Appl = $PView -> getAppl();\r\r\n\t$ImageData = array();\r\r\n\t\r\r\n// prepare album-handling\r\r\n\tif ($pv_Appl[0] == \"album\"){\r\r\n\t\t$ImageCount = $PView -> getAlbumImageCount();\r\r\n\t\t$details = $PView->getPView_config(\"album_details\");\r\r\n\t\t$message = LAN_ALBUM_9;\r\r\n\t}\r\r\n// prepare category-handling\r\r\n\tif ($pv_Appl[0] == \"cat\"){\r\r\n\t\t$ImageCount = $PView -> getCatImageCount($pv_Appl[1]);\r\r\n\t\t$details = $PView->getPView_config(\"cat_details\");\r\r\n\t\t$message = LAN_GALLERY_12;\r\r\n\t}\t\r\r\n// prepare userimage-handling\r\r\n\tif ($pv_Appl[0] == \"user\"){\r\r\n\t\t$ImageCount = $PView -> getUserImageCount($pv_Appl[1]);\r\r\n\t\t$details = $PView->getPView_config(\"user_details\");\r\r\n\t\t$message = LAN_GALLERY_13;\r\r\n\t}\r\r\n\t\r\r\n\tglobal $applImages;\r\r\n\t$ImageData = $PView->sortApplImages($applImages);\r\r\n\t$showDetails = explode(\"|\",$details);\r\r\n\t\r\r\n\tif ($ImageCount) {\r\r\n\t\t$cols = 1;\r\r\n\t\t$pics = $PView -> getPView_config(\"pics_per_page\");\r\r\n\t\t$picCount = 0;\r\r\n\t\t$colwidth = 100/$cols;\r\r\n\t\tif ($_GET['page']) {\r\r\n\t\t\t$page = $_GET['page'];\r\r\n\t\t}\r\r\n\t\t$Pages = ceil($ImageCount/$pics);\r\r\n\t\tif (!$page or $page > $Pages) {\r\r\n\t\t\t$page = 1;\r\r\n\t\t}\r\r\n\t\t\r\r\n\t\t\r\r\n\t\t$out_AllImages = \"<tr>\";\r\r\n\t\tforeach ($ImageData as $dataset) {\r\r\n\t\t\t//PERMISSION!!!\r\r\n\t\t\tif ($PView -> getPermission(\"image\",$dataset['imageId'],\"View\")) {\r\r\n\t\t\t\t// insert images line by line, observe pagelimit\r\r\n\t\t\t\tif ($colCount == $cols) {\r\r\n\t\t\t\t\t$out_AllImages.= \"</tr><tr>\";\r\r\n\t\t\t\t\t$colCount = 0;\r\r\n\t\t\t\t}\r\r\n\t\t\t\tif ($picCount >= ($page - 1) * $pics && $picCount < $page * $pics) {\r\r\n\t\t\t\t\t$thumb = $PView -> getResizePath($dataset['imageId']);\r\r\n\t\t\t\t\tif ($PView->getPView_config(\"seo_links\")){\r\r\n\t\t\t\t\t\t$seo = \"&amp;name=\".$dataset['name'];\r\r\n\t\t\t\t\t} else {\r\r\n\t\t\t\t\t\t$seo = \"\";\r\r\n\t\t\t\t\t}\t\r\r\n\t\t\t\t\tif ($PView->getPView_config(\"center_thumbs\")){\r\r\n\t\t\t\t\t\t$infoPos = \"left:30%;\";\r\r\n\t\t\t\t\t} else{\r\r\n\t\t\t\t\t\t$infoPos = \"left:10px;\";\r\r\n\t\t\t\t\t}\r\r\n\t\t\t\t\t$backgr = \"background:url(\".e_PLUGIN.\"pviewgallery/templates/\".$PView -> getPView_config(\"template\").\"/images/gt.png) repeat;\";\t\t\r\r\n\t\t\t\t\t\t\t\t\t\t\r\r\n\t\t\t\t\t$out_AllImages.= \"<td style='vertical-align:top;width:\".$colwidth.\"%; border: #b7b5b5 1px solid; padding:5px; \".$Template->getThumbPosition().\"'><div style='position:relative;'><div style='position:relative;'>\".$Template -> getImageLink($pv_Appl[0],$dataset,'resize','resize','pview_gal').\"</div>\";\r\r\n\t\t\t\t\t\r\r\n\t\t\t\t\t$out_AllImages.= \"<div style='position:absolute; bottom:10px; \".$infoPos.\" width:40%; border: 2px solid #b7b5b5; text-align:left; padding: 5px; \".$backgr.\"'>\";\r\r\n\t\t\t\t\tforeach($showDetails as $detail){\r\r\n\t\t\t\t\t\t\r\r\n\t\t\t\t\t\tswitch($detail){\r\r\n\t\t\t\t\t\t\tcase \"name\":\r\r\n\t\t\t\t\t\t\t$out_AllImages.= \"<span><b>\".$tp -> toHTML($dataset['name']).\"</b></span>\";\r\r\n\t\t\t\t\t\t\tbreak;\r\r\n\t\t\t\t\t\t\tcase \"descr\":\r\r\n\t\t\t\t\t\t\t$out_AllImages.= \"<br/><span>\".$tp -> toHTML($dataset['description']).\"</span>\";\r\r\n\t\t\t\t\t\t\tbreak;\r\r\n\t\t\t\t\t\t\tcase \"user\":\r\r\n\t\t\t\t\t\t\t$userData = $PView->getUserData($dataset['uploaderUserId']);\r\r\n\t\t\t\t\t\t\t// LINK Abfrage: Link zur Anzeige aller Bilder des Users\r\r\n\t\t\t\t\t\t\tif ($PView->getPView_config(\"details_link\")){\r\r\n\t\t\t\t\t\t\t\t$out_AllImages.= \"<br/><a href='pviewgallery.php?user=\".$dataset['uploaderUserId'].\"'><span>\".$tp -> toHTML($userData['user_name']).\"</span></a>\";\r\r\n\t\t\t\t\t\t\t}else{\r\r\n\t\t\t\t\t\t\t\t$out_AllImages.= \"<br/><span>\".$tp -> toHTML($userData['user_name']).\"</span>\";\r\r\n\t\t\t\t\t\t\t}\r\r\n\t\t\t\t\t\t\tbreak;\r\r\n\t\t\t\t\t\t\tcase \"cat\":\r\r\n\t\t\t\t\t\t\tif ($catData = $PView -> getCatData($dataset['cat'])){\r\r\n\t\t\t\t\t\t\t\t$catName = $catData['name'];\r\r\n\t\t\t\t\t\t\t} else {\r\r\n\t\t\t\t\t\t\t\t$catName = LAN_IMAGE_46;\r\r\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\r\r\n\t\t\t\t\t\t\t// LINK Abfrage: Link zur Anzeige aller Bilder der Kategorie\r\r\n\t\t\t\t\t\t\tif ($PView->getPView_config(\"details_link\") && $dataset['cat']){\r\r\n\t\t\t\t\t\t\t\t$out_AllImages.= \"<br/><a href='pviewgallery.php?cat=\".$dataset['cat'].\"'><span>\".LAN_IMAGE_45.\": \".$tp -> toHTML($catName).\"</span></a>\";\r\r\n\t\t\t\t\t\t\t}else{\r\r\n\t\t\t\t\t\t\t\t$out_AllImages.= \"<br/><span>\".LAN_IMAGE_45.\": \".$tp -> toHTML($catName).\"</span>\";\r\r\n\t\t\t\t\t\t\t}\r\r\n\t\t\t\t\t\t\tbreak;\r\r\n\t\t\t\t\t\t\tcase \"date\":\r\r\n\t\t\t\t\t\t\t$out_AllImages.= \"<br/><span>\".$tp -> toHTML(date('d.m.Y',$dataset['uploadDate'])).\"</span>\";\r\r\n\t\t\t\t\t\t\tbreak;\r\r\n\t\t\t\t\t\t\tcase \"gal\":\r\r\n\t\t\t\t\t\t\t$albumData = $PView->getAlbumData($dataset['albumId']);\r\r\n\t\t\t\t\t\t\t// LINK Abfrage: Link zur Anzeige der Galerie\r\r\n\t\t\t\t\t\t\tif ($PView->getPView_config(\"details_link\")){\r\r\n\t\t\t\t\t\t\t\t$out_AllImages.= \"<br/><a href='pviewgallery.php?gallery=\".$albumData['galleryId'].\"'><span>\".$tp -> toHTML($PView->getGalleryName($albumData['galleryId'])).\"</span></a>\";\r\r\n\t\t\t\t\t\t\t}else{\r\r\n\t\t\t\t\t\t\t\t$out_AllImages.= \"<br/><span>\".$tp -> toHTML($PView->getGalleryName($albumData['galleryId'])).\"</span>\";\r\r\n\t\t\t\t\t\t\t}\r\r\n\t\t\t\t\t\t\tbreak;\r\r\n\t\t\t\t\t\t\tcase \"album\":\r\r\n\t\t\t\t\t\t\t// LINK Abfrage: Link zur Anzeige aller Bilder des albums\r\r\n\t\t\t\t\t\t\tif ($PView->getPView_config(\"details_link\")){\r\r\n\t\t\t\t\t\t\t\t$out_AllImages.= \"<br/><a href='pviewgallery.php?album=\".$dataset['albumId'].\"'><span>\".$tp -> toHTML($PView->getAlbumName($dataset['albumId'])).\"</span></a>\";\r\r\n\t\t\t\t\t\t\t}else{\r\r\n\t\t\t\t\t\t\t\t$out_AllImages.= \"<br/><span>\".$tp -> toHTML($PView->getAlbumName($dataset['albumId'])).\"</span>\";\r\r\n\t\t\t\t\t\t\t}\r\r\n\t\t\t\t\t\t\tbreak;\r\r\n\t\t\t\t\t\t\tcase \"edit\":\r\r\n\t\t\t\t\t\t\t//PERMISSION!!!\r\r\n\t\t\t\t\t\t\tif ($PView -> getPermission(\"album\",$dataset['sendImage'],\"Edit\")) {\r\r\n\t\t\t\t\t\t\t\t$out_AllImages.= \"<br/><a href='pview_actions.php?image=\".$dataset['imageId'].\"&amp;action=edit'><span>\".LAN_IMAGE_2.\"</span></a>\";\r\r\n\t\t\t\t\t\t\t}\r\r\n\t\t\t\t\t\t\tbreak;\r\r\n\t\t\t\t\t\t\tcase \"send\":\r\r\n\t\t\t\t\t\t\t//PERMISSION!!!\r\r\n\t\t\t\t\t\t\tif (($PView -> getPView_config(\"email\") && $dataset['sendImage']) OR (ADMIN && $PView -> getPView_config(\"admin_Mode\"))){\r\r\n\t\t\t\t\t\t\t\tif ($PView -> getPermission(\"config\",\"permEmail\",\"\")) {\r\r\n\t\t\t\t\t\t\t\t\t$out_AllImages.= \"<br/><a href='\".e_BASE.\"email.php?plugin:pviewgallery.\".$dataset['imageId'].\"'><span>\".LAN_IMAGE_48_1.\"</span></a>\";\r\r\n\t\t\t\t\t\t\t\t}\r\r\n\t\t\t\t\t\t\t}\r\r\n\t\t\t\t\t\t\tbreak;\r\r\n\t\t\t\t\t\t\tcase \"comm\":\r\r\n\t\t\t\t\t\t\tif ($PView->getPView_config(\"Comments\")){\r\r\n\t\t\t\t\t\t\t\t$out_AllImages.= \"<br /><span>\".LAN_IMAGE_4.\": \".$PView -> getCommentsCount($dataset['imageId']).\"</span>\";\r\r\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\r\r\n\t\t\t\t\t\t\tbreak;\t\r\r\n\t\t\t\t\t\t\tcase \"rating\":\r\r\n\t\t\t\t\t\t\tif ($PView->getPView_config(\"Rating\")){\r\r\n\t\t\t\t\t\t\t\t$ratingData = $PView -> getRatingData($dataset['imageId']);\r\r\n\t\t\t\t\t\t\t\t$out_AllImages.= \"<br /><span>\".LAN_IMAGE_3.\": \".round($ratingData['value'],1).\" (\".$ratingData['count'].\")</span>\";\r\r\n\t\t\t\t\t\t\t}\r\r\n\t\t\t\t\t\t\tbreak;\t\r\r\n\t\t\t\t\t\t\tcase \"views\":\r\r\n\t\t\t\t\t\t\t$out_AllImages.= \"<br/><span>\".LAN_IMAGE_16.\": \".$tp -> toHTML($dataset['views']).\" \".LAN_IMAGE_17.\"</span>\";\r\r\n\t\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\r\n\t\t\t\t\t\t}\t\t\t\r\r\n\t\t\t\t\t}\r\r\n\t\t\t\t\t$out_AllImages.= \"</div></div></td>\";\t\t\r\r\n\t\t\t\t\t$colCount++;\r\r\n\t\t\t\t}\r\r\n\t\t\t\t$picCount++;\r\r\n\t\t\t}\r\r\n\t\t}\r\r\n\t\t// fill row with empty cells\r\r\n\t\twhile ($colCount < $cols) {\r\r\n\t\t\t$out_AllImages.= \"<td>&nbsp;</td>\";\r\r\n\t\t\t$colCount++;\r\r\n\t\t}\r\r\n\t\t$out_AllImages.= \"</tr>\";\r\r\n\t\treturn $out_AllImages;\r\r\n\t}\r\r\n\treturn \"<div style='padding:10px;'>\".$message.\"</div>\";\r\r\n}", "function template_bits_overview_row_normal( $group, $folder_blob, $count_string ) {\n\n$IPBHTML = \"\";\n//--starthtml--//\n\n$IPBHTML .= <<<EOF\n<div class='tablerow1' id='dv-{$group['group_name']}'>\n <div style='float:right'>\n ($count_string)&nbsp;{$group['easy_preview']}\n </div>\n <div align='left'>\n <img src='{$this->ipsclass->skin_acp_url}/images/folder.gif' alt='Группа шаблонов' style='vertical-align:middle' />\n {$folder_blob}&nbsp;<a style='font-size:11px' id='gn-{$group['group_name']}' onclick='template_load_bits(\"{$group['group_name']}\", event)' title='{$group['easy_desc']}' href='{$this->ipsclass->base_url}&{$this->ipsclass->form_code}&code=template-bits-list&id={$group['_id']}&p={$group['_p']}&group_name={$group['group_name']}&'>{$group['easy_name']}</a>\n <span id='match-{$group['group_name']}'></span>\n </div>\n</div>\nEOF;\n\n//--endhtml--//\nreturn $IPBHTML;\n}", "public function imageTag($arrMatch) {\n \n $em = $this->getDoctrine()->getEntityManager();\n\n $image = $em->getRepository('BloggerGalleryBundle:Image')->find($arrMatch[1]);\n \n if (!$image) {\n throw $this->createNotFoundException('Unable to find image.');\n }\n \n return $this->renderView('BloggerGalleryBundle:Gallery:image.html.twig', array(\n 'image' => $image,\n ));\n \n }", "protected function content_template() {\n\t\t?>\n\t\t<#\n\t\t\tif ( 'left' == settings.image_position || 'right' == settings.image_position ) {\n\t\t\t\tif ( 'tablet' == settings.member_mob_view ) {\n\n\t\t\t\t\tview.addRenderAttribute( 'member-classname', 'class', 'uael-member-stacked-tablet' );\n\t\t\t\t}\n\t\t\t\tif ( 'mobile' == settings.member_mob_view ) {\n\n\t\t\t\t\tview.addRenderAttribute( 'member-classname', 'class', 'uael-member-stacked-mobile' );\n\t\t\t\t}\n\t\t\t\tif ( 'middle' == settings.member_image_valign ) {\n\t\t\t\t\tview.addRenderAttribute( 'member-classname', 'class', 'uael-member-image-valign-middle' );\n\t\t\t\t} else {\n\t\t\t\t\tview.addRenderAttribute( 'member-classname', 'class', 'uael-member-image-valign-top' );\n\t\t\t\t}\n\t\t\t}\n\t\t\tview.addRenderAttribute( 'member-classname', 'class', 'uael-team-member' );\n\t\t#>\n\t\t<div {{{ view.getRenderAttributeString( 'member-classname' ) }}} >\n\t\t\t<div class=\"uael-team-member-wrap\">\n\t\t\t\t<div class=\"uael-member-wrap\">\n\t\t\t\t\t<#\n\t\t\t\t\tvar image = {\n\t\t\t\t\t\tid: settings.image.id,\n\t\t\t\t\t\turl: settings.image.url,\n\t\t\t\t\t\tsize: settings.image_size,\n\t\t\t\t\t\tdimension: settings.image_custom_dimension,\n\t\t\t\t\t\tmodel: view.getEditModel()\n\t\t\t\t\t};\n\n\t\t\t\t\tvar image_url = elementor.imagesManager.getImageUrl( image );\n\t\t\t\t\tif( image_url !== '' ) {\n\t\t\t\t\t#>\n\t\t\t\t\t\t<div class=\"uael-team-member-image\"><img src=\"{{{ image_url }}}\" class=\"elementor-animation-{{{settings.hover_animation}}}\" ></div>\n\t\t\t\t\t\t<#\n\t\t\t\t\t}\n\t\t\t\t\tview.addRenderAttribute( 'member_content', 'class', 'uael-team-member-content' ); #>\n\t\t\t\t\t<div {{{ view.getRenderAttributeString( 'member_content' )}}} >\n\t\t\t\t\t\t<div class=\"uael-team-member-name\">\n\t\t\t\t\t\t\t<# if ( '' !== settings.team_member_name ) {\n\t\t\t\t\t\t\t\tview.addRenderAttribute( 'team_member_name', 'class', 'uael-team-name' );\n\t\t\t\t\t\t\t\tview.addInlineEditingAttributes( 'team_member_name' );\n\t\t\t\t\t\t\t\tvar memberNameHtml = settings.team_member_name;\n\t\t\t\t\t\t\t\t#>\n\t\t\t\t\t\t\t\t<{{{settings.name_size}}} {{{ view.getRenderAttributeString( 'team_member_name' )}}}>{{{settings.team_member_name}}}</{{{settings.name_size}}}>\n\t\t\t\t\t\t\t<# } #>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<# \n\t\t\t\t\t\tif( 'yes' == settings.separator_settings) {\n\t\t\t\t\t\t\tif( 'below_name' == settings.separator_position ) { #>\n\t\t\t\t\t\t\t\t<div class=\"uael-separator-wrapper\">\n\t\t\t\t\t\t\t\t\t<div class=\"uael-separator\"></div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<# } #>\n\t\t\t\t\t\t<# } #>\n\t\t\t\t\t\t<div class=\"uael-team-member-designation\">\n\t\t\t\t\t\t\t<# if ( '' !== settings.team_member_desig ) {\n\t\t\t\t\t\t\t\tview.addRenderAttribute( 'team_member_desig', 'class', 'uael-team-desig' );\n\n\t\t\t\t\t\t\t\tview.addInlineEditingAttributes( 'team_member_desig' );\n\n\t\t\t\t\t\t\t\tvar memberDesignHtml = settings.team_member_desig;\n\t\t\t\t\t\t\t\t#>\n\t\t\t\t\t\t\t\t<div {{{ view.getRenderAttributeString( 'team_member_desig' ) }}}>{{{ memberDesignHtml }}}</div>\n\t\t\t\t\t\t\t<# } #>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<# if( 'yes' == settings.separator_settings) {\n\t\t\t\t\t\t\tif( 'below_desig' == settings.separator_position ) { #>\n\t\t\t\t\t\t\t\t<div class=\"uael-separator-wrapper\">\n\t\t\t\t\t\t\t\t\t<div class=\"uael-separator\"></div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<# } #>\n\t\t\t\t\t\t<# } #>\n\t\t\t\t\t\t<div class=\"uael-team-member-desc\">\n\t\t\t\t\t\t\t<# if ( '' !== settings.team_member_desc ) {\n\t\t\t\t\t\t\t\tview.addRenderAttribute( 'team_member_desc', 'class', 'uael-team-desc' );\n\n\t\t\t\t\t\t\t\tview.addInlineEditingAttributes( 'team_member_desc' );\n\n\t\t\t\t\t\t\t\tvar memberDescHtml = settings.team_member_desc;\n\t\t\t\t\t\t\t\t#>\n\t\t\t\t\t\t\t\t<div {{{ view.getRenderAttributeString( 'team_member_desc' ) }}}>{{{ memberDescHtml }}}</div>\n\t\t\t\t\t\t\t<# } #>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<# if( 'yes' == settings.separator_settings) {\n\t\t\t\t\t\t\tif( 'below_desc' == settings.separator_position ) { #>\n\t\t\t\t\t\t\t\t<div class=\"uael-separator-wrapper\">\n\t\t\t\t\t\t\t\t\t<div class=\"uael-separator\"></div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<# } #>\n\t\t\t\t\t\t<# } #>\n\t\t\t\t\t\t<# if( 'yes' == settings.social_icons_settings) { #>\n\t\t\t\t\t\t\t<# var iconsHTML = {}; #>\n\t\t\t\t\t\t\t<div class=\"elementor-social-icons-wrapper\">\n\t\t\t\t\t\t\t\t<div class=\"uael-team-social-icon\">\n\t\t\t\t\t\t\t\t\t<# _.each( settings.social_icon_list, function( item, index ) { #>\n\t\t\t\t\t\t\t\t\t\t<?php if ( UAEL_Helper::is_elementor_updated() ) { ?>\n\t\t\t\t\t\t\t\t\t\t\t<# var link = item.link ? item.link.url : '',\n\t\t\t\t\t\t\t\t\t\t\t\tmigrated = elementor.helpers.isIconMigrated( item, 'new_social' ),\n\t\t\t\t\t\t\t\t\t\t\t\tsocial = elementor.helpers.getSocialNetworkNameFromIcon( item.new_social, item.social, false, migrated );\n\t\t\t\t\t\t\t\t\t\t\t\t#>\n\t\t\t\t\t\t\t\t\t\t\t\t<a class=\"elementor-icon elementor-social-icon elementor-social-icon-{{ social }} elementor-animation-{{ settings.icon_hover_animation }} elementor-repeater-item-{{item._id}}\" href=\"{{ link }}\">\n\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"elementor-screen-only\">{{{ social }}}</span>\n\n\t\t\t\t\t\t\t\t\t\t\t\t<#\n\t\t\t\t\t\t\t\t\t\t\t\t\ticonsHTML[ index ] = elementor.helpers.renderIcon( view, item.new_social, {}, 'i', 'object' );\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ( ( ! item.social || migrated ) && iconsHTML[ index ] && iconsHTML[ index ].rendered ) { #>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{{{ iconsHTML[ index ].value }}}\n\t\t\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\t\t<i class=\"{{ item.social }}\"></i>\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#>\n\t\t\t\t\t\t\t\t\t\t\t</a>\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<# var link = item.link ? item.link.url : '',\n\t\t\t\t\t\t\t\t\t\t\tsocial = item.social.replace( 'fa fa-', '' ); #>\n\t\t\t\t\t\t\t\t\t\t\t<a class=\"elementor-icon elementor-social-icon elementor-social-icon-{{ social }} elementor-animation-{{ settings.icon_hover_animation }}\" href=\"{{ link }}\">\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"elementor-screen-only\">{{{ social }}}</span>\n\t\t\t\t\t\t\t\t\t\t\t\t<i class=\"{{ item.social }}\"></i>\n\t\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t\t<?php } ?>\n\t\t\t\t\t\t\t\t\t<# } ); #>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<# } #>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t}", "public function getContentPageTpl()\n {\n $aTemplate = array();\n $sContentId = $this->getContent()->oxcontents__oxloadid->value;\n $myConfig = $this->getConfig();\n if ($sContentId == $myConfig->getConfigParam('sRDFaBusinessEntityLoc')) {\n $aTemplate[] = $this->_sBusinessTemplate;\n }\n if ($sContentId == $myConfig->getConfigParam('sRDFaDeliveryChargeSpecLoc')) {\n $aTemplate[] = $this->_sDeliveryTemplate;\n }\n if ($sContentId == $myConfig->getConfigParam('sRDFaPaymentChargeSpecLoc')) {\n $aTemplate[] = $this->_sPaymentTemplate;\n }\n\n return $aTemplate;\n }", "protected function GetImageFromPageTable()\n {\n $imageID = null;\n $activePage = $this->getActivePageService()->getActivePage();\n if (array_key_exists('images', $activePage->sqlData)) {\n $oPageImages = $activePage->GetImages('images');\n if ($oPageImages->Length() > 0) {\n /** @var $oImage TCMSImage */\n if ($this->bPickRandomImage) {\n $oImage = $oPageImages->Random();\n } else {\n $oImage = $oPageImages->Current();\n }\n $imageID = $oImage->id;\n }\n }\n\n return $imageID;\n }", "function LayoutGetImage($params=null) // must return string\n{\n global $DB, $sdurl, $userinfo, $plugin_names, $plugin_folder_to_id_arr;\n\n // Below are several security checks to assure, that the passed on plugin-id\n // is valid, the plugin and it's image path exist etc.\n if( !isset($params) || !is_array($params) || (count($params) < 1) ||\n (count($params) > 2) || empty($userinfo['pluginviewids']) )\n {\n return '';\n }\n $image_id = Is_Valid_Number($params[0], 0, 1);\n $plugin_id = 17; //default!\n $w = $h = 0;\n if(isset($params[1]))\n {\n if($p_arr = @preg_split('#,#',$params[1],0,PREG_SPLIT_NO_EMPTY))\n {\n $plugin_id = Is_Valid_Number($p_arr[0], 17, 1);\n $p_arr = array_slice($p_arr,1);\n foreach($p_arr as $p)\n {\n if($p2_arr = @preg_split('#=#',$p,0,PREG_SPLIT_NO_EMPTY))\n {\n if(($p2_arr[0]=='w') && isset($p2_arr[1])) $w = intval($p2_arr[1]);\n if(($p2_arr[0]=='h') && isset($p2_arr[1])) $h = intval($p2_arr[1]);\n }\n }\n\n }\n }\n\n // Sanity checks:\n if( ($image_id < 0) || !$plugin_id || !isset($plugin_names[$plugin_id]) ||\n !in_array($plugin_id, $userinfo['pluginviewids']) )\n {\n return '';\n }\n\n if(empty($image_id))\n {\n $image_id = ' ORDER BY RAND() LIMIT 1';\n }\n else\n {\n $image_id = ' AND i.imageid = '.(int)$image_id;\n }\n $columns = '';\n if($plugin_id >= 5000)\n {\n $columns= ', s.folder, s.access_view';\n }\n\n if(!$folder = array_search($plugin_id, $plugin_folder_to_id_arr)) return '';\n $folder = 'plugins/'.$folder.'/images/';\n if(!is_readable(ROOT_PATH.$folder)) return '';\n\n $sections = empty($userinfo['categoryviewids']) ? '0' : implode(',',$userinfo['categoryviewids']);\n $DB->ignore_error = true;\n $image_arr = $DB->query_first(\"SELECT i.* $columns FROM {p\".$plugin_id.'_images} i'.\n ' INNER JOIN {p'.$plugin_id.'_sections} s ON s.sectionid = i.sectionid'.\n ' WHERE i.activated = 1 AND s.activated = 1 '.\n ' AND s.sectionid IN (%s) %s',\n $sections, $image_id);\n $DB->ignore_error = false;\n\n if(!$image_arr || empty($image_arr['imageid']))\n {\n return 'Image not available!';\n }\n $imagetitle = htmlspecialchars($image_arr['title'], ENT_COMPAT);\n if(isset($image_arr['folder'])) $folder .= $image_arr['folder']; // Media Gallery subfolder support\n $img_md_exists = file_exists(ROOT_PATH.$folder . 'md_' . $image_arr['filename']);\n $image_path = $folder . ($img_md_exists ? 'md_' : '') . $image_arr['filename'];\n if(!$w || !$h)\n {\n list($w, $h, $type, $attr) = @getimagesize(ROOT_PATH.$image_path);\n }\n\n return '<img title=\"' . $imagetitle . '\" alt=\"image\" src=\"' .\n $sdurl. $image_path . '\" width=\"' . $w . '\" height=\"' . $h . '\" />';\n\n}", "function getImageDifferentPlaces($limitImages=0) {\n \tif ($this->config['mode']=='DIRECTORY') {\n \t\t$content.=$this->getImagesDirectory($limitImages);\n \t} elseif ($this->config['mode']=='RECORDS') {\n \t\t$content.=$this->getImagesRecords($limitImages);\n } elseif ($this->config['mode']=='DAM') {\n \t\t$content.=$this->getImagesDam($limitImages);\n } elseif ($this->config['mode']=='DAMCAT') {\n \t\t$content.=$this->getImagesDamCat($limitImages);\n } \n \n // hook\n if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rgsmoothgallery']['extraDifferentPlaces'])) {\n foreach($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rgsmoothgallery']['extraDifferentPlaces'] as $_classRef) {\n\t\t\t\t$_procObj = & t3lib_div::getUserObj($_classRef);\n\t\t\t\t$content = $_procObj->extraBeginGalleryProcessor($content, $limitImages,$this);\n }\n } \n \treturn $content;\n }", "function createImage($idName) { //TODO: Add parameter for passing image files to use instead \n echo '<img src=\"/php/cms-img/file2.png\" id=\"' . $idName . '\" class=\"nested\"/>';\n }", "public function new(){\n $filehelper = new FileHelper;\n\n $header_images = $filehelper->getImagesInDirectory('default_headers', \"Preview Header\");\n $avatar_images = $filehelper->getImagesInDirectory('default_avatars', \"Preview Avatar\");\n return view('groups.new', ['header_images'=>$header_images, 'avatar_images'=>$avatar_images]);\n }", "function get_repeater_type(){\n return $this->is_group() ? 'group' : 'single';\n }", "protected function imageName() {}", "function theme_header_image()\n{\n $headerImage = get_theme_option('Header Image');\n if ($headerImage) {\n $storage = Zend_Registry::get('storage');\n $headerImage = $storage->getUri($storage->getPathByType($headerImage, 'theme_uploads'));\n return '<div id=\"header-image\"><img src=\"' . $headerImage . '\" /></div>';\n }\n}", "function get_pictures_and_pdf() {\n\tif ( is_singular( 'companies' ) ) {\n\t\t$field_name = 'company_pictures_and_pdf';\n\t}\n\tif ( is_singular( 'group_of_companies' ) ) {\n\t\t$field_name = 'group_of_companies_pictures_and_pdf';\n\t}\n\tif ( get_field($field_name) ) {\n\t\t$file_ids = get_field($field_name);\n\t\tforeach ($file_ids as $file_id) {\n\t\t\t$file_type = $file_id['mime_type'];\n\t\t\tif ($file_type == 'application/pdf') {\n\t\t\t\t$my_thumbnail_id = get_post_thumbnail_id($file_id['id']);\n\t\t\t\t?>\n\t\t\t\t<div class=\"item\">\n\t\t\t\t\t<a href=\"<?php echo wp_get_attachment_url($file_id['id']); ?>\">\n\t\t\t\t\t\t<img src=\"<?php echo wp_get_attachment_url( $my_thumbnail_id ); ?>\" alt=\"Owl Image\">\n\t\t\t\t\t</a>\n\t\t\t\t</div>\n\t\t\t\t<?php\n\t\t\t}\n\t\t\telse {\n\t\t\t\t?>\n\t\t\t\t<div class=\"item\">\n\t\t\t\t\t<a href=\"<?php echo $file_id['url']; ?>\">\n\t\t\t\t\t\t<img src=\"<?php echo $file_id['url']; ?>\" alt=\"Owl Image\">\n\t\t\t\t\t</a>\n\t\t\t\t</div>\n\t\t\t\t<?php\n\t\t\t}\n\t\t}\n\t}\n}", "public function getModulTemplates()\n\t{\n\t\treturn $this->getTemplateGroup('mod_bn_');\n\t}", "public function getTemplate(){\n\t\treturn $this->template;\n\t}", "function template_group_name($params,&$smarty)\n {\n extract($params);\n\n $name = group_name($id);\n return $name;\n }", "public function getAvatarTemplateId()\n {\n return $this->avatar_template_id;\n }", "public function render()\n {\n $fallbackLogo = FileUtility::findFilesBy(1, 'pages', 'logo');\n\n $page = $this->getPage();\n $logo = FileUtility::findFilesBy($page['uid'], 'pages', 'logo');\n\n if (!is_array($logo) || empty($logo)) {\n $logo = $fallbackLogo;\n }\n\n if (is_array($logo)) {\n $this->templateVariableContainer->add('logo', $logo[0] ?? null);\n }\n }", "static function capture ($template_name, $vars = array ())\n\t{\n\t\t$vars['template'] = $template_name;\n\t\treturn C_Displayed_Gallery_Renderer::get_instance()->display_images($vars);\n\t}", "public function getSummaryThumbnail() {\n $data = [];\n if ($this->Image() && $this->Image()->exists()) {\n // Stretch to maximum of 36px either way then trim the extra off\n if ($this->Image()->getOrientation() === Image_Backend::ORIENTATION_PORTRAIT) {\n $data['Image'] = $this->Image()->ScaleWidth(36)->CropHeight(36);\n } else {\n $data['Image'] = $this->Image()->ScaleHeight(36)->CropWidth(36);\n }\n }\n return $this->customise($data)->renderWith(__CLASS__ . '/SummaryThumbnail')->forTemplate();\n }", "function catch_that_image() {\n global $post;\n\n $first_img = get_template_directory_uri() . '/img/svg/one.svg';\n\n $output = preg_match_all('/<img.+src=[\\'\"]([^\\'\"]+)[\\'\"].*>/i', $post->post_content, $matches);\n\n\tif(isset($matches[1][0])) {\n\t\t$first_img = $matches[1][0];\n\t}\n\n return $first_img;\n}", "public function getTemplate () {\r\n\t\treturn $this->_template;\r\n\t}", "public function processaTemplate() {\n return $this->fetch('ricerca_'.$this->_layout.'.tpl');\n }", "public static function getTemplatePage()\n {\n return self::$templatePage;\n }", "function get_first_image(){\n\tglobal $post, $posts; \n\t$first_img = ''; \n\tob_start(); \n\tob_end_clean(); \n\t$output = preg_match_all('/<img.+src=[\\'\"]([^\\'\"]+)[\\'\"].*>/i', $post->post_content, $matches); \n\t$first_img = $matches[1][0]; \n\t\n\tif(empty($first_img)){ \n\t\t$first_img = get_template_directory_uri(). '/images/myhead.jpg'; \n\t}\n\t\n\treturn $first_img; \n}", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }" ]
[ "0.606352", "0.606352", "0.606352", "0.606352", "0.606352", "0.606352", "0.60310316", "0.60152334", "0.5967853", "0.58967674", "0.58528733", "0.5826934", "0.57025737", "0.5688037", "0.5671982", "0.56544805", "0.5644574", "0.5632341", "0.5596304", "0.55674213", "0.556342", "0.5535117", "0.55079395", "0.54976696", "0.5495515", "0.5471671", "0.5462954", "0.54624003", "0.54622966", "0.5458241", "0.540099", "0.53973997", "0.5395152", "0.5383874", "0.53819805", "0.5373001", "0.53636533", "0.5356788", "0.53537273", "0.53537273", "0.53537273", "0.53537273", "0.53374314", "0.53373337", "0.53302723", "0.53302723", "0.53295743", "0.53295743", "0.53295743", "0.53295743", "0.53281885", "0.53270966", "0.53270966", "0.53109246", "0.5310437", "0.53069", "0.5306061", "0.5281983", "0.5280971", "0.5262005", "0.52610874", "0.5259359", "0.5251208", "0.52474797", "0.52369803", "0.5233528", "0.52278286", "0.5222166", "0.52160585", "0.52137923", "0.5212822", "0.5212586", "0.5209738", "0.51940095", "0.5189911", "0.5188796", "0.5179924", "0.5177218", "0.5176399", "0.5169027", "0.5166384", "0.5159754", "0.51539934", "0.5152768", "0.51524657", "0.51514167", "0.51490855", "0.5144536", "0.5139417", "0.5137312", "0.5131885", "0.5125416", "0.5125416", "0.5125416", "0.5125416", "0.5125416", "0.5125416", "0.5125416", "0.5125416", "0.5125416" ]
0.69365734
0
Get the Grouping page description html
public function getDescriptionTextHtml() { return $this->descriptionTextHtml; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function description()\n\t{\n\t\t$txt = array();\n\t\t$txt['wiki'] = \"Displays group events\";\n\t\t$txt['html'] = '<p>Displays group events.</p>';\n\t\t$txt['html'] = '<p>Examples:</p>\n\t\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t\t<li><code>[[Groupevent(number=3)]]</code> - Displays the next three group events</li>\n\t\t\t\t\t\t\t\t<li><code>[[Groupevent(title=Group Events, number=2)]]</code> - Adds title above event list. Displays 2 events.</li>\n\t\t\t\t\t\t\t\t<li><code>[[Groupevent(id=123)]]</code> - Displays single group event with ID # 123</li>\n\t\t\t\t\t\t\t</ul>';\n\t\treturn $txt['html'];\n\t}", "public function options_page_overview() \n\t\t{\n\t\t\t$html = '';\n\t\t\t\n\t\t\tforeach( $this->size_groups as $size_group => $sizes ) \n\t\t\t{\n\t\t\t\t$html .= '<h3>' . $this->get_group_headline( $size_group ) . '</h3>';\n\t\t\t\t\n\t\t\t\t$html .= '<ul>';\n\t\t\t\t\n\t\t\t\tforeach( $sizes as $key => $image ) \n\t\t\t\t{\n\t\t\t\t\t$info = $image['width'] . '*' . $image['height'];\n\t\t\t\t\tif( isset( $image['crop'] ) && true === $image['crop'] )\n\t\t\t\t\t{\n\t\t\t\t\t\t$info .= ' ' . __( '(cropped)', 'avia_framework' );\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$info .= ' - ' . $this->get_image_key_info( $key );\n\t\t\t\t\t\n\t\t\t\t\t$html .= '<li>' . $info . '</li>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$html .= '</ul>';\n\t\t\t}\n\t\t\t\n\t\t\treturn $html;\n\t\t}", "public function getGroupDescription() : string\n {\n return $this->groupDescription;\n }", "public function getGroupDescription()\n {\n return $this->__get(self::FIELD_GROUP_DESCRIPTION);\n }", "function get_group_description($group) {\n\tglobal $home_locale, $current_locale;\n\tif ($home_locale == $current_locale\n\t\t\t|| !isset($group['vccommondescription'])\n\t\t\t|| !$group['vccommondescription']) {\n\t\treturn $group['vclocaldescription'];\n\t} else {\n\t\treturn $group['vccommondescription'];\n\t}\n}", "public function getGroupsDescription()\n {\n if (class_exists(Subsite::class)) {\n Subsite::disable_subsite_filter(true);\n }\n\n // Get the member's groups, if any\n $groups = $this->owner->Groups();\n if ($groups->Count()) {\n // Collect the group names\n $groupNames = array();\n foreach ($groups as $group) {\n /** @var Group $group */\n $groupNames[] = html_entity_decode($group->getTreeTitle() ?? '');\n }\n // return a csv string of the group names, sans-markup\n $result = preg_replace(\"#</?[^>]>#\", '', implode(', ', $groupNames));\n } else {\n // If no groups then return a status label\n $result = _t(__CLASS__ . '.NOGROUPS', 'Not in a Security Group');\n }\n\n if (class_exists(Subsite::class)) {\n Subsite::disable_subsite_filter(false);\n }\n return $result;\n }", "public function getContent()\n\t\t{\n\t\t\treturn $this->getGroup();\n\t\t\t\n\t\t}", "public function detail(): string\n {\n return $this->groupDetail ?? '';\n }", "function PageSummaries_getHtml($id) {\n\t$PAGEDATA=Page::getInstance($id);\n\tglobal $sitedomain;\n\t$r=dbRow('select * from page_summaries where page_id=\"'.$PAGEDATA->id.'\"');\n\tif (!count($r)) {\n\t\treturn '<em>'.__(\n\t\t\t'This page is marked as a page summary, but there is no '\n\t\t\t.'information on how to handle it.'\n\t\t)\n\t\t\t.'</em>';\n\t}\n\tif ($r['rss']) {\n\t\treturn PageSummaries_rssToHtml($r['rss']);\n\t}\n\t// { build rss\n\t$title=($PAGEDATA->title=='')\n\t\t?$sitedomain\n\t\t:htmlspecialchars($PAGEDATA->title);\n\t$rss='<'.'?xml version=\"1.0\" ?'.'><rss version=\"2.0\"><channel><title>'\n\t\t.$title.'</title>';\n\t$rss.='<link>'.$_SERVER['REQUEST_URI'].'</link><description>RSS for '\n\t\t.$PAGEDATA->name.'</description>';\n\t$category=$PAGEDATA->category?' and category=\"'.$PAGEDATA->category.'\"':'';\n\t$containedpages=PageSummaries_getContainedPages($r['parent_id']);\n\tif (count($containedpages)) {\n\t\t$q2=dbAll(\n\t\t\t'select edate,name,title,body from pages where id in ('\n\t\t\t.join(',', $containedpages).')'.$category.' order by cdate desc limit 20'\n\t\t);\n\t\tforeach ($q2 as $r2) {\n\t\t\t$rss.='<item>';\n\t\t\tif (!$r2['title']) {\n\t\t\t\t$r2['title']=$r2['name'];\n\t\t\t}\n\t\t\t$rss.='<title>'.htmlspecialchars($r2['title']).'</title>';\n\t\t\t$rss.='<pubDate>'.Core_dateM2H($r2['edate']).'</pubDate>';\n\t\t\t// { build body\n\t\t\tif ($r['amount_to_show']==0 || $r['amount_to_show']==1) {\n\t\t\t\t$length=$r['amount_to_show']==0?300:600;\n\t\t\t\t$body=substr(\n\t\t\t\t\tpreg_replace(\n\t\t\t\t\t\t'/<[^>]*>/',\n\t\t\t\t\t\t'',\n\t\t\t\t\t\tstr_replace(\n\t\t\t\t\t\t\tarray('&amp;', '&nbsp;', '&lsquo;'),\n\t\t\t\t\t\t\tarray('&',' ','&apos;'),\n\t\t\t\t\t\t\t$r2['body']\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t\t0,\n\t\t\t\t\t$length\n\t\t\t\t)\n\t\t\t\t.'...';\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$body=$r2['body'];\n\t\t\t}\n\t\t\t$body=str_replace('&euro;', '&#8364;', $body);\n\t\t\t// }\n\t\t\t$rss.='<description>'.$body.'</description>';\n\t\t\t$rss.='<link>http://'.$_SERVER['HTTP_HOST'].'/'\n\t\t\t\t.urlencode(str_replace(' ', '-', $r2['name'])).'</link>';\n\t\t\t$rss.='</item>';\n\t\t}\n\t}\n\t$rss.='</channel></rss>';\n\tdbQuery(\n\t\t'update page_summaries set rss=\"'.addslashes($rss)\n\t\t.'\" where page_id=\"'.$PAGEDATA->id.'\"'\n\t);\n\t// }\n\treturn PageSummaries_rssToHtml($rss);\n}", "public function pageContent()\r\n\t{\r\n\t\t$this->displayList();\r\n\t\t$content = '\r\n<div align=\"center\"><table width=\"60%\" border=\"1\" class=\"infoView\">\r\n <tbody>\r\n <tr>\r\n <th scope=\"col\">Manage a Department</th>\r\n </tr>\r\n \t '.$this->dList.'\r\n </tbody>\r\n</table></div>\r\n\t\t';\r\n\t\treturn $content;\r\n\t}", "public function description()\n\t{\n\t\t$txt = array();\n\t\t$txt['wiki'] = 'Generates a link to a random page.';\n\t\t$txt['html'] = '<p>Generates a link to a random page.</p>';\n\t\treturn $txt['html'];\n\t}", "function getHTML()\n\t{\t\t\t\t\n\t\t// getHTML() is called by ilRepositoryGUI::show()\n\t\tif($this->id_type == self::REPOSITORY_NODE_ID)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// there is no way to do a permissions check here, we have no wsp\n\t\t\n\t\t$this->filterInactivePostings();\n\t\t\n\t\t$list_items = $this->getListItems();\t\t\n\t\t\n\t\t$list = $nav = \"\";\n\t\tif($list_items)\n\t\t{\t\t\t\t\n\t\t\t$list = $this->renderList($list_items, \"previewEmbedded\");\n\t\t\t$nav = $this->renderNavigation($this->items, \"gethtml\", \"previewEmbedded\");\n\t\t}\t\t\n\t\t\n\t\treturn $this->buildEmbedded($list, $nav);\t\t\n\t}", "public function getTemplatesHtml()\n\t{\n\t\t$path = 'global/slider/content/custom/groups';\n\n\t\t$templates = '';\n\t\tforeach (Mage::getConfig()->getNode($path)->children() as $group) {\n\t\t\t$templates .= $this->getChildHtml($group->getName() .'_content_type'). \"\\n\" ;\n\t\t}\n\n\t\treturn $templates;\n\t}", "public function render(string $groupContent, ?array $middleware = null, ?string $description = null): string;", "public function getGroupByPage() {}", "public function displayPage()\n {\n $this->getState()->template = 'displaygroup-page';\n }", "protected function getContents()\n {\n $contents = $this->crawler->filter('.page.group');\n if (!$contents->count()) {\n return;\n }\n\n $contents = $contents->html();\n\n // I'll have my own syntax highlighting, WITH BLACKJACK AND HOOKERS\n $this->crawler->filter('pre')->each(function ($code) use (&$contents) {\n $unformatted = htmlentities($code->text());\n $unformatted = '<pre><code class=\"php\">'.$unformatted.'</code></pre>';\n $contents = str_replace('<pre class=\"code php\">'.$code->html().'</pre>', $unformatted, $contents);\n });\n\n return $contents;\n }", "public function getHTML() {\n\t\tglobal $tpl;\n\n $tpl->addCss(\n 'Customizing/global/plugins/Services/Repository/RepositoryObject/'\n . 'Review/templates/default/css/Review.css'\n );\n $path_to_il_tpl = ilPlugin::getPluginObject(\n IL_COMP_SERVICE,\n 'Repository',\n 'robj',\n 'Review'\n )->getDirectory();\n $custom_tpl = new ilTemplate(\n \"tpl.aspect_row.html\",\n true,\n true,\n $path_to_il_tpl\n );\n\t\tforeach ($this->si_guis as $si_gui) {\n\t\t\t$si_gui->insert($custom_tpl);\n\t\t}\n\t\treturn $custom_tpl->get();\n\t}", "static public function getDescription() {\n\t\treturn self::$page_description;\n\t}", "public function getGroup()\n {\n $ProductGroup = ProductGroup::find($this->group_id); \n \n return $ProductGroup->description;\n }", "function visual_group_end()\n\t\t{\t\t\t\n\t\t\t$output = '</div>';\n\t\t\treturn $output;\n\t\t}", "public function getHTML() {\n // Define the variable to output the HTML in\n $out = '';\n\n // Add the HTML code for each meta tag\n foreach($this->meta as $entry)\n $out .= $entry->getHTML() . PHP_EOL;\n\n // Return the HTML code\n return $out;\n }", "public function getHtml();", "public function getInfo()\n {\n ob_start();\n echo '<h3>ForWeb framework Page package</h3>';\n echo '<p>Contain main page rendering functions and database tables:</p>';\n echo '<ul>';\n echo '<li>Pages table</li>';\n echo '<li>Templates table</li>';\n echo '<li>Blocks table</li>';\n echo '<li>Includes table</li>';\n echo '</ul>';\n $out = ob_get_contents();\n ob_end_clean();\n return $out;\n }", "public function getPaginationHtml();", "protected function RenderSummary_HTML_line() {\n\t$out = \"\\n\"\n\t .$this->TitleHREF()\n\t .$this->CatNum()\n\t .' &ldquo;'\n\t .$this->NameString()\n\t .'&rdquo;</a>: '\n\t .$this->RenderStatus_HTML_line()\n\t .'<br>'\n\t ;\n\treturn $out;\n }", "abstract public function getHtml();", "public function index() {\n\t\t$data = Group::get()->map( function ( $s ) {\n\t\t\treturn [\n\t\t\t\t'id' => $s->id,\n\t\t\t\t'name' => $s->getShortName(),\n\t\t\t\t'content' => $s->getShortContent(),\n\t\t\t\t'created_at' => $s->created_at_formatted,\n\t\t\t\t'created_at_time' => $s->created_at_time,\n\t\t\t\t'active' => $s->getActiveFullResponse()\n\t\t\t];\n\t\t} );\n\n\t\t$this->page->response = $data;\n\t\t$this->page->create_option = 1;\n\t\treturn view('pages.settings.parts.groups.index' )\n\t\t\t->with( 'Page', $this->page );\n\t}", "function generalTemplate ($data){\n\t\t\tob_start();\t\t\n\t\t\tif(isset($data['title']) and isset($data['description'])):\n\t\t\t?>\n\t\t\t<div class=\"title text\">\n\t\t\t\t<h1><?php echo $data['title']; ?></h1>\n\t\t\t</div>\n \n <div id=\"description text\">\n\t\t\t\t<?php echo $data['description']; ?>\n </div>\n\t\t\t<?php\n\t\t\tendif;\n\t\t\t$output = ob_get_contents();\n\t\t\tob_end_clean();\t\n\t\t\t\n\t\t\treturn $output;\n\t\t}", "function get_html()\n\t{\n\n\t// incrase views\n\n\t}", "public function property_overview_desc() {\n\n\t\t\t$short_description_1 = get_field( 'short_description_1' );\n\t\t\t$short_description_2 = get_field( 'short_description_2' );\n\n\t\t\t$out = '<h6>Overview Description:</h6>';\n\t\t\t$out .= '<p>';\n\t\t\t$out .= ( get_field( 'advertisement_package' ) == '165' )\n\t\t\t\t? $short_description_1\n\t\t\t\t: $short_description_2;\n\t\t\t$out .= '</p>';\n\t\t\t$out .= '<div class=\"hr hr-default\"><span class=\"hr-inner \"><span class=\"hr-inner-style\"></span></span></div>';\n\n\t\t\tif ( $this->add_package == 3 ) {\n\t\t\t$out .= '<h3>Practice Details:</h3>';\n\t\t\t}\n\n\t\t\treturn $out;\n\t\t}", "public abstract function get_html();", "public function getHTML();", "public function getHtml()\n {\n return $this->_getHtml();\n }", "abstract function get_html();", "abstract public function generateHtml();", "public function getPageDescription()\n {\n $element = $this->query('meta[name=\"description\"]')->first();\n if ($element) {\n return $element->getAttribute('content');\n }\n\n return '';\n }", "protected function _getReviewHtml(){\n\t\tMage::app()->getCacheInstance()->cleanType('layout');\n\n\t\t$layout = $this->getLayout();\n\t\t$update = $layout->getUpdate();\n\t\t$update->load('checkout_onepage_review');\n\t\t$layout->generateXml();\n\t\t$layout->generateBlocks();\n\t\t$review = $layout->getBlock('root');\n\t\t$review->setTemplate('opc/onepage/review/info.phtml');\n\t\t\n\t\treturn $review->toHtml();\n\t}", "function getHTML() \n {\n \n // Make a new Template object\n $this->template = new Template( $this->pathModuleRoot.'templates/' );\n \n // store the link info\n $this->template->set( 'links', $this->links );\n\n \n // store the page labels\n $name = $this->dataManager->getModuleName();\n $this->labels->setLabelTag( '[Title]', '[moduleName]', $name);\n $this->template->setXML( 'pageLabels', $this->labels->getLabelXML() );\n \n // store XML List of Applicants ...\n $this->template->setXML( 'dataList', $this->dataManager->getXML() );\n \n\n /*\n * Set up any additional data transfer to the Template here...\n */\n // store XML list of State Vars\n $this->template->setXML( 'stateVarList', $this->listStateVar->getXML() );\n \n // store XML list of Data Access Objects\n $this->template->setXML( 'daObjectList', $this->listDAObjects->getXML() );\n \n // store XML list of Page Objects\n $this->template->setXML( 'pageList', $this->listPageObjects->getXML() );\n \n // store XML list of Page Transitions\n $this->template->setXML( 'transitionList', $this->listTransitions->getXML() );\n \n // now store an array of Page Names so the transitions can list \n // the names of the Pages Objects ...\n $pageNames = array();\n $this->listPageObjects->setFirst();\n while ( $page = $this->listPageObjects->getNext() ) {\n $pageNames[ $page->getID() ] = $page->getName();\n }\n $this->template->set( 'pageNames', $pageNames );\n \n\t\treturn $this->template->fetch( 'page_ViewModule.php' );\n \n }", "function getCategoryHTML($module_srl)\n\t{\n\t\t$category_xml_file = $this->getCategoryXmlFile($module_srl);\n\n\t\tContext::set('category_xml_file', $category_xml_file);\n\n\t\tContext::loadJavascriptPlugin('ui.tree');\n\n\t\t// Get a list of member groups\n\t\t$oMemberModel = getModel('member');\n\t\t$group_list = $oMemberModel->getGroups($module_info->site_srl);\n\t\tContext::set('group_list', $group_list);\n\n\t\t$security = new Security();\n\t\t$security->encodeHTML('group_list..title');\n\n\t\t// Get information of module_grants\n\t\t$oTemplate = &TemplateHandler::getInstance();\n\t\treturn $oTemplate->compile($this->module_path.'tpl', 'category_list');\n\t}", "function getGroupName() {\n\t\treturn 'pagetools';\n\t}", "function Get_Standard_Bottom_Section_HTML()\n {\n $HTML = \"\";\n //$HTML .= Get_File_Contents(\"static_html/stfc_footer.html\");\n $HTML .= \"</div>\";\n // empty div so that page container is\n // correct size\n\n // end page container\n $HTML .= \"</div>\";\n $HTML .= Get_File_Contents(__DIR__.\"/../../static_html/standard_footer.html\");\n return $HTML;\n }", "public function getPage() {\n return $this->render('payment_info.phtml');\n }", "public function getHTML()\n\t{\n\t\t$start = '\n\t\t\t<form';\n\t\t$start .= ( $this->id ) ? ' id=\"' . $this->id . '\"' : '';\n $start .= ' class=\"group\"';\n $start .= ' action=\"' . $this->action . '\"';\n\t\t$start .= ' method=\"' . $this->method . '\"';\n\t\t$start .= ( $this->enctype ) ? ' enctype=\"multipart/form-data\"' : '';\n\t\t$start .= \">\\n\";\n\t\t\n\t\t$end = \"</form>\\n\";\n\t\t\n\t\t$content = '';\n\t\tforeach ( $this->elements as $element ) {\n\t\t\t$content .= $element->getHtml();\n\t\t}\n\t\t\n\t\treturn $start . $content . $end;\n\t}", "function showcaseGallery($groupId, $title) {\n\t$config = new ConfigReader();\n\t$config->loadConfigFile('assets/core/config/widgets/showGroup/gallery.properties');\n\t\n\t$maxDisplay = $config->readValue('maxDisplay');\n\t$maxPerRow = $config->readValue('maxPerRow');\n\t$w = $config->readValue('maxImageSizeX');\n\t$h = $config->readValue('maxImageSizeY');\n\t\n\t//if the user is not an admin, validate that the user is a member of this group\n\t$result = mysql_query(\"SELECT parentId, imageUrl FROM imagesGroups WHERE parentId = '{$groupId}' AND inSeriesImage = 1 ORDER BY RAND() LIMIT $maxDisplay\");\n\t$total = mysql_num_rows($result);\n\t\n\tif ($total > 0) {\n\t\t\n\t\t$urlCategory =urlencode($row->category);\n\t\t$caption = htmlentities($row->caption);\n\t\t\n\t\t$x = 0;\n\t\t$count = 0;\n\t\t\n\t\t//adjust maxPerRow is it's greater than the returned number of objects\n\t\tif ($maxPerRow > $total) {\n\t\t\t\n\t\t\t$maxPerRow = $total;\n\t\t\t\n\t\t}\n\t\t\n\t\t$return .= \"\t\t\t\t<div id=\\\"gallery_container\\\">\\n\";\n\t\t$return .= \"\t\t\t\t\t<div class=\\\"header\\\"><a href=\\\"/groupgalleries/id/$groupId\\\">$title</a></div>\\n\";\n\t\t$return .= \"\t\t\t\t\t<div class=\\\"body\\\">\\n\";\n\t\t\n\t\twhile ($row = mysql_fetch_object($result)) {\n\t\t\t\n\t\t\t//count this row's column itteration\n\t\t\t$x++;\n\t\t\t\n\t\t\t//keep track of total displayed so far\n\t\t\t$count++;\n\t\t\t\n\t\t\t//determine if separator class is applied\n\t\t\tif ($x % $maxPerRow != 0) {\n\t\t\t\t\n\t\t\t\t$separator = \" separator\";\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t$separator = \"\";\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$return .= \"<div class=\\\"gallery_image_container$separator\\\">\\n\";\n\t\t\t$return .= \"\t<a href=\\\"/groupgalleries/id/$groupId\\\"><img src=\\\"/file.php?load=$row->imageUrl&w=$w&h=$h\\\" border=\\\"0\\\"></a>\\n\";\n\t\t\t$return .= \"</div>\\n\";\n\t\t\t\n\t\t\t//row separator\n\t\t\tif ($x == $maxPerRow && $count < $total) {\n\t\t\t\t\n\t\t\t\t$return .= \"\t\t\t<div class=\\\"gallery_image_row_separator\\\"></div>\\n\";\n\t\t\t\t$x = 0;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t$return .= \"\t\t\t\t\t</div>\\n\";\n\t\t$return .= \"\t\t\t\t</div>\\n\";\n\t\t\n\t}\t\n\t\n\treturn($return);\n\t\n}", "private function get_reporting_block_html()\n {\n if (! $this->assignment->get_allow_group_submissions())\n {\n return $this->get_reporting_data_html(AssignmentSubmission::SUBMITTER_TYPE_USER);\n }\n else\n {\n $type = Request::get(self::PARAM_TYPE);\n \n if ($type == null)\n {\n $type = self::TYPE_COURSE_GROUP;\n }\n switch ($type)\n {\n case self::TYPE_COURSE_GROUP :\n return $this->get_reporting_data_html(AssignmentSubmission::SUBMITTER_TYPE_COURSE_GROUP);\n case self::TYPE_GROUP :\n return $this->get_reporting_data_html(AssignmentSubmission::SUBMITTER_TYPE_PLATFORM_GROUP);\n }\n }\n }", "protected function generateHtml()\n\t{\n\t}", "function rawXMLPagegroupExport()\r\n\t{\r\n\t\tglobal $myPT;\r\n\t\tglobal $myDB;\r\n\r\n\t\t$xml ='<?xml version=\"1.0\" encoding=\"'.PT_CHARSET.'\" ?>\r\n<phenotype>\r\n\t<meta>\r\n\t\t<ptversion>'.$myPT->version.'</ptversion>\r\n\t\t<ptsubversion>'.$myPT->subversion.'</ptsubversion>\r\n\t</meta>\r\n\t<pagegroups>';\r\n\t\t$sql = \"SELECT * FROM pagegroup ORDER BY grp_id\";\r\n\t\t$rs = $myDB->query($sql);\r\n\t\twhile ($row=mysql_fetch_array($rs))\r\n\t\t{\r\n\t\t\t$xml .='\r\n\t\t<group>\r\n\t\t\t<grp_id>'.$row[\"grp_id\"].'</grp_id>\r\n\t\t\t<grp_bez>'.$myPT->codeX($row[\"grp_bez\"]).'</grp_bez>\r\n\t\t\t<grp_description>'.$myPT->codeX($row[\"grp_description\"]).'</grp_description>\r\n\t\t\t<grp_statistic>'.$myPT->codeX($row[\"grp_statistic\"]).'</grp_statistic>\r\n\t\t <grp_multilanguage>'.$myPT->codeX($row[\"grp_multilanguage\"]).'</grp_multilanguage>\r\n\t\t <grp_smarturl_schema>'.$myPT->codeX($row[\"grp_smarturl_schema\"]).'</grp_smarturl_schema>\r\n\t\t</group>';\r\n\t\t}\r\n\t\t$xml.='\r\n\t</pagegroups>\r\n</phenotype>';\r\n\t\treturn $xml;\r\n\t}", "public function getDescription()\n {\n return 'Crawls a NNTP server for groups and add further messages for every single group';\n }", "public function displayPage()\n {\n return $this->sBody;\n }", "function getSummary(){\n\t\t$output=\"{$this->getTitle()} ({$this->getProducer()})\";\n\t\treturn $output;\n\t}", "public function getGrouperGroupDescription($provisionerGroup) {\n // Grouper group description is just the COmanage group description.\n return $provisionerGroup['CoGrouperProvisionerGroup']['description'];\n }", "abstract protected function view_generatePageContent();", "public function KemiSitemap_description()\n {\n echo '<p>Kemi Sitemap Description</p>';\n }", "public function getOptionGroupDescription()\n {\n return '';\n }", "public function getSplashBlock() {\r\n\t\t$html = '<p>Personnel handles the storing & presentation of faculty & staff records.</p>';\r\n\t\t$html .= '<p><b>Available Shortcode:</b><br /><code>[ofa-personnel][/ofa-personnel]</code></p>';\r\n\t\t$html .= '<p><b>Shortcode Attributes:</b><br /><code>view=\"list-all\"</code> (default)</br /><code>view=\"profile\"</code><br /><code>search=\"true\"</code><br /><code>search=\"false\"</code> (default)<br /><code>groupid=\"#\"</code> (The ID of the group to list)</p>';\r\n\t\treturn $html;\r\n\t}", "public function get_html() \n\t{\n\t\treturn $this->HTML; \n\t}", "public function html() {}", "function renderSmallGroupList($db, $group, $groupLeader) { \n ?><div class=\"content\">\n <!-- make sure theyre in a group -->\n <?php if ($group == 0) {\n echo \"<h2>You're not in a group yet!</h2>\";\n } else {\n $myGroup = getGroup($db, $group);\n ?>\n <h2 class=\"subtitle\"><?php echo sizeof($myGroup) ?> members</h2>\n <table>\n <?php // start looping through group members\n foreach ($myGroup as $a) {\n ?>\n <tr>\n <td>\n <a href=\"/?page=viewProfile&amp;id=<?=$a['id']?>\">\n <?php \n if($a['displayName'] == \"\") {\n echo $a['name'];\n } else {\n echo $a['displayName'];\n } \n ?>\n </a>\n </td>\n </tr>\n <?php } // end looping through group members ?>\n </table>\n <a class=\"button left\" href=\"/?page=group\">Manage Group</a>\n <?php } // end if?>\n </div><?php \n}", "public function getHtmlTemplate() {}", "function getHTML()\n\t{\n\t\tswitch ($this->cmd) {\n\t\t\tcase \"updateSiteImportTable\" :\n\t\t\t\treturn $this->_updateSiteImportTable();\n\t\t\t\tbreak;\n\t\t\tcase \"createWePageSettings\" :\n\t\t\t\treturn $this->_getCreateWePageSettingsHTML();\n\t\t\t\tbreak;\n\t\t\tcase \"saveWePageSettings\" :\n\t\t\t\treturn $this->_getSaveWePageSettingsHTML();\n\t\t\t\tbreak;\n\t\t\tcase \"content\" :\n\t\t\t\treturn $this->_getContentHTML();\n\t\t\t\tbreak;\n\t\t\tcase \"buttons\" :\n\t\t\t\treturn $this->_getButtonsHTML();\n\t\t\t\tbreak;\n\t\t\tdefault :\n\t\t\t\treturn $this->_getFrameset();\n\t\t}\n\t}", "function template_bits_overview_row_normal( $group, $folder_blob, $count_string ) {\n\n$IPBHTML = \"\";\n//--starthtml--//\n\n$IPBHTML .= <<<EOF\n<div class='tablerow1' id='dv-{$group['group_name']}'>\n <div style='float:right'>\n ($count_string)&nbsp;{$group['easy_preview']}\n </div>\n <div align='left'>\n <img src='{$this->ipsclass->skin_acp_url}/images/folder.gif' alt='Группа шаблонов' style='vertical-align:middle' />\n {$folder_blob}&nbsp;<a style='font-size:11px' id='gn-{$group['group_name']}' onclick='template_load_bits(\"{$group['group_name']}\", event)' title='{$group['easy_desc']}' href='{$this->ipsclass->base_url}&{$this->ipsclass->form_code}&code=template-bits-list&id={$group['_id']}&p={$group['_p']}&group_name={$group['group_name']}&'>{$group['easy_name']}</a>\n <span id='match-{$group['group_name']}'></span>\n </div>\n</div>\nEOF;\n\n//--endhtml--//\nreturn $IPBHTML;\n}", "public function getHTML() : string\n {\n $strHTML = '';\n $strHTML .= '<fieldset';\n $strHTML .= $this->buildID();\n $strHTML .= $this->buildStyle();\n $strHTML .= $this->buildAttributes();\n $strHTML .= \">\" . PHP_EOL;\n if (!empty($this->strLegend)) {\n $strHTML .= ' <legend>';\n if ($this->iType == self::TEXT) {\n $strHTML .= $this->strLegend;\n } else {\n // special case for style because legend is not treated as standalone element...\n $this->iImageHeight > 0 ? $strStyle = ' style=\"height: ' . $this->iImageHeight . 'px;\"' : $strStyle = '';\n $strHTML .= '<img src=\"' . $this->strLegend . '\" alt=\"Legend\"' . $strStyle . '>';\n }\n $strHTML .= '</legend>' . PHP_EOL;\n }\n $iCnt = count($this->aChild);\n for ($i = 0; $i < $iCnt; $i++) {\n $strHTML .= $this->aChild[$i]->GetHTML();\n }\n $strHTML .= '</fieldset>' . PHP_EOL;\n return $strHTML;\n }", "private function get_reporting_html()\n {\n $html = array();\n \n // Reporting title\n $html[] = '<div class=\"title\" style=\"border-bottom:1px dotted #D3D3D3;width:100%;border-top:1px dotted #D3D3D3;\n padding-top:5px\">';\n $html[] = Translation::get('Reporting');\n $html[] = '</div><div class=\"clear\">&nbsp;</div><br />';\n \n $html[] = '<div style=\"font-weight:bold;float:left\">';\n \n if (! $this->assignment->get_allow_group_submissions())\n {\n $html[] = Translation::get('UsersSubmissions') . ':&nbsp;<br />';\n $html[] = Translation::get('UsersFeedback') . ':&nbsp;<br />';\n \n if ($this->assignment->get_allow_late_submissions())\n {\n $html[] = Translation::get('UsersLateSubmissions') . ':&nbsp;<br />';\n }\n }\n else\n {\n $type = Request::get(self::PARAM_TYPE);\n \n if ($type == null)\n {\n $type = self::TYPE_COURSE_GROUP;\n }\n switch ($type)\n {\n case self::TYPE_COURSE_GROUP :\n $html[] = Translation::get('CourseGroupsSubmissions') . ':&nbsp;<br />';\n $html[] = Translation::get('CourseGroupsFeedback') . ':&nbsp;<br />';\n if ($this->assignment->get_allow_late_submissions())\n {\n $html[] = Translation::get('CourseGroupsLateSubmissions') . ':&nbsp;<br />';\n }\n break;\n \n case self::TYPE_GROUP :\n $html[] = Translation::get('PlatformGroupsSubmissions') . ':&nbsp;<br />';\n $html[] = Translation::get('PlatformGroupsFeedback') . ':&nbsp;<br />';\n if ($this->assignment->get_allow_late_submissions())\n {\n $html[] = Translation::get('PlatformGroupsLateSubmissions') . ':&nbsp;<br />';\n }\n break;\n }\n }\n $html[] = '</div>';\n \n // Reporting data\n $html[] = '<div style=\"float:left\">';\n $html[] = $this->get_reporting_block_html();\n $html[] = '</div>';\n \n return implode(PHP_EOL, $html);\n }", "public function description()\n {\n $sections = array();\n // Aux values\n $comment_sections = $this->comment_sections();\n $section_comment = $this->section_comment(); \n $modifiers_comment = $this->modifiers_comment();\n \n foreach ( $comment_sections as $key => $section) {\n if ( ($section != $section_comment) && ($section != $modifiers_comment) ) {\n $sections[] = $section;\n }\n }\n return trim(implode(\"\\n\\n\", $sections));\n }", "public static function help_inner () \n { \n $html = null;\n\n $top = __( 'Instruction Manual', 'label' );\n $inner = self::help_center();\n $bottom = self::page_foot();\n\n $html .= self::page_body( 'help', $top, $inner, $bottom );\n\n return $html;\n }", "public function get_output_html()\n\t{\n\t\t$this->create_html_page();\n\t\treturn $this->c_output_html;\n\t}", "function get_site_description() {\r\n\t?>\r\n\t\t<div id=\"title-description\" class=\"five3-font\">Meal Replacement<br/>Energy Drink Mix</div>\r\n\t<?php\r\n}", "public function getHTML(): string;", "function pageGroup() {\n $thisDir = pathinfo($_SERVER['PHP_SELF'], PATHINFO_DIRNAME);\n $thisPage = pathinfo($_SERVER['PHP_SELF'], PATHINFO_BASENAME);\n\n $result = '';\n\n if (($thisDir == '/') && ($thisPage == 'index.php')) {\n $result = 'Home';\n }\n else if ($thisDir == '/why-choose-us') {\n $result = 'Why Choose Us?';\n }\n else if (($thisDir == '/big-button-cell-phone') && ($thisPage == 'index.php')) {\n $result = 'Phone';\n }\n else if ($thisDir == '/senior-cell-phone-plans') {\n $result = 'Plans';\n }\n else if ($thisDir == '/shop') {\n $result = 'Shop';\n }\n else if ($thisDir == '/catalog') {\n $result = 'Shop';\n }\n else if ($thisDir == '/one-call') {\n $result = 'oneCall';\n }\n else if ($thisDir == '/activate') {\n $result = 'Activate Phone';\n }\n\n return $result;\n //error_log(\"result: \" . $result);\n }", "public function generateHtmlDivData()\n\t{\n\t\t// TODO : to be implemented\n\t}", "protected function getGroupName() {\n\t\treturn 'pagetools';\n\t}", "protected function content() {\n $content = $this->crud->content(false);\n\n if ($content->isEmpty()) {\n return ' <!-- TODO -->';\n }\n\n return $content\n ->map(function(Field $field) {\n return $this->showGroup($field);\n })\n ->implode(\"\\n\");\n }", "public function getGroupedTitle()\n {\n return $this->groupedTitle;\n }", "function skin_diff_row_newgroup( $group_name ) {\n\n$IPBHTML = \"\";\n//--starthtml--//\n\n$IPBHTML .= <<<EOF\n<tr>\n <td colspan='4' class='tablerow3'>\n <strong>{$group_name}</strong>\n </td>\nEOF;\n\n//--endhtml--//\nreturn $IPBHTML;\n}", "public function getOutputHTML()\n\t{\n\t\t$startRecord=0;\t\t# for the first page\t\n\n\t\t# loop through pages and build the link for each\n\t\tfor($pageNum=0;$pageNum<$this->totalPages;$pageNum++)\n\t\t{\n\t\t # add the pageNum and corresponding startRecord to array to be use for creating prev and next link\n\t\t $this->startRecordArr[$pageNum+1]=$startRecord;\n\n\t\t\t# create the link for the page\n\t\t\t$this->outputHTML.=$this->createLink($pageNum,$startRecord);\n\t\t\t\n\t\t\t#each iteration needs to increment the startRecord by the numbe rof records per page\n\t\t\t$startRecord+=$this->recordsPerPage;\n\t\t}\n\n # create the previous and next page links\n $this->prevPageHTML.=$this->createPrevPageLink($this->activePage);\n $this->nextPageHTML.=$this->createNextPageLink($this->activePage);\n\n # append the three navigation link strings\n $this->outputHTML=$this->prevPageHTML.$this->outputHTML.$this->nextPageHTML;\n\n return $this->outputHTML;\n\t}", "function getDescription() {\r\n\t\treturn 'Lets you determine how many comments to show on item page, what order to show them in and provides pagination of results';\r\n\t}", "public function get_description () {\r\n\t\t$content = file_get_contents($this->url);\r\n\t\t$regex = preg_match('/<p id=\"eow-description\" class=\"\" >(.*)<\\/p>/i', $content, $matches);\r\n\t\treturn $matches[1];\r\n\t}", "static function description(): string {\r\n return 'A website owned or used by The Medium'; \r\n }", "function wp_credits_section_title($group_data = array())\n {\n }", "function getHtmlStep2View()\r\n\t{\r\n\t\treturn '';\r\n\t}", "public function getInfoHtml()\n {\n return $this->getInfoBlock()->toHtml();\n }", "public function get_output_html() {\n\t\treturn $this->client->getHtmlFields();\n\t}", "protected function _getReviewHtml()\n\t{\n\t\t$layout = $this->getLayout();\n\t\t$update = $layout->getUpdate();\n\t\t$update->load('checkout_onestep_review');\n\t\t$layout->generateXml();\n\t\t$layout->generateBlocks();\n\t\t$output = $layout->getOutput();\n\t\tMage::getSingleton('core/translate_inline')->processResponseBody($output);\n\t\treturn $output;\n\t}", "public static function get_Pages_For_Globalizing_HTML(): string\n {\n $html = ' <option value=\"883\" selected=\"selected\"> 404</option>\n <option value=\"6086\"> about</option>\n <option value=\"6088\"> about/aims_and_scope</option>\n <option value=\"4967\"> about/article_level_metrics</option>\n <option value=\"323\"> about/article_processing_charges</option>\n <option value=\"307\"> about/contact</option>\n <option value=\"317\"> about/faq</option>\n <option value=\"1786\"> about/financial_support</option>\n <option value=\"7107\"> about/journal_statistics</option>\n <option value=\"308\"> about/journal_subject_areas</option>\n <option value=\"324\"> about/manuscript_types</option>\n <option value=\"10252\"> about/manuscript_types/acp letters</option>\n <option value=\"8798\"> about/mobile_abstracted_indexed</option>\n <option value=\"8797\"> about/mobile_journal_metrics</option>';\n\n return $html;\n }", "public function printHtmlPage(){\n\n // Change the content headers to that of HTML\n header('Content-type: text/html; charset=utf8');\n\n // Include the HTML wrapper and collect output\n ob_start();\n require_once(LEGACY_MMRPG_ROOT_DIR.'markup/html-wrapper.php');\n $html_markup = ob_get_clean();\n\n // Print out the collected markup and exit\n echo($html_markup);\n exit();\n\n }", "public function getHtml() {\n\t\treturn $this->_boleto->getOutput();\n\t}", "public function getDescriptionMoreInfoHtml() { return $this->descriptionMoreInfoHtml; }", "function quasar_get_post_loop_description(){\n\tglobal $post;\n\tif(!$post) return;\n\t\n\t$summary_choice = xr_get_option('post_summary','content');//or excerpt;\n\t\n\t$return = '';\n\t\n\tif($summary_choice === 'content'){\n\t\t$return = quasar_get_the_content();\n\t}elseif($summary_choice === 'excerpt'){\n\t\t$return = rock_check_p(get_the_excerpt());\n\t\t$return .= quasar_get_read_more_link();\n\t}\n\t\n\treturn $return;\n}", "function getDisplay() {\n\t\t$content = \"<h3>\" . $this->widgetTitle . \"</h3>\";\n\n\t\tif (!empty($this->facebookUrl) && \n\t\t\ttrim($this->facebookUrl) !== '') {\n\t\t\t$content .= '<span class=\"social-pages-icon social-page-facebook\"><a href=\"' . $this->facebookUrl . '\" ><i class=\"fa fa-facebook\"></i></a></span>';\n\t\t}\n\t\tif (!empty($this->twitterUrl) && \n\t\t\t\ttrim($this->twitterUrl) !== '') {\n\t\t\t$content .= '<span class=\"social-pages-icon social-page-twitter\"><a href=\"' . $this->twitterUrl . '\" ><i class=\"fa fa-twitter\"></i></a></span>';\n\t\t}\n\t\tif (!empty($this->googleplusUrl) && \n\t\t\ttrim($this->googleplusUrl) !== '') {\n\t\t\t$content .= '<span class=\"social-pages-icon social-page-google\"><a href=\"' . $this->googleplusUrl . '\" ><i class=\"fa fa-google\"></i></a></span>';\n\t\t}\n\n\t\treturn $content;\n\t}", "public function displayReviewGroup()\n {\n $groups = Group::orderBy('name')->get();\n\n return view('review.group.display')->with([\"groups\" => $groups]);\n }", "public function displayContentOverview() {}", "public function get_moduleinfo_output() {\n\n global $CFG, $DB, $OUTPUT;\n require_once($CFG->libdir . '/filelib.php');\n\n $result = '';\n\n // Now build HTML\n if (! empty ($this->data->module_code)) {\n \t$result .= html_writer::start_tag('p', array('class'=>'module_specific'));\n \t$result .= html_writer::tag('span', get_string( 'module_code', 'block_module_info' ).': ',\n \t\t\tarray('class'=>'module_info_title'));\n \t$result .= html_writer::tag('strong', $this->data->module_code);\n \t$result .= html_writer::end_tag('p');\n }\n if (! empty ($this->data->module_level)) {\n \t$result .= html_writer::start_tag('p', array('class'=>'module_specific'));\n \t$result .= html_writer::tag('span', get_string( 'module_level', 'block_module_info' ).': ',\n \t\t\tarray('class'=>'module_info_title'));\n \t$result .= html_writer::tag('strong', $this->data->module_level);\n \t$result .= html_writer::end_tag('p');\n }\n if (! empty ($this->data->module_credit)) {\n \t$result .= html_writer::start_tag('p', array('class'=>'module_specific'));\n \t$result .= html_writer::tag('span', get_string( 'module_credit', 'block_module_info' ).': ',\n \t\t\tarray('class'=>'module_info_title'));\n \t$result .= html_writer::tag('strong', $this->data->module_credit);\n \t$result .= html_writer::end_tag('p');\n }\n if (! empty ($this->data->module_semester)) {\n \t$result .= html_writer::start_tag('p', array('class'=>'module_specific'));\n \t$result .= html_writer::tag('span', get_string( 'module_semester', 'block_module_info' ).': ',\n \t\t\tarray('class'=>'module_info_title'));\n \t$result .= html_writer::tag('strong', $this->data->module_semester);\n \t$result .= html_writer::end_tag('p');\n }\n\n // If by this stage result is still empty then display a warning.\n if(empty($result)) {\n $result .= html_writer::tag('p', get_string( 'missing_module', 'block_module_info'), array('class'=>'missing_module'));\n }\n\n return $result;\n\n }", "public function getPagerHtml()\n {\n return $this->getChildHtml('pager');\n }", "public function getPagerHtml()\n {\n return $this->getChildHtml('pager');\n }", "public function getPagerHtml()\n {\n return $this->getChildHtml('pager');\n }", "public function getPagerHtml()\n {\n return $this->getChildHtml('pager');\n }", "function emc_the_cpt_description(){\r\n\r\n\t$desc = get_page_by_path( 'description', OBJECT, 'emc_content_focus' );\r\n\t$html = apply_filters( 'the_content', $desc->post_content );\r\n\techo $html;\r\n\r\n}", "function Name(){\n\t\tif(!$this->title) {\n\t\t\t$fs = $this->FieldSet();\n\t\t\t$compositeTitle = '';\n\t\t\t$count = 0;\n\t\t\tforeach($fs as $subfield){\n\t\t\t\t$compositeTitle .= $subfield->Name();\n\t\t\t\tif($subfield->Name()) $count++;\n\t\t\t}\n\t\t\tif($count == 1) $compositeTitle .= 'Group';\n\t\t\treturn ereg_replace(\"[^a-zA-Z0-9]+\",\"\",$compositeTitle);\n\t\t}\n\n\t\treturn ereg_replace(\"[^a-zA-Z0-9]+\",\"\",$this->title);\t\n\t}", "public function generateContent()\n {\n parent::generateContent();\n $pathArray = $this->currentPageStrategy->getCurrentPagePath();\n $titleString = '';\n foreach ($pathArray as $page) {\n /** @var $page Page */\n\n $titleString .= ' - ' . (($t = $page->getTitle()) == '_404' ? 'Siden blev ikke fundet' : $t);\n }\n\n return $titleString;\n }", "public function getPagerHtml()\r\n {\r\n return $this->getChildHtml('pager');\r\n }" ]
[ "0.6860222", "0.6604339", "0.6468313", "0.62626487", "0.6182901", "0.61619353", "0.6144719", "0.6134719", "0.61183083", "0.60266286", "0.601974", "0.5926971", "0.5909231", "0.59025943", "0.5886668", "0.5876637", "0.586275", "0.584269", "0.58301663", "0.5811701", "0.58019257", "0.57835776", "0.57829136", "0.5781094", "0.5761562", "0.5746232", "0.57344025", "0.5733473", "0.570771", "0.5691912", "0.56892145", "0.56806606", "0.5670315", "0.5662937", "0.56508493", "0.56357855", "0.5635158", "0.5632149", "0.56207484", "0.5615598", "0.5604393", "0.5594262", "0.5588845", "0.5578603", "0.55561167", "0.5554396", "0.5553483", "0.5543612", "0.55324316", "0.5518315", "0.5510289", "0.55064833", "0.5505806", "0.55055404", "0.5498878", "0.5496049", "0.54957473", "0.5489264", "0.5488749", "0.5482274", "0.54746836", "0.5465235", "0.545188", "0.5446271", "0.54448783", "0.5443594", "0.54423356", "0.54413813", "0.5439281", "0.5435027", "0.5434413", "0.5430388", "0.5421295", "0.54180735", "0.54059255", "0.54056", "0.54032284", "0.5394249", "0.5394218", "0.5392217", "0.5388743", "0.53873867", "0.5387168", "0.5381703", "0.53797966", "0.5379037", "0.5378979", "0.53774476", "0.5373584", "0.5372788", "0.53683496", "0.5367559", "0.5366431", "0.53588474", "0.53588474", "0.53588474", "0.53588474", "0.535711", "0.5353692", "0.5351428", "0.53482926" ]
0.0
-1
Get the Grouping page description of more info html
public function getDescriptionMoreInfoHtml() { return $this->descriptionMoreInfoHtml; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function description()\n\t{\n\t\t$txt = array();\n\t\t$txt['wiki'] = \"Displays group events\";\n\t\t$txt['html'] = '<p>Displays group events.</p>';\n\t\t$txt['html'] = '<p>Examples:</p>\n\t\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t\t<li><code>[[Groupevent(number=3)]]</code> - Displays the next three group events</li>\n\t\t\t\t\t\t\t\t<li><code>[[Groupevent(title=Group Events, number=2)]]</code> - Adds title above event list. Displays 2 events.</li>\n\t\t\t\t\t\t\t\t<li><code>[[Groupevent(id=123)]]</code> - Displays single group event with ID # 123</li>\n\t\t\t\t\t\t\t</ul>';\n\t\treturn $txt['html'];\n\t}", "public function description()\n\t{\n\t\t$txt = array();\n\t\t$txt['wiki'] = 'Generates a link to a random page.';\n\t\t$txt['html'] = '<p>Generates a link to a random page.</p>';\n\t\treturn $txt['html'];\n\t}", "public function get_description () {\r\n\t\t$content = file_get_contents($this->url);\r\n\t\t$regex = preg_match('/<p id=\"eow-description\" class=\"\" >(.*)<\\/p>/i', $content, $matches);\r\n\t\treturn $matches[1];\r\n\t}", "static public function getDescription() {\n\t\treturn self::$page_description;\n\t}", "public abstract function get_html();", "abstract function get_html();", "public function options_page_overview() \n\t\t{\n\t\t\t$html = '';\n\t\t\t\n\t\t\tforeach( $this->size_groups as $size_group => $sizes ) \n\t\t\t{\n\t\t\t\t$html .= '<h3>' . $this->get_group_headline( $size_group ) . '</h3>';\n\t\t\t\t\n\t\t\t\t$html .= '<ul>';\n\t\t\t\t\n\t\t\t\tforeach( $sizes as $key => $image ) \n\t\t\t\t{\n\t\t\t\t\t$info = $image['width'] . '*' . $image['height'];\n\t\t\t\t\tif( isset( $image['crop'] ) && true === $image['crop'] )\n\t\t\t\t\t{\n\t\t\t\t\t\t$info .= ' ' . __( '(cropped)', 'avia_framework' );\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$info .= ' - ' . $this->get_image_key_info( $key );\n\t\t\t\t\t\n\t\t\t\t\t$html .= '<li>' . $info . '</li>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$html .= '</ul>';\n\t\t\t}\n\t\t\t\n\t\t\treturn $html;\n\t\t}", "function getInfo ()\n\t{\n\t\t$node = $this->getElementsByTagname(\"MetaData\");\n\n\t\tif($node !== false)\n\t\t{\n\t\t\t$childs = $node[0]->child_nodes();\n\n\t\t\tforeach ($childs as $child)\n\t\t\t{\n\t\t\t\t\tif (($child->node_type() == XML_ELEMENT_NODE) && ($child->tagname == \"General\"))\n\t\t\t\t\t{\n\t\t\t\t\t\t$childs2 = $child->child_nodes();\n\n\t\t\t\t\t\tforeach ($childs2 as $child2)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (($child2->node_type() == XML_ELEMENT_NODE) && ($child2->tagname == \"Title\" || $child2->tagname == \"Description\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$arr[$child2->tagname] = $child2->get_content();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// General-tag was found. Stop foreach-loop\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// for compatibility reasons:\n\t\t$arr[\"title\"] = $arr[\"Title\"];\n\t\t$arr[\"desc\"] = $arr[\"Description\"];\n\n\t\treturn $arr;\n\t}", "public function getPageDescription()\n {\n $element = $this->query('meta[name=\"description\"]')->first();\n if ($element) {\n return $element->getAttribute('content');\n }\n\n return '';\n }", "function getDataDescription($data)\n{\n\t$dataDesc = getData($data, \"Page/Description\");\n\treturn $dataDesc[0];\n}", "public function getGroupDescription() : string\n {\n return $this->groupDescription;\n }", "public function detail(): string\n {\n return $this->groupDetail ?? '';\n }", "function PageSummaries_getHtml($id) {\n\t$PAGEDATA=Page::getInstance($id);\n\tglobal $sitedomain;\n\t$r=dbRow('select * from page_summaries where page_id=\"'.$PAGEDATA->id.'\"');\n\tif (!count($r)) {\n\t\treturn '<em>'.__(\n\t\t\t'This page is marked as a page summary, but there is no '\n\t\t\t.'information on how to handle it.'\n\t\t)\n\t\t\t.'</em>';\n\t}\n\tif ($r['rss']) {\n\t\treturn PageSummaries_rssToHtml($r['rss']);\n\t}\n\t// { build rss\n\t$title=($PAGEDATA->title=='')\n\t\t?$sitedomain\n\t\t:htmlspecialchars($PAGEDATA->title);\n\t$rss='<'.'?xml version=\"1.0\" ?'.'><rss version=\"2.0\"><channel><title>'\n\t\t.$title.'</title>';\n\t$rss.='<link>'.$_SERVER['REQUEST_URI'].'</link><description>RSS for '\n\t\t.$PAGEDATA->name.'</description>';\n\t$category=$PAGEDATA->category?' and category=\"'.$PAGEDATA->category.'\"':'';\n\t$containedpages=PageSummaries_getContainedPages($r['parent_id']);\n\tif (count($containedpages)) {\n\t\t$q2=dbAll(\n\t\t\t'select edate,name,title,body from pages where id in ('\n\t\t\t.join(',', $containedpages).')'.$category.' order by cdate desc limit 20'\n\t\t);\n\t\tforeach ($q2 as $r2) {\n\t\t\t$rss.='<item>';\n\t\t\tif (!$r2['title']) {\n\t\t\t\t$r2['title']=$r2['name'];\n\t\t\t}\n\t\t\t$rss.='<title>'.htmlspecialchars($r2['title']).'</title>';\n\t\t\t$rss.='<pubDate>'.Core_dateM2H($r2['edate']).'</pubDate>';\n\t\t\t// { build body\n\t\t\tif ($r['amount_to_show']==0 || $r['amount_to_show']==1) {\n\t\t\t\t$length=$r['amount_to_show']==0?300:600;\n\t\t\t\t$body=substr(\n\t\t\t\t\tpreg_replace(\n\t\t\t\t\t\t'/<[^>]*>/',\n\t\t\t\t\t\t'',\n\t\t\t\t\t\tstr_replace(\n\t\t\t\t\t\t\tarray('&amp;', '&nbsp;', '&lsquo;'),\n\t\t\t\t\t\t\tarray('&',' ','&apos;'),\n\t\t\t\t\t\t\t$r2['body']\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t\t0,\n\t\t\t\t\t$length\n\t\t\t\t)\n\t\t\t\t.'...';\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$body=$r2['body'];\n\t\t\t}\n\t\t\t$body=str_replace('&euro;', '&#8364;', $body);\n\t\t\t// }\n\t\t\t$rss.='<description>'.$body.'</description>';\n\t\t\t$rss.='<link>http://'.$_SERVER['HTTP_HOST'].'/'\n\t\t\t\t.urlencode(str_replace(' ', '-', $r2['name'])).'</link>';\n\t\t\t$rss.='</item>';\n\t\t}\n\t}\n\t$rss.='</channel></rss>';\n\tdbQuery(\n\t\t'update page_summaries set rss=\"'.addslashes($rss)\n\t\t.'\" where page_id=\"'.$PAGEDATA->id.'\"'\n\t);\n\t// }\n\treturn PageSummaries_rssToHtml($rss);\n}", "function get_group_description($group) {\n\tglobal $home_locale, $current_locale;\n\tif ($home_locale == $current_locale\n\t\t\t|| !isset($group['vccommondescription'])\n\t\t\t|| !$group['vccommondescription']) {\n\t\treturn $group['vclocaldescription'];\n\t} else {\n\t\treturn $group['vccommondescription'];\n\t}\n}", "public function getInfoHtml()\n {\n return $this->getInfoBlock()->toHtml();\n }", "public function getInfo()\n {\n ob_start();\n echo '<h3>ForWeb framework Page package</h3>';\n echo '<p>Contain main page rendering functions and database tables:</p>';\n echo '<ul>';\n echo '<li>Pages table</li>';\n echo '<li>Templates table</li>';\n echo '<li>Blocks table</li>';\n echo '<li>Includes table</li>';\n echo '</ul>';\n $out = ob_get_contents();\n ob_end_clean();\n return $out;\n }", "public function pageContent()\r\n\t{\r\n\t\t$this->displayList();\r\n\t\t$content = '\r\n<div align=\"center\"><table width=\"60%\" border=\"1\" class=\"infoView\">\r\n <tbody>\r\n <tr>\r\n <th scope=\"col\">Manage a Department</th>\r\n </tr>\r\n \t '.$this->dList.'\r\n </tbody>\r\n</table></div>\r\n\t\t';\r\n\t\treturn $content;\r\n\t}", "function getDescription() {\r\n\t\treturn 'Lets you determine how many comments to show on item page, what order to show them in and provides pagination of results';\r\n\t}", "public function testDetailPageContent() \n {\n $this->visit('/detail/brandonvega/')\n ->see('<strong>Title:</strong>')\n ->see('<strong>Email:</strong> <a href=\"mailto:')\n ->see('<strong>Telephone:</strong> <a href=\"tel:')\n ->see('<strong>Office Address:</strong>')\n ->see('<strong>Mailing Address:</strong>');\n }", "function DF_read_more($matches) {\r\n\treturn '<p>'.$matches[1].'</p><p><a '.$matches[3].' class=\"more-link\"><i class=\"icon-double-angle-right\"></i>'.$matches[4].'</a></p> ';\r\n}", "private function getDetailedDescription($classInfo) {\n\t\t$class = file_get_html($classInfo->getCourseLink());\n\t\t\n\t\t// page is broken up into 2 sections: top and bottom. Below are the HTML Nodes for Top section and bottom section\n\t\t$top = $class->find('section[id=main] div[class=gray-noise-box pad-box no-sides]', 0);\n\t\t$bottom = $class->find('section[id=main] div[class=light-bg pad-box no-sides top-rule-box]', 0);\n\t\t\n\t\t// get image url\n\t\t$imageURL = $this->getClassImageURL($top);\n\t\t\n\t\t// get course title\n\t\t$title = $top->find('div.course-detail-info h2', 0)->text();\n\t\t\n\t\t// start and end dates\n\t\t$startDate = $this->getStartDate($top);\n\t\t$endDate = $this->getEndDate($top);\n\n\t\t// get price of this class\n\t\t$price = $this->getClassPrice($top);\n\n\t\t// get full class description\n\t\t$description = $this->getFullDescription($bottom);\n\t\t\n\t\t// get prof name\n\t\t$profName = $this->getProfName($bottom);\n\t\t\n\t\t// get prof image\n\t\t$profImage = $this->getProfImage($bottom);\n\t\t\n\t\t// get class category\n\t\t$category = $this->getClassCategory($class);\n\t\t\n\t\t// get class status\n\t\t$isFull = $this->getClassStatus($top);\n\t\t\n\t\t// get class duration in weeks\n\t\t$duration = $this->getClassDuration($startDate, $endDate);\n\t\t\n\t\t$classInfo->setTitle(trim($title));\n\t\t$classInfo->setLongDescription(trim($description));\n\t\t$classInfo->setVideoLink(\"\");\n\t\t$classInfo->setStartDate($startDate);\n\t\t$classInfo->setCourseLength($duration);\n\t\t$classInfo->setCategory(\"Science\");\n\t\t$classInfo->setCourseImage($imageURL);\n\t\t$classInfo->setProfName($profName);\n\t\t$classInfo->setProfImage($profImage);\n\t\t\n\t\t#return $retVal;\n\t}", "public function property_overview_desc() {\n\n\t\t\t$short_description_1 = get_field( 'short_description_1' );\n\t\t\t$short_description_2 = get_field( 'short_description_2' );\n\n\t\t\t$out = '<h6>Overview Description:</h6>';\n\t\t\t$out .= '<p>';\n\t\t\t$out .= ( get_field( 'advertisement_package' ) == '165' )\n\t\t\t\t? $short_description_1\n\t\t\t\t: $short_description_2;\n\t\t\t$out .= '</p>';\n\t\t\t$out .= '<div class=\"hr hr-default\"><span class=\"hr-inner \"><span class=\"hr-inner-style\"></span></span></div>';\n\n\t\t\tif ( $this->add_package == 3 ) {\n\t\t\t$out .= '<h3>Practice Details:</h3>';\n\t\t\t}\n\n\t\t\treturn $out;\n\t\t}", "function get_html()\n\t{\n\n\t// incrase views\n\n\t}", "public function getGroupDescription()\n {\n return $this->__get(self::FIELD_GROUP_DESCRIPTION);\n }", "abstract public function getHtml();", "protected function renderInformationContent() {}", "function emc_the_cpt_description(){\r\n\r\n\t$desc = get_page_by_path( 'description', OBJECT, 'emc_content_focus' );\r\n\t$html = apply_filters( 'the_content', $desc->post_content );\r\n\techo $html;\r\n\r\n}", "function get_site_description() {\r\n\t?>\r\n\t\t<div id=\"title-description\" class=\"five3-font\">Meal Replacement<br/>Energy Drink Mix</div>\r\n\t<?php\r\n}", "public function get_moduleinfo_output() {\n\n global $CFG, $DB, $OUTPUT;\n require_once($CFG->libdir . '/filelib.php');\n\n $result = '';\n\n // Now build HTML\n if (! empty ($this->data->module_code)) {\n \t$result .= html_writer::start_tag('p', array('class'=>'module_specific'));\n \t$result .= html_writer::tag('span', get_string( 'module_code', 'block_module_info' ).': ',\n \t\t\tarray('class'=>'module_info_title'));\n \t$result .= html_writer::tag('strong', $this->data->module_code);\n \t$result .= html_writer::end_tag('p');\n }\n if (! empty ($this->data->module_level)) {\n \t$result .= html_writer::start_tag('p', array('class'=>'module_specific'));\n \t$result .= html_writer::tag('span', get_string( 'module_level', 'block_module_info' ).': ',\n \t\t\tarray('class'=>'module_info_title'));\n \t$result .= html_writer::tag('strong', $this->data->module_level);\n \t$result .= html_writer::end_tag('p');\n }\n if (! empty ($this->data->module_credit)) {\n \t$result .= html_writer::start_tag('p', array('class'=>'module_specific'));\n \t$result .= html_writer::tag('span', get_string( 'module_credit', 'block_module_info' ).': ',\n \t\t\tarray('class'=>'module_info_title'));\n \t$result .= html_writer::tag('strong', $this->data->module_credit);\n \t$result .= html_writer::end_tag('p');\n }\n if (! empty ($this->data->module_semester)) {\n \t$result .= html_writer::start_tag('p', array('class'=>'module_specific'));\n \t$result .= html_writer::tag('span', get_string( 'module_semester', 'block_module_info' ).': ',\n \t\t\tarray('class'=>'module_info_title'));\n \t$result .= html_writer::tag('strong', $this->data->module_semester);\n \t$result .= html_writer::end_tag('p');\n }\n\n // If by this stage result is still empty then display a warning.\n if(empty($result)) {\n $result .= html_writer::tag('p', get_string( 'missing_module', 'block_module_info'), array('class'=>'missing_module'));\n }\n\n return $result;\n\n }", "public function getDescription() {\r\n\t\t$tmp_body = strip_tags($this -> body);\r\n\t\t$description = Engine_Api::_() -> ynblog() -> subPhrase($tmp_body, 150);\r\n\t\treturn $description;\r\n\t}", "function quasar_get_post_loop_description(){\n\tglobal $post;\n\tif(!$post) return;\n\t\n\t$summary_choice = xr_get_option('post_summary','content');//or excerpt;\n\t\n\t$return = '';\n\t\n\tif($summary_choice === 'content'){\n\t\t$return = quasar_get_the_content();\n\t}elseif($summary_choice === 'excerpt'){\n\t\t$return = rock_check_p(get_the_excerpt());\n\t\t$return .= quasar_get_read_more_link();\n\t}\n\t\n\treturn $return;\n}", "public function getHTML();", "static function desc( $title ) {\n\t\tglobal $wgParser;\n\t\t$article = new Article( $title );\n\t\t$content = $article->getContent();\n\t\t$text = preg_match( \"/^.+?1=(.+?)\\|2=/s\", $content, $m ) ? $m[1] : $title->getText();\n\t\t$html = $wgParser->parse( trim( $text ), $title, new ParserOptions(), true, true )->getText();\n\t\t$html = preg_replace( '|<a[^<]+<img .+?</a>|', '', $html );\n\t\t$desc = strip_tags( $html, '<p><a><i><b><u><s>' );\n\t\t$desc = preg_replace( \"/[\\r\\n]+/\", \"\", $desc );\n\t\t$desc = preg_replace( \"|<p></p>|\", \"\", $desc );\n\t\t$desc = trim( preg_replace( \"|<p>|\", \"\\n<p>\", $desc ) );\n\t\treturn $desc;\n\t}", "protected function getInfoScreenHTML()\n {\n require_once('./Services/InfoScreen/classes/class.ilInfoScreenGUI.php');\n $info = new ilInfoScreenGUI(null);\n $mappings = array_filter(MetadataService::getInstance()->getMappings($this->ctrl->getContextObjType()), function (ilObjectMapping $mapping) : bool {\n return MetadataService::getInstance()->canBeShow($this->getObject(), $mapping, MetadataService::SHOW_CONTEXT_SHOW_INFO_SCREEN);\n });\n if (!count($mappings)) {\n return '';\n }\n $query = new RecordQuery($this->getObject());\n foreach ($mappings as $mapping) {\n foreach ($mapping->getFieldGroups() as $group) {\n $records = array_map(function ($field_id) use ($query, $group) {\n $field = Field::find($field_id);\n\n return $query->getRecord($group, $field);\n }, $mapping->getShowInfoFieldIds($group->getId()));\n $records = array_filter($records, function ($record) { return $record !== null; });\n if (!count($records)) {\n continue;\n }\n $info->addSection($group->getTitle($this->user->getLanguage()));\n foreach ($records as $record) {\n $info->addProperty($record->getField()->getLabel($this->user->getLanguage()), $record->getFormattedValue());\n }\n }\n }\n\n return $info->getHtml();\n }", "public function getContent()\n\t\t{\n\t\t\treturn $this->getGroup();\n\t\t\t\n\t\t}", "function fetch_info($_url=\"\"){ \n if($_url&&$this-> fetch($_url)){\n $html = str_get_html($this-> html);\n $header = $html->find('head',0);\n $info['title'] = $header ->find('title',0)->plaintext;\n if( $keywords = $header ->find('meta[name=keywords]',0) )\n $info['keywords'] = $keywords->content;\n if( $description = $header ->find('meta[name=description]',0))\n $info['description'] = $description ->content;\n return $info;\n }\n return false;\n }", "public function getGroupsDescription()\n {\n if (class_exists(Subsite::class)) {\n Subsite::disable_subsite_filter(true);\n }\n\n // Get the member's groups, if any\n $groups = $this->owner->Groups();\n if ($groups->Count()) {\n // Collect the group names\n $groupNames = array();\n foreach ($groups as $group) {\n /** @var Group $group */\n $groupNames[] = html_entity_decode($group->getTreeTitle() ?? '');\n }\n // return a csv string of the group names, sans-markup\n $result = preg_replace(\"#</?[^>]>#\", '', implode(', ', $groupNames));\n } else {\n // If no groups then return a status label\n $result = _t(__CLASS__ . '.NOGROUPS', 'Not in a Security Group');\n }\n\n if (class_exists(Subsite::class)) {\n Subsite::disable_subsite_filter(false);\n }\n return $result;\n }", "public function getDescriptionTextHtml() { return $this->descriptionTextHtml; }", "public function KemiSitemap_description()\n {\n echo '<p>Kemi Sitemap Description</p>';\n }", "public function get_teaching_output() {\n\n $result = '';\n\n $result .= mod_info_collapsible_region_start('teaching-heading', 'modinfo-viewlet-teaching', get_string('teaching_header', 'block_module_info'), false, false, true);\n\n $result .= $this->get_convenorinfo_output();\n\n $result .= $this->get_additionteacherinfo_output();\n\n $result .= mod_info_collapsible_region_end(true);\n\n return $result;\n }", "function nitelink_show_specs ($atts) {\n\t\t$html_return = \"\";\n\t\t$html_return .= '<div class=\"bhm-avail_title\">';\n\t\t$html_return .= $_SESSION['nitelink_arrive'].' to ' . $_SESSION['nitelink_depart'];\n\t\t$html_return .= '</br>';\n\t\t$html_return .= 'for'. $_SESSION['nitelink_adults'].' Adult(s) and '.$_SESSION['nitelink_kids'].' children.';\n\t\t$html_return .= '</div>';\n\t\treturn $html_return;\n\t}", "public function description()\n {\n $description = $this->DOM->filter(\"meta[name='description']\")->attr('content');\n\n return $description;\n }", "protected function getContents()\n {\n $contents = $this->crawler->filter('.page.group');\n if (!$contents->count()) {\n return;\n }\n\n $contents = $contents->html();\n\n // I'll have my own syntax highlighting, WITH BLACKJACK AND HOOKERS\n $this->crawler->filter('pre')->each(function ($code) use (&$contents) {\n $unformatted = htmlentities($code->text());\n $unformatted = '<pre><code class=\"php\">'.$unformatted.'</code></pre>';\n $contents = str_replace('<pre class=\"code php\">'.$code->html().'</pre>', $unformatted, $contents);\n });\n\n return $contents;\n }", "function getDescription() {\n\t\tif( !($ret = $this->getField( 'summary' )) ) {\n\t\t\t$ret = $this->getField( 'data' );\n\t\t}\n\t\treturn $ret;\n\t}", "protected function RenderSummary_HTML_line() {\n\t$out = \"\\n\"\n\t .$this->TitleHREF()\n\t .$this->CatNum()\n\t .' &ldquo;'\n\t .$this->NameString()\n\t .'&rdquo;</a>: '\n\t .$this->RenderStatus_HTML_line()\n\t .'<br>'\n\t ;\n\treturn $out;\n }", "public function getDescription() {\n\t\treturn Template::getSiteMetaDescription();\n\t}", "public function getHtml();", "public function collectData(){\n\t\t// Simple HTML Dom is not accurate enough for the job\n\t\t$content = getContents($this->getURI())\n\t\t\tor returnServerError('No results for LWNprev');\n\n\t\tlibxml_use_internal_errors(true);\n\t\t$html = new DOMDocument();\n\t\t$html->loadHTML($content);\n\t\tlibxml_clear_errors();\n\n\t\t$cat1 = '';\n\t\t$cat2 = '';\n\n\t\tforeach($html->getElementsByTagName('a') as $a){\n\t\t\tif($a->textContent === 'Multi-page format'){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t$realURI = self::URI . $a->getAttribute('href');\n\t\t$URICounter = 0;\n\n\t\t$edition = $html->getElementsByTagName('h1')->item(0)->textContent;\n\t\t$editionTimeStamp = strtotime(\n\t\t\tsubstr($edition, strpos($edition, 'for ') + strlen('for '))\n\t\t);\n\n\t\tforeach($html->getElementsByTagName('h2') as $h2){\n\t\t\tif($h2->getAttribute('class') !== 'SummaryHL'){\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$item = array();\n\n\t\t\t$h2NextSibling = $h2->nextSibling;\n\t\t\t$this->jumpToNextTag($h2NextSibling);\n\n\t\t\tswitch($h2NextSibling->getAttribute('class')){\n\t\t\tcase 'FeatureByline':\n\t\t\t\t$item['author'] = $h2NextSibling->getElementsByTagName('b')->item(0)->textContent;\n\t\t\t\tbreak;\n\t\t\tcase 'GAByline':\n\t\t\t\t$text = $h2NextSibling->textContent;\n\t\t\t\t$item['author'] = substr($text, strpos($text, 'by '));\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$item['author'] = 'LWN';\n\t\t\t\tbreak;\n\t\t\t};\n\n\t\t\t$h2FirstChild = $h2->firstChild;\n\t\t\t$this->jumpToNextTag($h2FirstChild);\n\t\t\tif($h2FirstChild->nodeName === 'a'){\n\t\t\t\t$item['uri'] = self::URI . $h2FirstChild->getAttribute('href');\n\t\t\t}else{\n\t\t\t\t$item['uri'] = $realURI . '#' . $URICounter;\n\t\t\t}\n\t\t\t$URICounter++;\n\n\t\t\t$item['timestamp'] = $editionTimeStamp + $URICounter;\n\n\t\t\t$h2PrevSibling = $h2->previousSibling;\n\t\t\t$this->jumpToPreviousTag($h2PrevSibling);\n\t\t\tswitch($h2PrevSibling->getAttribute('class')){\n\t\t\tcase 'Cat2HL':\n\t\t\t\t$cat2 = $h2PrevSibling->textContent;\n\t\t\t\t$h2PrevSibling = $h2PrevSibling->previousSibling;\n\t\t\t\t$this->jumpToPreviousTag($h2PrevSibling);\n\t\t\t\tif($h2PrevSibling->getAttribute('class') !== 'Cat1HL'){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t$cat1 = $h2PrevSibling->textContent;\n\t\t\t\tbreak;\n\t\t\tcase 'Cat1HL':\n\t\t\t\t$cat1 = $h2PrevSibling->textContent;\n\t\t\t\t$cat2 = '';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$h2PrevSibling = null;\n\n\t\t\t$item['title'] = '';\n\t\t\tif(!empty($cat1)){\n\t\t\t\t$item['title'] .= '[' . $cat1 . ($cat2 ? '/' . $cat2 : '') . '] ';\n\t\t\t}\n\t\t\t$item['title'] .= $h2->textContent;\n\n\t\t\t$node = $h2;\n\t\t\t$content = '';\n\t\t\t$contentEnd = false;\n\t\t\twhile(!$contentEnd){\n\t\t\t\t$node = $node->nextSibling;\n\t\t\t\tif(!$node || (\n\t\t\t\t\t\t$node->nodeType !== XML_TEXT_NODE && (\n\t\t\t\t\t\t\t$node->nodeName === 'h2' || (\n\t\t\t\t\t\t\t\t!is_null($node->attributes) &&\n\t\t\t\t\t\t\t\t!is_null($class = $node->attributes->getNamedItem('class')) &&\n\t\t\t\t\t\t\t\tin_array($class->nodeValue, array('Cat1HL', 'Cat2HL'))\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t){\n\t\t\t\t\t$contentEnd = true;\n\t\t\t\t}else{\n\t\t\t\t\t$content .= $node->C14N();\n\t\t\t\t}\n\t\t\t}\n\t\t\t$item['content'] = $content;\n\t\t\t$this->items[] = $item;\n\t\t}\n\t}", "public function get_documentinfo_output() {\n\n global $USER;\n\n $result = '';\n\n // Get the stored files\n $fs = get_file_storage();\n $dir = $fs->get_area_tree($this->page->context->id, 'block_module_info', 'documents', $this->data->context->id);\n\n $has_files = !(empty($dir['subdirs']) && empty($dir['files']));\n $hide_if_empty = !empty($this->data->block_config->hide_document_section_if_empty);\n\n $display_something = $has_files || (!$has_files && !$hide_if_empty);\n\n if($display_something) {\n $result = html_writer::start_tag('div', array('id'=>'documents'));\n\n $result .= mod_info_collapsible_region_start('documents-heading', 'modinfo-viewlet-documents', get_string('documents_header', 'block_module_info'), 'modinfo-documents', false, true);\n\n $result .= html_writer::start_tag('div', array('id'=>'documents-pane'));\n\n if (!$has_files) {\n $result .= $this->output->box(get_string('nofilesavailable', 'repository'));\n } else {\n $htmlid = 'document_tree_'.uniqid();\n $this->page->requires->js_init_call('M.block_module_info.init', array(false, $htmlid));\n $result .= '<div id=\"'.$htmlid.'\">';\n $result .= $this->htmllize_document_tree($this->page->context, $this->data->context, $dir);\n $result .= '</div>';\n }\n\n $result .= html_writer::end_tag('div');\n $result .= html_writer::end_tag('div');\n\n $result .= mod_info_collapsible_region_end(true);\n }\n\n return $result;\n }", "function field_details() \n { ?>\n <div class=\"field-details\">\n <?php if($this->setting['type'] != 'radio' && $this->setting['type'] != 'checkbox') : ?><label <?php $this->for_tag(\"inferno-concrete-setting-\"); ?>><?php endif; ?>\n <?php echo $this->setting['desc']; ?>\n <?php if($this->setting['type'] != 'radio' && $this->setting['type'] != 'checkbox') : ?></label><?php endif; ?>\n\n <?php if(isset($this->setting['more']) && $this->setting['more'] != '') : ?>\n <span class=\"more\"><?php echo $this->setting['more']; ?></span>\n <?php endif; ?>\n\n <?php if($this->setting['type'] == 'font') : ?>\n <div class=\"googlefont-desc\">\n <label <?php $this->for_tag(\"inferno-concrete-setting-\", \"-googlefont\"); ?>>\n <?php _e('Enter the Name of the Google Webfont You want to use, for example \"Droid Serif\" (without quotes). Leave blank to use a Font from the selector above.', 'inferno'); ?>\n </label>\n <span class=\"more\">\n <?php _e('You can view all Google fonts <a href=\"http://www.google.com/webfonts\">here</a>. Consider, that You have to respect case-sensitivity. If the font has been successfully recognized, the demo text will change to the entered font.', 'inferno'); ?>\n </span>\n </div>\n <?php endif; ?>\n </div>\n <?php\n }", "public function getMetaDescription();", "abstract protected function getMarkdown();", "function getAlternativePageContent(){\n\t\t$a_alternativePageContent = array(\n\t\t\t'keywords' => $GLOBALS['TSFE']->page['keywords'],\n\t\t\t'description' => $GLOBALS['TSFE']->page['description'],\n\t\t);\n\n\t\tforeach($GLOBALS['TSFE']->rootLine as $a_page){\n\t\t\t$a_pageData = $this->getPageData($a_page['uid']);\n\t\t\tif ( empty($a_alternativePageContent['keywords']) ){ $a_alternativePageContent['keywords'] = $a_pageData['keywords']; }\n\t\t\tif ( empty($a_alternativePageContent['description']) ){ $a_alternativePageContent['description'] = $a_pageData['description']; }\n\t\t\tif ( empty($a_alternativePageContent['tx_rkmetadata_seo']) ){ $a_alternativePageContent['tx_rkmetadata_seo'] = $a_pageData['tx_rkmetadata_seo']; }\n\t\t}\n\n\t\treturn $a_alternativePageContent;\n\t}", "function ep_bp_feature_box_summary() {\n\techo esc_html_e( 'Index BuddyPress content like groups and members.', 'elasticpress-buddypress' );\n}", "private function info()\n\t{\n\t\t$data = file_get_contents(DATAPATH.'sidebar.md');\n\t\t$result = $this->parsedown->text($data);\n\t\t$result = $this->parser->parse_string($result, $this->data, true);\n\t\treturn $result;\n\t}", "public function getTechnicalDescription(): ?string\r\n {\r\n\t\t$parsedown = new \\Parsedown();\r\n\t\t$stripTags = strip_tags($this->getTechnicalDescriptionOrigin());\r\n\t\t$stripTags = html_entity_decode($stripTags);\r\n//\t\t$markdown = preg_replace('@[\\n\\r]+@', \"\\n\", $stripTags);\r\n\t\treturn $parsedown->text($stripTags);\r\n }", "public static function help_inner () \n { \n $html = null;\n\n $top = __( 'Instruction Manual', 'label' );\n $inner = self::help_center();\n $bottom = self::page_foot();\n\n $html .= self::page_body( 'help', $top, $inner, $bottom );\n\n return $html;\n }", "public function getPageInfo(){\n\n $content = array();\n\n return $content;\n }", "function employees_baseline_html() {\r\n $baseline = '<section id=\"get-more\" class=\"get-more\">';\r\n $baseline .= '<a href=\"#\" class=\"get-more-employees\">Load More</a>';\r\n $baseline .= '<div class=\"ajax-loader\"><img src=\"' . plugin_dir_url( __FILE__ ) . 'css/spinner.svg\" width=\"32\" height=\"32\" /></div>';\r\n $baseline .= '</section><!-- .get-more -->';\r\n return $baseline;\r\n}", "function learn_press_course_lesson_description() {\n\t\tlearn_press_get_template( 'content-lesson/description.php' );\n\t}", "function L_getFormattingContent() { \n\t\t\n\t\t$content = get_the_content($more_link_text); \n\t\t$content = apply_filters('the_content', $content); \n\t\techo $content;\n\t\t\n\t}", "public function extractContent()\n {\n $metas = $this->parsedDOM->getElementsByTagName('meta');\n\n // If exists meta-description, uses it\n foreach ($metas as $meta)\n {\n // Loops the list of attributes\n foreach ($meta->attributes as $attribute)\n {\n\n // Checks if the page is OG Compliant\n if ($attribute->name == 'name'\n && $attribute->value == 'og:description'\n && $meta->attributes->getNamedItem('content')->value !== ''\n ) {\n // Returns the og:description\n return trim($meta->attributes->getNamedItem('content')->value);\n }\n\n // looks for the description meta tag\n if ($attribute->name == 'name'\n && $attribute->value == 'description'\n && $meta->attributes->getNamedItem('content')->value !== ''\n ) {\n return trim($meta->attributes->getNamedItem('content')->value);\n }\n }\n }\n\n $article = $this->parsedDOM->getElementsByTagName('article')->item(0);\n\n if ($article !== null ) {\n // Search the first paragraph inside the article\n $paragraph = $article->firstChild->nodeValue;\n return trim($paragraph);\n\n }\n\n $paragraph = $this\n ->parsedDOM\n ->getElementsByTagName('p')\n ->item(0);\n\n if ($paragraph !== null) {\n return trim($paragraph);\n }\n\n return trim($this\n ->parsedDOM\n ->getElementsByTagName('body')\n ->item(0)\n ->nodeValue);\n }", "public function getGeneralDocumentation();", "public function getDetailedDocumentation();", "public function getPage() {\n return $this->render('payment_info.phtml');\n }", "public function description()\n {\n $sections = array();\n // Aux values\n $comment_sections = $this->comment_sections();\n $section_comment = $this->section_comment(); \n $modifiers_comment = $this->modifiers_comment();\n \n foreach ( $comment_sections as $key => $section) {\n if ( ($section != $section_comment) && ($section != $modifiers_comment) ) {\n $sections[] = $section;\n }\n }\n return trim(implode(\"\\n\\n\", $sections));\n }", "public function getInfo()\n {\n ob_start();\n echo '<h3>ForWeb framework Access package</h3>';\n echo \"<p>Contain functions for user access. Main module terms - 'user group' and 'action'.\"\n .\" Each user can belong to only one user group, by default system contain three groups:</p>\";\n echo \"<ul>\";\n echo \"<li>anonymous</li>\";\n echo \"<li>authorized</li>\";\n echo \"<li>administrator</li>\";\n echo \"</ul>\";\n echo \"<p>You can add any other user group, or delete this groups. All groups have equals 'actions', but\"\n .\" different permissions. This module have code-generic functionality, and you must know what are you doing,\"\n .\" when delete any permissions. Core package does not use generic-code, but any custom module can use some\"\n .\" of them. So, if module contain use generic-access function, you will get an exception.</p>\";\n $out = ob_get_contents();\n ob_end_clean();\n return $out;\n }", "function info_page_html() {\n\t\t\n\t\t// Vars.\n\t\t$view = array(\n\t\t\t'version'\t\t=> acf_get_setting('version'),\n\t\t\t'have_pro'\t\t=> acf_get_setting('pro'),\n\t\t\t'tabs'\t\t\t=> array(\n\t\t\t\t'new'\t\t\t=> __(\"What's New\", 'acf'),\n\t\t\t\t'changelog'\t\t=> __(\"Changelog\", 'acf')\n\t\t\t),\n\t\t\t'active'\t\t=> 'new'\n\t\t);\n\t\t\n\t\t// Find active tab.\n\t\tif( isset($_GET['tab']) && $_GET['tab'] === 'changelog' ) {\n\t\t\t$view['active'] = 'changelog';\n\t\t}\t\t\n\t\t\n\t\t// Load view.\n\t\tacf_get_view('settings-info', $view);\n\t}", "function get_about($value='')\r {?>\r\r<p>Titiksha is annual technical festival held at \r <a href=\"http://smvdu.net.in\" title=\"Shri Mata Vaishno\r Devi University\">SMVD University</a> \r <a href=\"http://smvdu.net.in/about/location.html\" \r class=\"external\" title=\"Location and map\">campus</a>. \r We cover technical <a href=<?php echo site_event_url; ?>\r class=\"external\" title=\"Goto events\">events</a>, competitions \r to bring to the knowledge of students, various latest technologies \r and development in their respective fields.</p>\r\r <p>You participation is valuable in making this event\r a success.</p>\r\r<?php \r }", "abstract function getdescription();", "protected function getInfoLink()\n {\n return Injector::inst()->create(\n GridFieldHtmlFragment::class,\n 'buttons-before-right',\n DBField::create_field('HTMLFragment', ArrayData::create([\n 'Link' => 'https://userhelp.silverstripe.org/en/4/optional_features/modules_report',\n 'Label' => _t(__CLASS__ . '.MORE_INFORMATION', 'More information'),\n ])->renderWith(__CLASS__ . '/MoreInformationLink'))\n );\n }", "public function getInfo(){ \n return $this->title .' ('. $this->year . ')';\n }", "public function getDescription()\n {\n return 'Crawls a NNTP server for groups and add further messages for every single group';\n }", "private function get_description()\n\t{\n\t\treturn $this->m_description;\n\t}", "private function get_description()\n\t{\n\t\treturn $this->m_description;\n\t}", "public function get_page_info()\n {\n }", "public function getDetails($group_id);", "public function getDescription()\n {\n return $this->getHeaderFieldModel('Content-Description');\n }", "static function description(): string {\r\n return 'A website owned or used by The Medium'; \r\n }", "public function get_description()\n {\n return 'Show the top performing members in a community. The addon adds a [tt]main_stars[/tt] block that ranks members on how many points they have been given in a certain category (also it changes the points module to allow selection of such categories when giving points). It also adds a block to show recent points transfers. Finally, it adds a line to member\\'s profile screens that says how many topics they have created, and how many they have replied to, to give a reflection of whether they help more than they ask or vice-versa.\n\nUsage:\n[code=\"Comcode\"][block max=\"10\"]side_recent_points[/block][/code]\nand\n[code=\"Comcode\"][block=\"Helpful soul\"]main_stars[/block][/code]The [tt]POINTS_GIVE[/tt] ([tt]themes/default/templates_custom[/tt]) template contains hard-coded HTML that defines each kind of points category that can be used. It is likely you will want to put out one an instance of the [tt]main_stars[/tt] block for each category (using the syntax demonstrated above).';\n }", "function split_content() {\n global $post;\n if( strpos( $post->post_content, '<!--more-->' ) ) {\n $content = preg_split('/<span id=\"more-\\d+\"><\\/span>/i', get_the_content('more'));\n $ret = '<div class=\"content_excerpt\">'. array_shift($content). '</div>';\n if (!empty($content)) $ret .= '<div class=\"content_more\">'. implode($content). '</div>';\n $ret .= '<div class=\"more_link\"><a class=\"read-more\" title=\"'. __('Read more', 'monum') .'\" data-text-less=\"'. __('Read less', 'monum') .'\">'. __('Read more', 'monum') .'</a></div>';\n return apply_filters('the_content', $ret);\n } else {\n return the_content();\n } \n}", "public function metaDescription()\n\t{\n\t\tif ( static::$titleLangPrefix and static::$descriptionLangSuffix )\n\t\t{\n\t\t\treturn \\IPS\\Member::loggedIn()->language()->addToStack( static::$titleLangPrefix . $this->id . static::$descriptionLangSuffix, FALSE, array( 'striptags' => TRUE ) );\n\t\t}\n\t\treturn NULL;\n\t}", "function info() {\n\t \treturn $this->description;\n\t }", "public function pageDetails(): array\n {\n $details = [\n 'title' => 'controller-countries-title',\n 'icon' => '<i class=\"fas fa-user\"></i>',\n 'description' => 'controller-countries-description',\n 'menu' => 'regional-info',\n ];\n return $details;\n }", "function split_content() {\n\tglobal $more;\n\t$more = true;\n\t$content = preg_split('/<span id=\"more-\\d+\"><\\/span>/i', get_the_content('more'));\n\tfor($c = 0, $csize = count($content); $c < $csize; $c++) {\n\t\t$content[$c] = apply_filters('the_content', $content[$c]);\n\t}\n\treturn $content;\n}", "public function getWikiDescription() {\n\t\tforeach ( $this->gpml->Comment as $comment ) {\n\t\t\tif ( $comment['Source'] == COMMENT_WP_DESCRIPTION ) {\n\t\t\t\treturn (string)$comment;\n\t\t\t}\n\t\t}\n\t}", "function bpfit_walk_subtab_function_to_show_title() {\n\t\t\techo 'Walk Desc.';\n\t\t}", "function get_html_pre_page_end();", "public function visitHelpPage()\n {\n $this->data .= \"\n /* --- visitHelpPage --- */\n _ra.visitHelpPage = {'visit': true};\n \n if (_ra.ready !== undefined) {\n _ra.visitHelpPage();\n }\n \";\n\n return $this->data;\n }", "function site_description() {\n\treturn site_meta('description');\n}", "private function getCommonDescriptionforField() {\n if(strlen($this->description) > 0) {\n return '<span id=\"'.$this->name.'-help\" class=\"help-block\">'.$this->description.'</span>'.\"\\n \\t\";\n }\n }", "function generalTemplate ($data){\n\t\t\tob_start();\t\t\n\t\t\tif(isset($data['title']) and isset($data['description'])):\n\t\t\t?>\n\t\t\t<div class=\"title text\">\n\t\t\t\t<h1><?php echo $data['title']; ?></h1>\n\t\t\t</div>\n \n <div id=\"description text\">\n\t\t\t\t<?php echo $data['description']; ?>\n </div>\n\t\t\t<?php\n\t\t\tendif;\n\t\t\t$output = ob_get_contents();\n\t\t\tob_end_clean();\t\n\t\t\t\n\t\t\treturn $output;\n\t\t}", "function information()\n\t\t{\n\t\t\t$this->directPageDetails(\"information\");\n\t\t}", "public function getHTML() {\n // Define the variable to output the HTML in\n $out = '';\n\n // Add the HTML code for each meta tag\n foreach($this->meta as $entry)\n $out .= $entry->getHTML() . PHP_EOL;\n\n // Return the HTML code\n return $out;\n }", "public function getPageDetails()\n\t{\n\t\t$v = new View(0);\n\t\treturn $v->getAllRecords( FALSE );\n\t\t\n\t}", "function getOverview() ;", "function getInfo() {\n return array(\n 'author' => 'Sam Wilson',\n 'email' => '[email protected]',\n 'date' => '2012-03-10',\n 'name' => 'Proofread Page',\n 'desc' => 'View images side-by-side with pages, for viewing and editing.',\n 'url' => 'http://www.dokuwiki.org/plugin:proofreadpage',\n );\n }", "public function meta_description()\n\t{\n\t\treturn $this->meta_description;\n\t}", "protected function _getReviewHtml(){\n\t\tMage::app()->getCacheInstance()->cleanType('layout');\n\n\t\t$layout = $this->getLayout();\n\t\t$update = $layout->getUpdate();\n\t\t$update->load('checkout_onepage_review');\n\t\t$layout->generateXml();\n\t\t$layout->generateBlocks();\n\t\t$review = $layout->getBlock('root');\n\t\t$review->setTemplate('opc/onepage/review/info.phtml');\n\t\t\n\t\treturn $review->toHtml();\n\t}", "function description( $html = true )\r\n {\r\n if ( $html )\r\n return eZTextTool::fixhtmlentities( htmlspecialchars( $this->Description ) );\r\n else\r\n return $this->Description;\r\n }" ]
[ "0.65902627", "0.62305623", "0.6092215", "0.6064208", "0.6004666", "0.59977794", "0.59437317", "0.5936913", "0.5925137", "0.58859575", "0.5874702", "0.58557254", "0.5845434", "0.5817111", "0.5805628", "0.5800575", "0.5799283", "0.57827085", "0.5751813", "0.5749961", "0.5734186", "0.5729453", "0.5686248", "0.56841207", "0.5661133", "0.56369364", "0.5626642", "0.5623676", "0.56173754", "0.561252", "0.5610427", "0.56054825", "0.5581349", "0.55737096", "0.55719066", "0.55658394", "0.55615586", "0.5560048", "0.5558239", "0.5550105", "0.55496395", "0.5535338", "0.5528913", "0.5521646", "0.55184287", "0.5506819", "0.55010056", "0.54959774", "0.5486649", "0.5486349", "0.5486027", "0.5485553", "0.54852295", "0.54759717", "0.5472967", "0.54724115", "0.5470843", "0.5468408", "0.54656774", "0.54651815", "0.5463907", "0.5458259", "0.5455954", "0.54538035", "0.54451174", "0.5440495", "0.5439811", "0.54392105", "0.54296273", "0.5424764", "0.5422581", "0.5419534", "0.54166394", "0.5411175", "0.5411175", "0.5394322", "0.5387446", "0.5384219", "0.53836715", "0.53786415", "0.53681135", "0.53627294", "0.5355811", "0.53524137", "0.5347305", "0.53418356", "0.53325254", "0.533018", "0.53291", "0.5325504", "0.53183806", "0.531807", "0.5317956", "0.53156525", "0.5311208", "0.5308519", "0.53066754", "0.53009295", "0.52982956", "0.52981246" ]
0.66243196
0
Get the Grouping page special header class name
public function getSpecialHeaderClassName() { return $this->specialHeaderClassName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function voyage_mikado_header_class($classes) {\n\t\t$header_type = voyage_mikado_get_meta_field_intersect('header_type', voyage_mikado_get_page_id());\n\n\t\t$classes[] = 'mkdf-'.$header_type;\n\n\t\treturn $classes;\n\t}", "public function getGroupHeader()\n {\n if (is_null($this->groupHeader)) {\n $this->groupHeader = new SEPAGroupHeader();\n }\n\n return $this->groupHeader;\n }", "function publisher_get_header_layout_class() {\n\n\t\tstatic $class;\n\n\t\tif ( isset( $class ) ) {\n\t\t\treturn $class;\n\t\t}\n\n\t\t$class = '';\n\t\t$layout = publisher_get_header_layout();\n\n\t\t$class_map = array(\n\t\t\t'boxed' => 'boxed',\n\t\t\t'full-width' => 'full-width',\n\t\t\t'stretched' => 'full-width stretched',\n\t\t\t'out-full-width' => 'full-width',\n\t\t\t'out-stretched' => 'full-width stretched',\n\t\t);\n\n\t\tif ( isset( $class_map[ $layout ] ) ) {\n\n\t\t\t$class = $class_map[ $layout ];\n\t\t}\n\n\t\treturn $class;\n\t}", "public function getHeaderClass() {\n if (null != $this->headerClass) {\n return $this->headerClass;\n }\n $_ve = $this->getValueExpression(\"headerClass\");\n if ($_ve != null) {\n return $_ve->getValue($this->getFacesContext()->getELContext());\n } else {\n return null;\n }\n }", "public function get_name()\n {\n return 'section-heading';\n }", "function header_class( $class = '' ) {\n\techo 'class=\"' . join( ' ', get_header_class( $class ) ) . '\"';\n}", "public function get_header()\n\t{\n\t\t$header\t\t=\t$this->lang->get_line( \"controller_title\", $this->table );\n\t\tif ( !$header )\n\t\t{\n\t\t\t$header\t\t=\t( substr( strtolower( get_class( $this ) ), 0, strrpos( strtolower( get_class( $this ) ), \"_\" , -1 ) ) );\n\t\t\t$controller\t=\t$this->singlepack->get_controller( $header );\n\t\t\tif ( !$controller )\n\t\t\t{\n\t\t\t\treturn ucfirst( substr( strtolower( get_class( $this ) ), 0, strrpos( strtolower( get_class( $this ) ), \"_\" , -1 ) ) );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn $controller->nome; // str_replace( '_', ' ', $header );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $header;\n\t\t}\n\t}", "function get_body_class($classes){\n $group=groups_get_current_group();\n \n if(!empty($group))\n $classes[]='is-single-group';\n\n return $classes;\n\n\n }", "function wprt_feature_title_heading_classes() {\n\t// Define classes\n\t$classes = '';\n\n\t// Get topbar style\n\tif ( wprt_get_mod( 'featured_title_heading_shadow' ) ) {\n\t\t$classes .= 'has-shadow';\n\t}\n\n\t// Return classes\n\treturn esc_attr( $classes );\n}", "function get_page_heading()\n {\n return $this->object->get_page_title();\n }", "function flatsome_header_title_classes(){\n echo implode(' ', apply_filters( 'flatsome_header_title_class', array() ) );\n}", "protected function getGroupName() {\n\t\treturn 'tilesheet';\n\t}", "function cs_subheader_classes( $header_banner_selection = ''){\n\tif ($header_banner_selection == \"No Image\") {\n \techo 'cs-no-image';\n }elseif($header_banner_selection == 'Custom Image'){\n\t\techo 'cs-custom-image';\n\t} elseif ($header_banner_selection == \"Default Image\") {\n \techo \"default-image\";\n } else {\n \techo \"default-image\";\n }\n}", "function newsroom_elated_get_header() {\n $id = newsroom_elated_get_page_id();\n\n //will be read from options\n $header_type = 'header-type3';\n $header_behavior = newsroom_elated_options()->getOptionValue('header_behaviour');\n\n if(HeaderFactory::getInstance()->validHeaderObject()) {\n $parameters = array(\n 'hide_logo' => newsroom_elated_options()->getOptionValue('hide_logo') == 'yes' ? true : false,\n 'header_in_grid' => newsroom_elated_options()->getOptionValue('header_in_grid') == 'yes' ? true : false,\n 'logo_position' => newsroom_elated_get_meta_field_intersect('logo_position',$id),\n 'show_sticky' => in_array($header_behavior, array(\n 'sticky-header-on-scroll-up',\n 'sticky-header-on-scroll-down-up'\n )) ? true : false,\n );\n\n $parameters = apply_filters('newsroom_elated_header_type_parameters', $parameters, $header_type);\n\n HeaderFactory::getInstance()->getHeaderObject()->loadTemplate($parameters);\n }\n }", "function flatsome_header_classes(){\n echo implode(' ', apply_filters( 'flatsome_header_class', array() ) );\n}", "function voyage_mikado_header_behaviour_class($classes) {\n\n\t\t$classes[] = 'mkdf-'.voyage_mikado_options()->getOptionValue('header_behaviour');\n\n\t\treturn $classes;\n\t}", "protected function getPageClassName()\n {\n return ContainerPage::className();\n }", "public function getClassNm()\r\n {\r\n\t\t$tabInfo = $this->getPathInfo();\r\n\t\treturn $tabInfo[1];\r\n }", "public function getPageHeader()\n\t{\n\t\treturn $this->_pageHeader;\n\t}", "public function CustomClassName()\n\t{\n\t\tif ($this->CopyContentFromID > 0) {\n\t\t\tif ($this->CopyContentFrom()->ClassName == \"NavigationModule\") {\n\t\t\t\treturn \"NavigationModule_\" . $this->CopyContentFrom()->ModuleLayout;\n\t\t\t} else {\n\t\t\t\treturn $this->CopyContentFrom()->ClassName;\n\t\t\t}\n\t\t} else {\n\t\t\treturn $this->ClassName;\n\t\t}\n\t}", "function biagiotti_mikado_get_header() {\n\t\t$id = biagiotti_mikado_get_page_id();\n\t\t\n\t\t//will be read from options\n\t\t$header_type = biagiotti_mikado_get_meta_field_intersect( 'header_type', $id );\n\t\t\n\t\t$menu_area_in_grid = biagiotti_mikado_get_meta_field_intersect( 'menu_area_in_grid', $id );\n\t\t\n\t\t$header_behavior = biagiotti_mikado_get_meta_field_intersect( 'header_behaviour', $id );\n\t\t\n\t\tif ( HeaderFactory::getInstance()->validHeaderObject() ) {\n\t\t\t$parameters = array(\n\t\t\t\t'hide_logo' => biagiotti_mikado_options()->getOptionValue( 'hide_logo' ) == 'yes',\n\t\t\t\t'menu_area_in_grid' => $menu_area_in_grid == 'yes',\n\t\t\t\t'show_sticky' => in_array( $header_behavior, array( 'sticky-header-on-scroll-up', 'sticky-header-on-scroll-down-up' ) ),\n\t\t\t\t'show_fixed_wrapper' => in_array( $header_behavior, array( 'fixed-on-scroll' ) ),\n\t\t\t);\n\t\t\t\n\t\t\t$parameters = apply_filters( 'biagiotti_mikado_filter_header_type_parameters', $parameters, $header_type );\n\t\t\t\n\t\t\tHeaderFactory::getInstance()->getHeaderObject()->loadTemplate( $parameters );\n\t\t}\n\t}", "public function get_name() {\n return 'apr_modern_heading';\n }", "function PageHead($d,$e) {\n\n print \"<header class=\\\"$e\\\">\\n\";\n print \"<H1>$d</H1>\\n\";\n print \"</header>\\n\";\n\n}", "public function getTabTitle()\r\n {\r\n return __('General Group');\r\n }", "public function GetHeader()\n {\n return $this->HeaderName;\n }", "public function getClassName() ;", "function Name(){\n\t\tif(!$this->title) {\n\t\t\t$fs = $this->FieldSet();\n\t\t\t$compositeTitle = '';\n\t\t\t$count = 0;\n\t\t\tforeach($fs as $subfield){\n\t\t\t\t$compositeTitle .= $subfield->Name();\n\t\t\t\tif($subfield->Name()) $count++;\n\t\t\t}\n\t\t\tif($count == 1) $compositeTitle .= 'Group';\n\t\t\treturn ereg_replace(\"[^a-zA-Z0-9]+\",\"\",$compositeTitle);\n\t\t}\n\n\t\treturn ereg_replace(\"[^a-zA-Z0-9]+\",\"\",$this->title);\t\n\t}", "public function getMainHeading() : string\n {\n return <<< 'MAINHEADING'\nGROUP BY Command\nMAINHEADING;\n }", "function macro_get_class_repo_header($path)\n{\n $ns = explode('\\\\', macro_convert_path_to_class_name($path));\n array_pop($ns);\n $ns = implode('\\\\', $ns);\n\n return macro_get_file_header($path)\n . <<<HEAD\nnamespace $ns;\n\n\nHEAD;\n}", "public function getTagsHeaderName()\n {\n return $this->headerFormatter->getTagsHeaderName();\n }", "protected function getHeadingHtml() {\n\t\t$heading = '';\n\t\tif ( $this->isUserPage ) {\n\t\t\t// The heading is just the username without namespace\n\t\t\t$heading = $this->pageUser->getName();\n\t\t} else {\n\t\t\t$pageTitle = $this->getOutput()->getPageTitle();\n\t\t\tif ( $pageTitle ) {\n\t\t\t\t$heading = $pageTitle;\n\t\t\t}\n\t\t}\n\t\treturn Html::rawElement( 'h1', [ 'id' => 'section_0' ], $heading );\n\t}", "function outputHeader()\n {\n global $application;\n\n $output = '';\n if (!is_array($this -> _attrs))\n return $output;\n\n // output error column\n if (is_array($this -> _Errors) && !empty($this -> _Errors))\n $output .= $this -> mTmplFiller -> fill(\n 'catalog/product_group_edit/',\n 'header-error.tpl.html',\n array()\n );\n\n foreach($this -> _attrs as $k => $v)\n {\n if ($v != 'YES')\n continue;\n\n $template_contents = array(\n 'HeaderName' => getMsg('SYS', @$this -> _headermap[$k])\n );\n $this -> _Template_Contents = $template_contents;\n $application -> registerAttributes($this -> _Template_Contents);\n $output .= $this -> mTmplFiller -> fill(\n 'catalog/product_group_edit/',\n 'header-cell.tpl.html',\n array()\n );\n }\n\n return $output;\n }", "public function buildHeader() {\n return [\n ['data' => t('Teaching format'), 'class' => ['align-middle']],\n ['data' => t('Event'), 'class' => ['align-middle']],\n ['data' => t('Tutor'), 'class' => ['align-middle']],\n ['data' => t('Location'), 'class' => ['align-middle']],\n ['data' => t('Room'), 'class' => ['align-middle']],\n [\n 'data' => t('Date/time'),\n 'field' => 'time.field_event_time_value',\n 'sort' => 'desc',\n 'class' => ['align-middle'],\n ],\n ['data' => t('Registration status'), 'class' => ['align-middle']],\n ];\n }", "function minorite_header($variables){\n return '<header'.drupal_attributes($variables['elements']['#wrapper_attributes']).'>'.$variables['elements']['#children'].'</header>';\n}", "public function getClassName() {\t\t\n\t\treturn MemberHelper::getClassName($this->classNumber);\n\t}", "function pageGroup() {\n $thisDir = pathinfo($_SERVER['PHP_SELF'], PATHINFO_DIRNAME);\n $thisPage = pathinfo($_SERVER['PHP_SELF'], PATHINFO_BASENAME);\n\n $result = '';\n\n if (($thisDir == '/') && ($thisPage == 'index.php')) {\n $result = 'Home';\n }\n else if ($thisDir == '/why-choose-us') {\n $result = 'Why Choose Us?';\n }\n else if (($thisDir == '/big-button-cell-phone') && ($thisPage == 'index.php')) {\n $result = 'Phone';\n }\n else if ($thisDir == '/senior-cell-phone-plans') {\n $result = 'Plans';\n }\n else if ($thisDir == '/shop') {\n $result = 'Shop';\n }\n else if ($thisDir == '/catalog') {\n $result = 'Shop';\n }\n else if ($thisDir == '/one-call') {\n $result = 'oneCall';\n }\n else if ($thisDir == '/activate') {\n $result = 'Activate Phone';\n }\n\n return $result;\n //error_log(\"result: \" . $result);\n }", "function megatron_ubc_clf_header($variables) {\n global $base_path;\n $output = '';\n if (theme_get_setting('clf_faculty')) {\n $output .= '<div id=\"ubc7-unit-name\"><a href=\"' . $base_path . '\"><span id=\"ubc7-unit-faculty\">' . theme_get_setting('clf_faculty_name');\n $output .= '</span><span id=\"ubc7-unit-identifier\">';\n $output .= '' . theme_get_setting('clf_unitname') . '</span></a></div>';\n }\n else {\n $output .= '<div id=\"ubc7-unit-name\" class=\"ubc7-single-element\"><a href=\"/\"><span id=\"ubc7-unit-identifier\">';\n $output .= '' . theme_get_setting('clf_unitname') . '</span></a></div>';\n }\n return $output;\n}", "public function presentHeader() {\r\n $html = parent::presentHeader();\r\n\r\n return $html;\r\n }", "public function getHeaderTpl(){\n return $this->templates['header'];\n }", "function get_custom_header()\n {\n }", "abstract public function getGroupName();", "function get_html_header();", "public function getPageHeader() {\n\n\t\t//this is a single call function\n\t\tif (!$this->isFirstCall(__FUNCTION__))\n\t\treturn;\n\n\t\treturn $this->renderView('page-header',array(\n\t\t\t'data' => $this->getCurrentProductDetails(),\n\t\t\t));\n\t}", "public function getPageClasses( $title ) {\n\t\t$className = parent::getPageClasses( $title );\n\t\t$className .= ' ' . $this->getMode();\n\t\tif ( $title->isMainPage() ) {\n\t\t\t$className .= ' page-Main_Page ';\n\t\t} elseif ( $title->isSpecialPage() ) {\n\t\t\t$className .= ' mw-mf-special ';\n\t\t}\n\n\t\tif ( $this->isAuthenticatedUser() ) {\n\t\t\t$className .= ' is-authenticated';\n\t\t}\n\t\treturn $className;\n\t}", "function getGroupName() {\n\t\treturn 'pagetools';\n\t}", "function get_css_header();", "function mkd_burst_get_header_style() {\r\n global $mkd_burst_options;\r\n\r\n $id = mkd_burst_get_page_id();\r\n $header_style = '';\r\n\r\n if(get_post_meta($id, \"mkd_header-style\", true) != \"\") {\r\n $header_style = get_post_meta($id, \"mkd_header-style\", true);\r\n } elseif(isset($mkd_burst_options['header_style'])) {\r\n $header_style = $mkd_burst_options['header_style'];\r\n }\r\n\r\n return $header_style;\r\n }", "public function getClassname(){\n\t\treturn $this->classname;\n\t}", "public function getClassName();", "public function getClassName();", "abstract public function\r\n\t\tget_admin_page_class_name();", "public function getBasicHeaderTpl(){\n return $this->templates['header_simple'];\n }", "public function getClassName() {}", "public function getClassName() {}", "public function getClassName() {}", "public function getClassName() {}", "function get_header()\n\t{\n\t\treturn $this->header;\n\t}", "protected function draw_groupsHeaderHorizontal()\n {\n // $this->output->setColumnNo(0);\n $lastcolumno = $this->output->getColumnNo();\n $this->output->setColumnNo(0);\n $this->draw_groupsHeader();\n $this->output->setColumnNo($lastcolumno);\n $this->currentRowTop = $this->output->getLastBandEndY();\n \n //output print group\n //set callback use next page instead\n // echo 'a'; \n }", "public function getGroupedTitle()\n {\n return $this->groupedTitle;\n }", "function MyApp_Interface_HEAD_Title()\n {\n $comps=preg_split('/::/',parent::MyApp_Interface_HEAD_Title());\n $keys=array(\"Initials\",\"Name\",\"Title\");\n \n $unit=$this->Unit();\n foreach ($keys as $key)\n {\n $name=$this->GetRealNameKey($unit,$key);\n \n if (!empty($name))\n {\n array_push($comps,$name);\n break;\n }\n }\n \n $event=$this->Event();\n foreach ($keys as $key)\n {\n $name=$this->GetRealNameKey($event,$key);\n \n if (!empty($name))\n {\n array_push($comps,$name);\n break;\n }\n }\n\n return join(\"::\",array_reverse($comps)); \n }", "public function getUlClass(): string;", "protected function getGroupName() {\n\t\treturn 'pagetools';\n\t}", "function get_header(){\n\t\tglobal $FANNIE_ROOT;\n\t\tob_start();\n\t\t$page_title = $this->title;\n\t\t$header = $this->header;\n\t\tinclude($FANNIE_ROOT.'src/header_install.html');\n\t\treturn ob_get_clean();\n\n\t}", "public function get_header() {\n $this->do_header();\n return $this->c_header;\n }", "public function getHeading(): string;", "public function getHeadingTag()\n {\n return $this->Parent()->HeadingTag;\n }", "public function header() {\r\n $html = <<<HTML\r\n\r\n <header>\r\n <p class=\"welcomeScreen\" ><img src=\"images/title.png\" alt=\"\" ></p>\r\n <h1 class=\"welcomeScreen\">$this->title</h1>\r\n </header>\r\nHTML;\r\n return $html;\r\n }", "public function get_title()\n {\n return __('Section Heading', 'careerfy-frame');\n }", "public function get_header()\n {\n return <<<EOD\n<div id=\"sitehdr\">\n Sitewide Header\n</div>\n\nEOD;\n }", "protected function getGroupName() {\n\t\treturn 'wiki';\n\t}", "public function getTitle()\n {\n return P4Cms_Navigation::expandMacros(parent::getTitle(), $this);\n }", "function get_custom_header_markup()\n {\n }", "function printPageHeader($g) {\n\t\t$g = parent::printPageHeader($g);\n\t\t?>\n\t\t\t<input type=\"hidden\" id=\"selectIdTournament\" name=\"selectIdTournament\" value=\"\"/>\n\t\t\t<input type=\"hidden\" id=\"selectIdGame\" name=\"selectIdGame\" value=\"\"/>\n\t\t\t<div class=\"divTitle scoring\"><div class=\"divTableCell\">Player Profile</div></div>\t\t\n\t\t\t<div id=\"tournamentList\" class=\"ranking\">\n\t\t<?php\n\t\t\tif(LibTools::isAdmin()) {\n\t\t\t\t$this->printPageHeaderAdmin($g);\n\t\t\t\t$this->printGameList($g);\n\t\t\t} else {\n\t\t\t\t$this->printPageHeaderPublic($g);\n\t\t\t}\n\t\t\t$this->printGamePlayer($g);\n\n\t\treturn $g;\n\t}", "public function get_configcustindexgroupby() {\n return DplusWire::wire('pages')->get('/config/customer/')->group_custindexby->title;\n }", "function voyage_mikado_header_class_first_level_bg_color($classes) {\n\n\t\t//check if first level hover background color is set\n\t\tif(voyage_mikado_options()->getOptionValue('menu_hover_background_color') !== '') {\n\t\t\t$classes[] = 'mkdf-menu-item-first-level-bg-color';\n\t\t}\n\n\t\treturn $classes;\n\t}", "function get_page_title()\n {\n return $this->object->name;\n }", "private static final function getPageTitle () {\r\n // Execute the <title tag> .tp file;\r\n $webHeaderString = new FileContent (FORM_TP_DIR . _S . 'frm_web_header_title.tp');\r\n return $webHeaderString->doToken ('[%TITLE_REPLACE_STRING%]',\r\n implode (_DCSP, ((self::$objPageTitleBackward->toInt () == 1) ? (self::$objPageTitle->arrayReverse ()->toArray ()) :\r\n self::$objPageTitle->toArray ())));\r\n }", "public function get_template_name(){\n\n return str_replace(\"_\",\"\",str_replace(\"_page\", \"\", get_class($this))) . \".tpl\";\n }", "function wpex_header_classes() {\n\n\t// Vars\n\t$post_id = wpex_get_current_post_id();\n\t$header_style = wpex_header_style( $post_id );\n\n\t// Setup classes array\n\t$classes = array();\n\n\t// Main header style\n\t$classes['header_style'] = 'header-'. $header_style;\n\n\t// Full width header\n\tif ( 'full-width' == wpex_site_layout() && wpex_get_mod( 'full_width_header' ) ) {\n\t\t$classes[] = 'wpex-full-width';\n\t}\n\n\t// Sticky Header\n\tif ( wpex_has_sticky_header() ) {\n\n\t\t// Fixed header style\n\t\t$fixed_header_style = wpex_sticky_header_style();\n\n\t\t// Main fixed class\n\t\t$classes['fixed_scroll'] = 'fixed-scroll'; // @todo rename this at some point?\n\t\tif ( wpex_has_shrink_sticky_header() ) {\n\t\t\t$classes['shrink-sticky-header'] = 'shrink-sticky-header';\n\t\t\tif ( 'shrink_animated' == $fixed_header_style ) {\n\t\t\t\t$classes['anim-shrink-header'] = 'anim-shrink-header';\n\t\t\t}\n\t\t}\n\n\t}\n\n\t// Reposition cart and search dropdowns\n\tif ( 'three' == $header_style\n\t\t|| 'four' == $header_style\n\t\t|| 'five' == $header_style\n\t\t|| ( 'two' == $header_style && wpex_get_mod( 'header_menu_center', false ) )\n\t) {\n\t\t$classes[] = 'wpex-reposition-cart-search-drops';\n\t}\n\n\t// Dropdown style (must be added here so we can target shop/search dropdowns)\n\t$dropdown_style = wpex_get_mod( 'menu_dropdown_style' );\n\tif ( $dropdown_style && 'default' != $dropdown_style ) {\n\t\t$classes['wpex-dropdown-style-'. $dropdown_style] = 'wpex-dropdown-style-'. $dropdown_style;\n\t}\n\n\t// Dropdown shadows\n\tif ( $shadow = wpex_get_mod( 'menu_dropdown_dropshadow' ) ) {\n\t\t$classes[] = 'wpex-dropdowns-shadow-'. $shadow;\n\t}\n\n\t// Header Overlay Style\n\tif ( wpex_has_overlay_header() ) {\n\n\t\t// Get header style\n\t\t$overlay_style = wpex_overlay_header_style();\n\t\t$overlay_style = $overlay_style ? $overlay_style : 'light';\n\n\t\t// Dark dropdowns for overlay header\n\t\tif ( 'core' != $overlay_style ) {\n\t\t\tif ( $post_id && $dropdown_style_meta = get_post_meta( $post_id, 'wpex_overlay_header_dropdown_style', true ) ) {\n\t\t\t\tif ( 'default' != $dropdown_style_meta ) {\n\t\t\t\t\t$classes[] = 'wpex-dropdown-style-'. $dropdown_style_meta;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tunset( $classes['wpex-dropdown-style-'. $dropdown_style] );\n\t\t\t\t$classes[] = 'wpex-dropdown-style-black';\n\t\t\t}\n\t\t}\n\n\t\t// Add overlay header class\n\t\t$classes[] = 'overlay-header';\n\n\t\t// Add overlay header style class\n\t\t$classes[] = $overlay_style .'-style';\n\n\t}\n\n\t// Dynamic style class\n\t$classes[] = 'dyn-styles';\n\n\t// Clearfix class\n\t$classes[] = 'clr';\n\n\t// Set keys equal to vals\n\t$classes = array_combine( $classes, $classes );\n\n\t// Apply filters for child theming\n\t$classes = apply_filters( 'wpex_header_classes', $classes );\n\n\t// Turn classes into space seperated string\n\t$classes = implode( ' ', $classes );\n\n\t// return classes\n\treturn $classes;\n\n}", "public function context_header($headerinfo = null, $headinglevel = 1) {\n if ($headinglevel == 1 && !empty($this->page->theme->settings->logo)) {\n return html_writer::tag('div', '', array('class' => 'logo'));\n }\n return parent::context_header($headerinfo, $headinglevel);\n }", "public function page_header(){\n\t\t$e = $this->Empresa->salida;\n\t\t$this->Empresa->where('id',$this->Empresa->user);\n\t\t$fondo = $this->Empresa->getOne('empresa_fondo','img_fondo');\n\t\t\n\t\t$link = 'index.php?inmv='.$e['nik_empresa'];\t\t\n\t\t$return = '<div class=\"page-header\" style=\"background-image: url(imagenes/fondos/'.$fondo['img_fondo'].');\">';\n\t\t$return .= '<div class=\"header-info\">';\n\t\t$return .= '<div class=\"row\">';\n\t\t$return .= '<div class=\"logo-header\"><a href=\"'.$link.'\"><img src=\"imagenes/logo/'.$e['img'].'\" /></a></div>';\n\t\t$return .= '<div class=\"header-desc col-md-6 visible-md visible-lg\">';\n\t\t$return .= '<h1>'.$e['descripcion'].'</h1>';\n\t\t$return .= '</div>';\n\t\t$return .= '</div>';\n\t\t$return .= '</div>';\n\t\t$return .= '</div>';\n\t\treturn $return;\n\t}", "public function get_header() {\n\t\tif (!isset($this->header)) {\n\t\t\t$this->get_array();\n\t\t}\n\t\treturn $this->header;\n\t}", "public function getPageTitleHeaderText() {\n return $this->pageTitleHeader()->getText();\n }", "public function header_text_classes() {\n\t\t$args = get_theme_support( 'site-logo' );\n\n\t\tif ( isset( $args[0]['header-text'] ) ) {\n\t\t\t// Use any classes defined in add_theme_support().\n\t\t\t$classes = $args[0]['header-text'];\n\t\t} else {\n\t\t\t// Otherwise, use these defaults, which will work with any Underscores-based theme.\n\t\t\t$classes = array(\n\t\t\t\t'site-title',\n\t\t\t\t'site-description',\n\t\t\t);\n\t\t}\n\n\t\t// If we've got an array, reduce them to a string for output\n\t\tif ( is_array( $classes ) ) {\n\t\t\t$classes = (string) '.' . implode( ', .', $classes );\n\t\t} else {\n\t\t\t$classes = (string) '.' . $classes;\n\t\t}\n\n\t\treturn $classes;\n\t}", "public function get_game_one_heading () {\n\t\treturn get_field('field_5b476ff519749', $this->get_id());\n\t}", "abstract public function getLayoutTemplateClassName();", "function getClass() {\n\t\treturn $this->classname ? $this->classname : \"theme\".\"1\";//rand(1, 6);\n\t}", "public function getTabLabel()\r\n {\r\n return __('General Group');\r\n }", "function transform_grouping_header_label($grouping_current, $grouping, $datum, $export_format) {\n global $SESSION, $CURMAN;\n\n if ($grouping->field == 'curriculum.id') {\n /**\n * Curriculum grouping - display the curriculum name or a default\n * if none\n */\n\n //get the curriculum id from the current grouping info\n $curriculumid = $grouping_current['curriculum.id'];\n\n if (empty($curriculumid)) {\n //default label\n return array(\n $this->add_grouping_header($grouping->label,\n get_string('non_curriculum_courses',\n 'rlreport_course_completion_by_cluster'),\n $export_format));\n } else {\n //actually have a curriculum, so display it\n $curriculum_name = get_field('crlm_curriculum', 'name', 'id', $curriculumid);\n\n $completed_description = '';\n if ($datum->completed) {\n //flag the curriculum as complete and show the completion date\n $a = $this->format_date($datum->curriculumcompletetime);\n $completed_description = get_string('completed_yes', 'rlreport_course_completion_by_cluster', $a);\n } else {\n //flag the curriculum as incomplete\n $completed_description = get_string('completed_no', 'rlreport_course_completion_by_cluster');\n }\n\n return array(\n $this->add_grouping_header($grouping->label,\n $curriculum_name.' '.$completed_description,\n $export_format));\n }\n } else if ($grouping->field == 'cluster.id') {\n /**\n * Cluster grouping - display the hierarchy of clusters\n */\n\n //get the current (new) cluster id\n $clusterid = $grouping_current[$grouping->field];\n $cluster = new cluster($clusterid);\n\n $result = array();\n\n //build the hierarchy bottom-up based on the supplied cluster\n $current_cluster_hierarchy = array();\n\n while ($cluster->id != 0) {\n $current_cluster_hierarchy[] = $cluster->id;\n $result[] = $this->add_grouping_header($grouping->label,\n $cluster->name,\n $export_format);\n $cluster = new cluster($cluster->parent);\n }\n\n //really need it top-down for comparison\n $current_cluster_hierarchy = array_reverse($current_cluster_hierarchy);\n\n //find the first position where the old and new hieararchies differ\n $final_pos = -1;\n for ($i = 0; $i < count($this->last_cluster_hierarchy) && $i < count($current_cluster_hierarchy); $i++) {\n if ($this->last_cluster_hierarchy[$i] != $current_cluster_hierarchy[$i]) {\n $final_pos = $i;\n break;\n }\n }\n\n //default to next level down\n if ($final_pos == -1) {\n $final_pos = max(count($this->last_cluster_hierarchy), count($current_cluster_hierarchy)) - 1;\n }\n\n //store for next iteration\n $this->last_cluster_hierarchy = $current_cluster_hierarchy;\n\n $result = array_reverse($result);\n\n /**\n * Get the listing of cluster leaders\n */\n $preferences = php_report_filtering_get_user_preferences('course_completion_by_cluster');\n if (isset($preferences['php_report_course_completion_by_cluster/clusterrole'])) {\n\n //context to check for role assignments\n $cluster_context_level = context_level_base::get_custom_context_level('cluster', 'block_curr_admin');\n\n //query to retrieve users directly assigned the configured role in the current cluster\n $sql = \"SELECT u.*\n FROM\n {$CURMAN->db->prefix_table('user')} u\n JOIN {$CURMAN->db->prefix_table('role_assignments')} ra\n ON u.id = ra.userid\n AND ra.roleid = {$preferences['php_report_course_completion_by_cluster/clusterrole']}\n JOIN {$CURMAN->db->prefix_table('context')} ctxt\n ON ra.contextid = ctxt.id\n AND ctxt.instanceid = {$datum->cluster}\n AND ctxt.contextlevel = {$cluster_context_level}\";\n\n $display = '';\n\n //append all the names together if there are multiple\n if ($recordset = get_recordset_sql($sql)) {\n while ($record = rs_fetch_next_record($recordset)) {\n if ($display == '') {\n $display = fullname($record);\n } else {\n $display .= ', '.fullname($record);\n }\n }\n }\n\n if ($display == '') {\n //no names found\n $display = get_string('na', 'rlreport_course_completion_by_cluster');\n }\n\n //add a header entry\n $cluster_leader_label = get_string('cluster_leaders', 'rlreport_course_completion_by_cluster').' ';\n $result[] = $this->add_grouping_header($cluster_leader_label, $display, $export_format);\n }\n\n //return the labels in top-down order\n return $result;\n } else {\n return array(\n $this->add_grouping_header($grouping->label,\n $grouping_current[$grouping->field],\n $export_format));\n }\n }", "function print_header_entries() {\n\n $result = '';\n\n if($entries = $this->get_header_entries()) {\n $result .= '<div class=\"php_report_header_entries\">';\n foreach($entries as $value) {\n\n $label_class = \"php_report_header_{$value->css_identifier} php_report_header_label\";\n $value_class = \"php_report_header_{$value->css_identifier} php_report_header_value\";\n\n $result .= '<div class=\"' . $label_class . '\">' . $value->label . '</div>';\n $result .= '<div class=\"' . $value_class . '\">' . $value->value . '</div>';\n\n }\n $result .= '</div>';\n }\n\n return $result;\n }", "public function createHeader() {\n\t\t$header = new PHPWord_Section_Header($this->_sectionCount);\n\t\t$this->_header = $header;\n\t\treturn $header;\n\t}", "public function getDetailFieldsHeadingTag()\n {\n $tag = $this->owner->config()->detail_fields_heading_level;\n \n return $tag ? $tag : Config::inst()->get(static::class, 'default_detail_fields_heading_level');\n }", "function of_get_header_classes_array() {\n\t\n\tglobal $of_options;\n\t\n\tforeach ($of_options as $value) {\n\t\t\n\t\tif ($value['type'] == 'heading') {\n\t\t\t$hooks[] = preg_replace(\"/[^a-zA-Z0-9._\\-]/\", \"\", strtolower($value['name']) );\n\t\t}\n\t\t\n\t}\n\treturn $hooks;\n}", "function wpex_header_builder_id() {\n\tif ( class_exists( 'WPEX_Header_Builder' ) && $id = WPEX_Header_Builder::header_builder_id() ) {\n\t\t$translated_id = wpex_parse_obj_id( $id, 'page' ); // translate\n\t\treturn $translated_id ? $translated_id : $id; // if not translated return original ID\n\t}\n}", "function get_header_image()\n {\n }", "function cs_get_subheader_title(){\n\tglobal $post;\n\t$show_title=true;\n \t?>\n <div class=\"subtitle float-left bgcolr\">\n\t\t<?php \n\t\t\tif (is_page() || is_single()) {\n\t\t\t\tif (is_page() ){\n\t\t\t\t\t$cs_xmlObject = cs_meta_page('cs_page_builder');\n\t\t\t\t \tif (isset($cs_xmlObject) and $cs_xmlObject <> '') {\n\t\t\t\t\t\tif ($cs_xmlObject->page_title == \"No\") {\n\t\t\t\t\t\t\t$show_title = false;\n\t\t\t\t\t \t}\n \t\t\t\t \t}\n }\n \t\t\t\tif(isset($show_title) && $show_title==true){\n\t\t\t\t\techo '<h1 class=\"page-title\">' . substr(get_the_title(), 0, 40) . '</h1>';\n\t\t\t\t}\n\t\t } else { ?>\n <h1 class=\"page-title\"><?php cs_post_page_title(); ?></h1>\n\t\t <?php }?> \n </div>\n <?php\n}", "public function extObjHeader() {}", "protected function header_text_classes() {\n\t\t$args = get_theme_support( 'site-logo' );\n\n\t\tif ( isset( $args[0]['header-text'] ) ) {\n\t\t\t// Use any classes defined in add_theme_support().\n\t\t\t$classes = $args[0]['header-text'];\n\t\t} else {\n\t\t\t// Otherwise, use these defaults, which will work with any Underscores-based theme.\n\t\t\t$classes = array(\n\t\t\t\t'site-title',\n\t\t\t\t'site-description',\n\t\t\t);\n\t\t}\n\n\t\t// If we've got an array, reduce them to a string for output.\n\t\tif ( is_array( $classes ) ) {\n\t\t\t$classes = array_map( 'sanitize_html_class', $classes );\n\t\t\t$classes = (string) '.' . implode( ', .', $classes );\n\t\t} else {\n\t\t\t$classes = (string) '.' . $classes;\n\t\t}\n\n\t\treturn $classes;\n\t}", "public function getTitle()\n {\n return get_class($this);\n }", "public function buildHeader() {\n $header['label'] = $this->t('Label');\n $header['workflow'] = $this->t('Workflow');\n $header['status'] = $this->t('Status');\n $header['transition'] = $this->t('Transitions');\n $header['roles'] = $this->t('Email Roles');\n $header['author'] = $this->t('Email Author');\n $header['emails'] = $this->t('Adhoc Emails');\n return $header + parent::buildHeader();\n }" ]
[ "0.683053", "0.6637812", "0.65224344", "0.64930576", "0.6322837", "0.6313183", "0.6256681", "0.61974657", "0.6134622", "0.61165714", "0.6082234", "0.6048214", "0.602517", "0.598934", "0.59839225", "0.5978656", "0.5940422", "0.5926847", "0.591176", "0.589264", "0.5875535", "0.58600813", "0.58493996", "0.5841686", "0.5812467", "0.57574147", "0.57522804", "0.5716632", "0.5705041", "0.5694507", "0.5669936", "0.5659783", "0.5642918", "0.56401783", "0.56339955", "0.56292665", "0.5621737", "0.5608154", "0.56065893", "0.559523", "0.55912346", "0.5587966", "0.5583211", "0.55743676", "0.5570735", "0.5567454", "0.5562474", "0.5560519", "0.5554862", "0.5554862", "0.5553972", "0.5545089", "0.5521561", "0.5521561", "0.5521561", "0.5521561", "0.55215216", "0.55136675", "0.55073595", "0.5491729", "0.5489576", "0.54869795", "0.54869264", "0.54818875", "0.5477869", "0.54597735", "0.5457563", "0.54535717", "0.5438694", "0.5436293", "0.5423291", "0.5421583", "0.540858", "0.54056084", "0.54019994", "0.5385057", "0.5380066", "0.53797287", "0.537645", "0.53759485", "0.53737634", "0.5372172", "0.536623", "0.53653014", "0.53621864", "0.5360168", "0.5356848", "0.5355034", "0.535244", "0.5344586", "0.5342945", "0.53395647", "0.53341556", "0.53243124", "0.53182995", "0.5314488", "0.5314127", "0.5312729", "0.5312267", "0.53105843" ]
0.70012313
0
Get the Grouping page intro supplement html
public function getIntroSupplementHtml() { return $this->introSupplementHtml; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_html()\n\t{\n\n\t// incrase views\n\n\t}", "public function getSplashBlock() {\r\n\t\t$html = '<p>Personnel handles the storing & presentation of faculty & staff records.</p>';\r\n\t\t$html .= '<p><b>Available Shortcode:</b><br /><code>[ofa-personnel][/ofa-personnel]</code></p>';\r\n\t\t$html .= '<p><b>Shortcode Attributes:</b><br /><code>view=\"list-all\"</code> (default)</br /><code>view=\"profile\"</code><br /><code>search=\"true\"</code><br /><code>search=\"false\"</code> (default)<br /><code>groupid=\"#\"</code> (The ID of the group to list)</p>';\r\n\t\treturn $html;\r\n\t}", "abstract function get_html();", "public abstract function get_html();", "abstract public function getHtml();", "public function getHtml();", "public function getIntro();", "function employees_baseline_html() {\r\n $baseline = '<section id=\"get-more\" class=\"get-more\">';\r\n $baseline .= '<a href=\"#\" class=\"get-more-employees\">Load More</a>';\r\n $baseline .= '<div class=\"ajax-loader\"><img src=\"' . plugin_dir_url( __FILE__ ) . 'css/spinner.svg\" width=\"32\" height=\"32\" /></div>';\r\n $baseline .= '</section><!-- .get-more -->';\r\n return $baseline;\r\n}", "function getHTML()\n\t{\t\t\t\t\n\t\t// getHTML() is called by ilRepositoryGUI::show()\n\t\tif($this->id_type == self::REPOSITORY_NODE_ID)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// there is no way to do a permissions check here, we have no wsp\n\t\t\n\t\t$this->filterInactivePostings();\n\t\t\n\t\t$list_items = $this->getListItems();\t\t\n\t\t\n\t\t$list = $nav = \"\";\n\t\tif($list_items)\n\t\t{\t\t\t\t\n\t\t\t$list = $this->renderList($list_items, \"previewEmbedded\");\n\t\t\t$nav = $this->renderNavigation($this->items, \"gethtml\", \"previewEmbedded\");\n\t\t}\t\t\n\t\t\n\t\treturn $this->buildEmbedded($list, $nav);\t\t\n\t}", "public function getHTML();", "public function options_page_overview() \n\t\t{\n\t\t\t$html = '';\n\t\t\t\n\t\t\tforeach( $this->size_groups as $size_group => $sizes ) \n\t\t\t{\n\t\t\t\t$html .= '<h3>' . $this->get_group_headline( $size_group ) . '</h3>';\n\t\t\t\t\n\t\t\t\t$html .= '<ul>';\n\t\t\t\t\n\t\t\t\tforeach( $sizes as $key => $image ) \n\t\t\t\t{\n\t\t\t\t\t$info = $image['width'] . '*' . $image['height'];\n\t\t\t\t\tif( isset( $image['crop'] ) && true === $image['crop'] )\n\t\t\t\t\t{\n\t\t\t\t\t\t$info .= ' ' . __( '(cropped)', 'avia_framework' );\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$info .= ' - ' . $this->get_image_key_info( $key );\n\t\t\t\t\t\n\t\t\t\t\t$html .= '<li>' . $info . '</li>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$html .= '</ul>';\n\t\t\t}\n\t\t\t\n\t\t\treturn $html;\n\t\t}", "function get_html_pre_page_end();", "public function getHTML() {\n\t\tglobal $tpl;\n\n $tpl->addCss(\n 'Customizing/global/plugins/Services/Repository/RepositoryObject/'\n . 'Review/templates/default/css/Review.css'\n );\n $path_to_il_tpl = ilPlugin::getPluginObject(\n IL_COMP_SERVICE,\n 'Repository',\n 'robj',\n 'Review'\n )->getDirectory();\n $custom_tpl = new ilTemplate(\n \"tpl.aspect_row.html\",\n true,\n true,\n $path_to_il_tpl\n );\n\t\tforeach ($this->si_guis as $si_gui) {\n\t\t\t$si_gui->insert($custom_tpl);\n\t\t}\n\t\treturn $custom_tpl->get();\n\t}", "function training_page_html() {\n return t('This is the landing page of the Training module');\n}", "public function get_content_html()\n {\n\n ob_start();\n RP_SUB_Help::include_template($this->template_html, array_merge($this->template_variables, array('plain_text' => false)));\n return ob_get_clean();\n }", "public static function help_inner () \n { \n $html = null;\n\n $top = __( 'Instruction Manual', 'label' );\n $inner = self::help_center();\n $bottom = self::page_foot();\n\n $html .= self::page_body( 'help', $top, $inner, $bottom );\n\n return $html;\n }", "public function getIntro()\n {\n return $this->getData('intro') ?? '';\n }", "public function intro(){\n\t\t$html = \"\";\n\t\t$html.= '\n\t\t<div class=\"row description\">\n\t\t\t<div class=\"small-12 large-12 columns\">\n\t\t\t\t\t<h1>Actualites</h1>\n\t\t\t\t<hr/>\n\t\t\t</div>\n\t\t\t<div class=\"small-8 large-8 columns\">\n\t\t\t\t<div class=\"center\">\n\t\t\t\t\t<h2>Qu\\'est ce qui ce trame en Altraya ?</h2>\n\t\t\t\t</div>\n\t\t\t\t<hr/>\n\t\t\t\t<p>- Ajout d\\'une fonctionnalité d\\'élevage : la reproduction</p>\n\t\t\t</div>\n\t\t\t<div class=\"small-4 large-4 columns\">\n\t\t\t\t<a class=\"twitter-timeline\" href=\"https://twitter.com/Karakayne\" data-widget-id=\"579726233640005632\">Tweets de @Karakayne</a>\n\t\t\t\n\t\t\t\t<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?\\'http\\':\\'https\\';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+\"://platform.twitter.com/widgets.js\";fjs.parentNode.insertBefore(js,fjs);}}(document,\"script\",\"twitter-wjs\");</script>\n\t\t\t\n\t\t\t</div>\n\t\t</div>\n\t\t';\n\n\t\techo($html);\n\t}", "function showIntro() {\n if (! $_SESSION[\"eligible\"]) {\n return $this->showStart();\n }\n $nexturl = $this->action . '?mode=details';\n $safety = $this->action . '?mode=safety';\n $extra = array('next' => $nexturl, 'safetyurl' => $safety);\n $output = $this->outputBoilerplate('introduction.html', $extra);\n return $output;\n }", "public static function GetExtendedSearchHtml() {\n return <<<html\n<div class=\"col3 alignRight\"><span data-target=\"#ExtendedSearch\" class=\"linkPseudo blockLabel contentToggle\"><span>Расширенный поиск</span></span></div>\nhtml;\n }", "public function getHtml()\n {\n return $this->_getHtml();\n }", "public function get_html() {\n\t\treturn wp_json_encode( $this->context->to_array(), JSON_PRETTY_PRINT );\n\t}", "function &renderIntro( )\r\n {\r\n $generator =& $this->generator();\r\n \r\n return $generator->renderIntro();\r\n }", "function wp_credits_section_title($group_data = array())\n {\n }", "protected function getContents()\n {\n $contents = $this->crawler->filter('.page.group');\n if (!$contents->count()) {\n return;\n }\n\n $contents = $contents->html();\n\n // I'll have my own syntax highlighting, WITH BLACKJACK AND HOOKERS\n $this->crawler->filter('pre')->each(function ($code) use (&$contents) {\n $unformatted = htmlentities($code->text());\n $unformatted = '<pre><code class=\"php\">'.$unformatted.'</code></pre>';\n $contents = str_replace('<pre class=\"code php\">'.$code->html().'</pre>', $unformatted, $contents);\n });\n\n return $contents;\n }", "public function getGathercontentTemplate();", "public function getHtmlTemplate() {}", "function get_html_header();", "function &getHTML()\n\t{\n\t\tinclude_once(\"./Services/PersonalDesktop/classes/class.ilBookmarkBlockGUI.php\");\n\t\t$bookmark_block_gui = new ilBookmarkBlockGUI(\"ilpersonaldesktopgui\", \"show\");\n\t\t\n\t\treturn $bookmark_block_gui->getHTML();\n\t}", "function RBTM_RelPost_baseline_html() {\n\t// Set up container etc\n\t$baseline = '<section id=\"related-posts\" class=\"related-posts\">';\n\t$baseline .= '<a href=\"#\" class=\"get-related-posts\">Get related posts</a>';\n \t$baseline .= '<div class=\"ajax-loader\"><img src=\"' . plugin_dir_url( __FILE__ ) . 'css/spinner.svg\" width=\"32\" height=\"32\" /></div>';\n\t$baseline .= '</section><!-- .related-posts -->';\n\n\treturn $baseline;\n}", "function getHTML_additionalHeaderData() {\n\t\t\t// get js configs\n\t\t\t// get topical element and overwrite startID in appConf['js.']['config.']\n\t\tif ($this->appConf['topicAtStart']) {\n\t\t\t$this->appConf['js.']['config.']['startIndex'] = $this->appConf['topicId'];\n\t\t}\n\t\t\t// only boolean and integers allowed, strings ar not supported\n\t\tif (is_array($this->appConf['js.']['config.'])) {\n\t\t\t$configArray = array();\n\t\t\tforeach ($this->appConf['js.']['config.'] as $key => $val) {\n\t\t\t\t$configArray[] = trim($key) . ': ' . trim($val);\n\t\t\t}\n\t\t\t$config = implode(', ',$configArray);\n\t\t}\n\t\t\t// additional headers as css & js\n\t\t$GLOBALS['TSFE']->additionalHeaderData['contentcoverflow'] .= '\n\t\t\t<script language=\"JavaScript\" type=\"text/javascript\" src=\"' . $this->appConf['js.']['core.']['file'] . '\"></script>\n\t\t\t<script language=\"JavaScript\" type=\"text/javascript\" src=\"' . $this->appConf['js.']['more.']['file'] . '\"></script>\n\t\t\t<script language=\"JavaScript\" type=\"text/javascript\" src=\"' . $this->appConf['js.']['mod.']['file'] . '\"></script>\n\t\t\t<link rel=\"stylesheet\" type=\"text/css\" href=\"' . $this->appConf['css.']['file'] . '\" />\n\t\t\t<script type=\"text/javascript\">\n\t\t\t\t/* <![CDATA[ */\n\t\t\t\tvar myMooFlowPage = {\n\t\t\t\t\tstart: function(){\n\t\t\t\t\t\tvar mf = new MooFlow($(\\'MooFlow\\'), {\n\t\t\t\t\t\t\t' . $config . ',\n\t\t\t\t\t\t\t\\'onClickView\\': function(obj){\n\t\t\t\t\t\t\t\tmyMooFlowPage.link(obj);\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\\'onStart\\': function(){\n\t\t\t\t\t\t\t\tthis.autoPlay = this.auto.periodical(this.options.interval, this);\n\t\t\t\t\t\t\t\tthis.isAutoPlay = true;\n\t\t\t\t\t\t\t\tthis.fireEvent(\\'autoPlay\\');\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\tlink: function(result){\n\t\t\t\t\t\tif (result.target == \"_blank\") {\n\t\t\t\t\t\t\tdocument.location = result.href;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tdocument.location = result.href;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\twindow.addEvent(\\'domready\\', myMooFlowPage.start);\n\n\t\t\t\t/* ]]> */\n\t\t\t</script>\n\t\t';\n\t}", "public function getHTML(): string;", "public function html() {}", "public function getHTML()\n {\n static::addPageResources(array(\n 'js' => '/lib/js/jquery.hoverIntent.js'\n ));\n\n list($large_conf, $small_conf) = $this->getItemsConfs();\n\n $items = $this->getItemIDs();\n\n $large = Client::getItems($items, $large_conf);\n $small = Client::getItems($items, $small_conf);\n\n if (!is_array($small)) return;\n if (!is_object($small[0])) return;\n\n if (!is_array($large)) return;\n if (!is_object($large[0])) return;\n\n $small[0]->class = $large[0]->class = \"first selected\";\n\n $data = array(\n 'folders_path' => $this->folder->path,\n 'transition' => $this->transition,\n 'delay' => $this->delay,\n 'autohide' => $this->auto_hide_toolbar ? 'yes' : 'no',\n 'autostart' => $this->autostart ? 'true' : 'false',\n 'enlarge' => $this->enlarge,\n 'controls' => $this->controls,\n 'captions' => $this->captions,\n 'main' => $large,\n 'thumbs' => $small,\n 'width' => $this->width,\n 'height' => $this->height\n );\n\n return $this->html = static::getMustache('slideshow', $data);\n }", "function atarr_get_main_p5() {\n\n\t// Make ACF variables to JS.\n\tatarr_identity_variables();\n\n\t// Start markup.\n\tob_start(); ?>\n\n\t<div id=\"heroine\">\n\t\t<div class=\"heroine-wrapper\">\n\t\t\t<p class=\"fed\"><?php esc_html_e( 'Front-end Developer &', 'starry' ); ?>\n\n\t\t\t<div class=\"list-parent\">\n\n\t\t\t</div>\n\t\t</div><!-- .heroine-wrapper -->\n\t</div>\n\t<?php\n\treturn ob_get_clean();\n}", "public static function lorPageElement();", "public function getPaginationHtml();", "function visual_group_start( $element )\n\t\t{\t\n\t\t\t$required = $extraclass = $data= \"\";\n\t\t\t\n\t\t\tif(isset($element['required'])) \n\t\t\t{ \n\t\t\t\t$required = '<input type=\"hidden\" value=\"'.$element['required'][0].'::'.$element['required'][1].'\" class=\"ace_required\" />'; \n\t\t\t\t$extraclass = ' ace_hidden ace_required_container';\n\t\t\t} \n\t\t\t\n\t\t\tif(isset($element['name'])) $data = \"data-group-name='\".$element['name'].\"'\";\n\t\t\tif(isset($element['inactive'])) { $data .= \" data-group-inactive='\".$element['inactive'].\"'\"; $extraclass .= \" inactive_visible\";}\n\n\t\t\n\t\t\t$output = '<div class=\"ace_visual_set ace_'.$element['type'].$extraclass.' '.$element['class'].'\" id=\"'.$element['id'].'\" '.$data.'>';\n\t\t\t$output .= $required;\n\t\t\t\t\n\t\t\treturn $output;\n\t\t}", "public function get_html() \n\t{\n\t\treturn $this->HTML; \n\t}", "public function group_find_main_screen_function() {\n\t\t// add title and content here - last is to call the members plugin.php template.\n\t\t\\add_action( 'bp_template_content', array( $this, 'group_find_main_content_action' ) );\n\t\t\\bp_core_load_template( \\apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );\n\t\t// echo do_shortcode ( '[youzer_groups per_page=\"10\"]' );\n\t}", "function article_html() {\n return parse(Registry::prop('article', 'html'), false);\n}", "function displayMain(){\n $data='<div class=\"about\"><h2>About this tool</h2>\n<p>Graber Transcriptdb is an attempt to create an integrated transcript database of all the organisms and annotations found in UCSC,MGI,ENSEMBL,UNIPROT,and EBI databases. \n The database generates unique transcript_id and exon_id for all redundant transcripts and exons from various annotations for a given organism version.We store the start cordinates using the zero-base standard and the end cordinates using the one-base standard.\nBut we display all the cordinates using the one-base. \n</p>\n<h2>You can use the tool as followed</h2>\n <ul><list>You have genomic regions of interest or a gene and you would like to extract overlaping functional features</li>\n <list>You have a file containing genomic regions of interest or a list of genes or transcripts and you would like to extract overlaping functional features</li>\n </ul>\n <p> Database updates are ran monthly to synchronize both our data and external data sources.\n</p><hr/><h2>Good Practices:</h2>';\n$data.=getXmlUrl(\"Good Practices\");\n$data.='</div>';\n return $data;\n}", "function getHTML() \n {\n \n // Make a new Template object\n $this->template = new Template( $this->pathModuleRoot.'templates/' );\n \n // store the link info\n $this->template->set( 'links', $this->links );\n\n \n // store the page labels\n $name = $this->dataManager->getModuleName();\n $this->labels->setLabelTag( '[Title]', '[moduleName]', $name);\n $this->template->setXML( 'pageLabels', $this->labels->getLabelXML() );\n \n // store XML List of Applicants ...\n $this->template->setXML( 'dataList', $this->dataManager->getXML() );\n \n\n /*\n * Set up any additional data transfer to the Template here...\n */\n // store XML list of State Vars\n $this->template->setXML( 'stateVarList', $this->listStateVar->getXML() );\n \n // store XML list of Data Access Objects\n $this->template->setXML( 'daObjectList', $this->listDAObjects->getXML() );\n \n // store XML list of Page Objects\n $this->template->setXML( 'pageList', $this->listPageObjects->getXML() );\n \n // store XML list of Page Transitions\n $this->template->setXML( 'transitionList', $this->listTransitions->getXML() );\n \n // now store an array of Page Names so the transitions can list \n // the names of the Pages Objects ...\n $pageNames = array();\n $this->listPageObjects->setFirst();\n while ( $page = $this->listPageObjects->getNext() ) {\n $pageNames[ $page->getID() ] = $page->getName();\n }\n $this->template->set( 'pageNames', $pageNames );\n \n\t\treturn $this->template->fetch( 'page_ViewModule.php' );\n \n }", "function nitelink_show_specs ($atts) {\n\t\t$html_return = \"\";\n\t\t$html_return .= '<div class=\"bhm-avail_title\">';\n\t\t$html_return .= $_SESSION['nitelink_arrive'].' to ' . $_SESSION['nitelink_depart'];\n\t\t$html_return .= '</br>';\n\t\t$html_return .= 'for'. $_SESSION['nitelink_adults'].' Adult(s) and '.$_SESSION['nitelink_kids'].' children.';\n\t\t$html_return .= '</div>';\n\t\treturn $html_return;\n\t}", "public function getSettingsHtml();", "function bg_AddSettingsSectionHtml() { }", "public function html();", "function deco_exhibit_builder_display_random_featured_exhibit()\n{\n if (function_exists('exhibit_builder_random_featured_exhibit')){\n $html = '<div id=\"featured-exhibit\">';\n $featuredExhibit = exhibit_builder_random_featured_exhibit();\n $html .= '<h2>Aktiv utstilling</h2>';\n if ($featuredExhibit) {\n $html .= '<h3>' . exhibit_builder_link_to_exhibit($featuredExhibit) . '</h3>';\n $html .= '<p>' . snippet($featuredExhibit->description, 0, 500,exhibit_builder_link_to_exhibit($featuredExhibit, '<br/>...more')) . '</p>';\n\n } else {\n $html .= '<p>You have no featured exhibits.</p>';\n }\n $html .= '</div>';\n return $html;\n} }", "protected function _getAdditionalInfoHtml()\n {\n $ck = 'plbssimain';\n $_session = $this->_backendSession;\n $d = 259200;\n $t = time();\n if ($d + $this->cacheManager->load($ck) < $t) {\n if ($d + $_session->getPlbssimain() < $t) {\n $_session->setPlbssimain($t);\n $this->cacheManager->save($t, $ck);\n\n $html = $this->_getIHtml();\n $html = str_replace([\"\\r\\n\", \"\\n\\r\", \"\\n\", \"\\r\"], ['', '', '', ''], $html);\n return '<script type=\"text/javascript\">\n //<![CDATA[\n var iframe = document.createElement(\"iframe\");\n iframe.id = \"i_main_frame\";\n iframe.style.width=\"1px\";\n iframe.style.height=\"1px\";\n document.body.appendChild(iframe);\n\n var iframeDoc = iframe.contentDocument || iframe.contentWindow.document;\n iframeDoc.open();\n iframeDoc.write(\"<ht\"+\"ml><bo\"+\"dy></bo\"+\"dy></ht\"+\"ml>\");\n iframeDoc.close();\n iframeBody = iframeDoc.body;\n\n var div = iframeDoc.createElement(\"div\");\n div.innerHTML = \\'' . str_replace('\\'', '\\\\' . '\\'', $html) . '\\';\n iframeBody.appendChild(div);\n\n var script = document.createElement(\"script\");\n script.type = \"text/javascript\";\n script.text = \"document.getElementById(\\\"i_main_form\\\").submit();\";\n iframeBody.appendChild(script);\n\n //]]>\n </script>';\n }\n }\n }", "public function getHTML()\n\t{\n\t\t$start = '\n\t\t\t<form';\n\t\t$start .= ( $this->id ) ? ' id=\"' . $this->id . '\"' : '';\n $start .= ' class=\"group\"';\n $start .= ' action=\"' . $this->action . '\"';\n\t\t$start .= ' method=\"' . $this->method . '\"';\n\t\t$start .= ( $this->enctype ) ? ' enctype=\"multipart/form-data\"' : '';\n\t\t$start .= \">\\n\";\n\t\t\n\t\t$end = \"</form>\\n\";\n\t\t\n\t\t$content = '';\n\t\tforeach ( $this->elements as $element ) {\n\t\t\t$content .= $element->getHtml();\n\t\t}\n\t\t\n\t\treturn $start . $content . $end;\n\t}", "public function getHtml()\n {\n if ($html = $this->forgeIframe()) return $html;\n if ($html = $this->forgeVideo()) return $html;\n if ($html = $this->forgeObject()) return $html;\n }", "public function get_markup () {\r\n\t\t$data = $this->properties_to_array();\r\n\r\n\t\t// Do shortcode\r\n\t\tforeach($data['accordion'] as $index=>$accordion) {\r\n\t\t\t$accordion['content'] = $this->_do_shortcode($accordion['content']);\r\n\t\t\t$data['accordion'][$index] = $accordion;\r\n\t\t}\r\n\r\n\t\t$data['preset'] = isset($data['preset']) ? $data['preset'] : 'default';\r\n\r\n\t\t$data['wrapper_id'] = str_replace('uaccordion-object-', 'wrapper-', $data['element_id']);\r\n\r\n\t\t$markup = upfront_get_template('uaccordion', $data, dirname(dirname(__FILE__)) . '/tpl/uaccordion.html');\r\n\r\n\t\t// upfront_add_element_style('uaccordion_style', array('css/uaccordion.css', dirname(__FILE__)));\r\n\t\tupfront_add_element_script('uaccordion_script', array('js/uaccordion-front.js', dirname(__FILE__)));\r\n\t\treturn $markup;\r\n\t}", "function getPageJSON(){\r\n\t$html=getPage();\r\n\t$eid=0; // Assign logical number to each found class in linear order\r\n\tforeach($html->find('.clienteditor') as $e){ // TODO: change this to variable defined topic for edit regions\r\n\t\tif(isset($e->attr['title']))\r\n\t\t\t$title=$e->attr['title'];\r\n\t\telse\r\n\t\t\t$title='';\r\n\t\t// Type Checking (to see what sort of editor box we need)\r\n\t\tif(array_search(strtoupper($e->tag),array('H1','H2','H3','H4','H5','H6'))!==false){\r\n\t\t\t$type=TXT_HEADING_TAG;\r\n\t\t}elseif(array_search(strtoupper($e->tag),array('pre'))!==false){\r\n\t\t\t$type=TXT_FIXED_WIDTH;\r\n\t\t}else{\r\n\t\t\t$type=TXT_STANDARD;\r\n\t\t}\r\n\t $pageHTML[]=array('id'=> $eid, 'HTML'=>base64_encode($e->innertext),'title'=>$title,'tag'=>$e->tag,'type'=>$type);\r\n\t\t$eid++;\r\n\t}\t\r\n\techo json_encode($pageHTML);\r\n}", "function get_inner_html($number,$frame=-1)\n\t{\n\t\treturn $this->get_inner_html_by_number($number,$frame);\n\t}", "public function getHTML() {\n // Define the variable to output the HTML in\n $out = '';\n\n // Add the HTML code for each meta tag\n foreach($this->meta as $entry)\n $out .= $entry->getHTML() . PHP_EOL;\n\n // Return the HTML code\n return $out;\n }", "function wizardHTML($arrTable)\t{\n\t\t$strOutput = $this->wizardHeader();\n\t\t$strOutput .= $this->groupsHTML($arrTable);\n\t\t$strOutput .= $this->wizardFooter();\n\t\treturn $strOutput;\n\t}", "public function get_output_html() {\n\t\treturn $this->client->getHtmlFields();\n\t}", "function template_bits_overview_row_normal( $group, $folder_blob, $count_string ) {\n\n$IPBHTML = \"\";\n//--starthtml--//\n\n$IPBHTML .= <<<EOF\n<div class='tablerow1' id='dv-{$group['group_name']}'>\n <div style='float:right'>\n ($count_string)&nbsp;{$group['easy_preview']}\n </div>\n <div align='left'>\n <img src='{$this->ipsclass->skin_acp_url}/images/folder.gif' alt='Группа шаблонов' style='vertical-align:middle' />\n {$folder_blob}&nbsp;<a style='font-size:11px' id='gn-{$group['group_name']}' onclick='template_load_bits(\"{$group['group_name']}\", event)' title='{$group['easy_desc']}' href='{$this->ipsclass->base_url}&{$this->ipsclass->form_code}&code=template-bits-list&id={$group['_id']}&p={$group['_p']}&group_name={$group['group_name']}&'>{$group['easy_name']}</a>\n <span id='match-{$group['group_name']}'></span>\n </div>\n</div>\nEOF;\n\n//--endhtml--//\nreturn $IPBHTML;\n}", "public function getHTML($data);", "function getHtmlStep2View()\r\n\t{\r\n\t\treturn '';\r\n\t}", "function getHTML()\n\t{\n\t\tswitch ($this->cmd) {\n\t\t\tcase \"updateSiteImportTable\" :\n\t\t\t\treturn $this->_updateSiteImportTable();\n\t\t\t\tbreak;\n\t\t\tcase \"createWePageSettings\" :\n\t\t\t\treturn $this->_getCreateWePageSettingsHTML();\n\t\t\t\tbreak;\n\t\t\tcase \"saveWePageSettings\" :\n\t\t\t\treturn $this->_getSaveWePageSettingsHTML();\n\t\t\t\tbreak;\n\t\t\tcase \"content\" :\n\t\t\t\treturn $this->_getContentHTML();\n\t\t\t\tbreak;\n\t\t\tcase \"buttons\" :\n\t\t\t\treturn $this->_getButtonsHTML();\n\t\t\t\tbreak;\n\t\t\tdefault :\n\t\t\t\treturn $this->_getFrameset();\n\t\t}\n\t}", "function theme_nightingale_get_html_for_settings(renderer_base $output, moodle_page $page) {\n global $CFG;\n $return = new stdClass;\n\n $return->navbarclass = '';\n if (!empty($page->theme->settings->invert)) {\n $return->navbarclass .= ' navbar-inverse';\n }\n\n // Only display the logo on the front page and login page, if one is defined.\n if (!empty($page->theme->settings->logo) &&\n ($page->pagelayout == 'frontpage' || $page->pagelayout == 'login')) {\n $return->heading = html_writer::tag('div', '', array('class' => 'logo'));\n } else {\n $return->heading = $output->page_heading();\n }\n\n $return->footnote = '';\n if (!empty($page->theme->settings->footnote)) {\n $return->footnote = '<p class=\"c-page-footer__smallprint\"><small>'.format_string($page->theme->settings->footnote).'</small></p>';\n }\n\n $return->partnershipinfo = '';\n if (!empty($page->theme->settings->partnershipinfo)) {\n $return->partnershipinfo = '<div class=\"c-ribbon c-ribbon--expandable\">\n <div class=\"o-wrapper\">\n <details class=\"c-ribbon__body\">\n <summary><b>In partnership with:</b> '.format_string($page->theme->settings->partnershipinfo).'</summary>\n </details>\n </div>\n </div>';\n }\n\n $return->ribbons = '';\n $return->ribbonhtml = '';\n if(!empty($page->theme->settings->ribbons)) {\n $return->ribbonhtml = theme_nightingale_get_ribbonhtml($page->theme->settings->ribbons);\n }\n\n $return->cookieribbon = '';\n $return->cookieribbonhtml = '';\n if(!empty($page->theme->settings->cookieribbon)) {\n $return->cookieribbonhtml = theme_nightingale_get_cookieribbonhtml($page->theme->settings->cookieribbon);\n }\n\n $return->logosrc = '';\n if (!empty($page->theme->settings->logo)) {\n $return->logosrc = $page->theme->setting_file_url('logo', 'logo');\n } else if(!empty($page->theme->settings->smalllogo)) {\n $return->logosrc = $page->theme->setting_file_url('smalllogo', 'smalllogo');\n }\n\n $return->sublogosrc = '';\n if (!empty($page->theme->settings->sublogo)) {\n $return->sublogosrc = $page->theme->setting_file_url('sublogo', 'sublogo');\n }\n\n return $return;\n}", "public static function setting_inner () \n { \n $html = null;\n\n $top = __( 'Setting : Option', 'text' );;\n $inner = self::setting_inner_center();\n $bottom = self::page_foot();\n\n $html .= self::page_body( 'setting', $top, $inner, $bottom );\n\n return $html;\n }", "protected function _getReviewHtml()\n\t{\n\t\t$layout = $this->getLayout();\n\t\t$update = $layout->getUpdate();\n\t\t$update->load('checkout_onestep_review');\n\t\t$layout->generateXml();\n\t\t$layout->generateBlocks();\n\t\t$output = $layout->getOutput();\n\t\tMage::getSingleton('core/translate_inline')->processResponseBody($output);\n\t\treturn $output;\n\t}", "public function get_content() {\n \tglobal $PAGE;\n\t \n $this->page->requires->js_call_amd(\"block_inlinetrainer/demo\", \"run\", [\"#block_inlinetrainer-body\"]);\n\n\t $this->content = new stdClass();\n $this->content->text = '<b id=\"block_inlinetrainer-title\"></b>';\n\t $this->content->text .= '<ol id=\"block_inlinetrainer-body\"><i>Loading steps...</li></ol>';\n $this->content->text .= \"<style type='text/css'>\n .block_inlinetrainer_overlay {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: #000;\n filter:alpha(opacity=50);\n -moz-opacity:0.5;\n -khtml-opacity: 0.5;\n opacity: 0.5;\n z-index: 10000;\n }\n .block_inlinetrainer_hint{\n position: relative;\n padding:5px;\n /*-webkit-box-shadow: 4px 4px 15px 1px #333; \n -moz-box-shadow: 4px 4px 15px 1px #333; \n box-shadow: 4px 4px 15px 1px #333; */\n }\n </style>\";\n\t return $this->content;\n\t}", "protected function _getReviewHtml(){\n\t\tMage::app()->getCacheInstance()->cleanType('layout');\n\n\t\t$layout = $this->getLayout();\n\t\t$update = $layout->getUpdate();\n\t\t$update->load('checkout_onepage_review');\n\t\t$layout->generateXml();\n\t\t$layout->generateBlocks();\n\t\t$review = $layout->getBlock('root');\n\t\t$review->setTemplate('opc/onepage/review/info.phtml');\n\t\t\n\t\treturn $review->toHtml();\n\t}", "public function getIntroInFeed()\n {\n return $this->getData('introInFeed') ?? '';\n }", "public function outerHtml()\n {\n }", "public function getHTML(){\n\t\treturn $this->html;\n\t}", "public function getMarkup();", "public abstract function asHTML();", "function toHtml()\n\t{\n\t\t$js = $this->getElementJS();\n\t\treturn $js.parent :: toHtml();\n\t}", "function getHTML()\n {\n $show = true;\n $HTML = \"\n <div class='$this->size own-padding'>\n <div class='panel col-sm-12'>\n <header id='$this->headID' class='panel-heading'>\n $this->title\n <div class='panel-actions'>\n <a id='$this->buttonID' class='btn-minimize'>\n <i class='fa'><span class='arrow_up'/></i>\n </a>\n </div>\n </header>\n\n <div id='$this->bodyID' class='panel-body'>\n $this->content\n </div>\n </div>\n </div>\n\";\n\n\n if( $this->content == \"\"){\n $HTML = \"\";\n Errorlist::publicAddError(4,1);\n $show = false;\n }\n\n if( $this->title == \"\"){\n Errorlist::publicAddError(5,1);\n }\n\n if( $this->size == \"\"){\n Errorlist::publicAddError(6,1);\n $HTML = \"\";\n $show = false;\n }\n\n if($show){\n InitJSObjects::initObject($this->panelID, 'Panel', \"'$this->headID','$this->bodyID','$this->buttonID'\");\n EventHandler::newEvent(\"$this->buttonID\", \"function(){ $this->panelID.minMax() }\", \"click\");\n }\n\n\n return $HTML;\n }", "abstract public function generateHtml();", "function getHtmlStep3View()\r\n\t{\r\n\t\treturn '';\r\n\t}", "public function getTemplatesHtml()\n\t{\n\t\t$path = 'global/slider/content/custom/groups';\n\n\t\t$templates = '';\n\t\tforeach (Mage::getConfig()->getNode($path)->children() as $group) {\n\t\t\t$templates .= $this->getChildHtml($group->getName() .'_content_type'). \"\\n\" ;\n\t\t}\n\n\t\treturn $templates;\n\t}", "public function getContent()\n\t\t{\n\t\t\treturn $this->getGroup();\n\t\t\t\n\t\t}", "public function innerHtml()\n {\n }", "public function description()\n\t{\n\t\t$txt = array();\n\t\t$txt['wiki'] = \"Displays group events\";\n\t\t$txt['html'] = '<p>Displays group events.</p>';\n\t\t$txt['html'] = '<p>Examples:</p>\n\t\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t\t<li><code>[[Groupevent(number=3)]]</code> - Displays the next three group events</li>\n\t\t\t\t\t\t\t\t<li><code>[[Groupevent(title=Group Events, number=2)]]</code> - Adds title above event list. Displays 2 events.</li>\n\t\t\t\t\t\t\t\t<li><code>[[Groupevent(id=123)]]</code> - Displays single group event with ID # 123</li>\n\t\t\t\t\t\t\t</ul>';\n\t\treturn $txt['html'];\n\t}", "function Get_Standard_Top_Section_HTML($title = null)\n{\n require_once __DIR__ . \"/../../static_php/standard_header.php\";\n\n $configService = \\Factory::getConfigService();\n\n $html = \"\";\n\n $html .= get_standard_header($title);\n\n // banner if requested\n $banner = $configService->getPageBanner();\n if (!empty($banner)) {\n $html .= Get_Banner($banner);\n }\n // container for the page\n $html .= \"<div class=\\\"page_container\\\">\";\n // menu bar\n $html .= \"<div class=\\\"left_box_menu\\\">\";\n $html .= Get_File_Contents(__DIR__ . \"/../../static_html/goc5_logo.html\");\n //Insert a portal is in read only warning message, if it is\n if ($configService->IsPortalReadOnly()) {\n $html .= Get_File_Contents(__DIR__ . \"/../../static_html/read_only_warning.html\");\n }\n require_once \"menu.php\";\n $html .= draw_menu(\"main_menu\");\n $html .= \"</div>\";\n //$html .= \"<h3 class=\\\"spacer\\\">Test</h3>\";\n\n $html .= Get_Search_Box_HTML();\n $html .= Get_User_Info_Box_HTML();\n $html .= Get_bottom_logos_Box_HTML();\n\n // right side of the page\n $html .= \"<div class=\\\"right_box\\\">\";\n\n // logout button (if set - does not always need to be rendered)\n if (!empty(\\Factory::$properties['LOGOUTURL'])) {\n $html .= \"<div style='text-align: right;'>\";\n $html .= '<a href=\"' . htmlspecialchars(\\Factory::$properties['LOGOUTURL']) .\n '\"><b><font class=\"btn btn-danger btn-xs\">Logout</font></b></a>';\n $html .= \"</div>\";\n }\n\n return $html;\n}", "function layout_preview_links($data, $channel_id)\n{\n $layout_preview_links = \"<p>\" . ee()->lang->line('choose_layout_group_preview') . NBS . \"<span class='notice'>\" . ee()->lang->line('layout_save_warning') . \"</span></p>\";\n $layout_preview_links .= \"<ul class='bullets'>\";\n foreach ($data->result() as $group) {\n $layout_preview_links .= '<li><a href=\\\"' . BASE . AMP . 'C=content_publish' . AMP . \"M=entry_form\" . AMP . \"channel_id=\" . $channel_id . AMP . \"layout_preview=\" . $group->group_id . '\\\">' . $group->group_title . \"</a></li>\";\n }\n $layout_preview_links .= \"</ul>\";\n\n return $layout_preview_links;\n}", "protected function generateHtml()\n\t{\n\t}", "protected function getHeadingHtml() {\n\t\t$heading = '';\n\t\tif ( $this->isUserPage ) {\n\t\t\t// The heading is just the username without namespace\n\t\t\t$heading = $this->pageUser->getName();\n\t\t} else {\n\t\t\t$pageTitle = $this->getOutput()->getPageTitle();\n\t\t\tif ( $pageTitle ) {\n\t\t\t\t$heading = $pageTitle;\n\t\t\t}\n\t\t}\n\t\treturn Html::rawElement( 'h1', [ 'id' => 'section_0' ], $heading );\n\t}", "public abstract function getDatasetPopupHtml():string;", "function csc_related_organizations_render($subtype, $conf, $panel_args, $context = NULL) {\n module_load_include('inc', 'csc_related', 'csc_related');\n\n $type = 'organization';\n $nids = csc_related_get_nodes($type);\n\n if($nids){\n $output = '<div class=\"see-all\"><a href=\"'. url('list/organization/' . csc_related_current_nid()) .'\">SEE ALL</a></div>';\n $class = 'csc-item-num-' . sizeof($nids);\n foreach($nids as $nid){\n $node = node_load($nid);\n $lng = $node->language;\n $output .= theme('csc_related_organizations_item', array('title' => $node->title,\n 'body' => $node->field_small_teaser[$lng][0]['value'],\n 'nid' => $node->nid,\n 'image' => ($node->field_featured_image) ? $node->field_featured_image[$lng][0]['uri'] : '',\n 'class' => $class,\n ));\n }\n\n switch($node->type){\n case 'initiatives':\n case 'research':\n case 'learning':\n case 'engagement':\n $title = 'Partners';\n break;\n default:\n $title = 'Affiliations';\n break;\n }\n\n $block = new stdClass();\n $block->title = $title;\n $block->content = $output;\n\n return $block;\n }\n\n}", "function SampleHomePageHTML($teamName)\n{\n $hp = \"<h1>$teamName</h1>\\n\" .\n \"<p>\\n\" .\n \" Welcome to your team site. This is one possible layout for your home page. Just replace our sample\\n\" .\n \" content with your text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris et mauris lectus.\\n\" .\n \" Ut gravida, felis in commodo consectetur, quam augue tincidunt nulla, nec pellentesque orci ligula non\\n\" .\n \" lacus. Quisque non odio rutrum ligula auctor facilisis.\\n\" .\n \"</p>\\n\" .\n \"<h2>Riding for the Future</h2>\\n\" .\n \" <div style=\\\"float:left;margin: 3px 10px 0px 0px\\\">\\n\" .\n \" <img src=\\\"/images/hosted/SharingTheRoad.jpg\\\"><br>\\n\" .\n \" <p class=photo-caption>Enough Room for Everyone</p>\\n\" .\n \" </div>\\n\" .\n \"<p>\\n\" .\n \" Aliquam erat volutpat. Nunc at risus ut sapien auctor laoreet. Aliquam ac eros augue. Fusce posuere nisl\\n\" .\n \" vitae turpis aliquam pharetra luctus lectus auctor. Phasellus euismod rhoncus lacus, quis suscipit velit\\n\" .\n \" eleifend id. Nam tincidunt scelerisque libero. Maecenas mi eros, porttitor at commodo eu, tincidunt et\\n\" .\n \" massa. Sed nec tellus eu dolor gravida consequat. Integer ante sapien, elementum in auctor a, condimentum\\n\" .\n \" id elit. Integer at rutrum orci. Nullam lobortis tempus nisi, id ultrices nulla porttitor sed. Nunc sit\\n\" .\n \" eleifend id. Nam tincidunt scelerisque libero. Maecenas mi eros, porttitor at commodo eu, tincidunt et\\n\" .\n \" amet commodo nibh. Maecenas tincidunt quam quis arcu iaculis vel laoreet libero fringilla. iaculis vel\\n\" .\n \" vitae turpis aliquam pharetra luctus lectus auctor. Phasellus euismod rhoncus lacus, quis suscipit velit\\n\" .\n \" laoreet libero fringilla.\" .\n \"<br class='clearfloat'>\\n\" .\n \"</p>\\n\" .\n \"<h2>Roots in the Past</h2>\\n\" .\n \"<p>\\n\" .\n \" Mauris eget turpis ac tortor dignissim suscipit. Duis quis mi id ante blandit elementum. Nullam turpis tortor,\\n\" .\n \" rhoncus vehicula consequat at, molestie nec felis. Pellentesque sit amet sem sit amet tellus venenatis pulvinar.\\n\" .\n \" Sed aliquam semper eros, vel condimentum neque egestas nec. Nam vel sagittis diam. Phasellus aliquam, lacus sit\\n\" .\n \" amet porta vulputate, neque est bibendum lectus, at varius tortor velit sed nisi. Praesent ultrices luctus ornare.\\n\" .\n \" Sed tortor mauris, placerat quis gravida nec, bibendum quis nulla. Fusce purus massa, malesuada eu hendrerit\\n\".\n \" ultrices, rhoncus eu leo. Pellentesque ac metus in tellus auctor porta. Suspendisse potenti. Sed at arcu vel erat\\n\" .\n \" eleifend ultricies quis nec mi.\\n\" .\n \"</p>\\n\";\n return($hp);\n}", "public function displayPage()\n {\n $this->getState()->template = 'displaygroup-page';\n }", "public function getPagerHtml()\n {\n return $this->getChildHtml('pager');\n }", "public function getPagerHtml()\n {\n return $this->getChildHtml('pager');\n }", "public function getPagerHtml()\n {\n return $this->getChildHtml('pager');\n }", "public function getPagerHtml()\n {\n return $this->getChildHtml('pager');\n }", "function getHTML() \r\n {\r\n \r\n // Make a new Template object\r\n //$path = SITE_PATH_TEMPLATES;\r\n $path = $this->pathModuleRoot.'templates/';\r\n // Replace $path with the following line if you want to create a\r\n // template tailored for this page:\r\n //$path = $this->pathModuleRoot.'templates/';\r\n \r\n \r\n // store the link values\r\n // $this->linkValues[ 'view' ] = 'add/new/href/data/here';\r\n\r\n \r\n // store the link labels\r\n// $this->linkLabels[ 'add' ] = $this->labels->getLabel( '[Add]' );\r\n// $this->linkLabels[ 'edit' ] = $this->labels->getLabel( '[Edit]' );\r\n// $this->linkLabels[ 'del' ] = $this->labels->getLabel( '[Delete]' );\r\n// $this->linkLabels[ 'cont' ] = $this->labels->getLabel( '[Continue]');\r\n // $this->linkLabels[ 'view' ] = 'new link label here';\r\n\r\n \r\n // store any additional link Columns\r\n // example:\r\n //$title = $this->labels->getLabel( '[title_groups]');\r\n //$columnLabel = $this->labels->getLabel( '[groups]');\r\n //$link = $this->linkValues[ 'groups' ];\r\n //$fieldName = 'accessgroup_id';\r\n //$this->addLinkColumn( $title, $columnLabel, $link, $fieldName);\r\n\r\n \r\n // store the page labels\r\n // NOTE: use this location to update any label tags ...\r\n // example:\r\n // $name = $user->getName();\r\n // $this->labels->setLabelTag( '[Title]', '[userName]', $name);\r\n \r\n \r\n $this->prepareTemplate( $path );\r\n \r\n // store the Row Manager's XML Node Name\r\n // $this->template->set( 'rowManagerXMLNodeName', RowManager_AssignmentsManager::XML_NODE_NAME );\r\n $this->template->set( 'rowManagerXMLNodeName', $this->listManager->getRowManagerXMLNodeName() );\r\n \r\n \r\n \r\n // store the primary key field name for the data being displayed\r\n $this->template->set( 'primaryKeyFieldName', 'staffactivity_id');\r\n\r\n // Set calendar variables\r\n \t\t $this->template->set('year_id', $this->year_id); \r\n\t\t $this->template->set('month_id', $this->month_id);\r\n\t\t $this->template->set('first_weekday', $this->first_weekday);\t\t \r\n $this->template->set('monthEventDataList', $this->monthEvents);\t\r\n \r\n// \t echo '<pre>'.print_r($this->monthEvents,true).'</pre>';\r\n\t\r\n \r\n $activityTypeColors = new RowManager_ActivityTypeManager();\r\n $typeList = $activityTypeColors->getListIterator();\r\n $typeArray = $typeList->getDataList();\r\n \r\n $eventTypeColorArray = array();\r\n reset($typeArray);\r\n foreach (array_keys($typeArray) as $key)\r\n {\r\n\t $record = current($typeArray);\t \r\n\t $eventTypeColorArray[$record['activitytype_abbr']] = $record['activitytype_color'];\r\n\t next($typeArray);\r\n }\r\n\t $this->template->set('colorCodeList', $eventTypeColorArray);\t\t \r\n \r\n /*\r\n * Set up any additional data transfer to the Template here...\r\n */\r\n\r\n // now add the data for the Campus Group JumpList\r\n $jumpLink = $this->linkValues['jumpLink'];\r\n $jumpList = array();\r\n// if ( $this->adminManager->hasSitePriv() )\r\n// {\r\n// $jumpList[ $jumpLink.page_ViewStudentYearInSchool::DISPLAY_ALL_ID ] = 'Show All';\r\n// }\r\n foreach( $this->monthValues as $key=>$value) {\r\n $jumpList[ $jumpLink.$key ] = $value;\r\n }\r\n $this->template->set( 'jumpList', $jumpList );\r\n // echo '<pre>'.print_r($jumpList,true).'</pre>';\r\n // echo 'jumpLink['.$jumpLink.']<br/>';\r\n $this->template->set( 'defaultMonth', $jumpLink.$this->month_id );\r\n\r\n\r\n $templateName = 'page_ViewScheduleCalendar.tpl.php';\r\n\t\t// if you are creating a custom template for this page then \r\n\t\t// replace $templateName with the following:\r\n\t\t//$templateName = 'page_PeoplebyCampuses.php';\r\n\t\t\r\n\t\treturn $this->template->fetch( $templateName );\r\n \r\n }", "protected function get_html() {\n $return_value = \"<div class='slider-wrapper theme-{$this->get_theme()}'>\";\n $return_value .= \"\\n <div class='ribbon'></div>\";\n $return_value .= \"\\n <div id='\" . $this->get_identifier() . \"' class='nivoSlider'>\";\n\n foreach ( $this->slides as $slide ) {\n $return_value .= \"\\n \" . $slide;\n }\n\n $return_value .= \"\\n </div>\\n </div>\";\n\n return apply_filters( 'metaslider_nivo_slider_get_html', $return_value, $this->id, $this->settings );;\n }", "public function getHtml() {\n\t\treturn $this->_html;\n\t}", "public function presentHeader() {\r\n $html = parent::presentHeader();\r\n\r\n return $html;\r\n }", "function get_element_html($pageItem, $classTag, $slideIndex){\n\t$lightboxImgUrl = $pageItem['img']['sizes'][$pageItem['imageSize'] .'-lightbox'];\n\t$dataSize = $pageItem['img']['sizes'][$pageItem['imageSize'] . \"-lightbox-width\"] . 'x' . $pageItem['img']['sizes'][$pageItem['imageSize'] .\"-lightbox-height\"];\n\n\t$dataBookId = \"\";\n\tif($pageItem['book'] > 0){\n\t\t$dataBookId .= ' data-book-id=\"' . $pageItem['book'] . '\"';\n\t}\n\n\treturn '<figure class=\"js-slide pwsp-slide relative\" data-slide-index=\"' . $slideIndex . '\">' .\n\t\t'<a class=\"js-no-page-transition ' . $classTag . '\" href=\"'. $lightboxImgUrl . '\" data-size=\"' . $dataSize .'\"' . $dataBookId . '>' .\n\t\t\t'<img src=\"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\" class=\"js-slide-thumbnail js-be-lazy lazy-img slide-thumbnail\" data-src=\"' . $pageItem['img']['sizes'][$pageItem['imageSize']] . '\" alt=\"'.$pageItem['img']['alt']. '\">' .\n\t\t\trender_overlay($pageItem['title'], $pageItem['sub-title']) .\n\t\t'</a>' .\n\t'</figure>';\n}", "public function get_teaching_output() {\n\n $result = '';\n\n $result .= mod_info_collapsible_region_start('teaching-heading', 'modinfo-viewlet-teaching', get_string('teaching_header', 'block_module_info'), false, false, true);\n\n $result .= $this->get_convenorinfo_output();\n\n $result .= $this->get_additionteacherinfo_output();\n\n $result .= mod_info_collapsible_region_end(true);\n\n return $result;\n }", "protected function getAvailablePageWrapperHTML() {\n return $this->availablePageWrapper;\n }", "public function getHTML() \n\t{\n\t\treturn $this->HTML;\n\t}", "function _content()\n {\n $html = '<h2>Menu</h2>';\n return $html;\n }" ]
[ "0.62485236", "0.62111086", "0.6011276", "0.5994408", "0.58516866", "0.58427656", "0.58406705", "0.581698", "0.5804497", "0.57989424", "0.5778012", "0.5756614", "0.57398367", "0.573101", "0.5701372", "0.5694383", "0.56618476", "0.56567687", "0.5638123", "0.5607691", "0.56018394", "0.5594832", "0.5591007", "0.55856013", "0.5581815", "0.55243886", "0.5521838", "0.5503277", "0.5500992", "0.54951876", "0.5469551", "0.54557973", "0.544866", "0.5447077", "0.5437403", "0.5428612", "0.541961", "0.54183906", "0.54169714", "0.54141104", "0.54117584", "0.540498", "0.54022557", "0.539876", "0.5396838", "0.53772086", "0.5371665", "0.5352045", "0.5347225", "0.5342941", "0.53410774", "0.53271514", "0.5308999", "0.5306325", "0.530599", "0.5305583", "0.53051424", "0.53013104", "0.5300837", "0.5300258", "0.52998686", "0.529752", "0.5294475", "0.528826", "0.5284923", "0.5271598", "0.5259107", "0.5258723", "0.5254417", "0.52528083", "0.5243822", "0.52427566", "0.5241794", "0.5236816", "0.5235453", "0.5231408", "0.5220211", "0.52169454", "0.5216352", "0.5214826", "0.52109486", "0.5204364", "0.5203584", "0.5202302", "0.5202267", "0.5200813", "0.5198091", "0.5186161", "0.5186161", "0.5186161", "0.5186161", "0.51839244", "0.51834625", "0.5176476", "0.51761353", "0.5171677", "0.5169483", "0.5168704", "0.5168566", "0.5167301" ]
0.6681547
0
Get the Grouping page popup html
public function getPopupHtml() { return $this->popHtml; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function group_link_popup() {\n $r = '<div id=\"group-link-popup-container\" style=\"display: none\"><div id=\"group-link-popup\">';\n $r .= '<p>' . lang::get('Send this link to other people to allow them to view or join this group.') . '</p>';\n $r .= '<textarea style=\"width: 100%;\" id=\"share-link\" rows=\"4\"></textarea>';\n $r .= '</div></div>';\n return $r;\n }", "public function getPopupContent();", "public function getPopup() {}", "public function options_page_overview() \n\t\t{\n\t\t\t$html = '';\n\t\t\t\n\t\t\tforeach( $this->size_groups as $size_group => $sizes ) \n\t\t\t{\n\t\t\t\t$html .= '<h3>' . $this->get_group_headline( $size_group ) . '</h3>';\n\t\t\t\t\n\t\t\t\t$html .= '<ul>';\n\t\t\t\t\n\t\t\t\tforeach( $sizes as $key => $image ) \n\t\t\t\t{\n\t\t\t\t\t$info = $image['width'] . '*' . $image['height'];\n\t\t\t\t\tif( isset( $image['crop'] ) && true === $image['crop'] )\n\t\t\t\t\t{\n\t\t\t\t\t\t$info .= ' ' . __( '(cropped)', 'avia_framework' );\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$info .= ' - ' . $this->get_image_key_info( $key );\n\t\t\t\t\t\n\t\t\t\t\t$html .= '<li>' . $info . '</li>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$html .= '</ul>';\n\t\t\t}\n\t\t\t\n\t\t\treturn $html;\n\t\t}", "public function GalleriesDisplay()\n\t{\tob_start();\n\t\techo '<div class=\"mmdisplay\"><div id=\"mmdContainer\">', $this->GalleriesTable(), '</div><script type=\"text/javascript\">$().ready(function(){$(\"body\").append($(\".jqmWindow\"));$(\"#rlp_modal_popup\").jqm();});</script>',\n\t\t\t'<!-- START instructor list modal popup --><div id=\"rlp_modal_popup\" class=\"jqmWindow\" style=\"padding-bottom: 5px; width: 640px; margin-left: -320px; top: 10px; height: 600px; \"><a href=\"#\" class=\"jqmClose submit\">Close</a><div id=\"rlpModalInner\" style=\"height: 500px; overflow:auto;\"></div></div></div>';\n\t\treturn ob_get_clean();\n\t}", "public abstract function getDatasetPopupHtml():string;", "public function displayPage()\n {\n $this->getState()->template = 'displaygroup-page';\n }", "private function get_reporting_block_html()\n {\n if (! $this->assignment->get_allow_group_submissions())\n {\n return $this->get_reporting_data_html(AssignmentSubmission::SUBMITTER_TYPE_USER);\n }\n else\n {\n $type = Request::get(self::PARAM_TYPE);\n \n if ($type == null)\n {\n $type = self::TYPE_COURSE_GROUP;\n }\n switch ($type)\n {\n case self::TYPE_COURSE_GROUP :\n return $this->get_reporting_data_html(AssignmentSubmission::SUBMITTER_TYPE_COURSE_GROUP);\n case self::TYPE_GROUP :\n return $this->get_reporting_data_html(AssignmentSubmission::SUBMITTER_TYPE_PLATFORM_GROUP);\n }\n }\n }", "function member_groups_page() {\r\n require_once( $plugin_dir . \"email-newsletter-files/page-groups.php\" );\r\n }", "public function getGroupByPage() {}", "public abstract function getDatasetFilterPopupHtml():string;", "public function group_find_main_screen_function() {\n\t\t// add title and content here - last is to call the members plugin.php template.\n\t\t\\add_action( 'bp_template_content', array( $this, 'group_find_main_content_action' ) );\n\t\t\\bp_core_load_template( \\apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );\n\t\t// echo do_shortcode ( '[youzer_groups per_page=\"10\"]' );\n\t}", "function popup_elements()\n\t\t{\n\t\t\t\n\t\t}", "protected function page_popup () {\n\t\t$skeleton = make::tpl ('skeleton.basic');\n\n\t\t/**\n\t\t * Fetch the body content template\n\t\t */\n\t\t$body = make::tpl ('body.login-widget.popup');\n\n\t\t/**\n\t\t * Fetch the page details\n\t\t */\n\t\t/*$page = new page('terms');*/\n\n\t\t/**\n\t\t * Build the output\n\t\t */\n\t\t$skeleton->assign (\n\t\t\tarray (\n\t\t\t\t'title'\t\t\t=> /*$page->title()*/'Login Widget',\n\t\t\t\t'keywords'\t\t=> /*$page->keywords()*/'',\n\t\t\t\t'description'\t=> /*$page->description()*/'',\n\t\t\t\t'body'\t\t\t=> $body\n\t\t\t)\n\t\t);\n\n\t\toutput::as_html($skeleton,true);\n\n\t}", "public function getGridParentHtml()\n {\n $templateName = Mage::getDesign()->getTemplateFilename($this->_parentTemplate, array('_relative'=>true));\n return $this->fetchView($templateName);\n }", "function getGroupName() {\n\t\treturn 'pagetools';\n\t}", "function getHTML()\n\t{\t\t\t\t\n\t\t// getHTML() is called by ilRepositoryGUI::show()\n\t\tif($this->id_type == self::REPOSITORY_NODE_ID)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// there is no way to do a permissions check here, we have no wsp\n\t\t\n\t\t$this->filterInactivePostings();\n\t\t\n\t\t$list_items = $this->getListItems();\t\t\n\t\t\n\t\t$list = $nav = \"\";\n\t\tif($list_items)\n\t\t{\t\t\t\t\n\t\t\t$list = $this->renderList($list_items, \"previewEmbedded\");\n\t\t\t$nav = $this->renderNavigation($this->items, \"gethtml\", \"previewEmbedded\");\n\t\t}\t\t\n\t\t\n\t\treturn $this->buildEmbedded($list, $nav);\t\t\n\t}", "public function getTemplatesHtml()\n\t{\n\t\t$path = 'global/slider/content/custom/groups';\n\n\t\t$templates = '';\n\t\tforeach (Mage::getConfig()->getNode($path)->children() as $group) {\n\t\t\t$templates .= $this->getChildHtml($group->getName() .'_content_type'). \"\\n\" ;\n\t\t}\n\n\t\treturn $templates;\n\t}", "function pageGroup() {\n $thisDir = pathinfo($_SERVER['PHP_SELF'], PATHINFO_DIRNAME);\n $thisPage = pathinfo($_SERVER['PHP_SELF'], PATHINFO_BASENAME);\n\n $result = '';\n\n if (($thisDir == '/') && ($thisPage == 'index.php')) {\n $result = 'Home';\n }\n else if ($thisDir == '/why-choose-us') {\n $result = 'Why Choose Us?';\n }\n else if (($thisDir == '/big-button-cell-phone') && ($thisPage == 'index.php')) {\n $result = 'Phone';\n }\n else if ($thisDir == '/senior-cell-phone-plans') {\n $result = 'Plans';\n }\n else if ($thisDir == '/shop') {\n $result = 'Shop';\n }\n else if ($thisDir == '/catalog') {\n $result = 'Shop';\n }\n else if ($thisDir == '/one-call') {\n $result = 'oneCall';\n }\n else if ($thisDir == '/activate') {\n $result = 'Activate Phone';\n }\n\n return $result;\n //error_log(\"result: \" . $result);\n }", "public static function printGallery() {\r\n\t\t$elts = Acid::mod('Photo')->dbList(array(array('active','=',1)),array('pos'=>'ASC'));\r\n\t\treturn Acid::tpl('pages/gallery.tpl',array('elts'=>$elts),Acid::mod('Photo'));\r\n\t}", "abstract public function getPanelGroup();", "function showPageEditorSettingsObject()\n\t{\n\t\tglobal $tpl, $ilTabs, $ilCtrl;\n\t\t\n\t\t$this->addPageEditorSettingsSubTabs();\n\t\t\n\t\tinclude_once(\"./Services/COPage/classes/class.ilPageEditorSettings.php\");\n\t\t$grps = ilPageEditorSettings::getGroups();\n\t\t\n\t\t$this->cgrp = $_GET[\"grp\"];\n\t\tif ($this->cgrp == \"\")\n\t\t{\n\t\t\t$this->cgrp = key($grps);\n\t\t}\n\n\t\t$ilCtrl->setParameter($this, \"grp\", $this->cgrp);\n\t\t$ilTabs->setSubTabActive(\"adve_grp_\".$this->cgrp);\n\t\t\n\t\t$this->initPageEditorForm();\n\t\t$tpl->setContent($this->form->getHtml());\n\t}", "function getHTML()\n\t{\n\t\tswitch ($this->cmd) {\n\t\t\tcase \"updateSiteImportTable\" :\n\t\t\t\treturn $this->_updateSiteImportTable();\n\t\t\t\tbreak;\n\t\t\tcase \"createWePageSettings\" :\n\t\t\t\treturn $this->_getCreateWePageSettingsHTML();\n\t\t\t\tbreak;\n\t\t\tcase \"saveWePageSettings\" :\n\t\t\t\treturn $this->_getSaveWePageSettingsHTML();\n\t\t\t\tbreak;\n\t\t\tcase \"content\" :\n\t\t\t\treturn $this->_getContentHTML();\n\t\t\t\tbreak;\n\t\t\tcase \"buttons\" :\n\t\t\t\treturn $this->_getButtonsHTML();\n\t\t\t\tbreak;\n\t\t\tdefault :\n\t\t\t\treturn $this->_getFrameset();\n\t\t}\n\t}", "function layout_preview_links($data, $channel_id)\n{\n $layout_preview_links = \"<p>\" . ee()->lang->line('choose_layout_group_preview') . NBS . \"<span class='notice'>\" . ee()->lang->line('layout_save_warning') . \"</span></p>\";\n $layout_preview_links .= \"<ul class='bullets'>\";\n foreach ($data->result() as $group) {\n $layout_preview_links .= '<li><a href=\\\"' . BASE . AMP . 'C=content_publish' . AMP . \"M=entry_form\" . AMP . \"channel_id=\" . $channel_id . AMP . \"layout_preview=\" . $group->group_id . '\\\">' . $group->group_title . \"</a></li>\";\n }\n $layout_preview_links .= \"</ul>\";\n\n return $layout_preview_links;\n}", "public function getSplashBlock() {\r\n\t\t$html = '<p>Personnel handles the storing & presentation of faculty & staff records.</p>';\r\n\t\t$html .= '<p><b>Available Shortcode:</b><br /><code>[ofa-personnel][/ofa-personnel]</code></p>';\r\n\t\t$html .= '<p><b>Shortcode Attributes:</b><br /><code>view=\"list-all\"</code> (default)</br /><code>view=\"profile\"</code><br /><code>search=\"true\"</code><br /><code>search=\"false\"</code> (default)<br /><code>groupid=\"#\"</code> (The ID of the group to list)</p>';\r\n\t\treturn $html;\r\n\t}", "public function getPopup() { \n if($this->blocks) {\n return $this->desc . \"<BR />&nbsp;<BR />\" . \n \"<b>Blocks\" . \n ($this->charges > 0 ? \" \" . $this->charges . \" more\" : \"\") .\n ($this->blockActionTypes != \"all\" ? $this->blockActionTypes : \"\") . \" actions\" . \n ($this->blockChance < 1 ? \" with a chance of \" . floor($this->blockChance * 100) . \"%\" : \"\") . \n ($this->turns > 0 ? \" within the next \" . $this->turns . \" rounds\" : \"\") .\n \".\";\n }\n return $this->desc;\n }", "public function getPanel()\n {\n if (!$this->auth->hasIdentity()) {\n $html = '<h4>No identity</h4>';\n } else {\n $html = '<h4>Identity</h4>';\n $html .= $this->cleanData($this->auth->getIdentity());\n }\n\n return $html;\n }", "public static function manager_inner () \n { \n $html = null;\n\n $top = self::manager_inner_top();\n $inner = self::manager_inner_center();\n $bottom = self::manager_inner_bottom();\n\n $html .= self::page_body( 'manager', $top, $inner, $bottom );\n\n return $html;\n }", "public function getHTML()\n {\n static::addPageResources(array(\n 'js' => '/lib/js/jquery.hoverIntent.js'\n ));\n\n list($large_conf, $small_conf) = $this->getItemsConfs();\n\n $items = $this->getItemIDs();\n\n $large = Client::getItems($items, $large_conf);\n $small = Client::getItems($items, $small_conf);\n\n if (!is_array($small)) return;\n if (!is_object($small[0])) return;\n\n if (!is_array($large)) return;\n if (!is_object($large[0])) return;\n\n $small[0]->class = $large[0]->class = \"first selected\";\n\n $data = array(\n 'folders_path' => $this->folder->path,\n 'transition' => $this->transition,\n 'delay' => $this->delay,\n 'autohide' => $this->auto_hide_toolbar ? 'yes' : 'no',\n 'autostart' => $this->autostart ? 'true' : 'false',\n 'enlarge' => $this->enlarge,\n 'controls' => $this->controls,\n 'captions' => $this->captions,\n 'main' => $large,\n 'thumbs' => $small,\n 'width' => $this->width,\n 'height' => $this->height\n );\n\n return $this->html = static::getMustache('slideshow', $data);\n }", "public function index() {\n\t\t$data = Group::get()->map( function ( $s ) {\n\t\t\treturn [\n\t\t\t\t'id' => $s->id,\n\t\t\t\t'name' => $s->getShortName(),\n\t\t\t\t'content' => $s->getShortContent(),\n\t\t\t\t'created_at' => $s->created_at_formatted,\n\t\t\t\t'created_at_time' => $s->created_at_time,\n\t\t\t\t'active' => $s->getActiveFullResponse()\n\t\t\t];\n\t\t} );\n\n\t\t$this->page->response = $data;\n\t\t$this->page->create_option = 1;\n\t\treturn view('pages.settings.parts.groups.index' )\n\t\t\t->with( 'Page', $this->page );\n\t}", "function showcaseGallery($groupId, $title) {\n\t$config = new ConfigReader();\n\t$config->loadConfigFile('assets/core/config/widgets/showGroup/gallery.properties');\n\t\n\t$maxDisplay = $config->readValue('maxDisplay');\n\t$maxPerRow = $config->readValue('maxPerRow');\n\t$w = $config->readValue('maxImageSizeX');\n\t$h = $config->readValue('maxImageSizeY');\n\t\n\t//if the user is not an admin, validate that the user is a member of this group\n\t$result = mysql_query(\"SELECT parentId, imageUrl FROM imagesGroups WHERE parentId = '{$groupId}' AND inSeriesImage = 1 ORDER BY RAND() LIMIT $maxDisplay\");\n\t$total = mysql_num_rows($result);\n\t\n\tif ($total > 0) {\n\t\t\n\t\t$urlCategory =urlencode($row->category);\n\t\t$caption = htmlentities($row->caption);\n\t\t\n\t\t$x = 0;\n\t\t$count = 0;\n\t\t\n\t\t//adjust maxPerRow is it's greater than the returned number of objects\n\t\tif ($maxPerRow > $total) {\n\t\t\t\n\t\t\t$maxPerRow = $total;\n\t\t\t\n\t\t}\n\t\t\n\t\t$return .= \"\t\t\t\t<div id=\\\"gallery_container\\\">\\n\";\n\t\t$return .= \"\t\t\t\t\t<div class=\\\"header\\\"><a href=\\\"/groupgalleries/id/$groupId\\\">$title</a></div>\\n\";\n\t\t$return .= \"\t\t\t\t\t<div class=\\\"body\\\">\\n\";\n\t\t\n\t\twhile ($row = mysql_fetch_object($result)) {\n\t\t\t\n\t\t\t//count this row's column itteration\n\t\t\t$x++;\n\t\t\t\n\t\t\t//keep track of total displayed so far\n\t\t\t$count++;\n\t\t\t\n\t\t\t//determine if separator class is applied\n\t\t\tif ($x % $maxPerRow != 0) {\n\t\t\t\t\n\t\t\t\t$separator = \" separator\";\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t$separator = \"\";\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$return .= \"<div class=\\\"gallery_image_container$separator\\\">\\n\";\n\t\t\t$return .= \"\t<a href=\\\"/groupgalleries/id/$groupId\\\"><img src=\\\"/file.php?load=$row->imageUrl&w=$w&h=$h\\\" border=\\\"0\\\"></a>\\n\";\n\t\t\t$return .= \"</div>\\n\";\n\t\t\t\n\t\t\t//row separator\n\t\t\tif ($x == $maxPerRow && $count < $total) {\n\t\t\t\t\n\t\t\t\t$return .= \"\t\t\t<div class=\\\"gallery_image_row_separator\\\"></div>\\n\";\n\t\t\t\t$x = 0;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t$return .= \"\t\t\t\t\t</div>\\n\";\n\t\t$return .= \"\t\t\t\t</div>\\n\";\n\t\t\n\t}\t\n\t\n\treturn($return);\n\t\n}", "public function getContent()\n\t\t{\n\t\t\treturn $this->getGroup();\n\t\t\t\n\t\t}", "public function getPanelContent()\n {\n $types = array('previous' => 'previous sessions', 'current' => \"current session\");\n\n $html = '';\n foreach(XHProfRunPool::getRunsByNamespace(true) as $namespace => $allRuns)\n {\n $html .= sprintf('<h2>Namespace : %s<a href=\"#\" onclick=\"sfWebDebugToggle(\\'pmsipilotWebDebugXHProf-%s\\'); return false;\"><img src=\"'.$this->webDebug->getOption('image_root_path').'/toggle.gif\"/></a></h2>', $namespace, md5($namespace));\n $html .= sprintf('<div id=\"pmsipilotWebDebugXHProf-%s\" style=\"display: none;\">', md5($namespace));\n\n foreach($allRuns as $type => $runs)\n {\n $links = array();\n $html .= sprintf(\"<h3>Runs from %s</h3>\", $types[$type]);\n foreach($runs as $run)\n {\n $links[] = sprintf('<input type=\"checkbox\" name=\"runs-%s\" id=\"run-%s\"><a href=\"%s\" target=\"_blank\">Run %s (%s)</a>', md5($namespace), $run->getId(), $run->getUrl(), $run->getId(), date('Y-m-d H:i:s', $run->getDate()));\n }\n if(count($links))\n {\n $html .= sprintf('<ol style=\"margin-left: 0px; list-style-type: none;\" class=\"runs-container-%s\"><li>%s</li></ol>', md5($namespace), implode('</li><li>', $links));\n }\n else\n {\n $html .= \"No run\";\n }\n }\n $html .= sprintf('<input type=\"button\" id=\"runs-%s\" value=\"Compare\" onclick=\"xhprofCompare(this, \\'%s\\', \\'%s\\')\">', md5($namespace), md5($namespace), addslashes($namespace));\n $html .= '</div>';\n }\n \n sfContext::getInstance()->getConfiguration()->loadHelpers('Asset');\n $baseUrl = _compute_public_path('index.php', 'elXHProfPlugin', 'php');\n $html .=<<<EOF\n<script type=\"text/javascript\">\nfunction xhprofCompare(button, namespaceId, namespace) {\n var groupId = button.id;\n var groupNamespace = button.id.split('-')[1];\n \n var checkedElements = [];\n var runContainers = sfWebDebugGetElementsByClassName('runs-container-'+namespaceId);\n for(var i = 0; i<runContainers.length; i++)\n {\n var runCheckboxes = runContainers[i].getElementsByTagName('input');\n for(var j = 0; j<runCheckboxes.length; j++)\n {\n if(runCheckboxes[j].checked)\n {\n checkedElements.push(runCheckboxes[j]);\n }\n }\n }\n \n if(checkedElements.length==2) {\n var run1 = checkedElements[1].id.split('-')[1];\n var run2 = checkedElements[0].id.split('-')[1];\n window.open(\"$baseUrl?run1=\"+run1+\"&run2=\"+run2+\"&source=\"+namespace);\n }\n else\n {\n alert(\"We can only compare 2 runs.\");\n }\n}\n</script>\nEOF;\n \n return $html;\n }", "function getGroupPerPage() {\n\t\treturn @$_SESSION[EWRPT_PROJECT_VAR . \"_\" . $this->TableVar . \"_grpperpage\"];\n\t}", "function getGroupPerPage() {\n\t\treturn @$_SESSION[EWRPT_PROJECT_VAR . \"_\" . $this->TableVar . \"_grpperpage\"];\n\t}", "function visual_group_end()\n\t\t{\t\t\t\n\t\t\t$output = '</div>';\n\t\t\treturn $output;\n\t\t}", "function template_bits_overview_row_normal( $group, $folder_blob, $count_string ) {\n\n$IPBHTML = \"\";\n//--starthtml--//\n\n$IPBHTML .= <<<EOF\n<div class='tablerow1' id='dv-{$group['group_name']}'>\n <div style='float:right'>\n ($count_string)&nbsp;{$group['easy_preview']}\n </div>\n <div align='left'>\n <img src='{$this->ipsclass->skin_acp_url}/images/folder.gif' alt='Группа шаблонов' style='vertical-align:middle' />\n {$folder_blob}&nbsp;<a style='font-size:11px' id='gn-{$group['group_name']}' onclick='template_load_bits(\"{$group['group_name']}\", event)' title='{$group['easy_desc']}' href='{$this->ipsclass->base_url}&{$this->ipsclass->form_code}&code=template-bits-list&id={$group['_id']}&p={$group['_p']}&group_name={$group['group_name']}&'>{$group['easy_name']}</a>\n <span id='match-{$group['group_name']}'></span>\n </div>\n</div>\nEOF;\n\n//--endhtml--//\nreturn $IPBHTML;\n}", "function get_html()\n\t{\n\n\t// incrase views\n\n\t}", "function get_assign_circles_popup( $curent_page = '' ) {\r\n\r\n ?>\r\n <script type=\"text/javascript\">\r\n var wpc_current_page = '<?php echo $curent_page; ?>';\r\n </script>\r\n <div style=\"display: none;\">\r\n <div id=\"circles_popup_block\" >\r\n <div class=\"postbox\" style=\"margin-bottom: 0px;\">\r\n <h3 style=\"cursor: auto; padding: 8px 0 8px 8px;\">\r\n <?php\r\n switch( $curent_page ) {\r\n case 'add_client':\r\n _e( 'Assign Circle(s) To Client:', WPC_CLIENT_TEXT_DOMAIN );\r\n break;\r\n case 'add_client_page':\r\n _e( 'Assign Circle(s) To Portal Page:', WPC_CLIENT_TEXT_DOMAIN );\r\n break;\r\n default:\r\n _e( 'Assign Circle(s):', WPC_CLIENT_TEXT_DOMAIN );\r\n break;\r\n }\r\n ?>\r\n </h3>\r\n <input type=\"text\" class=\"search_field\" name=\"search\" value=\"<?php _e( 'Search', WPC_CLIENT_TEXT_DOMAIN ) ?>\" onfocus=\"if (this.value=='<?php _e( 'Search', WPC_CLIENT_TEXT_DOMAIN ) ?>') this.value='';\" onblur=\"if (this.value==''){this.value='<?php _e( 'Search', WPC_CLIENT_TEXT_DOMAIN ) ?>'}\" />\r\n <select name=\"order\" class=\"order\">\r\n <option value=\"show_asc\"><?php _e( 'A to Z', WPC_CLIENT_TEXT_DOMAIN ) ?></option>\r\n <option value=\"show_desc\"><?php _e( 'Z to A', WPC_CLIENT_TEXT_DOMAIN ) ?></option>\r\n <option value=\"date_asc\"><?php _e( 'Date Added (Recent to Earlier)', WPC_CLIENT_TEXT_DOMAIN ) ?></option>\r\n <option value=\"date_desc\"><?php _e( 'Date Added (Earlier to Recent)', WPC_CLIENT_TEXT_DOMAIN ) ?></option>\r\n <option value=\"first_asc\"><?php _e( 'Assigned show first', WPC_CLIENT_TEXT_DOMAIN ) ?></option>\r\n </select>\r\n <span class=\"description\" style=\"padding-left: 8px;\">\r\n <input type=\"checkbox\" class=\"select_all_at_page\" name=\"select_all_at_page_circles\" id=\"select_all_at_page_circles\" value=\"1\" />\r\n <label for=\"select_all_at_page_circles\"><?php _e( 'Select all at this page.', WPC_CLIENT_TEXT_DOMAIN ) ?></label>\r\n </span>\r\n <span class=\"description\" style=\"padding-left: 8px;\">\r\n <input type=\"checkbox\" class=\"select_all2\" name=\"select_all2\" id=\"select_all3\" value=\"1\" />\r\n <label for=\"select_all3\"><?php _e( 'Select All.', WPC_CLIENT_TEXT_DOMAIN ) ?></label>\r\n </span>\r\n <div class=\"inside\">\r\n <table>\r\n <tr>\r\n <td>\r\n <?php\r\n $popup_data_json = $this->ajax_get_popup_pagination_data('circles_return');\r\n $popup_data_array = json_decode($popup_data_json, true);\r\n echo $popup_data_array['html'];\r\n ?>\r\n </td>\r\n </tr>\r\n </table>\r\n </div>\r\n <div style=\"clear: both; text-align: center; position: relative;\">\r\n <?php if($popup_data_array['count'] > $popup_data_array['per_page']) { ?>\r\n <a href=\"javascript:void(0);\" rel=\"first\" class=\"pagination_links\"><<</a>&nbsp;&nbsp;\r\n <a href=\"javascript:void(0);\" rel=\"prev\" class=\"pagination_links\"><</a>&nbsp;&nbsp;\r\n <span class=\"page_num\">1</span>&nbsp;&nbsp;\r\n <a href=\"javascript:void(0);\" rel=\"next\" class=\"pagination_links\">></a>&nbsp;&nbsp;\r\n <a href=\"javascript:void(0);\" rel=\"last\" class=\"pagination_links\">>></a>\r\n <?php } ?>\r\n <div class=\"popup_statistic\">\r\n <span class=\"total_count\">0</span> item(s). <span class=\"selected_count\">0</span> item(s) was selected.\r\n </div>\r\n </div>\r\n <div style=\"clear: both; height: 15px;\">\r\n &nbsp;\r\n </div>\r\n <div style=\"clear: both; text-align: center;\">\r\n <input type=\"hidden\" name=\"input_ref\" class=\"input_ref\" />\r\n <input type=\"button\" name=\"Ok\" value=\"<?php _e( 'Ok', WPC_CLIENT_TEXT_DOMAIN ) ?>\" class=\"ok_popup2 button-primary\" />\r\n <input type=\"button\" name=\"cancel\" class=\"cancel_popup2 button\" value=\"<?php _e( 'Cancel', WPC_CLIENT_TEXT_DOMAIN ) ?>\" />\r\n </div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n <?php\r\n\r\n }", "function close_all()\r\n {\r\n $display_content = '<script type=\"text/javascript\">';\r\n foreach ($this->folders as $folder)\r\n $display_content .= \"opml_browser.clickFolder('\" . $folder . \"');\";\r\n $display_content .= '</script>';\r\n return $display_content;\r\n }", "public function getPanel()\n {\n $html = '';\n foreach ($this->_count as $count) {\n $html .= $count['name']. ' - '.$count['total'].' ('.$count['users'].')'.'<br/>';\n }\n \n $body = Zend_Controller_Front::getInstance()->getResponse()->getBody();\n $panel = '<h4>К-во пользователей онлайн:</h4>'.$html;\n return $panel;\n }", "public function BannerPickerPopUp()\n\t{\tob_start();\n\t\techo '<script type=\"text/javascript\">$().ready(function(){$(\"body\").append($(\".jqmWindow\"));$(\"#banner_modal_popup\").jqm();});</script>',\n\t\t\t'<!-- START instructor list modal popup --><div id=\"banner_modal_popup\" class=\"jqmWindow\" style=\"padding-bottom: 5px; width: 640px; margin-left: -320px; top: 10px; height: 600px; \"><a href=\"#\" class=\"jqmClose submit\">Close</a><div id=\"bannerModalInner\" style=\"height: 500px; overflow:auto;\"></div></div>';\n\t\treturn ob_get_clean();\n\t}", "public function printContent()\n {\n $this->includeFieldComponent('selectwithpopup');\n }", "function renderSmallGroupList($db, $group, $groupLeader) { \n ?><div class=\"content\">\n <!-- make sure theyre in a group -->\n <?php if ($group == 0) {\n echo \"<h2>You're not in a group yet!</h2>\";\n } else {\n $myGroup = getGroup($db, $group);\n ?>\n <h2 class=\"subtitle\"><?php echo sizeof($myGroup) ?> members</h2>\n <table>\n <?php // start looping through group members\n foreach ($myGroup as $a) {\n ?>\n <tr>\n <td>\n <a href=\"/?page=viewProfile&amp;id=<?=$a['id']?>\">\n <?php \n if($a['displayName'] == \"\") {\n echo $a['name'];\n } else {\n echo $a['displayName'];\n } \n ?>\n </a>\n </td>\n </tr>\n <?php } // end looping through group members ?>\n </table>\n <a class=\"button left\" href=\"/?page=group\">Manage Group</a>\n <?php } // end if?>\n </div><?php \n}", "public static function setting_inner () \n { \n $html = null;\n\n $top = __( 'Setting : Option', 'text' );;\n $inner = self::setting_inner_center();\n $bottom = self::page_foot();\n\n $html .= self::page_body( 'setting', $top, $inner, $bottom );\n\n return $html;\n }", "function skin_diff_row_newgroup( $group_name ) {\n\n$IPBHTML = \"\";\n//--starthtml--//\n\n$IPBHTML .= <<<EOF\n<tr>\n <td colspan='4' class='tablerow3'>\n <strong>{$group_name}</strong>\n </td>\nEOF;\n\n//--endhtml--//\nreturn $IPBHTML;\n}", "public function getHTML()\n\t{\n\t\t$start = '\n\t\t\t<form';\n\t\t$start .= ( $this->id ) ? ' id=\"' . $this->id . '\"' : '';\n $start .= ' class=\"group\"';\n $start .= ' action=\"' . $this->action . '\"';\n\t\t$start .= ' method=\"' . $this->method . '\"';\n\t\t$start .= ( $this->enctype ) ? ' enctype=\"multipart/form-data\"' : '';\n\t\t$start .= \">\\n\";\n\t\t\n\t\t$end = \"</form>\\n\";\n\t\t\n\t\t$content = '';\n\t\tforeach ( $this->elements as $element ) {\n\t\t\t$content .= $element->getHtml();\n\t\t}\n\t\t\n\t\treturn $start . $content . $end;\n\t}", "public function getHTML() {\n\t\tglobal $tpl;\n\n $tpl->addCss(\n 'Customizing/global/plugins/Services/Repository/RepositoryObject/'\n . 'Review/templates/default/css/Review.css'\n );\n $path_to_il_tpl = ilPlugin::getPluginObject(\n IL_COMP_SERVICE,\n 'Repository',\n 'robj',\n 'Review'\n )->getDirectory();\n $custom_tpl = new ilTemplate(\n \"tpl.aspect_row.html\",\n true,\n true,\n $path_to_il_tpl\n );\n\t\tforeach ($this->si_guis as $si_gui) {\n\t\t\t$si_gui->insert($custom_tpl);\n\t\t}\n\t\treturn $custom_tpl->get();\n\t}", "protected function getGroupName() {\n\t\treturn 'pagetools';\n\t}", "function display( $group_id = NULL ) {\n $group_id = bp_get_group_id();\n bp_get_template_part( 'groups/single/projects');\n }", "public function atmf_html_backend(){\n\n $template_loader = new Uou_Atmf_Load_Template();\n ob_start();\n $template = $template_loader->locate_template( 'popup.php' );\n\n if(is_user_logged_in() ){\n include( $template );\n }\n echo ob_get_clean();\n\n }", "public function get_content_html()\n {\n\n ob_start();\n RP_SUB_Help::include_template($this->template_html, array_merge($this->template_variables, array('plain_text' => false)));\n return ob_get_clean();\n }", "function showNavigation_hosp($output, $getUrl) {\n // Print container for per-age group buttons\n ?>\n <div class=\"box_section\">\n\n <div class=\"bot_stat_value centered\">\n Per Age Group Hospitalization\n </div>\n\n <?php\n foreach ($output['ageGroups'] as $ageGroup) {\n if($ageGroup['completed']) {\n $class = 'box_region_nav_complete';\n $icon = 'fa-check';\n } else {\n $class = 'box_region_nav_incomplete';\n $icon = 'fa-question';\n }\n ?>\n <!-- <button onclick=\"redirect('<?= ($getUrl . \"?id=\" . $ageGroup['id']) ?>')\"><?= $ageGroup['ages'] ?></button>\n <br /> -->\n <div class=\"box_region_nav <?= $class ?>\" onClick=\"redirect('<?= ($getUrl . \"?id=\" . $ageGroup['id']) ?>')\">\n <div class=\"box_region_nav_content\">\n <div class=\"box_region_nav_content_stack\" style=\"top: 20px;\">\n\n <img class=\"img_flag_large age_group_img\" src=\"images/flags/ages_<?= sprintf('%01d', $ageGroup['id']) ?>.png\"></img>\n\n <div style=\"margin-top: -8px;\">\n <?= htmlspecialchars($ageGroup['ages']) ?>\n </div>\n </div>\n <div class=\"box_region_nav_content_stack\" style=\"top: 2px;\">\n <span style=\"font-size: 1.3em; opacity: 0.2;\"><i class=\"fa <?= $icon ?> fa-5x\"></i></span>\n </div>\n </div>\n </div> <?php\n }\n\n ?>\n </div>\n <?php\n}", "function lipsum_popup() {\n if( WP_Dummy_Admin::is_in_post_page() ) {\n require_once( WP_DUMMY_DIR . '/includes/views/view-lipsum-generator.php' );\n }\n }", "function &getHTML()\n\t{\n\t\tinclude_once(\"./Services/PersonalDesktop/classes/class.ilBookmarkBlockGUI.php\");\n\t\t$bookmark_block_gui = new ilBookmarkBlockGUI(\"ilpersonaldesktopgui\", \"show\");\n\t\t\n\t\treturn $bookmark_block_gui->getHTML();\n\t}", "private function get_reporting_html()\n {\n $html = array();\n \n // Reporting title\n $html[] = '<div class=\"title\" style=\"border-bottom:1px dotted #D3D3D3;width:100%;border-top:1px dotted #D3D3D3;\n padding-top:5px\">';\n $html[] = Translation::get('Reporting');\n $html[] = '</div><div class=\"clear\">&nbsp;</div><br />';\n \n $html[] = '<div style=\"font-weight:bold;float:left\">';\n \n if (! $this->assignment->get_allow_group_submissions())\n {\n $html[] = Translation::get('UsersSubmissions') . ':&nbsp;<br />';\n $html[] = Translation::get('UsersFeedback') . ':&nbsp;<br />';\n \n if ($this->assignment->get_allow_late_submissions())\n {\n $html[] = Translation::get('UsersLateSubmissions') . ':&nbsp;<br />';\n }\n }\n else\n {\n $type = Request::get(self::PARAM_TYPE);\n \n if ($type == null)\n {\n $type = self::TYPE_COURSE_GROUP;\n }\n switch ($type)\n {\n case self::TYPE_COURSE_GROUP :\n $html[] = Translation::get('CourseGroupsSubmissions') . ':&nbsp;<br />';\n $html[] = Translation::get('CourseGroupsFeedback') . ':&nbsp;<br />';\n if ($this->assignment->get_allow_late_submissions())\n {\n $html[] = Translation::get('CourseGroupsLateSubmissions') . ':&nbsp;<br />';\n }\n break;\n \n case self::TYPE_GROUP :\n $html[] = Translation::get('PlatformGroupsSubmissions') . ':&nbsp;<br />';\n $html[] = Translation::get('PlatformGroupsFeedback') . ':&nbsp;<br />';\n if ($this->assignment->get_allow_late_submissions())\n {\n $html[] = Translation::get('PlatformGroupsLateSubmissions') . ':&nbsp;<br />';\n }\n break;\n }\n }\n $html[] = '</div>';\n \n // Reporting data\n $html[] = '<div style=\"float:left\">';\n $html[] = $this->get_reporting_block_html();\n $html[] = '</div>';\n \n return implode(PHP_EOL, $html);\n }", "function wizardHTML($arrTable)\t{\n\t\t$strOutput = $this->wizardHeader();\n\t\t$strOutput .= $this->groupsHTML($arrTable);\n\t\t$strOutput .= $this->wizardFooter();\n\t\treturn $strOutput;\n\t}", "public function getOuterHtml()\n {\n return $this->getSession()->getDriver()->getOuterHtml($this->getXpath());\n }", "protected function AdminPage() {\n\t$oMenu = fcApp::Me()->GetHeaderMenu();\n\t\n\t\t\t // ($sGroupKey,$sKeyValue=TRUE,$sDispOff=NULL,$sDispOn=NULL,$sPopup=NULL)\n $oMenu->SetNode($ol = new fcMenuOptionLink('show','all','show all',NULL,'show inactive as well as active'));\n\t $doAll = $ol->GetIsSelected();\n \n\tif ($doAll) {\n\t $rs = $this->SelectRecords(NULL,'Sort');\n\t} else {\n\t $rs = $this->ActiveRecords();\n\t}\n\treturn $rs->AdminRows();\n }", "public function getTree() {\n\t\t// Affichage de la page\n\t\t$html = '<div id=\"tal_box\">';\n\t\t$html .= '<p>You can still use <span id=\"skillPoints\">23</span> points.</p>';\n\t\t$html .= '<div class=\"tal_tree\">';\n\t\t$html .= $this->createTree();\n\t\t$html .= '</div>';\n\t\t$html .= '<div class=\"tal_tree\">';\n\t\t$html .= $this->createTree();\n\t\t$html .= '</div>';\n\t\t$html .= '<div class=\"tal_tree\">';\n\t\t$html .= $this->createTree();\n\t\t$html .= '</div>';\n\t\t$html .= '<div id=\"tal_linkBox\">';\n\t\t$html .= '<button onClick=\"createLink()\">Create a link</button>';\n\t\t$html .= '<p id=\"tal_buildLink\"></p>';\n\t\t$html .= '</div>';\n\t\treturn $html;\n\t}", "function getHTML()\n {\n $show = true;\n $HTML = \"\n <div class='$this->size own-padding'>\n <div class='panel col-sm-12'>\n <header id='$this->headID' class='panel-heading'>\n $this->title\n <div class='panel-actions'>\n <a id='$this->buttonID' class='btn-minimize'>\n <i class='fa'><span class='arrow_up'/></i>\n </a>\n </div>\n </header>\n\n <div id='$this->bodyID' class='panel-body'>\n $this->content\n </div>\n </div>\n </div>\n\";\n\n\n if( $this->content == \"\"){\n $HTML = \"\";\n Errorlist::publicAddError(4,1);\n $show = false;\n }\n\n if( $this->title == \"\"){\n Errorlist::publicAddError(5,1);\n }\n\n if( $this->size == \"\"){\n Errorlist::publicAddError(6,1);\n $HTML = \"\";\n $show = false;\n }\n\n if($show){\n InitJSObjects::initObject($this->panelID, 'Panel', \"'$this->headID','$this->bodyID','$this->buttonID'\");\n EventHandler::newEvent(\"$this->buttonID\", \"function(){ $this->panelID.minMax() }\", \"click\");\n }\n\n\n return $HTML;\n }", "protected function getContents()\n {\n $contents = $this->crawler->filter('.page.group');\n if (!$contents->count()) {\n return;\n }\n\n $contents = $contents->html();\n\n // I'll have my own syntax highlighting, WITH BLACKJACK AND HOOKERS\n $this->crawler->filter('pre')->each(function ($code) use (&$contents) {\n $unformatted = htmlentities($code->text());\n $unformatted = '<pre><code class=\"php\">'.$unformatted.'</code></pre>';\n $contents = str_replace('<pre class=\"code php\">'.$code->html().'</pre>', $unformatted, $contents);\n });\n\n return $contents;\n }", "public function detail(): string\n {\n return $this->groupDetail ?? '';\n }", "public function getSettingsHtml();", "public function getNewsModalTemplates()\n {\n return $this->getTemplateGroup('news_');\n }", "public function displayReviewGroup()\n {\n $groups = Group::orderBy('name')->get();\n\n return view('review.group.display')->with([\"groups\" => $groups]);\n }", "public function getHtml()\n {\n \t$html = '<label for=\"remove_images\" style=\"display: block; margin-bottom: 10px;\">Remove previous image 2 product images only. this will not affect any existing products</label>';\n \t$html .= '<button style=\"\" onclick=\"confirmSetLocation(\\'Are you sure?\\',\\'/Image2Product/adminhtml_Image2Product/remove/\\')\" class=\"scalable delete\" type=\"button\" title=\"Remove Images\" id=\"id_f93657411b772d988f7517f61c01183d\"><span><span><span>Remove Images</span></span></span></button>';\n\t\treturn $html; \n }", "public function getSectionGroupsUrl()\n {\n return $this->getProperty(\"SectionGroupsUrl\");\n }", "public function widgetPopupHtml()\n {\n $widgetId = ipRequest()->getQuery('widgetId');\n $widgetRecord = \\Ip\\Internal\\Content\\Model::getWidgetRecord($widgetId);\n $widgetData = $widgetRecord['data'];\n\n // Populate form with proper fields\n switch ($widgetRecord['name']) {\n case 'ContentSection':\n //create form prepopulated with current widget data\n $form = $this->contentSectionManagementForm($widgetData);\n break;\n case 'ThreeItemListSection':\n $form = $this->threeItemManagementForm($widgetData);\n break;\n\n case 'Slider':\n $form = $this->sliderManagementForm($widgetData);\n break;\n case 'TopThreeSection':\n $form = $this->topThreeSectionManagementForm($widgetData);\n break;\n case 'ThumbnailCard':\n $form = $this->cardManagementForm($widgetData);\n break;\n default:\n $err = new \\Ip\\Response\\Json([\n 'error' => 'Unknown widget',\n 'widget' => $widgetRecord\n ]);\n $err->setStatusCode(400);\n return $err;\n }\n\n //Render form and popup HTML\n $viewData = array(\n 'form' => $form\n );\n $popupHtml = ipView('view/editPopup.php', $viewData)->render();\n $data = array(\n 'popup' => $popupHtml\n );\n //Return rendered widget management popup HTML in JSON format\n return new \\Ip\\Response\\Json($data);\n }", "public function displayManager() {\n\t\t$return = \"<h3>Events</h3><div id='tm_eventsCal'></div>\";\n\n\t\tif(pmpro_hasMembershipLevel('2')){\n\t\t\t$return .= \"<h3>Teams</h3><div id='tm_teamsPlace'></div>\";\n\t\t\t$allTeams = [];\n\t\t\tforeach ($this->teams as $team) {\n\t\t\t\t$allTeams[$team->id] = $team->getTeamEventsMembersAndSettings();\n\t\t\t}\n\t\t\t$return .= '<script type=\"text/javascript\"> var teams = '.json_encode($allTeams).'; </script>';\n\t\t\tif(TEAMMANAGER_DEBUG_MODE) $return .= json_encode($allTeams);\n\t\t} else {\n\t\t\t$this->please_upgrade();\n\t\t\t$return .= \"<h3>Team</h3>\";\n\t\t\t$return .= $this->teams[0]->getTeamEventsMembersAndSettings();\n\t\t} \n\t\treturn $return;\n\t}", "public function get_html() {\n\t\treturn wp_json_encode( $this->context->to_array(), JSON_PRETTY_PRINT );\n\t}", "public function getPanel()\n\t{\n\t\t$items = $this->items;\n\t\tob_start();\n\t\trequire_once __DIR__ . \"/Callback.phtml\";\n\t\treturn ob_get_clean();\n\t}", "function getHtmlStep3View()\r\n\t{\r\n\t\treturn '';\r\n\t}", "function getCategoryHTML($module_srl)\n\t{\n\t\t$category_xml_file = $this->getCategoryXmlFile($module_srl);\n\n\t\tContext::set('category_xml_file', $category_xml_file);\n\n\t\tContext::loadJavascriptPlugin('ui.tree');\n\n\t\t// Get a list of member groups\n\t\t$oMemberModel = getModel('member');\n\t\t$group_list = $oMemberModel->getGroups($module_info->site_srl);\n\t\tContext::set('group_list', $group_list);\n\n\t\t$security = new Security();\n\t\t$security->encodeHTML('group_list..title');\n\n\t\t// Get information of module_grants\n\t\t$oTemplate = &TemplateHandler::getInstance();\n\t\treturn $oTemplate->compile($this->module_path.'tpl', 'category_list');\n\t}", "function rawXMLPagegroupExport()\r\n\t{\r\n\t\tglobal $myPT;\r\n\t\tglobal $myDB;\r\n\r\n\t\t$xml ='<?xml version=\"1.0\" encoding=\"'.PT_CHARSET.'\" ?>\r\n<phenotype>\r\n\t<meta>\r\n\t\t<ptversion>'.$myPT->version.'</ptversion>\r\n\t\t<ptsubversion>'.$myPT->subversion.'</ptsubversion>\r\n\t</meta>\r\n\t<pagegroups>';\r\n\t\t$sql = \"SELECT * FROM pagegroup ORDER BY grp_id\";\r\n\t\t$rs = $myDB->query($sql);\r\n\t\twhile ($row=mysql_fetch_array($rs))\r\n\t\t{\r\n\t\t\t$xml .='\r\n\t\t<group>\r\n\t\t\t<grp_id>'.$row[\"grp_id\"].'</grp_id>\r\n\t\t\t<grp_bez>'.$myPT->codeX($row[\"grp_bez\"]).'</grp_bez>\r\n\t\t\t<grp_description>'.$myPT->codeX($row[\"grp_description\"]).'</grp_description>\r\n\t\t\t<grp_statistic>'.$myPT->codeX($row[\"grp_statistic\"]).'</grp_statistic>\r\n\t\t <grp_multilanguage>'.$myPT->codeX($row[\"grp_multilanguage\"]).'</grp_multilanguage>\r\n\t\t <grp_smarturl_schema>'.$myPT->codeX($row[\"grp_smarturl_schema\"]).'</grp_smarturl_schema>\r\n\t\t</group>';\r\n\t\t}\r\n\t\t$xml.='\r\n\t</pagegroups>\r\n</phenotype>';\r\n\t\treturn $xml;\r\n\t}", "public function getHtmlTemplate() {}", "function Get_Standard_Bottom_Section_HTML()\n {\n $HTML = \"\";\n //$HTML .= Get_File_Contents(\"static_html/stfc_footer.html\");\n $HTML .= \"</div>\";\n // empty div so that page container is\n // correct size\n\n // end page container\n $HTML .= \"</div>\";\n $HTML .= Get_File_Contents(__DIR__.\"/../../static_html/standard_footer.html\");\n return $HTML;\n }", "function album_gallery_get_page_content_show($GUID_USER, $GUID_IMAGE)\n{\n if(!$GUID_IMAGE || !$img = get_entity($GUID_IMAGE))\n {\n $immagine = elgg_view('elgg-album-gallery/error', array('error' => elgg_echo('gallery:no:imageshow')));\n $titolo = elgg_echo('gallery:title:error',array(elgg_echo('gallery:no:imageshow')));\n }\n else\n {\n $titolo = elgg_echo('gallery:title:showone',array($img->title));\n $immagine = elgg_view('elgg-album-gallery/show',array('title' => $img->title, 'desc' => $img->description, 'image' => $img->getIconURL('large'), 'guid' => $img->guid, 'guid_user' => $GUID_USER, 'action' => elgg_echo('gallery:delete:link')));\n }\n\n $return = array(\n 'title' => $titolo,\n 'content' => $immagine\n );\n\n return $return;\n}", "function fantacalcio_admin_groups_list() {\n $out = \"\";\n \n $out .= l(\"Aggiungi girone\", \"admin/fantacalcio/groups/add\", array(\n \"attributes\" => array(\"class\" => \"btn btn-info\"))) . \"<br/><br/>\";\n \n $groups = Group::all();\n $competitions = Competition::all();\n if ($groups) {\n $header = array(\n t(\"Girone\"), \n t(\"Attivo\"), \n t(\"Calendario\"), \n t(\"Classfica\"), \n t(\"Formazioni\"), \n t(\"Newsletter\"));\n foreach ($groups as $g_id => $group) {\n $rows[] = array(\n l($competitions[$group->competition_id]->name . \" - \" . $group->name, \"admin/fantacalcio/groups/\" . $g_id), \n fantacalcio_check_value($group->active), \n \n // \"<img src='\" .base_path() . drupal_get_path(\"module\", \"fantacalcio\") . \"/images/\" . get_image_check($group->active) . \"'>\",\n $group->matches_order, \n $group->standings_order, \n $group->lineups_order, \n $group->newsletters_order);\n }\n $out .= theme(\"table\", (array(\n \"header\" => $header, \n \"rows\" => $rows, \n \"attributes\" => array(\"class\" => array(\"table\", \"table-responsive\")), \n \"empty\" => t(\"Nessun gruppo\"))));\n }\n \n return $out;\n}", "public function getHtml();", "public function getHTML()\r\n\t{\t\t\r\n\t\tglobal $tpl, $lng;\r\n\t\t\r\n\t\t$lng->loadLanguageModule(\"crs\");\r\n\t\t\r\n\t\tinclude_once \"Services/Container/classes/class.ilContainerStartObjectsContentTableGUI.php\";\r\n\t\t$tbl = new ilContainerStartObjectsContentTableGUI(\r\n\t\t\t\t$this->parent_gui, \r\n\t\t\t\t\"\", \r\n\t\t\t\t$this->start_object, \r\n\t\t\t\t$this->enable_desktop\r\n\t\t);\r\n\t\t$tpl->setContent(\r\n\t\t\t$this->getPageHTML().\r\n\t\t\t$tbl->getHTML()\r\n\t\t);\t\t\r\n\t}", "public function getPanel()\n {\n if ($this->_auth->hasIdentity()) {\n $html = '<h4>Current Identity</h4>';\n $html .= $this->_cleanData($this->_auth->getIdentity());\n return $html;\n }\n\n return '';\n }", "public function get_output_html()\n\t{\n\t\t$this->create_html_page();\n\t\treturn $this->c_output_html;\n\t}", "public function getHTML();", "function getDisplay() {\n\t\t$content = \"<h3>\" . $this->widgetTitle . \"</h3>\";\n\n\t\tif (!empty($this->facebookUrl) && \n\t\t\ttrim($this->facebookUrl) !== '') {\n\t\t\t$content .= '<span class=\"social-pages-icon social-page-facebook\"><a href=\"' . $this->facebookUrl . '\" ><i class=\"fa fa-facebook\"></i></a></span>';\n\t\t}\n\t\tif (!empty($this->twitterUrl) && \n\t\t\t\ttrim($this->twitterUrl) !== '') {\n\t\t\t$content .= '<span class=\"social-pages-icon social-page-twitter\"><a href=\"' . $this->twitterUrl . '\" ><i class=\"fa fa-twitter\"></i></a></span>';\n\t\t}\n\t\tif (!empty($this->googleplusUrl) && \n\t\t\ttrim($this->googleplusUrl) !== '') {\n\t\t\t$content .= '<span class=\"social-pages-icon social-page-google\"><a href=\"' . $this->googleplusUrl . '\" ><i class=\"fa fa-google\"></i></a></span>';\n\t\t}\n\n\t\treturn $content;\n\t}", "function outputReloadParentCode()\n {\n global $application;\n\n if ($this -> _ReloadParentWindow != 1)\n return '';\n\n return $this -> mTmplFiller -> fill(\n 'catalog/product_group_edit/',\n 'reload-parent-js.tpl.html',\n array()\n );\n }", "protected function printOpenHtml()\n {\n echo '<HTML>';\n }", "function getGroup() ;", "public function getHtml()\n {\n return $this->_getHtml();\n }", "public function toString()\n {\n return 'Take Payment Popup In Session Management. Every Element Visible Correctly.';\n }", "function groups() {\n\t\t$this->validate();\n\t\t$this->setupTemplate();\n\n\t\t$journal =& Request::getJournal();\n\n\t\t$rangeInfo =& $this->getRangeInfo('groups');\n\n\t\t$groupDao =& DAORegistry::getDAO('GroupDAO');\n\t\t$groups =& $groupDao->getGroups(ASSOC_TYPE_JOURNAL, $journal->getId(), null, $rangeInfo);\n\n\t\t$templateMgr =& TemplateManager::getManager();\n\t\t$templateMgr->addJavaScript('lib/pkp/js/lib/jquery/plugins/jquery.tablednd.js');\n\t\t$templateMgr->addJavaScript('lib/pkp/js/functions/tablednd.js');\n\t\t$templateMgr->assign_by_ref('groups', $groups);\n\t\t$templateMgr->assign('boardEnabled', $journal->getSetting('boardEnabled'));\n\t\t$templateMgr->display('manager/groups/groups.tpl');\n\t}", "function gallery_detail($uri_gallery){\n\t\t// $uri_gallery = $this->db->escape($uri_gallery);\n\t\t$filter['GALL_URI'] = $uri_gallery;\n\t\t$gall_info = $this->dashboard_m->get_gallery_info($filter);\n\t\t$data['gall_info_result'] = $gall_info;\n\t\t$data[\"title\"] = $gall_info->GALL_NAME;\n\t\t$data[\"description\"] = $gall_info->GALL_DESC;\n\t\t$data['breadcrumb_parent_uri'] = \"gallery\";\n\t\t$data['breadcrumb_parent'] = \"Galeri\";\n\t\t$data['breadcrumb_active'] = $gall_info->GALL_NAME;\n\t\t// Get Data Gallery Foto / Video \n\t\t$filter2['GALL_ID'] = $gall_info->GALL_ID;\n\t\t$gall_pic_list = $this->dashboard_m->get_pics_of_gallery($filter2);\n\t\t$data['result'] = $gall_pic_list;\n\t\t// Get Data Sidebar\n\t\t$filter3['GALL_ID'] = $gall_info->GALL_ID;\n\t\t$gall_list = $this->dashboard_m->get_galleries($filter3);\n\t\tshuffle($gall_list);\n\t\t$data['sidebar_result'] = $gall_list;\n\t\t$data['include_script'] = inc_script(\n\t\t\tarray(\n\t\t\t\t\"cms/plugin/dashboard/js/gallery_modal.js\",\n\t\t\t)\n\t\t);\n\n\t\t$this->masterpage->addContentPage('breadcrumb', 'breadcrumb', $data);\n\t\t$this->masterpage->addContentPage(\"gallery_detail\", 'contentmain', $data);\n\t\t$this->masterpage->show();\n\t}", "public function getPage() {\n return $this->render('payment_info.phtml');\n }", "function DisplayLoginPopup()\n\t{\n\t\t$this->LoadPage('generic_popup');\n\t\t$this->Page->SetName(\"Login\");\n\t\t$this->Page->AddObject('UserLogin', COLUMN_ONE, HTML_CONTEXT_POPUP);\n\t\treturn TRUE;\n\t}", "public function getTabTitle()\r\n {\r\n return __('General Group');\r\n }", "function group_list()\n {\n //create model object\n $groupObj=new groupModel();\n \n \n //get all listing\n $groupObj->getgroupList();\n \n \n $jsData = Layout::bufferContent(URI::getAbsModulePath().\"/js/group_list.php\");\n \n \n //create javascript variable for ajax url\n Layout::addFooter($jsData);\n\n //render layout\n Layout::renderLayout();\n \n }", "function getHTML() \n {\n \n // Make a new Template object\n $this->template = new Template( $this->pathModuleRoot.'templates/' );\n \n // store the link info\n $this->template->set( 'links', $this->links );\n\n \n // store the page labels\n $name = $this->dataManager->getModuleName();\n $this->labels->setLabelTag( '[Title]', '[moduleName]', $name);\n $this->template->setXML( 'pageLabels', $this->labels->getLabelXML() );\n \n // store XML List of Applicants ...\n $this->template->setXML( 'dataList', $this->dataManager->getXML() );\n \n\n /*\n * Set up any additional data transfer to the Template here...\n */\n // store XML list of State Vars\n $this->template->setXML( 'stateVarList', $this->listStateVar->getXML() );\n \n // store XML list of Data Access Objects\n $this->template->setXML( 'daObjectList', $this->listDAObjects->getXML() );\n \n // store XML list of Page Objects\n $this->template->setXML( 'pageList', $this->listPageObjects->getXML() );\n \n // store XML list of Page Transitions\n $this->template->setXML( 'transitionList', $this->listTransitions->getXML() );\n \n // now store an array of Page Names so the transitions can list \n // the names of the Pages Objects ...\n $pageNames = array();\n $this->listPageObjects->setFirst();\n while ( $page = $this->listPageObjects->getNext() ) {\n $pageNames[ $page->getID() ] = $page->getName();\n }\n $this->template->set( 'pageNames', $pageNames );\n \n\t\treturn $this->template->fetch( 'page_ViewModule.php' );\n \n }", "public function showpopulartags($populartagdata)\n\t{\n\t\t$content = '\n\t\t<div class=\"populartags\">\n\t\t <span>Most Popular Tags</span>\n\t\t <div class=\"ptag\">'.$populartagdata.'</div>\n\t\t</div>\n\t\t';\n\t\treturn $content;\n\n\t}", "public function indexAction() {\n\n //DON'T RENDER IF SUNJECT IS NOT THERE\n if (!Engine_Api::_()->core()->hasSubject()) {\n return $this->setNoRender();\n }\n\n //GET SITEGROUP SUBJECT\n $this->view->subject = $subject = Engine_Api::_()->core()->getSubject('sitegroup_group');\n\n //GET GROUP ID \n $group_id = $subject->group_id;\n\n //START MANAGE-ADMIN CHECK\n $isManageAdmin = Engine_Api::_()->sitegroup()->isManageAdmin($subject, 'view');\n if (empty($isManageAdmin)) {\n return $this->setNoRender();\n }\n //END MANAGE-ADMIN CHECK\n //GET CORE CONTENT TABLE\n $contentTable = Engine_Api::_()->getDbtable('content', 'core');\n\n //GET CORE GROUPES TABLE\n $groupTable = Engine_Api::_()->getDbtable('pages', 'core');\n\n //SELECT GROUP\n $selectGroup = $groupTable->select()->from($groupTable->info('name'), array('page_id'))->where('name =?', 'sitegroup_index_view')->limit(1);\n\n //GET GROUP INFO\n $groupInfo = $groupTable->fetchRow($selectGroup);\n\n //HOW MAY LINK SHOULD BE SHOW IN THE WIDGET LINK BEFORE MORE LINK\n $this->view->linklimit = $linklimit = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitegroup.showmore', 8);\n\n if (!empty($groupInfo)) {\n $selectContent = $contentTable->select()->from($contentTable->info('name'), array('page_id'))->where('name =?', 'core.container-tabs')->where('page_id =?', $groupInfo->page_id)->limit(1);\n $contentinfo = $contentTable->fetchRow($selectContent);\n if (!empty($contentinfo) && !Engine_Api::_()->getApi('settings', 'core')->getSetting('sitegroup.layoutcreate', 0)) {\n return $this->setNoRender();\n }\n }\n $resource_type = \"\";\n //GET TAB ID\n $this->view->tab_id = Zend_Controller_Front::getInstance()->getRequest()->getParam('tab', null);\n if (!Engine_Api::_()->getApi('settings', 'core')->getSetting('sitegroup.layoutcreate', 0)) {\n $groupAdminContentTable = Engine_Api::_()->getDbtable('content', 'core');\n $selectGroupAdmin = $groupAdminContentTable->select()\n ->from($groupAdminContentTable->info('name'), array('content_id', 'params', 'name'))\n ->where('page_id =?', $groupInfo->page_id)\n ->where(\"name IN ('sitegroup.overview-sitegroup', 'sitegroup.photos-sitegroup', 'sitegroup.discussion-sitegroup', 'sitegroupnote.profile-sitegroupnotes', 'sitegrouppoll.profile-sitegrouppolls', 'sitegroupevent.profile-sitegroupevents', 'sitegroupvideo.profile-sitegroupvideos', 'sitegroupoffer.profile-sitegroupoffers', 'sitegroupreview.profile-sitegroupreviews', 'sitegroupdocument.profile-sitegroupdocuments', 'sitegroupform.sitegroup-viewform','sitegroup.info-sitegroup', 'seaocore.feed', 'activity.feed','sitegroup.location-sitegroup', 'core.profile-links', 'sitegroupmusic.profile-sitegroupmusic', 'sitegroupintegration.profile-items','sitegrouptwitter.feeds-sitegrouptwitter', 'sitegroupmember.profile-sitegroupmembers', 'advancedactivity.home-feeds', 'siteevent-contenttype-events', 'sitevideo-contenttype-videos')\");\n $groupAdminresult = $groupAdminContentTable->fetchAll($selectGroupAdmin);\n $contentWigentLinks = array();\n if (!empty($groupAdminresult)) {\n foreach ($groupAdminresult as $key => $value) {\n if (isset($value->params['resource_type'])) {\n $resource_type = $value->params['resource_type'];\n\n if (Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitegroupintegration') && strstr($resource_type, 'sitereview_listing') && !empty($resource_type)) {\n $pieces = explode(\"_\", $resource_type);\n $listingTypeId = $pieces[2];\n $count = Engine_Api::_()->getDbtable('contents', 'sitegroupintegration')->getCountResults('sitereview_listing', $listingTypeId);\n if ($count == 0)\n continue;\n }\n }\n $content = $this->getContentName($value->name, $value->params['title'], $resource_type);\n if (!empty($content)) {\n $contentWigentLinks[$key]['content_id'] = $value->content_id;\n $contentWigentLinks[$key]['content_name'] = $content[0];\n $contentWigentLinks[$key]['content_class'] = $content[1];\n if (isset($content[2]))\n $contentWigentLinks[$key]['content_resource'] = $content[2];\n }\n }\n\n $this->view->contentWigentLinks = $contentWigentLinks;\n }\n } else {\n $row = Engine_Api::_()->getDbtable('contentgroups', 'sitegroup')->getContentGroupId($group_id);\n if (!empty($row)) {\n $contentgroup_id = $row->contentgroup_id;\n $groupAdminresult = Engine_Api::_()->getDbtable('content', 'sitegroup')->getContents($contentgroup_id);\n } else {\n $contentgroup_id = Engine_Api::_()->sitegroup()->getWidgetizedGroup()->page_id;\n $groupAdminresult = Engine_Api::_()->getDbtable('admincontent', 'sitegroup')->getContents($contentgroup_id);\n }\n\n\n $contentWigentLinks = array();\n if (!empty($groupAdminresult)) {\n foreach ($groupAdminresult as $key => $value) {\n if (isset($value->params['resource_type'])) {\n $resource_type = $value->params['resource_type'];\n if (Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitegroupintegration') && strstr($resource_type, 'sitereview_listing') && !empty($resource_type)) {\n $pieces = explode(\"_\", $resource_type);\n $listingTypeId = $pieces[2];\n $count = Engine_Api::_()->getDbtable('contents', 'sitegroupintegration')->getCountResults('sitereview_listing', $listingTypeId);\n if ($count == 0)\n continue;\n }\n }\n $content = $this->getContentName($value->name, $value->params['title'], $resource_type);\n if (!empty($content)) {\n if (isset($value->content_id)) {\n $contentWigentLinks[$key]['content_id'] = $value->content_id;\n } else {\n $contentWigentLinks[$key]['content_id'] = $value->admincontent_id;\n }\n\n $contentWigentLinks[$key]['content_name'] = $content[0];\n $contentWigentLinks[$key]['content_class'] = $content[1];\n if (isset($content[2]))\n $contentWigentLinks[$key]['content_resource'] = $content[2];\n }\n }\n $this->view->contentWigentLinks = $contentWigentLinks;\n }\n }\n }", "function buildPopup(){\t\t\n\t\t$html = '';\n\t\t$html .= JDom::_('html.fly.bootstrap.modal', array(\n\t\t\t\t'domId' => 'fset_modal_form',\n\t\t\t\t'domClass' => 'popupform formFieldsContainer',\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'data-backdrop'=> 'static'\n\t\t\t\t\t),\n\t\t\t\t'title' => JText::_(\"JACTION_EDIT\")\n\t\t\t));\n\t\t\n\t\treturn $html;\n\t}" ]
[ "0.6723676", "0.64861923", "0.6319084", "0.6128063", "0.61273724", "0.6080793", "0.59977853", "0.5755861", "0.57258224", "0.56997746", "0.5687457", "0.5664227", "0.5656377", "0.5650595", "0.5648252", "0.5640764", "0.56347835", "0.56125414", "0.55917865", "0.5569221", "0.556492", "0.5557425", "0.5552808", "0.55498207", "0.5545803", "0.554246", "0.55220056", "0.5514304", "0.547351", "0.5470311", "0.54696363", "0.54615474", "0.54512495", "0.54406357", "0.54406357", "0.54322284", "0.5391274", "0.5387476", "0.5384238", "0.538119", "0.53677046", "0.5366737", "0.53660876", "0.5360334", "0.5357211", "0.5343125", "0.5340461", "0.5338159", "0.53369594", "0.53306043", "0.53283924", "0.53203326", "0.5317652", "0.5316105", "0.5311097", "0.53073627", "0.5306311", "0.53054327", "0.5304592", "0.5294314", "0.5286126", "0.5285098", "0.5277628", "0.5275435", "0.52723086", "0.52666", "0.52476674", "0.5238717", "0.5216135", "0.5211351", "0.5209971", "0.52094483", "0.5208123", "0.52075607", "0.52072746", "0.5197443", "0.51948225", "0.51933163", "0.5187931", "0.5186182", "0.51793385", "0.5179015", "0.5174329", "0.51729643", "0.51624423", "0.51550823", "0.5146085", "0.513965", "0.51373184", "0.51314414", "0.5129116", "0.512439", "0.5123346", "0.5120976", "0.51205224", "0.51197296", "0.510765", "0.5096552", "0.5093754", "0.5092903" ]
0.6543845
1
Used to get listings based off of a location on the page. Example: 'grid' will return all listings on the grouping page grid (aka subcategories)
public function getListings($location) { $stmt = NULL; $results = NULL; switch ($location) { case 'grid': $sql = "SELECT t.pagetype AS type, c.id AS id, n.nickname AS nickname, IF(COUNT(c.id) > 0, TRUE, FALSE) AS validity, c.name AS name, u.url AS short_url, t.template_secure AS secure, c.slug AS slug, t.template_filename AS filename, c.id AS canonical, c.page_title AS title, c.meta_description AS meta_description, c.meta_keywords AS meta_keywords, c.page_heading AS heading, t.allow_target AS allow_target, t.requires_login AS requires_login, t.disallow_guests AS disallow_guests, c.sitemap_show AS visibility, c.sitemap_page_priority AS priority, c.sitemap_page_change_frequency AS change_frequency, c.* FROM bs_subcategories c JOIN bs_pagetypes t LEFT JOIN bs_page_urls u ON (u.id = c.canonical_page_url AND u.pagetype = t.pagetype AND u.pageid = c.id) LEFT JOIN bs_groupings grp ON (grp.id = c.grouping_id) LEFT JOIN bs_categories cat ON (cat.id = grp.category_id) LEFT JOIN bs_page_nicknames n ON (t.pagetype = n.pagetype AND c.id = n.pageid) WHERE cat.active = TRUE AND grp.active = TRUE AND c.active = TRUE AND grp.id = ? AND t.pagetype = 'subcategory' GROUP BY c.id ORDER BY c.position ASC, c.name ASC"; break; case 'sidebar': $sql = "SELECT t.pagetype AS type, c.id AS id, n.nickname AS nickname, IF(COUNT(c.id) > 0, TRUE, FALSE) AS validity, c.name AS name, u.url AS short_url, t.template_secure AS secure, c.slug AS slug, t.template_filename AS filename, c.id AS canonical, c.page_title AS title, c.meta_description AS meta_description, c.meta_keywords AS meta_keywords, c.page_heading AS heading, t.allow_target AS allow_target, t.requires_login AS requires_login, t.disallow_guests AS disallow_guests, c.sitemap_show AS visibility, c.sitemap_page_priority AS priority, c.sitemap_page_change_frequency AS change_frequency, grp.accessory FROM bs_subcategories c JOIN bs_pagetypes t LEFT JOIN bs_page_urls u ON (u.id = c.canonical_page_url AND u.pagetype = t.pagetype AND u.pageid = c.id) LEFT JOIN bs_groupings grp ON (grp.id = c.grouping_id) LEFT JOIN bs_categories cat ON (cat.id = grp.category_id) LEFT JOIN bs_page_nicknames n ON (t.pagetype = n.pagetype AND c.id = n.pageid) WHERE cat.active = TRUE AND grp.active = TRUE AND c.active = TRUE AND grp.id = ? AND t.pagetype = 'subcategory' GROUP BY c.id ORDER BY c.name ASC"; break; } $stmt = Connection::getHandle()->prepare($sql); if( $stmt->execute(array ($this->getId())) ) { while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) { $results[] = $row; } } return $results; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getListByLocation()\r\n {\r\n\t\tif (defined(\"WITH_SPHINX_TAGS\") && WITH_SPHINX_TAGS)\r\n\t\t{\r\n\t\t\t//$this->addFilter(\"entity_type\", 6, true); // exclude events from tag cloud\r\n $this->addFilter(\"entity_type\", 2); // get tags for groups Only\r\n\t\t\treturn parent::getList(\"name\", \"@count\");\r\n\t\t} else {\r\n\t\t\techo 3;exit;\r\n\t\t\tif ( $this->getGroupId() !== null ) {\r\n\t\t\t\t$this->addWhere('group_id = ?', $this->getGroupId());\r\n\t\t\t}\r\n\t\t\t$where = $this->getWhere();\r\n\t\t\tif ($where) $where = 'where '.$where;\r\n\t\t\t$fields = array();\r\n\t\t\tif ( $this->isAsAssoc() ) {\r\n\t\t\t\t$fields[] = ( $this->getAssocKey() === null ) ? 'name' : $this->getAssocKey();\r\n\t\t\t\t$fields[] = ( $this->getAssocValue() === null ) ? 'rating' : $this->getAssocValue();\r\n\t\t\t} else {\r\n\t\t\t\t$fields[] = 'id';\r\n\t\t\t}\r\n\t\t\t$fields = implode(', ', $fields);\r\n\t\t\t$limit = \"\";\r\n\t\t\tif ( $this->getCurrentPage() !== null && $this->getListSize() !== null ) {\r\n\t\t\t\t$limit = \"LIMIT \".(($this->getCurrentPage()-1) * $this->getListSize()) .\", \". $this->getListSize();\r\n\t\t\t}\r\n\t\t\t$order = \"\";\r\n\t\t\tif ( $this->getOrder() !== null ) {\r\n\t\t\t\t$order = \"ORDER BY \".$this->getOrder();\r\n\t\t\t}\r\n\r\n\t\t\t$query = \"SELECT distinct {$fields} FROM (\r\n\t#get groups tags\r\n\tSELECT {$fields} FROM view_tags__dictionary\r\n\tWHERE id\r\n\t\t IN (\r\n\t\t\t\t SELECT tag_id FROM zanby_tags__relations\r\n\t\t\t\t WHERE entity_type_id = 2 AND entity_id\r\n\t\t\t\t IN (\r\n\t\t\t\t\t\t\t SELECT group_id FROM `view_groups__locations` $where\r\n\t\t\t\t\t)\r\n\t\t\t)\r\n\tUNION\r\n\t#get documents tags\r\n\tSELECT {$fields} FROM view_tags__dictionary\r\n\tWHERE id\r\n\t\t IN (\r\n\t\t\t\t SELECT tag_id FROM zanby_tags__relations\r\n\t\t\t\t WHERE entity_type_id = 5 AND entity_id\r\n\t\t\t\t IN (\r\n\t\t\t\t\t SELECT id FROM zanby_documents__items\r\n\t\t\t\t\t WHERE owner_type = 'group' AND owner_id\r\n\t\t\t\t\t IN (\r\n\t\t\t\t\t\t\t SELECT group_id FROM `view_groups__locations` $where\r\n\t\t\t\t\t\t )\r\n\t\t\t\t\t)\r\n\t\t\t )\r\n\tUNION\r\n\t#get members tags\r\n\tSELECT {$fields} FROM view_tags__dictionary\r\n\tWHERE id\r\n\t\t IN (\r\n\t\t\t\t SELECT tag_id FROM zanby_tags__relations\r\n\t\t\t\t WHERE entity_type_id = 1 AND entity_id\r\n\t\t\t\t IN (\r\n\t\t\t\t\t SELECT user_id FROM zanby_groups__members\r\n\t\t\t\t\t WHERE group_id\r\n\t\t\t\t\t IN (\r\n\t\t\t\t\t\t\t SELECT group_id FROM `view_groups__locations` $where\r\n\t\t\t\t\t\t )\r\n\t\t\t\t\t)\r\n\t\t\t)\r\n\tUNION\r\n\t#get events tags\r\n\tSELECT {$fields} FROM view_tags__dictionary\r\n\tWHERE id\r\n\t\t IN (\r\n\t\t\t\t SELECT tag_id FROM zanby_tags__relations\r\n\t\t\t\t WHERE entity_type_id = 6 AND entity_id\r\n\t\t\t\t IN (\r\n\t\t\t\t\t\tSELECT id FROM zanby_event__items\r\n\t\t\t\t\t\tWHERE owner_type = 'group' AND owner_id\r\n\t\t\t\t\t\tIN (\r\n\t\t\t\t\t\t\t SELECT group_id FROM `view_groups__locations` $where\r\n\t\t\t\t\t\t )\r\n\t\t\t\t\t)\r\n\t\t\t )\r\n\tUNION\r\n\t#get photos tags\r\n\tSELECT {$fields} FROM view_tags__dictionary\r\n\tWHERE id\r\n\tIN (\r\n\t\t SELECT tag_id FROM zanby_tags__relations\r\n\t\t WHERE entity_type_id = 4 AND entity_id\r\n\t\t\t\t IN (\r\n\t\t\t\t\t SELECT id from zanby_galleries__photos\r\n\t\t\t\t\t WHERE gallery_id\r\n\t\t\t\t\t IN (\r\n\t\t\t\t\t\t\t SELECT id FROM zanby_galleries__items\r\n\t\t\t\t\t\t\t WHERE owner_type = 'group' AND owner_id\r\n\t\t\t\t\t\t\t IN (\r\n\t\t\t\t\t\t\t\t\tSELECT group_id FROM `view_groups__locations` $where\r\n\t\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)\r\n\tUNION\r\n\t#get lists tags\r\n\tSELECT {$fields} FROM view_tags__dictionary\r\n\tWHERE id\r\n\t\t IN (\r\n\t\t\t\t SELECT tag_id FROM zanby_tags__relations\r\n\t\t\t\t WHERE entity_type_id = 20 AND entity_id\r\n\t\t\t\t IN (\r\n\t\t\t\t\t\tSELECT id FROM zanby_lists__items\r\n\t\t\t\t\t\tWHERE owner_type = 'group' AND owner_id\r\n\t\t\t\t\t\tIN (\r\n\t\t\t\t\t\t\t SELECT group_id FROM `view_groups__locations` $where\r\n\t\t\t\t\t\t )\r\n\t\t\t\t\t)\r\n\t\t\t )\r\n\tUNION\r\n\t#get lists items tags\r\n\tSELECT {$fields} FROM view_tags__dictionary\r\n\tWHERE id\r\n\tIN (\r\n\t\t SELECT tag_id FROM zanby_tags__relations\r\n\t\t WHERE entity_type_id = 21 AND entity_id\r\n\t\t\t\t IN (\r\n\t\t\t\t\t SELECT id from zanby_lists__records\r\n\t\t\t\t\t WHERE list_id\r\n\t\t\t\t\t IN (\r\n\t\t\t\t\t\t\t SELECT id FROM zanby_lists__items\r\n\t\t\t\t\t\t\t WHERE owner_type = 'group' AND owner_id\r\n\t\t\t\t\t\t\t IN (\r\n\t\t\t\t\t\t\t\t\tSELECT group_id FROM `view_groups__locations` $where\r\n\t\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)\r\n\t)\r\n\tAS result {$order} {$limit}\";\r\n\r\n\t\t\t$items = $this->getTagListFromSQL($query);\r\n\t\t}\r\n return $items;\r\n }", "function _syndicated_content_listings_page()\n{\n}", "public function getLocations()\n\t\t{\n\t\t\t$this->layout = \"index\";\n\t\t\t$this->set('title', 'Location (Linnworks API)');\n\t\t}", "public function getListings($pageSize = 250, $pageNum = 1, $filter = NULL, $displayAmenities = FALSE) {\n if (empty($filter)) {\n // Default filter which should return all listings.\n $filter = SimpleViewFilter::filterAllListings();\n }\n\n $response = $this->getData('getListings', [\n $pageSize,\n $pageNum,\n $filter,\n $displayAmenities,\n ]);\n if (!empty($response['DATA'])) {\n foreach ($response['DATA'] as &$listing) {\n $listing = $this->parseListing($listing);\n }\n }\n\n return $response;\n }", "public static function location_listing($location_id,$limit = 15)\n {\n \n \n\n $query = \"SELECT id, category_id,created_by, title,description, url, featured_image, create_time,primary_phone,primary_email,\n\n (SELECT name FROM 9jb_locations WHERE 9jb_listings.city = 9jb_locations.id) AS city_name,\n (SELECT fa_icon FROM 9jb_categories WHERE 9jb_listings.category_id = 9jb_categories.id) AS icon,\n (SELECT color FROM 9jb_categories WHERE 9jb_listings.category_id = 9jb_categories.id) AS color,\n (SELECT title FROM 9jb_categories WHERE 9jb_listings.category_id = 9jb_categories.id) AS category_name,\n (SELECT name FROM 9jb_locations WHERE 9jb_listings.state = 9jb_locations.id) AS state_name,\n (SELECT count(*) FROM 9jb_reviews WHERE 9jb_reviews.listing_id = 9jb_listings.id) AS reviews\n\n FROM 9jb_listings\n WHERE (city = ? or state = ?) AND status='activated'\n ORDER BY create_time DESC LIMIT $limit \";\n\n return \\DB::select($query,[$location_id,$location_id]) ;\n }", "public function listing();", "public function my_listings(Request $request, Listing $listing = null)\n {\n // 'Private Seller 11', 'Financial Institution 39', 'Bank Liaison 3', 'Asset Manager 24', 'Consumer Direct 36'\n\n $listings = Listing::query()\n ->whereHas(\n 'users',\n fn ($builder) => $builder->where('user_id', auth()->user()->id)\n ->whereIn('group_id', [11, 39, 3, 24, 36])\n )\n ->when($request['sort_by'] && $request['sort_dir'], fn ($query) => $query->orderBy($request['sort_by'], $request['sort_dir']))\n ->get();\n\n if($listing)\n return view('frontend.dashboard.listings-stats', compact('listings', 'listing'));\n else\n return view('frontend.dashboard.my-listings', compact('listings'));\n }", "public function byLocationsAction() {\n if (Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('group')) {\n $this->view->navigation = $navigation = Engine_Api::_()->getApi('menus', 'core')->getNavigation('group_main', array(), 'sitetagcheckin_main_grouplocation');\n $this->_helper->content->setEnabled();\n } elseif (Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('advgroup')) {\n $this->view->navigation = $navigation = Engine_Api::_()->getApi('menus', 'core')->getNavigation('advgroup_main', array(), 'sitetagcheckin_main_groupbylocation');\n $this->_helper->content->setEnabled();\n } else {\n return $this->_forward('notfound', 'error', 'core');\n }\n }", "public function listings(Request $request) {\n return redirect(route('home'));\n foreach($request->only(['lat', 'lng', 'bounds', 'location']) as $k => $v) {\n session([$k => $v]);\n }\n\n $data = $this->getListingData($request);\n if($request->get('ajax')) {\n return response()->json($data);\n }\n MetaTag::set('title', __(\"Browse listings\"));\n $reflFunc = new \\ReflectionFunction('active');\n $finder = $reflFunc->getFileName() . ':' .$reflFunc->getStartLine();\n //$data['finder'] = $finder;\n return view('scan.index', $data);\n }", "public function listLocations(Request $request)\n {\n// $docs = TourLocation::orderBy('id', 'DESC');\n// $docs = $docs->paginate($limit);\n// $total = $docs->total();\n// $data = [\n// 'docs' => TourLocationResource::collection($docs),\n// 'total' => $total,\n// ];\n// return $this->jsonApi(ResponseStatusCode::OK, __('flash.list_tour_location'), $data);\n }", "function locationsAction() {\n\t $this->_helper->layout->disableLayout();\n\t $this->_helper->viewRenderer->setNoRender(TRUE);\n\t $conn = Doctrine_Manager::connection(); \n \t$session = SessionWrapper::getInstance();\n \t$formvalues = $this->_getAllParams();\n \t// debugMessage($formvalues);\n \t// debugMessage($this->_getAllParams());\n \t\n \t \t$feed = '';\n \t$hasall = true;\n \t$issearch = false;\n \t$iscount = false;\n \t$ispaged = false;\n \t$where_query = \" \";\n \t$type_query = \" \";\n \t$group_query = \" GROUP BY l.id \";\n \t$limit_query = \"\";\n \t$select_query = \" l.id, l.name as `Location`, l.locationtype as `Type`,\n \t\tCASE `locationtype` \n \t\t\tWHEN '1' THEN 'Region' \n \t\t\tWHEN '2' THEN 'District' \n \t\t\tWHEN '3' THEN 'County' \n \t\t\tWHEN '4' THEN 'SubCounty' \n \t\t\tWHEN '5' THEN 'Parish' \n \t\t\tWHEN '6' THEN 'Village' \n \t\tEND AS `TypeName` \";\n \t$join_query = \"\";\n \t\n \tif(isArrayKeyAnEmptyString('filter', $formvalues)){\n \t\techo \"NO_FILTER_SPECIFIED\";\n \t\texit();\n \t}\n \t\n \t$isregion = false; $isdistrict = false; $iscounty = false; $issubcounty = false; $isparish = false; $isvillage = false;\n \t$loc_type = '';\n \t# fetch commodities filtered by categoryid\n \tif($formvalues['filter'] == 'type'){\n \t\tswitch ($this->_getParam('category')) {\n \t\t\tcase 'region':\n \t\t\tcase 1:\n \t\t\t\t$where_query .= \" AND l.locationtype = 1 \";\n\t \t\t\t$type_query .= \" \";\n\t \t\t\t$isregion = true;\n \t\t\t\tbreak;\n \t\t\tcase 'district':\n \t\t\tcase 2:\n \t\t\t\t$where_query .= \" AND l.locationtype = 2 \";\n\t \t\t\t$type_query .= \" \";\n\t \t\t\t$isdistrict = true;\n\t\t\t \tif(!isArrayKeyAnEmptyString('regionid', $formvalues) || !isArrayKeyAnEmptyString('region', $formvalues)){\n\t\t\t \t\t\t$region = new Region();\n\t\t\t \t\t\tif(!isArrayKeyAnEmptyString('regionid', $formvalues)){\n\t\t\t\t \t\t$region->populate($formvalues['regionid']);\n\t\t\t\t \t\t// debugMessage(region->toArray());\n\t\t\t\t \t\tif(isEmptyString($region->getID()) || !is_numeric($formvalues['regionid'])){\n\t\t\t\t \t\t\techo \"REGION_INVALID\";\n\t\t\t\t \t\t\texit();\n\t\t\t\t \t\t}\n\t\t\t\t \t\t$regid = $formvalues['regionid'];\n\t\t\t \t\t\t}\n\t\t\t \t\tif(!isEmptyString($this->_getParam('region'))){\n\t\t\t \t\t\t\t$regid = $region->findByName($formvalues['region'], 1);\n\t\t\t \t\t\tif(isEmptyString($regid)){\n\t\t\t\t \t\t\techo \"REGION_INVALID\";\n\t\t\t\t \t\t\texit();\n\t\t\t\t \t\t}\n\t\t\t \t\t\t}\n\t\t\t \t\t$where_query .= \" AND l.regionid = '\".$regid.\"' \";\n\t\t\t \t}\n \t\t\t\tbreak;\n \t\t\tcase 'county':\n \t\t\tcase 3:\n \t\t\t\t$where_query .= \" AND l.locationtype = 3 \";\n\t \t\t\t$type_query .= \" \";\n\t \t\t\t$iscounty = true;\n\t\t\t \tif(!isArrayKeyAnEmptyString('districtid', $formvalues) || !isArrayKeyAnEmptyString('district', $formvalues)){\n\t\t\t \t\t\t$district = new District();\n\t\t\t \t\t\tif(!isArrayKeyAnEmptyString('districtid', $formvalues)){\n\t\t\t\t \t\t$district->populate($formvalues['districtid']);\n\t\t\t\t \t\t// debugMessage($market->toArray());\n\t\t\t\t \t\tif(isEmptyString($district->getID()) || !is_numeric($formvalues['districtid'])){\n\t\t\t\t \t\t\techo \"DISTRICT_INVALID\";\n\t\t\t\t \t\t\texit();\n\t\t\t\t \t\t}\n\t\t\t\t \t\t$distid = $formvalues['districtid'];\n\t\t\t \t\t\t}\n\t\t\t \t\t\tif(!isArrayKeyAnEmptyString('district', $formvalues)){\n\t\t\t \t\t\t\t$distid = $district->findByName($formvalues['district'], 2);\n\t\t\t \t\t\tif(isEmptyString($distid)){\n\t\t\t\t \t\t\techo \"DISTRICT_INVALID\";\n\t\t\t\t \t\t\texit();\n\t\t\t\t \t\t}\n\t\t\t \t\t\t}\n\t\t\t \t\t$where_query .= \" AND l.districtid = '\".$distid.\"' \";\n\t\t\t \t}\n \t\t\t\tbreak;\n \t\t\tcase 'subcountry':\n \t\t\tcase 2:\n \t\t\t\t$where_query .= \" AND l.locationtype = 4 \";\n\t \t\t\t$type_query .= \" \";\n\t \t\t\t$issubcounty = true;\n \t\t\t\tbreak;\n \t\t\tcase 'parish':\n \t\t\tcase 2:\n \t\t\t\t$where_query .= \" AND l.locationtype = 5 \";\n\t \t\t\t$type_query .= \" \";\n\t \t\t\t$isparish = true;\n \t\t\t\tbreak;\n \t\t\tcase 'village':\n \t\t\tcase 2:\n \t\t\t\t$where_query .= \" AND l.locationtype = 6 \";\n\t \t\t\t$type_query .= \" \";\n\t \t\t\t$isvillage = true;\n \t\t\t\tbreak;\n \t\t\tdefault:\n \t\t\t\tbreak;\n \t\t}\n \t}\n \t\n \t// when fetching total results\n \tif(!isEmptyString($this->_getParam('fetch')) && $this->_getParam('fetch') == 'total'){\n \t\t$select_query = \" count(l.id) as records \";\n \t\t$group_query = \"\";\n \t\t$iscount = true;\n \t}\n \t\n \t// when fetching limited results via pagination \n \tif(!isEmptyString($this->_getParam('paged')) && $this->_getParam('paged') == 'Y'){\n \t\t$ispaged = true;\n \t\t$hasall = false;\n \t\t$start = $this->_getParam('start');\n \t\t$limit = $this->_getParam('limit');\n \t\tif(isEmptyString($start)){\n \t\t\techo \"RANGE_START_NULL\";\n\t \t\texit();\n \t\t}\n \t\tif(!is_numeric($limit)){\n \t\t\techo \"INVALID_RANGE_START\";\n\t \t\texit();\n \t\t}\n \t\tif(isEmptyString($start)){\n \t\t\techo \"RANGE_LIMIT_NULL\";\n\t \t\texit();\n \t\t}\n \t\tif(!is_numeric($limit)){\n \t\t\techo \"INVALID_RANGE_LIMIT\";\n\t \t\texit();\n \t\t}\n \t\t$limit_query = \" limit \".$start.\",\".$limit.\" \";\n \t}\n \t\n \t// \n \t$com_query = \"SELECT \".$select_query.\" FROM location l WHERE l.name <> '' \".$type_query.$where_query.\" \n \t\".$group_query.\" ORDER BY l.name ASC \".$limit_query;\n \tdebugMessage($com_query);\n \t\n \t$result = $conn->fetchAll($com_query);\n \t$comcount = count($result);\n \t// debugMessage($result); // exit();\n \t\n \tif($comcount == 0){\n \t\techo \"RESULT_NULL\";\n \t\texit();\n \t} else {\n \t\tif($iscount){\n \t\t\t$feed .= '<item>';\n\t \t\t$feed .= '<total>'.$result[0]['records'].'</total>';\n\t\t\t $feed .= '</item>';\n \t\t}\n \t\tif(!$iscount){\n\t \t\tforeach ($result as $line){\n\t\t\t \t$feed .= '<item>';\n\t\t \t\t$feed .= '<id>'.$line['id'].'</id>';\n\t\t \t\t$feed .= '<name>'.$line['Location'].'</name>';\n\t\t \t\t$feed .= '<type>'.$line['Type'].'</type>';\n\t\t\t \t$feed .= '<typename>'.$line['TypeName'].'</typename>';\n\t\t\t\t $feed .= '</item>';\n\t\t \t}\n \t\t}\n \t}\n \t\n \t# output the xml returned\n \tif(isEmptyString($feed)){\n \t\techo \"EXCEPTION_ERROR\";\n \t\texit();\n \t} else {\n \t\techo '<?xml version=\"1.0\" encoding=\"UTF-8\"?><items>'.$feed.'</items>';\n \t}\n }", "public function getList($page);", "public function locations($params)\r\n {\r\n \t$_query = array('page' => isset($params['page']) ? $params['page'] : 1);\r\n\r\n return $this->curl_execute($method = 'locations', $_query);\r\n }", "public function findAllWithLocations()\n {\n $query = $this->createQuery();\n $fieldName = ((bool)ConfigurationUtility::getExtensionConfiguration()['enableFilterCategories']) ? 'filter_categories' : 'categories';\n $query->statement('\n SELECT DISTINCT\n sys_category.*\n FROM\n sys_category\n JOIN\n sys_category_record_mm\n ON sys_category_record_mm.uid_local = sys_category.uid\n WHERE\n sys_category_record_mm.tablenames = \"tx_locationmanager_domain_model_location\" AND\n sys_category_record_mm.fieldname = \"' . $fieldName . '\"\n GROUP BY\n sys_category.uid\n ');\n return $query->execute();\n }", "public function getLocations()\n {\n $conds = new CondsList();\n $conds->subjoin(new Param('post_type', '==', 'post'));\n $conds->subjoin(new Param('post_type', '==', 'page'));\n\n return $conds->toArray();\n }", "public function client_listings(Request $request, Listing $listing = null)\n {\n // 'Real Estate Agent', 'Listing Agent', 'RH Agent', 'Co-broke'\n\n $listings = Listing::query()\n ->whereHas(\n 'users',\n fn ($builder) => $builder->where('user_id', auth()->user()->id)\n ->whereIn('group_id', [6, 10, 38, 37])\n )\n ->when($request['sort_by'] && $request['sort_dir'], fn ($query) => $query->orderBy($request['sort_by'], $request['sort_dir']))\n ->get();\n\n if($listing)\n return view('frontend.dashboard.listings-stats', compact('listings', 'listing'));\n else\n return view('frontend.dashboard.client-listings', compact('listings'));\n\n }", "function permission_group_list($category, $offset, $limit, $phrase)\n\t{\n\t\tlog_message('debug', '_setting/permission_group_list');\n\t\tlog_message('debug', '_setting/permission_group_list:: [1] category='.$category.' offset='.$offset.' limit='.$limit.' phrase='.$phrase);\n\n\t\t$values['phrase_condition'] = !empty($phrase)? \" AND G.name LIKE '%\".htmlentities($phrase, ENT_QUOTES).\"%'\": '';\n\t\t$values['category_condition'] = $category != 'all'? \" AND G.group_category ='\".$category.\"' \": \"\";\n\t\t$values['limit_text'] = \" LIMIT \".$offset.\",\".$limit.\" \";\n\n\t\t$result = server_curl(IAM_SERVER_URL, array('__action'=>'get_list', 'query'=>'get_permission_group_list', 'variables'=>$values));\n\t\tlog_message('debug', '_setting/permission_group_list:: [2] result='.json_encode($result));\n\n\t\treturn $result;\n\t}", "public function getPageFolders();", "public function byLocation(string $location);", "public function travelListing() {\n\t\t$pageTitle = 'Travel Listing';\n\t\t$this->viewBuilder()->setLayout('homelayout');\n\t\t$this->loadModel('Travels');\n\n\t\t$travels = $this->Travels->find()->where(['Travels.published' => 1])->order(['Travels.created' => 'DESC'])->limit(3)->all();\n\n\t\t$this->set(compact('pageTitle', 'travels'));\n\t}", "function render_locations($locations = null) {\n $html = '';\n\n // If no locations specified, get all locations in alphabetical order.\n if ($locations == null) {\n $location_ids = get_posts(array(\n 'post_type' => 'location',\n 'post_status' => 'publish',\n 'orderby' => 'title',\n 'order' => 'ASC',\n 'posts_per_page' => -1,\n 'fields' => 'ids',\n ));\n\n foreach($location_ids as $loc) {\n $html .= get_location_card($loc);\n }\n\n echo $html;\n } else {\n foreach($locations as $loc) {\n $html .= get_location_card($loc['id'], $loc['distance']);\n }\n\n echo $html;\n }\n\n return;\n}", "public function load_pagination_listings() {\n\t\t// Validate nonce\n\t\tforminator_validate_ajax( \"forminator_popup_pagination_listings\" );\n\n\t\t$html = forminator_template( 'settings/popup/edit-pagination-listings-content' );\n\n\t\twp_send_json_success( $html );\n\t}", "function field_group_location_list($field_group){\n \n if(!acf_maybe_get($field_group, 'location'))\n return $field_group;\n \n foreach($field_group['location'] as &$or){\n \n foreach($or as &$and){\n \n if(!isset($and['value']))\n continue;\n \n // Post Type List\n if($and['param'] === 'post_type' && acfe_ends_with($and['value'], '_archive')){\n \n $and['param'] = 'post_type_list';\n $and['value'] = substr_replace($and['value'], '', -8);\n \n }\n \n // Taxonomy List\n elseif($and['param'] === 'taxonomy' && acfe_ends_with($and['value'], '_archive')){\n \n $and['param'] = 'taxonomy_list';\n $and['value'] = substr_replace($and['value'], '', -8);\n \n }\n \n }\n \n }\n \n return $field_group;\n \n }", "public function findAllLocations(WP_REST_Request $request)\n {\n\n $args = [\n 'post_type' => 'session',\n 'status' => 'publish',\n 'posts_per_page' => -1,\n ];\n\n $query = new WP_Query($args);\n\n // one-liner to map the session object to an array of unique locations.\n // This needs to be revisited to see if WP_Query support getting this information\n // without having to iterate over every session post type.\n return array_values(\n array_unique(\n array_map(\n function (WP_Post $post): array {\n $session = new Session($post);\n $shortName = $session->getVenueShortname();\n $room = $session->getRoom();\n return [\n 'import_id' => str_replace([' ', '{', '}', '(', ')', '/', '\\\\', '@', ':'], '_', \"$shortName.$room\"),\n 'name' => \"$room, $shortName\",\n 'location_type' => 2\n ];\n },\n $query->get_posts()\n ),\n SORT_REGULAR)\n );\n\n }", "public function get_listing($path='', $page = '') {\n if (empty($path)) {\n $path = $this->build_node_path('root', get_string('pluginname', 'repository_googledrive'));\n }\n\n // We analyse the path to extract what to browse.\n $trail = explode('/', $path);\n $uri = array_pop($trail);\n list($id, $name) = $this->explode_node_path($uri);\n\n // Handle the special keyword 'search', which we defined in self::search() so that\n // we could set up a breadcrumb in the search results. In any other case ID would be\n // 'root' which is a special keyword set up by Google, or a parent (folder) ID.\n if ($id === 'search') {\n return $this->search($name);\n }\n\n // Query the Drive.\n $q = \"'\" . str_replace(\"'\", \"\\'\", $id) . \"' in parents\";\n $q .= ' AND trashed = false';\n $results = $this->query($q, $path);\n\n $ret = array();\n $ret['dynload'] = true;\n $ret['path'] = $this->build_breadcrumb($path);\n $ret['list'] = $results;\n return $ret;\n }", "public abstract function get_url_list($page_num, $object_subtype = '');", "function block_core_navigation_get_menu_items_at_location($location)\n {\n }", "function listing_location_taxonomy() {\n\n\t\t$name = __( 'Locations', 'wp_listings' );\n\t\t$singular_name = __( 'Location', 'wp_listings' );\n\n\t\treturn array(\n\t\t\t'locations' => array(\n\t\t\t\t'labels' => array(\n\t\t\t\t\t'name'\t\t\t\t\t=> strip_tags( $name ),\n\t\t\t\t\t'singular_name' \t\t=> strip_tags( $singular_name ),\n\t\t\t\t\t'menu_name'\t\t\t\t=> strip_tags( $name ),\n\n\t\t\t\t\t'search_items'\t\t\t=> sprintf( __( 'Search %s', 'wp_listings' ), strip_tags( $name ) ),\n\t\t\t\t\t'popular_items'\t\t\t=> sprintf( __( 'Popular %s', 'wp_listings' ), strip_tags( $name ) ),\n\t\t\t\t\t'all_items'\t\t\t\t=> sprintf( __( 'All %s', 'wp_listings' ), strip_tags( $name ) ),\n\t\t\t\t\t'edit_item'\t\t\t\t=> sprintf( __( 'Edit %s', 'wp_listings' ), strip_tags( $singular_name ) ),\n\t\t\t\t\t'update_item'\t\t\t=> sprintf( __( 'Update %s', 'wp_listings' ), strip_tags( $singular_name ) ),\n\t\t\t\t\t'add_new_item'\t\t\t=> sprintf( __( 'Add New %s', 'wp_listings' ), strip_tags( $singular_name ) ),\n\t\t\t\t\t'new_item_name'\t\t\t=> sprintf( __( 'New %s Name', 'wp_listings' ), strip_tags( $singular_name ) ),\n\t\t\t\t\t'add_or_remove_items'\t=> sprintf( __( 'Add or Remove %s', 'wp_listings' ), strip_tags( $name ) ),\n\t\t\t\t\t'choose_from_most_used'\t=> sprintf( __( 'Choose from the most used %s', 'wp_listings' ), strip_tags( $name ) )\n\t\t\t\t),\n\t\t\t\t'hierarchical' => true,\n\t\t\t\t'rewrite' => array( __( 'locations', 'wp_listings' ), 'with_front' => false ),\n\t\t\t\t'editable' => 0\n\t\t\t)\n\t\t);\n\n\t}", "public static function allListings()\n {\n $listings = Listing::all();\n return $listings;\n }", "public function index(Request $request)\n {\n $draw = $request->post('draw', 1);\n\n $columns = array(\n 'Location', \n 'Shore'\n );\n \n $start = $request->post('start', 0);\n $length = $request->post('length', Location::$limit);\n \n $page = $start / $length + 1;\n \n $additionalInput = array('page' => $page);\n $request->merge($additionalInput);\n \n $predicates = array();\n\n $records = Location::getWithPredicates($predicates, $page);\n \n $resourceCollection = new LocationResourceCollection($records);\n\n $resourceCollection->additional([\n 'draw' => $draw,\n 'columns' => $columns\n ]);\n \n return $resourceCollection; \n }", "function SearchWorkshopPlace($where,$Result_Set,$Per_Page)\r\n{\r\n\t$index = 0;\r\n\t$res=\"\";\r\n\t$unique_res=\"\";\r\n\t\r\n\t\r\n\t$query = \"SELECT id FROM locations WHERE \";\r\n\tif ($where != \"\") $query .= \"location = '$where' \"; \r\n\telse $query .= \"location LIKE '%' \"; \r\n\t$query .= \"\tORDER BY rank DESC \";\r\n\t\r\n\tif (!$Result_Set) \r\n\t { \r\n\t $Result_Set=0; \r\n\t $query.=\" LIMIT $Result_Set, $Per_Page\"; \r\n\t }\r\n\telse\r\n\t\t { $query.=\" LIMIT $Result_Set, $Per_Page\"; } \r\n\t\r\n\t$result = mysql_query($query) or die(mysql_error());\r\n\twhile ($row = mysql_fetch_row($result))\r\n\t{\r\n\t\t$temp = $row[0];\r\n\t\t$res[$index++] = $temp; // get the current field\r\n\t}\r\n\t\r\n\tif ($res != \"\")\t//we found requested workshops\r\n\t{\r\n\t\t$res = array_unique($res); \t//remove duplicate workshops (so we wont show the same workshop more then one time) \r\n\t\t$index = 0;\r\n\t\t$col = \"id\";\r\n\t\t\r\n\t\t//get the workshope by their id that we found.\r\n\t\tforeach ($res as $selectedworkshop)\r\n\t\t{\t\r\n\t\t\t$query = \"SELECT * FROM locations WHERE $col=$selectedworkshop \";\r\n\t\t\t$result = mysql_query($query) or die(mysql_error());\r\n\t\t\twhile ($row = mysql_fetch_row($result))\r\n\t\t\t{\r\n\t\t\t\t$unique_res[$index++] = $row; // get the current field\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn $unique_res;\r\n\t\r\n\t\r\n\t\r\n}", "abstract public function get_url_list( $page_num, $object_subtype = '' );", "function calendar_display_location_list() {\n return 1;\n }", "public function listingAction(Request $request)\n {\n $this->setCustomRepositories();\n\n $locale = $request->getLocale();\n $parameters = $request->query->all();\n $places = $this->frontRepository->getFilteredPlaces(\n $parameters, $locale, Constants::TYPE_ARRAY\n );\n\n $form = $this->createForm(MapType::class);\n return $this->render('@Front/Index/listing.html.twig', [\n 'places' => $places,\n 'form' => $form->createView()\n ]);\n }", "private function _getListingsByLoggedInUser()\n\t{\n\t\t$user_id = $this->_getUserId();\n\t\tif ($user_id == 0 || $user_id == null){\n\t\t\treturn array('error' => 'USER_NOT_LOGGED_IN', 'code' => 3);\n\t\t}\n\t\t\n\t\t$listings = $this->Listing->GetListingsByUserId($user_id);\n\t\tif ($listings == null)\n\t\t\treturn array('error' => 'FAILED_TO_RETRIEVE_LISTINGS', 'code' => 4);\n\n\t\treturn $listings;\n\t}", "function findAllLocations() {\r\n\r\n\t\treturn ($this->query('SELECT * FROM locations;'));\r\n\r\n\t}", "function listing() {\r\n\r\n }", "function custom() {\n\n $menu_id = Sanitize::getInt($this->params,'Itemid');\n\n $params = $this->Menu->getMenuParams($menu_id);\n\n $custom_where = Sanitize::getString($params,'custom_where');\n\n $custom_order = Sanitize::getString($params,'custom_order');\n\n if($custom_where !='') {\n\n $custom_where = str_replace(\n array('{user_id}'),\n array($this->_user->id),\n $custom_where);\n\n $this->Listing->conditions[] = $custom_where;\n }\n\n $custom_order !='' and $this->Listing->order[] = $custom_order;\n\n return $this->listings();\n }", "function LocationList()\n\t{\tif ($this->id)\n\t\t{\techo \"<table><tr class='newlink'><th colspan='2'><a href='locationedit.php?city=\", $this->id, \"'>add new location</a></th></tr>\\n<tr><th>Location name</th><th>Actions</th></tr>\\n\";\n\t\t\tif ($locations = $this->GetLocations())\n\t\t\t{\tforeach ($locations as $location)\n\t\t\t\t{\t\n\t\t\t\t\techo \"<tr>\\n<td>\", $this->InputSafeString($location->details[\"loctitle\"]), \"</td>\\n<td><a href='locationedit.php?id=\", $location->id, \"'>edit</a>\";\n\t\t\t\t\tif ($histlink = $this->DisplayHistoryLink(\"locations\", $location->id))\n\t\t\t\t\t{\techo \"&nbsp;|&nbsp;\", $histlink;\n\t\t\t\t\t}\n\t\t\t\t\tif ($location->CanDelete())\n\t\t\t\t\t{\techo \"&nbsp;|&nbsp;<a href='locationedit.php?id=\", $location->id, \"&delete=1'>delete</a>\";\n\t\t\t\t\t}\n\t\t\t\t\techo \"</td>\\n</tr>\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t\techo \"</table>\\n\";\n\t\t}\n\t}", "function listPlaces($workflowId, $page = null, $rownums = null);", "public function index(Request $request)\n {\n $options = $this->sLocation->standardize_search($request);\n $list = $this->sLocation->find($options);\n if (isset($options['limit']) && $options['limit'] > 0) {\n $this->setPagination($this->sLocation->get_paginator()->toArray());\n }\n return $this->respondData('Locations list', $list);\n }", "public function viewAllListings(Request $request){\n\n $data=Listing::where('status_id',Status::ACTIVE);\n \n //monetization\n if($request->monetization){\n \n $po =ListingMonetization::whereIn('monetization_id',$request->monetization)->pluck('listing_id')->toArray();\n $data = $data->whereIn('id',$po);\n \n }\n //industry\n if ($request->industry)\n {\n $data = $data->whereIn('industry_id',$request->industry);\n }\n if (trim($request->keyword))\n {\n $this->key = strtolower(trim($request->keyword));\n $data = $data->where(function($query) {\n $query->where('title','LIKE', '%'.$this->key.\"%\")\n ->orwhere('number','LIKE', '%'.$this->key.\"%\")\n ->orwhere('description','LIKE', '%'.$this->key.\"%\");\n });\n }\n //price\n if ($request->price)\n {\n $price_limit= (explode(\",\",$request->price));\n $data = $data->whereBetween('price',$price_limit);\n }\n $cc_data = clone $data;\n $max_money = ($cc_data->max('price'))?:0;\n $min_money = ($cc_data->min('price'))?:0;\n\n //final-outcome\n $listings = $data->paginate(10);\n\n\n return view('user.pages.listing',compact('listings','request','max_money','min_money'));\n }", "public function listing() \r\n\t{\r\n\t\t$data['header']['title'] = 'Country listing';\r\n\t\t$data['footer']['scripts']['homescript.js'] = 'home';\r\n\t\t$data['view_name'] = 'country/country_listing_view';\r\n\t\t$data['view_data'] = $this->country->get();\r\n\t\t$this->load->view('country/page_view', $data);\r\n\t}", "public function listing() {\r\n $options = get_option( 'myhome_redux' );\r\n $show_advanced = is_null( $options['mh-listing-show_advanced'] ) ? true : intval( $options['mh-listing-show_advanced'] );\r\n $show_clear = is_null( $options['mh-listing-show_clear'] ) ? true : intval( $options['mh-listing-show_clear'] );\r\n $show_sort_by = is_null( $options['mh-listing-show_sort_by'] ) ? true : intval( $options['mh-listing-show_sort_by'] );\r\n $show_view_types = is_null( $options['mh-listing-show_view_types'] ) ? true : intval( $options['mh-listing-show_view_types'] );\r\n $advanced_number = is_null( $options['mh-listing-search_form_advanced_number'] ) ? 3 : intval( $options['mh-listing-search_form_advanced_number'] );\r\n // settings from Listing options page\r\n $atts = array(\r\n 'lazy_loading' => $options['mh-listing-lazy_loading'] ? 'true' : 'false',\r\n 'lazy_loading_limit' => intval( $options['mh-listing-load_more_button_number'] ),\r\n 'load_more_button' => $options['mh-listing-load_more_button_label'],\r\n 'load_prev_button' => $options['mh-listing-load_prev_button_label'],\r\n 'listing_default_view' => $options['mh-listing-default_view'],\r\n 'estates_per_page' => $options['mh-listing-estates_limit'],\r\n 'search_form_position' => $options['mh-listing-search_form_position'],\r\n 'label' => $options['mh-listing-label'],\r\n 'search_form_advanced_number' => $advanced_number,\r\n 'show_advanced' => $show_advanced ? 'true' : 'false',\r\n 'show_clear' => $show_clear ? 'true' : 'false',\r\n 'show_sort_by' => $show_sort_by ? 'true' : 'false',\r\n 'show_view_types' => $show_view_types ? 'true' : 'false',\r\n 'agent_id' => $this->id, // get estates only from this agent\r\n 'map' => false\r\n );\r\n\r\n // prepare attributes\r\n foreach ( My_Home_Attribute::get_attributes() as $attr ) {\r\n $value = $options['mh-listing-' . $attr->get_slug() . '_show'];\r\n $atts[$attr->get_slug() . '_show'] = $value ? 'true' : 'false';\r\n }\r\n\r\n // initiate listing\r\n $listing = new My_Home_Listing( $atts );\r\n ?>\r\n <div class=\"mh-listing--full-width mh-listing--horizontal-boxed\">\r\n <?php $listing->listing(); ?>\r\n </div>\r\n <?php\r\n }", "function ships_list()\n\t\t{\n\t\t\t$id = $this->uri->segment(3);\n\n\t\t\t$data['ships'] = $this->ship_model->get_company_ships($id);\n\t\t\t// $data['ships_type'] = $this->\n\t\t\t$this->directPageDetails(\"ships/ships\",\"\",$data);\n\t\t}", "public function getSubItems(LocationInterface $location, int $offset = 0, int $limit = 25): iterable;", "function get_list($limit = 20, $offset = 0, $param = array()) {\n $this->db\n ->select(DB_POINT . '.*, ' . DB_CATEGORY . '.item_id as category_id, ' . DB_CATEGORY . '.item_name, ' . DB_CATEGORY . '.item_icon, ' . DB_PHOTO . '.item_filename')\n ->join(DB_CATEGORY, DB_CATEGORY . '.item_id = ' . DB_POINT . '.item_category', 'left')\n ->join(DB_PHOTO, DB_PHOTO . '.item_point = ' . DB_POINT . '.item_id', 'left');\n\n if (isset($param['statuses']) && is_array($param['statuses'])) {\n $this->db->where_in('item_status', $param['statuses']);\n }\n \n if (isset($param['author'])) {\n $this->db->where(DB_POINT . '.item_author', $param['author']);\n }\n \n return $this->db\n ->group_by(DB_POINT . '.item_id')\n ->order_by(DB_POINT . '.item_timestamp', 'desc')\n ->get(DB_POINT, $limit, $offset)->result();\n }", "public function getListings($offset, $limit, &$total, $order = 'date', $category = null, $omit = null)\r\n\t{\r\n\t\t$user = BluApplication::getUser();\r\n\r\n\t\t// Get listings\r\n\t\t$query = 'SELECT SQL_CALC_FOUND_ROWS m.marketID\r\n\t\t\tFROM marketplace AS m\r\n\t\t\t\tLEFT JOIN marketplacePayments AS mpp ON mpp.marketID = m.marketID\r\n\t\t\tWHERE mpp.startDate <= NOW()\r\n\t\t\t\tAND mpp.endDate >= NOW()\r\n\t\t\t\tAND mpp.paid = 1\r\n\t\t\t\tAND m.mLive = 1';\r\n\t\tif ($category) {\r\n\t\t\tif ($user && ($category == 'owner')) {\r\n\t\t\t\t$query .= ' AND m.mUserID = '.(int)$user->userid;\r\n\t\t\t} else {\r\n\t\t\t\t$query .= ' AND m.mCategory = '.(int)$category;\r\n\t\t\t}\r\n\t\t}\r\n\t\tswitch ($order) {\r\n\t\t\tcase 'featured':\r\n\t\t\t\t$query .= ' AND mpp.marketFeatured >= 1 ORDER BY RAND()';\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'title':\r\n\t\t\t\t$query .= ' ORDER BY m.mTitle';\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\t$query .= ' ORDER BY mpp.startDate DESC';\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\t$this->_db->setQuery($query, $offset, $limit, (bool)$total);\r\n\t\t$listings = $this->_db->loadAssocList('marketID');\r\n\t\tif (!$listings) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// Get total\r\n\t\tif ($total) {\r\n\t\t\t$total = $this->_db->getFoundRows();\r\n\t\t}\r\n\r\n\t\t// Add listing details and return\r\n\t\t$this->addDetails($listings);\r\n\t\treturn $listings;\r\n\t}", "public function prepareListingLocationData()\n {\n foreach ($GLOBALS['listing'] as $group) {\n foreach ($group['Fields'] as $field) {\n if (isset($this->geo_filter_data['location_listing_fields'][$field['Key']])) {\n $this->listing_location_data[] = $field['value'];\n }\n }\n }\n }", "private function get_template() {\n\t\tif ( ! empty( $_REQUEST['action'] ) ) {\n\t\t\t$action = sanitize_title( $_REQUEST['action'] );\n\t\t\tif ( has_action( 'mylisting/user-listings/handle-view:'.$action ) ) {\n\t\t\t\treturn do_action( 'mylisting/user-listings/handle-view:'.$action );\n\t\t\t}\n\t\t}\n\n\t\t$allowed_statuses = [ 'publish', 'pending', 'pending_payment', 'expired', 'preview' ];\n\t\t$default_statuses = apply_filters(\n\t\t\t'mylisting/dashboard/default-listing-statuses',\n\t\t\t$allowed_statuses\n\t\t);\n\n\t\t// filter by listing status\n\t\tif ( ! empty( $_GET['status'] ) && in_array( $_GET['status'], $allowed_statuses, true ) ) {\n\t\t\t$active_status = $_GET['status'];\n\t\t} else {\n\t\t\t$active_status = 'all';\n\t\t}\n\n\t\tif ( $active_status === 'pending_payment' ) {\n\t\t\t$this->pending_orders = $this->get_pending_orders();\n\t\t}\n\n\t\t// get user listings\n\t\t$query = new \\WP_Query;\n\t\t$query_args = [\n\t\t\t'post_type' => 'job_listing',\n\t\t\t'post_status' => $active_status === 'all' ? $default_statuses : $active_status,\n\t\t\t'ignore_sticky_posts' => 1,\n\t\t\t'posts_per_page' => 12,\n\t\t\t'paged' => ! empty( $_GET['pg'] ) ? absint( $_GET['pg'] ) : 1,\n\t\t\t'orderby' => 'date',\n\t\t\t'order' => 'DESC',\n\t\t\t'author' => get_current_user_id(),\n\t\t];\n\n\t\t// filter by listing type\n\t\t$active_type = '';\n\t\tif ( ! empty( $_GET['filter_by_type'] ) ) {\n\t\t\tif ( $type = \\MyListing\\Src\\Listing_Type::get_by_name( $_GET['filter_by_type'] ) ) {\n\t\t\t\t$query_args['meta_key'] = '_case27_listing_type';\n\t\t\t\t$query_args['meta_value'] = $type->get_slug();\n\t\t\t\t$active_type = $type->get_slug();\n\t\t\t}\n\t\t}\n\n\t\t// get listing types relevant to the current user and sort alphabetically\n\t\t$listing_types = $this->get_types_relevant_to_current_user();\n\t\tusort( $listing_types, function( $a, $b ) {\n\t\t\tstrcmp( $a->get_plural_name(), $b->get_plural_name() );\n\t\t} );\n\n\t\t// get listings and convert WP_Posts to Listing objects\n\t\t$listings = array_filter( array_map( function( $item ) {\n\t\t\treturn \\MyListing\\Src\\Listing::get( $item );\n\t\t}, $query->query( $query_args ) ) );\n\n\t\t// user stats for dashboard cards\n\t\t$stats = mylisting()->stats()->get_user_stats( get_current_user_id() );\n\n\t\t$endpoint = wc_get_account_endpoint_url( \\MyListing\\my_listings_endpoint_slug() );\n\n\t\t// load template\n\t\tmylisting_locate_template( 'templates/dashboard/my-listings.php', [\n\t\t\t'query' => $query,\n\t\t\t'listings' => $listings,\n\t\t\t'stats' => $stats,\n\t\t\t'endpoint' => $endpoint,\n\t\t\t'listing_types' => $listing_types,\n\t\t\t'active_status' => $active_status,\n\t\t\t'active_type' => $active_type,\n\t\t] );\n\t}", "public function getWidgetListing(){\t\n\t\t$query = 'SELECT '.DB_PREFIX.'widget_category.name AS \"category\", '.DB_PREFIX.'languages.prefix AS \"language\", '.DB_PREFIX.'widget.alias AS \"alias\", '.DB_PREFIX.'widget.language_id AS \"language_id\", '.DB_PREFIX.'widget.id AS \"id\", '.DB_PREFIX.'widget.status AS \"status\", '.DB_PREFIX.'widget.category_id AS \"category_id\", '.DB_PREFIX.'widget.name AS \"name\", '.DB_PREFIX.'widget.data AS \"data\" FROM '.DB_PREFIX.'widget LEFT JOIN '.DB_PREFIX.'languages ON '.DB_PREFIX.'languages.id = '.DB_PREFIX.'widget.language_id LEFT JOIN '.DB_PREFIX.'widget_category ON '.DB_PREFIX.'widget.category_id = '.DB_PREFIX.'widget_category.id ORDER BY '.DB_PREFIX.'widget_category.name ASC, '.DB_PREFIX.'languages.prefix ASC;';\n\t\t$rs = $this->reg->get('db')->query($query);\n\t\tif($rs->num_rows){\n\t\t\treturn $rs->rows;\n\t\t\t}\n\t\treturn false;\n\t\t}", "public function index()\n {\n $categories = Category::with('parent')->get();\n return view('listings.index');\n }", "public function get($location);", "function browsingMenu($dbconn, $current, $content = 'default') {\n\t$params = build_qs(array(), 'offset', null);\n\t$rv = \"\";\n\n\tif($content == 'both' || $content == 'default' || $content == 'locations') {\n\t\tif($content == 'locations') {\n\t\t\t$arr = array(\n\t\t\t\t'byname' => \"Global\",\n\t\t\t);\n\t\t } else {\n\t\t\t$arr = array(\n\t\t\t\t'byname' => \"By Name\",\n\t\t\t\t'bydept' => \"By Team\",\n\t\t\t\t'byoffice' => \"By Office\",\n\t\t\t\t'hier' => \"By Org\",\n\t\t\t\t'random' => \"Random\"\n\t\t\t);\n\t\t};\n\n\t\tforeach ($arr as $k => $v) {\n\t\t\tif($content == 'default') {\n\t\t\t\t$url = build_url(build_qs($params, 'index', $k), \"./\");\n\t\t\t} else {\n\t\t\t\t$url = build_url(build_qs($params, 'index', $k));\n\t\t\t}\n\t\t\t$lab = $arr[$k];\n\t\t\tif(strlen($rv)) {\n\t\t\t\t$rv = \"$rv \";\n\t\t\t}\n\t\t\tif($current == $k) {\n\t\t\t\t$class = 'activefilter';\n\t\t\t} else {\n\t\t\t\t$class = 'inactivefilter';\n\t\t\t}\n\t\t\t$rv = \"$rv | <a class=\\\"$class filteroption\\\" href=\\\"$url\\\"> $lab </a> \";\n\t\t}\n\t\t$rv .= \" |\";\n\t} \n\n\t$sitelimit = \"\";\n\tif($content == 'both' || $content == 'locations') {\n\t\t$query = \"\n\t\t\tWITH occupied_offices AS (\n\t\t\t SELECT DISTINCT\n\t\t\t physical_address_id\n\t\t\t FROM\n\t\t\t person_location\n\t\t\t INNER JOIN\n\t\t\t v_corp_family_account\n\t\t\t USING\n\t\t\t (person_id)\n\t\t\t WHERE\n\t\t\t is_enabled = 'Y'\n\t\t\t)\n\t\t\tSELECT\n\t\t\t physical_address_id,\n\t\t\t display_label\n\t\t\tFROM\n\t\t\t physical_address\n\t\t\tINNER JOIN\n\t\t\t occupied_offices\n\t\t\tUSING\n\t\t\t (physical_address_id)\n\t\t\tWHERE\n\t\t\t physical_address_type = 'location'\n\t\t\tORDER BY \n\t\t\t display_label\n\t\t\";\n\t\t$result = pg_query($dbconn, $query) or die('Query failed: ' . pg_last_error());\n\t\n\t\t$params = build_qs(null, 'offset', null);\n\n\t\t# used to have the site limiter in the menubar\n\t\t$label = \"\";\n\t\n\t\twhile ($row = pg_fetch_array($result, null, PGSQL_ASSOC)) {\n\t\t\tif(isset($_GET['physical_address_id']) && $_GET['physical_address_id'] == $row['physical_address_id']) {\n\t\t\t\t$class = 'activefilter';\n\t\t\t\t$label = $row['display_label'];\n\t\t\t} else {\n\t\t\t\t$class = 'inactivefilter';\n\t\t\t}\n\t\t\t$url = build_url(build_qs($params, 'physical_address_id', $row['physical_address_id']));\n\t\t\t$lab = $row['display_label'];\n\t\t\t$sitelimit = \"$sitelimit | <a class=\\\"$class limitsiterow\\\" href=\\\"$url\\\"> $lab </a>\";\n\t\t}\n\t\t$sitelimit .= \"|\";\n\t\tif(isset($_GET['physical_address_id'])) {\n\t\t\t$url = build_url(build_qs($params, 'physical_address_id', null));\n\t\t\t$lab = '| Clear';\n\t\t\t$return = \"$return <a class=\\\"inactivefilter limitsiterow\\\" href=\\\"$url\\\"> $lab </a> \";\n\t\t}\n\t\t$rv = \"$rv <a class=\\\"$class filteroption locationfilter\\\"> </a>\";\n\t}\n\treturn \"<div class=filterbar>$rv</div> <div class=\\\"sitelimit \\\">$sitelimit</div>\";\n}", "function queryListing($page_no, $items_per_page, $offset, $s_item_type, $search_vars_r) {\n\t\t// reference to site item unique ID.\n\t\tif (strlen($search_vars_r['iblist_id']) > 0) {\n\t\t\t$this->addListingRow(NULL, NULL, NULL, array('iblist_id' => $search_vars_r['iblist_id']));\n\t\t\treturn TRUE;\n\t\t}\n\n\t\t$search_clause = \"\";\n\t\tif (strlen($search_vars_r['author']) > 0)\n\t\t\t$search_clause = \"item=\" . urlencode($search_vars_r['author']);// . \"&author=on\";\n\t\telse if (strlen($search_vars_r['title']) > 0)\n\t\t\t$search_clause = \"item=\" . urlencode($search_vars_r['title']);// . \"&title=on\";\n\t\telse if (strlen($search_vars_r['isbn']) > 0)\n\t\t\t$search_clause = \"item=\" . urlencode($search_vars_r['isbn']);// . \"&isbn=on\";\n\t\telse if (strlen($search_vars_r['series']) > 0)\n\t\t\t$search_clause = \"item=\" . urlencode($search_vars_r['series']);// . \"&series=on\";\n\t\telse if (strlen($search_vars_r['description']) > 0)\n\t\t\t$search_clause = \"item=\" . urlencode($search_vars_r['description']);// . \"&description=on\";\n\n//\t\t$pageBuffer = $this->fetchURI(\"http://www.iblist.com/search/advanced_search.php?$search_clause&next=$offset\");\n\t\t$pageBuffer = $this->fetchURI(\"http://www.iblist.com/search/search.php?$search_clause&next=$offset\");\n\n\t\t// find out how many matches we have.\n//\t\tif (preg_match(\"!<b>\\[</b>([0-9]+) <b>-</b> ([0-9]+) <b>out of</b> ([0-9]+)<b>\\]</b>!i\", $pageBuffer, $matches)) {\n\t\tif (preg_match(\"!([0-9]+) - ([0-9]+) out of ([0-9]+)!i\", $pageBuffer, $matches)) {\n\t\t\t$this->setTotalCount($matches[3]);\n\n//\t\t\tif (preg_match_all(\"!<LI><A HREF=\\\"http://www.iblist.com/book([0-9]+).htm\\\">([^<]+)</A> by <A HREF=\\\"[^\\\"]+\\\">([^<]+)</A> </LI>!i\", $pageBuffer, $matches2)) {\n\t\t\tif (preg_match_all(\"!<LI><A HREF=\\\"http://www.iblist.com/book([0-9]+).htm\\\">([^<]+)</A> by <A HREF=\\\"[^\\\"]+\\\">([^<]+)</A></LI>!i\", $pageBuffer, $matches2)) {\n\t\t\t\tfor ($i = 0; $i < count($matches2[0]); $i++) {\n//\t\t\t\t\t$this->addListingRow($matches2[2][$i] . ' by ' . trim($matches2[3][$i]), \"http://www.iblist.com/images/covers/\" . $matches2[1][$i] . \".jpg\", NULL, array('iblist_id' => $matches2[1][$i]));\n// image id is wrong, so ignore the url\n\t\t\t\t\t$this->addListingRow($matches2[2][$i] . ' by ' . trim($matches2[3][$i]), '', NULL, array('iblist_id' => $matches2[1][$i]));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn TRUE;\n\t}", "public function listings(Request $request, $listings) {\n\t\tif($request->sortBy) {\n\t\t\tswitch($request->sortBy) {\n\t\t\t\tcase 'makeAsc':\n\t\t\t\t\t$listings = $listings->orderBy('manufacturer', 'ASC');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'makeDesc':\n\t\t\t\t\t$listings = $listings->orderBy('manufacturer', 'DESC');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'modelAsc':\n\t\t\t\t\t$listings = $listings->orderBy('model', 'ASC');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'modelDesc':\n\t\t\t\t\t$listings = $listings->orderBy('model', 'DESC');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'updateAsc':\n\t\t\t\t\t$listings = $listings->orderBy('updated_at', 'ASC');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'updateDesc':\n\t\t\t\t\t$listings = $listings->orderBy('updated_at', 'DESC');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'priceAsc':\n\t\t\t\t\t$listings = $listings->orderBy('price', 'ASC');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'priceDesc':\n\t\t\t\t\t$listings = $listings->orderBy('price', 'DESC');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'ttAsc':\n\t\t\t\t\t$listings = $listings->orderBy('total_time', 'ASC');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'ttDesc':\n\t\t\t\t\t$listings = $listings->orderBy('total_time', 'DESC');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'yearAsc':\n\t\t\t\t\t$listings = $listings->orderBy('year', 'ASC');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'yearDesc':\n\t\t\t\t\t$listings = $listings->orderBy('year', 'DESC');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'engineAsc':\n\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'engineDesc':\n\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif($request->pageSize) {\n\t\t\t$listings = $listings->paginate(intval($request->pageSize));\n\n\t\t} else {\n\t\t\t$listings = $listings->paginate(25);\n\t\t}\n\n\n\t\treturn view('listings.display', ['listings' => $listings]);\n\t}", "function backyard_getListOfPOI($poiCategory) {\n global $backyardGeo;\n if (is_int($poiCategory)) {\n $poiCategorySecured = $poiCategory;\n } else {\n $poiCategorySecured = preg_replace(\"/[^0-9,]/\", '', $poiCategory);\n }\n //$query = \"SELECT * FROM `pichacky_poi` WHERE `category` =1 AND (`typ` ='Prodejna' OR `typ` ='Admin. budova + Prodejna') \";//@TODO přidat where category==1 neboť to jsou TMCZ objekty //@TODO .. rozlišit kategorie dle použité app, tj. jiné pro skauty a jiné pro T-Check, nyní pro skauty\n $query = \"SELECT * FROM `{$backyardGeo['table_name']}` WHERE `category` IN ( \" . $poiCategorySecured . \" )\";\n $listOfPOINearby = customMySQLQuery($query);\n if (!$listOfPOINearby) {\n my_error_log('No result for query ' . $query, 2, 11);\n }\n return $listOfPOINearby;\n}", "function wh_get_posts($postetype, $tax_query = '', $nbrPage = '', $lat = '', $lng = '', $distance = '', $tabSlide2='') {\n\n \n\n \n if (!$nbrPage) {\n $nbrPage = 15;\n }\n\n $locations = new WP_Query_Geo([\n 'post_status' => 'publish',\n 'post_type' => $postetype, // cpt with locations stored\n 'posts_per_page' => -1,\n 'tax_query' => $tax_query,\n 'meta_query' => $tabSlide2,// filtrage par meta donner\n 'posts_per_page' => $nbrPage, // nbre de page\n 'lat' => $lat, // pass in latitude\n 'lng' => $lng, // pass in longitude\n 'distance' => $distance, // distance to find properties in\n ]);\n\n return $locations->posts;\n}", "public function albumbyLocationsAction() {\n\n if (Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('album')) {\n $this->view->navigation = $navigation = Engine_Api::_()->getApi('menus', 'core')->getNavigation('album_main', array(), 'sitetagcheckin_main_albumlocation');\n $this->_helper->content->setEnabled();\n } /* elseif ( Engine_Api::_()->getDbtable( 'modules' , 'core' )->isModuleEnabled( 'advgroup' )) {\n $this->view->navigation = $navigation = Engine_Api::_()->getApi('menus', 'core')->getNavigation('advgroup_main', array(), 'sitetagcheckin_main_groupbylocation');\n $this->_helper->content->setEnabled();\n } */ else {\n return $this->_forward('notfound', 'error', 'core');\n }\n }", "function LocationDropdownList()\n\t{\t$loc_list = array();\n\t\t\n\t\tif ($locations = $this->GetLocations())\n\t\t{\tforeach ($locations as $location)\n\t\t\t{\t$loc_list[$location->id] = $location->details[\"loctitle\"];\n\t\t\t}\n\t\t}\n\t\t//print_r($this);\n\t\treturn $loc_list;\n\t}", "function get_all( $location_id = 0, $exclusion_page = PC_EXCLUDE_NONE ) {\n\n $new_pc_items = null;\n\n // Build a where clause\n $where = \"WHERE 1 \";\n\n // Limit selection to specified locations\n if ( !empty( $location_id ) )\n $where .= \"AND pc_location='\" . $location_id . \"' \";\n\n if ( !empty( $exclusion_page ) ) {\n $where .= \"AND pc_exclusions NOT LIKE '\" . $exclusion_page . \"' \" . // just the exclusion page\n \"AND pc_exclusions NOT LIKE '%,\" . $exclusion_page . \"' \" . // A list ending with the exclusion page\n \"AND pc_exclusions NOT LIKE '%,\" . $exclusion_page . \",%' \" . // A list the exclusion page in the middle\n \"AND pc_exclusions NOT LIKE '\" . $exclusion_page . \",%' \"; // A list begining with the exclusion page\n }\n\n // Query the database\n $query = \"SELECT * FROM \" . $this->partner_code_table . \" \" .\n $where .\n \"ORDER BY pc_location ASC, pc_order ASC\";\n\n $result = $this->gCI->db->query( $query );\n\n // Cache the query results in an array\n if ( !empty( $result ) ) {\n $new_pc_items = array();\n while( $pc_item = $this->gCI->db->fetch_assoc( $result ) ) {\n $new_pc_items[] = $pc_item;\n }\n }\n\n return( $new_pc_items );\n }", "public function findForList()\n {\n return $this->findByShowInOverview(true);\n }", "public function listAddressGroupings();", "function findPageUrls();", "function showSearch () {\n\t\t$template['list'] = $this->cObj->getSubpart($this->templateCode,'###TEMPLATE_SEARCH###');\n\t\t$subpartArray = array();\n\t\t$markerArray = $this->helperGetLLMarkers(array(), $this->conf['search.']['LL'], 'search');\n\n\t\t// hide the radisus search by using a subpart\n\t\tif ($this->config['search']['radiusSearch'] != 1) {\n\t\t\t$subpartArray['###HIDE_RADIUSSEARCH###'] = '';\n\t\t}\n\n\t\t$markerArray['###DEFAULT_COUNTRY###'] = $this->config['defaultCountry']; // set the default country\n\t\t$markerArray['###DEFAULT_ZIP###'] = htmlspecialchars($this->piVars['zip']);\n\t\t$markerArray['###AUTOSUBMIT###'] = ($this->piVars['zip'] == '') ? '//' : '';\n\n\t\t// fetch the allowed categories as option list\n\t\t$markerArray['###CATEGORY###'] = $this->helperGetRecursiveCat($this->config['categories']);\n\n\t\t$content = $this->cObj->substituteMarkerArrayCached($template['list'], $markerArray, $subpartArray);\n\t\treturn $content;\n\t}", "function get_location_list ($perm = 1) \n{\n \n $query = 'SELECT * \n FROM locations \n WHERE permanent = '.$perm;\n $result = mysql_query ($query);\n while ($row = mysql_fetch_array($result)) $return[] = $row;\n return $return;\n}", "public function listingsAction(Request $request)\n {\n\n ## 1. Initialization\n // Enable CORS in this API\n $response = CorsUtility::createCorsResponse();\n if (CorsUtility::requiresPreFlight($request)) {\n return $response;\n }\n\n ## 2. Validate request\n $api = new ApiUtility($request);\n\n $error = $api->validateRequest();\n\n // Return response\n if($error)\n {\n $response = $api->generateErrorResponse($error);\n return $response;\n }\n\n ## 3. Prepare information\n /* @var \\Doctrine\\ORM\\EntityRepository $repository */\n $repository = $this->getDoctrine()->getRepository('ManateeCoreBundle:Listing');\n\n if ($api->hasParameter('userId')) {\n $listings = $repository->findBy( array(\n 'userId' => $api->getParameter('userId')\n ));\n\n if(!is_array($listings)){\n $listings = array();\n }\n } else {\n $listings = $this->getUser()->getListings();\n }\n\n\n\n ## 4. Process info\n $displayParams = array('listingId', 'name', 'content', 'area',\n 'schedule', 'price', 'formattedTimestamp');\n\n $data = $api->generateData($listings, $displayParams);\n\n ## 5. Return payload\n $response = $api->generateResponse($data);\n return $response;\n }", "function sopac_search_block($locum_results_all, $locum_cfg) {\n global $user;\n\n $getvars = sopac_parse_get_vars();\n $uri = sopac_parse_uri();\n $format = $getvars['search_format'];\n $term_arr = explode('?', trim(preg_replace('/\\//', ' ', $uri[2])));\n\n $search['term'] = trim($term_arr[0]);\n $search['type'] = trim($uri[1]);\n $search['sortby'] = $getvars['sort'] ? $getvars['sort'] : t('Most relevant');\n $search['format'] = count($getvars['search_format']) && ($getvars['search_format'][0] != 'all') ? $getvars['search_format'] : array();\n $search['series'] = count($getvars['facet_series']) ? $getvars['facet_series'] : array();\n $search['lang'] = count($getvars['facet_lang']) ? $getvars['facet_lang'] : array();\n $search['year'] = count($getvars['facet_year']) ? $getvars['facet_year'] : array();\n $search['decade'] = count($getvars['facet_decade']) ? $getvars['facet_decade'] : array();\n $search['age'] = count($getvars['age']) ? $getvars['age'] : array();\n $search['subject'] = count($getvars['facet_subject']) ? $getvars['facet_subject'] : array();\n\n return theme('sopac_search_block', $search, $locum_results_all, $locum_cfg, $user);\n\n}", "public function index($listing, $slug, Request $request)\n {\n\t\n $data = [];\n $visible_listing = $listing->is_published && !$listing->is_disabled;\n $can_edit = auth()->check() && (auth()->user()->id == $listing->user_id || auth()->user()->can('edit listing'));\n\n if(!$visible_listing && !$can_edit) {\n return abort(404);\n }\n\n\t\t$breadcrumbs = [];\n $category = $listing->category;\n\n\n\t\tif($category) {\n $i = 0;\n\t\t\twhile($category = $category->child) {\n $breadcrumbs[] = $category;\n\t\t\t\t$i ++;\n\t\t\t\tif($i == 5)\n\t\t\t\t\tbreak;\n }\n }\n \n $data['breadcrumbs'] = array_reverse($breadcrumbs);\n\n\n $listing->load('shipping_options');\n \n $listing->views_count = $listing->views_count + 1;\n $listing->save();\n\n $data['listing'] = $listing;\n\n $data['tags'] = explode(\",\", $listing->tags);\n\n\n $data['seller'] = $listing->user;\n $data['comments'] = $listing->comments()->orderBy('created_at', 'DESC')->get();\n $data['ships_from'] = Country::where('country_short_name',$listing->shipped_from)->first();\n $countryDb = Country::whereIn('country_short_name',unserialize($listing->ships_to))->take(12)->get()->pluck('country_name')->toArray();\n $countries = implode (\", \",$countryDb);\n $data['ships_to'] = $countries;\n\n MetaTag::set('title', $listing->title);\n \n return view('listing.show', $data);\n }", "public function getProductListings(string $query_type, $keyword_or_cat_id, string $sort_by, string $price_filter, int $page = 1): array\n {\n $page = $page - 1;\n $options = ['start' => ($page * business('products_per_page')), 'facets' => ['brand'], 'max_results' => business('products_per_page')];\n $ret_val = ['brand_facets' => new Collection(), 'listings' => new Collection()];\n $query_params = [];\n\n // Handle price filter\n if($price_filter != 'all')\n {\n list($price_low, $price_high) = explode('_', $price_filter);\n $query_params['store_price'] = ['between' => [$price_low, $price_high]];\n }\n\n // Handle sort\n switch($sort_by)\n {\n case 'newest':\n $options['sort_by'] = ['timestamp', 'desc'];\n break;\n\n case 'price_asc':\n $options['sort_by'] = ['store_price', 'asc'];\n break;\n\n case 'price_desc':\n $options['sort_by'] = ['store_price', 'desc'];\n break;\n }\n\n if($query_type == 'search')\n {\n $keyword = addslashes($keyword_or_cat_id);\n $query_params = array_merge($query_params, ['*all*' => $keyword, 'in_stock' => 'true']);\n }\n else // Category search\n {\n $cat_id = $keyword_or_cat_id;\n $query_params = array_merge($query_params, ['category_ids' => $cat_id, 'in_stock' => 'true']);\n }\n\n $result_set = $this->noSQLDataSource->findBy('products', $query_params, $options);\n $ret_val['listings'] = $result_set->getResults();\n $ret_val['brand_facets'] = $result_set->getFacets();\n $ret_val['num_of_listings'] = $result_set->getTotalResultsCount();\n\n return $ret_val;\n }", "function home_filter()\n\t{\n\t\t$data = filter_forwarded_data($this);\n\t\tif($data['t'] == 'best_evaluated_bidders') $data['listtype'] = 'best_bidders';\n\t\t\n\t\t$this->load->view($this->get_section_folder($data['t']).'/list_filter', $data);\n\t}", "public function location_list(){\n\t\t$data = array();\n\t\t$data['status'] = 1;\n\t\t\n\t\t$offset = (int)$this->input->get('offset',0);\n\t\t$limit = (int)$this->input->get('limit',0);\n\t\t$user_id = $this->input->get('user_id');\n\t\t\n\t\t$notifications = $this->location_model->get_location_list($user_id,$offset,$limit);\n\t\t\n\t\t$data['data']['locations'] = $notifications;\n\t\t$this->json_response($data);\n\t}", "public abstract function get_lists();", "static function getGriditemsInfo()\r\n\t{\r\n\t\treturn Storydata::get('item_locations',array());\t\t\r\n\t}", "function get_location_content() {\n\n\n\t/*\n\t* Visible list of locations.\n\t*/\n\t$selector_panel_tabs = '';\n\t$selector_panel_info = '';\n\n\n\t// Get all the pins for the map\n\t$pins = array();\n\t$i = 0;\n\t$show_first = true; // set to false to hide all details by default. true to show the first one.\n\twhile ( have_rows( 'pin_locations' ) ) {\n\t\tthe_row();\n\n\t\t$pin_info = array();\n\t\t$pin_info[ 'name' ] = get_sub_field( 'name' );\n\t\t$pin_info[ 'description' ] = get_sub_field( 'description' );\n\t\t$pin_info[ 'description_pin' ] = apply_filters('the_content', get_sub_field( 'description' )); // apply_filters lets us render the shortcodes (athena) and use them in pins\n\t\t$pin_info[ 'hours_of_operation' ] = get_sub_field( 'hours_of_operation' );\n\t\t$pin_info[ 'address' ] = get_sub_field( 'address' );\n\t\t$pin_info[ 'address_pin' ] = apply_filters('the_content',get_sub_field( 'address' ));\n\t\t$pin_info[ 'url' ] = get_sub_field( 'url' );\n\t\t//$pin_info[''] = get_sub_field('');\n\n\n\t\twhile (have_rows('phone_numbers')){\n\t\t\tthe_row();\n\t\t\t//$type = get_sub_field('type');\n\t\t\t$number = get_sub_field('number');\n\t\t\t//$pin_info['phone_numbers'][$type] = $number;\n\t\t\t$pin_info['phone_numbers'][] = $number;\n\t\t}\n\n\t\t// coordinates are in a group, which also needs to be looped even though it isn't a repeater\n\t\twhile (have_rows('coordinates')){\n\t\t\tthe_row();\n\t\t\t$pin_info['latitude'] = get_sub_field('latitude');\n\t\t\t$pin_info['longitude'] = get_sub_field('longitude');\n\n\t\t}\n\n\n\t\t$pin_info[ 'slug' ] = 'ucfh-' . md5(json_encode($pin_info));\n\t\t// use md5 to create a unique id that only changes when the pin data changes - for caching and unique id in html\n\t\t// note: ids MUST start with a letter, so prefix the md5 to prevent erros\n\n\t\t$pins[$pin_info[ 'slug' ]] = $pin_info;\n\n\t\t// 4. Create an always-visible list entry (outside of the google map interface)\n\n\t\tif ($i === 0 && $show_first){\n\t\t\t$show_current = true;\n\t\t} else {\n\t\t\t$show_current = false;\n\t\t}\n\n\t\t$selector_panel_tabs .= selector_panel_list_tab( $pin_info, $show_current );\n\t\t$selector_panel_info .= selector_panel_list_info( $pin_info, $show_current );\n\n\t\t$i++;\n\t}\n\n\t$unique_id_all_data = 'ucfh-' . md5(json_encode($pins));\n\t// generate another unique id for the parent object. this way, a page with multiple blocks won't interfere with one another.\n\t// note: ids MUST start with a letter, so prefix the md5 to prevent erros\n\n\tif ( get_field('panel_visible')) {\n\t\t$selector_panel = \"\n\t\t\t<div class='info selector-panel locations' >\n\t\t\t\t<div class='nab-tab-area' >\n\t\t\t\t\t<ul class='nav nav-tabs' id='{$unique_id_all_data}-tabs' role='tablist' >\n\t\t\t\t\t\t{$selector_panel_tabs}\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t\t<div class='tab-content' id='{$unique_id_all_data}-content' >\n\t\t\t\t\t{$selector_panel_info}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\";\n\n\t} else {\n\t\t$selector_panel = '';\n\t}\n\n\twp_localize_script(script_register, 'pin_data', $pins);\n\n\tif ( get_field('map_visible') ) {\n\t\t$map = \"<section class='ucf-health-locationsmap-container' ><div class='ucf-health-locationsmap' ></div></section>\";\n\t} else {\n\t\t$map = '';\n\t}\n\n\treturn \"<div class='locations-output' id='{$unique_id_all_data}' >{$selector_panel}{$map}</div>\";\n}", "function get_listings_header_type() {\n\t\t\n\t\tglobal $post;\n\t\t\n\t\t///// TRIES TO GET THE PAGE BY THE DDP FIRST\n\t\tif($page = get_post($post->ID)) {\n\t\t\t\n\t\t\tif(get_post_meta($post->ID, '_wp_page_template', true) == 'listings.php') {\n\t\t\t\t\n\t\t\t\t$list_type = get_post_meta($post->ID, 'list_map', true);\n\t\t\t\treturn $list_type;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t///// TRIES TO GET THE PAGE BY THE DDP FIRST\n\t\tif($page = get_post(ddp('listing_page'))) {\n\t\t\t\n\t\t\tif(get_post_meta($page->ID, '_wp_page_template', true) == 'listings.php') {\n\t\t\t\t\n\t\t\t\t$list_type = get_post_meta($page->ID, 'list_map', true);\n\t\t\t\treturn $list_type;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\t\n\t\t$args = array('post_type' => 'page','meta_key' => '_wp_page_template','meta_value' => 'listings.php');\n\t\t$pageQuery = new WP_Query($args);\n\t\t\n\t\tif($pageQuery->found_posts > 0) { \n\t\t\n\t\t\t$the_post = $pageQuery->posts;\n\t\t\n\t\t\t$list_type = get_post_meta($the_post[0]->ID, 'list_map', true);\n\t\t\n\t\t} else { \n\t\t\n\t\t\t$list_type = 'on';\n\t\t\n\t\t}\n\t\t\n\t\treturn $list_type;\n\t\t\n\t}", "public function get_url_list($page_num, $object_subtype = '')\n {\n }", "public function get_url_list($page_num, $object_subtype = '')\n {\n }", "public function get_url_list($page_num, $object_subtype = '')\n {\n }", "public function getAllLocations() {\n\t\t$query = $this->db->select(\"\n\t\t\tRoom.RoomID,\n\t\t\tRoomAbbr,\n\t\t\tRoomName,\n\t\t\tBuildingAbbr,\n\t\t\tRoom.IsApproved,\n\t\t\tBuilding.MapURL,\n\t\t\tOperators\")->\n\t\tfrom('Room')->\n\t\tjoin('Building', 'Building.BuildingID = Room.BuildingID')->\n\t\tjoin(\"\n\t\t\t(SELECT r.RoomID, GROUP_CONCAT(CONCAT(UserFname, ' ', UserLname)) AS Operators\n\t\t\tFROM User u\n\t\t\t\tJOIN UserRole ur ON u.UserID = ur.UserID\n\t\t\t\tJOIN UserRoom urm ON ur.UserRoleID = urm.UserRoleID\n\t\t\t\tJOIN Room r ON r.RoomID = urm.RoomID\n\t\t\tGROUP BY r.RoomID) AS other\", 'other.RoomID = Room.RoomID', 'left')->\n\t\tget();\n\n\t\treturn $query->result_array();\n\t}", "function helperGetAvailableRecords($catList='', $areaSearch='') {\n\t\t$where = ' lng!=0 AND lat!=0 '.$this->config['pid_list'];\n\n\t\tif (!empty($areaSearch)) {\n\t\t// build the query\n\t\t$areaArr= $this->intExplode('%2C%20',$areaSearch, 1);\n\t\t$where .= ' AND lng between '.$areaArr[1].' AND '.$areaArr[3].'\n\t\t\t\t\t\t\tAND\tlat between '.$areaArr[0].' AND '.$areaArr[2];\n\t\t}\n\n\t\t// if no category chosen, be sure no result gets displayed\n\t\tif($catList==9999) {\n\t\t\t$where .= ' AND 1=2 ';\n\t\t} elseif ($catList!='') {\n\n\t\t\t$catList = $this->intExplode(',', $catList);\n\t\t\tforeach ($catList as $key=>$value) {\n\t\t\t\t$where2 = ' FIND_IN_SET('.$value.',rggmcat) OR';\n\t\t\t}\n\t\t\t$where .= ' AND ( '.substr($where2,0,-3).' ) ';\n\t\t}\n\n\t\treturn $where;\n\t}", "public function index(Request $request)\n {\n $this->authorize('locations.index', Location::class);\n\n return LocationResource::collection(Location::all());\n }", "protected abstract function fetchLists();", "public function getSubLocations(LocationInterface $location): iterable;", "public function getFarmsEggs(){\n\t\t$url = 'http://www.vermontfresh.net/member-search/MemberSearchForm?Keywords=&ProductCategoryID=9&Categories%5B13%5D=13&RegionID=&action_doMemberSearch=Search';\n\t\treturn $this->parse_data($url);\n\t}", "public function getPlaces();", "public function index()\n {\n $invlocations = InvLocation::getAllInvLocation();\n return InvLocationResource::collection($invlocations);\n }", "public function list_items($limit = NULL, $offset = NULL, $col = 'nav_key', $order = 'desc', $just_count = FALSE)\n\t{\n\t\t$CI =& get_instance();\n\t\tif ($CI->fuel->language->has_multiple())\n\t\t{\n\t\t\t$this->db->select('id, label, if (nav_key != \"\", nav_key, location) AS location, precedence, language, hidden, published', FALSE);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->db->select('id, label, if (nav_key != \"\", nav_key, location) AS location, precedence, hidden, published', FALSE);\t\n\t\t}\n\t\t$data = parent::list_items($limit, $offset, $col, $order, $just_count);\n\t\treturn $data;\n\t}", "function showLocationBox () {\n\t\t$template['list'] = $this->cObj2->getSubpart($this->templateCode,'###TEMPLATE_LOCATIONBOX###');\n\t\t$markerArray = $this->helperGetLLMarkers(array(), $this->conf['location.']['LL'], 'location');\n\n\t\t$content = $this->cObj2->substituteMarkerArrayCached($template['list'],$markerArray);\n\t\treturn $content;\n\t}", "function rule_categories($offset, $limit, $phrase)\n\t{\n\t\tlog_message('debug', '_setting/rule_categories');\n\t\tlog_message('debug', '_setting/rule_categories:: [1] offset='.$offset.' limit='.$limit.' phrase='.$phrase);\n\n\t\t$values['phrase_condition'] = !empty($phrase)? \" AND A.category_display LIKE '%\".htmlentities($phrase, ENT_QUOTES).\"%'\": '';\n\t\t$values['limit_text'] = \" LIMIT \".$offset.\",\".$limit.\" \";\n\n\t\t$result = server_curl(IAM_SERVER_URL, array('__action'=>'get_list', 'query'=>'get_rule_category_list', 'variables'=>$values));\n\t\tlog_message('debug', '_setting/permission_group_details:: [2] result='.json_encode($result));\n\n\t\treturn $result;\n //return $values;\n\t}", "public function listingResult(Request $request){\n \n $listings=Listing::where('industry_id',$request->industry)->paginate(10);\n return view('user.pages.listing',compact('listings'));\n\n \n\n }", "public function home_pages($placement)\r\n\t{\r\n\t\t// Fetch pages without parents\r\n\t\t$this->db->select('id, title, slug, body, raw, menu_id');\r\n\t\t$this->db->where('position', $placement); \r\n\t\treturn parent::get(NULL, TRUE);\r\n\t}", "function all( $args )\n { \n // set the appropriate view\n\t\t$subview = array('browse_result');\n $this->view->add('subviews',$subview);\n \n \n /* ====================== \n * Get the listings model \n */\n $model = $this->app->model('listings');\n \n // get from settings, 10 as default\n $limit = $this->settings->get('per_page');\n $limit = ( $limit != null ) ? $limit : 10;\n \n // find if user has decided on some number already\n if( isset( $_SESSION['listings_per_page'] )){\n $limit = (int)$_SESSION['listings_per_page'];\n \n }\n \n // get the page number\n $page = 0;\n // convert to integer\n if( $args['page'] != null && is_numeric($args['page']) ){\n $page = ((int) $args['page'])-1;\n }\n \n \n // get result\n $result = $model->limit($limit)->page($page)->get_all();\n \n \n $count = $model->count_all();\n // set up counts\n $paginate = array(\n 'page_count' => ((int)ceil($count/$limit)),\n 'this_page' => $page+1\n );\n \n // add page count\n $this->view->add('paginate',$paginate);\n \n // add teh page action to the view\n $this->view->add('page_action',\n $this->app->form_path('browse/all') );\n \n // add the result to the view\n $this->view->add('listing_results', $result);\n }", "public function getLocationList($return_active_only = TRUE);", "public function getMyLandInfoList()\n {\n return $this->MyLandInfoList;\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "function _sf_get_listing_args($post) {\n\t\t\n\t\tglobal $paged;\n\t\t\n\t\t//// STARTS BASIC ARGUMENTS\n\t\t$args = array(\n\t\t\n\t\t\t'post_type' => 'spot',\n\t\t\t'meta_query' => array(),\n\t\t\t'tax_query' => array(),\n\t\t\t'posts_per_page' => _sf_get_posts_per_page(),\n\t\t\t'paged' => $paged,\n\t\t\n\t\t);\n\t\t\n\t\t///// IF IT'S A CATEGORY PAGE\n\t\tif(is_tax('spot_cats')) { \n\t\t\n\t\t\t$this_tax = get_term_by('name', single_cat_title('', false), 'spot_cats');\n\t\t\n\t\t\t$args['tax_query'][] = array(\n\t\t\t\n\t\t\t\t'taxonomy' => 'spot_cats',\n\t\t\t\t'terms' => $this_tax->term_id,\n\t\t\t\t'field' => 'ID',\n\t\t\t\n\t\t\t);\n\t\t\n\t\t}\n\t\t\n\t\t///// IF IT'S A TAG PAGE\n\t\tif(is_tax('spot_tags')) { \n\t\t\n\t\t\t$this_tax = get_term_by('name', single_cat_title('', false), 'spot_tags');\n\t\t\n\t\t\t$args['tax_query'][] = array(\n\t\t\t\n\t\t\t\t'taxonomy' => 'spot_tags',\n\t\t\t\t'terms' => $this_tax->term_id,\n\t\t\t\t'field' => 'ID',\n\t\t\t\n\t\t\t);\n\t\t\n\t\t}\n\t\t\n\t\tif(isset($post['p_ids'])) { $post_ids = $post['p_ids']; }\n\t\tif(!is_array($post['p_ids'])) { \n\t\t\t\n\t\t\t//// WE HAVE COMMAS IN IT, LET'S EXPLODE IT\n\t\t\tif(strpos($post['p_ids'], ',') !== false) {\n\t\t\t\t\n\t\t\t\t$post_ids = explode(',', $post['p_ids']);\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\t//// CHECKS IF WE ARE GETTING OLDEST FIRST\n\t\tif(_sf_get_list_sort() == 'oldest') {\n\t\t\t\n\t\t\t//// SETS OUR ORDER BY\n\t\t\t$args['order'] = 'ASC';\n\t\t\t\n\t\t}\n\t\t\n\t\t///// IF WE HAVE AN UNDERSCORE, WHICH MEANS WE ARE SORTING BY A FIELD\n\t\tif(strpos(_sf_get_list_sort(), '_')) {\n\t\t\t\n\t\t\tglobal $wpdb;\n\t\t\n\t\t\t//// LETS GET THE FIELD WE ARE SORTING BY\n\t\t\t$field_slug = array_shift(explode('_', _sf_get_list_sort()));\n\t\t\t$order = array_pop(explode('_', _sf_get_list_sort()));\n\t\t\t$field_id = $wpdb->get_var(\"SELECT ID FROM $wpdb->posts WHERE post_name = '\".$field_slug.\"' AND post_type = 'search_field'\");\n\t\t\t\n\t\t\t//// IF WE HAVE FOUND THE FIELD\n\t\t\tif(is_numeric($field_id)) {\n\t\t\t\t\n\t\t\t\t$search_field = get_post($field_id);\n\t\t\t\t\n\t\t\t\t//// BUILDS UP THE NEW QUERY\n\t\t\t\t$args['orderby'] = 'meta_value_num';\n\t\t\t\t$args['meta_key'] = '_sf_field_'.$field_id;\n\t\t\t\t\n\t\t\t\t//// IF ITS LOW TO HIGH\n\t\t\t\tif($order == 'low') { $args['order'] = 'ASC'; }\n\t\t\t\telse { $args['order'] = 'DESC'; }\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\tif(!isset($post_ids)) {\n\n\t\t\t///// CHECKS FOR SEARCH FIELDS BUT PNLY IF WE DONT HAVE ALREADY A LIST OF POST IDS\n\t\t\t$fields = $_GET;\n\t\t\tif (!is_array($fields)) { $fields = array(); }\n\n// DAHERO #1667462 STRT\n\t\t\tif ($fields['glat'] != '' &&\n\t\t\t\t$fields['glng'] != '' &&\n\t\t\t\t($lat_range = explode('|', $fields['glat'])) &&\n\t\t\t\t($lng_range = explode('|', $fields['glng'])) &&\n\t\t\t\tcount($lat_range) * count($lng_range) == 4 &&\n\t\t\t\tabs($lat_range[0]) <= 90 && abs($lat_range[1]) <= 90 &&\n\t\t\t\tabs($lng_range[1]) <= 180 && abs($lng_range[1]) <= 180 // &&\n//\t\t\t\t$fields['_sf_enable_radius_search'] != 'true'\n\t\t\t) {\n\t\t\t\tif ($lat_range[0] > $lat_range[1]) $lat_range = array_reverse($lat_range);\n\t\t\t\tif ($lng_range[0] > $lng_range[1]) $lng_range = array_reverse($lng_range);\n/*\n\t\t\t\t///// LETS CHECK FOR SENSITIVITY\n\t\t\t\tif (get_post_meta($field->ID, 'google_places_sensitivity', true) != '') {\n\t\t\t\t\t$sensitivity = get_post_meta($field->ID, 'google_places_sensitivity', true);\n\t\t\t\t\t//// IF ITS A NUMBER\n\t\t\t\t\tif(is_numeric($sensitivity) || is_float($sensitivity)) {\n\t\t\t\t\t\t//// IF WE ARE USING MILES LET'S PUT THAT TO KILOMETREST\n\t\t\t\t\t\tif(ddp('geo_distance_type') == 'Miles') { $sensitivity = $sensitivity/0.62137; }\n\t\t\t\t\t\t//// LET'S TRANSFORM THIS SENSITIVITY IN LATITUDE\n\t\t\t\t\t\t$lat_sensitivity = $sensitivity / 110.54;\n\t\t\t\t\t\t$lng_sensitivity = $sensitivity / (111.320*cos($lng_range[0]));\n\t\t\t\t\t\t///// LETS CHANGE OUR VARIABLES\n\t\t\t\t\t\t$lat_range[0] = $lat_range[0] - $lat_sensitivity;\n\t\t\t\t\t\t$lat_range[1] = $lat_range[1] + $lat_sensitivity;\n\t\t\t\t\t\t$lng_range[0] = $lng_range[0] - $lng_sensitivity;\n\t\t\t\t\t\t$lng_range[1] = $lng_range[1] + $lng_sensitivity;\n\t\t\t\t\t}\n\t\t\t\t}\n*/\n\t\t\t\t//// LETS DO OUR QUERY\n\t\t\t\t$args['meta_query'][] = array(\n\t\t\t\t\t'key' => 'latitude',\n\t\t\t\t\t'value' => $lat_range[0],\n\t\t\t\t\t'compare' => '>=',\n\t\t\t\t\t'type' => 'DECIMAL',\n\t\t\t\t);\n\t\t\t\t$args['meta_query'][] = array(\n\t\t\t\t\t'key' => 'latitude',\n\t\t\t\t\t'value' => $lat_range[1],\n\t\t\t\t\t'compare' => '<=',\n\t\t\t\t\t'type' => 'DECIMAL',\n\t\t\t\t);\n\t\t\t\t//// LETS DO OUR QUERY\n\t\t\t\t$args['meta_query'][] = array(\n\t\t\t\t\t'key' => 'longitude',\n\t\t\t\t\t'value' => $lng_range[0],\n\t\t\t\t\t'compare' => '>=',\n\t\t\t\t\t'type' => 'DECIMAL',\n\t\t\t\t);\n\t\t\t\t$args['meta_query'][] = array(\n\t\t\t\t\t'key' => 'longitude',\n\t\t\t\t\t'value' => $lng_range[1],\n\t\t\t\t\t'compare' => '<=',\n\t\t\t\t\t'type' => 'DECIMAL',\n\t\t\t\t);\n\t\t\t}\n// DAHERO #1667462 STOP\n\t\t\t\n\t\t\t//// GOES THROUGH EACH GET AND SEE IF IT\"S A FIELD\n\t\t\tforeach($fields as $field => $value) {\n\t\t\t\t\n\t\t\t\t///// IF ITS A SEARCH FIELD\n\t\t\t\tif($this_field = get_posts(array('name' => $field, 'post_type' => 'search_field', 'post_status' => 'publish', 'numberposts' => '1'))) {\n\t\t\t\t\t\n\t\t\t\t\t$this_field = array_pop($this_field);\n\t\t\t\t\t///// FIELD TYPE\n\t\t\t\t\t$field_type = get_post_meta($this_field->ID, 'field_type', true);\n\t\t\t\t\t\n\t\t\t\t\t///// IF IT'S A DROPDOWN\n\t\t\t\t\tif($field_type == 'dropdown') {\n\t\t\t\t\t\t//// IF WE ARE USING CATEGORIES\n\t\t\t\t\t\tif(get_post_meta($this_field->ID, 'dropdown_type', true) == 'categories') { \n\t\t\t\t\t\t\t/// FIRST LETS MAKE SURE THE TAXONOMY EXISTS\n\t\t\t\t\t\t\tif($this_tax = get_term_by('slug', $value, 'spot_cats')) {\n\t\t\t\t\t\t\t\t//// ADDS TO OUR QUERY\n\t\t\t\t\t\t\t\t$args['tax_query'][] = array(\n\t\t\t\t\t\t\t\t\t'taxonomy' => 'spot_cats',\n\t\t\t\t\t\t\t\t\t'field' => 'slug',\n\t\t\t\t\t\t\t\t\t'terms' => $value,\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t//// MAKES SURE THE VALUE EXISTS\n\t\t\t\t\t\t\tif(_sf_dropdown_value_exists($this_field->ID, $value)) {\n\t\t\t\t\t\t\t\t///// ADDS IT TO OUR QUERY\n\t\t\t\t\t\t\t\t$args['meta_query'][] = array(\n\t\t\t\t\t\t\t\t\t'key' => '_sf_field_'.$this_field->ID,\n\t\t\t\t\t\t\t\t\t'value' => $value,\n\t\t\t\t\t\t\t\t\t'compare' => 'LIKE',\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} //// ENDS IF DROPDOWN\n\t\t\t\t\t\n\t\t\t\t\t///// IF IT'S A DEPENDENT\n\t\t\t\t\tif($field_type == 'dependent') {\n\t\t\t\t\t\t$parent_id = get_post_meta($this_field->ID, 'dependent_parent', true);\n\t\t\t\t\t\t//// IF THE DEPENDENTS PARENT IS A CATEGORY\n\t\t\t\t\t\tif(get_post_meta($parent_id, 'dropdown_type', true) == 'categories') {\n\t\t\t\t\t\t\t/// FIRST LETS MAKE SURE THE TAXONOMY EXISTS\n\t\t\t\t\t\t\tif($this_tax = get_term_by('slug', $value, 'spot_cats')) {\n\t\t\t\t\t\t\t\t//// ADDS TO OUR QUERY\n\t\t\t\t\t\t\t\t$args['tax_query'][] = array(\n\t\t\t\t\t\t\t\t\t'taxonomy' => 'spot_cats',\n\t\t\t\t\t\t\t\t\t'field' => 'slug',\n\t\t\t\t\t\t\t\t\t'terms' => $value,\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t//// MAKES SURE THE VALUE EXISTS\n\t\t\t\t\t\t\tif(_sf_dependent_value_exists($this_field->ID, $value)) {\n\t\t\t\t\t\t\t\t///// ADDS IT TO OUR QUERY\n\t\t\t\t\t\t\t\t$args['meta_query'][] = array(\n\t\t\t\t\t\t\t\t\t'key' => '_sf_field_'.$this_field->ID,\n\t\t\t\t\t\t\t\t\t'value' => $value,\n\t\t\t\t\t\t\t\t\t'compare' => 'LIKE',\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} // ENDS IF DEPENDENT\n\t\t\t\t\t\n\t\t\t\t\t///// IF IT'S A RANGE\n\t\t\t\t\tif($field_type == 'range') {\n\t\t\t\t\t\t//// OUR MAXIMUM VALUE FIRST\n\t\t\t\t\t\tif(isset($fields[$field.'_max'])) {\n\t\t\t\t\t\t\t//// IF MAXIMUM FIELD IS SMALLER THAN OUR MAXIMUM\n\t\t\t\t\t\t\tif($fields[$field.'_max'] <= get_post_meta($this_field->ID, 'range_maximum', true)) {\n\t\t\t\t\t\t\t\t//// IF OUR MINIMUM IS GREATER THAN THE MAXIMUM\n\t\t\t\t\t\t\t\tif($fields[$field.'_min'] >= get_post_meta($this_field->ID, 'range_minimum', true)) {\n\t\t\t\t\t\t\t\t\t///// ADDS IT TO OUR QUERY\n\t\t\t\t\t\t\t\t\t$args['meta_query'][] = array(\n\t\t\t\t\t\t\t\t\t\t'key' => '_sf_field_'.$this_field->ID,\n\t\t\t\t\t\t\t\t\t\t'value' => array($fields[$field.'_min'], $fields[$field.'_max']),\n\t\t\t\t\t\t\t\t\t\t'compare' => 'BETWEEN',\n\t\t\t\t\t\t\t\t\t\t'type' => 'NUMERIC',\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} // ENDS IF RANGE\n\t\t\t\t\t\n\t\t\t\t\t///// IF IT'S A MINIMUM VALUE\n\t\t\t\t\tif($field_type == 'min_val' && is_numeric($value)) {\n\t\t\t\t\t\t///// ADDS IT TO OUR QUERY\n\t\t\t\t\t\t$args['meta_query'][] = array(\n\t\t\t\t\t\t\t'key' => '_sf_field_'.$this_field->ID,\n\t\t\t\t\t\t\t'value' => $value,\n\t\t\t\t\t\t\t'compare' => '>=',\n\t\t\t\t\t\t\t'type' => 'NUMERIC',\n\t\t\t\t\t\t);\n\t\t\t\t\t} // ENDS IF MINIMUM VALUE\n\t\t\t\t\t\n\t\t\t\t\t///// IF IT'S A MAXIMUM VALUE\n\t\t\t\t\tif($field_type == 'max_val' && is_numeric($value)) {\n\t\t\t\t\t\t///// ADDS IT TO OUR QUERY\n\t\t\t\t\t\t$args['meta_query'][] = array(\n\t\t\t\t\t\t\t'key' => '_sf_field_'.$this_field->ID,\n\t\t\t\t\t\t\t'value' => $value,\n\t\t\t\t\t\t\t'compare' => '<=',\n\t\t\t\t\t\t\t'type' => 'NUMERIC',\n\t\t\t\t\t\t);\n\t\t\t\t\t} // ENDS IF MINIMUM VALUE\n\t\t\t\t\t\n\t\t\t\t\t///// IF IT'S A CHECK FIELD\n\t\t\t\t\tif($field_type == 'check' && $value == true) {\n\t\t\t\t\t\t///// ADDS IT TO OUR QUERY\n\t\t\t\t\t\t$args['meta_query'][] = array(\n\t\t\t\t\t\t\t'key' => '_sf_field_'.$this_field->ID,\n\t\t\t\t\t\t\t'value' => 'on',\n\t\t\t\t\t\t\t'compare' => '==',\n\t\t\t\t\t\t);\n\t\t\t\t\t} // ENDS IF CHECKFIELD\n\t\t\t\t\t\n\t\t\t\t\t///// IF IT'S A KEYWORD\n\t\t\t\t\tif($field_type == 'text') {\n\t\t\t\t\t\t///// IF ITS A VALID TAG\n\t\t\t\t\t\tif($term = get_term_by('slug', $value, 'spot_tags')) {\n\t\t\t\t\t\t\t//// ADDS IT TO OUR QUERY\n\t\t\t\t\t\t\t$args['tax_query'][] = array(\n\t\t\t\t\t\t\t\t'terms' => $value,\n\t\t\t\t\t\t\t\t'field' => 'slug',\n\t\t\t\t\t\t\t\t'taxonomy' => 'spot_tags',\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t} // ENDS IF KEYWORD\n\n\t\t\t\t} /// ENDS IF A SEARCH FIELD\n\t\t\t} //// ENDS FOREACH\n\t\t} //// ENDS IF WE DONT HAVE A LIST OF POST IDS\n\t\t\t\n\t\tif(isset($post_ids)) { $args['post__in'] = $post_ids; }\n\t\t\n\t\t//echo '<pre>'; print_r($args); exit;\n\t\t\n\t\t//////////////////////////////////////////////////////\n\t\t//// IF WE ARE ORDERING BY DISTANCE\n\t\t//////////////////////////////////////////////////////\n\t\t\n\t\tif(_sf_get_list_sort() == 'closest') {\n\t\t\t\n\t\t\t/// IF THE ADMIN AHS ENABLED IT\n\t\t\tif(ddp('map_geolocation_sort')) {\n\t\t\t\t\n\t\t\t\t///// IF WE CAN GET OUR LATITUDE AND LONGITUDE COOKIE\n\t\t\t\tif(isset($_COOKIE['user_latitude']) && isset($_COOKIE['user_longitude'])) {\n\t\t\t\t\t\n\t\t\t\t\t$latitude = $_COOKIE['user_latitude'];\n\t\t\t\t\t$longitude = $_COOKIE['user_longitude'];\n\t\t\t\t\n\t\t\t\t\tglobal $wpdb;\n\t\t\t\t\t\n\t\t\t\t\t//// IF WE HAVE A LIST OF POST IDS\n\t\t\t\t\tif(!isset($post_ids)) { $post_ids = array(); }\n\t\t\t\t\tif(!is_array($post_ids)) { $post_ids = array(); }\n\t\t\t\t\t\n\t\t\t\t\t//// MAEKS SURE WE DONT HAVE ANY INVALID POST IDS IN THERE\n\t\t\t\t\t$i = 0; foreach($post_ids as $single_id) { if(!is_numeric($single_id) || $single_id == '') { unset($post_ids[$i]); $i++; } }\n\t\t\t\t\t\n\t\t\t\t\t//// LET'S DO A CUSTOM QUERY TO RETURN ALL POSSIBLE ITEMS BY DISTANCE\n\t\t\t\t\t$distance_query_string = \"\n\t\t\t\t\t\n\t\t\t\t\t\tSELECT\n\t\t\t\t\t\t\t{$wpdb->prefix}posts.ID,\n\t\t\t\t\t\t\tlatitude.meta_value as latitude,\n\t\t\t\t\t\t\tlongitude.meta_value as longitude,\n\t\t\t\t\t\t\t6371 * acos( cos( radians({$latitude}) ) * cos( radians( latitude.meta_value ) ) * cos( radians ( longitude.meta_value ) - radians({$longitude}) ) + sin( radians({$latitude}) ) * sin( radians ( latitude.meta_value ) ) ) as 'distance'\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tFROM \n\t\t\t\t\t\t\t{$wpdb->prefix}postmeta as latitude,\n\t\t\t\t\t\t\t{$wpdb->prefix}postmeta as longitude,\n\t\t\t\t\t\t\t{$wpdb->prefix}posts\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tWHERE \";\n\t\t\t\t\t\t\n\t\t\t\t\t//// IF WE HAVE A LIST OF POST IDS\n\t\t\t\t\tif(sizeof($post_ids) > 0) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t$distance_query_string .= \"\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t1=1 AND {$wpdb->prefix}posts.ID IN\n\t\t\t\t\t\t\t(\".implode(',', $post_ids).\")\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tAND\n\t\t\t\t\t\t\n\t\t\t\t\t\t\";\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t$distance_query_string .= \"(\n\t\t\t\t\t\t\t{$wpdb->prefix}posts.ID = latitude.post_id\n\t\t\t\t\t\t\tAND latitude.meta_key = 'latitude'\n\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tAND (\n\t\t\t\t\t\t\t{$wpdb->prefix}posts.ID = longitude.post_id\n\t\t\t\t\t\t\tAND longitude.meta_key = 'longitude'\n\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tAND {$wpdb->prefix}posts.post_status = 'publish'\n\t\t\t\t\t\tAND {$wpdb->prefix}posts.post_type = 'spot'\n\t\t\t\t\t\t\n\t\t\t\t\t\tORDER BY distance\n\t\t\t\t\t\n\t\t\t\t\t\";\n\t\t\t\t\t\n\t\t\t\t\t$results = $wpdb->get_results($distance_query_string);\n\t\t\t\t\t\n\t\t\t\t\t$post__in_arr = array();\n\t\t\t\t\t\n\t\t\t\t\tforeach($results as $single_result) { array_push($post__in_arr, $single_result->ID); }\n\t\t\t\t\t\n\t\t\t\t\t$args['post__in'] = $post__in_arr;\n\t\t\t\t\t$args['orderby'] = 'post__in';\n\t\t\t\t\t\n\t\t\t\t\t//// LET'S ADD SOME OF OUR METAQUERIES IN THERE JUST SO WE HAVE LESS STUFF TO GO THROUGH\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t///// IF WE ARE SORTING BY RATING\n\t\tif(_sf_get_list_sort() == 'ratingdesc' || _sf_get_list_sort() == 'ratingasc') {\n\t\t\t\n\t\t\t//// IF WE ARE ABLE TO\n\t\t\tif(ddp('rating') == 'on' && ddp('rating_sortby') == 'on') {\n\t\t\t\t\n\t\t\t\t//// IF WE ARE SORTING DESC\n\t\t\t\tif(_sf_get_list_sort() == 'ratingdesc') {\n\t\t\t\t\t\n\t\t\t\t\t$args['orderby'] = 'meta_value_num';\n\t\t\t\t\t$args['meta_key'] = 'rating';\n\t\t\t\t\t$args['order'] = 'DESC';\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//// IF WE ARE SORTING DESC\n\t\t\t\tif(_sf_get_list_sort() == 'ratingasc') {\n\t\t\t\t\t\n\t\t\t\t\t$args['orderby'] = 'meta_value_num';\n\t\t\t\t\t$args['meta_key'] = 'rating';\n\t\t\t\t\t$args['order'] = 'ASC';\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t//// RETRUN ARGUMENTS\n\t\treturn $args;\n\t\t\n\t}", "function &urlList( $type, $category = 0, $offset = 0 )\r\n {\r\n $ini =& INIFile::globalINI();\r\n $ret = false;\r\n switch( $type )\r\n {\r\n case \"article\":\r\n {\r\n include_once( \"ezarticle/classes/ezarticle.php\" );\r\n include_once( \"ezarticle/classes/ezarticlecategory.php\" );\r\n $limit = $ini->read_var( \"eZArticleMain\", \"AdminListLimit\" );\r\n $cat = new eZArticleCategory( $category );\r\n $categories = $cat->getByParent( $cat, false, \"name\" );\r\n $articles = $cat->articles( \"alpha\", false, true, $offset, $limit );\r\n $num_articles = $cat->articleCount( false, true );\r\n $path = $cat->path( $category );\r\n $category_path = array();\r\n foreach( $path as $path_item )\r\n {\r\n $category_path[] = array( \"id\" => $path_item[0],\r\n \"name\" => $path_item[1] );\r\n }\r\n $category_array = array();\r\n $category_url = \"/article/archive\";\r\n foreach( $categories as $category )\r\n {\r\n $id = $category->id();\r\n $url = \"$category_url/$id\";\r\n $category_array[] = array( \"name\" => $category->name(),\r\n \"id\" => $id,\r\n \"url\" => $url );\r\n }\r\n $article_array = array();\r\n $article_url = \"/article/view\";\r\n foreach( $articles as $article )\r\n {\r\n $id = $article->id();\r\n $cat = $article->categoryDefinition();\r\n $cat = $cat->id();\r\n $url = \"$article_url/$id/$cat/1\";\r\n $article_array[] = array( \"name\" => $article->name(),\r\n \"id\" => $id,\r\n \"url\" => $url );\r\n }\r\n $ret = array();\r\n $ret[\"path\"] = $category_path;\r\n $ret[\"categories\"] = $category_array;\r\n $ret[\"items\"] = $article_array;\r\n $ret[\"item_total_count\"] = $num_articles;\r\n $ret[\"max_items_shown\"] = $limit;\r\n break;\r\n }\r\n }\r\n return $ret;\r\n }", "public function all_locations() {\n\t\t// Globals\n\t\tglobal $wpdb;\n\t\t\n\t\t// Load the location from the db\n\t\t$sql = \"SELECT * FROM `\" . rpids_tableprefix() . \"rpids_locations` ORDER BY `location` ASC;\";\n\t\t$sqlret = $wpdb->get_results( $sql, ARRAY_A );\n\t\t\n\t\t// Set the return array\n\t\t$return = new StdClass();\n\t\t\n\t\t// Loop through each result and process\n\t\tforeach( $sqlret as $location ) {\n\t\t\t// Group IDs are stored as an array. Make sure it is actually an array.\n\t\t\t$location['groups'] = rpids_unserialize( $location['groups'] );\n\t\t\t\n\t\t\t// Add location info to an array\n\t\t\t$return->$location['id'] = new StdClass();\n\t\t\t$return->$location['id']->id = $location['id'];\n\t\t\t$return->$location['id']->name = $location['location'];\n\t\t\t$return->$location['id']->groups = (object) $location['groups'];\n\t\t\t$return->$location['id']->weather_id = $location['weather_id'];\n\t\t\t$return->$location['id']->layout_id = $location['layout_id'];\n\t\t}\n\t\t\n\t\t// Return everything as an object\n\t\treturn $return;\n\t}", "function showDirections() {\n\t\t$smallConf = $this->conf['directions.'];\n\n\t\t$subpartArray = array();\n\t\t$markerArray = $this->helperGetLLMarkers(array(), $smallConf['LL'], 'directions');\n\n\t\t// query\n\t\t$table = $this->config['tables'];\n\t\t$field = '*';\n\t\t$where = $this->helperGetAvailableRecords($this->config['categories']);\n\t\t$orderBy = $smallConf['orderBy'];\n\t\t$limit = $smallConf['limit'];\n\t\t$res = $this->generic->exec_SELECTquery($field, $table, $where, '', $orderBy, $limit);\n\n\t\t// if just 1 result, render a different subpart\n\t\tif (count($res) == 1) {\n\t\t\t$suffix = '_SINGLE';\n\t\t\t$subpartArray['###HIDE_MULTISELECTION###'] = '';\n\t\t} else {\n\t\t\t$suffix = '';\n\t\t\t$subpartArray['###HIDE_SINGLESELECTION###'] = '';\n\t\t}\n\n\t\t$template['list'] = $this->cObj2->getSubpart($this->templateCode, '###TEMPLATE_DIRECTIONS###');\n\t\t$template['item'] = $this->cObj2->getSubpart($template['list'], '###SINGLE' . $suffix . '###');\n\n\t\t$content_item = '';\n\t\twhile ($row=array_shift($res)) {\n\t\t\t$markerArray = $this->getMarker($row, 'directions.');\n\t\t\t$content_item .= $this->cObj->substituteMarkerArrayCached($template['item'], $markerArray, array(), $wrappedSubpartArray);\n\t\t}\n\n\t\t$subpartArray['###CONTENT' . $suffix . '###'] = $content_item;\n\n\t\t$markerArray['###DEFAULT_COUNTRY###'] = $this->config['defaultCountry'];\n\n\t\t$content = $this->cObj2->substituteMarkerArrayCached($template['list'], $markerArray, $subpartArray);\n\t\treturn $content;\n\t}" ]
[ "0.62172973", "0.607114", "0.5840782", "0.5789351", "0.57889295", "0.57296777", "0.566635", "0.56627524", "0.564338", "0.56263614", "0.555925", "0.55474997", "0.5512467", "0.55071145", "0.5496947", "0.5473101", "0.5467323", "0.54619676", "0.54393935", "0.54306227", "0.54259634", "0.5422482", "0.5420676", "0.54160774", "0.54063153", "0.54041487", "0.5403311", "0.53748536", "0.53708637", "0.53678197", "0.536072", "0.53594375", "0.53578424", "0.53429633", "0.5333536", "0.53327936", "0.53096324", "0.53023744", "0.5295676", "0.5264256", "0.52641505", "0.52639127", "0.5246859", "0.52460814", "0.5244076", "0.52368903", "0.5230348", "0.52293104", "0.5222922", "0.5189545", "0.5185876", "0.51801485", "0.51562864", "0.51504195", "0.51414186", "0.5138936", "0.5128346", "0.51274186", "0.5127236", "0.5124766", "0.51211107", "0.51065284", "0.5103181", "0.51014054", "0.509472", "0.5091815", "0.509177", "0.5070001", "0.5056801", "0.50550973", "0.50537777", "0.504801", "0.5040726", "0.50369984", "0.5029737", "0.50238216", "0.5016367", "0.5015231", "0.5015231", "0.500229", "0.49971417", "0.49894843", "0.4979441", "0.49776003", "0.49767876", "0.49710366", "0.49672267", "0.49598628", "0.49530265", "0.49480617", "0.49471247", "0.49446827", "0.4942741", "0.4940643", "0.49394402", "0.49387425", "0.49368095", "0.49342543", "0.49199212", "0.49195454" ]
0.78246146
0
Return the Grouping subcategory id
public function getSubcategoryId() { return $this->subcategoryId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getId(){\n return $this->_sub_cat_id;\n }", "public function getSubcategory_id()\n {\n return $this->subcategory_id;\n }", "private function getSubCategoryId($subCategoryName)\n {\n if (!isset($this->subCategoryNameToIdMap[$subCategoryName])) {\n $sql = \"insert into SUBCATEGORY (SubCategoryName, CategoryId) values (?, ?)\";\n $stmt = $this->dbh->prepare($sql);\n $stmt->execute([$subCategoryName, $this->mainCategoryId]);\n $subcategoryId = $this->dbh->lastInsertId();\n $this->subCategoryNameToIdMap[$subCategoryName] = $subcategoryId;\n }\n\n return $this->subCategoryNameToIdMap[$subCategoryName];\n }", "public static function getCategoryId($category, $subcategory)\n {\n switch ($category) {\n case 'filmvideo':\n switch ($subcategory) {\n case 'animation':\n $category_id = self::CATEGORY_FILMVIDEO_ANIMATION;\n break;\n case 'animationserie':\n $category_id = self::CATEGORY_FILMVIDEO_ANIMATIONSERIE;\n break;\n case 'concert':\n $category_id = self::CATEGORY_FILMVIDEO_CONCERT;\n break;\n case 'documentaire':\n $category_id = self::CATEGORY_FILMVIDEO_DOCUMENTAIRE;\n break;\n case 'emissiontv':\n $category_id = self::CATEGORY_FILMVIDEO_EMISSIONTV;\n break;\n case 'film':\n $category_id = self::CATEGORY_FILMVIDEO_FILM;\n break;\n case 'serietv':\n $category_id = self::CATEGORY_FILMVIDEO_SERIETV;\n break;\n case 'spectacle':\n $category_id = self::CATEGORY_FILMVIDEO_SPECTACLE;\n break;\n case 'sport':\n $category_id = self::CATEGORY_FILMVIDEO_SPORT;\n break;\n case 'videoclips':\n $category_id = self::CATEGORY_FILMVIDEO_VIDEOCLIP;\n break;\n default:\n $category_id = self::CATEGORY_FILMVIDEO;\n break;\n }\n break;\n case 'audio':\n switch ($subcategory) {\n case 'karaoke':\n $category_id = self::CATEGORY_AUDIO_KARAOKE;\n break;\n case 'musique':\n $category_id = self::CATEGORY_AUDIO_MUSIQUE;\n break;\n case 'podcastradio':\n $category_id = self::CATEGORY_AUDIO_PODCASTRADIO;\n break;\n case 'samples':\n $category_id = self::CATEGORY_AUDIO_SAMPLES;\n break;\n default:\n $category_id = self::CATEGORY_AUDIO;\n break;\n }\n break;\n case 'application':\n switch ($subcategory) {\n case 'autre':\n $category_id = self::CATEGORY_APPLICATION_AUTRE;\n break;\n case 'formation':\n $category_id = self::CATEGORY_APPLICATION_FORMATION;\n break;\n case 'linux':\n $category_id = self::CATEGORY_APPLICATION_LINUX;\n break;\n case 'macos':\n $category_id = self::CATEGORY_APPLICATION_MACOS;\n break;\n case 'smartphone':\n $category_id = self::CATEGORY_APPLICATION_SMARTPHONE;\n break;\n case 'tablette':\n $category_id = self::CATEGORY_APPLICATION_TABLETTE;\n break;\n case 'windows':\n $category_id = self::CATEGORY_APPLICATION_WINDOWS;\n break;\n default:\n $category_id = self::CATEGORY_APPLICATION;\n break;\n }\n break;\n case 'jeuvideo':\n switch ($subcategory) {\n case 'autre':\n $category_id = self::CATEGORY_JEUVIDEO_AUTRE;\n break;\n case 'linux':\n $category_id = self::CATEGORY_JEUVIDEO_LINUX;\n break;\n case 'macos':\n $category_id = self::CATEGORY_JEUVIDEO_MACOS;\n break;\n case 'microsoft':\n $category_id = self::CATEGORY_JEUVIDEO_MICROSOFT;\n break;\n case 'nintendo':\n $category_id = self::CATEGORY_JEUVIDEO_NINTENDO;\n break;\n case 'smartphone':\n $category_id = self::CATEGORY_JEUVIDEO_SMARTPHONE;\n break;\n case 'sony':\n $category_id = self::CATEGORY_JEUVIDEO_SONY;\n break;\n case 'tablette':\n $category_id = self::CATEGORY_JEUVIDEO_TABLETTE;\n break;\n case 'windows':\n $category_id = self::CATEGORY_JEUVIDEO_WINDOWS;\n break;\n default:\n $category_id = self::CATEGORY_JEUVIDEO;\n break;\n }\n break;\n case 'ebook':\n switch ($subcategory) {\n case 'audio':\n $category_id = self::CATEGORY_EBOOK_AUDIO;\n break;\n case 'bds':\n $category_id = self::CATEGORY_EBOOK_BDS;\n break;\n case 'comics':\n $category_id = self::CATEGORY_EBOOK_COMICS;\n break;\n case 'livres':\n $category_id = self::CATEGORY_EBOOK_LIVRES;\n break;\n case 'mangas':\n $category_id = self::CATEGORY_EBOOK_MANGAS;\n break;\n case 'presse':\n $category_id = self::CATEGORY_EBOOK_PRESSE;\n break;\n default:\n $category_id = self::CATEGORY_EBOOK;\n break;\n }\n break;\n case 'emulation':\n switch ($subcategory) {\n case 'emulateurs':\n $category_id = self::CATEGORY_EMULATION_EMULATEURS;\n break;\n case 'roms':\n $category_id = self::CATEGORY_EMULATION_ROMS;\n break;\n default:\n $category_id = self::CATEGORY_EMULATION;\n break;\n }\n break;\n case 'gps':\n switch ($subcategory) {\n case 'applications':\n $category_id = self::CATEGORY_GPS_APPLICATIONS;\n break;\n case 'cartes':\n $category_id = self::CATEGORY_GPS_CARTES;\n break;\n case 'divers':\n $category_id = self::CATEGORY_GPS_DIVERS;\n break;\n default:\n $category_id = self::CATEGORY_GPS;\n break;\n }\n break;\n case 'xxx':\n switch ($subcategory) {\n case 'films':\n $category_id = self::CATEGORY_XXX_FILMS;\n break;\n case 'hentai':\n $category_id = self::CATEGORY_XXX_HENTAI;\n break;\n case 'images':\n $category_id = self::CATEGORY_XXX_IMAGES;\n break;\n default:\n $category_id = self::CATEGORY_XXX;\n break;\n }\n break;\n default:\n $category_id = false;\n break;\n }\n\n return $category_id;\n }", "public function id_sub_kriteria()\n {\n $q = $this->db->query(\"select MAX(RIGHT(id_sub_kriteria,5)) as id_max from tbl_sub_kriteria\");\n $id = \"\";\n if ($q->num_rows() > 0) {\n foreach ($q->result() as $k) {\n $tmp = ((int) $k->id_max) + 1;\n $id = sprintf(\"%05s\", $tmp);\n }\n } else {\n $id = \"00001\";\n }\n return \"SKR-\" . $id;\n }", "function achieve_get_sub_category()\r\n{\r\n global $sql;\r\n\r\n $sub_cat = array();\r\n $result = $sql[\"dbc\"]->query(\"SELECT ID, ParentID, Name FROM achievement_category WHERE ParentID<>-1 ORDER BY `GroupID` ASC\");\r\n $temp = $sql[\"dbc\"]->fetch_assoc($result);\r\n while ($sub_cat[$temp[\"ParentID\"]][$temp[\"ID\"]] = $temp[\"Name\"])\r\n {\r\n $temp = $sql[\"dbc\"]->fetch_assoc($result);\r\n }\r\n return $sub_cat;\r\n}", "public function getSub_category(){\n return $this->sub_category;\n }", "public function getCategory_id()\n {\n return $this->category_id;\n }", "public function getCategory_id()\n {\n return $this->category_id;\n }", "public function getCategory_id()\n {\n return $this->category_id;\n }", "public function getSubclassId();", "public function getIdCategory(){\n return $this->idCategory;\n }", "protected function getCatSubmodId($modId){\n return $this->owner . '_cat';\n }", "public function getIdCat()\n {\n return $this->id_cat;\n }", "function editSubCategory()\n\t{ \n\t\t$id=$_GET['prodid'];\n\n\t\tif(((int)$id)>0)\n\t\t{\n\t\t\t$sql='select * from products_table where product_id='.$id;\n\t\t\t\n\t\t\t$obj=new Bin_Query();\n\t\t\t\n\t\t\t$obj->executeQuery($sql);\n\t\t\t\n\t\t\t$sqlid=\"SELECT category_id,category_parent_id FROM category_table where category_id in(select category_id from products_table where category_id='\".$obj->records[0]['category_id'].\"')\";\n\t\t\t\n\t\t\t$query=new Bin_Query();\n\t\t\t\n\t\t\t$query->executeQuery($sqlid);\n\t\t\t\n\t\t\t$category=Core_Settings_CManageProducts::displayCategory($query->records[0]['category_parent_id']);\n\t\t\t\n\t\t\t$sqlid='select category_id from category_table where category_id in(select sub_category_id from products_table where product_id='.$id.')';\n\t\t\t\n\t\t\t$query=new Bin_Query();\n\t\t\t\n\t\t\t$query->executeQuery($sqlid);\n\t\t\t\n\t\t\t$subcat=Core_Settings_CManageProducts::displaySubCategory($query->records[0]['category_id']);\n\t\t\t\n\t\t\treturn $subcat;\n\t }\n\t}", "private function getCategoryID() {\n return 0;\n }", "public function getId_cat()\n {\n return $this->id_cat;\n }", "public function getSubCategoryByCategoryId($id){\n //$this->db->select('id,sub_category');\n $query = $this->db->get_where('sub_category',array('category_id' => $id));\n return $query->result(); \n }", "public function get_category_id(){\n\t\treturn $this->_categoryid;\n\t}", "public function getCatId()\n {\n return $this->getParamCatId();\n }", "public function getIdentifier() {\n\t\tif (empty($this->_id) && $this->_hasCategory) {\n\t\t\t$this->_id = $this->_getCategory()->getId();\n\t\t}\n\t\treturn $this->_id;\n\t}", "public function getIdKategoria() {\n return $this->idKategoria;\n }", "function editSubUnderCategory()\n\t{\n\n\t\t$id=$_GET['prodid'];\n\n\t\tif(((int)$id)>0)\n\t\t{\n\t\t\t $sql='select * from products_table where product_id='.$id;\n\t\t\t\n\t\t\t$obj=new Bin_Query();\n\t\t\t\n\t\t\t$obj->executeQuery($sql);\n\t\t\t\n\t\t\t$sqlid=\"SELECT * FROM category_table where sub_category_parent_id='\".$obj->records[0]['sub_category_id'].\"' AND category_parent_id ='\".$obj->records[0]['category_id'].\"'\"; \n\t\t\t\n\t\t\t$query=new Bin_Query();\n\t\t\t\n\t\t\t$query->executeQuery($sqlid);\n\t\t\t\n\t\t\treturn Display_DManageProducts::displaySubUnderCategory($query->records,$obj->records[0]['sub_under_category_id']);\n\t\t\t\n\t }\n\n\n\t}", "public function getGroupid()\n {\n return $this->groupid;\n }", "function displaySubCategory($subcatid)\n\t{\n\n\n\t\t$id=(int)$_GET['id'];\n\t\t\n\t\tif($_GET['id']!='')\n\t\t{\n\t \t\tif(is_int($id))\n\t\t \t{\n\t\t\t\t$sql = \"SELECT * FROM category_table where category_parent_id=\".$subcatid.\" AND sub_category_parent_id=0 \" ;\n\t\t\t\t\n\t\t\t\t$query = new Bin_Query();\n\t\t\t\t\n\t\t\t\t$query->executeQuery($sql);\n\t\t\t\t\n\t\t\t\treturn Display_DManageProducts::displaySubCategory($query->records,$subcatid);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\n\t\t\t$sqlpro=\"SELECT * FROM products_table WHERE product_id ='\".$_GET['prodid'].\"'\";\n\t\t\t$objpro=new Bin_Query();\n\t\t\t$objpro->executeQuery($sqlpro);\n\t\t\t$subcatid=$objpro->records[0]['category_id'];\n\t\t\t$subselected=$objpro->records[0]['sub_category_id'];\n\t\t\t\t\t\t\n\t\t\t$sql = \"SELECT * FROM category_table where category_parent_id=\".$subcatid.\" AND sub_category_parent_id=0\" ;\n\t\t\t\n\t\t\t$query = new Bin_Query();\n\t\t\t\n\t\t\t$query->executeQuery($sql);\n\t\t\t\n\t\t\treturn Display_DManageProducts::displaySubCategory($query->records,$subselected);\n\t\t}\n\t\t\t\n\t}", "private function newId() {\n $exist_nums = App::getDb()->query('SELECT idCat FROM categories ORDER BY idCat');\n $exist_nums = $exist_nums->fetchAll(PDO::FETCH_OBJ);\n $new_id = 1;\n foreach($exist_nums as $nums) {\n if($nums->idCat != $new_id) break;\n $new_id++;\n }\n return $new_id;\n }", "public function get_category_id() {\n return (int)get_config('block_homework_diary', 'course_category');\n }", "public function getCat_id() {\n return $this->cat_id;\n }", "private function createGroup() {\n $query = \"\n SELECT (MAX(id) + 1) AS id\n FROM tags_group\";\n\n $result = $this->db->query($query)->fetch_assoc();\n $id = intval($result['id']);\n\n return $id;\n }", "function get_subcategoria($id){\t\n\t\t$sql=\"SELECT nombre_sub FROM subcategoria WHERE id_sub='$id'\";\n\t\t$consulta=mysql_query($sql) or die(mysql_error());\n\t\t$resultado=mysql_fetch_array($consulta);\n\n\t\treturn $resultado['nombre_sub'];\n\t}", "function get_contentgroup_id()\n\t{\n\t\treturn $this->contentgroup_id;\n\t}", "protected function AddCategory($subcat,$parent) {\n if($subcat == \"\" || $subcat == \"0\") {\n return $parent;\n } else {\n if((int)$subcat > 0) {\n return $subcat;\n } else {\n $subcat = substr($subcat,2);\n }\n }\n\n $category = new Categories();\n $category->name = $subcat;\n $category->parent = $parent;\n $category->status = 1;\n //$category->created = date('Y-m-d H:i:s');\n $this->getEntityManager()->persist($category);\n $this->getEntityManager()->flush();\n return $category->id;\n}", "public function get_categorieId()\n {\n return $this->_categorieId;\n }", "public function getIdCategoryDefault(){\n\n /*TODO refactor*/ \n $idDefault = '3';\n\n $rootCategoryId = Mage::app()->getStore(\"default\")->getRootCategoryId() ;\n\n if(isset($rootCategoryId) && $rootCategoryId > 0)\n $idDefault = $rootCategoryId + 1 ;\n\n return $idDefault ;\n }", "function getId() {\n\t\treturn $this->getData('sectionDecisionId');\r\n\t}", "public function getIdCategorie(): int\n {\n return $this->id_categorie;\n }", "public function list_subCategory($category_id){\n $sqlQuery=\"select *,sidhus_category.cat_name from sidhus_subcategory inner join sidhus_category on sidhus_category.category_id=sidhus_subcategory.category_id where sidhus_subcategory.category_id = \". $category_id;\n //$sqlQuery= \"select * from make_an_offer INNER JOIN sell_product ON sell_product.sell_id=make_an_offer.product_id where sell_product.customer_id = \". $customer_id;\n $result=$this->con->query($sqlQuery);\n $this->con->close();\n return $result;\n }", "function group_id($group_id=null)\n {\n if (isset($group_id)) {\n $this->group_id = intval($group_id);\n }\n return $this->group_id;\n }", "public function subcategory()\n {\n return $this->belongsTo(Subcategory::class,'sub_category_id','id');\n }", "public function getSubCategories($catId) {\n $subCatId = array ();\n $children = Mage::getModel ( 'catalog/category' )->getCategories ( $catId );\n foreach ( $children as $_children ) {\n $subCatId [] = $_children->getId ();\n \n }\n return $subCatId;\n }", "public function getSpecimenId()\n {\n \t#$testCategoryName = $this->testType->testCategory->name;\n \t#return substr($testCategoryName, 0 , 3).'-'.$this->specimen->id;\n\t\treturn $this->specimen->accession_number;\n }", "public function getId() : int\n {\n return $this->getValue('nb_commerce_product_category_id');\n }", "function getSubCategoryName($subCatId)\n {\n $categoryResult = $this->findById($subCatId);\n return $categoryResult;\n }", "public function getCategoryId(): string\n {\n return $this->categoryId;\n }", "public function subcategory()\n {\n return $this->belongsTo(Subcategory::class, 'subcategory_id');\n }", "public function getId_categorie()\n {\n return $this->id_categorie;\n }", "public function getSubchannelId()\n {\n return $this->subchannelId;\n }", "public function returnUpdateCat() {\n return $this->category_id;\n }", "public function getIdGroup()\n {\n return $this->groupid;\n }", "public function getIdCategoria()\n {\n return $this->id_categoria;\n }", "public function getIdCategoria()\n {\n return $this->id_categoria;\n }", "function getChildCategoryTitleById( $sub_cate_id)\n\t{\n\t\t$q = \"SELECT sub_cate_title FROM title_dev_sub_categories WHERE sub_cate_id = \".$sub_cate_id;\n\t\t$r = $this -> db -> getSingleRecord( $q );\n\t\tif( $r )\n\t\t\treturn $r['sub_cate_title'];\n\t\telse\n\t\t\treturn false;\n\t}", "private function _storeCreatedCategoryId() {\r\n $I = $this->BackendTester;\r\n\r\n $I->click('.row-title');\r\n\r\n $tagId = null;\r\n\r\n $url = $I->grabFromCurrentUrl();\r\n\r\n $url = substr($url, strpos($url, '?') + 1);\r\n\r\n parse_str($url, $array);\r\n\r\n if (isset($array['tag_ID']))\r\n $tagId = $array['tag_ID'];\r\n\r\n $I->setVar('category_id', $tagId);\r\n\r\n return $tagId;\r\n }", "public function subcategory()\n {\n return $this->belongsTo(SubCategory::class);\n }", "public function getCategoryId() { return $this->categoryId; }", "public function get_sub_cat($sub_cat_id = ''){\n\t\tif($sub_cat_id !== ''){\n\t\t\t// getting specific sub category if sub category id is passed in parameter\n\t\t\t$query = $this->db->get_where('sub_categories', array('id' => $sub_cat_id));\n\t\t\treturn $query->row();\n\t\t}\n\t\t// getting all sub categories\n\t\t$query = $this->db->get('sub_categories');\n\t\treturn $query->result();\n\t}", "private function getParamCatId()\n {\n $catid = $this->getMenuParams()->get( 'catid', 0 );\n return (int)$catid;\n }", "public function aggregateId();", "public function getAttributeByChildcategory($subcat_id){\n \t$subchildcategories = Category::where('subcategory_id', $subcat_id)->get();\n $output = '';\n if(count($subchildcategories)>0){\n $output .= '<option value=\"\">Select Subcategory</option>';\n foreach($subchildcategories as $subchildcategory){\n $output .='<option '. (old(\"subcategory\") == $subchildcategory->id ? \"selected\" : \"\" ).' value=\"'.$subchildcategory->id.'\">'.$subchildcategory->name.'</option>';\n }\n }\n echo $output;\n }", "public function getSubgroup() {}", "public function sub_category($id){\n\n $compact = array();\n $compact['title']=$this->modName;\n $compact['models']=$this->model->where('parent_id',$id)->orderBy('position')->get();\n $compact['cat_parent']=$this->model->where('id',$id)->first();\n $compact['parent_id']=$compact['cat_parent']->parent_id;\n $compact['id'] = $id;\n\n return view($this->viewPr.'index',['compact'=>$compact]);\n \n \t\t}", "public function show($_category_id, $_sub_category_id)\n {\n $category = $this->find(new Category(), $_category_id);\n\n $subcategory = Category::where([\n ['id', '=', $this->hashids_decode($_sub_category_id)],\n ['category_id', '=', $category->id]\n ])->active()->first();\n\n if(!$subcategory)\n throw new \\Exception(_i(\"El ID ingresado no esa válido.\"), 400);\n\n return $subcategory;\n }", "public function setId($id){\n $this->_sub_cat_id = $id;\n }", "public function getIdcategoria()\n {\n return $this->idcategoria;\n }", "public function getParentId()\n {\n return $this->getValue('nb_commerce_product_category_parent_id');\n }", "public function getWebCategoryID()\n {\n return $this->webCategoryID;\n }", "function get_sub_cat($cat_main, $catrow )\n{\n\tglobal $db;\n\n\tif ($cat_main > 0)\n\t{\n\t\t$sql= \"SELECT * FROM \".CATEGORIES_TABLE.\" WHERE cat_id <> $cat_main AND cat_main=$cat_main\";\n\t\tif( !($result = $db->sql_query($sql)) ) message_die(GENERAL_ERROR, 'Could not query categorie sons '.$sql, '', __LINE__, __FILE__, $sql);\n\t\twhile ( $catw = $db->sql_fetchrow($result) )\n\t\t{\n\t\t\t$i = count($catrow);\n\t\t\t$catrow[$i] = $catw;\n\t\t\tif ($catw['cat_id'] > 0)\n\t\t\t\t$catrow = get_sub_cat($catw['cat_id'],$catrow);\n\t\t}\n\t}\n\treturn $catrow;\n}", "public function fetch_subcategory() {\n $this->db->where('parent_id!=', '0');\n $r = $this->db->get('category');\n return $r->result_array();\n }", "public function subcategory()\n {\n return $this->belongsTo(Subcategory::class);\n }", "function insertCate($category, $add_group) {\r\t\t$sql = \"INSERT INTO category (c_name, c_main_id) VALUES ('\".$category.\"', '\".$add_group.\"')\";\r\t\t$this->db->query($sql);\r\t\t\r\t\tif ($this->db->insert_id() > 0)\r\t\t\treturn $this->db->insert_id();\r\t\telse\r\t\t\treturn FALSE;\r\t}", "function get_tagid_from_cate($cate_data)\n\t {\n\t $tag_id_arr = array();\n\t\tforeach($cate_data as $key_item)\n\t\t{\n\t list($category_id,$sub_cate_id,$tag_id,$tag_name) = $key_item;\n\t\t array_push($tag_id_arr,$tag_id);\n\t\t}\n\t\treturn $tag_id_arr;\n\t }", "function dataSubCategory( $parentcategory, $gcntyn=false ){\n\n\tglobal $db, $sess;\n\n\t$arrfileurl = explode('/',$_SERVER['SCRIPT_FILENAME']);\n\tif(in_array(\"m\", $arrfileurl) || in_array(\"m2\", $arrfileurl)){\n\t\t$hidden = \"hidden_mobile=0\";\n\t} else {\n\t\t$hidden = \"hidden=0\";\n\t}\n\t# 카테고리 정보\n\tfor ($i=0;$i<2;$i++){\n\t\t$length = strlen($parentcategory) + 3;\n\t\t$query = \"\n\t\tselect\n\t\t\tcategory,catnm,sort,level,level_auth\n\t\tfrom\n\t\t\t\".GD_CATEGORY.\"\n\t\twhere\n\t\t\tcategory like '$parentcategory%'\n\t\t\tand length(category)=$length\n\t\t\";\n\t\tif ($GLOBALS[ici_admin] === false) $query .= \"and \".$hidden;\n\t\t$res = $db->query($query);\n\n\t\tif ($db->count_($res)) break;\n\t\telse if ($length>6) $parentcategory = substr($parentcategory,0,-3);\n\t}\n\n\t// 상품 개수 추출 및 상품분류 연결방식 전환 여부에 따른 처리\n\tif ( $gcntyn == true && _CATEGORY_NEW_METHOD_ === false ){\n\t\tif ($GLOBALS[ici_admin] === false) $where[] = \"a.\".$hidden;\n\t\t$where[] = \"a.category like '$parentcategory%'\";\n\t\t$where[] = \"open\";\n\t\tif ($GLOBALS['tpl']->var_['']['connInterpark']) $where[] = \"b.inpk_prdno!=''\";\n\n\t\t$query = \"\n\t\tselect\n\t\t\tleft(category,$length),count(distinct a.goodsno)\n\t\tfrom\n\t\t\t\".GD_GOODS_LINK.\" a,\n\t\t\t\".GD_GOODS.\" b\n\t\twhere\n\t\t\ta.goodsno = b.goodsno\n\t\t\tand \".implode(\" and \", $where).\"\n\t\tgroup by left(category,$length)\n\t\t\";\n\t\t$res2 = $db->query($query);\n\t\twhile ($data2=$db->fetch($res2)) $gcnt[$data2[0]] = $data2[1];\n\t}\n\n\t### 데이타 조작\n\t$i = 0;\n\twhile ($data=$db->fetch($res)){\n\t\t// 상품 개수 추출 및 상품분류 연결방식 전환 여부에 따른 처리\n\t\tif ($gcntyn == true && _CATEGORY_NEW_METHOD_ === true) {\n\t\t\t$where\t= array();\n\t\t\tif ($GLOBALS[ici_admin] === false) $where[] = \"gl.hidden=0\";\n\t\t\t$where[] = \"gl.category = '\".$data['category'].\"'\";\n\t\t\t$where[] = \"g.open = '1'\";\n\t\t\tif ($GLOBALS['tpl']->var_['']['connInterpark']) $where[] = \"g.inpk_prdno!=''\";\n\n\t\t\t$query = \"\n\t\t\tSELECT\n\t\t\t\tCOUNT(g.goodsno) as cnt\n\t\t\tFROM\n\t\t\t\t\".GD_GOODS.\" g\n\t\t\tINNER JOIN\n\t\t\t\t\".GD_GOODS_LINK.\" gl ON g.goodsno = gl.goodsno\n\t\t\tWHERE\n\t\t\t\t\".implode(\" AND \", $where).\"\n\t\t\t\";\n\n\t\t\t$res2 = $db->query($query);\n\t\t\twhile ($data2=$db->fetch($res2, 1)) $gcnt[$data['category']] = $data2['cnt'];\n\t\t}\n\n\t\t$member_auth = false;\n\t\tif($data['level']){//권한 설정되어 있는지 체크\n\t\t\tswitch($data['level_auth']){//권한체크\n\t\t\t\tcase '1': //모두숨김\n\t\t\t\t\tif( (!$sess['level'] ? 0 : $sess['level']) >= $data['level'] ) $member_auth = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault: $member_auth = true; break;\n\t\t\t}\n\t\t}\n\t\telse $member_auth = true;\n\n\t\tif($member_auth){\n\t\t\t$data['gcnt'] = $gcnt[ $data['category'] ];\n\t\t\t$cate[$data[sort]][] = $data;\n\t\t}\n\t}\n\n\t### 배열 순서 재정의\n\tif ($cate) $cate = resort($cate);\n\n\treturn $cate;\n}", "function get_cat_ID($cat_name)\n {\n }", "function suprsubcategry(){\n\t\t\t$this->layout = 'ajax';\n\t\t\t$this->loadModel('Category');\n\t\t\t$cateid = $_REQUEST['cate_id'];\n\t\t\t$suprsub = $_REQUEST['suprsub'];\n\t\t\t\n\t\t\t$catsdata = array();\n\t\t\tif($suprsub == 'yes'){\n\t\t\t\t$catsdata = $this->Category->find('all',array('conditions'=>array('category_parent'=>$cateid,'category_sub_parent'=>0)));\n\t\t\t}else{\n\t\t\t\t$catsdata = $this->Category->find('all',array('conditions'=>array('category_sub_parent'=>$cateid)));\n\t\t\t}\n\t\t\t\n\t\t\tif(!empty($catsdata)){\n\t\t\t\tforeach($catsdata as $cts){\n\t\t\t\t\t$cats_arr[] = array('ID'=>$cts['Category']['id'],'Name'=>$cts['Category']['category_name']);\n\t\t\t\t}\n\t\t\t\t// [ { \"ID\" :\"1\", \"Name\":\"Scott\"},{ \"ID\":\"2\", \"Name\":\"Jon\"} ]\n\t\t\t\t// print_r($cats_arr);\n\t\t\t\techo json_encode($cats_arr);\n\t\t\t}else{\n\t\t\t\techo 0;\n\t\t\t}\n\t\t\tdie;\n\t\t}", "function achieve_get_main_category()\r\n{\r\n global $sql;\r\n\r\n $main_cat = array();\r\n $result = $sql[\"dbc\"]->query(\"SELECT ID, Name FROM achievement_category WHERE ParentID=-1 and ID<>1 ORDER BY `GroupID` ASC\");\r\n while ($main_cat[] = $sql[\"dbc\"]->fetch_assoc($result));\r\n return $main_cat;\r\n}", "function particularsubcatlist($id)\n\t{\n\t\t$getParsubproduct=\"SELECT * from product_sub_category where pr_sub_id = $id\";\n\t\t$subproduct_data=$this->get_results( $getParsubproduct );\n\t\treturn $subproduct_data;\n\t}", "function showSubCategory()\n\t {\n\t\t\n\t\t $prolist=new Actions();\n\t\t $res=$prolist->fetchAll(\"category\");\n\t\t\t\t\t\t\n\t\t $parentdata=mysql_query(\"select * from category where cat_par_id='0'\");\n\t\t while($parent_sub_cat=mysql_fetch_array($parentdata))\n\t\t {\n\t\t\techo '<option value=\"'.$parent_sub_cat['cat_id'].'\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'.ucfirst($parent_sub_cat['cat_title']).'</option>';\n\t\t \t\t\t\n\t\t\t if(mysql_num_rows(mysql_query(\"select * from category where cat_par_id='\".$parent_sub_cat['cat_id'].\"'\"))>0)\n\t\t\t {\n\t\t\t\tActions::$r++;\n\t\t\t\tActions::viewCategory($parent_sub_cat['cat_id']);\n\t\t\t } \n\t\t\t \n\t\t }\t\t\t\t\t\t\n\t\t \n\t }", "function subj_ID(){\n\t\tglobal $_CON;\n\t\tif(isset($_GET['this_subject'])){\n\t\t\t$_ID = mysqli_real_escape_string($_CON, $_GET['this_subject']);\n\t\treturn $_ID;\n\t\t}\n\t}", "function get_sub_category() {\r\n if(!isset($_POST['category_id'])){\r\n echo json_encode(array('status'=>false, 'message'=>\"category_id field is required!!\", 'data'=>blank_json()));\r\n die;\r\n }\r\n $category_id=$this->input->post('category_id');\r\n if(isset($_POST['last_count'])){\r\n $last_count = $_POST['last_count'];\r\n }else{\r\n $last_count = 0;\r\n }\r\n if($category_id==1 || $category_id==2 || $category_id==3 || $category_id==4){\r\n if($category_id==1){\r\n $table='fic_category';\r\n }\r\n if($category_id==2){\r\n $table='comm_category';\r\n }\r\n if($category_id==3){\r\n $table='competition_category';\r\n }\r\n if($category_id==4){\r\n $table='opendata_category';\r\n }\r\n $res = $this->CategoriesModel->get_subcategories($category_id,$table,$last_count);\r\n if (!empty($res)) {\r\n $i=0;\r\n foreach($res as $r){\r\n $res[$i]['root_id']=$category_id;\r\n $i++;\r\n }\r\n echo json_encode(array('status'=>true, 'message'=>\"Sub Categories list!\", 'data'=>$res));\r\n die;\r\n }\r\n echo json_encode(array('status'=>false, 'message'=>\"Sub Categories list not found!!\", 'data'=>array()));\r\n die;\r\n \r\n }else{\r\n echo json_encode(array('status'=>false, 'message'=>\"category_id is not valid!!\", 'data'=>blank_json()));\r\n }\r\n }", "public function subcategory()\n {\n return $this->hasOne('App\\Models\\Category','id','sub_category_id');\n }", "public function get_id_subclase(){ \n return (isset($this->_id_subclase)) ? $this->_id_subclase: null;\n}", "function get_sub_categories($category_ID)\n {\n $get_sub_category_query=site_query(\"select * from Category where parentID=\".$category_ID.\" order by displayOrder\",\"get_sub_categories()\",$dev);\n return $get_sub_category_query;\n }", "function alaya_cat_id($cate_slug){\n $category=get_term_by('slug',$cate_slug,'category');\n if($category){\n\t $cate_id = $category->term_id;\n\t $cate_id = apply_filters('alaya_cat_id', $cate_id);\n\t return $cate_id;\n\t}\n}", "function single_category_id($data)\n {\n $this->db->select('*');\n $this->db->from('tbl_category');\n $this->db->where('category_id', $data);\n $query = $this->db->get();\n return $query->result() ;\n }", "public function getCategoria_id()\n {\n return $this->categoria_id;\n }", "public function getCategoryId();", "public function sub_category()\n {\n\n return $this->hasOne(Category::class, 'id', 'sub_categories_id');\n }", "public function get_module_category($subcategory = false)\n {\n $categories = $this->primary_category(true)->parents(true);\n\n if (count($categories)) {\n if ($subcategory) {\n return $categories[0];\n }\n\n return isset($categories[1]) ? $categories[1] : $categories[0];\n }\n }", "public function subCategory()\n {\n return $this->belongsTo(self::class, 'parent_id', 'id');\n }", "function get_cat_sub($cat_id,$level=0) {\nglobal $table_catcontent, $db;\n$list_info_cat=($level==0)?\"(-1\":\"\";\n$list_info_cat = $list_info_cat.\",\".$cat_id;\n$subcat_num = Check_sub_info($table_catcontent,$db,\" WHERE parent_id = '\".$cat_id.\"'\");\nif ($subcat_num>0) {\n\t$sql_query = \"SELECT * FROM `\" . $table_catcontent . \"` WHERE parent_id='\".$cat_id.\"' ORDER BY priority_order ASC\";\n\t$sql_query = mysql_query($sql_query);\n\twhile($sql_query_rows = mysql_fetch_array($sql_query)) {\n\t\t$list_info_cat = $list_info_cat.get_cat_sub($sql_query_rows['id'],1);\n\t\t}\n\t}\nreturn ($level==0)?$list_info_cat.\")\":$list_info_cat;\n}", "public function getOnlyCategorySubcatZipcodeDetail($category,$subCat)\r\n\t {\r\n\t\t\t\t $sql=\"SELECT distinct m.zip, (SELECT COUNT(storeName )FROM stores WHERE zip = m.zip) AS No_of_store FROM stores m, books b,inventory i WHERE (b.category = '$category' AND b.subCat = '$subCat') AND (b.isbn = i.isbn) AND (i.storeID=m.storeID)\";\r\n\t\t $result=mysql_query($sql);\r\n\t\t\t return $result;\t\r\n\t }", "public function get_subchild_category($subcat_id){\n \t$subchildcategories = Category::with('productsByChildCategory')->where('subcategory_id', $subcat_id)->get();\n $output = '';\n if(count($subchildcategories)>0){\n $output .= '<option value=\"\">Select child category</option>';\n foreach($subchildcategories as $subchildcategory){\n $output .='<option '. (Session::get(\"childcategory_id\") == $subchildcategory->id ? \"selected\" : \"\" ).' value=\"'.$subchildcategory->id.'\">'.$subchildcategory->name.' ('.count($subchildcategory->productsByChildCategory).')</option>';\n }\n }\n echo $output;\n }", "public function getCategoryId()\n {\n return $this->categoryId;\n }", "public function getCategoryId()\n {\n if ($category = Mage::registry('current_category')) {\n return $category->getId();\n }\n return false;\n }", "function get_sub_category_info( $sub_cate_id, $sub_cate_status = 0 )\n\t{\n\t\t$criteria = $sub_cate_status == 1 ? \"sub_cate_status = 1 AND \" : \"\";\n\t\t$q = \"SELECT * FROM title_dev_sub_categories WHERE \".$criteria.\" sub_cate_id = \".$sub_cate_id;\n\t\t$r = $this -> db -> getSingleRecord( $q );\n\t\tif( $r )\n\t\t\treturn $r;\n\t\telse\n\t\t\treturn false;\n\t}", "public function getSubSubcatDetail($subSubCat)\r\n\t{\r\n\t\t\t\t $sql= \"SELECT * FROM books WHERE subSubCat='$subSubCat'\";\r\n\t\t $result=mysql_query($sql);\r\n\t\t\t return $result;\t\r\n\t}", "public function getAggregateId()\n {\n }", "public function subcategory()\n\t{\n\t\t$this->db->select('*');\n\t\t$this->db->from($this->pro->prifix.$this->pro->category);\n\t\t$this->db->order_by($this->pro->category.'_id','desc');\n\t\t$this->db->order_by($this->pro->category.'_parent','desc');\n\t\t$this->db->where($this->pro->category.'_status','1');\n\t\t$this->db->where($this->pro->category.'_parent>',0);\n\t\t$rs = $this->db->get();\n\t\t//echo $this->db->last_query();\n\t\treturn $rs->result_array();\n\t\t\n\t}", "private function catId($cat) {\n\t\t$id = $this->db->table('nsbulletin_categories')\n\t\t\t\t->where([\n\t\t\t\t\t['category', '=', $cat],\n\t\t\t\t\t['nodeid', '=', $this->localNode->nodeid()]\n\t\t\t\t\t])\n\t\t\t\t->value('id');\n\t\n\t\tif($id) return $id;\n\t\n\t\treturn $this->db->table('nsbulletin_categories')\n\t\t\t->insertGetId(['category' => $cat, 'nodeid' => $this->localNode->nodeid()]);\n\t}", "private function __getCategoryIdFromUrl() {\n return $this->uri->segment( 3, 0 );\n }" ]
[ "0.7578464", "0.725984", "0.6531426", "0.6244221", "0.6193593", "0.6187404", "0.60922706", "0.6091951", "0.6091951", "0.6091951", "0.609151", "0.60586905", "0.60439485", "0.6043234", "0.60187167", "0.6005654", "0.5985133", "0.59639734", "0.5959786", "0.5928621", "0.5902886", "0.5897359", "0.5877958", "0.5873363", "0.585146", "0.58480114", "0.5835622", "0.5812721", "0.5803337", "0.5802112", "0.58010817", "0.5777292", "0.57766175", "0.5747162", "0.5743443", "0.57058537", "0.5701646", "0.5681602", "0.5675341", "0.56334454", "0.5607999", "0.56054056", "0.55995476", "0.5579209", "0.55693525", "0.5560541", "0.55581033", "0.5555396", "0.553656", "0.553305", "0.553305", "0.5529045", "0.55249566", "0.552089", "0.55194044", "0.5508467", "0.55063117", "0.55057186", "0.5505126", "0.55035704", "0.5490006", "0.5488914", "0.5488584", "0.5483317", "0.54782987", "0.5476244", "0.5471228", "0.5469516", "0.545747", "0.54563695", "0.5453765", "0.5450049", "0.54486793", "0.5447648", "0.5443946", "0.54328424", "0.5418049", "0.54155904", "0.5409019", "0.5407437", "0.53936505", "0.5392155", "0.53896505", "0.53807706", "0.53693247", "0.5368377", "0.5365759", "0.53650945", "0.5359344", "0.5353587", "0.53532386", "0.5352343", "0.534081", "0.5337649", "0.53334826", "0.5329654", "0.5329121", "0.5319427", "0.5319422", "0.53137094" ]
0.7053136
2
Create an instantiation of GroupingPage()
public static function create($id = NULL) { return new self($id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getGroupByPage() {}", "public function createPages() {\n $pageCount = $this->getPageCount();\n $currentPageNumber = $this->getCurrentPage();\n\n $structure = new XGrid_Plugin_Pagination_Structure();\n $structure->setPageCount($pageCount);\n $structure->setItemCountPerPage($this->getItemCountPerPage());\n $structure->setFirst(1);\n $structure->setCurrent($currentPageNumber);\n $structure->setLast($pageCount);\n\n // Previous and next\n if ($currentPageNumber - 1 > 0) {\n $structure->setPrevious($currentPageNumber - 1);\n }\n \n if ($currentPageNumber + 1 <= $pageCount) {\n $structure->setNext($currentPageNumber + 1);\n }\n\n // Pages in range\n $scrollingStyle = $this->getScrollingStyle();\n $structure->setPagesInRange($scrollingStyle->getPages($this));\n $structure->setFirstPageInRange(min($structure->getPagesInRange()));\n $structure->setLastPageInRange(max($structure->getPagesInRange()));\n \n $this->_structure = $structure; \n }", "public function __construct()\n {\n $this->rootPages = $this->generatePageHierarchy();\n }", "public function __construct() {\n\t\t$this->group = new Group();\n\t}", "public function create( ) {\n\t\treturn view('pages.settings.parts.groups.master' )\n\t\t\t->with( 'Page', $this->page );\n\t}", "function createPage();", "function new_groups()\n {\n \n }", "public static function newPageInstance()\n {\n $model = new static();\n $model->setAttribute('type', static::PAGE);\n\n return $model;\n }", "public static function createInstance()\n {\n return new TabPage('ISerializable', 'ISerializable');\n }", "public function create( $_total, $_size, $_pageno )\r\n {\r\n return new Page($_total, $_size, $_pageno);\r\n }", "function newDataObject() {\n\t\treturn new Group();\n\t}", "function groups() {\n\t\t$this->validate();\n\t\t$this->setupTemplate();\n\n\t\t$journal =& Request::getJournal();\n\n\t\t$rangeInfo =& $this->getRangeInfo('groups');\n\n\t\t$groupDao =& DAORegistry::getDAO('GroupDAO');\n\t\t$groups =& $groupDao->getGroups(ASSOC_TYPE_JOURNAL, $journal->getId(), null, $rangeInfo);\n\n\t\t$templateMgr =& TemplateManager::getManager();\n\t\t$templateMgr->addJavaScript('lib/pkp/js/lib/jquery/plugins/jquery.tablednd.js');\n\t\t$templateMgr->addJavaScript('lib/pkp/js/functions/tablednd.js');\n\t\t$templateMgr->assign_by_ref('groups', $groups);\n\t\t$templateMgr->assign('boardEnabled', $journal->getSetting('boardEnabled'));\n\t\t$templateMgr->display('manager/groups/groups.tpl');\n\t}", "static public function createPage() {\n $session = Application::getInstance(\"session\");\n $config = Application::getConfig();\n\n if (isset($config[\"system\"][\"customPageClass\"])) {\n require $config[\"system\"][\"pages-folder\"] . \"/\" . $config[\"system\"][\"customPageClass\"] . \".php\";\n }\n\n include_once $config[\"system\"][\"pages-folder\"] . \"/\" . $session->currentPage . \".page.php\";\n $pageClass = $config[\"system\"][\"namespace\"] . \"\\\\pages\\\\Page\" . ucfirst($session->currentPage);\n\n\n $page = new $pageClass();\n\n Application::setInstance(\"page\", $page);\n }", "public function testCreateGroup()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "function SetupMultiPages() {\r\n\t\t$pages = new cSubPages();\r\n\t\t$pages->Add(0);\r\n\t\t$pages->Add(1);\r\n\t\t$pages->Add(2);\r\n\t\t$pages->Add(3);\r\n\t\t$pages->Add(4);\r\n\t\t$pages->Add(5);\r\n\t\t$pages->Add(6);\r\n\t\t$this->MultiPages = $pages;\r\n\t}", "function testGroupingGen()\r\n\t{\r\n\t\t// \"project_story\" does not exist anymore in app_object_types\r\n\t\treturn; \r\n\t\t$dbh = $this->dbh;\r\n\r\n\t\t$cust = new CAntObject($dbh, \"project_story\", null, $this->user);\r\n\t\t$cust->setValue(\"name\", \"UnitTest-testGrouping\");\r\n\r\n\t\t// Priority\r\n\t\t$grp = $cust->addGroupingEntry(\"priority_id\", \"Unit Test Group\", \"e3e3e3\");\r\n\t\t$cust->setMValue(\"priority_id\", $grp['id']);\r\n\t\t$data = $cust->getDataArray();\r\n\t\t$this->assertEquals($data['name'], \"UnitTest-testGrouping\");\r\n\t\t$this->assertEquals($data['priority_id_mvfval'][$grp['id']], \"Unit Test Group\");\r\n\r\n\t\t// Type\r\n\t\t$grp2 = $cust->addGroupingEntry(\"type_id\", \"Unit Test Group\", \"e3e3e3\");\r\n\t\t$cust->setMValue(\"type_id\", $grp2['id']);\r\n\t\t$data = $cust->getDataArray();\r\n\t\t$this->assertEquals($data['name'], \"UnitTest-testGrouping\");\r\n\t\t$this->assertEquals($data['type_id_mvfval'][$grp2['id']], \"Unit Test Group\");\r\n\r\n\t\t// Test delete\r\n\t\t$ret = $cust->deleteGroupingEntry(\"priority_id\", $grp['id']);\r\n\t\t$this->assertTrue($ret);\r\n\r\n\t\t$ret = $cust->deleteGroupingEntry(\"type_id\", $grp2['id']);\r\n\t\t$this->assertTrue($ret);\r\n\r\n\t\t// Cleanup\r\n\t\t$cust->removeHard();\r\n\t}", "function create(&$a_pg_obj, $a_hier_id, $a_pc_id = \"\")\n\t{\n\t\t$this->node = $this->createPageContentNode();\n\t\t$a_pg_obj->insertContent($this, $a_hier_id, IL_INSERT_AFTER, $a_pc_id);\n\t\t$this->tabs_node =& $this->dom->create_element(\"Tabs\");\n\t\t$this->tabs_node =& $this->node->append_child($this->tabs_node);\n\t}", "public static function add_new_inner_pager ( $page=null ) \n {\n $inner = null; \n\n if( ! is_null( $page ) ) : switch( $page ) :\n \n case 'notification' :\n $inner .= self::notification_center();\n break; \n\n case 'confirmation' :\n $inner .= self::confirmation_center();\n break; \n\n case 'entries' :\n $inner .= self::entries_center();\n break; \n\n case 'review' :\n $inner .= self::review_center();\n break; \n\n endswitch; else :\n\n $inner = self::add_new_inner_center();\n\n endif;\n\n return $inner;\n }", "public function __construct () {\n $this->template = new PageTemplate ();\n }", "public function __construct () {\n $this->template = new PageTemplate ();\n }", "public function __construct () {\n $this->template = new PageTemplate ();\n }", "public function create_group() {\r\n $this->layout = '';\r\n\r\n $this->displayGroupType();\r\n\r\n $this->loadModel('GetRegisteredGroupData');\r\n $group_info = $this->GetRegisteredGroupData->find('all', array(\r\n 'order' => array('GetRegisteredGroupData.group_name' => 'asc')));\r\n\r\n $this->set('groupInfo', $group_info);\r\n }", "public function create_group()\r\n\t{\r\n\t\t// Load template\r\n\t\tinclude(BLUPATH_TEMPLATES .'/site/modules/create_group.php');\r\n\t}", "public function addPage() {\r\n\t\t// add a page (required with recent versions of tcpdf)\r\n\t\t$this->tcpdf->AddPage();\r\n\t\treturn $this;\r\n\t}", "function member_groups_page() {\r\n require_once( $plugin_dir . \"email-newsletter-files/page-groups.php\" );\r\n }", "public function groups();", "public function groups();", "public function create()\n {\n\n $this->data = array(\n 'templates' => \\Pageblok::getTemplates(\"gallery\"),\n );\n\n return parent::create();\n }", "function SetUpStartGroup() {\n\t\tglobal $deals_details;\n\n\t\t// Exit if no groups\n\t\tif ($this->DisplayGrps == 0)\n\t\t\treturn;\n\n\t\t// Check for a 'start' parameter\n\t\tif (@$_GET[EWRPT_TABLE_START_GROUP] != \"\") {\n\t\t\t$this->StartGrp = $_GET[EWRPT_TABLE_START_GROUP];\n\t\t\t$deals_details->setStartGroup($this->StartGrp);\n\t\t} elseif (@$_GET[\"pageno\"] != \"\") {\n\t\t\t$nPageNo = $_GET[\"pageno\"];\n\t\t\tif (is_numeric($nPageNo)) {\n\t\t\t\t$this->StartGrp = ($nPageNo-1)*$this->DisplayGrps+1;\n\t\t\t\tif ($this->StartGrp <= 0) {\n\t\t\t\t\t$this->StartGrp = 1;\n\t\t\t\t} elseif ($this->StartGrp >= intval(($this->TotalGrps-1)/$this->DisplayGrps)*$this->DisplayGrps+1) {\n\t\t\t\t\t$this->StartGrp = intval(($this->TotalGrps-1)/$this->DisplayGrps)*$this->DisplayGrps+1;\n\t\t\t\t}\n\t\t\t\t$deals_details->setStartGroup($this->StartGrp);\n\t\t\t} else {\n\t\t\t\t$this->StartGrp = $deals_details->getStartGroup();\n\t\t\t}\n\t\t} else {\n\t\t\t$this->StartGrp = $deals_details->getStartGroup();\n\t\t}\n\n\t\t// Check if correct start group counter\n\t\tif (!is_numeric($this->StartGrp) || $this->StartGrp == \"\") { // Avoid invalid start group counter\n\t\t\t$this->StartGrp = 1; // Reset start group counter\n\t\t\t$deals_details->setStartGroup($this->StartGrp);\n\t\t} elseif (intval($this->StartGrp) > intval($this->TotalGrps)) { // Avoid starting group > total groups\n\t\t\t$this->StartGrp = intval(($this->TotalGrps-1)/$this->DisplayGrps) * $this->DisplayGrps + 1; // Point to last page first group\n\t\t\t$deals_details->setStartGroup($this->StartGrp);\n\t\t} elseif (($this->StartGrp-1) % $this->DisplayGrps <> 0) {\n\t\t\t$this->StartGrp = intval(($this->StartGrp-1)/$this->DisplayGrps) * $this->DisplayGrps + 1; // Point to page boundary\n\t\t\t$deals_details->setStartGroup($this->StartGrp);\n\t\t}\n\t}", "protected function constructPage() {\n\t\treturn array(\n\t\t\t\t\t\t\"header\" => $this->header,\n\t\t\t\t\t\t\"headerBottom\" => $this->headerBottom,\n\t\t\t\t\t\t\"bodyTag\" => $this->bodyTag,\n\t\t\t\t\t\t\"banner\" => $this->banner,\n\t\t\t\t\t\t\"leftMenu\" => $this->leftMenu,\n\t\t\t\t\t\t\"titlePrefix\" => $this->titlePrefix,\n\t\t\t\t\t\t\"title\" => $this->title,\n\t\t\t\t\t\t\"titlePostfix\" => $this->titlePostfix,\n\t\t\t\t\t\t\"rightMenu\" => $this->rightMenu,\n\t\t\t\t\t\t\"contentPrefix\" => $this->contentPrefix,\n\t\t\t\t\t\t\"content\" => $this->content,\n\t\t\t\t\t\t\"contentPostfix\" => $this->contentPostfix,\n\t\t\t\t\t\t\"footer\" => $this->footer,\n\t\t\t\t\t\t\"end\" => $this->end\n\t\t\t\t\t);\n\t}", "function init()\n {\n\n $elements = array(\n 'page_id' => array('hidden')\n , 'name' => array('text', array('label' => 'Name', 'options' => array('StringLength' => array(false, array(1, 50)),), 'filters' => array('StringTrim'), 'required' => true))\n , 'title' => array('text', array('label' => 'Title', 'options' => array('StringLength' => array(false, array(4, 255)),),'filters' => array('StringTrim'), 'required' => true))\n , 'meta' => array('text', array('label' => 'meta', 'options' => array('StringLength' => array(false, array(4, 255))), 'filters' => array('StringTrim'),))\n , 'description' => array('textarea',array('label' => 'description', 'attribs' => array('rows' => 2), 'filters' => array('StringTrim'), 'required' => true))\n , 'body' => array('textarea',array('label' => 'body', 'attribs' => array('rows' => 7), 'filters' => array('StringTrim'), 'required' => true))\n );\n $this->addElements($elements);\n\n // --- Groups ----------------------------------------------\n $this->addDisplayGroup(array('name','title', 'meta'), 'display-head', array('legend'=>'display-head'));\n $this->addDisplayGroup(array('description', 'body'), 'display-body', array('legend'=>'display-body'));\n parent::init();\n }", "function create_group() {\n $labels = array(\n 'name' => 'Group',\n 'singular_name' => 'Group',\n 'add_new' => 'Add New',\n 'add_new_item' => 'Add New Group',\n 'edit_item' => 'Edit Group',\n 'new_item' => 'New Group',\n 'all_items' => 'Groups',\n 'view_item' => 'View Group',\n 'search_items' => 'Search Group',\n 'not_found' => 'No Group found',\n 'not_found_in_trash' => 'No Group found in Trash',\n 'parent_item_colon' => '',\n 'menu_name' => 'Group'\n );\n\n $args = array(\n 'labels' => $labels,\n 'public' => true,\n 'publicly_queryable' => true,\n 'show_ui' => true,\n 'show_in_menu' => 'edit.php?post_type=product',\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'group' ),\n 'capability_type' => 'page',\n 'supports' => array('title', 'page-attributes', 'thumbnail'),\n 'has_archive' => true,\n 'hierarchical' => true,\n 'menu_position' => null,\n 'yarpp_support' => false\n );\n\n register_post_type( 'group', $args );\n}", "function SetUpStartGroup() {\n\t\tglobal $dealers_reports;\n\n\t\t// Exit if no groups\n\t\tif ($this->DisplayGrps == 0)\n\t\t\treturn;\n\n\t\t// Check for a 'start' parameter\n\t\tif (@$_GET[EWRPT_TABLE_START_GROUP] != \"\") {\n\t\t\t$this->StartGrp = $_GET[EWRPT_TABLE_START_GROUP];\n\t\t\t$dealers_reports->setStartGroup($this->StartGrp);\n\t\t} elseif (@$_GET[\"pageno\"] != \"\") {\n\t\t\t$nPageNo = $_GET[\"pageno\"];\n\t\t\tif (is_numeric($nPageNo)) {\n\t\t\t\t$this->StartGrp = ($nPageNo-1)*$this->DisplayGrps+1;\n\t\t\t\tif ($this->StartGrp <= 0) {\n\t\t\t\t\t$this->StartGrp = 1;\n\t\t\t\t} elseif ($this->StartGrp >= intval(($this->TotalGrps-1)/$this->DisplayGrps)*$this->DisplayGrps+1) {\n\t\t\t\t\t$this->StartGrp = intval(($this->TotalGrps-1)/$this->DisplayGrps)*$this->DisplayGrps+1;\n\t\t\t\t}\n\t\t\t\t$dealers_reports->setStartGroup($this->StartGrp);\n\t\t\t} else {\n\t\t\t\t$this->StartGrp = $dealers_reports->getStartGroup();\n\t\t\t}\n\t\t} else {\n\t\t\t$this->StartGrp = $dealers_reports->getStartGroup();\n\t\t}\n\n\t\t// Check if correct start group counter\n\t\tif (!is_numeric($this->StartGrp) || $this->StartGrp == \"\") { // Avoid invalid start group counter\n\t\t\t$this->StartGrp = 1; // Reset start group counter\n\t\t\t$dealers_reports->setStartGroup($this->StartGrp);\n\t\t} elseif (intval($this->StartGrp) > intval($this->TotalGrps)) { // Avoid starting group > total groups\n\t\t\t$this->StartGrp = intval(($this->TotalGrps-1)/$this->DisplayGrps) * $this->DisplayGrps + 1; // Point to last page first group\n\t\t\t$dealers_reports->setStartGroup($this->StartGrp);\n\t\t} elseif (($this->StartGrp-1) % $this->DisplayGrps <> 0) {\n\t\t\t$this->StartGrp = intval(($this->StartGrp-1)/$this->DisplayGrps) * $this->DisplayGrps + 1; // Point to page boundary\n\t\t\t$dealers_reports->setStartGroup($this->StartGrp);\n\t\t}\n\t}", "public function __construct() {\n\t\tparent::__construct( 'CreatePage', 'createpage' );\n\t}", "protected function newPage()\n {\n $this->addPage();\n $this->variables['page'] = $this->pageNo();\n if ($this->templatePages > 0) {\n $templateIndex = $this->importPage(min($this->pageNo(), $this->templatePages));\n $this->useImportedPage($templateIndex);\n }\n\n $this->setXY($this->layout['pageNoX'], $this->layout['pageNoY']);\n $this->write(5, $this->t('page'));\n $this->setY($this->layout['contentMarginTopPX']);\n }", "public function create()\n {\n //for the PAGE on which to create\n }", "public static function getPluignGroups()\n\t\t{\n\n\t\t\t$groups = array(\n\n\t\t\t\t'christina' => array(\n\t\t\t\t\t'id'\t\t\t\t=> 'christina',\n\t\t\t\t\t'title'\t\t\t\t=> 'Christina',\n\t\t\t\t\t'icon' \t\t\t\t=> 'admin-appearance',\n\t\t\t\t\t'excerpt' \t\t\t=> 'Enable your students to submit assignments, have them collaborate in groups and get inline feedback.',\n\t\t\t\t\t'image' \t\t\t=> 'http://dummyimage.com/308x160',\n\t\t\t\t\t'link' \t\t\t\t=> 'http://code.ubc.ca/studiorum/courses/christina',\n\t\t\t\t\t'content' \t\t\t=> __( '<p>Create assignments - with deadlines - that enable your students to submit their work in a beautiful rich text editor. The student (and peers in their custom user groups) are able to make inline comments to get fine-grained critique.</p>', 'studiorum' ),\n\t\t\t\t\t'content_sidebar' \t=> 'http://dummyimage.com/300x150',\n\t\t\t\t\t'date'\t\t\t\t=> '2014-06-01',\n\t\t\t\t\t'plugins'\t\t\t=> array(\n\t\t\t\t\t\t'gravityforms/gravityforms.php',\n\t\t\t\t\t\t'gravity-forms-custom-post-types/gfcptaddon.php',\n\t\t\t\t\t\t'gravity-forms-wysiwyg/gf_wysiwyg.php',\n\t\t\t\t\t\t'studiorum-lectio/studiorum-lectio.php',\n\t\t\t\t\t\t'studiorum-side-comments/studiorum-side-comments.php',\n\t\t\t\t\t\t'studiorum-user-groups/studiorum-user-groups.php'\n\t\t\t\t\t),\n\t\t\t\t\t'examples' \t\t\t=> array(\n\t\t\t\t\t\t'http://arts.ubc.ca/arts-one/'\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t\n\t\t\t\t'simon' => array(\n\t\t\t\t\t'id'\t\t\t\t=> 'simon',\n\t\t\t\t\t'title'\t\t\t\t=> 'Simon',\n\t\t\t\t\t'icon' \t\t\t\t=> 'lightbulb',\n\t\t\t\t\t'excerpt' \t\t\t=> 'Enable students to rate each others\\' work simply and easily using a hot-or-not style voting system.',\n\t\t\t\t\t'image' \t\t\t=> 'http://dummyimage.com/308x160/222/fff',\n\t\t\t\t\t'link' \t\t\t\t=> 'http://code.ubc.ca/studiorum/courses/simon',\n\t\t\t\t\t'content' \t\t\t=> __( '<p>Provide a simple way for your students to provide hot-or-not style feedback to easily discover which content is best.</p>', 'studiorum' ),\n\t\t\t\t\t'content_sidebar' \t=> 'http://dummyimage.com/300x150',\n\t\t\t\t\t'date'\t\t\t\t=> '2014-07-01',\n\t\t\t\t\t'plugins'\t\t\t=> array(\n\t\t\t\t\t\t'gravityforms/gravityforms.php',\n\t\t\t\t\t\t'gravity-forms-custom-post-types/gfcptaddon.php',\n\t\t\t\t\t\t'gravity-forms-wysiwyg/gf_wysiwyg.php',\n\t\t\t\t\t\t'studiorum-lectio/studiorum-lectio.php',\n\t\t\t\t\t\t'custom-css-meta-box/custom-css-meta-box.php'\n\t\t\t\t\t),\n\t\t\t\t\t'examples' \t\t\t=> array(\n\t\t\t\t\t\t'http://physics.ubc.ca/'\n\t\t\t\t\t)\n\t\t\t\t),\n\n\t\t\t\t'paul' => array(\n\t\t\t\t\t'id'\t\t\t\t=> 'paul',\n\t\t\t\t\t'title'\t\t\t\t=> 'Paul',\n\t\t\t\t\t'icon' \t\t\t\t=> 'share',\n\t\t\t\t\t'excerpt' \t\t\t=> 'Curate content via delicious.com and show it on your site in a beautiful, searchable, engaging way.',\n\t\t\t\t\t'image' \t\t\t=> 'http://dummyimage.com/308x160/fff/333',\n\t\t\t\t\t'link' \t\t\t\t=> 'http://code.ubc.ca/studiorum/courses/paul',\n\t\t\t\t\t'content' \t\t\t=> __( '<p>Curate and tag content using the popular delicious.com service and then allow students to search quickly and easily to see the content you want them to see.</p>', 'studiorum' ),\n\t\t\t\t\t'content_sidebar' \t=> 'http://dummyimage.com/300x150',\n\t\t\t\t\t'date'\t\t\t\t=> '2014-05-01',\n\t\t\t\t\t'plugins'\t\t\t=> array(\n\t\t\t\t\t\t'studiorum-hon/studiorum-delicious.php'\n\t\t\t\t\t),\n\t\t\t\t\t'examples' \t\t\t=> array(\n\t\t\t\t\t\t'http://sauder.ubc.ca/'\n\t\t\t\t\t)\n\t\t\t\t),\n\n\t\t\t);\n\n\t\t\treturn $groups;\n\n\t\t}", "function newDataObject() {\n\t\treturn new Division();\n\t}", "public function __construct()\n {\n $this->rendererClass = Renderer::class;\n\n $this->cObj = GeneralUtility::makeInstance(ContentObjectRenderer::class);\n $this->cObj->start(array());\n\n $this->offset = max(0, (int) GeneralUtility::_GET('offset'));\n $this->limit = max(0, (int) GeneralUtility::_GET('limit'));\n if ($this->limit <= 0) {\n $this->limit = 100;\n }\n\n $this->createRenderer();\n\n $singlePid = intval(GeneralUtility::_GP('singlePid'));\n $this->singlePid = $singlePid && $this->isInRootline($singlePid) ?\n $singlePid : \\FelixNagel\\T3extblog\\Utility\\GeneralUtility::getTsFe()->id;\n\n $this->validateAndcreatePageList();\n }", "function create(&$a_pg_obj, $a_hier_id)\n\t{\n\t\t$this->node = $this->createPageContentNode();\n\t}", "public static function createInstance()\n {\n return new GroupingColumn('ISerializable', 'ISerializable');\n }", "public function index() {\n\t\t$data = Group::get()->map( function ( $s ) {\n\t\t\treturn [\n\t\t\t\t'id' => $s->id,\n\t\t\t\t'name' => $s->getShortName(),\n\t\t\t\t'content' => $s->getShortContent(),\n\t\t\t\t'created_at' => $s->created_at_formatted,\n\t\t\t\t'created_at_time' => $s->created_at_time,\n\t\t\t\t'active' => $s->getActiveFullResponse()\n\t\t\t];\n\t\t} );\n\n\t\t$this->page->response = $data;\n\t\t$this->page->create_option = 1;\n\t\treturn view('pages.settings.parts.groups.index' )\n\t\t\t->with( 'Page', $this->page );\n\t}", "public function testGroupPagesLoads() {\n\t\t$categoryElementLocator = $this->locatorObj->readConfigData ( \"categoryLocator\" );\n\t\t$articleCountLocator = $this->locatorObj->readConfigData ( \"articleCounter\" );\n\t\t$this->currentWindow ()->maximize ();\n\t\t$this->url ( \"/\" );\n\t\t$this->logger->info ( \"*************** start of GroupPagesLoads testcase*********** \" );\n\t\t$this->applicationFunctionObj->navigateToMainPage ( $this );\n\t\t$this->applicationFunctionObj->waitUntilElementIsVisible ( $this,$categoryElementLocator,\"name\" );\n\t\t$this->byName ( $categoryElementLocator)->click ();\n\t\t$this->applicationFunctionObj->waitUntilElementIsVisible ( $this,$articleCountLocator,\"xpath\");\n\t\t$GrouppageCount = $this->byXPath ( $articleCountLocator )->text ();\n\t\t$this->logger->info ( \"The count value of the available results is fetched\" );\n\t\t$parts = explode ( ' ', $GrouppageCount );\n\t\t$count = ( int ) array_values ( $parts ) [0];\n\t\tif ($count > 1500) {\n\t\t\t$this->logger->info ( \"Group page is loaded successfully and count is greater than 1500\" );\n\t\t} else {\n\t\t\t$this->fail ( \"Group page is not fully loaded\" );\n\t\t}\n\t\t$this->logger->info ( \"*************** end of GroupPagesLoads testcase********** \" );\n\t}", "public function __construct()\n {\n $this->page = collect();\n $this->page->title = 'Patient Dashboard';\n $this->page->view = 'home';\n }", "private function generatePages()\n {\n $all_pages = self::getPages($this->records, $this->recordsInPage);\n $total = 0;\n $start = 1;\n while ($total < $all_pages) {\n $shift = $this->getShift();\n $paging_start = $total < $this->getLeftShift() ? true : false;\n $paging_end = $total >= ($all_pages - $this->getRightShift()) ? true : false;\n\n if ($this->currentPage == $start) {\n $this->appendData(sprintf('<li class=\"active\"><span>%d</span></li>', $start));\n }\n elseif ($paging_start|| $paging_end) {\n $this->appendData(sprintf('<li><a href=\"%s%d\">%d</a></li>', $this->url, $start, $start));\n }\n elseif (($this->currentPage == $start - $shift) || ($this->currentPage == $start + $shift)) {\n $this->appendData('<li><span>...</span></li>');\n }\n $total++;\n $start++;\n }\n }", "public function create_page(ModelClass $object, $parentselector = '') {\n\n }", "protected function _initAction(): Page\n {\n $resultPage = $this->resultPageFactory->create();\n $resultPage->setActiveMenu(self::CURBSIDE_MENU_ID);\n $resultPage->addBreadcrumb(__('Sales'), __('Sales'));\n $resultPage->addBreadcrumb(__('Curbside Orders'), __('Curbside Orders'));\n\n return $resultPage;\n }", "public function __construct() {\n $this->groups = new \\Doctrine\\Common\\Collections\\ArrayCollection();\n parent::__construct();\n }", "function groups_create_grouping($data) {\n global $CFG;\n\n $data->timecreated = time();\n $data->timemodified = $data->timecreated;\n $data->name = trim($data->name);\n\n $id = insert_record('groupings', $data);\n\n if ($id) {\n //trigger groups events\n $data->id = $id;\n events_trigger('groups_grouping_created', stripslashes_recursive($data));\n }\n\n return $id;\n}", "public function __construct() {\n\t\t\t// create new page object\n\t\t\t$this->page = new HtmlPage('Page conjunction');\n\n\t\t\t// create new database object\n\t\t\t$this->db = new Database();\n\t\t\t\n\t\t\t// create new request validator\n\t\t\t$this->rq = new RequestValidator();\n\t\t\t\n\t\t\t// execute tool\n\t\t\t$this->run();\n\t\t\t$this->finish();\n\t\t}", "function index($page = 0)\n\t{\n\t\t$this->auth->restrict('groups.view');\n\t\t\n\t\t$filter = $this->input->get(NULL, TRUE);\n\t\t$filter['pp'] = element('pp', $filter, 10);\n\t\t\n\t\t$this->load->library('pagination');\n\t\t$config = array(\n\t\t\t'base_url' => site_url('groups/index'),\n\t\t\t'total_rows' => $this->groups_model->count_all(),\n\t\t\t'per_page' => $filter['pp'],\n\t\t\t'uri_segment' => 3,\n\t\t);\n\t\t$this->pagination->initialize($config);\n\t\t\n\t\t$this->users_model->set_filter($filter);\n\t\t$this->users_model->order_by('g_name', 'asc');\n\t\t$this->users_model->limit($config['per_page'], $page);\n\t\t\n\t\t$this->data['filter'] = $filter;\n\t\t$this->data['groups'] = $this->groups_model->get_all();\n\t\t\n\t\t$this->layout->set_js('views/groups/index');\n\t\t\n\t\t$this->layout->set_title(lang('configure_groups'));\n\t\t$this->data['subnav_active'] = 'groups';\n\t}", "function SetUpStartGroup() {\n\tglobal $PHP_SESSION, $PHP_GET;\n\tglobal $nStartGrp, $nTotalGrps, $nDisplayGrps;\n\n\t// Check for a START parameter\n\tif (@$PHP_GET[EW_TABLE_START_GROUP] != \"\") {\n\t\t$nStartGrp = $PHP_GET[EW_TABLE_START_GROUP];\n\t\t$PHP_SESSION[EW_TABLE_SESSION_START_GROUP] = $nStartGrp;\n\t} elseif (@$PHP_GET[\"pageno\"] != \"\") {\n\t\t$nPageNo = $PHP_GET[\"pageno\"];\n\t\tif (is_numeric($nPageNo)) {\n\t\t\t$nStartGrp = ($nPageNo-1)*$nDisplayGrps+1;\n\t\t\tif ($nStartGrp <= 0) {\n\t\t\t\t$nStartGrp = 1;\n\t\t\t} elseif ($nStartGrp >= intval(($nTotalGrps-1)/$nDisplayGrps)*$nDisplayGrps+1) {\n\t\t\t\t$nStartGrp = intval(($nTotalGrps-1)/$nDisplayGrps)*$nDisplayGrps+1;\n\t\t\t}\n\t\t\t$PHP_SESSION[EW_TABLE_SESSION_START_GROUP] = $nStartGrp;\n\t\t} else {\n\t\t\t$nStartGrp = @$PHP_SESSION[EW_TABLE_SESSION_START_GROUP];\n\t\t\tif (!is_numeric($nStartGrp) || $nStartGrp == \"\") {\n\t\t\t\t$nStartGrp = 1; // Reset start record counter\n\t\t\t\t$PHP_SESSION[EW_TABLE_SESSION_START_GROUP] = $nStartGrp;\n\t\t\t}\n\t\t}\n\t} else {\n\t\t$nStartGrp = @$PHP_SESSION[EW_TABLE_SESSION_START_GROUP];\n\t\tif (!is_numeric($nStartGrp) || $nStartGrp == \"\") {\n\t\t\t$nStartGrp = 1; // Reset start record counter\n\t\t\t$PHP_SESSION[EW_TABLE_SESSION_START_GROUP] = $nStartGrp;\n\t\t}\n\t}\n}", "public function actionAdd()\n {\n if (Yii::$app->getRequest()->Post('gid') && Yii::$app->getRequest()->Post('iid')) {\n $landingPageId = (int)Yii::$app->getRequest()->Post('gid');\n $groupingId = (int)Yii::$app->getRequest()->Post('iid');\n $model = LandingPageGrouping::find()->andWhere(['landing_page_id' => $landingPageId])->\n andWhere(['grouping_id' => $groupingId])->one();\n if (!$model) {\n $model = new LandingPageGrouping();\n $model->landing_page_id = $landingPageId;\n $model->grouping_id = $groupingId;\n if ($model->validate()) {\n $model->save();\n }\n }\n\n $groupings = Grouping::find()->onLandingPage($landingPageId)->active()->\n asArray()->all();\n } else {\n $groupings = false;\n }\n \n \\Yii::$app->response->format = 'json';\n return $groupings;\n }", "private function createPages($pageFlow)\n {\n $nextPage = null;\n $pageObject = null;\n foreach(array_reverse($pageFlow) as $page)\n {\n if($page !== end($pageFlow))\n {\n $pageObject = $this->getPageObject($page);\n $pageObject->setNextPage($nextPage);\n }\n $nextPage = $pageObject;\n }\n return $pageObject;\n }", "public static function create()\n {\n $page = new Page();\n $page->site_id = \\Bazalt\\Site::getId();\n if (!\\Bazalt\\Auth::getUser()->isGuest()) {\n $page->user_id = \\Bazalt\\Auth::getUser()->id;\n }\n return $page;\n }", "public function __construct()\n\t{\n\t\t$this->entity = new Entity(array(\n\t\t\t'name' => 'group_kind',\n\t\t\t'columns' => array('code', 'name', 'short_name', 'description', 'subkind_of', 'weight'),\n\t\t\t'pkey_columns' => array('code')\n\t\t));\n\t}", "function __construct($filename, $dao, $group) {\n\t\t$this->pdf = new MemberlistPDF();\n\t\t\n\t\t$this->filename = $filename;\n\t\t$this->dao = $dao;\n\t\t$this->group = $group;\n\t\t\n\t\t$this->prepareData();\n\t\t\n\t\t// do it\t\t\n\t\t$this->outline();\n\t\t$this->pdf->finish($filename);\n\t}", "public function __construct(array $groups)\n {\n $this->groups = $groups;\n }", "function __construct($pagetype) {\t\n\t\t\t$page = $pagetype;\t\t\t\n\t\t}", "public static function createByPage(\\SetaPDF_Core_Document_Page $page) {}", "public function indexAction(){\n $this->title = '';\n \n $groupModel = new Group();\n $this->view->paginator = $groupModel->findAll($this->_getPage());\n }", "protected function generatePages(): Pages\n\t{\n\t\t$paginator = new Pages();\n\n\t\t// If there is only 1 page\n\t\tif ($this->totalPages <= 1) {\n\t\t\t$paginator->buttons[] = $paginator->current = $this->createElement(1, 1);\n\n\t\t\treturn $paginator;\n\t\t}\n\n\t\t$paginator->current = $this->createElement($this->currentPage, $this->currentPage);\n\n\t\t$range = $this->getRange();\n\t\t// Where the middle part (exclude first and last page) starts\n\t\t$startMiddle = \\max($this->currentPage - $range, 2);\n\t\t$endMiddle = \\min($this->currentPage + $range, $this->totalPages - 1);\n\n\t\t$paginator->buttons[] = $this->createElement(1, $this->currentPage);\n\t\t$this->addBeginningButtons($paginator, $startMiddle);\n\n\t\tfor ($i = $startMiddle; $i <= $endMiddle; $i += 1) {\n\t\t\t$paginator->buttons[] = $this->createElement($i, $this->currentPage);\n\t\t}\n\n\t\t$this->addEndingButtons($paginator, $endMiddle);\n\t\t$paginator->buttons[] = $this->createElement($this->totalPages, $this->currentPage);\n\n\t\treturn $paginator;\n\t}", "public function __construct($p_sPage){\n $this->page($p_sPage);\n }", "private function createGroupXML()\r\n\t{\r\n\t\t$rows = $this->getGroups();\r\n\t\t$groups = $this->doc->createElement('groups');\r\n\r\n\t\tforeach ($rows as $row)\r\n\t\t{\r\n\t\t\t$group = $this->doc->createElement('group');\r\n\r\n\t\t\tforeach ($row as $key => $value)\r\n\t\t\t{\r\n\t\t\t\t$group->setAttribute($key, $value);\r\n\t\t\t}\r\n\t\t\t$groups->appendChild($group);\r\n\t\t}\r\n\r\n\t\treturn $groups;\r\n\t}", "function getPageObject() {\n $xml = new \\SimpleXMLExtended('<?xml version=\"1.0\" encoding=\"UTF-8\"?><item></item>');\n $pagefields = array('title','pubDate','meta','metad','url','content','parent','template','private');\n\n foreach ($pagefields as $field) {\n $xml->$field = null;\n }\n\n return $xml;\n }", "public static function init() {\n\t\tif (self::$_initialized) {\n\t\t\treturn;\n\t\t}\n\t\tparent::setInstance(new Page());\n\t\tself::$_initialized = true;\n\t}", "public function create($data)\n {\n return Page::create($data);\n }", "public function __construct() {\n\t\t$this->page \t= new Page;\n\t\t$this->url \t\t= new Url;\n\t\t$this->session \t= new Session;\n\t\t$this->paging \t= new Paging;\n\t}", "public function createPaginationObject()\n {\n $adapter = new DoctrineDbalAdapter($this->deliverQueryObject(), function ($query) {\n $query->resetQueryParts(['groupBy', 'orderBy'])->select('count(distinct uph.upID)')->setMaxResults(1);\n });\n\n return new Pagination($this, $adapter);\n }", "public function __construct() {\n\t\t\t$this->post_type = learndash_get_post_type_slug( 'group' );\n\t\t\t$this->taxonomies = array();\n\n\t\t\tparent::__construct( $this->post_type );\n\n\t\t\t/**\n\t\t\t * Set the rest_base after the parent __constructor\n\t\t\t * as it will set these var with WP specific details.\n\t\t\t */\n\t\t\t$this->rest_base = $this->get_rest_base( 'users' );\n\t\t\t$this->rest_sub_base = $this->get_rest_base( 'users-groups' );\n\t\t}", "public function pages()\n {\n $modular = [];\n\n foreach ($this->items as $path => $slug) {\n $page = $this->pages->get($path);\n if ($page !== null && !$page->isModule()) {\n $modular[$path] = $slug;\n }\n }\n $this->items = $modular;\n\n return $this;\n }", "public function createPage()\n {\n $this->currentPage++;\n $this->currentIndex++;\n $this->resetProps();\n /* Create page */\n if ($this->landscape) {\n // A4 format in Landscape orientation\n $this->pdf->begin_page_ext(0, 0, \"width=a4.height height=a4.width\");\n } else {\n // A4 format in Portrait orientation3.\n $this->pdf->begin_page_ext(0, 0, \"width=a4.width height=a4.height\");\n }\n empty($this->createPageTrigger) || call_user_func_array($this->createPageTrigger, $this->createPageTriggerArgs);\n }", "public function run()\n {\n $data = [\n [\"name\" => \"Page 1\", \"title\" => \"Page 1\"],\n [\"name\" => \"Page 2\", \"title\" => \"Page 2\"],\n [\"name\" => \"Page 3\", \"title\" => \"Page 3\"],\n ];\n\n $sections = [\n [\n 1 => ['sequence' => 2],\n 2 => ['sequence' => 1]\n ],\n [3 => ['sequence' => 1]],\n [4 => ['sequence' => 1]]\n ];\n\n foreach($data as $key => $page) {\n $pag = Page::create($page);\n $pag->sections()->attach($sections[$key]);\n }\n }", "function index( $page = 0 )\n{\n$this->model_group->pagination( TRUE );\n$data_info = $this->model_group->lister( $page );\n$fields = $this->model_group->fields( TRUE );\n\n$this->template->assign( 'pager', $this->model_group->pager );\n$this->template->assign( 'group_fields', $fields );\n$this->template->assign( 'group_data', $data_info );\n$this->template->assign( 'table_name', 'group' );\n$this->template->assign( 'template', 'list_group' );\n$this->template->display( 'frame_admin.tpl' );\n}", "public function __construct()\n {\n if (! Page::isValidNestedSet()) {\n Page::rebuild(); // add true as first param to force index rebuilding.\n }\n }", "public function create(AbstractPageRouteConfiguration $routeConfiguration, NestedSetRoutingPageInterface $page);", "function insertPage()\n\t{\n\t\tglobal $ilCtrl, $lng;\n\t\t\n\t\tinclude_once(\"./Modules/LearningModule/classes/class.ilChapterHierarchyFormGUI.php\");\n\t\t\n\t\t$num = ilChapterHierarchyFormGUI::getPostMulti();\n\t\t$node_id = ilChapterHierarchyFormGUI::getPostNodeId();\n\t\t\n\t\tif (!ilChapterHierarchyFormGUI::getPostFirstChild())\t// insert after node id\n\t\t{\n\t\t\t$parent_id = $this->tree->getParentId($node_id);\n\t\t\t$target = $node_id;\n\t\t}\n\t\telse\t\t\t\t\t\t\t\t\t\t\t\t\t// insert as first child\n\t\t{\n\t\t\t$parent_id = $node_id;\n\t\t\t$target = IL_FIRST_NODE;\n\t\t}\n\n\t\tfor ($i = 1; $i <= $num; $i++)\n\t\t{\n\t\t\t$page = new ilLMPageObject($this->content_object);\n\t\t\t$page->setType(\"pg\");\n\t\t\t$page->setTitle($lng->txt(\"cont_new_page\"));\n\t\t\t$page->setLMId($this->content_object->getId());\n\t\t\t$page->create();\n\t\t\tilLMObject::putInTree($page, $parent_id, $target);\n\t\t}\n\n\t\t$ilCtrl->redirect($this, \"showHierarchy\");\n\t}", "public function createNestedPagesAndCopyLiveParentPage() {}", "public function initPage() {}", "public function initPage() {}", "protected function createTabs() {}", "public function __construct() {\n\t\tparent::__construct( 'PageTriageList' );\n\t}", "function CBGroups() {\n global $Cbucket;\n $this->cat_tbl = 'group_categories';\n $this->gp_tbl = 'groups';\n $this->gp_mem_tbl = 'group_members';\n //We will using CB Commenting system as posts\n //$this->gp_post_tbl = 'group_posts';\n $this->gp_topic_tbl = 'group_topics';\n $this->gp_invite_tbl = 'group_invitations';\n $this->gp_vdo_tbl = 'group_videos';\n\n //Adding Actions such Report, share,fav etc\n $this->action = new cbactions();\n $this->action->type = 'g';\n $this->action->name = 'group';\n $this->action->obj_class = 'cbgroup';\n $this->action->check_func = 'group_exists';\n $this->action->type_tbl = $this->gp_tbl;\n $this->action->type_id_field = 'group_id';\n \n \n if (isSectionEnabled('groups'))\n $Cbucket->search_types['groups'] = \"cbgroup\";\n \n }", "public function fromTemplatePage($pageNumber);", "public function add_group($group_name) {\n $this->page_fields[]=array('sub_heading'=>$group_name,'fields'=>array());\n }", "protected function initPageRenderer() {}", "protected function initPageRenderer() {}", "static public function createPages() {\n\t\treturn false;\n\t}", "public function displayPage()\n {\n $this->getState()->template = 'displaygroup-page';\n }", "function __construct()\n {\n $xml = new XmlParser;\n $xml->Parse(PARLANCE_PATH . \"/config/app-pages.xml\");\n $pages = $xml->GetNodeByPath(\"APP/PAGES\");\n\n $this->registry = array();\n if(isset($pages) && !empty($pages['child'])) :\n foreach($pages['child'] as $page) :\n $this->registry[($page['attrs']['ID'])] = $page;\n endforeach;\n endif;\n }", "protected function init_pages() {\r\n\t\t\t$include_array = [];\r\n\r\n\t\t\t$files = glob( $this->include_path . '/Page/*.php' );\r\n\t\t\t$obj = new ReflectionClass( $this );\r\n\r\n\t\t\tforeach ( $files as $file ) {\r\n\t\t\t\t$name = basename( $file );\r\n\t\t\t\t$not_included = array();\r\n\t\t\t\tif ( ! in_array( $name, $not_included ) ) {\r\n\t\t\t\t\t$name = str_replace( '.php', '', $name );\r\n\t\t\t\t\t$namespace = $obj->getNamespaceName();\r\n\t\t\t\t\tarray_push( $include_array, $namespace . '\\\\Page\\\\' . $name );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tforeach ( $include_array as $page ) {\r\n\t\t\t\tnew $page( $this->include_path );\r\n\t\t\t}\r\n\r\n\t\t}", "private function page()\n {\n $records = array();\n $uid = $this->pObj->zz_getMaxDbUid('sys_template');\n\n $uid = $uid + 1;\n $records[$uid] = $this->pageOrg($uid);\n\n $uid = $uid + 1;\n $records[$uid] = $this->pageOrgCalCaddy($uid);\n\n // #61838, 140923, dwildt, 2+\n $uid = $uid + 1;\n $records[$uid] = $this->pageOrgCal($uid);\n\n // #61826, 140923, dwildt, 2+\n $uid = $uid + 1;\n $records[$uid] = $this->pageOrgCalEvents($uid);\n\n $uid = $uid + 1;\n $records[$uid] = $this->pageOrgCalLocations($uid);\n\n $uid = $uid + 1;\n $records[$uid] = $this->pageOrgDocuments($uid);\n\n $uid = $uid + 1;\n $records[$uid] = $this->pageOrgDocumentsCaddy($uid);\n\n $uid = $uid + 1;\n $records[$uid] = $this->pageOrgHeadquarters($uid);\n\n // #61779, 140921, dwildt, 2+\n $uid = $uid + 1;\n $records[$uid] = $this->pageOrgJobs($uid);\n\n // #61779, 140921, dwildt, 2+\n $uid = $uid + 1;\n $records[$uid] = $this->pageOrgJobsJobsApply($uid);\n\n $uid = $uid + 1;\n $records[$uid] = $this->pageOrgNews($uid);\n\n // #61779, 140921, dwildt, 2+\n $uid = $uid + 1;\n $records[$uid] = $this->pageOrgService($uid);\n\n $uid = $uid + 1;\n $records[$uid] = $this->pageOrgStaff($uid);\n\n // #67210, 150531, dwildt, 2+\n $uid = $uid + 1;\n $records[$uid] = $this->pageOrgStaffVcard($uid);\n\n return $records;\n }", "public function create()\n {\n $layoutData['userType'] = config(\"dashboard_constant.USER_TYPE\");\n $layoutData['userStatus'] = config(\"dashboard_constant.USER_STATUS\");\n $layoutData['title'] = 'Add Group | '.config(\"app.name\");\n $layoutData['sms_text_size'] = config(\"dashboard_constant.SMS_TEXT_SIZE\");\n $layoutData['sms_text_part'] = config(\"dashboard_constant.SMS_TEXT_PART\");\n $layoutData['sms_text_part_size'] = config(\"dashboard_constant.SMS_TEXT_PART_SIZE\");\n $layoutData['breadcrumb'] = [\n \"links\" => [\n [\n \"name\" => \"Group\",\n \"url\" => url(\"#/group-list\"),\n \"icon\" => \"flaticon-user\"\n ],\n [\n \"name\" => \"Add Group\",\n \"url\" => url(\"#/group-create\"),\n \"icon\" => \"flaticon-plus\"\n ]\n ] \n ];\n return $layoutData;\n }", "function __construct($ptitle)\r\n {\r\n $this->_htmlpage = new HTMLPage($ptitle);\r\n $this->setPageDefaults();\r\n $this->setDynamicDefaults();\r\n }", "function createPages() {\n\n $pages = \"Store Location,Store Trading Hours,Payment Options,Shipping & Delivery,Return / Refund Policy,Our Brands,Bike Hire,Bike Servicing,Mobile Mechanic Service,Bicycle Size Guide,Component Fitting,Corporate Sales,Our Team,Contact Us,Our Quality Promise,Privacy Statement,Disclaimer,Blog / Articles\";\n $pages = explode(',', $pages);\n\n foreach ($pages as $page) {\n $data = [\n 'page' => [\n 'title' => $page,\n 'body_html' => \"<h2>\".$page.\"</h2>\",\n ]\n ];\n\n try {\n $client = HttpClient::create();\n $response = $client->request('POST', shopifyApiurl . '/pages.json', ['json' => $data]);\n } catch (\\Exception $e) {\n var_dump($e);\n }\n }\n\n\n return new JsonResponse(['status' => 'finish']);\n }", "public function create()\n {\n\n // Using an empty model to allow the form to operate properly.\n $page = new ehPage();\n\n\n ///////////////////////////////////////////////////////////////////////////////////////////\n // Reset the display areas to defaults and pull the page info from Pages\n ehLayout::initLayout();\n\n ehLayout::setOptionBlock(false);\n ehLayout::setDynamic(false);\n ehLayout::setAttention(false);\n ehLayout::setWhenAdding(true);\n\n $linkbar = new ehLinkbar();\n ehLayout::setLinkbar($linkbar->getLinkbar());\n\n\n ///////////////////////////////////////////////////////////////////////////////////////////\n // Set up Save button based on this user's permissions.\n ehLayout::setStandardButtons('save');\n\n\n ///////////////////////////////////////////////////////////////////////////////////////////\n // Pull the $form array to pass to the template.\n $form['layout'] = ehLayout::getLayout();\n\n\n // Set the form action -- NOTE: POST to /groups calls groups.store\n $form['layout']['form_action'] = config('app.url').'/pages';\n $form['layout']['form_method']='POST';\n\n // Signal to template to leave certain elements out during a new record add.\n $form['layout']['when_adding'] = true;\n\n ////////////////////////////////////////////////////////////////////////////////////////////\n return view('ecoHelpers::pages.page-detail',[\n 'form' => $form,\n 'page' => $page\n ]);\n }", "protected function createCollection($website, $pageNumber)\n {\n }", "public function __construct()\n\t{\n\t\tparent::__construct('fuel_navigation');\n\t\t$this->required['group_id'] = lang('error_create_nav_group');\n\t}", "public static function group(string $group): self\n {\n $item = new self();\n\n $item->group = $group;\n\n return $item;\n }", "abstract protected function createPages($count = 10): array;", "public function getGroups($page=null, $per_page=null){\n return Group::all($page, $per_page);\n\t\t\n }" ]
[ "0.65364546", "0.60956913", "0.599549", "0.5894815", "0.5859384", "0.5801534", "0.5790278", "0.5761563", "0.57511973", "0.57402915", "0.5731229", "0.5641599", "0.5638056", "0.5616958", "0.5581516", "0.55720735", "0.5553098", "0.5537832", "0.55330896", "0.55330896", "0.55330896", "0.54995286", "0.5483279", "0.5482381", "0.54696774", "0.5443253", "0.5443253", "0.5438841", "0.5422769", "0.54187936", "0.5411695", "0.54059297", "0.5401452", "0.53980243", "0.53822935", "0.5375388", "0.53547907", "0.5347869", "0.5339746", "0.5319885", "0.5316662", "0.53128445", "0.52747303", "0.5271959", "0.52486694", "0.52435285", "0.5240001", "0.5237441", "0.52373105", "0.522959", "0.5225878", "0.52217865", "0.5220318", "0.52151686", "0.5201669", "0.51929396", "0.5190021", "0.5171096", "0.5166525", "0.5162207", "0.5160712", "0.5156599", "0.5154066", "0.5150606", "0.51370215", "0.5128441", "0.51225924", "0.51217407", "0.5121378", "0.5118239", "0.51178914", "0.51147735", "0.51101255", "0.5109717", "0.5107905", "0.510772", "0.5106941", "0.51006895", "0.509811", "0.509811", "0.5094712", "0.50867426", "0.50724995", "0.5071893", "0.50710464", "0.506764", "0.5067613", "0.50656104", "0.5063588", "0.5062676", "0.50538534", "0.5053629", "0.50514513", "0.5041809", "0.5041426", "0.5035361", "0.50272954", "0.50113887", "0.50068337", "0.499436", "0.49867973" ]
0.0
-1
transfer the order comment from the quote object to the order object during the sales_model_service_quote_submit_before event
public function execute(\Magento\Framework\Event\Observer $observer) { /** @var \Magento\Sales\Model\Order $order */ $order = $observer->getEvent()->getOrder(); // $this->logger->info("SalesOrderCustomerSzieFeeObserver===================>".$order->getId()); if ($order->getId()) { /** @var $quote \Magento\Quote\Model\Quote */ $quote = $this->quoteRepository->get($order->getQuoteId()); $customsizefee = $quote->getData('customsizefee'); // $this->logger->info("customsizefee===================>".$customsizefee); $order->setData('customsizefee',$customsizefee); $order->save(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function post_order_comment()\n\t{\n\t\tif ($this->checkLogin('A') != '') {\n\t\t\t$product_id = $this->input->post('product_id');\n\t\t\t$comment_from = $this->input->post('comment_from');\n\t\t\t$commentor_id = $this->input->post('commentor_id');\n\t\t\t$deal_code = $this->input->post('deal_code');\n\t\t\t$comment = $this->input->post('comment');\n\t\t\t$data = array('date' => date(\"Y-m-d H:i:s\"),'product_id' => $product_id,'comment_from' => $comment_from,'commentor_id' => $commentor_id,'deal_code' => $deal_code,'comment' => $comment);\n\t\t\t$this->order_model->simple_insert(REVIEW_COMMENTS,$data);\n\t\t}\n\t}", "public function processOrder($quote, $order)\n {\n $params = $this->prepareParamsForProcessOrder($quote, $order);\n $result = Mage::getModel('billsafe/client')->processOrder($params, $quote);\n return $result;\n }", "public function placeOrder(Mage_Sales_Model_Quote $quote)\n {\n Mage::dispatchEvent(\"fontis_masterpass_place_order_before\", array(\"quote\" => $quote));\n\n // Check to see if the customer is logged in or not.\n if (!$quote->getCustomerId()) {\n $quote->setCustomerIsGuest(true)\n ->setCustomerGroupId(Mage_Customer_Model_Group::NOT_LOGGED_IN_ID)\n ->setCustomerEmail($quote->getBillingAddress()->getEmail());\n }\n $quote->collectTotals();\n\n /** @var Mage_Sales_Model_Service_Quote $service */\n $service = Mage::getModel(\"sales/service_quote\", $quote);\n\n // The Mage_Sales_Model_Service_Quote interface changed from v1.4.1.0 CE onwards.\n // This accounts for this change.\n if (method_exists($service, \"submitAll\")) {\n $service->submitAll();\n $order = $service->getOrder();\n } else {\n $order = $service->submit();\n }\n $order->save();\n\n Mage::dispatchEvent(\"fontis_masterpass_place_order_after\", compact(\"quote\", \"order\"));\n\n return $order;\n }", "protected function _prepareCustomerQuote($quote)\n {\n /** @var Quote $quote */\n $billing = $quote->getBillingAddress();\n $shipping = $quote->isVirtual() ? null : $quote->getShippingAddress();\n\n $customer = $this->customerRepository->getById($quote->getCustomerId());\n $hasDefaultBilling = (bool)$customer->getDefaultBilling();\n $hasDefaultShipping = (bool)$customer->getDefaultShipping();\n\n if ($shipping && !$shipping->getSameAsBilling()\n && (!$shipping->getCustomerId() || $shipping->getSaveInAddressBook())\n ) {\n $shippingAddress = $shipping->exportCustomerAddress();\n if (!$hasDefaultShipping) {\n //Make provided address as default shipping address\n $shippingAddress->setIsDefaultShipping(true);\n $hasDefaultShipping = true;\n if (!$hasDefaultBilling && !$billing->getSaveInAddressBook()) {\n $shippingAddress->setIsDefaultBilling(true);\n $hasDefaultBilling = true;\n }\n }\n //save here new customer address\n $shippingAddress->setCustomerId($quote->getCustomerId());\n $this->addressRepository->save($shippingAddress);\n $quote->addCustomerAddress($shippingAddress);\n $shipping->setCustomerAddressData($shippingAddress);\n $this->addressesToSync[] = $shippingAddress->getId();\n $shipping->setCustomerAddressId($shippingAddress->getId());\n }\n\n if (!$billing->getCustomerId() || $billing->getSaveInAddressBook()) {\n $billingAddress = $billing->exportCustomerAddress();\n if (!$hasDefaultBilling) {\n //Make provided address as default shipping address\n if (!$hasDefaultShipping) {\n //Make provided address as default shipping address\n $billingAddress->setIsDefaultShipping(true);\n }\n $billingAddress->setIsDefaultBilling(true);\n }\n $billingAddress->setCustomerId($quote->getCustomerId());\n $this->addressRepository->save($billingAddress);\n $quote->addCustomerAddress($billingAddress);\n $billing->setCustomerAddressData($billingAddress);\n $this->addressesToSync[] = $billingAddress->getId();\n $billing->setCustomerAddressId($billingAddress->getId());\n }\n if ($shipping && !$shipping->getCustomerId() && !$hasDefaultBilling) {\n $shipping->setIsDefaultBilling(true);\n }\n }", "public function setOrder(\\Magento\\Sales\\Model\\Order $order);", "function setOrder( $order )\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n if ( get_class( $order ) == \"ezorder\" )\n {\n $this->OrderID = $order->id();\n } \n }", "public function preSave(ErpOrderTransfer $erpOrderTransfer): ErpOrderTransfer;", "abstract public function setOrder(OrderModel $order);", "public function prevalidateOrder($quote)\n {\n try {\n $params = $this->prepareParamsForPrevalidateOrder($quote);\n return Mage::getModel('billsafe/client')->prevalidateOrder($params, $quote);\n } catch (Exception $e) {\n return new stdClass();\n }\n }", "public function saveOrder()\n {\n $this->validate();\n $isNewCustomer = false;\n switch ($this->getCheckoutMethod()) {\n case self::METHOD_GUEST:\n $this->_prepareGuestQuote();\n break;\n case self::METHOD_REGISTER:\n $this->_prepareNewCustomerQuote();\n $isNewCustomer = true;\n break;\n default:\n $this->_prepareCustomerQuote();\n break;\n }\n\n /**\n * @var TM_FireCheckout_Model_Service_Quote\n */\n $service = Mage::getModel('firecheckout/service_quote', $this->getQuote());\n $service->submitAll();\n\n if ($isNewCustomer) {\n try {\n $this->_involveNewCustomer();\n } catch (Exception $e) {\n Mage::logException($e);\n }\n }\n\n $this->_checkoutSession->setLastQuoteId($this->getQuote()->getId())\n ->setLastSuccessQuoteId($this->getQuote()->getId())\n ->clearHelperData();\n\n $order = $service->getOrder();\n if ($order) {\n Mage::dispatchEvent('checkout_type_onepage_save_order_after',\n array('order'=>$order, 'quote'=>$this->getQuote()));\n\n /**\n * a flag to set that there will be redirect to third party after confirmation\n * eg: paypal standard ipn\n */\n $redirectUrl = $this->getQuote()->getPayment()->getOrderPlaceRedirectUrl();\n /**\n * we only want to send to customer about new order when there is no redirect to third party\n */\n $canSendNewEmailFlag = true;\n if (version_compare(Mage::helper('firecheckout')->getMagentoVersion(), '1.5.0.0', '>=')) {\n $canSendNewEmailFlag = $order->getCanSendNewEmailFlag();\n }\n if (!$redirectUrl && $canSendNewEmailFlag) {\n try {\n $order->sendNewOrderEmail();\n } catch (Exception $e) {\n Mage::logException($e);\n }\n }\n\n // add order information to the session\n $this->_checkoutSession->setLastOrderId($order->getId())\n ->setRedirectUrl($redirectUrl)\n ->setLastRealOrderId($order->getIncrementId());\n\n // as well a billing agreement can be created\n $agreement = $order->getPayment()->getBillingAgreement();\n if ($agreement) {\n $this->_checkoutSession->setLastBillingAgreementId($agreement->getId());\n }\n }\n\n // add recurring profiles information to the session\n $profiles = $service->getRecurringPaymentProfiles();\n if ($profiles) {\n $ids = array();\n foreach ($profiles as $profile) {\n $ids[] = $profile->getId();\n }\n $this->_checkoutSession->setLastRecurringProfileIds($ids);\n // TODO: send recurring profile emails\n }\n\n Mage::dispatchEvent(\n 'checkout_submit_all_after',\n array('order' => $order, 'quote' => $this->getQuote(), 'recurring_profiles' => $profiles)\n );\n\n return $this;\n }", "function set_comment() {\n $this->sale_lib->set_comment($this->input->post('comment'));\n }", "public function setCustomerCommentDelivery($observer)\r\n {\r\n try{\r\n $order = $observer->getEvent()->getOrder();\r\n $order_id = $order->getData('increment_id') ;\r\n $orderComment = $this->_getRequest()->getPost('suvery');\r\n if(trim($orderComment)!= 'other'){\r\n $orderComment = trim($orderComment);\r\n }else{\r\n $orderComment = trim($this->_getRequest()->getPost('suvery_other'));\r\n }\r\n //save suvery to database\r\n $resource = Mage::getSingleton('core/resource');\r\n $writeConnection = $resource->getConnection('core_write');\r\n $query = \"INSERT INTO \".Mage::getConfig()->getTablePrefix().\"onepagecheckout_suvery VALUES ('','\".$order_id.\"','\".$orderComment.\"','','')\";\r\n $writeConnection->query($query);\r\n //save delivery to datbase\r\n $delivery_date = $this->_getRequest()->getPost('delivery_date');\r\n $delivery_time = $this->_getRequest()->getPost('delivery_time');\r\n $resource = Mage::getSingleton('core/resource');\r\n $writeConnection = $resource->getConnection('core_write');\r\n $query = \"INSERT INTO \".Mage::getConfig()->getTablePrefix().\"onepagecheckout_delivery VALUES ('','\".$order_id.\"','\".$delivery_date.\"','\".$delivery_time.\"','','')\";\r\n $writeConnection->query($query);\r\n }catch(exception $e){\r\n \r\n }\r\n }", "public function getCustomerOrderComment()\n\t{\n\t\treturn $this->getAurednikOrder()->getData('aurednik_order_comment');\n\t}", "protected function _prepareCustomerQuote()\n {\n $quote = $this->getQuote();\n $billing = $quote->getBillingAddress();\n $shipping = $quote->isVirtual() ? null : $quote->getShippingAddress();\n\n $customer = $this->getCustomerSession()->getCustomer();\n if (!$billing->getCustomerId() || $billing->getSaveInAddressBook()) {\n $customerBilling = $billing->exportCustomerAddress();\n $customer->addAddress($customerBilling);\n $billing->setCustomerAddress($customerBilling);\n }\n\n if ($shipping && !$shipping->getSameAsBilling()\n && (!$shipping->getCustomerId() || $shipping->getSaveInAddressBook())\n ) {\n $customerShipping = $shipping->exportCustomerAddress();\n $customer->addAddress($customerShipping);\n $shipping->setCustomerAddress($customerShipping);\n }\n\n if (isset($customerBilling) && !$customer->getDefaultBilling()) {\n $customerBilling->setIsDefaultBilling(true);\n }\n\n if ($shipping && isset($customerShipping) && !$customer->getDefaultShipping()) {\n $customerShipping->setIsDefaultShipping(true);\n } else if (isset($customerBilling) && !$customer->getDefaultShipping()) {\n $customerBilling->setIsDefaultShipping(true);\n }\n\n $quote->setCustomer($customer);\n }", "protected function _prepareNewCustomerQuote()\n {\n $quote = $this->getQuote();\n $billing = $quote->getBillingAddress();\n $shipping = $quote->isVirtual() ? null : $quote->getShippingAddress();\n\n $customer = $quote->getCustomer();\n /* @var $customer Mage_Customer_Model_Customer */\n $customerBilling = $billing->exportCustomerAddress();\n $customer->addAddress($customerBilling);\n $billing->setCustomerAddress($customerBilling);\n $customerBilling->setIsDefaultBilling(true);\n if ($shipping && !$shipping->getSameAsBilling()) {\n $customerShipping = $shipping->exportCustomerAddress();\n $customer->addAddress($customerShipping);\n $shipping->setCustomerAddress($customerShipping);\n $customerShipping->setIsDefaultShipping(true);\n } else {\n $customerBilling->setIsDefaultShipping(true);\n }\n\n Mage::helper('core')->copyFieldset('checkout_onepage_quote', 'to_customer', $quote, $customer);\n $customer->setPassword($customer->decryptPassword($quote->getPasswordHash()));\n $quote->setCustomer($customer)\n ->setCustomerId(true);\n }", "protected function _prepareCustomerQuote()\n {\n $quote = $this->getQuote();\n $billing = $quote->getBillingAddress();\n $shipping = $quote->isVirtual() ? null : $quote->getShippingAddress();\n\n $customer = $this->getCustomerSession()->getCustomer();\n if (!$billing->getCustomerId() || $billing->getSaveInAddressBook()) {\n $customerBilling = $billing->exportCustomerAddress();\n $customer->addAddress($customerBilling);\n $billing->setCustomerAddress($customerBilling);\n }\n if ($shipping && !$shipping->getSameAsBilling() &&\n (!$shipping->getCustomerId() || $shipping->getSaveInAddressBook())) {\n $customerShipping = $shipping->exportCustomerAddress();\n $customer->addAddress($customerShipping);\n $shipping->setCustomerAddress($customerShipping);\n }\n\n if (isset($customerBilling) && !$customer->getDefaultBilling()) {\n $customerBilling->setIsDefaultBilling(true);\n }\n if ($shipping && isset($customerShipping) && !$customer->getDefaultShipping()) {\n $customerShipping->setIsDefaultShipping(true);\n } else if (isset($customerBilling) && !$customer->getDefaultShipping()) {\n $customerBilling->setIsDefaultShipping(true);\n }\n $quote->setCustomer($customer);\n }", "protected function _prepareNewCustomerQuote()\n {\n $quote = $this->getQuote();\n $billing = $quote->getBillingAddress();\n $shipping = $quote->isVirtual() ? null : $quote->getShippingAddress();\n\n $customer = $quote->getCustomer();\n /* @var $customer Mage_Customer_Model_Customer */\n $customerBilling = $billing->exportCustomerAddress();\n $customer->addAddress($customerBilling);\n $billing->setCustomerAddress($customerBilling);\n $customerBilling->setIsDefaultBilling(true);\n if ($shipping && !$shipping->getSameAsBilling()) {\n $customerShipping = $shipping->exportCustomerAddress();\n $customer->addAddress($customerShipping);\n $shipping->setCustomerAddress($customerShipping);\n $customerShipping->setIsDefaultShipping(true);\n } elseif ($shipping) {\n $customerBilling->setIsDefaultShipping(true);\n }\n\n if ($quote->getCustomerTaxnumber() && !$billing->getCustomerTaxnumber()) {\n $billing->setCustomerTaxnumber($quote->getCustomerTaxnumber());\n }\n\n Mage::helper('core')->copyFieldset('checkout_onepage_quote', 'to_customer', $quote, $customer);\n $customer->setPassword($customer->decryptPassword($quote->getPasswordHash()));\n $customer->setPasswordHash($customer->hashPassword($customer->getPassword()));\n $quote->setCustomer($customer)\n ->setCustomerId(true);\n }", "protected function createOrder(\\Magento\\Quote\\Model\\Quote $quote)\n {\n /** @var \\Magento\\Quote\\Model\\QuoteManagement */\n $quoteManagement = $this->objectManager->get('Magento\\Quote\\Model\\QuoteManagement');\n\n return $quoteManagement->submit($quote);\n }", "private function restoreQuote()\n\t{\n\t\t/** @var \\Magento\\Sales\\Model\\Order $order */ \n\t\t$lastOrderCookie = $this->_objectManager->get('Orange\\Customer\\Model\\CustomerCookie')->getLastOrderCookie();\n\t\tif($lastOrderCookie != '') {\t\t\n\t\t\t$order = $this->_objectManager->get('Magento\\Sales\\Model\\Order')->load($lastOrderCookie, 'increment_id');\n\t\t\tif ($order->getId() && $order->getStatus() == 'pending_payment') {\n\t\t\t\ttry {\n\t\t\t\t\t$this->_checkoutSession = $this->_objectManager->get('Magento\\Checkout\\Model\\Session');\n\t\t\t\t\t$this->_checkoutSession->setLastRealOrderId($order->getIncrementId());\n\t\t\t\t\t$this->_objectManager->get('Psr\\Log\\LoggerInterface')->addDebug('LastOrderPlaced:'.$lastOrderCookie);\n\t\t\t\t\t$this->_objectManager->get('Psr\\Log\\LoggerInterface')->addDebug('LastRealOrderPlaceds:'.$order->getIncrementId());\n\t\t\t\t\t$lastOrder = $this->_checkoutSession->getLastRealOrder();\n\t\t\t\t\t$this->_checkoutSession->restoreQuote();\n\t\t\t\t\t$this->_objectManager->get('Psr\\Log\\LoggerInterface')->addDebug('LastRealOrder:'.$lastOrder->getIncrementId()); \n\t\t\t\t\treturn true;\n\t\t\t\t} catch (\\Magento\\Framework\\Exception\\NoSuchEntityException $e) {\n\t\t\t\t\t$this->_objectManager->get('Psr\\Log\\LoggerInterface')->addDebug($e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public function afterPlaceOrder($order)\n {\n $this->aliExpressOrderRepository->create(['order' => $order]);\n }", "public function createQuote()\n\t{\n\t\t$this->setType($_POST['frmquotetype']);\n\t\t$this->setDate($_POST['frmquotedate']);\n\t\t$this->setStatus('Open');\n\t\t$this->setJobName($_POST['frmjobname']);\n\t\t$this->setJobAddress($_POST['frmjobaddress']);\n\t\t$this->setJobCity($_POST['frmjobcity']);\n\t\t$this->setJobZipcode($_POST['frmjobzipcode']);\n\t\t$this->setAttention($_POST['frmattn']);\n\t\t// Here we are going to post the tax rate and turn it into a float.\n\t\t$unformatted_tax_rate = $_POST['frmtaxrate'];\n\t\t$this->setTaxRate((float)$unformatted_tax_rate);\n\t\t$this->setCostBeforeTax($_POST['cartBeforeTaxCost']);\n\t\t$this->setTotalCost($_POST['cartTotalCost']);\n\t\t$this->setSalesTax($_POST['cartTax']);\n\t\t$this->setMonthlyTotal($_POST['cartMonthlyTotal']);\n\t\t$this->setDeliveryTotal($_POST['cartDeliveryTotal']);\n\t\t$this->setHidden(null);\n\n\t\t// Need to insert the new order into the database.\n\t\t$this->getDB()->insert('quotes', [\n\t\t\t\t'quote_customer' \t\t=> $this->getCustomer(),\n\t\t\t\t'quote_customer_id' \t=> $this->getCustomerId(),\n\t\t\t\t'quote_date' \t\t\t=> $this->getDate(),\n\t\t\t\t'quote_status' \t\t\t=> $this->getStatus(),\n\t\t\t\t'quote_type' \t\t\t=> $this->getType(),\n\t\t\t\t'job_name' \t\t\t\t=> $this->getJobName(),\n\t\t\t\t'job_city' \t\t\t\t=> $this->getJobCity(),\n\t\t\t\t'job_address' \t\t\t=> $this->getJobAddress(),\n\t\t\t\t'job_zipcode' \t\t\t=> $this->getJobZipcode(),\n\t\t\t\t'attn' \t\t\t\t\t=> $this->getAttention(),\n\t\t\t\t'tax_rate' \t\t\t\t=> $this->getTaxRate(),\n\t\t\t\t'cost_before_tax' \t\t=> $this->getCostBeforeTax(),\n\t\t\t\t'total_cost' \t\t\t=> $this->getTotalCost(),\n\t\t\t\t'sales_tax' \t\t\t=> $this->getSalesTax(),\n\t\t\t\t'monthly_total' \t\t=> $this->getMonthlyTotal(),\n\t\t\t\t'delivery_total'\t\t=> $this->getDeliveryTotal(),\n\t\t\t\t'hidden'\t\t\t\t=> $this->getHidden()\n\t\t\t]);\n\n\t\t// If properly inserted, grab the ID, else throw error.\n\t\tif($this->getDB()->lastId() != null)\n\t\t{\n\t\t\t$this->id = $this->getDB()->lastId();\n\t\t} \n\t\telse \n\t\t{\n\t\t\tthrow new Exception(\"There was an error inserting the quote into the database.\");\n\t\t}\n\t\t\n\t}", "private function saveOrder() {\n $currentDate = new Zend_Date();\n $customer = Customer::findByEmail($this->getRequest()->getParam('email'));\n $customer->name = $this->getRequest()->getParam('name');\n $customer->phone = $this->getRequest()->getParam('phone');\n\n $ord = new Order();\n $ord->Customer = $customer;\n $ord->date = $currentDate->get();\n //TODO Take product id from param and check if it is available (not in future, still on sales, etc)\n $product = Product::getCurrentProduct();\n $ord->Product = $product;\n $customer->save();\n $ord->save();\n $product->takeFromStock();\n $customer->sendOrderNotification($ord);\n }", "protected function _prepare_comment($comment)\n {\n }", "public function saved(Order $Order)\n {\n //code...\n }", "public function saveCustomerComment()\n {\n\t$comment = Mage::app()->getRequest()->getParam('comment', null);\n\tif($comment && strlen(trim($comment))) {\n\t $this->_checkoutSession->setData('customer_comment', $comment);\n\t} else {\n\t $this->_checkoutSession->unsetData('customer_comment');\n\t}\n }", "public function restoreQuote(OrderInterface $order): void\n {\n // Keep quote active in case the customer comes back to the site without paying\n $quote = $this->quoteRepository->get($order->getQuoteId());\n $quote->setIsActive(true);\n $this->checkoutSession->restoreQuote();\n $this->quoteRepository->save($quote);\n\n $this->checkoutSession->setLastQuoteId($quote->getId())->setLastSuccessQuoteId($quote->getId())->setLastOrderId($order->getId())->setLastRealOrderId($order->getIncrementId());\n }", "public function setOrder(\\Magento\\Sales\\Model\\Order $order)\n {\n return $this->setData(self::ORDER_ID, $order->getId());\n }", "public function save(Comment $comment)\n {\n $commentdata = array(\n 'art_id' => $comment->getArticle()->getId(),\n 'com_author' => $comment->getAuthor(),\n 'com_content' => $comment->getContent(),\n 'com_mail' => $comment->getMail(),\n 'parent_id' => $comment->getParent(),\n 't_date' => $comment->getDate(),\n 't_state'=> $comment->getState()\n ); \n \n if($comment->getId())\n {\n var_dump($commentdata);\n $this->getDb()->update('t_comment',$commentdata,array('com_id' => $comment->getId()));\n }\n else\n {\n $this->getDb()->insert('t_comment', $commentdata);\n $id = $this->getDb()->lastinsertID();\n $comment->setId($id);\n }\n }", "public function saving(Order $Order)\n {\n //code...\n }", "private function initTransaction(Mage_Sales_Model_Order $order)\n {\n /** @var Oyst_OneClick_Helper_Data $helper */\n $helper = Mage::helper('oyst_oneclick');\n\n // Set transaction info\n /** @var Mage_Sales_Model_Order_Payment $payment */\n $payment = $order->getPayment();\n $payment->setTransactionId($this->orderResponse['transaction']['id']);\n $payment->setCurrencyCode($this->orderResponse['transaction']['amount']['currency']);\n $payment->setPreparedMessage(Mage::helper('oyst_oneclick')->__('%s', $this->paymentMethod));\n $payment->setShouldCloseParentTransaction(true);\n $payment->setIsTransactionClosed(1);\n\n if (Mage::helper('oyst_oneclick')->getConfig('enable_invoice_auto_generation')) {\n $payment->registerCaptureNotification($helper->getHumanAmount($this->orderResponse['order_amount']['value']));\n }\n\n $order->save();\n }", "public function setOrder(?string $order): void\n {\n $this->order = $order;\n }", "public function setOrder(?string $order): void\n {\n $this->order = $order;\n }", "public function captureOrder(\\TPkgShopPaymentTransactionManager $transactionManager, \\TdbShopOrder $order);", "public function prepareOrder (Varien_Event_Observer $observer)\n\t{\n\t\tif (!$this->isEnabled()) {\n\t\t\treturn;\n\t\t}\n\t\t$order = $observer->getEvent()->getOrder();\n\t\t$cookie = Mage::getModel('productfeed/vendor_linkShare_cookie');\n\t\tif ($order && $cookie->hasData()) {\n\t\t\t$order->setExternalSource(Grommet_ProductFeed_Model_Vendor_LinkShare::CODE);\n\t\t}\n\t}", "public function onFrontendQuoteSaveAfter($observer)\n\t{\n\t\ttry {\n\t\t\t$this->_initObserver($observer);\n\t\t\t$quoteObject = $observer->getQuote();\n\t\t\t$quoteParser = $this->_initParser($quoteObject);\n\n\t\t\tif (\n\t\t\t\t$quoteParser->getItemsCount() > 0 &&\n\t\t\t\t($quoteParser->hasCustomerData() || Mage::getStoreConfig('springbot/config/send_cart_noemail')) &&\n\t\t\t\t$quoteParser->getStoreId()\n\t\t\t) {\n\t\t\t\t$json = $quoteParser->toJson();\n\n\t\t\t\tif (Mage::helper('combine')->doSendQuote($json)) {\n\t\t\t\t\tSpringbot_Boss::addTrackable(\n\t\t\t\t\t\t'cart_user_agent',\n\t\t\t\t\t\tMage::helper('core/http')->getHttpUserAgent(),\n\t\t\t\t\t\t$quoteParser->getQuoteId(),\n\t\t\t\t\t\t$quoteParser->getCustomerId(),\n\t\t\t\t\t\t$quoteParser->getCustomerEmail()\n\t\t\t\t\t);\n\n\t\t\t\t\tSpringbot_Boss::scheduleJob('post:cart', array(\n\t\t\t\t\t\t\t's' => Mage::app()->getStore()->getId(),\n\t\t\t\t\t\t\t'i' => $quoteParser->getQuoteId()\n\t\t\t\t\t\t), Springbot_Services::LISTENER, 'listener'\n\t\t\t\t\t);\n\n\t\t\t\t\t$this->insertRedirectIds($quoteParser);\n\t\t\t\t\t$this->createTrackables($quoteParser);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (Exception $e) {\n\t\t\tSpringbot_Log::error($e->getMessage());\n\t\t}\n\t}", "private function saveOrder()\n {\n $this->paymentInterface->setMethod(self::PAYMENT_METHOD);\n $this->magentoOrderId = $this->quoteManagement->placeOrder($this->quoteId, $this->paymentInterface);\n /** @var \\Magento\\Sales\\Api\\Data\\OrderInterface magentoOrder */\n $this->magentoOrder = $this->orderRepositoryInterface->get($this->magentoOrderId);\n\n if ($this->magentoOrderId == '') {\n throw new \\Exception(self::PMO_ERR_MSG);\n }\n }", "public function saveSendQuoteAction()\n\t{\n\t\tif($this->_request-> isPost() && $this->adminLogin->userId) \n {\n\t\t\t$final_parameters=$this->_request->getParams();\n\n\t\t\t$quote_obj=new Ep_Quote_Quotes();\n\n\t\t\t//echo \"<pre>\";print_r($final_parameters);exit;\n\n\t\t\t//insert Quotes\n\t\t\t$quotes_data['title']=$this->quote_creation->create_mission['quote_title'];\n\t\t\t$quotes_data['client_id']=$this->quote_creation->create_step1['client_id'];\n\t\t\t$quotes_data['category']=$this->quote_creation->create_step1['category'];\n\t\t\tif($quotes_data['category']=='other')\n\t\t\t\t\t$quotes_data['category_other']=isodec($this->quote_creation->create_step1['category_other']);\n\t\t\tif($this->quote_creation->create_step1['client_websites'])\n\t\t\t$quotes_data['websites']=implode(\"|\",$this->quote_creation->create_step1['client_websites']);\n\t\t\t$quotes_data['quote_by']=$this->quote_creation->create_step1['quote_by'];\n\t\t\t$quotes_data['created_by']=$this->adminLogin->userId;\n\t\t\t$quotes_data['sales_suggested_price']=$this->quote_creation->select_missions['total_suggested_price'];\n\t\t\t$quotes_data['sales_suggested_currency']=$this->quote_creation->select_missions['currency'];\n\t\t\t$quotes_data['sales_comment']=$final_parameters['bo_comments'];\n\t\t\t$quotes_data['client_email_text']=$final_parameters['client_email'];\n\t\t\t//$quotes_data['documents_path']='path';\n\t\t\t$quotes_data['conversion']=$this->quote_creation->create_step1['conversion'];\n\n\t\t\t//$quotes_data['sales_delivery_time']=$final_parameters['delivery_time'];\n\t\t\t//$quotes_data['sales_delivery_time_option']=$final_parameters['delivery_option'];\n\t\t\t$quotes_data['client_know']=$final_parameters['client_know']? 'no':'yes';\n\t\t\t$quotes_data['urgent']=$final_parameters['urgent']? 'yes':'no';\n\t\t\t$quotes_data['urgent_comments']=$final_parameters['urgent_comments']?$final_parameters['urgent_comments']:NULL;\t\t\t\n\t\t\n\t\t\t/*$quotes_data['market_team_sent']=$final_parameters['market_team_sent'];\n\t\t\tif($quotes_data['market_team_sent']=='yes')\n\t\t\t\t$quotes_data['from_platform']=$final_parameters['from_platform'];*/\n\n\n\t\t\t//NEW QUOTE FILEDS \n\t\t\t$client_aims=$final_parameters['client_aims'];\n\t\t\t$quotes_data['client_aims']=implode(\",\",$client_aims);\n\n\t\t\tforeach($client_aims as $aim)\n\t\t\t{\n\t\t\t\t$client_prio[]=$final_parameters['priority_'.$aim];\n\t\t\t}\n\t\t\t$quotes_data['client_prio']=implode(\",\",$client_prio);\n\n\t\t\t$client_aims_comments=$final_parameters['client_aims_comments'];\n\t\t\t$quotes_data['client_aims_comments']=$client_aims_comments;\n\n\n\t\t\t$content_ordered_agency=$final_parameters['content_ordered_agency'];\n\t\t\t$quotes_data['content_ordered_agency']=$content_ordered_agency;\n\t\t\tif($content_ordered_agency=='yes')\n\t\t\t{\n\t\t\t\tif($final_parameters['agency']=='dont_know')\n\t\t\t\t{\n\t\t\t\t\t$quotes_data['agency']=$final_parameters['agency'];\n\t\t\t\t\t$quotes_data['agency_name']='';\n\t\t\t\t}\n\t\t\t\telseif($final_parameters['agency_name'])\n\t\t\t\t{\n\t\t\t\t\t$quotes_data['agency']='';\n\t\t\t\t\t$quotes_data['agency_name']=$final_parameters['agency_name'];\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse if($content_ordered_agency=='no')\n\t\t\t{\n\t\t\t\t$quotes_data['client_internal_team']=$final_parameters['client_internal_team'];\n\t\t\t}\n\n\t\t\t$quotes_data['client_know_writers']=$final_parameters['client_know_writers'];\n\n\t\t\t$volume_option=$final_parameters['volume_option'];\n\t\t\t$quotes_data['volume_option']=$volume_option;\n\t\t\tif($volume_option=='per')\n\t\t\t{\n\t\t\t\t$quotes_data['volume_option_multi']=$final_parameters['volume_option_multi'];\n\t\t\t}\n\t\t\telse if($volume_option=='every')\n\t\t\t{\n\t\t\t\t$quotes_data['volume_option_multi']=$final_parameters['volume_option_multi_every'];\n\t\t\t\t$quotes_data['volume_every']=$final_parameters['volume_every'];\n\t\t\t}\n\n\t\t\t$budget_marketing=$final_parameters['budget_marketing'];\n\t\t\tif($budget_marketing=='dont_know')\n\t\t\t{\n\t\t\t\t$quotes_data['budget_marketing']=$budget_marketing;\n\t\t\t\t$quotes_data['budget']='';\n\t\t\t\t$quotes_data['budget_currency']='';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$quotes_data['budget_marketing']='';\n\t\t\t\t$quotes_data['budget']=$final_parameters['budget'];\n\t\t\t\t$quotes_data['budget_currency']=$final_parameters['budget_currency'];\n\t\t\t}\n\n\n\t\t\t$quotes_data['estimate_sign_percentage']=$final_parameters['estimate_sign_percentage'];\n\t\t\t$quotes_data['estimate_sign_date']=$final_parameters['estimate_sign_date'];\n\t\t\t$quotes_data['estimate_sign_comments']=$final_parameters['estimate_sign_comments'];\n\n\t\t\t//echo \"<pre>\";print_r($quotes_data);exit;\n\n\t\t\t//Quote current version\n\t\t\tif($this->quote_creation->custom['version'])\n\t\t\t{\n\t\t\t\t$version=$this->quote_creation->custom['version'];\n\t\t\t}\n\t\t\telse\n\t\t\t\t$version=1;\n\t\t\t$quotes_data['version']=$version;\n\n\t\t\t//Getting Quote details if quote id available\n\t\t\t$quoteIdentifier=$this->quote_creation->custom['quote_id'];\n\t\t\tif($quoteIdentifier)\n\t\t\t{\n\t\t\t\t$quoteEditDetails=$quote_obj->getQuoteDetails($quoteIdentifier);\n\t\t\t\t$sales_review_staus=$quoteEditDetails[0]['sales_review'];\n\t\t\t}\n\t\t\t\n\n\t\t\t//check manager is on holiday or not\n\t\t\t$salesManager_holiday=$this->configval[\"sales_manager_holiday\"];\n\t\t\t$user_type=$this->adminLogin->type;\n\n\t\t\t\n\t\t\t//Staus of tech,seo,prod and sales\n\t\t\tif($this->quote_creation->custom['action']=='edit' && $this->quote_creation->custom['create_new_version']=='yes')//new version quote\n\t\t\t{\n\t\t\t\tif(isset($final_parameters['send_low_quote']) OR isset($final_parameters['send_big_quote']) )\n\t\t\t\t{\n\t\t\t\t\t$quotes_data['quote_send_team']=$final_parameters['quote_send_team'];\n\n\t\t\t\t\tif(($final_parameters['quote_send_team']=='send_sales_team'))\n\t\t\t\t\t{\t\t\t\t\t\t\t\n\t\t\t\t\t\t$quotes_data[\"sales_validation_expires\"]=time()+($this->configval['sales_validation_timeline']*60*60);\n\t\t\t\t\t\t$quotes_data['skip_prod_comments']=$final_parameters['skip_prod_comments'] ? $final_parameters['skip_prod_comments']:NULL;\n\t\t\t\t\t\t$prod_hours=$this->configval['sales_validation_timeline'];\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t$onlySales=true;\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(($final_parameters['quote_send_team']=='send_tech_prod_team') || ($final_parameters['quote_send_team']=='send_tech_team'))\n\t\t\t\t\t\t{\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$quotes_data['tec_review']='not_done';\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$tech_seo_time=$this->configval['quote_sent_timeline'];\n\n\t\t\t\t\t\t\t$quotes_data['tech_timeline']=NULL;\n\t\t\t\t\t\t\t$quotes_data['tech_challenge_comments']='';\n\t\t\t\t\t\t\t$quotes_data['tech_challenge']='yes';\n\n\t\t\t\t\t\t\tif($final_parameters['quote_send_team']=='send_tech_prod_team')\n\t\t\t\t\t\t\t{//if tech & prod\n\t\t\t\t\t\t\t\t$quotes_data['prod_review']='challenged';\t\n\t\t\t\t\t\t\t\t$quotes_data[\"prod_timeline\"]=time()+($this->configval['prod_timeline']*60*60);\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\telse if(($final_parameters['quote_send_team']=='send_seo_prod_team') || ($final_parameters['quote_send_team']=='send_seo_team'))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$quotes_data['seo_review']='not_done';\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$tech_seo_time=$this->configval['quote_sent_timeline'];\n\n\t\t\t\t\t\t\t$quotes_data['seo_timeline']=NULL;\n\t\t\t\t\t\t\t$quotes_data['seo_comments']='';\n\t\t\t\t\t\t\t$quotes_data['seo_challenge']='yes';\n\n\t\t\t\t\t\t\tif($final_parameters['quote_send_team']=='send_seo_prod_team')\n\t\t\t\t\t\t\t{//if seo & prod\n\t\t\t\t\t\t\t\t$quotes_data['prod_review']='challenged';\n\t\t\t\t\t\t\t\t$quotes_data[\"prod_timeline\"]=time()+($this->configval['prod_timeline']*60*60);\t\t\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(($final_parameters['quote_send_team']=='send_tech_seo_team'))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$quotes_data['tec_review']='not_done';\t\n\t\t\t\t\t\t\t$quotes_data['seo_review']='not_done';\n\n\t\t\t\t\t\t\t$quotes_data['seo_timeline']=NULL;\n\t\t\t\t\t\t\t$quotes_data['seo_comments']='';\n\t\t\t\t\t\t\t$quotes_data['seo_challenge']='yes';\n\n\t\t\t\t\t\t\t$quotes_data['tech_timeline']=NULL;\n\t\t\t\t\t\t\t$quotes_data['tech_challenge_comments']='';\n\t\t\t\t\t\t\t$quotes_data['tech_challenge']='yes';\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t$tech_seo_time=$this->configval['quote_sent_timeline'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(($final_parameters['quote_send_team']=='send_prod_team'))\n\t\t\t\t\t\t{\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$quotes_data['prod_review']='challenged';\n\t\t\t\t\t\t\t$quotes_data[\"prod_timeline\"]=time()+($this->configval['prod_timeline']*60*60);\t\t\t\t\n\t\t\t\t\t\t\t$onlyProd=true;\n\t\t\t\t\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$quotes_data['tec_review']='not_done';\t\n\t\t\t\t\t\t\t$quotes_data['seo_review']='not_done';\n\t\t\t\t\t\t\t$quotes_data['prod_review']='challenged';\n\t\t\t\t\t\t\t$quotes_data[\"prod_timeline\"]=time()+($this->configval['prod_timeline']*60*60);\t\n\t\t\t\t\t\t\t$tech_seo_time=$this->configval['quote_sent_timeline'];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$quotes_data[\"response_time\"]=time()+($this->configval['quote_sent_timeline']*60*60);\n\t\t\t\t\t\t$prod_hours=($this->configval['prod_timeline']+$this->configval['sales_validation_timeline']);\n\t\t\t\t\t\t$quotes_data['skip_prod_comments']='';\n\t\t\t\t\t}\t\n\t\t\t\t\t\n\t\t\t\t\t$quote_end_hours=$this->configval['quote_end_time'];\n\t\t\t\t\t$quotes_data['quote_delivery_hours']=($prod_hours+$tech_seo_time+$quote_end_hours);\n\n\t\t\t\t\t//echo \"<pre>\";print_r($final_parameters);print_r($quotes_data);exit;\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\telseif($this->quote_creation->custom['action']=='edit' && !$this->quote_creation->custom['create_new_version'] && $sales_review_staus!='to_be_approve') //quote edit\n\t\t\t{\n\t\t\t\tif(isset($final_parameters['send_low_quote']) OR isset($final_parameters['send_big_quote']) )\n\t\t\t\t{\n\t\t\t\t\t//$quotes_data['quote_send_team']=$final_parameters['quote_send_team'];\n\t\t\t\t\t\n\t\t\t\t\t$oldTechReview=$quoteEditDetails[0]['tec_review'];\n\t\t\t\t\t$oldSeoReview=$quoteEditDetails[0]['seo_review'];\n\t\t\t\t\t$oldProdReview=$quoteEditDetails[0]['prod_review'];\n\t\t\t\t\t$oldSalesReview=$quoteEditDetails[0]['sales_review'];\n\n\t\t\t\t\tif(($final_parameters['quote_send_team']=='send_sales_team'))\n\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t$quotes_data[\"sales_validation_expires\"]=time()+($this->configval['sales_validation_timeline']*60*60);\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(($final_parameters['quote_send_team']=='send_tech_prod_team') || ($final_parameters['quote_send_team']=='send_tech_team'))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//restart tech review \n\t\t\t\t\t\t\tif($oldTechReview=='auto_skipped' || $oldTechReview=='skipped' || $oldTechReview=='not_done')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$quotes_data['tec_review']='not_done';\n\t\t\t\t\t\t\t\t$tech_seo_time=$this->configval['quote_sent_timeline'];\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telseif($oldTechReview=='challenged' || $oldTechReview=='validated')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$quotes_data['tec_review']='challenged';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif($final_parameters['quote_send_team']=='send_tech_prod_team')\n\t\t\t\t\t\t\t{//if tech & prod\n\t\t\t\t\t\t\t\t$quotes_data['prod_review']='challenged';\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$quotes_data[\"prod_timeline\"]=time()+($this->configval['prod_timeline']*60*60);\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(($final_parameters['quote_send_team']=='send_seo_prod_team') || ($final_parameters['quote_send_team']=='send_seo_team'))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//restart seo review \n\t\t\t\t\t\t\tif($oldSeoReview=='auto_skipped' || $oldSeoReview=='skipped' || $oldSeoReview=='not_done')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$quotes_data['seo_review']='not_done';\n\t\t\t\t\t\t\t\t$tech_seo_time=$this->configval['quote_sent_timeline'];\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telseif($oldSeoReview=='challenged' || $oldSeoReview=='validated')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$quotes_data['seo_review']='challenged';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif($final_parameters['quote_send_team']=='send_seo_prod_team')\n\t\t\t\t\t\t\t{//if seo & prod\n\t\t\t\t\t\t\t\t$quotes_data['prod_review']='challenged';\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$quotes_data[\"prod_timeline\"]=time()+($this->configval['prod_timeline']*60*60);\t\t\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(($final_parameters['quote_send_team']=='send_tech_seo_team'))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//restart seo/tech review\n\t\t\t\t\t\t\t//restart tech review \n\t\t\t\t\t\t\tif($oldTechReview=='auto_skipped' || $oldTechReview=='skipped' || $oldTechReview=='not_done')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$quotes_data['tec_review']='not_done';\n\t\t\t\t\t\t\t\t$tech_seo_time=$this->configval['quote_sent_timeline'];\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telseif($oldTechReview=='challenged' || $oldTechReview=='validated')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$quotes_data['tec_review']='challenged';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//restart seo review \n\t\t\t\t\t\t\tif($oldSeoReview=='auto_skipped' || $oldSeoReview=='skipped' || $oldSeoReview=='not_done')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$quotes_data['seo_review']='not_done';\n\t\t\t\t\t\t\t\t$tech_seo_time=$this->configval['quote_sent_timeline'];\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telseif($oldSeoReview=='challenged' || $oldSeoReview=='validated')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$quotes_data['seo_review']='challenged';\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(($final_parameters['quote_send_team']=='send_prod_team'))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//restart prod_review\n\t\t\t\t\t\t\tif($oldProdReview=='validated' || $oldProdReview=='auto_skipped' || $oldProdReview=='challenged' )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$quotes_data['prod_review']='challenged';\n\t\t\t\t\t\t\t\t$quotes_data[\"prod_timeline\"]=time()+($this->configval['prod_timeline']*60*60);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(($final_parameters['quote_send_team']=='send_all_team'))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//restart tech review \n\t\t\t\t\t\t\tif($oldTechReview=='auto_skipped' || $oldTechReview=='skipped' || $oldTechReview=='not_done')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$quotes_data['tec_review']='not_done';\n\t\t\t\t\t\t\t\t$tech_seo_time=$this->configval['quote_sent_timeline'];\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telseif($oldTechReview=='challenged' || $oldTechReview=='validated')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$quotes_data['tec_review']='challenged';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//restart seo review \n\t\t\t\t\t\t\tif($oldSeoReview=='auto_skipped' || $oldSeoReview=='skipped' || $oldSeoReview=='not_done')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$quotes_data['seo_review']='not_done';\n\t\t\t\t\t\t\t\t$tech_seo_time=$this->configval['quote_sent_timeline'];\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telseif($oldSeoReview=='challenged' || $oldSeoReview=='validated')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$quotes_data['seo_review']='challenged';\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t//restart prod_review\n\t\t\t\t\t\t\tif($oldProdReview=='validated' || $oldProdReview=='auto_skipped' || $oldProdReview=='challenged' )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$quotes_data['prod_review']='challenged';\n\t\t\t\t\t\t\t\t$quotes_data[\"prod_timeline\"]=time()+($this->configval['prod_timeline']*60*60);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t\tif($tech_seo_time)\n\t\t\t\t\t\t$quotes_data[\"response_time\"]=time()+($tech_seo_time*60*60);\n\t\t\t\t\t//echo \"<pre>\";print_r($quotes_data);exit;\n\t\t\t\t\t$edited=TRUE;\n\t\t\t\t}\t\n\t\t\t}\n\t\t\telse//quote creation v1\n\t\t\t{\n\t\t\t\tif(isset($final_parameters['send_low_quote']) OR isset($final_parameters['send_big_quote']) )\n\t\t\t\t{\n\t\t\t\t\t$quotes_data['quote_send_team']=$final_parameters['quote_send_team'];\n\n\t\t\t\t\tif(($final_parameters['quote_send_team']=='send_sales_team')&&isset($final_parameters['send_low_quote']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$quotes_data['tec_review']='auto_skipped';\t\n\t\t\t\t\t\t$quotes_data['seo_review']='auto_skipped';\n\t\t\t\t\t\t$quotes_data['prod_review']='auto_skipped';\n\n\t\t\t\t\t\t$onlySales=true;\n\t\t\t\t\t\t$quotes_data[\"sales_validation_expires\"]=time()+($this->configval['sales_validation_timeline']*60*60);\n\t\t\t\t\t\t$quotes_data['skip_prod_comments']=$final_parameters['skip_prod_comments']?$final_parameters['skip_prod_comments']:NULL;\n\t\t\t\t\t\t$prod_hours=$this->configval['sales_validation_timeline'];\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t\tif(($final_parameters['quote_send_team']=='send_tech_team'))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$quotes_data['tec_review']='not_done';\t\n\t\t\t\t\t\t\t$quotes_data['seo_review']='auto_skipped';\n\t\t\t\t\t\t\t$quotes_data['prod_review']='auto_skipped';\n\n\t\t\t\t\t\t\t$tech_seo_time=$this->configval['quote_sent_timeline'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(($final_parameters['quote_send_team']=='send_seo_team'))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$quotes_data['tec_review']='auto_skipped';\t\n\t\t\t\t\t\t\t$quotes_data['seo_review']='not_done';\n\t\t\t\t\t\t\t$quotes_data['prod_review']='auto_skipped';\n\n\t\t\t\t\t\t\t$tech_seo_time=$this->configval['quote_sent_timeline'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(($final_parameters['quote_send_team']=='send_tech_seo_team'))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$quotes_data['tec_review']='not_done';\t\n\t\t\t\t\t\t\t$quotes_data['seo_review']='not_done';\n\t\t\t\t\t\t\t$quotes_data['prod_review']='auto_skipped';\n\n\t\t\t\t\t\t\t$tech_seo_time=$this->configval['quote_sent_timeline'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(($final_parameters['quote_send_team']=='send_tech_prod_team'))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$quotes_data['tec_review']='not_done';\t\n\t\t\t\t\t\t\t$quotes_data['seo_review']='auto_skipped';\n\t\t\t\t\t\t\t$quotes_data['prod_review']='challenged';\n\t\t\t\t\t\t\t$quotes_data[\"prod_timeline\"]=time()+($this->configval['prod_timeline']*60*60);\t\t\n\t\t\t\t\t\t\t$tech_seo_time=$this->configval['quote_sent_timeline'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(($final_parameters['quote_send_team']=='send_seo_prod_team'))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$quotes_data['tec_review']='auto_skipped';\t\n\t\t\t\t\t\t\t$quotes_data['seo_review']='not_done';\n\t\t\t\t\t\t\t$quotes_data['prod_review']='challenged';\n\t\t\t\t\t\t\t$quotes_data[\"prod_timeline\"]=time()+($this->configval['prod_timeline']*60*60);\t\t\n\t\t\t\t\t\t\t$tech_seo_time=$this->configval['quote_sent_timeline'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(($final_parameters['quote_send_team']=='send_prod_team'))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$quotes_data['tec_review']='auto_skipped';\t\n\t\t\t\t\t\t\t$quotes_data['seo_review']='auto_skipped';\n\t\t\t\t\t\t\t$quotes_data['prod_review']='challenged';\n\n\t\t\t\t\t\t\t$quotes_data[\"prod_timeline\"]=time()+($this->configval['prod_timeline']*60*60);\t\t\t\t\n\t\t\t\t\t\t\t$onlyProd=true;\n\t\t\t\t\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$quotes_data['tec_review']='not_done';\t\n\t\t\t\t\t\t\t$quotes_data['seo_review']='not_done';\n\t\t\t\t\t\t\t$quotes_data['prod_review']='challenged';\n\t\t\t\t\t\t\t$quotes_data[\"prod_timeline\"]=time()+($this->configval['prod_timeline']*60*60);\t\t\n\t\t\t\t\t\t\t$tech_seo_time=$this->configval['quote_sent_timeline'];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$quotes_data[\"response_time\"]=time()+($this->configval['quote_sent_timeline']*60*60);\n\t\t\t\t\t\t$prod_hours=($this->configval['prod_timeline']+$this->configval['sales_validation_timeline']);\n\t\t\t\t\t}\t\n\t\t\t\t\t$quote_end_hours=$this->configval['quote_end_time'];\n\t\t\t\t\t$quotes_data['quote_delivery_hours']=($prod_hours+$tech_seo_time+$quote_end_hours);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//quote to be approved if created by sales user when sales manager is available\n\t\t\t\tif(($salesManager_holiday=='no' && $user_type=='salesuser' && $quotes_data['sales_suggested_price']>=5000) || ($this->quote_creation->create_mission['producttypeautre']==TRUE && $user_type=='salesuser'))\n\t\t\t\t{\n\t\t\t\t\t$quotes_data['sales_review']='to_be_approve';\n\t\t\t\t\t$send_manager_email=TRUE;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$quotes_data['sales_review']='not_done';\n\t\t\t\t\t$send_manager_email=FALSE;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\n\t\t\t//echo \"<pre>\";print_r($quotes_data);exit;\n\n\n\t\t\t//versioning when edited validated quote\n\t\t\tif($this->quote_creation->custom['action']=='edit' && $this->quote_creation->custom['create_new_version']=='yes')\n\t\t\t{\n\t\t\t\t//Insert this quote in to Quote version table\n\t\t\t\t$quoteIdentifier=$this->quote_creation->custom['quote_id'];\n\t\t\t\t\n\t\t\t\tif($quoteIdentifier)\n\t\t\t\t{\n\t\t\t\t\t$quote_obj->insertQuoteVersion($quoteIdentifier);\n\t\t\t\t\t\n\t\t\t\t\t//versioning Tech missions\n\t\t\t\t\t$techMissionObj=new Ep_Quote_TechMissions();\n\t\t\t\t\t$techParams['quote_id']=$quoteIdentifier;\n\t\t\t\t\t$techMissionsDetails=$techMissionObj->getTechMissionDetails($techParams);\n\t\t\t\t\tif($techMissionsDetails)\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach($techMissionsDetails as $techMission)\n\t\t\t\t\t\t{\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$techMissionId=$techMission['identifier'];\n\t\t\t\t\t\t\t$techMissionObj->insertMissionVersion($techMissionId);\n\n\t\t\t\t\t\t\t//update tech version\n\t\t\t\t\t\t\t$update_tech['version']=$version;\n\t\t\t\t\t\t\t$techMissionObj->updateTechMission($update_tech,$techMissionId);\n\t\t\t\t\t\t\t//if($quotes_data['tec_review']=='auto_skipped')\n\t\t\t\t\t\t\t\t//$techMissionObj->deleteTechMission($techMissionId);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\n\n\t\t\t\t\t//versioning SEO missions\n\t\t\t\t\t$seoParameters['quote_id']=$quoteIdentifier;\n\t\t\t\t\t$seoParameters['misson_user_type']='seo';\n\t\t\t\t\t$quoteMission_obj=new Ep_Quote_QuoteMissions();\n\t\t\t\t\t$seoMissionDetails=$quoteMission_obj->getMissionDetails($seoParameters);\n\t\t\t\t\tif($seoMissionDetails)\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach($seoMissionDetails as $seoMission)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$seoMissionId=$seoMission['identifier'];\n\t\t\t\t\t\t\t$quoteMission_obj->insertMissionVersion($seoMissionId);\t\n\n\t\t\t\t\t\t\t//update seo mission version\n\t\t\t\t\t\t\t$update_seo['version']=$version;\n\t\t\t\t\t\t\t$quoteMission_obj->updateQuoteMission($update_seo,$seoMissionId);\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t//versioning Prod Missions\n\t\t\t\t\t\t\t$prodObj=new Ep_Quote_ProdMissions();\n\t\t\t\t\t\t\t$prodParams['quote_mission_id']=$seoMissionId;\n\t\t\t\t\t\t\t$prodMissionDetails=$prodObj->getProdMissionDetails($prodParams);\n\t\t\t\t\t\t\tif($prodMissionDetails)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tforeach($prodMissionDetails as $prodMission)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$prodMissionId=$prodMission['identifier'];\n\t\t\t\t\t\t\t\t\t$prodObj->insertMissionVersion($prodMissionId);\n\n\t\t\t\t\t\t\t\t\t//update prod mission version\n\t\t\t\t\t\t\t\t\t$update_prod['version']=$version;\n\t\t\t\t\t\t\t\t\t$prodObj->updateProdMission($update_prod,$prodMissionId);\n\n\t\t\t\t\t\t\t\t\t//deleting prod mission from Prodmissions after insert into prod versioning\n\t\t\t\t\t\t\t\t\t//$prodObj->deleteProdMission($prodMissionId);\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//deleting seo mission from quote missions after insert into versioning\n\t\t\t\t\t\t\t//if($quotes_data['seo_review']=='auto_skipped')\n\t\t\t\t\t\t\t//\t$quoteMission_obj->deleteQuoteMission($seoMissionId);\n\n\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\n\t\t\t\t}\t\n\n\n\t\t\t\t$quotes_data['sales_review']='not_done';\t\t\t\t\n\t\t\t\t$quotes_data['sales_margin_percentage']=0;\t\t\t\t\n\t\t\t\t//$quotes_data['techmissions_assigned']='';\t\n\t\t\t\t$quotes_data['created_at']=date(\"Y-m-d H:i:s\");\t\n\t\t\t\t$quotes_data['updated_at']=NULL;\n\t\t\t\t\n\t\t\t\t$quotes_data['final_turnover']=0;\n\t\t\t\t$quotes_data['final_margin']=0;\n\t\t\t\t$quotes_data['final_mission_length']=0;\n\n\t\t\t\t$quotes_data['closed_comments']='';\n\t\t\t\t//$quotes_data['prod_timeline']=0;\n\t\t\t\t$quotes_data['signed_comments']=NULL;\n\t\t\t\t$quotes_data['signed_at']=NULL;\n\t\t\t\t$quotes_data['sign_expire_timeline']=NULL;\n\t\t\t\t$quotes_data['closed_reason']=NULL;\t\t\t\t\n\t\t\t\t$quotes_data['boot_customer']=NULL;\n\n\t\t\t}\n\t\t\n\t\t\t//echo \"<pre>\";;print_r($this->quote_creation->custom);print_r($quotes_data);exit;\n\t\t\t//echo \"<pre>\";print_r($this->quote_creation->create_mission['quote_missions']);print_r($quotes_data);exit;\n\n\t\t\ttry\n\t\t\t{ \t\n\t\t\t\tif($this->quote_creation->custom['quote_id'])\n\t\t\t\t{\t\n\t\t\t\t\tif(!$this->quote_creation->custom['create_new_version'])\n\t\t\t\t\t{\n\t\t\t\t\t\t$quotes_data['updated_at']=date(\"Y-m-d H:i:s\");\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$quoteIdentifier=$this->quote_creation->custom['quote_id'];\n\t\t\t\t\t\n\t\t\t\t\t$quote_obj->updateQuote($quotes_data,$quoteIdentifier);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\t\t\t\n\t\t\t\t\tif(!$this->quote_creation->custom['create_new_version'])\n\t\t\t\t\t\t$quotes_data['created_at']=date(\"Y-m-d H:i:s\");\n\t\t\t\t\t\n\t\t\t\t\t$quote_obj->insertQuote($quotes_data);\n\t\t\t\t\t$quoteIdentifier=$quote_obj->getIdentifier();\t\n\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\n\t\t\t\tif(count($_FILES['quote_documents']['name'])>0)\t\n\t\t\t\t{\n\t\t\t\t\t$update = false;\n\t\t\t\t\t$documents_path=array();\n\t\t\t\t\t$documents_name=array();\n\t\t\t\t\tforeach($_FILES['quote_documents']['name'] as $index=>$quote_files)\n\t\t\t\t\t{\n\t\t\t\t\t\tif($_FILES['quote_documents']['name'][$index]):\n\t\t\t\t\t\t//upload quote documents\n\t\t\t\t\t\n\t\t\t\t\t\t$quoteDir=$this->quote_documents_path.$quoteIdentifier.\"/\";\n\t\t if(!is_dir($quoteDir))\n\t\t mkdir($quoteDir,TRUE);\n\t\t chmod($quoteDir,0777);\n\t\t $document_name=frenchCharsToEnglish($_FILES['quote_documents']['name'][$index]);\n\t\t\t\t\t\t$pathinfo = pathinfo($document_name);\n\t\t\t\t\t\t$document_name =$pathinfo['filename'].rand(100,1000).\".\".$pathinfo['extension'];\n\t\t $document_name=str_replace(' ','_',$document_name);\n\t\t $document_path=$quoteDir.$document_name;\n\t\t if (move_uploaded_file($_FILES['quote_documents']['tmp_name'][$index], $document_path))\n\t\t chmod($document_path,0777);\n\t\n\t\t\t\t\t\t\t$update = true;\n\t\t $documents_path[]=$quoteIdentifier.\"/\".$document_name;\n\t\t $documents_name[]= str_replace('|',\"_\",$final_parameters['document_name'][$index]);\n\n\t\t\t\t\t\tendif;\n\n\t\t\t\t\t}\n\t\t\t\t\tif($update)\n\t\t\t\t\t{\n\t\t\t\t\t\t $quotes_update_data = array();\n\t\t\t\t\t\t $quoteDetails=$quote_obj->getQuoteDetails($quoteIdentifier);\n\t\t\t\t\t\t $uploaded_documents1 = explode(\"|\",$quoteDetails[0]['documents_path']);\n\t\t\t\t\t\t $documents_path =array_merge($documents_path,$uploaded_documents1);\n\t\t\t\t\t\t $quotes_update_data['documents_path']=implode(\"|\",$documents_path);\n\t\t\t\t\t\t $document_names =explode(\"|\",$quoteDetails[0]['documents_name']);\n\t\t\t\t\t\t $documents_name =array_merge($documents_name,$document_names);\n\t\t\t\t\t\t $quotes_update_data['documents_name']=implode(\"|\",$documents_name);\n\t\t\t\t\t\t $quote_obj->updateQuote($quotes_update_data,$quoteIdentifier);\n\t\t\t\t\t}\n\t\t\t\t\t//echo \"<pre>\";print_r($quotes_update_data);print_r($documents_name);exit;\n\t \n\t }\n \n\t\t\t\t//Quote missions insertion\n\t\t\t\tif(count($this->quote_creation->create_mission['quote_missions'])>0)\n\t\t\t\t{\n\t\t\t\t\t$sales_margin_percentage=0;\n\t\t\t\t\t$margin=0;\n\t\t\t\t\t//echo \"<pre>\";print_r($this->quote_creation->create_mission['quote_missions']);exit;\n\t\t\t\t\tforeach($this->quote_creation->create_mission['quote_missions'] as $qkey=>$quoteMission)\n\t\t\t\t\t{\n\n\t\t\t\t\t\t$quoteMission_obj=new Ep_Quote_QuoteMissions();\n\t\t\t\t\t\t\n\t\t\t\t\t\t$quoteMission_data['quote_id']=$quoteIdentifier;\n\t\t\t\t\t\t$quoteMission_data['product']=$quoteMission['product'];\n\t\t\t\t\t\t$quoteMission_data['product_type']=$quoteMission['producttype'];\n\t\t\t\t\t\tif($quoteMission['producttype']=='autre')\n\t\t\t\t\t\t\t$quoteMission_data['product_type_other']=$quoteMission['producttypeother'];\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$quoteMission_data['product_type_other']=NULL;\n\n\n\t\t\t\t\t\t$quoteMission_data['category']=$this->quote_creation->create_step1['category'];\n\t\t\t\t\t\tif($quoteMission['product']=='translation')\n\t\t\t\t\t\t\t$quoteMission_data['language_dest']=$quoteMission['languagedest'];\n\t\t\t\t\t\tif($quoteMission['product']!='auture')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$quoteMission_data['language_source']=$quoteMission['language'];\n\t\t\t\t\t\t\t$quoteMission_data['nb_words']=$quoteMission['nb_words'];\n\t\t\t\t\t\t\t$quoteMission_data['volume']=$quoteMission['volume'];\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\t$quoteMission_data['comments']=$quoteMission['comments'];\n\t\t\t\t\t\t$quoteMission_data['misson_user_type']='sales';\n\t\t\t\t\t\t$quoteMission_data['created_by']=$this->quote_creation->create_step1['quote_by'];\n\t\t\t\t\t\t\n\t\t\t\t\t\t/*added w.r.t tempo*/\n\t\t\t\t\t\t$quoteMission_data['mission_length']=$quoteMission['mission_length'];\n\t\t\t\t\t\t$quoteMission_data['mission_length_option']=$quoteMission['mission_length_option'];\t\t\t\t\t\t\n\t\t\t\t\t\t$quoteMission_data['volume_max']=$quoteMission['volume_max'];\n\t\t\t\t\t\t$quoteMission_data['delivery_volume_option']=$quoteMission['delivery_volume_option'];\n\t\t\t\t\t\t$quoteMission_data['tempo']=$quoteMission['tempo'];\n\t\t\t\t\t\t$quoteMission_data['tempo_length']=$quoteMission['tempo_length'];\n\t\t\t\t\t\t$quoteMission_data['tempo_length_option']=$quoteMission['tempo_length_option'];\n\t\t\t\t\t\t$quoteMission_data['oneshot']=$quoteMission['oneshot'];\n\t\t\t\t\t\t$quoteMission_data['demande_client']=$quoteMission['demande_client'];\n\t\t\t\t\t\t$quoteMission_data['duration_dont_know']=$quoteMission['duration_dont_know'];\n\t\t\t\t\t\t\n\t\t\t\t\t\t$suggested_missions=array();\n\n\t\t\t\t\t\tif(count($quoteMission['missionDetails'])>0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tforeach($quoteMission['missionDetails'] as $missions_archived)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//if(in_array($missions_archived['id'],$this->quote_creation->select_missions['missions_selected']))\n\t\t\t\t\t\t\t\tif($missions_archived['id']==$this->quote_creation->select_missions['missions_selected'][$qkey])\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\t$suggested_missions[]=$missions_archived['id'];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$quoteMission_data['sales_suggested_missions']=implode(\",\",$suggested_missions);\n\n\t\t\t\t\t\t$archmission_obj=new Ep_Quote_Mission();\n\t\t\t\t\t\t$archParameters['mission_id']=$quoteMission_data['sales_suggested_missions'];\n\t\t\t\t\t\t$suggested_mission_details=$archmission_obj->getMissionDetails($archParameters);\n\n\t\t\t\t\t\t//echo $quoteMission_data['sales_suggested_missions'].\"<pre>\";print_r($suggested_mission_details);exit;\n\t\t\t\t\t\tif($suggested_mission_details)\n\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t/* $quoteMission_data['mission_length']=$suggested_mission_details[0]['mission_length'];\n\t\t\t\t\t\t\t$quoteMission_data['mission_length_option']='days';\n\t\t\t\t\t\t\t$quoteMission_data['unit_price']=($suggested_mission_details[0]['selling_price']); */\n\t\t\t\t\t\t\t$quoteMission_data['unit_price']=$this->quote_creation->select_missions['single_article_price'][$qkey];\n\t\t\t\t\t\t\t$quoteMission_data['margin_percentage']=$suggested_mission_details[0]['margin_before_signature'];\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\tif($quotes_data['prod_review']=='auto_skipped' || $quotes_data['sales_suggested_price']<=5000) //added w.r.t low quote direct validation\n\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$nb_words=($quoteMission['nb_words']/$suggested_mission_details[0]['article_length']);\n\t\t\t\t\t\t\t\t$redactionCost=$nb_words*($suggested_mission_details[0]['writing_cost_before_signature']);\n\t\t\t\t\t\t\t\t$correctionCost=$nb_words*($suggested_mission_details[0]['correction_cost_before_signature']);\n\t\t\t\t\t\t\t\t$otherCost=$nb_words*($suggested_mission_details[0]['other_cost_before_signature']);\n\n\t\t\t\t\t\t\t\t$internalcost=($redactionCost+$correctionCost+$otherCost);\n\t\t\t\t\t\t\t\t$internalcost=number_format($internalcost,2,'.','');\n\n\t\t\t\t\t\t\t\t$quoteMission_data['internal_cost']=$internalcost;//$quoteMission_data['unit_price'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$quoteMission_data['version']=$version;\n\n\t\t\t\t\t\t//versioning quote missions\n\t\t\t\t\t\tif($this->quote_creation->custom['action']=='edit' && $this->quote_creation->custom['create_new_version']=='yes')\n\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t//Insert this mission in to QuoteMissionsversions table\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif($quoteMission['identifier'])\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$quoteMission_obj->insertMissionVersion($quoteMission['identifier']);\n\n\t\t\t\t\t\t\t\t//versioning Prod Missions\n\t\t\t\t\t\t\t\t$prodObj=new Ep_Quote_ProdMissions();\n\t\t\t\t\t\t\t\t$prodParams['quote_mission_id']=$quoteMission['identifier'];\n\t\t\t\t\t\t\t\t$prodMissionDetails=$prodObj->getProdMissionDetails($prodParams);\n\t\t\t\t\t\t\t\tif($prodMissionDetails)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tforeach($prodMissionDetails as $prodMission)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$prodMissionId=$prodMission['identifier'];\n\t\t\t\t\t\t\t\t\t\t$prodObj->insertMissionVersion($prodMissionId);\n\n\t\t\t\t\t\t\t\t\t\t//deleting prod mission from Prodmissions after insert into prod versioning\n\t\t\t\t\t\t\t\t\t\t//$prodObj->deleteProdMission($prodMissionId);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$quoteMission_data['cost']=0;\n\t\t\t\t\t\t\t$quoteMission_data['created_at']=date(\"Y-m-d H:i:s\");\t\n\t\t\t\t\t\t\t$quoteMission_data['updated_at']=NULL;\t\n\t\t\t\t\t\t\t//if($quotes_data['prod_review']!='auto_skipped')\n\t\t\t\t\t\t\t\t//$quoteMission_data['internal_cost']=0;\t\n\t\t\t\t\t\t\t$quoteMission_data['turnover']=0;\n\t\t\t\t\t\t\t$quoteMission_data['include_final']='yes';\t\t\t\n\n\t\t\t\t\t\t}\t\t\t\t\t\t\n\n\n\n\t\t\t\t\t\t//echo \"<pre>\";print_r($quoteMission_data);\n\t\t\t\t\t\tif($quoteMission['identifier'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(!$this->quote_creation->custom['create_new_version'])\n\t\t\t\t\t\t\t\t$quoteMission_data['updated_at']=date(\"Y-m-d H:i:s\");\n\t\t\t\t\t\t\t$quoteMission_obj->updateQuoteMission($quoteMission_data,$quoteMission['identifier']);\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\tif(!$this->quote_creation->custom['create_new_version'])\n\t\t\t\t\t\t\t\t$quoteMission_data['created_at']=date(\"Y-m-d H:i:s\");\n\t\t\t\t\t\t\t$quoteMission_obj->insertQuoteMission($quoteMission_data);\n\n\t\t\t\t\t\t\t//updating prod status if new mission added in edit mode\n\t\t\t\t\t\t\tif(!$this->quote_creation->custom['create_new_version'] && $this->quote_creation->custom['action']=='edit')\n\t\t\t\t\t\t\t\t$newmissionAdded=TRUE;\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\t\n\n\t\t\t\t\t\t//quote sales margin;\n\t\t\t\t\t\t$sales_margin_percentage+=$quoteMission_data['margin_percentage'];\n\t\t\t\t\t\t$margin++;\n\t\t\t\t\t}\n\t\t\t\t\t//updating sales margin in Quote table\n\t\t\t\t\t$avg_sales_margin_percentage=($sales_margin_percentage/$margin);\n\t\t\t\t\t$margin_data['sales_margin_percentage']=round($avg_sales_margin_percentage,2);\t\t\t\t\t\n\t\t\t\t\t//echo $quoteIdentifier;echo \"<pre>\";print_r($margin_data);exit;\n\t\t\t\t\t$quote_obj->updateQuote($margin_data,$quoteIdentifier);\n\n\t\t\t\t}\n\t\t\t\t\t//Insert Quote log\n\n\t\t\t\t\t$log_params['quote_id']\t= $quoteIdentifier;\n\t\t\t\t\t$log_params['bo_user']\t= $this->adminLogin->userId;\n\t\t\t\t\t$log_params['quote_size']=$quotes_data['sales_suggested_price'] < 5000 ? \"small\" :\"big\";\n\t\t\t\t\t$log_params['urgent']\t= $final_parameters['urgent']? 'urgent':'';\n\t\t\t\t\t$log_params['version']\t= $version;\t\t\t\t\t\n\t\t\t\t\t$log_params['created_date']\t= date(\"Y-m-d H:i:s\");\n\n\t\t\t\t\t$log_obj=new Ep_Quote_QuotesLog();\n\t\t\t\t\tif($edited || $sales_review_staus=='to_be_approve')\n\t\t\t\t\t{\n\t\t\t\t\t\t$log_params['action']\t= 'quote_updated';\n\t\t\t\t\t\t$actionId=9;\n\n\t\t\t\t\t\tif($final_parameters['quote_updated_comments'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$log_params['comments']=$final_parameters['quote_updated_comments'];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$log_params['action']\t= 'quote_created';\n\t\t\t\t\t\t$actionId=1;\t\n\n\t\t\t\t\t\tif($final_parameters['bo_comments'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$log_params['comments']=$final_parameters['bo_comments'];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$log_obj->insertLog($actionId,$log_params);\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t//echo \"<pre>\";print_r($log_params);exit;\n\n\t\t\t}\n\t\t\tcatch(Zend_Exception $e)\n {\n echo $e->getMessage();exit; \n\n }\n\n\n //sending intimation emails when quote edited\n $update_comments= $final_parameters['quote_updated_comments'];\n if($edited && $update_comments)\n\t\t\t{\n\t\t\t\t$bo_user_type='sales';\t\t\t\t\n\t\t\t\t$this->sendIntimationEmail($quoteIdentifier,$bo_user_type,$update_comments,$newmissionAdded);\n\t\t\t\t//exit;\n\t\t\t}\t\n\n\t\t\t //send email to impacted challengers when quote updated or new version created\n\t\t\t if($edited OR $this->quote_creation->custom['create_new_version'])\n\t\t\t {\t\t\t\t\n\t\t\t\tif($edited)\n\t\t\t\t{\n\t\t\t\t\t$iemail_id=172;\n\t\t\t\t\t$imail_parameters['followup_link']='/quote/quote-followup?quote_id='.$quoteIdentifier.\"&submenuId=ML13-SL2\";\n\t\t\t\t}\n\t\t\t\telse if($this->quote_creation->custom['create_new_version'])\n\t\t\t\t{\n\t\t\t\t\t$iemail_id=173;\n\t\t\t\t\t$imail_parameters['followup_link']='/quote/sales-quotes-list?submenuId=ML13-SL2';\n\t\t\t\t}\n\n\t\t\t\t$challengers=$this->getImpactedChallengers($quoteIdentifier,$final_parameters['quote_send_team']);\n\t\t\t\tif(count($challengers)>0)\n\t\t\t\t{\n\t\t\t\t\tforeach($challengers as $impactUser)\n\t\t\t\t\t{\n\t\t\t\t\t\tif($impactUser!=$this->adminLogin->userId)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$imail_obj=new Ep_Message_AutoEmails();\n\t\t\t\t\t\t\t$receiver_id=$impactUser;\n\t\t\t\t\t\t\t$imail_parameters['bo_user']=$impactUser;\n\t\t\t\t\t\t\t$imail_parameters['sales_user']=$this->adminLogin->userId;\n\t\t\t\t\t\t\t$imail_parameters['quote_title']=$quotes_data['title'];\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$imail_obj->sendQuotePersonalEmail($receiver_id,$iemail_id,$imail_parameters);\n\t\t\t\t\t\t}\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//echo $iemail_id.\"<pre>\";print_r($challengers);exit;\n\t\t\t\t//exit;\n\t\t\t}\t\n\n\t\t\t//When a quote has been closed and then reactivated, the reason why sales has closed the quote the first time should be communicated to the concerned BO users \n\t\t if($this->quote_creation->custom['action']=='edit' && $this->quote_creation->custom['create_new_version']=='yes' && $sales_review_staus=='closed')\n\t\t {\n\t\t \t\t\n\t\t \t$challengers=$this->getImpactedChallengers($quoteIdentifier,$final_parameters['quote_send_team']);\n\t\t\t\tif(count($challengers)>0)\n\t\t\t\t{\n\t\t\t\t\tforeach($challengers as $impactUser)\n\t\t\t\t\t{\n\t\t\t\t\t\tif($impactUser!=$this->adminLogin->userId)\n\t\t\t\t\t\t{\t\n\t\t\t\t \t\t$cmail_obj=new Ep_Message_AutoEmails();\n\t\t\t\t\t\t\t$receiver_id=$impactUser;\n\t\t\t\t\t\t\t$cmail_parameters['bo_user']=$impactUser;\n\t\t\t\t\t\t\t$cmail_parameters['sales_user']=$this->adminLogin->userId;\n\t\t\t\t\t\t\t$cmail_parameters['quote_title']=$quotes_data['title'];\t\n\t\t\t\t\t\t\t$cmail_parameters['client_name']=$this->quote_creation->create_mission['company_name'];\n\t\t\t\t\t\t\t$cmail_parameters['closed_reason']=$this->closedreason[$quoteEditDetails[0]['closed_reason']];\n\t\t\t\t\t\t\t$cmail_parameters['closed_comments']=$quoteEditDetails[0]['closed_comments'];\n\t\t\t\t\t\t\t$cmail_parameters['validate_link']='/quote/quote-followup?quote_id='.$quoteIdentifier.'&submenuId=ML13-SL2';\n\t\t\t\t\t\t\t$cmail_obj->sendQuotePersonalEmail($receiver_id,180,$cmail_parameters);\n\t\t\t\t\t\t}\t\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t \t\n\t\t }\n\t\t //exit;\n\n\n\t\t\t//sending email to seo &tech OR Prod to challenge after creating the quote\n\t\t\tif(!$edited && !$onlySales && !$send_manager_email)\n\t\t\t{\n\t\t\t\t$client_obj=new Ep_Quote_Client();\n\t\t\t\t\n\t\t\t\tif($onlyProd)\n\t\t\t\t\t$email_users=$client_obj->getEPContacts('\"prodsubmanager\"');\n\t\t\t\telse if($final_parameters['quote_send_team']=='send_tech_seo_team')\n\t\t\t\t\t$email_users=$client_obj->getEPContacts('\"techuser\",\"techmanager\",\"seouser\",\"seomanager\"');\n\t\t\t\telse if($final_parameters['quote_send_team']=='send_tech_prod_team' || $final_parameters['quote_send_team']=='send_tech_team')\n\t\t\t\t\t$email_users=$client_obj->getEPContacts('\"techuser\",\"techmanager\"');\n\t\t\t\telse if($final_parameters['quote_send_team']=='send_seo_prod_team' || $final_parameters['quote_send_team']=='send_seo_team')\t\n\t\t\t\t\t$email_users=$client_obj->getEPContacts('\"seouser\",\"seomanager\"');\t\t\t\t\t\n\t\t\t\telse\n\t\t\t\t\t$email_users=$client_obj->getEPContacts('\"seouser\",\"seomanager\",\"techuser\",\"techmanager\"');\n\n\t\t\t\tif(count($email_users)>0)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tforeach($email_users as $user=>$name)\n\t\t\t\t\t{\n\t\t\t\t\t\t$mail_obj=new Ep_Message_AutoEmails();\n\t\t\t\t\t\t$receiver_id=$user;\n\t\t\t\t\t\t$mail_parameters['bo_user']=$user;\n\t\t\t\t\t\t$mail_parameters['sales_user']=$this->adminLogin->userId;\n\t\t\t\t\t\t$mail_parameters['quote_title']=$quotes_data['title'];\n\t\t\t\t\t\t$mail_parameters['sales_suggested_price']=$quotes_data['sales_suggested_price'].\" \".$quotes_data['sales_suggested_currency'].\"s\";\n\t\t\t\t\t\t$mail_parameters['challenge_link']='/quote/sales-quotes-list?submenuId=ML13-SL2';\n\n\t\t\t\t\t\t$mail_obj->sendQuotePersonalEmail($receiver_id,142,$mail_parameters); \t\n\t\t \t}\n\t\t }\t\n\t\t\t\t\n\t\t\t}\n\t\t\telse if($send_manager_email)//send email to sales manager to approve the quote \n\t\t\t{\n\t\t\t\t$client_obj=new Ep_Quote_Client();\n\t\t\t\t$email_users=$get_head_prods=$client_obj->getEPContacts('\"salesmanager\"');\n\n\t\t\t\tif(count($email_users)>0)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tforeach($email_users as $user=>$name)\n\t\t\t\t\t{\n\t\t\t\t\t\t$mail_obj=new Ep_Message_AutoEmails();\n\t\t\t\t\t\t$receiver_id=$user;\n\t\t\t\t\t\t$mail_parameters['bo_user']=$user;\n\t\t\t\t\t\t$mail_parameters['sales_user']=$this->adminLogin->userId;\t\t\t\t\t\t\n\t\t\t\t\t\t$mail_parameters['challenge_link']='/quote/sales-quotes-list?submenuId=ML13-SL2';\n\n\t\t\t\t\t\t$mail_obj->sendQuotePersonalEmail($receiver_id,151,$mail_parameters); \t\n\t\t \t}\n\t\t }\n\t\t if(!$edited)\n\t\t {\n\t\t\t\t//if mission product value autre email send to sales manager need to add thaibault\n\t\t $email_usershead=array('139281941421499'=>'[email protected]');\n\t\t //array('141690656032222'=>'[email protected]');\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$quoteEditDetails=$quote_obj->getQuoteDetails($quoteIdentifier);\n\t\t\t\t\t\n\t\t\t\t\t\t\t\tforeach($email_usershead as $userhead=>$emailshead){\n\t\t\t\t\t\t\t\t\t$receiverhead_id=$userhead;\n\t\t\t\t\t\t\t\t\t$mailhead_parameters['sales_user']=$quoteEditDetails[0]['quote_by'];\n\t\t\t\t\t\t\t\t\t$mailhead_parameters['bo_user']=$receiverhead_id;\n\t\t\t\t\t\t\t\t\t$mailhead_parameters['quote_title']=$quotes_data['title'];\n\t\t\t\t\t\t\t\t\t$mailhead_parameters['followup_link']='/quote/quote-followup?quote_id='.$quoteIdentifier.\"&submenuId=ML13-SL2\";\n\t\t\t\t\t\t\t\t\t$mail_obj=new Ep_Message_AutoEmails();\n\t\t\t\t\t\t\t\t\t$mail_obj->sendQuotePersonalEmail($receiverhead_id,198,$mailhead_parameters);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//intimation email to seb,alessia and yannick\n\t\t\tif(!$edited)\n\t\t\t{\n\t\t $client_obj=new Ep_Quote_Client();\n\t\t //$intimate_users=$client_obj->getEPContacts('\"facturation\"');\n\t\t //$intimate_users[$this->adminLogin->userId]=$this->adminLogin->userId;\n\t\t $intimate_users=array('138960180336581'=>'[email protected]',\n\t\t \t\t\t\t\t '139282188375889'=>'[email protected]',\n\t\t \t\t\t\t\t '141745044124851'=>'[email protected]'\n\t\t \t\t\t\t\t );//[email protected], [email protected] and [email protected]\n\t\t if(count($intimate_users)>0)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tforeach($intimate_users as $user=>$name)\n\t\t\t\t\t{\n\t\t\t\t\t\t$mail_obj=new Ep_Message_AutoEmails();\n\t\t\t\t\t\t$receiver_id=$user;\n\t\t\t\t\t\t$mail_parameters['bo_user']=$user;\n\t\t\t\t\t\t$mail_parameters['sales_user']=$this->adminLogin->userId;\n\t\t\t\t\t\t//$mail_parameters['quote_title']=$quotes_data['title'];\n\t\t\t\t\t\t//$mail_parameters['sales_suggested_price']=$quotes_data['sales_suggested_price'].\" \".$quotes_data['sales_suggested_currency'].\"s\";\n\t\t\t\t\t\t//$mail_parameters['followup_link_en']='/quote/sales-quotes-list?submenuId=ML13-SL2';\n\t\t\t\t\t\t$mail_parameters['validate_link']='/quote/quote-followup?quote_id='.$quoteIdentifier.'&submenuId=ML13-SL2';\n\n\t\t\t\t\t\t$mail_parameters['client_name']=$this->quote_creation->create_mission['company_name'];\n\t\t\t\t\t\t$mail_obj->sendQuotePersonalEmail($receiver_id,174,$mail_parameters); \t\n\t\t \t}\n\t\t } \n\t\t $newquote_head=array('139281941421499'=>'[email protected]','110823103540627'=>'[email protected]','139281996916804'=>'[email protected]');\n\t\t \n\t\t \n\t\t\t\t\n\t\t\t\t\t//new quote created send Email to head sales need to add Thaibault\n\t\t\t\t\t\n\t\t\t\t\t$quoteEditDetails=$quote_obj->getQuoteDetails($quoteIdentifier);\n\t\t\t\t\t\n\t\t\t\t\t\t\t\tforeach($newquote_head as $userhead=>$emailshead){\n\t\t\t\t\t\t\t\t\t$receiverhead_id=$userhead;\n\t\t\t\t\t\t\t\t\t$mailhead_parameters['sales_user']=$quoteEditDetails[0]['quote_by'];\n\t\t\t\t\t\t\t\t\t$mailhead_parameters['bo_user']=$receiverhead_id;\n\t\t\t\t\t\t\t\t\t$mailhead_parameters['turn_over']=$quoteEditDetails[0]['turnover'];\n\t\t\t\t\t\t\t\t\t$mailhead_parameters['currency']=$this->quote_creation->create_step1['currency'];\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$mailhead_parameters['challenge_link']='/quote/sales-quotes-list?submenuId=ML13-SL2';\n\t\t\t\t\t\t\t\t\t$mailhead_parameters['client_name']=$this->quote_creation->create_mission['company_name'];\n\t\t\t\t\t\t\t\t\t$mail_obj=new Ep_Message_AutoEmails();\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$mail_obj->sendQuotePersonalEmail($receiverhead_id,203,$mailhead_parameters);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t \n\t\t }\n\n\t\t //if new version created email send to sales manager\n\t\t $quoteEditDetails=$quote_obj->getQuoteDetails($quoteIdentifier);\n\t\t \n\t\t if($quoteEditDetails[0]['version']>1){\n\t\t \n\t\t\t\t$email_head_sale=array('139281941421499'=>'[email protected]'); // need to add thaibault\n\t\t\t\t\tif(count($email_head_sale)>0 ){\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\tforeach($email_head_sale as $user=>$emails){\n\t\t\t\t\t\t\t\t\t$receiver_id=$user;\n\t\t\t\t\t\t\t\t\t$headmail_obj=new Ep_Message_AutoEmails();\n\t\t\t\t\t\t\t\t\t$headmail_parameters['bo_user']=$user;\n\t\t\t\t\t\t\t\t\t$headmail_parameters['sales_user']=$quoteEditDetails[0]['quote_by'];\n\t\t\t\t\t\t\t\t\t$headmail_parameters['turn_over']=$quoteEditDetails[0]['turnover'];\n\t\t\t\t\t\t\t\t\t$headmail_parameters['client_name']=$quoteEditDetails[0]['company_name'];\n\t\t\t\t\t\t\t\t\t$headmail_parameters['quote_version']=$quoteEditDetails[0]['version'];\t\n\t\t\t\t\t\t\t\t\t$headmail_parameters['followup_link']='/quote/quote-followup?quote_id='.$quoteEditDetails[0]['identifier'];\t\n\t\t\t\t\t\t\t\t\t$headmail_obj->sendQuotePersonalEmail($receiver_id,204,$headmail_parameters);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n unset($this->quote_creation->create_step1);\n unset($this->quote_creation->create_mission);\n unset($this->quote_creation->select_missions);\n unset($this->quote_creation->custom);\n\t\t\tunset($this->quote_creation->send_quote);\n\t\t\tif($edited)\n\t\t\t{\n \t$this->_helper->FlashMessenger('Devis updat&eacute; avec succ&egrave;s');\n\t\t\t}\n else\n {\n \tif(!$send_manager_email)\n \t\t$this->_helper->FlashMessenger('Devis cr&eacute;e avec succ&egrave;s');\n \t\n \tif($final_parameters['quote_send_team']=='send_tech_prod_team' || $final_parameters['quote_send_team']=='send_tech_team') \t\t\n \t\t$this->_helper->FlashMessenger('Onlytech');\n \telse if($final_parameters['quote_send_team']=='send_seo_prod_team' || $final_parameters['quote_send_team']=='send_seo_team')\t\n \t\t$this->_helper->FlashMessenger('Onlyseo');\n \telse if($onlySales)\n \t\t$this->_helper->FlashMessenger('Onlysales');\n \telse if($onlyProd)\n \t\t$this->_helper->FlashMessenger('Onlyprod');\n }\n\n $this->_redirect(\"/quote/sales-quotes-list?submenuId=ML13-SL2\");\t\n\n\t\t\t//echo \"<pre>\";print_r($quotes_data);//print_r($this->quote_creation->select_missions);print_r($this->quote_creation->create_mission['quote_missions']);\n\n\t\t}\t\n\t}", "public function markCaseAsAccepted(Order $order, $comment): Order\n {\n $reviewAcceptStatus = $this->configHelper->getFraudStatus(\n Config::XML_STATUS_FRAUD_MANUAL_REVIEW_ACCEPT,\n $order->getStoreId()\n );\n\n // Empty used to cater for empty string and null cases\n if (!empty($reviewAcceptStatus)) {\n $order->addStatusHistoryComment(__($comment), $reviewAcceptStatus);\n $this->adyenLogger->addAdyenNotification(sprintf(\n 'Created comment history for this notification linked to order %s with status update to: %s',\n $order->getIncrementId(),\n $reviewAcceptStatus\n ), [\n 'pspReference' => $order->getPayment()->getData('adyen_psp_reference'),\n 'merchantReference' => $order->getPayment()->getData('entity_id')\n ]);\n } else {\n $order->addStatusHistoryComment(__($comment));\n $this->adyenLogger->addAdyenNotification(sprintf(\n 'Created comment history for this notification linked to order %s without any status update',\n $order->getIncrementId()\n ),\n array_merge(\n $this->adyenLogger->getOrderContext($order),\n ['pspReference' => $order->getPayment()->getData('adyen_psp_reference')]\n )\n );\n }\n\n return $order;\n }", "function setOrder($order){\n\t\t$this->order=$order;\n\t}", "function getConvertQuoteToSoObject($focus, $quote_focus, $quoteid) {\n\tglobal $log,$current_user;\n\t$log->debug('> getConvertQuoteToSoObject '.get_class($focus).','.get_class($quote_focus).','.$quoteid);\n\t$fields = array(\n\t\t'bill_street','bill_city','bill_code','bill_pobox','bill_country','bill_state',\n\t\t'ship_street','ship_city','ship_code','ship_pobox','ship_country','ship_state'\n\t);\n\tforeach ($fields as $fieldname) {\n\t\tif (getFieldVisibilityPermission('Quotes', $current_user->id, $fieldname) != '0') {\n\t\t\t$quote_focus->column_fields[$fieldname] = '';\n\t\t}\n\t}\n\t$focus->column_fields['quote_id'] = $quoteid;\n\t$focus->column_fields['subject'] = isset($quote_focus->column_fields['subject']) ? $quote_focus->column_fields['subject'] : '';\n\t$focus->column_fields['contact_id'] = isset($quote_focus->column_fields['contact_id']) ? $quote_focus->column_fields['contact_id'] : '';\n\t$focus->column_fields['potential_id'] = isset($quote_focus->column_fields['potential_id']) ? $quote_focus->column_fields['potential_id'] : '';\n\t$focus->column_fields['account_id'] = isset($quote_focus->column_fields['account_id']) ? $quote_focus->column_fields['account_id'] : '';\n\t$focus->column_fields['carrier'] = isset($quote_focus->column_fields['carrier']) ? $quote_focus->column_fields['carrier'] : '';\n\t$focus->column_fields['bill_street'] = isset($quote_focus->column_fields['bill_street']) ? $quote_focus->column_fields['bill_street'] : '';\n\t$focus->column_fields['ship_street'] = isset($quote_focus->column_fields['ship_street']) ? $quote_focus->column_fields['ship_street'] : '';\n\t$focus->column_fields['bill_city'] = isset($quote_focus->column_fields['bill_city']) ? $quote_focus->column_fields['bill_city'] : '';\n\t$focus->column_fields['ship_city'] = isset($quote_focus->column_fields['ship_city']) ? $quote_focus->column_fields['ship_city'] : '';\n\t$focus->column_fields['bill_state'] = isset($quote_focus->column_fields['bill_state']) ? $quote_focus->column_fields['bill_state'] : '';\n\t$focus->column_fields['ship_state'] = isset($quote_focus->column_fields['ship_state']) ? $quote_focus->column_fields['ship_state'] : '';\n\t$focus->column_fields['bill_code'] = isset($quote_focus->column_fields['bill_code']) ? $quote_focus->column_fields['bill_code'] : '';\n\t$focus->column_fields['ship_code'] = isset($quote_focus->column_fields['ship_code']) ? $quote_focus->column_fields['ship_code'] : '';\n\t$focus->column_fields['bill_country'] = isset($quote_focus->column_fields['bill_country']) ? $quote_focus->column_fields['bill_country'] : '';\n\t$focus->column_fields['ship_country'] = isset($quote_focus->column_fields['ship_country']) ? $quote_focus->column_fields['ship_country'] : '';\n\t$focus->column_fields['bill_pobox'] = isset($quote_focus->column_fields['bill_pobox']) ? $quote_focus->column_fields['bill_pobox'] : '';\n\t$focus->column_fields['ship_pobox'] = isset($quote_focus->column_fields['ship_pobox']) ? $quote_focus->column_fields['ship_pobox'] : '';\n\t$focus->column_fields['description'] = isset($quote_focus->column_fields['description']) ? $quote_focus->column_fields['description'] : '';\n\t$focus->column_fields['terms_conditions'] = isset($quote_focus->column_fields['terms_conditions']) ? $quote_focus->column_fields['terms_conditions'] : '';\n\t$focus->column_fields['currency_id'] = isset($quote_focus->column_fields['currency_id']) ? $quote_focus->column_fields['currency_id'] : '';\n\t$focus->column_fields['conversion_rate'] = isset($quote_focus->column_fields['conversion_rate']) ? $quote_focus->column_fields['conversion_rate'] : '';\n\tif (vtlib_isModuleActive('Warehouse')) {\n\t\t$focus->column_fields['whid'] = $quote_focus->column_fields['whid'];\n\t}\n\t$cbMapid = GlobalVariable::getVariable('BusinessMapping_Quotes2SalesOrder', cbMap::getMapIdByName('Quotes2SalesOrder'));\n\tif ($cbMapid) {\n\t\t$cbMap = cbMap::getMapByID($cbMapid);\n\t\t$focus->column_fields = $cbMap->Mapping($quote_focus->column_fields, $focus->column_fields);\n\t}\n\t$log->debug('< getConvertQuoteToSoObject');\n\treturn $focus;\n}", "public function createMagentoOrder(\\stdClass $reverbOrderObject)\n {\n if (!$this->_ordersSyncHelper->isOrderSyncEnabled())\n {\n $exception_message = $this->_ordersSyncHelper->getOrderSyncIsDisabledMessage();\n throw new \\Reverb\\ReverbSync\\Model\\Exception\\Deactivated\\Order\\Sync($exception_message);\n }\n \n $store = $this->_storeManager->getStore();\n $websiteId = $this->_storeManager->getStore()->getWebsiteId();\n\n $cart_id = $this->_cartManagementInterface->createEmptyCart();\n $cart = $this->_cartRepositoryInterface->get($cart_id);\n $cart->setStore($store);\n\n $reverb_order_number = $reverbOrderObject->order_number;\n \n\n if ($this->_ordersSyncHelper->isOrderSyncSuperModeEnabled())\n {\n // Process this quote as though we were an admin in the admin panel\n $cart->setIsSuperMode(true);\n }\n\n $productToAddToQuote = $this->_getProductToAddToQuote($reverbOrderObject);\n $qty = $reverbOrderObject->quantity;\n if (empty($qty))\n {\n $qty = 1;\n }\n $qty = intval($qty);\n $cart->addProduct($productToAddToQuote, $qty);\n\n\n try{\n \n $customerid = $this->_customerHelper->addCustomerToQuote($reverbOrderObject, $cart);\n\n $customer= $this->_customerRepository->getById($customerid);\n $cart->setCurrency();\n $cart->assignCustomer($customer); \n\n $this->_getAddressHelper()->addOrderAddressAsShippingAndBillingToQuote($reverbOrderObject, $cart);\n \n $this->_getShippingHelper()->setShippingMethodAndRateOnQuote($reverbOrderObject, $cart);\n \n $this->_getPaymentHelper()->setPaymentMethodOnQuote($reverbOrderObject, $cart);\n \n $cart->setInventoryProcessed(false);\n $cart->collectTotals();\n $cart->setReverbOrderId($reverb_order_number);\n $cart->save();\n\n $this->_addReverbItemLinkToQuoteItem($cart, $reverbOrderObject);\n $this->_addTaxAndCurrencyToQuoteItem($cart, $reverbOrderObject);\n \n $cartnew = $this->_cartRepositoryInterface->get($cart->getId());\n $cartnew->setReverbOrderId($reverb_order_number);\n $order_id = $this->_cartManagementInterface->placeOrder($cartnew->getId());\n\n $order = $this->_orderModel->load($order_id);\n\n }catch(\\Exception $e){\n echo 'customererror = ';\n echo $e->getMessage();\n exit;\n $error_message = 'Reverb Order Create Error = '.$e->getMessage();\n $this->_logOrderSyncError($error_message);\n }\n\n try\n {\n // Update store name as adapter query for performance consideration purposes\n $this->_syncResourceOrder->setReverbStoreNameByReverbOrderId($order->getId(),$reverb_order_number, self::REVERB_ORDER_STORE_NAME);\n }\n catch(\\Exception $e)\n {\n // Log the exception but don't stop execution\n $error_message = __(self::EXCEPTION_UPDATE_STORE_NAME, self::REVERB_ORDER_STORE_NAME, $reverb_order_number, $e->getMessage());\n $this->_logOrderSyncError($error_message);\n }\n\n try\n {\n // Dispatch an event for clients to hook in to regarding order creation\n $this->_eventManager->dispatch('reverb_order_created',\n array('magento_order_object' => $order, 'reverb_order_object' => $reverbOrderObject)\n );\n }\n catch(\\Exception $e)\n {\n // Log the exception but don't stop execution\n $error_message = __(self::EXCEPTION_REVERB_ORDER_CREATION_EVENT_OBSERVER, $reverb_order_number,\n $e->getMessage());\n $this->_logOrderSyncError($error_message);\n }\n\n $this->_registry->unregister(\\Reverb\\ReverbSync\\Helper\\Orders\\Creation\\Helper::ORDER_BEING_SYNCED_REGISTRY_KEY);\n\n return $order;\n }", "public function onBeforeSaveOrder(\\CEvent $event)\n {\n $params = $event->params;\n if (empty($params['order']) || !($params['order'] instanceof Commerce_OrderModel)) {\n throw new Exception('onBeforeSaveOrder event requires \"order\" param with OrderModel instance');\n }\n $this->raiseEvent('onBeforeSaveOrder', $event);\n }", "public function prepareOrderForDataSync($observer)\n {\n if (Mage::getStoreConfig('emailchef_newsletter/emailchef/enable_log')) {\n Mage::log('TRIGGERED prepareOrderForDataSync');\n }\n\n $order = $observer->getEvent()->getOrder();\n /* @var $order Mage_Sales_Model_Order */\n $customerId = $order->getCustomerId();\n //$customer = Mage::getmodel('customer/customer')->load($customerId);\n /* @var $customer Mage_Customer_Model_Customer */\n if ($this->_hasCustomerDataSynced) {\n return; // Don't bother if nothing has updated.\n }\n\n //$storeId = $customer->getStoreId(); // Is this always correct??\n $storeId = $order->getStoreId();\n\n if ($customerId) {\n self::setCustomerForDataSync($customerId, $storeId);\n $this->_hasCustomerDataSynced = true;\n }\n }", "private function addQuoteExtensionAttributesToOrder($order)\n {\n $quoteId = $order->getQuoteId();\n\n /** @var \\Magento\\Quote\\Model\\Quote $mageQuote */\n $mageQuote = $this->mageQuoteFactory->create()->load($quoteId);\n if (!$mageQuote->getId() || !$mageQuote->getLinkedQuotationId()) {\n //no mage quote data available or no quotation quote linked\n return $order;\n }\n\n $quotationId = $mageQuote->getLinkedQuotationId();\n\n /** @var Quote $quotation */\n $quotation = $this->quoteFactory->create()->load($quotationId);\n if (!$quotation->getId()) {\n //no quote data available\n return $order;\n }\n\n $extensionAttributes = $order->getExtensionAttributes();\n if ($extensionAttributes === null) {\n $extensionAttributes = $this->orderExtensionFactory->create();\n }\n\n //modify extension attributes, add the quote increment id\n $extensionAttributes->setQuoteationIncrementId($quotation->getIncrementId());\n\n //add a backend url\n $backendUrl = $this->backendUrl->getUrl(\n 'quotation/quote/view',\n ['quote_id' => $quotation->getId()]\n );\n $extensionAttributes->setQuoteationBackendUrl($backendUrl);\n\n //set extension attributes\n $order->setExtensionAttributes($extensionAttributes);\n\n return $order;\n }", "public function _setCustomerQuote()\n {\n // Retrieve a valid quote\n if ($quote = $this->_retrieveQuote()) {\n\n // Verify that the customer is a valid customer of the quote\n $this->_verifyCustomerForQuote($quote);\n /* Set the session quote if required.\n Needs to be done after verifying the current customer */\n if ($this->_getCheckoutSession()->getQuoteId() != $quote->getId()) {\n $this->_logger->debug(__(\"Setting quote to current session\"));\n // Set the quote in the current object\n $this->_setQuote($quote);\n // Set the quote in the session\n $this->_getCheckoutSession()->setQuoteId($quote->getId());\n }\n // Make sure the qoute is active\n $this->_activateQuote($quote);\n } else {\n throw new \\Magento\\Framework\\Exception\\LocalizedException(__(\"Could not retrieve the quote\"));\n }\n }", "public function setOrderData($orderData): Order\n {\n $this->id = $orderData->getIncrementId();\n $this->email = $orderData->getCustomerEmail();\n $this->quoteId = $orderData->getQuoteId();\n $this->storeName = $orderData->getStore()->getName();\n $this->purchaseDate = $orderData->getCreatedAt();\n $this->deliveryMethod = $orderData->getShippingDescription();\n $this->deliveryTotal = (float) number_format(\n (float) $orderData->getShippingAmount(),\n 2,\n '.',\n ''\n );\n $this->currency = $orderData->getOrderCurrencyCode();\n\n /** @var OrderPaymentInterface|InfoInterface $payment */\n $payment = $orderData->getPayment();\n if ($payment) {\n if ($payment->getMethod()) {\n $methodInstance = $payment->getMethodInstance();\n if ($methodInstance) {\n $this->payment = $methodInstance->getTitle();\n }\n }\n }\n\n $this->couponCode = (string) $orderData->getCouponCode();\n\n /*\n * custom order attributes\n */\n $customAttributes = $this->getConfigSelectedCustomOrderAttributes(\n $orderData->getStore()->getWebsite()->getId()\n );\n\n if ($customAttributes) {\n $fields = $this->helper->getOrderTableDescription();\n $this->custom = [];\n foreach ($customAttributes as $customAttribute) {\n if (isset($fields[$customAttribute])) {\n $field = $fields[$customAttribute];\n $value = $this->_getCustomAttributeValue(\n $field,\n $orderData\n );\n if ($value) {\n $this->_assignCustom($field, $value);\n }\n }\n }\n }\n\n /*\n * Billing address.\n */\n $this->processBillingAddress($orderData);\n\n /*\n * Shipping address.\n */\n $this->processShippingAddress($orderData);\n\n $websiteId = $orderData->getStore()->getWebsiteId();\n\n $includeCustomOptions = $this->helper->getWebsiteConfig(\n Config::XML_PATH_CONNECTOR_SYNC_ORDER_PRODUCT_CUSTOM_OPTIONS,\n $websiteId\n );\n\n $orderItemProcessor = $this->orderItemProcessorFactory\n ->create(['data' => [\n 'websiteId' => $websiteId,\n 'includeCustomOptions' => $includeCustomOptions\n ]]);\n\n /*\n * Order items.\n */\n try {\n foreach ($orderData->getAllItems() as $productItem) {\n $productData = $orderItemProcessor->process($productItem);\n $this->mergeProductData($productData);\n }\n } catch (\\InvalidArgumentException $e) {\n $this->logger->debug(\n 'Error processing items for order ID: ' . $orderData->getId(),\n [(string) $e]\n );\n $this->products = [];\n }\n\n $this->orderSubtotal = (float) number_format(\n (float) $orderData->getData('subtotal'),\n 2,\n '.',\n ''\n );\n $this->discountAmount = (float) number_format(\n (float) $orderData->getData('discount_amount'),\n 2,\n '.',\n ''\n );\n $orderTotal = abs(\n $orderData->getData('grand_total') - $orderData->getTotalRefunded()\n );\n $this->orderTotal = (float) number_format($orderTotal, 2, '.', '');\n $this->orderStatus = $orderData->getStatus();\n\n if (!$this->schemaValidator->isValid($this->toArray())) {\n throw new SchemaValidationException(\n $this->schemaValidator,\n __(\"Validation error\")\n );\n }\n\n return $this;\n }", "public function saveOrder()\n {\n $this->validate();\n $this->_initKlarnaCheckout(false, false);\n\n try {\n if (($merchantCheckboxMethod = $this->_helper->getCheckoutConfig('merchant_checkbox')) != -1) {\n $this->_helper->dispatchMerchantCheckboxMethod(\n $merchantCheckboxMethod, array(\n 'quote' => $this->getQuote(),\n 'klarna_quote' => $this->getKlarnaQuote(),\n 'checked' => (bool)$this->getKlarnaCheckout()->getData('merchant_requested/additional_checkbox')\n )\n );\n }\n\n $checkboxes = $this->getKlarnaCheckout()->getData('merchant_requested/additional_checkboxes');\n if (!empty($checkboxes)) {\n $this->_helper->dispatchMultipleCheckboxesEvent(\n $this->getKlarnaCheckout()->getData('merchant_requested/additional_checkboxes'),\n $this->getQuote(),\n $this->getKlarnaQuote()\n );\n }\n } catch (Mage_Core_Exception $e) {\n Mage::logException($e);\n // Don't stop order from saving just because the checkbox processing failed\n }\n\n $isNewCustomer = false;\n switch ($this->getCheckoutMethod()) {\n case self::METHOD_GUEST:\n $this->_prepareGuestQuote();\n break;\n case self::METHOD_REGISTER:\n $this->_prepareNewCustomerQuote();\n $isNewCustomer = true;\n break;\n default:\n $this->_prepareCustomerQuote();\n break;\n }\n\n Mage::dispatchEvent(\n 'kco_checkout_save_order_before', array(\n 'checkout' => $this\n )\n );\n\n /**\n * For older versions of Magento state cannot be removed as a requirement\n * for shipping which is necessary in some countries.\n *\n * This checks if the Magento version is below 1.7 and disabled address validation\n */\n if (version_compare(Mage::getVersion(), '1.7.0', '<')) {\n $this->getQuote()->getBillingAddress()->setShouldIgnoreValidation(true);\n if (!$this->getQuote()->isVirtual()) {\n $this->getQuote()->getShippingAddress()->setShouldIgnoreValidation(true);\n }\n }\n\n $service = Mage::getModel('sales/service_quote', $this->getQuote());\n $service->submitAll();\n\n if ($isNewCustomer) {\n try {\n $this->_involveNewCustomer();\n } catch (Exception $e) {\n Mage::logException($e);\n }\n }\n\n $this->_checkoutSession->setLastQuoteId($this->getQuote()->getId())\n ->setLastSuccessQuoteId($this->getQuote()->getId())\n ->clearHelperData();\n\n /** @var Mage_Sales_Model_Order $order */\n $order = $service->getOrder();\n if ($order) {\n Mage::dispatchEvent(\n 'checkout_type_kco_save_order_after', array(\n 'order' => $order,\n 'quote' => $this->getQuote()\n )\n );\n\n if ($order->getCanSendNewEmailFlag()) {\n try {\n $order->sendNewOrderEmail();\n } catch (Exception $e) {\n Mage::logException($e);\n }\n }\n\n // add order information to the session\n $this->_checkoutSession\n ->setLastOrderId($order->getId())\n ->setLastRealOrderId($order->getIncrementId());\n\n // as well a billing agreement can be created\n $agreement = $order->getPayment()->getBillingAgreement();\n if ($agreement) {\n $this->_checkoutSession->setLastBillingAgreementId($agreement->getId());\n }\n }\n\n Mage::dispatchEvent(\n 'checkout_submit_all_after',\n array('order' => $order, 'quote' => $this->getQuote(), 'recurring_profiles' => array())\n );\n\n return $order;\n }", "public function expandQuote(\n RestSplittableCheckoutRequestTransfer $restSplittableCheckoutRequestTransfer,\n QuoteTransfer $quoteTransfer\n ): QuoteTransfer;", "public function setEntity(MageQuote $quote)\n {\n $id = $this->sgBase->getExternalCustomerId();\n $email = $this->sgBase->getMail();\n\n try {\n $customer = $id ? $this->customerHelper->getById($id) : $this->customerHelper->getByEmail($email);\n } catch (NoSuchEntityException $e) {\n $customer = new DataObject();\n $this->log->debug('Could not load customer by id or mail.');\n }\n $quote->setCustomerEmail($email)\n ->setRemoteIp($this->sgBase->getCustomerIp());\n if ($this->sgBase->isGuest()) {\n $quote->setCustomerIsGuest(true)->setCustomerGroupId(Group::NOT_LOGGED_IN_ID);\n } elseif ($customer->getId()) {\n $this->session->setCustomerId($customer->getId())->setCustomerGroupId($customer->getGroupId());\n $quote->setCustomer($customer)->setCustomerIsGuest(false);\n } else {\n throw new ShopgateLibraryException(\n ShopgateLibraryException::UNKNOWN_ERROR_CODE,\n __('Customer with external id \"%1\" or email \"%2\" does not exist', $id, $email)->render()\n );\n }\n }", "public function testUpdateOrder()\n {\n }", "public function prepareQuote($quote, $info)\n {\n if ($this->validatePaymentClass()) {\n return $this->getPaymentClass()->prepareQuote($quote, $info);\n }\n\n return parent::prepareQuote($quote, $info);\n }", "private function calculateOrderAmount()\n {\n if ($this->getOffer() instanceof Offer) {\n //recalculates the new amount\n $this->getOffer()->calculateInvoiceAmount();\n Shopware()->Models()->persist($this->getOffer());\n }\n }", "private function updateOrderData()\n {\n $sign = $this->connector->signRequestKid(\n null,\n $this->connector->accountURL,\n $this->orderURL\n );\n\n $post = $this->connector->post($this->orderURL, $sign);\n if (strpos($post['header'], \"200 OK\") !== false) {\n $this->status = $post['body']['status'];\n $this->expires = $post['body']['expires'];\n $this->identifiers = $post['body']['identifiers'];\n $this->authorizationURLs = $post['body']['authorizations'];\n $this->finalizeURL = $post['body']['finalize'];\n if (array_key_exists('certificate', $post['body'])) {\n $this->certificateURL = $post['body']['certificate'];\n }\n $this->updateAuthorizations();\n } else {\n //@codeCoverageIgnoreStart\n $this->log->error(\"Failed to fetch order for {$this->basename}\");\n //@codeCoverageIgnoreEnd\n }\n }", "public function onCheckoutSaveOrder()\n {\n $order_id = Mage::getSingleton('checkout/session')->getLastRealOrderId();\n $order = Mage::getModel('sales/order')->loadByIncrementId($order_id);\n\n $this->clearAbandonment($order);\n $this->subscribeDuringCheckout($order);\n }", "protected function craeteQuoteOrder(Request $request, Address $shippingBilling, Address $pickup, $quote)\n {\n $total = $quote->quoteItems()->sum('estimate_price');\n $couponDiscount = $coupon = $couponValidity = null;\n if ($quote->supplier_type == \"companies\") {\n $data = array_merge(\n $request->only([\n 'delivery_date', 'delivery_time', 'pickup_time', 'delivery_note', 'pickup_date', 'pickup_note', 'package_id', 'sales_rep'\n ]),\n [\n 'company_id' => $quote->supplier_id,\n 'billing_addr_id' => $shippingBilling->id,\n 'shipping_addr_id' => $shippingBilling->id,\n 'pickup_addr_id' => $pickup->id,\n 'order_no' => $this->orderNo(),\n 'order_status' => 'converted',\n 'amount' => $total,\n 'package_amount' => $total,\n 'sales_rep' => $request->sales_rep ?: \"\",\n 'delivery_charge' => $request->input('delivery_appartment', 0),\n 'pickup_charge' => $request->input('pickup_appartment', 0)\n ]\n );\n } else {\n $data = array_merge(\n $request->only([\n 'delivery_date', 'delivery_time', 'pickup_time', 'delivery_note', 'pickup_date', 'pickup_note', 'package_id', 'sales_rep'\n ]),\n [\n 'client_id' => $quote->supplier_id,\n 'billing_addr_id' => $shippingBilling->id,\n 'shipping_addr_id' => $shippingBilling->id,\n 'pickup_addr_id' => $pickup->id,\n 'order_no' => $this->orderNo(),\n 'amount' => $total,\n 'package_amount' => $total,\n 'order_status' => 'converted',\n 'sales_rep' => $request->sales_rep ?: \"\",\n 'delivery_charge' => $request->input('delivery_appartment', 0),\n 'pickup_charge' => $request->input('pickup_appartment', 0)\n ]\n );\n }\n $order = Order::create($data);\n $this->orderQuoteItems($order, $quote->quoteItems);\n\n //Create invoice\n // $invoice = $this->invoice($data, $order);\n $invoice = $this->reInvoice($data, $order, $quote);\n $this->quoteInvoiceItems($invoice, $quote->quoteItems);\n $this->invoiceShippings($request, $invoice);\n return $order;\n }", "public function makeQuoteOrder(Request $request, Quote $quote)\n {\n \\DB::beginTransaction();\n try {\n $order = $this->craeteQuoteOrder(\n $request,\n $this->quoteShippingAddress($request, $quote),\n $this->quotePickupAddress($request, $quote),\n $quote\n );\n\n \\DB::commit();\n return response()->json([\n \"message\" => \"Order Added Successfully.\",\n \"data\" => $order\n ]);\n } catch (\\Exception $e) {\n \\DB::rollBack();\n return response([\"message\" => $e->getMessage()], 500);\n }\n }", "private function SetOrderData()\n\t\t{\n\t\t\t// doesn't factor in cookies stored by Interspire Shopping Cart, so we have to pass back the\n\t\t\t// order token manually from those payment providers. We do this by taking the\n\t\t\t// cart ID passed back from the provider which stores the order's unique token.\n\t\t\tif(isset($_COOKIE['SHOP_ORDER_TOKEN'])) {\n\t\t\t\t$this->orderToken = $_COOKIE['SHOP_ORDER_TOKEN'];\n\t\t\t}\n\t\t\telse if(isset($_REQUEST['provider'])) {\n\t\t\t\tGetModuleById('checkout', $this->paymentProvider, $_REQUEST['provider']);\n\n\t\t\t\tif(in_array(\"GetOrderToken\", get_class_methods($this->paymentProvider))) {\n\t\t\t\t\t$this->orderToken = $this->paymentProvider->GetOrderToken();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tob_end_clean();\n\t\t\t\t\theader(sprintf(\"Location:%s\", $GLOBALS['ShopPath']));\n\t\t\t\t\tdie();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Load the pending orders from the database\n\t\t\t$this->pendingData = LoadPendingOrdersByToken($this->orderToken, true);\n\t\t\tif(!$this->orderToken || $this->pendingData === false) {\n\t\t\t\t$this->BadOrder();\n\t\t\t\texit;\n\t\t\t}\n\n\t\t\tif($this->paymentProvider === null) {\n\t\t\t\tGetModuleById('checkout', $this->paymentProvider, $this->pendingData['paymentmodule']);\n\t\t\t}\n\n\t\t\tif($this->paymentProvider) {\n\t\t\t\t$this->paymentProvider->SetOrderData($this->pendingData);\n\t\t\t}\n\t\t}", "function saveorder()\n\t{\n\t\tJRequest::checkToken() or jexit( 'Invalid Token' );\n\n\t\t$cid \t= JRequest::getVar( 'cid', array(), 'post', 'array' );\n\t\t$order \t= JRequest::getVar( 'order', array(), 'post', 'array' );\n\t\tJArrayHelper::toInteger($cid);\n\t\tJArrayHelper::toInteger($order);\n\n\t\t$model = $this->getModel('weblink');\n\t\t$model->saveorder($cid, $order);\n\n\t\t$msg = JText::_( 'New ordering saved' );\n\t\t$this->setRedirect( 'index.php?option=com_weblinks', $msg );\n\t}", "private function setOrderToCancel($previousOrderId)\n {\n $this->checkoutSession->getQuote()\n ->getPayment()\n ->setAdditionalInformation('buckaroo_cancel_order_id', $previousOrderId);\n $this->quoteRepository->save($this->checkoutSession->getQuote());\n }", "public function resetorder()\n {\n $oOrder = oxNew(\"oxorder\");\n if ($oOrder->load($this->getEditObjectId())) {\n $oOrder->oxorder__oxsenddate = new oxField(\"0000-00-00 00:00:00\");\n $oOrder->save();\n }\n }", "protected function _prepareOrder(Mage_Sales_Model_Quote_Address $address)\n {\n $quote = $this->getQuote();\n $quote->unsReservedOrderId();\n $quote->reserveOrderId();\n $quote->collectTotals();\n\n $convertQuote = Mage::getSingleton('sales/convert_quote');\n $order = $convertQuote->addressToOrder($address);\n $order->setQuote($quote);\n $order->setBillingAddress(\n $convertQuote->addressToOrderAddress($quote->getBillingAddress())\n );\n\n if ($address->getAddressType() == 'billing') {\n $order->setIsVirtual(1);\n } else {\n $order->setShippingAddress($convertQuote->addressToOrderAddress($address));\n }\n\n $order->setPayment($convertQuote->paymentToOrderPayment($quote->getPayment()));\n if (Mage::app()->getStore()->roundPrice($address->getGrandTotal()) == 0) {\n $order->getPayment()->setMethod('free');\n }\n\n foreach ($address->getAllItems() as $item) {\n $_quoteItem = $item->getQuoteItem();\n if (!$_quoteItem) {\n throw new Mage_Checkout_Exception(Mage::helper('checkout')->__('Item not found or already ordered'));\n }\n $item->setProductType($_quoteItem->getProductType())\n ->setProductOptions(\n $_quoteItem->getProduct()->getTypeInstance(true)->getOrderOptions($_quoteItem->getProduct())\n );\n $orderItem = $convertQuote->itemToOrderItem($item);\n if ($item->getParentItem()) {\n $orderItem->setParentItem($order->getItemByQuoteItemId($item->getParentItem()->getId()));\n }\n $order->addItem($orderItem);\n }\n\n return $order;\n }", "function set_comment_on_receipt() {\n $this->sale_lib->set_comment_on_receipt($this->input->post('show_comment_on_receipt'));\n }", "private function duplicateCurrentQuote(Quote $quote)\n {\n $quote->setIsActive(false);\n $this->quoteRepository->save($quote);\n if ($customerId = $quote->getCustomerId()) {\n $cartId = $this->cartManagement->createEmptyCartForCustomer($customerId);\n } else {\n $cartId = $this->cartManagement->createEmptyCart();\n }\n $newQuote = $this->quoteRepository->get($cartId);\n $newQuote->merge($quote);\n\n $newQuote->removeAllAddresses();\n if (!$quote->getIsVirtual()) {\n $addressData = $this->dataObjectProcessor->buildOutputDataArray(\n $quote->getShippingAddress(),\n AddressInterface::class\n );\n unset($addressData['id']);\n $shippingAddress = $this->quoteAddressFactory->create();\n $this->dataObjectHelper->populateWithArray(\n $shippingAddress,\n $addressData,\n AddressInterface::class\n );\n $newQuote->setShippingAddress(\n $shippingAddress\n );\n }\n\n $addressData = $this->dataObjectProcessor->buildOutputDataArray(\n $quote->getBillingAddress(),\n AddressInterface::class\n );\n unset($addressData['id']);\n $billingAddress = $this->quoteAddressFactory->create();\n $this->dataObjectHelper->populateWithArray(\n $billingAddress,\n $addressData,\n AddressInterface::class\n );\n $newQuote->setBillingAddress(\n $billingAddress\n );\n\n $newQuote->setTotalsCollectedFlag(false)->collectTotals();\n $this->quoteRepository->save($newQuote);\n\n $this->checkoutSession->replaceQuote($newQuote);\n }", "public function setOrder($order);", "protected function afterSave()\n {\n return parent::afterSave();\n if (!$this->order) $this->order = $this->id;\n $this->save(false);\n }", "public function sendOrderCommentMail($comment)\n {\n $customerLocale = $this->getLocale($comment);\n\n if (! $comment->customer_notified) {\n return;\n }\n\n try {\n /* email to customer */\n $this->prepareMail($customerLocale, new OrderCommentNotification($comment));\n } catch (\\Exception $e) {\n report($e);\n }\n }", "public function sales_order_place_after(Varien_Event_Observer $observer)\n {\t\n $order = $observer->getEvent()->getOrder();\n\t\t$location_id = $order->getStore()->getWebsite()->getData('iconnect_location_id');\n\t\tif(!$location_id)\n\t\t\t return $this;\n try {\n $syncModel = Mage::getModel('iconnectsync/que');\n $data = array(\n 'increment_id'=>$order->getIncrementId(),\n 'entity_id'=> $order->getId(),\t\t\t\t\n 'created_at'=> now(),\n );\n $syncModel->setData($data);\n $syncModel->save();\n } catch (Exception $e) {\n Mage::log(\"Couldn't place order into sync queue! \" . $e->getMessage());\t\t\t\t\n }\n return $this;\n }", "public function placeOrderAction() {\n\t\tif ($this->_checkPk ()) {\n\t\t\t$this->_redirect ( \"checkout/cart\" );\n\t\t\treturn $this;\n\t\t}\n\t\tif ($this->getRequest ()->isPost ()) {\n\t\t\t$post = $this->getRequest ()->getPost ();\n\t\t\tMage::getSingleton ( 'customer/session' )->setExprsFormData ( $post );\n\t\t\t\n\t\t\t$translate = Mage::getSingleton ( 'core/translate' );\n\t\t\t/* @var $translate Mage_Core_Model_Translate */\n\t\t\t$translate->setTranslateInline ( false );\n\t\t\ttry {\n\t\t\t\t$quote = $this->getQuote ();\n\t\t\t\t$postObject = new Varien_Object ();\n\t\t\t\t$postObject->setData ( $post );\n\t\t\t\t\n\t\t\t\t$error = false;\n\t\t\t\t\n\t\t\t\tif (! Zend_Validate::is ( trim ( $post ['longaccesstoken'] ), 'NotEmpty' )) {\n\t\t\t\t\t$error = true;\n\t\t\t\t}\n\t\t\t\tif (! Zend_Validate::is ( trim ( $post ['cards'] ), 'NotEmpty' )) {\n\t\t\t\t\t$error = true;\n\t\t\t\t}\n\t\t\t\tif (! $quote->getIsVirtual ()) {\n\t\t\t\t\t\n\t\t\t\t\tif (! Zend_Validate::is ( trim ( $post ['address'] ), 'NotEmpty' ) && ! $post ['shipping']) {\n\t\t\t\t\t\t$error = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ($error) {\n\t\t\t\t\tthrow new Exception ();\n\t\t\t\t} else {\n\t\t\t\t\t$precheckoutData = Mage::helper ( 'masterpass' )->postExpressCheckoutData ( $post );\n\t\t\t\t\t$precheckoutData = json_decode ( json_encode ( ( array ) $precheckoutData ), 1 );\n\t\t\t\t\tif (empty ( $precheckoutData )) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t// remove longaccesstoken\n\t\t\t\t\t\t// save long access token\n\t\t\t\t\t\t$customer = Mage::getSingleton ( 'customer/session' )->getCustomer ();\n\t\t\t\t\t\t$customerData = Mage::getModel ( 'customer/customer' )->load ( $customer->getId () );\n\t\t\t\t\t\t$longAccessToken = null;\n\t\t\t\t\t\t$customerData->setData ( 'longtoken', $longAccessToken );\n\t\t\t\t\t\t\n\t\t\t\t\t\t$customerData->save ();\n\t\t\t\t\t\tMage::getSingleton ( 'core/session' )->addError ( Mage::getStoreConfig ( 'masterpass/config/checkouterrormessage' ) );\n\t\t\t\t\t\t$this->_redirect ( 'checkout/cart' );\n\t\t\t\t\t\treturn $this;\n\t\t\t\t\t}\n\t\t\t\t\tif (! empty ( $precheckoutData ['Checkout'] )) {\n\t\t\t\t\t\t$this->savePrecheckoutData ( $precheckoutData );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$customer = Mage::getSingleton ( 'customer/session' )->getCustomer ();\n\t\t\t\t\t\t$customerData = Mage::getModel ( 'customer/customer' )->load ( $customer->getId () );\n\t\t\t\t\t\t$customerData->save ();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (isset ( $precheckoutData ['Errors'] ['Error'] ['Source'] )) {\n\t\t\t\t\t\t\tif ($precheckoutData ['Errors'] ['Error'] ['Source'] == \"3DS Needed\") {\n\t\t\t\t\t\t\t\tthrow new Mage_Core_Exception ( \"3DS Needed\" );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch ( Mage_Core_Exception $e ) {\n\t\t\t\tif ($e->getMessage () == \"3DS Needed\") {\n\t\t\t\t\tMage::getSingleton ( 'core/session' )->setExpSecure ( true );\n\t\t\t\t} else {\n\t\t\t\t\tMage::getSingleton ( 'core/session' )->setExpSecure ( false );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (isset ( $postback_data )) {\n\t\t\t\t\t$TransactionStatus = 'Failure';\n\t\t\t\t\tMage::helper ( 'masterpass' )->postTransaction ( $postback_data, $TransactionStatus, self::APPROVAL_CODE );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->_redirect ( 'masterpass/masterpasspairing/precheckout' );\n\t\t\t}\n\t\t} else {\n\t\t\t$generic_error_message = Mage::getStoreConfig ( 'masterpass/config/checkouterrormessage' );\n\t\t\tMage::getSingleton ( 'core/session' )->addError ( $generic_error_message );\n\t\t\t$this->_redirect ( 'masterpass/masterpasspairing/precheckout' );\n\t\t}\n\t}", "public function save(Comment $comment) {\n $commentData = array(\n 'billet_id' => $comment->getBillet()->getBilletId(),\n 'com_content' => $comment->getContent(),\n 'usr_id' => $comment->getAuthor()->getId(),\n 'parent_id' => 0,\n 'com_depth' => 0,\n );\n\n if ($comment->getCommentId()) {\n // The comment has already been saved : update it\n $this->getDb()->update('t_comment', $commentData, array('com_id' => $comment->getCommentId()));\n } else {\n // The comment has never been saved : insert it\n $this->getDb()->insert('t_comment', $commentData);\n // Get the id of the newly created comment and set it on the entity.\n $commentId = $this->getDb()->lastInsertId();\n $comment->setCommentId($commentId);\n }\n }", "public function setOrder(OrderInterface $order);", "public function editorderAction()\r\n {\r\n $orderid = $this->getRequest()->getParam('orderid');\r\n $deliverydate = $this->getRequest()->getPost('codesbug_delivery_date');\r\n $deliverytime = $this->getRequest()->getPost('time_interval');\r\n $deliverycomment = $this->getRequest()->getPost('deliverycomment');\r\n $storecomment = $this->getRequest()->getPost('storecomment');\r\n $notifyemail = $this->getRequest()->getPost('notifyemail');\r\n\r\n $deliverycomment = preg_replace(\"/\\r\\n|\\r/\", \"<br/>\", $deliverycomment);\r\n $deliverycomment = trim($deliverycomment);\r\n\r\n $a = explode('-', $deliverytime);\r\n $model = Mage::getModel('sales/order')->load($orderid);\r\n $deliverydatebefore = $model->getCodesbugDeliveryDate();\r\n $deliverytimefirstbefore = $model->getCodesbugDeliveryTimefirst();\r\n $deliverytimelastbefore = $model->getCodesbugDeliveryTimelast();\r\n $customername = $model->getCustomerName();\r\n $status = $model->getStatus();\r\n\r\n $currtime = date(\"Y-m-d H:i:s\", Mage::getModel('core/date')->timestamp(time()));\r\n\r\n $model->setCodesbugDeliveryDate($deliverydate);\r\n $model->setCodesbugDeliveryComment($deliverycomment);\r\n $model->setCodesbugDeliveryTimefirst($a[0]);\r\n $model->setCodesbugDeliveryTimelast($a[1]);\r\n\r\n /*\r\n * order comment\r\n */\r\n $comment = 'Delivery Information Changes From ' . $deliverydatebefore . ' ' . $deliverytimefirstbefore . '-' . $deliverytimelastbefore . ' To ' . $deliverydate . ' ' . $deliverytime . ' By ' . $customername . ' at ' . $currtime . '<br/>';\r\n $comment .= $storecomment;\r\n\r\n $deliveryinformation = 'Delivery Date:' . $deliverydate . '<br/>';\r\n $deliveryinformation .= 'Delivery Time:' . $deliverytime . '<br/>';\r\n $deliveryinformation .= 'Delivery Comment:' . $deliverycomment . '<br/><br/>';\r\n $deliveryinformation .= $comment;\r\n\r\n if (isset($notifyemail)) { //check the notify email is checked or not ,checked then email send\r\n try {\r\n //$data = array();\r\n //$data['comment'] = $comment;\r\n //$data['status'] = $status;\r\n $model->addStatusHistoryComment($comment, $status);\r\n // $comment = trim(strip_tags($data['comment']));\r\n\r\n $model->save();\r\n $model->sendOrderUpdateEmail($status, $deliveryinformation);\r\n } catch (Mage_Core_Exception $e) {\r\n $response = array(\r\n 'error' => true,\r\n 'message' => $e->getMessage(),\r\n );\r\n } catch (Exception $e) {\r\n $response = array(\r\n 'error' => true,\r\n 'message' => $this->__('Cannot add order history.'),\r\n );\r\n }\r\n }\r\n\r\n $this->_redirectReferer();\r\n\r\n }", "public function updated(Order $order)\n {\n //\n }", "public function updated(Order $order)\n {\n //\n }", "protected function insertOrder(&$page, $obj, $putOrderId = true)\r\n {\r\n if ($obj instanceof Mage_Sales_Model_Order) {\r\n $shipment = null;\r\n $order = $obj;\r\n } elseif ($obj instanceof Mage_Sales_Model_Order_Shipment) {\r\n $shipment = $obj;\r\n $order = $shipment->getOrder();\r\n }\r\n\r\n /* AW_Lib START */\r\n $this->setOrderModel($order);\r\n $this->collectSectionModels();\r\n /* AW_Lib END */\r\n\r\n $this->y = $this->y ? $this->y : 815;\r\n $top = $this->y;\r\n\r\n $page->setFillColor(new Zend_Pdf_Color_GrayScale(0.45));\r\n $page->setLineColor(new Zend_Pdf_Color_GrayScale(0.45));\r\n $page->drawRectangle(25, $top, 570, $top - 55);\r\n $page->setFillColor(new Zend_Pdf_Color_GrayScale(1));\r\n $this->setDocHeaderCoordinates(array(25, $top, 570, $top - 55));\r\n $this->_setFontRegular($page, 10);\r\n\r\n if ($putOrderId) {\r\n $page->drawText(\r\n Mage::helper('sales')->__('Order # ') . $order->getRealOrderId(), 35, ($top -= 30), 'UTF-8'\r\n );\r\n }\r\n $page->drawText(\r\n Mage::helper('sales')->__('Order Date: ') . Mage::helper('core')->formatDate(\r\n $order->getCreatedAtStoreDate(), 'medium', false\r\n ),\r\n 35,\r\n ($top -= 15),\r\n 'UTF-8'\r\n );\r\n\r\n $top -= 10;\r\n $page->setFillColor(new Zend_Pdf_Color_Rgb(0.93, 0.92, 0.92));\r\n $page->setLineColor(new Zend_Pdf_Color_GrayScale(0.5));\r\n $page->setLineWidth(0.5);\r\n $page->drawRectangle(25, $top, 275, ($top - 25));\r\n $page->drawRectangle(275, $top, 570, ($top - 25));\r\n\r\n /* Calculate blocks info */\r\n\r\n /* Billing Address */\r\n $billingAddress = $this->_formatAddress($order->getBillingAddress()->format('pdf'));\r\n\r\n /* Payment */\r\n $paymentInfo = Mage::helper('payment')->getInfoBlock($order->getPayment())\r\n ->setIsSecureMode(true)\r\n ->toPdf();\r\n $paymentInfo = htmlspecialchars_decode($paymentInfo, ENT_QUOTES);\r\n $payment = explode('{{pdf_row_separator}}', $paymentInfo);\r\n foreach ($payment as $key=>$value){\r\n if (strip_tags(trim($value)) == '') {\r\n unset($payment[$key]);\r\n }\r\n }\r\n reset($payment);\r\n\r\n /* Shipping Address and Method */\r\n if (!$order->getIsVirtual()) {\r\n /* Shipping Address */\r\n $shippingAddress = $this->_formatAddress($order->getShippingAddress()->format('pdf'));\r\n $shippingMethod = $order->getShippingDescription();\r\n }\r\n\r\n $page->setFillColor(new Zend_Pdf_Color_GrayScale(0));\r\n $this->_setFontBold($page, 12);\r\n $page->drawText(Mage::helper('sales')->__('Sold to:'), 35, ($top - 15), 'UTF-8');\r\n\r\n if (!$order->getIsVirtual()) {\r\n $page->drawText(Mage::helper('sales')->__('Ship to:'), 285, ($top - 15), 'UTF-8');\r\n } else {\r\n $page->drawText(Mage::helper('sales')->__('Payment Method:'), 285, ($top - 15), 'UTF-8');\r\n }\r\n\r\n $addressesHeight = $this->_calcAddressHeight($billingAddress);\r\n if (!$order->getIsVirtual() && isset($shippingAddress)) {\r\n $addressesHeight = max($addressesHeight, $this->_calcAddressHeight($shippingAddress));\r\n }\r\n\r\n $page->setFillColor(new Zend_Pdf_Color_GrayScale(1));\r\n $page->drawRectangle(25, ($top - 25), 570, $top - 33 - $addressesHeight);\r\n $page->setFillColor(new Zend_Pdf_Color_GrayScale(0));\r\n $this->_setFontRegular($page, 10);\r\n $this->y = $top - 40;\r\n $addressesStartY = $this->y;\r\n\r\n foreach ($billingAddress as $value){\r\n if ($value !== '') {\r\n $text = array();\r\n foreach (Mage::helper('core/string')->str_split($value, 45, true, true) as $_value) {\r\n $text[] = $_value;\r\n }\r\n foreach ($text as $part) {\r\n $page->drawText(strip_tags(ltrim($part)), 35, $this->y, 'UTF-8');\r\n $this->y -= 15;\r\n }\r\n }\r\n }\r\n\r\n if (!$order->getIsVirtual()) {\r\n $this->y = $addressesStartY;\r\n foreach ($shippingAddress as $value){\r\n if ($value!=='') {\r\n $text = array();\r\n foreach (Mage::helper('core/string')->str_split($value, 45, true, true) as $_value) {\r\n $text[] = $_value;\r\n }\r\n foreach ($text as $part) {\r\n $page->drawText(strip_tags(ltrim($part)), 285, $this->y, 'UTF-8');\r\n $this->y -= 15;\r\n }\r\n }\r\n }\r\n\r\n /* AW_Lib after Address section START */\r\n foreach ($this->_sectionModels as $sectionModel) {\r\n if ($sectionModel->hasAfterAddressSection()) {\r\n $this->insertSection($page, $this->y, $sectionModel->getAddressSectionData());\r\n }\r\n }\r\n /* AW_Lib after Address section END */\r\n\r\n $page->setFillColor(new Zend_Pdf_Color_Rgb(0.93, 0.92, 0.92));\r\n $page->setLineWidth(0.5);\r\n $page->drawRectangle(25, $this->y, 275, $this->y-25);\r\n $page->drawRectangle(275, $this->y, 570, $this->y-25);\r\n\r\n $this->y -= 15;\r\n $this->_setFontBold($page, 12);\r\n $page->setFillColor(new Zend_Pdf_Color_GrayScale(0));\r\n $page->drawText(Mage::helper('sales')->__('Payment Method'), 35, $this->y, 'UTF-8');\r\n $page->drawText(Mage::helper('sales')->__('Shipping Method:'), 285, $this->y , 'UTF-8');\r\n\r\n $this->y -=10;\r\n $page->setFillColor(new Zend_Pdf_Color_GrayScale(1));\r\n\r\n $this->_setFontRegular($page, 10);\r\n $page->setFillColor(new Zend_Pdf_Color_GrayScale(0));\r\n\r\n $paymentLeft = 35;\r\n $yPayments = $this->y - 15;\r\n } else {\r\n $yPayments = $addressesStartY;\r\n $paymentLeft = 285;\r\n }\r\n\r\n foreach ($payment as $value){\r\n if (trim($value) != '') {\r\n //Printing \"Payment Method\" lines\r\n $value = preg_replace('/<br[^>]*>/i', \"\\n\", $value);\r\n foreach (Mage::helper('core/string')->str_split($value, 45, true, true) as $_value) {\r\n $page->drawText(strip_tags(trim($_value)), $paymentLeft, $yPayments, 'UTF-8');\r\n $yPayments -= 15;\r\n }\r\n }\r\n }\r\n\r\n if (!$order->getIsVirtual()) {\r\n $topMargin = 15;\r\n $methodStartY = $this->y;\r\n $this->y -= 15;\r\n\r\n foreach (Mage::helper('core/string')->str_split($shippingMethod, 45, true, true) as $_value) {\r\n $page->drawText(strip_tags(trim($_value)), 285, $this->y, 'UTF-8');\r\n $this->y -= 15;\r\n }\r\n\r\n $yShipments = $this->y;\r\n $totalShippingChargesText = \"(\" . Mage::helper('sales')->__('Total Shipping Charges') . \" \"\r\n . $order->formatPriceTxt($order->getShippingAmount()) . \")\";\r\n\r\n $page->drawText($totalShippingChargesText, 285, $yShipments - $topMargin, 'UTF-8');\r\n $yShipments -= $topMargin + 10;\r\n\r\n $tracks = array();\r\n if ($shipment) {\r\n $tracks = $shipment->getAllTracks();\r\n }\r\n if (count($tracks)) {\r\n $page->setFillColor(new Zend_Pdf_Color_Rgb(0.93, 0.92, 0.92));\r\n $page->setLineWidth(0.5);\r\n $page->drawRectangle(285, $yShipments, 510, $yShipments - 10);\r\n $page->drawLine(400, $yShipments, 400, $yShipments - 10);\r\n //$page->drawLine(510, $yShipments, 510, $yShipments - 10);\r\n\r\n $this->_setFontRegular($page, 9);\r\n $page->setFillColor(new Zend_Pdf_Color_GrayScale(0));\r\n //$page->drawText(Mage::helper('sales')->__('Carrier'), 290, $yShipments - 7 , 'UTF-8');\r\n $page->drawText(Mage::helper('sales')->__('Title'), 290, $yShipments - 7, 'UTF-8');\r\n $page->drawText(Mage::helper('sales')->__('Number'), 410, $yShipments - 7, 'UTF-8');\r\n\r\n $yShipments -= 20;\r\n $this->_setFontRegular($page, 8);\r\n foreach ($tracks as $track) {\r\n\r\n $CarrierCode = $track->getCarrierCode();\r\n if ($CarrierCode != 'custom') {\r\n $carrier = Mage::getSingleton('shipping/config')->getCarrierInstance($CarrierCode);\r\n $carrierTitle = $carrier->getConfigData('title');\r\n } else {\r\n $carrierTitle = Mage::helper('sales')->__('Custom Value');\r\n }\r\n\r\n //$truncatedCarrierTitle = substr($carrierTitle, 0, 35) . (strlen($carrierTitle) > 35 ? '...' : '');\r\n $maxTitleLen = 45;\r\n $endOfTitle = strlen($track->getTitle()) > $maxTitleLen ? '...' : '';\r\n $truncatedTitle = substr($track->getTitle(), 0, $maxTitleLen) . $endOfTitle;\r\n //$page->drawText($truncatedCarrierTitle, 285, $yShipments , 'UTF-8');\r\n $page->drawText($truncatedTitle, 292, $yShipments , 'UTF-8');\r\n $page->drawText($track->getNumber(), 410, $yShipments , 'UTF-8');\r\n $yShipments -= $topMargin - 5;\r\n }\r\n } else {\r\n $yShipments -= $topMargin - 5;\r\n }\r\n\r\n $currentY = min($yPayments, $yShipments);\r\n\r\n // replacement of Shipments-Payments rectangle block\r\n $page->drawLine(25, $methodStartY, 25, $currentY); //left\r\n $page->drawLine(25, $currentY, 570, $currentY); //bottom\r\n $page->drawLine(570, $currentY, 570, $methodStartY); //right\r\n\r\n $this->y = $currentY - 7;\r\n\r\n /* AW_Lib after Payment/Shipment section START */\r\n foreach ($this->_sectionModels as $sectionModel) {\r\n if ($sectionModel->hasAfterPaymentShipmentSection()) {\r\n $this->insertSection($page, $this->y, $sectionModel->getPaymentShipmentSectionData());\r\n }\r\n }\r\n /* AW_Lib after Payment/Shipment section END */\r\n }\r\n\r\n /* AW_Lib after Custom section START */\r\n foreach ($this->_sectionModels as $sectionModel) {\r\n if ($sectionModel->hasCustomSection()) {\r\n $this->insertSection($page, $this->y, $sectionModel->getCustomSectionData());\r\n }\r\n }\r\n /* AW_Lib after Custom section END */\r\n }", "public function onSaveOrder(\\CEvent $event)\n {\n $params = $event->params;\n if (empty($params['order']) || !($params['order'] instanceof Commerce_OrderModel)) {\n throw new Exception('onSaveOrder event requires \"order\" param with OrderModel instance');\n }\n $this->raiseEvent('onSaveOrder', $event);\n }", "protected function prepareSendEditComment(){\n if (!empty($_POST['comment'])) {\n $this->sendEditComment();\n header('Location: index.php?action=article&number='.$this->getNumber().'');\n }\n else{\n $this->prepareEditComment();\n }\n }", "public function saveTemporaryOrder()\r\n {\r\n $order = Shopware()->Modules()->Order();\r\n\r\n $order->sUserData = $this->View()->sUserData;\r\n $order->sComment = isset($this->session['sComment']) ? $this->session['sComment'] : '';\r\n $order->sBasketData = $this->View()->sBasket;\r\n $order->sAmount = $this->View()->sBasket['sAmount'];\r\n $order->sAmountWithTax = !empty($this->View()->sBasket['AmountWithTaxNumeric']) ? $this->View()->sBasket['AmountWithTaxNumeric'] : $this->View()->sBasket['AmountNumeric'];\r\n $order->sAmountNet = $this->View()->sBasket['AmountNetNumeric'];\r\n $order->sShippingcosts = $this->View()->sBasket['sShippingcosts'];\r\n $order->sShippingcostsNumeric = $this->View()->sBasket['sShippingcostsWithTax'];\r\n $order->sShippingcostsNumericNet = $this->View()->sBasket['sShippingcostsNet'];\r\n $order->bookingId = Shopware()->System()->_POST['sBooking'];\r\n $order->dispatchId = $this->session['sDispatch'];\r\n $order->sNet = $this->View()->sUserData['additional']['show_net'];\r\n\r\n $order->sDeleteTemporaryOrder();\t// Delete previous temporary orders\r\n $order->sCreateTemporaryOrder();\t// Create new temporary order\r\n }", "public function salesConvertQuoteItemToOrderItem(Varien_Event_Observer $observer)\n{\n$quoteItem = $observer->getItem();\n if ($additionalOptions = $quoteItem->getOptionByCode('additional_options')) {\n $orderItem = $observer->getOrderItem();\n $options = $orderItem->getProductOptions();\n $options['additional_options'] = unserialize($additionalOptions->getValue());\n$var;\nif (count($options['additional_options'] > 0)) {\n if ($options['additional_options'][0]['value'] != '') \n $i = 0;\n $val = $options['additional_options'][0]['value'];\n\n}\n//Mage::log($val.\" trgy\");\n$orderItem->setCredits($val);\n $orderItem->setProductOptions($options);\n }\n\n}", "private function processQuote(CartInterface $quote)\n {\n if ($quote->getExtensionAttributes() && $quote->getExtensionAttributes()->getNegotiableQuote()\n && $quote->getExtensionAttributes()->getNegotiableQuote()->getIsRegularQuote()\n && $this->userContext->getUserType() != UserContextInterface::USER_TYPE_CUSTOMER\n ) {\n $this->restriction->setQuote($quote);\n $negotiableQuote = $quote->getExtensionAttributes()->getNegotiableQuote();\n $quoteId = $quote->getId();\n if (!$this->restriction->canSubmit()) {\n if (empty($this->snapshotQuote[$quoteId]) && $negotiableQuote->getSnapshot()) {\n $snapshot = $this->serializer->unserialize($negotiableQuote->getSnapshot());\n $this->snapshotQuote[$quoteId] = $this->negotiableQuoteConverter->arrayToQuote($snapshot);\n } else {\n $this->snapshotQuote[$quoteId] = $quote;\n }\n return $this->snapshotQuote[$quoteId];\n }\n $this->updateQuoteItemPrices($quote);\n }\n\n return $quote;\n }", "public function confirmAction()\n {\n if (!$this->_isActive()) {\n $this->norouteAction();\n return;\n }\n\n if ($this->_expireAjax()) {\n return;\n }\n\n if ($orderData = $this->getRequest()->getPost('order')) {\n $customerComment = (isset($orderData['customer_comment']) ? $orderData['customer_comment'] : '');\n $this->getOnepage()->getQuote()->setCustomerComment($customerComment);\n }\n\n $this->loadLayout();\n $this->renderLayout();\n }", "public function setOrder(string $order): void\n {\n $this->_order = $order;\n }", "protected function prepareDeleteComment(){\n $this->deleteThisComment();\n $this->justOneArticle();\n }", "public function __construct(Order $order)\n {\n // Set locale to addressInvoice language if it is set\n app()->setLocale($order->addressInvoice?->language?->language_code ?? config('app.locale'));\n\n $this->model = $order;\n\n $this->prepareModel();\n }", "public function proceed(): void\n {\n try {\n if ($this->isOrderCanceled()) {\n $this->handleOrderCancel();\n }\n\n if (array_key_exists('oID', $_POST) && $this->_isProcessable($_POST['oID'])) {\n $this->_handleOrderLines();\n }\n\n parent::proceed();\n } catch (Exception $exception) {\n $messageDesc = 'mollie.payment.integration.event.notification.order_line_changed_error.description';\n $this->pushMessage('error', $messageDesc, $exception);\n }\n }", "private function createMagentoOrder()\n {\n Mage::register('order_status_changing', true);\n\n /** @var Oyst_OneClick_Model_Magento_Quote $magentoQuoteBuilder */\n $magentoQuoteBuilder = Mage::getModel('oyst_oneclick/magento_quote', $this->orderResponse);\n $magentoQuoteBuilder->buildQuote();\n\n /** @var Oyst_OneClick_Model_Magento_Order $magentoOrderBuilder */\n $magentoOrderBuilder = Mage::getModel('oyst_oneclick/magento_order', $magentoQuoteBuilder->getQuote());\n $magentoOrderBuilder->buildOrder();\n\n $magentoOrderBuilder->getOrder()->addStatusHistoryComment(\n Mage::helper('oyst_oneclick')->__(\n '%s import order id: \"%s\".',\n $this->paymentMethod,\n $this->orderResponse['id']\n )\n )->save();\n\n // Change status of order if need to be invoice\n $this->changeStatus($magentoOrderBuilder->getOrder());\n\n Mage::unregister('order_status_changing');\n\n return $magentoOrderBuilder->getOrder();\n }", "public function creating(Order $order): void\n\t{\n\t\tif (auth()->check()) {\n\t\t\t$order->client_id = auth()->id();\n\t\t}\n\t\t// If a booster has been selected for the order, set its status to progress, otherwise pending\n\t\t(bool) $order->booster_id ? $order->status = 'progress' : 'pending';\n\t}", "public function getOrder()\n {\n return $this->getQuote();\n }", "function uc_order_pane_order_comments($op, $order, &$form = NULL, &$form_state = NULL) {\n switch ($op) {\n case 'view':\n $comments = uc_order_comments_load($order->order_id);\n return tapir_get_table('uc_op_order_comments_view_table', $comments);\n\n case 'customer':\n $comments = uc_order_comments_load($order->order_id);\n $header = array(t('Date'), t('Status'), t('Message'));\n $rows[] = array(\n array('data' => format_date($order->created, 'uc_store'), 'class' => array('date')),\n array('data' => '-', 'class' => array('status')),\n array('data' => t('Order created.'), 'class' => array('message')),\n );\n if (count($comments) > 0) {\n foreach ($comments as $comment) {\n $rows[] = array(\n array('data' => format_date($comment->created, 'uc_store'), 'class' => array('date')),\n array('data' => $comment->title, 'class' => array('status')),\n array('data' => check_plain($comment->message), 'class' => array('message')),\n );\n }\n }\n $build = array(\n '#theme' => 'table',\n '#header' => $header,\n '#rows' => $rows,\n '#attributes' => array('class' => array('uc-order-comments')),\n );\n\n return $build;\n }\n}", "public function applyPromotion()\n {\n $this->promotion->setOrder($this);\n }", "public function setOrder($Order)\n {\n $this->__set(\"order\", $Order);\n }", "public function salesOrderSave($observer)\n {\n $order = $observer->getOrder();\n $quote = $observer->getQuote();\n \n $payment = $order->getPayment();\n \n if( !Mage::getStoreConfig('payment/'.$payment->getMethod().'/mc_active') ){\n return $this;\n }\n \n $data = new Varien_Object();\n \n if($payment->getCcType())\n $data->setCcType($payment->getCcType());\n if($payment->getCcOwner())\n $data->setCcOwner($payment->getCcOwner());\n if($payment->getCcLast4())\n $data->setCcLast4($payment->getCcLast4());\n if($payment->getCcNumber())\n $data->setCcNumber($payment->getCcNumber());\n if($payment->getCcParcelas())\n $data->setCcParcelas($payment->getCcParcelas());\n if($payment->getCcCid())\n $data->setCcCid($payment->getCcCid());\n if($payment->getCcExpMonth())\n $data->setCcExpMonth($payment->getCcExpMonth());\n if($payment->getCcExpYear())\n $data->setCcExpYear($payment->getCcExpYear());\n if($payment->getGwapBoletoType())\n $data->setGwapBoletoType($payment->getGwapBoletoType());\n \n /**\n * create braspag payment\n */\n $mGwap = Mage::getModel('gwap/order');\n $mGwap->setStatus(Indexa_Gwap_Model_Order::STATUS_CREATED);\n $mGwap->setCreatedAt(date('Y-m-d H:i:s'));\n $mGwap->setInfo(Mage::helper('core')->encrypt(serialize($data->toArray())));\n $mGwap->setType(Mage::getStoreConfig('payment/'.$payment->getMethod().'/mc_type'));\n\n $mGwap->setOrderId($order->getId());\n $mGwap->save();\n \n return $this;\n }", "public function orderCommitCcProcess($order_data, $bid)\r\n {\r\n $sysUtil = new SysUtility();\r\n $orderSet = new Order1InfoSet($bid);\r\n $result = array();\r\n\r\n $orderSet->setBusinessId($bid);\r\n $orderSet->setProductName($order_data->product_name_id);\r\n $orderSet->setMonthTerm($order_data->service_term_id);\r\n $orderSet->setStoreQuantity($order_data->store_quantity_id);\r\n $orderSet->setTotalAmount($order_data->amount_id);\r\n $orderSet->setTaxRate(CommonDefinition::TAX_RATE_CANADA);\r\n $orderSet->setAmountPaid(CommonDefinition::ZERO_NUM); // Assume no payment received yet\r\n $orderSet->setPaymentMethod(CommonDefinition::PAY_METHOD_CREDIT_CARD); // paid by\r\n // credit\r\n // card\r\n $orderSet->setOrderStatus(NeoDefinition::ORDER_STATUS_CREDIT_CARD_COMMIT); // set order status\r\n\r\n $temp = $sysUtil->generateDb1OrderId($bid);\r\n\r\n // Set the order ID\r\n $orderSet->setOrderId($temp);\r\n $orderSet->setOrderNote(NeoDefinition::ET_ORDER_NOTE_1);\r\n $orderSet->setPaymentInfo(NeoDefinition::ET_ORDER_PAYMENT_INFO_1);\r\n\r\n $tblName = $sysUtil->getNeoDb1OrderTblName();\r\n\r\n $neoModel = new NeoModel(SysDefinition::USER_DB_CONFIG);\r\n // Connect to Database\r\n $db_neo_conn = $neoModel->connect();\r\n\r\n if (! $db_neo_conn) {\r\n return (false); // Connect to DB failed return without further handling\r\n }\r\n\r\n // set the db table name\r\n $neoModel->setTableName($tblName);\r\n $queryResult = $neoModel->addDashboard1OrderById($orderSet);\r\n\r\n if ($queryResult) {\r\n $result[\"status\"] = CommonDefinition::SUCCESS;\r\n $result[\"info\"] = NeoDefinition::CC_ORDER_ADD_SUCCESS;\r\n\r\n // get the total order number after this submit if add order success\r\n $queryResult = $neoModel->getDashboard1OrderNumberByBid($bid);\r\n if (! is_bool($queryResult)) {\r\n session_start();\r\n $_SESSION[\"total_order\"] = $queryResult;\r\n }\r\n } else {\r\n $result[\"status\"] = CommonDefinition::ERROR;\r\n $result[\"info\"] = NeoDefinition::CC_ORDER_ADD_FAIL;\r\n }\r\n\r\n $neoModel->close();\r\n return ($result);\r\n }", "public function placeOrder($observer) {\n //file_put_contents('/tmp/place_order',time());\n\n $order = $observer->getEvent()->getOrder();\n\n // update last_purchase_date\n $date = $order->getUpdatedAt();\n $customer_id = $order->getCustomerId();\n $db = Mage::getSingleton('core/resource')->getConnection('core_write');\n $sq = 'UPDATE calltab_customer SET last_purchase_date=:date WHERE customer_id=:customer_id LIMIT 1';\n $db->query($sq,array('customer_id'=>$customer_id,'date'=>$date));\n\n $call_id = Mage::getSingleton('admin/session')->getCalltabCallId();\n if ($call_id) {\n $sq = 'UPDATE calltab_customer SET last_sales_call_date=:date WHERE customer_id=:customer_id LIMIT 1';\n $db->query($sq,array('customer_id'=>$customer_id,'date'=>$date));\n\n $manager_id = (int)$this->getManagerId();\n\n $sq = 'UPDATE calls SET order_id=:order_id, manager_id=:manager_id WHERE call_id=:call_id LIMIT 1';\n $db->query($sq,array('call_id'=>$call_id,'order_id'=>$order->getId(),'manager_id'=>$manager_id));\n }\n\n return $this;\n }", "public function saveFailedOrder()\n {\n\t\t\n $this->validate();\n $isNewCustomer = false;\n switch ($this->getCheckoutMethod()) {\n case self::METHOD_GUEST:\n $this->_prepareGuestQuote();\n break;\n case self::METHOD_REGISTER:\n $this->_prepareNewCustomerQuote();\n $isNewCustomer = true;\n break;\n default:\n $this->_prepareCustomerQuote();\n break;\n }\n//die('order is available');\n $service = Mage::getModel('sales/service_quote', $this->getQuote());\n $service->submitAll();\n\n if ($isNewCustomer) {\n try {\n $this->_involveNewCustomer();\n } catch (Exception $e) {\n Mage::logException($e);\n }\n }\n\n $this->_checkoutSession->setLastQuoteId($this->getQuote()->getId())\n ->setLastSuccessQuoteId($this->getQuote()->getId())\n ->clearHelperData();\n\n $order = $service->getOrder();\n if ($order) {\n Mage::dispatchEvent('checkout_type_onepage_save_order_after',\n array('order'=>$order, 'quote'=>$this->getQuote()));\n\n /**\n * a flag to set that there will be redirect to third party after confirmation\n * eg: paypal standard ipn\n */\n $redirectUrl = $this->getQuote()->getPayment()->getOrderPlaceRedirectUrl();\n /**\n * we only want to send to customer about new order when there is no redirect to third party\n */\n if (!$redirectUrl && $order->getCanSendNewEmailFlag()) {\n try {\n //$order->sendNewOrderEmail();\n\t\t\t\t\t//return $this;\n\t\t\t\t\t\n } catch (Exception $e) {\n Mage::logException($e);\n }\n }\n\n // add order information to the session\n $this->_checkoutSession->setLastOrderId($order->getId())\n ->setRedirectUrl($redirectUrl)\n ->setLastRealOrderId($order->getIncrementId());\n\n // as well a billing agreement can be created\n $agreement = $order->getPayment()->getBillingAgreement();\n if ($agreement) {\n $this->_checkoutSession->setLastBillingAgreementId($agreement->getId());\n }\n }\n\n // add recurring profiles information to the session\n $profiles = $service->getRecurringPaymentProfiles();\n if ($profiles) {\n $ids = array();\n foreach ($profiles as $profile) {\n $ids[] = $profile->getId();\n }\n $this->_checkoutSession->setLastRecurringProfileIds($ids);\n // TODO: send recurring profile emails\n }\n\n Mage::dispatchEvent(\n 'checkout_submit_all_after',\n array('order' => $order, 'quote' => $this->getQuote(), 'recurring_profiles' => $profiles)\n );\n\n return $this;\n }", "public function paymentToQuotePayment(Mage_Sales_Model_Order_Payment $payment, $quotePayment=null)\n {\n $quotePayment = parent::paymentToQuotePayment($payment, $quotePayment);\n\n $quotePayment->setMagnimeiosEntidade($payment->getMagnimeiosEntidade())\n\t\t\t\t\t\t->setMagnimeiosReferencia($payment->getMagnimeiosReferencia())\n\t\t\t\t\t\t->setMagnimeiosMontante($payment->getMagnimeiosMontante()); \n\n return $quotePayment;\n }", "public function setPaymentInfoToQuote()\n {\n $expercashCode = Mage::getModel('expercash/expercashmpf')->getCode();\n $quote = Mage::getSingleton('checkout/session')->getQuote();\n\n if ($quote->isVirtual()) {\n $quote->getBillingAddress()->setPaymentMethod($expercashCode);\n } else {\n $quote->getShippingAddress()->setPaymentMethod($expercashCode);\n }\n\n // shipping totals may be affected by payment method\n if (!$quote->isVirtual() && $quote->getShippingAddress()) {\n $quote->getShippingAddress()->setCollectShippingRates(true);\n }\n\n $payment = $quote->getPayment();\n $payment->importData(array('method' => $expercashCode));\n $quote->save();\n }", "public function _build_CustomerInsertObject($customer=NULL, $order=NULL){\n\t\tif(isset($order)){\n\n\t\t\t//LOAD QUOTE BILLING ADDRESS AS PRIMARY ACCOUNT ID\n\t\t\t$primaryAddress = $order->getBillingAddress();\n\n\t\t\t//CHECK IF CUSTOMER NAME IS GUEST NULL IF SO USE BILLING NAME\n\t\t\tif($order->getCustomerFirstname() != NULL){\n\t\t\t\t//CHECK AND BUILD CUSTOMER NAME - MUST LESS THEN 30 CHARS\n\t\t\t\t$custname = $order->getCustomerFirstname().' '.$order->getCustomerLastname();\n\t\t\t\tif(strlen($custname) > 30){\n\t\t\t\t\t$custname = substr($custname, 0, 30);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t//LOAD BILLING NAME\n\t\t\t\t$custname = $primaryAddress->getFirstname().' '.$primaryAddress->getLastname();\n\t\t\t\tif(strlen($custname) > 30){\n\t\t\t\t\t$custname = substr($custname, 0, 30);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//FORMAT PRIMARY CUSTOMER ADDRESS LINE4-LINE5 BY COUNTRY RULES\n\t\t\tswitch($primaryAddress->getCountryId()){\n\t\t\t\tcase \"CA\":\n\t\t\t\t\t//MEASURE CITY CHARS\n\t\t\t\t\t$primaryAddressCharCount = strlen($primaryAddress->getCity());\n\t\t\t\t\t//CHECK IF COUNT IS GREATER OR EQUAL >= 27\n\t\t\t\t\tif($primaryAddressCharCount >= 27){\n\t\t\t\t\t\t$primaryAddress_city = substr($primaryAddress->getCity(), 0, 27);\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$primaryAddress_city = str_pad($primaryAddress->getCity(), 27);\n\t\t\t\t\t}\n\t\t\t\t\t$primaryAddress_stateLocation = $primaryAddress->getRegionCode();\n\t\t\t\t\t$primaryAddress_line4 = $primaryAddress_city.' '.$primaryAddress->getRegionCode();\n\t\t\t\t\t$primaryAddress_line5 = strtoupper($primaryAddress->getCountryModel()->getName()).' '.$primaryAddress->getPostcode();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"US\":\n\t\t\t\t\t$primaryAddress_stateLocation = $primaryAddress->getRegionCode();\n\t\t\t\t\t$primaryAddress_line4 = $primaryAddress->getCity();\n\t\t\t\t\t$primaryAddress_line5 = $primaryAddress->getRegionCode().', '.$primaryAddress->getPostcode();\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$primaryAddress_stateLocation = '';\n\t\t\t\t\t$primaryAddress_line4 = $primaryAddress->getCity().' '.($primaryAddress->getRegionCode() ?: $primaryAddress->getRegion());\n\t\t\t\t\t$primaryAddress_line5 = $primaryAddress->getPostcode();\n\t\t\t}\n\t\t\t\n\t\t\t//LOAD CURRENT STORE SAO CODE\n\t\t\t$store_sao = Mage::getStoreConfig('vistaprocessing_section/vistaprocessing_group/vistaprocessing_saocode', $order->getStoreId());\n\t\t\t\n\t\t\t$xml_data = '<CustApp>\n\t\t\t <Parameters Option=\"N\" Identifier=\"consumerweb\" PreAuth=\"Y\" DefaultMask=\"CA\" WebSiteId=\"'.$store_sao.'\"/>\n\t\t\t <Records>\n\t\t\t <Item>\n\t\t\t <IdentifierSection>\n\t\t\t <Identifier>consumerweb</Identifier>\n\t\t\t <Type/>\n\t\t\t <Suffix/>\n\t\t\t <MasterCust/>\n\t\t\t <Cust/>\n\t\t\t <AltAddressFile/>\n\t\t\t <MailCust/>\n\t\t\t <WebSiteId>'.$store_sao.'</WebSiteId>\n\t\t\t <DevToken/>\n\t\t\t </IdentifierSection>\n\t\t\t <Controls/>\n\t\t\t <Individuals>\n\t\t\t <Title/>\n\t\t\t <TitleCode/>\n\t\t\t <Initials/>\n\t\t\t <Forename/>\n\t\t\t <Surname/>\n\t\t\t <JobTitle/>\n\t\t\t <Email1><![CDATA['.$order->getCustomerEmail().']]></Email1>\n\t\t\t <Email2/>\n\t\t\t <Telephone1><![CDATA['.$primaryAddress->getTelephone().']]></Telephone1>\n\t\t\t <Telephone2/>\n\t\t\t <Telephone3/>\n\t\t\t <Fax1><![CDATA['.$primaryAddress->getFax().']]></Fax1>\n\t\t\t <AgreeToOffers/>\n\t\t\t </Individuals>\n\t\t\t <Company>\n\t\t\t <BusinessName/>\n\t\t\t </Company>\n\t\t\t <Address>\n\t\t\t <HouseName/>\n\t\t\t <HouseNumber/>\n\t\t\t <Street/>\n\t\t\t <Floor/>\n\t\t\t <LocalDistrict/>\n\t\t\t <County/>\n\t\t\t <Town/>\n\t\t\t <SpecialInfo>YYYY</SpecialInfo>\n\t\t\t <State><![CDATA['.$primaryAddress_stateLocation.']]></State>\n\t\t\t <PoBox/>\n\t\t\t <PostalCode><![CDATA['.$primaryAddress->getPostcode().']]></PostalCode>\n\t\t\t <CountryCode><![CDATA['.$primaryAddress->getCountryId().']]></CountryCode>\n\t\t\t <Country/>\n\t\t\t <Line1/>\n\t\t\t <Line2/>\n\t\t\t <Line3/>\n\t\t\t <Brick/>\n\t\t\t <AddressLevel>1</AddressLevel>\n\t\t\t </Address>\n\t\t\t <Additional/>\n\t\t\t <CusmasSection>\n\t\t\t <Name><![CDATA['.$custname.']]></Name>\n\t\t\t <AddressLine1><![CDATA['.$primaryAddress->getStreet1().']]></AddressLine1>\n\t\t\t <AddressLine2><![CDATA['.$primaryAddress->getStreet2().']]></AddressLine2>\n\t\t\t <AddressLine3><![CDATA['.$primaryAddress->getStreet3().']]></AddressLine3>\n\t\t\t <AddressLine4><![CDATA['.$primaryAddress_line4.']]></AddressLine4>\n\t\t\t <AddressLine5><![CDATA['.$primaryAddress_line5.']]></AddressLine5>\n\t\t\t <PostalCode><![CDATA['.$primaryAddress->getPostcode().']]></PostalCode>\n\t\t\t </CusmasSection>\n\t\t\t </Item>\n\t\t\t </Records>\n\t\t\t</CustApp>';\n\t\t\t$data = array('Input'=> (string) $xml_data);\n\t\t\treturn $data;\n\t\t}\n\t}", "public function handleBeforeSaveOrder(Event $event)\n {\n $orderModel = $event->params['order'];\n\n /** @var Commerce_OrderStatusModel $createdOrderStatus */\n $createdOrderStatus = craft()->commerce_orderStatuses->getOrderStatusByHandle('created');\n /** @var Commerce_OrderStatusModel $failedOrderStatus */\n $failedOrderStatus = craft()->commerce_orderStatuses->getOrderStatusByHandle('failed');\n\n $orderModelExists = $orderModel instanceof Commerce_OrderModel && $orderModel->isPaid();\n $createdOrderStatusExists = $createdOrderStatus instanceof Commerce_OrderStatusModel;\n $failedOrderStatusExists = $failedOrderStatus instanceof Commerce_OrderStatusModel;\n\n if ($orderModelExists && $createdOrderStatusExists && $failedOrderStatusExists) {\n /** @var Commerce_OrderModel $currentOrderModel */\n $currentOrderModel = craft()->commerce_orders->getOrderById($orderModel->id);\n\n $orderStatusEqual = $orderModel->orderStatusId === $currentOrderModel->orderStatusId;\n $currentOrderStatusNotFailed = $currentOrderModel->orderStatusId !== $failedOrderStatus->id;\n $orderStatusNotCreated = $orderModel->orderStatusId !== $createdOrderStatus->id;\n\n $statusNotCorrect = $orderStatusEqual || $currentOrderStatusNotFailed || $orderStatusNotCreated;\n\n if (is_null($currentOrderModel) || $statusNotCorrect) {\n return;\n }\n\n try {\n self::sendOrderCompleteMessage($orderModel);\n } catch (\\Exception $exception) {\n $event->performAction = false;\n }\n }\n }", "protected function createOrderFromQuote(string $reservedOrderId)\n {\n $quote = $this->getQuoteByReservedOrderId($reservedOrderId);\n if (!$quote instanceof \\Magento\\Quote\\Model\\Quote) {\n return;\n }\n\n //fix missing email validation\n if ($quote->getCustomerEmail() == null) {\n\n $quote->setCustomerEmail(\n $quote->getBillingAddress()->getEmail()\n );\n }\n\n $order = $this->createOrder($quote);\n\n //keep the quote active but remove the canceled order from it\n $quote->setIsActive(true);\n $quote->setOrigOrderId(null);\n $quote->setReservedOrderId(null);\n $quote->save();\n return $order;\n\n\n }", "private function send_products_to_quote(ck_quote $quote) {\n\t\tself::query_execute('INSERT INTO customer_quote_products (customer_quote_id, product_id, parent_products_id, option_type, price, quantity) SELECT :customer_quote_id, products_id, parent_products_id, option_type, IFNULL(quoted_price, unit_price), quantity FROM ck_cart_products WHERE cart_id = :cart_id', cardinality::NONE, [':customer_quote_id' => $quote->id(), ':cart_id' => $this->id()]);\n\t\tself::query_execute('DELETE FROM ck_cart_products WHERE cart_id = :cart_id', cardinality::NONE, [':cart_id' => $this->id()]);\n\t}", "public function setOrderField($x) { $this->orderField = $x; }" ]
[ "0.6169023", "0.6100622", "0.608849", "0.60269946", "0.5985621", "0.5929671", "0.5918604", "0.5904094", "0.58968985", "0.58486146", "0.583656", "0.57130754", "0.5705105", "0.5705062", "0.56935465", "0.56920373", "0.5682307", "0.5678824", "0.5667765", "0.56181437", "0.56068933", "0.55906594", "0.55809945", "0.5577708", "0.5552413", "0.5552041", "0.55418634", "0.5540358", "0.5526057", "0.54317105", "0.5431181", "0.5431181", "0.54154116", "0.5408483", "0.53997153", "0.5391408", "0.5391088", "0.5390089", "0.5389907", "0.5370085", "0.53682286", "0.5367316", "0.53340864", "0.53277546", "0.53277516", "0.532738", "0.5323737", "0.53172237", "0.5310011", "0.53058827", "0.5305506", "0.5297519", "0.5288855", "0.5286412", "0.528568", "0.5284232", "0.5276255", "0.527541", "0.52675635", "0.52624226", "0.52448106", "0.52378196", "0.5228576", "0.5227289", "0.522621", "0.52149534", "0.52138513", "0.52003795", "0.5188713", "0.51725465", "0.516154", "0.51479113", "0.51479113", "0.5146545", "0.5139408", "0.513761", "0.51324314", "0.5124099", "0.5120175", "0.51156336", "0.5114976", "0.51096654", "0.5092761", "0.50876564", "0.50853187", "0.5083991", "0.5082965", "0.5082735", "0.5081378", "0.5074878", "0.50713634", "0.5065208", "0.5064577", "0.506158", "0.505966", "0.5057244", "0.5053155", "0.5048878", "0.5040145", "0.5038718", "0.503745" ]
0.0
-1
Define the model's default state.
public function definition() { return [ 'military_rank' => $this->faker->numberBetween(1, 32), 'name' => $this->faker->firstName(), 'surname' => $this->faker->lastName(), 'patronymic' => $this->faker->name(), 'military_position' => $this->faker->jobTitle(), 'information_security' => $this->faker->boolean() ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getDefaultState()\r\n\t{\r\n\t}", "static function get_default_state();", "public function getDefaultUserState();", "private function setDefaultStates(): void\n {\n foreach ($this->arr_attributes as $strParamName) {\n $this->states[$strParamName] = $this->params->get($strParamName, 0);\n }\n }", "abstract protected function getDefaultModel();", "public function applyDefaultValues()\n {\n $this->is_active = false;\n $this->is_closed = false;\n }", "protected function getDefaultModelObject() : void\n {\n return;\n }", "public function applyDefaultValues()\n {\n $this->active = false;\n }", "public function set()\n {\n\t\tif ($this->model->state())\n $this->model->set();\n }", "protected function makeDefault()\n {\n $this->options = [];\n $this->menuSource = MenuSource::STATIC_SOURCE;\n $this->action = new Action(ActionType::MENU(), 'Default menu name', 'Default menu text');\n }", "public function __default()\n\t{\n\n\t}", "protected function initial_set_default() {\n\t\tif ( isset( $this->field[ 'config' ][ 'default' ] ) ) {\n\t\t\t$this->default = $this->field[ 'config' ][ 'default' ];\n\t\t} else {\n\t\t\t$this->default = '';\n\t\t}\n\t}", "public function applyDefaultValues()\n\t{\n\t\t$this->type = 1;\n\t\t$this->total_index = 0;\n\t\t$this->is_published = true;\n\t\t$this->is_featured = false;\n\t\t$this->comments_count = 0;\n\t}", "public function setModelDefaults() \n {\n if (!empty($this->model->defaultFieldValues())) {\n \n foreach($this->model->defaultFieldValues() as $field => $defaultValue) {\n\n $this->model->$field = $defaultValue;\n }\n } \n }", "function getDefaultState(){\r\n\t\t$this->db->select('*');\r\n\t\t$this->db->where(array('is_default'=>true));\r\n\t\t$recordSet = $this->db->get(TBL_MST_STATES);\r\n\t\t$data=$recordSet->result() ;\r\n\t\treturn $data[0]->id;\r\n\t}", "public function setValueDefault()\n {\n $this->isActive = true;\n $this->createdAt = new \\DateTime();\n }", "public function applyDefaultValues()\n {\n $this->deleted = false;\n $this->amount = 1;\n $this->amountevaluation = 0;\n $this->defaultstatus = 0;\n $this->defaultdirectiondate = 0;\n $this->defaultenddate = 0;\n $this->defaultpersoninevent = 0;\n $this->defaultpersonineditor = 0;\n $this->maxoccursinevent = 0;\n $this->showtime = false;\n $this->ispreferable = true;\n $this->isrequiredcoordination = false;\n $this->isrequiredtissue = false;\n $this->mnem = '';\n }", "public function default() {\n \n $this->data = ModuleConfig::settings();\n // [Module_Data]\n }", "public function getDefaultStateName() {\n return $this->values->get('DefaultStateName');\n }", "public static function bootStateMachine()\n {\n static::creating(function ($model) {\n $fieldState = $model->getFieldState();\n if (empty($model->$fieldState)) {\n $model->$fieldState = $model->getInitialState();\n }\n $model->beforeTransition($model->fromTransition, $model->toTransition);\n $model->setStateChangeAt();\n });\n static::created(function ($model) {\n $model->afterTransition($model->fromTransition, $model->toTransition);\n });\n static::saving(function ($model) {\n $model->beforeTransition($model->fromTransition, $model->toTransition);\n $model->setStateChangeAt();\n });\n static::saved(function ($model) {\n $model->afterTransition($model->fromTransition, $model->toTransition);\n });\n }", "public function getInitialState(): StateContract\n {\n return $this->newState(['value' => 1]);\n }", "function _setModelState()\r\n {\r\n $state = parent::_setModelState(); \r\n $app = JFactory::getApplication();\r\n $model = $this->getModel( $this->get('suffix') );\r\n $ns = $this->getNamespace();\r\n\r\n $state['filter_id_from'] = $app->getUserStateFromRequest($ns.'id_from', 'filter_id_from', '', '');\r\n $state['filter_id_to'] = $app->getUserStateFromRequest($ns.'id_to', 'filter_id_to', '', '');\r\n $state['filter_name'] = $app->getUserStateFromRequest($ns.'name', 'filter_name', '', '');\r\n $state['filter_enabled'] = $app->getUserStateFromRequest($ns.'enabled', 'filter_enabled', '', '');\r\n $state['filter_taxclass'] = $app->getUserStateFromRequest($ns.'taxclass', 'filter_taxclass', '', '');\r\n $state['filter_shippingtype'] = $app->getUserStateFromRequest($ns.'shippingtype', 'filter_shippingtype', '', '');\r\n \r\n foreach (@$state as $key=>$value)\r\n {\r\n $model->setState( $key, $value ); \r\n }\r\n return $state;\r\n }", "public function state();", "public function setUserDefaultStatus($userDefaultStatus);", "public function setStateModel($stateModel) {}", "public function getBaseState() {}", "public function init()\r\n {\r\n $this->_helper->db->setDefaultModelName('DefaultMetadataValue');\r\n }", "public function set_to_default()\n\t{\n\t\t// SimpleDB requires a value for every attribue...\n\t\t$this->_name = NULL;\n\t\t$this->_contextid = NULL;\n\t\t$this->_userid = NULL;\n $this->_deleted = 0;\n\t\t$this->_lastmodified = 0;\t\n\t}", "public function create_default() {\n if (!$this->model->has_default()) {\n $default_data = [\n 'id' => 1,\n 'name' => 'Beregu',\n 'desc' => 'team vs team',\n ];\n $this->model->create_default($default_data);\n\n $default_data = [\n 'id' => 2,\n 'name' => 'Individu',\n 'desc' => 'individu vs individu',\n ];\n $this->model->create_default($default_data);\n }\n }", "public function __construct(State $model)\n\t{\n\t\t$this->model = $model;\n\t}", "public function getStateModel() {}", "public function set_default_data() {\n\t\t$this->button_text_color = '#FFFFFF';\n\t\t$this->button_background_color = '#6699CC';\n\n\t\t$this->header_text_color = '#FFFFFF';\n\t\t$this->header_background_color = '#6699CC';\n\n\t\t$this->button_text = 'Do Not Sell My Data';\n\n\t\t$this->publish_status = 'Draft';\n\t\t$this->last_published = '';\n\n\t\t$this->ot_logo = '';\n\t\t$this->display_position = 'right';\n\t\t$this->floating_button\t= '';\n\t\t$this->isLinkEnabled \t= 'textlink';\n\t}", "public function applyDefaultValues()\n\t{\n\t\t$this->points = '0';\n\t\t$this->type = 0;\n\t\t$this->hidden = 0;\n\t\t$this->relationship_status = 0;\n\t\t$this->show_email = 1;\n\t\t$this->show_gender = 1;\n\t\t$this->show_hometown = 1;\n\t\t$this->show_home_phone = 1;\n\t\t$this->show_mobile_phone = 1;\n\t\t$this->show_birthdate = 1;\n\t\t$this->show_address = 1;\n\t\t$this->show_relationship_status = 1;\n\t\t$this->credit = 0;\n\t\t$this->login = 0;\n\t}", "public function initializeDefaults()\n {\n }", "public function applyDefaultValues()\n\t{\n\t\t$this->ativo = true;\n\t\t$this->tipo_acesso = 'M';\n\t\t$this->estado_civil = 'O';\n\t\t$this->nivel_acesso = '1';\n\t\t$this->usuario_validado = false;\n\t}", "public function setDefaultAttribute($value){\n $this->attributes['default'] = ($value === 'true' || $value ? true : false);\n}", "private function _set_default()\r\n\t{\r\n\t\tif($this->input->post('default'))\r\n\t\t{\r\n\t\t\t$this->db->update('showcases',array('default' => 0));\r\n\t\t\t$this->db->where('id', $this->input->post('default'));\r\n\t\t\t$this->db->update('showcases',array('default' => 1));\r\n\t\t\t\r\n\t\t\t$this->set_message('success', 'Vetrina predefinita aggiornata con successo!');\r\n\t\t\tredirect($this->list);\r\n\t\t}\r\n\t}", "public function applyDefaultValues()\n {\n $this->is_not = false;\n $this->rank = 0;\n }", "public function __default()\r\n \t{\r\n \t if( self::isArg( 'notifwindow') )\r\n \t {\r\n $this->view = \"common_notifwindow\";\r\n \t $this->viewArgs['table'] = self::getArg( \"table\", AT_posint, true );\r\n \t }\r\n \t else\r\n \t {\r\n $this->view = \"dummygame_dummygame\";\r\n self::trace( \"Complete reinitialization of board game\" );\r\n }\r\n \t}", "private function _load_default_model(){\n\n\t\t$default_model_name = strtolower(get_class($this)) . '_model';\n\n\t\tif(file_exists(APPPATH . 'models/' . $default_model_name . '.php')){\n\n\t\t\t$this->load->model($default_model_name, strtolower(get_class($this)));\n\t\t\t$this->_default_model = strtolower(get_class($this));\n\t\t}\n\n\t}", "public function model()\n {\n return State::class;\n }", "public function model()\n {\n return State::class;\n }", "public function getDefault();", "public function setDefaultValues()\n\t{\t\t\n\t\t\t \n\t}", "protected function initialiseModel()\n {\n parent::initialiseModel();\n\n $this->SelectedTab = 0;\n }", "final protected function _defaults(){\n if(! $this->_defaults) return;\n foreach($this->_defaults as $conf => $default_value){\n if(! self::inform($conf)) self::define($conf, $default_value);\n }\n }", "public function useDefaults()\n\t{\n\t\t$this->use_defaults = true;\n\t}", "public function set_behaviors_default_data() {\n\n\t\t$this->is_google_personalize_enabled = 'checked';\n\t\t$this->google_confirmation_title = 'Personalized advertisements';\n\t\t$this->google_confirmation_message = 'Turning this off will opt you out of personalized advertisements delivered from Google on this website.';\n\t\t$this->confirmbutton = 'Confirm';\n\t\t$this->is_email_enabled = 'checked';\n\t\t$this->email_address = '';\n\t\t$this->popup_main_title = 'Do Not Sell My Personal Information';\n\t\t$this->link_text = 'Privacy Policy';\n\t\t$this->link_url = '';\n\t\t$this->privacy_policy_message = 'Exercise your consumer rights by contacting us below';\n\t\t$this->is_phone_enabled = 'checked';\n\t\t$this->phone_number = '';\n\t\t$this->form_link_text = 'Exercise Your Rights';\n\t\t$this->form_link_url = '';\n\t\t$this->form_enable = 'checked';\n\t\t$this->publish_status = 'Draft';\n\t\t$this->last_published = '';\n\t\t$this->selectuseroption\t\t\t\t = 'All';\n\t\t$this->isIABEnabled \t\t\t\t = 'checked';\n\t\t$this->isLSPAenable \t\t\t\t = '';\n\t}", "public function makeDefault() {\n $this->update([\n 'color' => null,\n 'size' => null\n ]);\n }", "public function applyDefaultData()\n {\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance();\n $config = $objectManager->get('\\Magento\\Framework\\App\\Config\\ScopeConfigInterface');\n\n $this->setsup_is_active(1);\n $this->setsup_locale($config->getValue('general/locale/code'));\n $this->setsup_currency($config->getValue('currency/options/base'));\n $this->setsup_country($config->getValue('general/country/default'));\n\n return $this;\n }", "protected function setDefaultValues()\n {\n parent::setDefaultValues();\n\t}", "public function setDefaultStateName($stateName) {\n $this->values->put('DefaultStateName', $stateName);\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function applyDefaultValues()\n {\n $this->jml_lantai = '1';\n $this->asal_data = '1';\n $this->last_sync = '1901-01-01 00:00:00';\n }", "function init() {\n $this->options['selected'] = isset($this->options['value']) ?\n true : @(bool)$this->options['default'];\n }", "public function __construct()\n {\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n $this->applyDefaultValues();\n }", "public function init() {\n\t\t// use this method to initialize default values.\n\t}", "public function applyDefaultValues()\n\t{\n\t}", "public function applyDefaultValues()\n\t{\n\t}", "public function applyDefaultValues()\n\t{\n\t}", "protected function cliModelInit()\n {\n }", "function getDefaultValue() \n {\n return $this->getValueByFieldName( 'statevar_default' );\n }", "public function __default()\r\n {\r\n if( self::isArg( 'notifwindow') ) {\r\n $this->view = \"common_notifwindow\";\r\n $this->viewArgs['table'] = self::getArg( \"table\", AT_posint, true );\r\n } else {\r\n $this->view = \"thecrew_thecrew\";\r\n self::trace( \"Complete reinitialization of board game\" );\r\n }\r\n }", "public function toggleDefault()\n {\n $this->language->default = ! $this->language->default;\n }", "public static function set_default_values() {\n\t\t?>\n\t\tcase \"nu_phone\" :\n\t\t\tfield.label = \"Phone\";\n\t\t\tfield.isRequired = true;\n\t\t\tfield.description = \"Numbers only. e.g. 8885551212\";\n\t\t\tbreak;\n\t\t<?php\n\t}", "function post_model_init($from_cache = FALSE)\n {\n }", "public static function preModel(){\n\t\t\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "protected function get_default() {\n\t\treturn false;\n\t}", "protected function setDefaultTemplate(): void\n {\n $this->setDefaultData(function(Generator $faker) {\n return [\n 'password' => 'xx',\n 'username' => $faker->email,\n 'modified' => time(),\n // set the model's default values\n // For example:\n // 'name' => $faker->lastName\n ];\n });\n }", "public function __default()\r\n {\r\n if (self::isArg('notifwindow')) {\r\n $this->view = \"common_notifwindow\";\r\n $this->viewArgs['table'] = self::getArg(\"table\", AT_posint, true);\r\n } else {\r\n $this->view = \"lettertycoon_lettertycoon\";\r\n self::trace(\"Complete reinitialization of board game\");\r\n }\r\n }", "function setDefault($value)\n {\n $this->_defValue = $value;\n }", "protected function setDefaults()\n {\n return;\n }", "public function getStatesModel()\n\t{\n\t\treturn $this->statesModel = new StatesModel();\n\t}", "public function defaultData();", "public function getDefaultValue();", "public function getDefaultValue();", "public function applyDefaultValues()\n\t{\n\t\t$this->closed = 0;\n\t\t$this->lastfmid = 0;\n\t\t$this->hasphotos = 0;\n\t}", "public function applyDefaultValues()\n\t{\n\t\t$this->platform = 'pc';\n\t\t$this->experience_score = 0;\n\t\t$this->up_votes = 0;\n\t\t$this->down_votes = 0;\n\t\t$this->is_guest = 0;\n\t\t$this->is_admin = 0;\n\t\t$this->today_votes = 0;\n\t\t$this->email_on = 1;\n\t}", "private function getStateDefaultStatus($state)\n {\n\t\tif(\\Cart2Quote\\License\\Model\\License::getInstance()->isValid()) {\n\t\t\t$status = false;\n $stateNode = $this->_getState($state);\n if ($stateNode) {\n $status = $this->quoteStatusFactory->create()->loadDefaultByState($state);\n $status = $status->getStatus();\n }\n return $status;\n\t\t}\n\t}" ]
[ "0.7775155", "0.72243404", "0.6856852", "0.6793161", "0.67665094", "0.64318955", "0.64076173", "0.6369685", "0.6188302", "0.6186626", "0.6157444", "0.6152224", "0.6150927", "0.6142754", "0.6116051", "0.6107094", "0.6103933", "0.60380876", "0.6038064", "0.602087", "0.5986544", "0.5986501", "0.5977181", "0.59646875", "0.5948185", "0.59015226", "0.58822733", "0.5877325", "0.587206", "0.58505183", "0.58423483", "0.584029", "0.58312154", "0.5823643", "0.58233327", "0.5805213", "0.5804728", "0.5802704", "0.5801708", "0.57664376", "0.57436", "0.57436", "0.5740601", "0.57269084", "0.5712851", "0.56908965", "0.56722194", "0.5668737", "0.5662985", "0.56602174", "0.5659133", "0.5648125", "0.5636605", "0.5636605", "0.5636605", "0.5636605", "0.5636605", "0.5636605", "0.5636605", "0.5636605", "0.5636605", "0.5633601", "0.56332195", "0.5625382", "0.5625382", "0.5625382", "0.5625382", "0.5625382", "0.561795", "0.5615371", "0.5615371", "0.5615371", "0.5600156", "0.5593924", "0.5587617", "0.55700624", "0.55687076", "0.5564272", "0.5556767", "0.55443424", "0.55443424", "0.55443424", "0.55443424", "0.55443424", "0.55443424", "0.55443424", "0.55443424", "0.55443424", "0.55443424", "0.55292463", "0.55282176", "0.5526539", "0.5526303", "0.5511692", "0.55094844", "0.5508853", "0.5507107", "0.5507107", "0.5505431", "0.5503937", "0.54842955" ]
0.0
-1
Shortcode output => Get template file and display shortcode.
public function output( $atts, $content = null ) { ob_start(); do_action( 'vcex_shortcode_before', 'vcex_teaser', $atts ); include( vcex_get_shortcode_template( 'vcex_teaser' ) ); do_action( 'vcex_shortcode_after', 'vcex_teaser', $atts ); return ob_get_clean(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add_shortcode_content(){\n\n //turn on output buffering to capture script output\n ob_start();\n\n $this->enqueue_frontend();\n $this->timepicker_style();\n\n //include the specified file\n require_once(\"$this->plugin_path/page-templates/questionnaire-template.php\");\n\n //assign the file output to $content variable and clean buffer\n $content = ob_get_clean();\n //return the $content\n //return is important for the output to appear at the correct position\n return $content; \n }", "public function shortcode_template() {\n\t\treturn 'templates/shortcodes/projects.php';\n\t}", "function render_sc_myShortcode( $context ) {\n\tob_start();\n\t?>\n<div>Some: <?=$context['disp1']?></div>\n<div>Another: <?=$context['disp2']?></div>\n<?php\n\treturn ob_get_clean();\n}", "function handle_shortcode( ) {\n\n\tenqueue_files();\n\n\treturn get_location_content( );\n\n}", "protected function output() {\n\t\t$content = $this->option( 'content' );\n\t\t$content_path = $this->option( 'content_path' );\n\t\t$mmarkdown = $this->option( 'markdown' );\n\n\t\tif ( ! empty( $content_path ) && file_exists( $content_path ) ) {\n\t\t\twponion_catch_output();\n\t\t\tinclude $content_path;\n\t\t\t$content = wponion_catch_output( false );\n\t\t} elseif ( ! empty( $content ) && wponion_is_callable( $content ) ) {\n\t\t\twponion_catch_output();\n\t\t\techo wponion_callback( $content );\n\t\t\t$content = wponion_catch_output( false );\n\t\t}\n\n\t\tif ( true === $mmarkdown && ! empty( $content ) ) {\n\t\t\t$content = '<div class=\"wponion-markdown-output\">' . wponion_markdown( $content ) . '</div>';\n\t\t}\n\t\treturn $this->before() . do_shortcode( $content ) . $this->after();\n\t}", "public function load_template_callback() {\n\n // Make sure a template was submitted\n if ( ! isset($_POST['template']) ) {\n return;\n }\n // grabe the template being rendered\n $template = $_POST['template'];\n\n // Activate builder callbacks for the shortcodes\n $this->activate_builder_callbacks();\n\n // Remove inactive shortcodes\n $template = cv_strip_inactive_plugin_shortcodes( $template );\n\n // Display the rendered shortcodes\n echo do_shortcode( stripslashes( $template ) );\n\n die();\n\n }", "public function print_shortcodes_templates() {\n\n\t\tif ( did_action( 'toolset_action_require_shortcodes_templates_done' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t?>\n\t\t<script type=\"text/html\" id=\"tmpl-toolset-shortcode-gui\">\n\t\t\t<input value=\"{{{data.shortcode}}}\" class=\"toolset-shortcode-gui-shortcode-handle js-toolset-shortcode-gui-shortcode-handle\" type=\"hidden\" />\n\t\t\t<# if ( _.has( data, 'parameters' ) ) {\n\t\t\t\t_.each( data.parameters, function( parameterValue, parameterKey ) {\n\t\t\t\t\t#>\n\t\t\t\t\t<span class=\"toolset-shortcode-gui-attribute-wrapper js-toolset-shortcode-gui-attribute-wrapper js-toolset-shortcode-gui-attribute-wrapper-for-{{{parameterKey}}}\" data-attribute=\"{{{parameterKey}}}\" data-type=\"parameter\">\n\t\t\t\t\t\t<input type=\"hidden\" name=\"{{{parameterKey}}}\" value=\"{{{parameterValue}}}\" disabled=\"disabled\" />\n\t\t\t\t\t</span>\n\t\t\t\t\t<#\n\t\t\t\t});\n\t\t\t} #>\n\t\t\t<div id=\"js-toolset-shortcode-gui-dialog-tabs\" class=\"toolset-shortcode-gui-tabs js-toolset-shortcode-gui-tabs\">\n\t\t\t<# if ( _.size( data.attributes ) > 1 ) { #>\n\t\t\t\t<ul class=\"js-toolset-shortcode-gui-tabs-list\">\n\t\t\t\t\t<# _.each( data.attributes, function( attributesGroup, groupKey ) { #>\n\t\t\t\t\t\t<# if (\n\t\t\t\t\t\t\t_.has( attributesGroup, 'fields' )\n\t\t\t\t\t\t\t&& _.size( attributesGroup.fields ) > 0\n\t\t\t\t\t\t) { #>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<a href=\"#{{{data.shortcode}}}-{{{groupKey}}}\">{{{attributesGroup.header}}}</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<# } #>\n\t\t\t\t\t<# }); #>\n\t\t\t\t</ul>\n\t\t\t<# } #>\n\t\t\t\t<# _.each( data.attributes, function( attributesGroup, groupKey ) { #>\n\t\t\t\t\t<# if (\n\t\t\t\t\t\t_.has( attributesGroup, 'fields' )\n\t\t\t\t\t\t&& _.size( attributesGroup.fields ) > 0\n\t\t\t\t\t) { #>\n\t\t\t\t\t<div id=\"{{{data.shortcode}}}-{{{groupKey}}}\">\n\t\t\t\t\t\t<h2>{{{attributesGroup.header}}}</h2>\n\t\t\t\t\t\t<# _.each( attributesGroup.fields, function( attributeData, attributeKey ) {\n\t\t\t\t\t\t\tif ( _.has( data.templates, 'attributeWrapper' ) ) {\n\t\t\t\t\t\t\t\tattributeData = _.extend( { shortcode: data.shortcode, attribute: attributeKey, templates: data.templates }, attributeData );\n\t\t\t\t\t\t\t\tif ( 'group' == attributeData.type ) {\n\t\t\t\t\t\t\t\t\tprint( data.templates.attributeGroupWrapper( attributeData ) );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tprint( data.templates.attributeWrapper( attributeData ) );\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</div>\n\t\t\t\t\t<# } #>\n\t\t\t\t<# }); #>\n\t\t\t</div>\n\t\t\t<div class=\"toolset-shortcode-gui-messages js-toolset-shortcode-gui-messages\"></div>\n\t\t</script>\n\t\t<script type=\"text/html\" id=\"tmpl-toolset-shortcode-attribute-wrapper\">\n\t\t\t<#\n\t\t\t\tdata = _.defaults( data, { defaultValue: '', required: false, hidden: false, placeholder: '' } );\n\t\t\t\tdata = _.defaults( data, { defaultForceValue: data.defaultValue } );\n\t\t\t#>\n\t\t\t<div class=\"toolset-shortcode-gui-attribute-wrapper js-toolset-shortcode-gui-attribute-wrapper js-toolset-shortcode-gui-attribute-wrapper-for-{{{data.attribute}}}\" data-attribute=\"{{{data.attribute}}}\" data-type=\"{{{data.type}}}\" data-default=\"{{{data.defaultValue}}}\"<# if ( data.hidden ) { #> style=\"display:none\"<# } #>>\n\t\t\t\t<# if ( _.has( data, 'label' ) ) { #>\n\t\t\t\t\t<h3>{{{data.label}}}</h3>\n\t\t\t\t<# } #>\n\t\t\t\t<# if ( _.has( data, 'pseudolabel' ) ) { #>\n\t\t\t\t\t<strong>{{{data.pseudolabel}}}</strong>\n\t\t\t\t<# } #>\n\t\t\t\t<# if (\n\t\t\t\t\t_.has( data.templates, 'attributes' )\n\t\t\t\t\t&& _.has( data.templates.attributes, data.type )\n\t\t\t\t) {\n\t\t\t\t\tprint( data.templates.attributes[ data.type ]( data ) );\n\t\t\t\t} #>\n\t\t\t\t<# if ( _.has( data, 'description' ) ) { #>\n\t\t\t\t\t<p class=\"description\">{{{data.description}}}</p>\n\t\t\t\t<# } #>\n\t\t\t</div>\n\t\t</script>\n\t\t<script type=\"text/html\" id=\"tmpl-toolset-shortcode-attribute-group-wrapper\">\n\t\t\t<div class=\"toolset-shortcode-gui-attribute-group js-toolset-shortcode-gui-attribute-group js-toolset-shortcode-gui-attribute-group-for-{{{data.attribute}}}\" data-type=\"group\" data-group=\"{{{data.attribute}}}\"<# if ( data.hidden ) { #> style=\"display:none\"<# } #>>\n\t\t\t\t<# if ( _.has( data, 'label' ) ) { #>\n\t\t\t\t\t<h3>{{{data.label}}}</h3>\n\t\t\t\t<# } #>\n\t\t\t\t<#\n\t\t\t\tvar columns = _.size( data.fields ),\n\t\t\t\t\tcolumnsWidth = parseInt( 100 / columns );\n\t\t\t\t#>\n\t\t\t\t<ul class=\"toolset-shortcode-gui-dialog-item-group js-toolset-shortcode-gui-dialog-item-group\">\n\t\t\t\t\t<# _.each( data.fields, function( fieldData, fieldAttribute ) { #>\n\t\t\t\t\t\t<li style=\"width:<# print( columnsWidth ); #>%;min-height:1px;float:left;\">\n\t\t\t\t\t\t\t<#\n\t\t\t\t\t\t\tfieldData = _.defaults( fieldData, { shortcode: data.shortcode, templates: data.templates } );\n\t\t\t\t\t\t\tfieldData = _.defaults( fieldData, { defaultValue: '', required: false, hidden: false, placeholder: '' } );\n\t\t\t\t\t\t\tfieldData = _.defaults( fieldData, { defaultForceValue: fieldData.defaultValue } );\n\t\t\t\t\t\t\tfieldData.attribute = fieldAttribute;\n\t\t\t\t\t\t\tprint( data.templates.attributeWrapper( fieldData ) );\n\t\t\t\t\t\t\t#>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t<# }); #>\n\t\t\t\t</ul>\n\t\t\t\t<# if ( _.has( data, 'description' ) ) { #>\n\t\t\t\t\t<p class=\"description\">{{{data.description}}}</p>\n\t\t\t\t<# } #>\n\t\t\t</div>\n\t\t</script>\n\t\t<script type=\"text/html\" id=\"tmpl-toolset-shortcode-attribute-information\">\n\t\t\t<div id=\"{{{data.shortcode}}}-{{{data.attribute}}}\" class=\"toolset-alert toolset-alert-info\">\n\t\t\t\t{{{data.content}}}\n\t\t\t</div>\n\t\t</script>\n\t\t<script type=\"text/html\" id=\"tmpl-toolset-shortcode-attribute-text\">\n\t\t\t<input id=\"{{{data.shortcode}}}-{{{data.attribute}}}\" data-type=\"text\" class=\"js-shortcode-gui-field large-text<# if ( data.required ) { #> js-toolset-shortcode-gui-required<# } #>\" value=\"{{{data.defaultForceValue}}}\" placeholder=\"{{{data.placeholder}}}\" type=\"text\">\n\t\t</script>\n\t\t<script type=\"text/html\" id=\"tmpl-toolset-shortcode-attribute-radio\">\n\t\t\t<ul id=\"{{{data.shortcode}}}-{{{data.attribute}}}\">\n\t\t\t\t<# _.each( data.options, function( optionLabel, optionKey ) { #>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t<input name=\"{{{data.shortcode}}}-{{{data.attribute}}}\" value=\"{{{optionKey}}}\" class=\"js-shortcode-gui-field\" type=\"radio\"<# if ( optionKey == data.defaultForceValue ) { #> checked=\"checked\"<# } #>>\n\t\t\t\t\t\t\t{{{optionLabel}}}\n\t\t\t\t\t\t</label>\n\t\t\t\t\t</li>\n\t\t\t\t<# }); #>\n\t\t\t</ul>\n\t\t</script>\n\t\t<script type=\"text/html\" id=\"tmpl-toolset-shortcode-attribute-select\">\n\t\t\t<select id=\"{{{data.shortcode}}}-{{{data.attribute}}}\" class=\"js-shortcode-gui-field<# if ( data.required ) { #> js-toolset-shortcode-gui-required<# } #>\">\n\t\t\t\t<# _.each( data.options, function( optionLabel, optionKey ) { #>\n\t\t\t\t\t<option value=\"{{{optionKey}}}\"<# if ( optionKey == data.defaultForceValue ) { #> selected=\"selected\"<# } #>>\n\t\t\t\t\t\t{{{optionLabel}}}\n\t\t\t\t\t</option>\n\t\t\t\t<# }); #>\n\t\t\t</select>\n\t\t</script>\n\t\t<script type=\"text/html\" id=\"tmpl-toolset-shortcode-attribute-select2\">\n\t\t\t<select id=\"{{{data.shortcode}}}-{{{data.attribute}}}\" class=\"js-shortcode-gui-field js-toolset-shortcode-gui-field-select2<# if ( data.required ) { #> js-toolset-shortcode-gui-required<# } #>\">\n\t\t\t\t<#\n\t\t\t\tif ( _.has( data, 'options' ) ) {\n\t\t\t\t\t_.each( data.options, function( optionLabel, optionKey ) {\n\t\t\t\t\t#>\n\t\t\t\t\t<option value=\"{{{optionKey}}}\"<# if ( optionKey == data.defaultForceValue ) { #> selected=\"selected\"<# } #>>\n\t\t\t\t\t\t{{{optionLabel}}}\n\t\t\t\t\t</option>\n\t\t\t\t\t<#\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\t#>\n\t\t\t</select>\n\t\t</script>\n\t\t<script type=\"text/html\" id=\"tmpl-toolset-shortcode-attribute-ajaxSelect2\">\n\t\t\t<select\n\t\t\t\tid=\"{{{data.shortcode}}}-{{{data.attribute}}}\"\n\t\t\t\tclass=\"js-shortcode-gui-field js-toolset-shortcode-gui-field-ajax-select2<# if ( data.required ) { #> js-toolset-shortcode-gui-required<# } #>\"\n\t\t\t\tdata-action=\"{{{data.action}}}\"\n\t\t\t\tdata-nonce=\"{{{data.nonce}}}\"\n\t\t\t\tdata-placeholder=\"{{{data.placeholder}}}\"\n\t\t\t\t>\n\t\t\t</select>\n\t\t</script>\n\n\t\t<script type=\"text/html\" id=\"tmpl-toolset-shortcode-content\">\n\t\t\t<#\n\t\t\t\tdata = _.defaults( data, { defaultValue: '', required: false, hidden: false, placeholder: '' } );\n\t\t\t\tdata = _.defaults( data, { defaultForceValue: data.defaultValue } );\n\t\t\t#>\n\t\t\t<div class=\"toolset-shortcode-gui-attribute-wrapper js-toolset-shortcode-gui-content-wrapper\" <# if ( data.hidden ) { #> style=\"display:none\"<# } #>>\n\t\t\t\t<textarea id=\"toolset-shortcode-gui-content-{{{data.shortcode}}}\" type=\"text\" class=\"large-text js-toolset-shortcode-gui-content\">{{{data.defaultValue}}}</textarea>\n\t\t\t\t<# if ( _.has( data, 'description' ) ) { #>\n\t\t\t\t\t<p class=\"description\">{{{data.description}}}</p>\n\t\t\t\t<# } #>\n\t\t\t</div>\n\t\t</script>\n\n\t\t<?php $toolset_ajax = Toolset_Ajax::get_instance(); ?>\n\n\t\t<script type=\"text/html\" id=\"tmpl-toolset-shortcode-attribute-postSelector\">\n\t\t\t<ul id=\"{{{data.shortcode}}}-{{{data.attribute}}}\">\n\t\t\t\t<li class=\"toolset-shortcode-gui-item-selector-option\">\n\t\t\t\t\t<label for=\"toolset-shortcode-gui-item-selector-post-id-current\">\n\t\t\t\t\t\t<input type=\"radio\" class=\"js-toolset-shortcode-gui-item-selector\" id=\"toolset-shortcode-gui-item-selector-post-id-current\" name=\"toolset_shortcode_gui_object_id\" value=\"current\" checked=\"checked\" />\n\t\t\t\t\t\t<?php _e( 'The current post being displayed either directly or in a View loop', 'wpv-views' ); ?>\n\t\t\t\t\t</label>\n\t\t\t\t</li>\n\n\t\t\t<?php\n\n\t\t\tglobal $pagenow, $post;\n\t\t\t$current_post_type = null;\n\t\t\tif (\n\t\t\t\tin_array( $pagenow, array( 'post.php' ) )\n\t\t\t\t&& isset( $_GET[\"post\"] )\n\t\t\t) {\n\t\t\t\t$current_post_id = (int) $_GET[\"post\"];\n\t\t\t\t$current_post_type_slug = get_post_type( $current_post_id );\n\t\t\t\t$current_post_type = get_post_type_object( $current_post_type_slug );\n\t\t\t} elseif (\n\t\t\t\tisset( $post )\n\t\t\t\t&& ( $post instanceof WP_Post )\n\t\t\t\t&& ( ! in_array( $post->post_type, array( 'view', 'view-template', 'cred-form', 'cred-user-form', 'dd_layouts' ) ) )\n\t\t\t) {\n\t\t\t\t$current_post_type = get_post_type_object( $post->post_type );\n\t\t\t}\n\t\t\t\n\t\t\t// Current top page when displaying a View loop\n\t\t\tif (\n\t\t\t\tin_array( $pagenow, array( 'admin.php' ) )\n\t\t\t\t&& 'views-editor' === toolset_getget( 'page' )\n\t\t\t) {\n\t\t\t\t?>\n\t\t\t\t<li class=\"toolset-shortcode-gui-item-selector-option\">\n\t\t\t\t\t<label for=\"toolset-shortcode-gui-item-selector-post-id-current_page\">\n\t\t\t\t\t\t<input type=\"radio\" class=\"js-toolset-shortcode-gui-item-selector\" id=\"toolset-shortcode-gui-item-selector-post-id-current_page\" name=\"toolset_shortcode_gui_object_id\" value=\"$current_page\" />\n\t\t\t\t\t\t<?php echo __( 'The page where this View is shown', 'wpv-views' ); ?>\n\t\t\t\t\t</label>\n\t\t\t\t</li>\n\t\t\t\t<?php\n\t\t\t}\n\n\t\t\t// Poost hierarchical relations\n\t\t\tif (\n\t\t\t\tis_null( $current_post_type )\n\t\t\t\t|| (\n\t\t\t\t\tis_object( $current_post_type )\n\t\t\t\t\t&& isset( $current_post_type->hierarchical )\n\t\t\t\t\t&& $current_post_type->hierarchical\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t?>\n\t\t\t\t<li class=\"toolset-shortcode-gui-item-selector-option\">\n\t\t\t\t\t<label for=\"toolset-shortcode-gui-item-selector-post-id-parent\">\n\t\t\t\t\t\t<input type=\"radio\" class=\"js-toolset-shortcode-gui-item-selector\" id=\"toolset-shortcode-gui-item-selector-post-id-parent\" name=\"toolset_shortcode_gui_object_id\" value=\"$parent\" />\n\t\t\t\t\t\t<?php echo __( 'The parent of the current post in the same post type, set by WordPress hierarchical relationship', 'wpv-views' ); ?>\n\t\t\t\t\t</label>\n\t\t\t\t</li>\n\t\t\t\t<?php\n\t\t\t}\n\n\n\t\t\t// Types relations\n\t\t\tif ( ! apply_filters( 'toolset_is_m2m_enabled', false ) ) {\n\t\t\t\t// Legacy relationships\n\t\t\t\t$current_post_type_parents = $this->get_legacy_current_post_type_relationships( $current_post_type );\n\t\t\t\t$custom_post_types_relations = get_option( 'wpcf-custom-types', array() );\n\n\t\t\t\tif ( ! empty( $current_post_type_parents ) ) {\n\t\t\t\t\t?>\n\t\t\t\t\t<li class=\"toolset-shortcode-gui-item-selector-option toolset-shortcode-gui-item-selector-has-related js-toolset-shortcode-gui-item-selector-has-related\">\n\t\t\t\t\t\t<label for=\"toolset-shortcode-gui-item-selector-post-id-related\">\n\t\t\t\t\t\t\t<input type=\"radio\" class=\"js-toolset-shortcode-gui-item-selector\" id=\"toolset-shortcode-gui-item-selector-post-id-related\" name=\"toolset_shortcode_gui_object_id\" value=\"related\" />\n\t\t\t\t\t\t\t<?php echo __( 'The parent of the current post in another post type, set by a Types relationship', 'wpv-views' ); ?>\n\t\t\t\t\t\t</label>\n\t\t\t\t\t\t<div class=\"toolset-shortcode-gui-item-selector-is-related js-toolset-shortcode-gui-item-selector-is-related\" style=\"display:none\">\n\t\t\t\t\t\t\t<ul class=\"toolset-advanced-setting tolset-mightlong-list\" style=\"padding-top:15px;margin:5px 0 10px;\">\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t$first = true;\n\t\t\t\t\t\t\tforeach ( $current_post_type_parents as $slug ) {\n\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t<?php echo sprintf( '<label for=\"toolset-shortcode-gui-item-selector-post-relationship-id-%s\">', $slug ); ?>\n\t\t\t\t\t\t\t\t\t<?php echo sprintf(\n\t\t\t\t\t\t\t\t\t\t'<input type=\"radio\" name=\"related_object\" id=\"toolset-shortcode-gui-item-selector-post-relationship-id-%s\" value=\"$%s\" %s />',\n\t\t\t\t\t\t\t\t\t\tesc_attr( $slug ),\n\t\t\t\t\t\t\t\t\t\tesc_attr( $slug ),\n\t\t\t\t\t\t\t\t\t\tchecked( $first, true, false )\n\t\t\t\t\t\t\t\t\t); ?>\n\t\t\t\t\t\t\t\t\t<?php echo esc_html( $custom_post_types_relations[ $slug ]['labels']['singular_name'] ); ?>\n\t\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t$first = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</li>\n\t\t\t\t\t<?php\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\t// m2m relationships\n\t\t\t\t// Make sure m2m classes are registered in the autoloader\n\t\t\t\tdo_action( 'toolset_do_m2m_full_init' );\n\t\t\t\t$relationship_definitions_per_origin = $this->get_m2m_current_post_type_relationships_per_origin( $current_post_type );\n\t\t\t\t\n\t\t\t\t$relationship_section_title_per_cardinality = array(\n\t\t\t\t\t'one-to-one' => __( '%s (one-to-one relationship)', 'wpv-views' ),\n\t\t\t\t\t'one-to-many' => __( '%s (one-to-many relationship)', 'wpv-views' ),\n\t\t\t\t\t'many-to-many' => __( '%s (many-to-many relationship)', 'wpv-views' ),\n\t\t\t\t);\n\n\t\t\t\tif ( ! empty( $relationship_definitions_per_origin[ Toolset_Relationship_Origin_Wizard::ORIGIN_KEYWORD ] ) ) {\n\t\t\t\t\t?>\n\t\t\t\t\t<li class=\"toolset-shortcode-gui-item-selector-option toolset-shortcode-gui-item-selector-has-related js-toolset-shortcode-gui-item-selector-has-related\">\n\t\t\t\t\t\t<label for=\"toolset-shortcode-gui-item-selector-post-id-related\">\n\t\t\t\t\t\t\t<input type=\"radio\" class=\"js-toolset-shortcode-gui-item-selector\" id=\"toolset-shortcode-gui-item-selector-post-id-related\" name=\"toolset_shortcode_gui_object_id\" value=\"related\" />\n\t\t\t\t\t\t\t<?php echo __( 'A post related to the current post, set by a Types relationship', 'wpv-views' ); ?>\n\t\t\t\t\t\t</label>\n\t\t\t\t\t\t<div class=\"toolset-advanced-setting toolset-shortcode-gui-item-selector-is-related js-toolset-shortcode-gui-item-selector-is-related\" style=\"display:none\">\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\tforeach ( $relationship_definitions_per_origin[ Toolset_Relationship_Origin_Wizard::ORIGIN_KEYWORD ] as $relationship_definition ) {\n\t\t\t\t\t\t\t\t$cardinality = $relationship_definition->get_cardinality()->get_type();\n\t\t\t\t\t\t\t\t$relationship_selectors_factory = new Toolset_Shortcode_Attr_Item_Gui_Factory(\n\t\t\t\t\t\t\t\t\t$relationship_definition, $current_post_type, 'related_object'\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t$relationship_selectors = $relationship_selectors_factory->get_options();\n\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t<div style=\"margin:5px 0 0;\">\n\t\t\t\t\t\t\t\t<h3><?php echo sprintf(\n\t\t\t\t\t\t\t\t\t$relationship_section_title_per_cardinality[ $cardinality ],\n\t\t\t\t\t\t\t\t\t$relationship_definition->get_display_name()\n\t\t\t\t\t\t\t\t); ?></h3>\n\t\t\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\tforeach( $relationship_selectors as $relationship_selector_option ) {\n\t\t\t\t\t\t\t\t\techo '<li style=\"display:inline-block;width:31%;vertical-align:top;margin-right:1%;>' . $relationship_selector_option . '</li>';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</li>\n\t\t\t\t\t<?php\n\t\t\t\t}\n\n\t\t\t\tif ( ! empty( $relationship_definitions_per_origin[ Toolset_Relationship_Origin_Post_Reference_Field::ORIGIN_KEYWORD ] ) ) {\n\t\t\t\t\t?>\n\t\t\t\t\t<li class=\"toolset-shortcode-gui-item-selector-option toolset-shortcode-gui-item-selector-has-related js-toolset-shortcode-gui-item-selector-has-related\">\n\t\t\t\t\t\t<label for=\"toolset-shortcode-gui-item-selector-post-id-referenced\">\n\t\t\t\t\t\t\t<input type=\"radio\" class=\"js-toolset-shortcode-gui-item-selector\" id=\"toolset-shortcode-gui-item-selector-post-id-referenced\" name=\"toolset_shortcode_gui_object_id\" value=\"referenced\" />\n\t\t\t\t\t\t\t<?php echo __( 'A post related to the current post, set by a Types post reference field', 'wpv-views' ); ?>\n\t\t\t\t\t\t</label>\n\t\t\t\t\t\t<div class=\"toolset-shortcode-gui-item-selector-is-related js-toolset-shortcode-gui-item-selector-is-related\" style=\"display:none\">\n\t\t\t\t\t\t\t<ul class=\"toolset-advanced-setting toolset-mightlong-list\" style=\"padding-top:15px;margin:5px 0 10px;\">\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\tforeach ( $relationship_definitions_per_origin[ Toolset_Relationship_Origin_Post_Reference_Field::ORIGIN_KEYWORD ] as $relationship_definition ) {\n\t\t\t\t\t\t\t\t$relationship_selectors_factory = new Toolset_Shortcode_Attr_Item_Gui_Factory(\n\t\t\t\t\t\t\t\t\t$relationship_definition, $current_post_type, 'referenced_object'\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t$relationship_selectors = $relationship_selectors_factory->get_options();\n\t\t\t\t\t\t\t\tforeach( $relationship_selectors as $relationship_selector_option ) {\n\t\t\t\t\t\t\t\t\techo '<li>' . $relationship_selector_option . '</li>';\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\t</ul>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</li>\n\t\t\t\t\t<?php\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t?>\n\t\t\t\t<li class=\"toolset-shortcode-gui-item-selector-option toolset-shortcode-gui-item-selector-has-related js-toolset-shortcode-gui-item-selector-has-related\">\n\t\t\t\t\t<label for=\"toolset-shortcode-gui-item-selector-post-id\">\n\t\t\t\t\t\t<input type=\"radio\" class=\"js-toolset-shortcode-gui-item-selector\" id=\"toolset-shortcode-gui-item-selector-post-id\" name=\"toolset_shortcode_gui_object_id\" value=\"object_id\" />\n\t\t\t\t\t\t<?php _e( 'A specific post (search by title)', 'wpv-views' ); ?>\n\t\t\t\t\t</label>\n\t\t\t\t\t<div class=\"toolset-advanced-setting toolset-shortcode-gui-item-selector-is-related js-toolset-shortcode-gui-item-selector-is-related\" style=\"display:none;padding-top:10px;\">\n\t\t\t\t\t\t<select id=\"toolset-shortcode-gui-item-selector-post-id-object_id\"\n\t\t\t\t\t\t\tclass=\"js-toolset-shortcode-gui-item-selector_object_id js-toolset-shortcode-gui-field-ajax-select2\"\n\t\t\t\t\t\t\tname=\"specific_object_id\"\n\t\t\t\t\t\t\tdata-action=\"<?php echo esc_attr( $toolset_ajax->get_action_js_name( Toolset_Ajax::CALLBACK_SELECT2_SUGGEST_POSTS_BY_TITLE ) ); ?>\"\n\t\t\t\t\t\t\tdata-prefill=\"<?php echo esc_attr( $toolset_ajax->get_action_js_name( Toolset_Ajax::CALLBACK_GET_POST_BY_ID ) ); ?>\"\n\t\t\t\t\t\t\tdata-nonce=\"<?php echo wp_create_nonce( Toolset_Ajax::CALLBACK_SELECT2_SUGGEST_POSTS_BY_TITLE ); ?>\"\n\t\t\t\t\t\t\tdata-prefill-nonce=\"<?php echo wp_create_nonce( Toolset_Ajax::CALLBACK_GET_POST_BY_ID ); ?>\"\n\t\t\t\t\t\t\tdata-placeholder=\"<?php echo esc_attr( __( 'Search for a post by title', 'wpv-views' ) ); ?>\">\n\t\t\t\t\t\t</select>\n\t\t\t\t\t</div>\n\t\t\t\t</li>\n\n <li class=\"toolset-shortcode-gui-item-selector-option toolset-shortcode-gui-item-selector-has-related js-toolset-shortcode-gui-item-selector-has-related\">\n <label for=\"toolset-shortcode-gui-item-selector-post-id-raw\">\n <input type=\"radio\" class=\"js-toolset-shortcode-gui-item-selector\" id=\"toolset-shortcode-gui-item-selector-post-id-raw\" name=\"toolset_shortcode_gui_object_id\" value=\"object_id_raw\" />\n\t\t\t\t\t\t<?php _e( 'A specific post (set by post ID)', 'wpv-views' ); ?>\n </label>\n <div class=\"toolset-advanced-setting toolset-shortcode-gui-item-selector-is-related js-toolset-shortcode-gui-item-selector-is-related\" style=\"display:none;padding-top:10px;\">\n <input type=\"number\" placeholder=\"<?php echo esc_attr( __( 'Please enter post ID', 'wpv-views' ) ); ?>\" id=\"toolset-shortcode-gui-item-selector-post-id-object_id_raw\" class=\"regular-text js-toolset-shortcode-gui-item-selector_object_id_raw\" name=\"specific_object_id_raw\">\n </div>\n </li>\n\n </ul>\n\t\t\t<p class=\"description\">\n\t\t\t\t<?php echo sprintf(\n\t\t\t\t\t__( 'Learn about displaying content from parent and other posts in the %sdocumentation page%s.', 'wpv-views' ),\n\t\t\t\t\t'<a href=\"https://toolset.com/documentation/user-guides/displaying-fields-of-parent-pages/\" target=\"_blank\">',\n\t\t\t\t\t'</a>'\n\t\t\t\t); ?>\n\t\t\t</p>\n\t\t</script>\n\n\t\t<script type=\"text/html\" id=\"tmpl-toolset-shortcode-attribute-userSelector\">\n\t\t\t<ul id=\"{{{data.shortcode}}}-{{{data.attribute}}}\">\n\t\t\t\t<li class=\"toolset-shortcode-gui-item-selector-option\">\n\t\t\t\t\t<label for=\"toolset-shortcode-gui-item-selector-user-id-current\">\n\t\t\t\t\t\t<input type=\"radio\" class=\"js-toolset-shortcode-gui-item-selector\" id=\"toolset-shortcode-gui-item-selector-user-id-current\" name=\"toolset_shortcode_gui_object_id\" value=\"current\" checked=\"checked\" />\n\t\t\t\t\t\t<?php _e( 'The current user or the one being displayed in a View loop', 'wpv-views' ); ?>\n\t\t\t\t\t</label>\n\t\t\t\t</li>\n\n\t\t\t\t<li class=\"toolset-shortcode-gui-item-selector-option toolset-shortcode-gui-item-selector-has-related js-toolset-shortcode-gui-item-selector-has-related\">\n\t\t\t\t\t<label for=\"toolset-shortcode-gui-item-selector-user-id\">\n\t\t\t\t\t\t<input type=\"radio\" class=\"js-toolset-shortcode-gui-item-selector\" id=\"toolset-shortcode-gui-item-selector-user-id\" name=\"toolset_shortcode_gui_object_id\" value=\"object_id\" />\n\t\t\t\t\t\t<?php _e( 'A specific user', 'wpv-views' ); ?>\n\t\t\t\t\t</label>\n\t\t\t\t\t<div class=\"toolset-advanced-setting toolset-shortcode-gui-item-selector-is-related js-toolset-shortcode-gui-item-selector-is-related\" style=\"display:none;padding-top:10px;\">\n\t\t\t\t\t\t<select id=\"toolset-shortcode-gui-item-selector-user-id-object_id\"\n\t\t\t\t\t\t\tclass=\"js-toolset-shortcode-gui-item-selector_object_id js-toolset-shortcode-gui-field-ajax-select2\"\n\t\t\t\t\t\t\tname=\"specific_object_id\"\n\t\t\t\t\t\t\tdata-action=\"<?php echo esc_attr( $toolset_ajax->get_action_js_name( Toolset_Ajax::CALLBACK_SELECT2_SUGGEST_USERS ) ); ?>\"\n\t\t\t\t\t\t\tdata-prefill=\"<?php echo esc_attr( $toolset_ajax->get_action_js_name( Toolset_Ajax::CALLBACK_GET_USER_BY_ID ) ); ?>\"\n\t\t\t\t\t\t\tdata-nonce=\"<?php echo wp_create_nonce( Toolset_Ajax::CALLBACK_SELECT2_SUGGEST_USERS ); ?>\"\n\t\t\t\t\t\t\tdata-prefill-nonce=\"<?php echo wp_create_nonce( Toolset_Ajax::CALLBACK_GET_USER_BY_ID ); ?>\"\n\t\t\t\t\t\t\tdata-placeholder=\"<?php echo esc_attr( __( 'Search for a user', 'wpv-views' ) ); ?>\">\n\t\t\t\t\t\t</select>\n\t\t\t\t\t</div>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</script>\n\n\t\t<script type=\"text/html\" id=\"tmpl-toolset-shortcode-attribute-post-selector\">\n\t\t\t<ul id=\"{{data.shortcode}}}-{{data.attribute}}}\">\n\t\t\t\t<li>\n\t\t\t\t\t<label>\n\t\t\t\t\t\t<input type=\"radio\" name=\"{{{data.shortcode}}}-select-target-post\" class=\"toolset-shortcode-gui-item-selector js-toolset-shortcode-gui-item-selector\" value=\"current\" checked=\"checked\" />\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tisset( $_GET['page'] )\n\t\t\t\t\t\t\t&& in_array( $_GET['page'], array( 'views-editor', 'view-archives-editor' ) )\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t_e( 'The current post in the loop', 'wp-cred' );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t_e( 'The current post', 'wp-cred' );\n\t\t\t\t\t\t}\n\t\t\t\t\t\t?>\n\t\t\t\t\t</label>\n\t\t\t\t</li>\n\t\t\t\t<li class=\"js-toolset-shortcode-gui-item-selector-has-related\">\n\t\t\t\t\t<label>\n\t\t\t\t\t\t<input type=\"radio\" name=\"{{{data.shortcode}}}-select-target-post\" class=\"toolset-shortcode-gui-item-selector js-toolset-shortcode-gui-item-selector\" value=\"object_id\" />\n\t\t\t\t\t\t<?php _e( 'Another post', 'wp-cred' ); ?>\n\t\t\t\t\t\t<div class=\"toolset-shortcode-gui-item-selector-is-related js-toolset-shortcode-gui-item-selector-is-related\" style=\"display:none\">\n\t\t\t\t\t\t\t<select id=\"toolset-shortcode-gui-item-selector-post-id-object_id\"\n\t\t\t\t\t\t\t\tclass=\"js-toolset-shortcode-gui-item-selector_object_id js-toolset-shortcode-gui-field-ajax-select2\"\n\t\t\t\t\t\t\t\tname=\"specific_object_id\"\n\t\t\t\t\t\t\t\tdata-action=\"<?php echo esc_attr( $toolset_ajax->get_action_js_name( Toolset_Ajax::CALLBACK_SELECT2_SUGGEST_POSTS_BY_TITLE ) ); ?>\"\n\t\t\t\t\t\t\t\tdata-prefill=\"<?php echo esc_attr( $toolset_ajax->get_action_js_name( Toolset_Ajax::CALLBACK_GET_POST_BY_ID ) ); ?>\"\n\t\t\t\t\t\t\t\tdata-nonce=\"<?php echo wp_create_nonce( Toolset_Ajax::CALLBACK_SELECT2_SUGGEST_POSTS_BY_TITLE ); ?>\"\n\t\t\t\t\t\t\t\tdata-prefill-nonce=\"<?php echo wp_create_nonce( Toolset_Ajax::CALLBACK_GET_POST_BY_ID ); ?>\"\n\t\t\t\t\t\t\t\tdata-placeholder=\"<?php echo esc_attr( __( 'Search for a post by title', 'wpv-views' ) ); ?>\">\n\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</label>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</script>\n\t\t<script type=\"text/html\" id=\"tmpl-toolset-shortcode-attribute-user-selector\">\n\t\t\t<ul id=\"{{data.shortcode}}}-{{data.attribute}}}\">\n\t\t\t\t<li>\n\t\t\t\t\t<label>\n\t\t\t\t\t\t<input type=\"radio\" name=\"{{{data.shortcode}}}-select-target-user\" class=\"toolset-shortcode-gui-item-selector js-toolset-shortcode-gui-item-selector\" value=\"current\" checked=\"checked\" />\n\t\t\t\t\t\t<?php _e( 'The current logged in user', 'wp-cred' ); ?>\n\t\t\t\t\t</label>\n\t\t\t\t</li>\n\t\t\t\t<li class=\"js-toolset-shortcode-gui-item-selector-has-related\">\n\t\t\t\t\t<label>\n\t\t\t\t\t\t<input type=\"radio\" name=\"{{{data.shortcode}}}-select-target-user\" class=\"toolset-shortcode-gui-item-selector js-toolset-shortcode-gui-item-selector\" value=\"object_id\" />\n\t\t\t\t\t\t<?php _e( 'Another user', 'wp-cred' ); ?>\n\t\t\t\t\t\t<div class=\"toolset-shortcode-gui-item-selector-is-related js-toolset-shortcode-gui-item-selector-is-related\" style=\"display:none\">\n\t\t\t\t\t\t\t<select id=\"toolset-shortcode-gui-item-selector-user-id-object_id\"\n\t\t\t\t\t\t\t\tclass=\"js-toolset-shortcode-gui-item-selector_object_id js-toolset-shortcode-gui-field-ajax-select2\"\n\t\t\t\t\t\t\t\tname=\"specific_object_id\"\n\t\t\t\t\t\t\t\tdata-action=\"<?php echo esc_attr( $toolset_ajax->get_action_js_name( Toolset_Ajax::CALLBACK_SELECT2_SUGGEST_USERS ) ); ?>\"\n\t\t\t\t\t\t\t\tdata-prefill=\"<?php echo esc_attr( $toolset_ajax->get_action_js_name( Toolset_Ajax::CALLBACK_GET_USER_BY_ID ) ); ?>\"\n\t\t\t\t\t\t\t\tdata-nonce=\"<?php echo wp_create_nonce( Toolset_Ajax::CALLBACK_SELECT2_SUGGEST_USERS ); ?>\"\n\t\t\t\t\t\t\t\tdata-prefill-nonce=\"<?php echo wp_create_nonce( Toolset_Ajax::CALLBACK_GET_USER_BY_ID ); ?>\"\n\t\t\t\t\t\t\t\tdata-placeholder=\"<?php echo esc_attr( __( 'Search for a user', 'wpv-views' ) ); ?>\">\n\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</label>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</script>\n\t\t<?php\n\n\t\tdo_action( 'toolset_action_require_shortcodes_templates_done' );\n\n\t}", "public function generate_short_code_content($atts)\n {\n $short_code_atts = shortcode_atts(array(), $atts);\n\n ob_start();\n\n $this->cyl_locate_template_part('shortcode/colorYourLife.php', []);\n\n return ob_get_clean();\n }", "public function generateContents()\n {\n ob_start();\n include $this->getTemplateFile();\n $output = ob_get_contents();\n ob_end_clean();\n return $output;\n }", "function mkdf_twitter_get_shortcode_module_template_part( $template, $shortcode, $slug = '', $params = array() ) {\n\t\t\n\t\t//HTML Content from template\n\t\t$html = '';\n\t\t$template_path = MIKADO_TWITTER_SHORTCODES_PATH . '/' . $shortcode;\n\t\t\n\t\t$temp = $template_path . '/' . $template;\n\t\t\n\t\tif ( is_array( $params ) && count( $params ) ) {\n\t\t\textract( $params );\n\t\t}\n\t\t\n\t\t$template = '';\n\t\t\n\t\tif ( ! empty( $temp ) ) {\n\t\t\tif ( ! empty( $slug ) ) {\n\t\t\t\t$template = \"{$temp}-{$slug}.php\";\n\t\t\t\t\n\t\t\t\tif ( ! file_exists( $template ) ) {\n\t\t\t\t\t$template = $temp . '.php';\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$template = $temp . '.php';\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ( $template ) {\n\t\t\tob_start();\n\t\t\tinclude( $template );\n\t\t\t$html = ob_get_clean();\n\t\t}\n\t\t\n\t\treturn $html;\n\t}", "public function add_shortcode_content() {\n\n //turn on output buffering to capture script output\n ob_start();\n\n $this->enqueue();\n echo \"<link rel=\\\"stylesheet\\\" href=\\\"https://cdnjs.cloudflare.com/ajax/libs/jquery-modal/0.9.1/jquery.modal.min.css\\\" />\";\n echo \"<script src=\\\"https://cdnjs.cloudflare.com/ajax/libs/jquery-modal/0.9.1/jquery.modal.min.js\\\"></script>\";\n\n //include the specified file\n require_once(\"$this->plugin_path/frontend/arena.php\");\n\n //assign the file output to $content variable and clean buffer\n $content = ob_get_clean();\n\n //return the $content\n //return is important for the output to appear at the correct position\n return $content;\n }", "public function display($data) {\n\t\t\tglobal $cfct_build;\t\t\t\n\t\t\n\t\t\t$cfct_build->loaded_modules[$this->basename] = $this->pluginPath;\n\t\t\t$cfct_build->module_paths[$this->basename] = $this->pluginPath;\n\t\t\t$cfct_build->module_urls[$this->basename] = $this->pluginUrl;\n\n\t\t\t$text = do_shortcode($data[$this->get_field_id('content')]);\n\t\t\treturn $this->load_view($data, compact('text'));\t\t\t\n\t\t}", "public function build( $output=true ) {\n\t\t$source = $this->getTemplate()->build( $output );\n\t\tif( $output )\n\t\t\techo $source;\n\t\telse\n\t\t\treturn $source;\n\t}", "function plugin_starter_shortcode_1() {\r\n\t// This is just for showing that the shortcut works\r\n\treturn '<div class=\"starter-test\">This is the output of this shortcode</div>';\r\n}", "public function processShortcode($atts) {\n\t\t\n\t\textract(shortcode_atts(array(\n \t\t'request' => 'blank'\n\t\t), $atts));\n\t\t\n\t\t$content = self::processRequest($request);\n\t\t\n\t\treturn \"<!--BEGIN: onxshop_start --><div class='onxshop_wordpress'>{$content}</div><!-- END: onxshop_end -->\";\n \n\t}", "function mmc_shortcode() {\r\n\t//$cards = mmc_fetch_my_card_info();\r\n\r\n\t//$cards_content = mmc_display_card_info( $cards ); // do some formatting here\r\n\r\n\t//return $cards_content;\r\n\tinclude('cards_index.php');\r\n}", "public function fetch_builder_template()\n\t\t{\n\t\t $error = false;\n $name = isset($_POST['templateName']) ? $_POST['templateName'] : false;\n if(empty($name)) \n $error = true;\n \n $key = $this->generate_key($name);\n $template = $this->get_meta_values($key);\n \n if(empty($template)) $error = true;\n \n \n if($error)\n {\n echo \"avia_fetching_error\";\n }\n else\n {\n $text = str_replace('{{{'.$name.'}}}','',$template[0]);\n $return = $this->builder->text_to_interface($text);\n \n echo $return;\n }\n \n die();\n\t\t}", "function add_shortcode_interface() {\n\tob_start();\n?>\n\t<a href=\"#TB_inline?width=600&height=700&inlineId=select-shortcode-form\" class=\"thickbox button\" id=\"add-shortcode\" title=\"Add Shortcode\">Add Shortcode</a>\n<?php\n\techo ob_get_clean();\n}", "public function output( $atts, $content = null ) {\n\t\t\tob_start();\n\t\t\tinclude( vcex_get_shortcode_template( 'vcex_shortcode' ) );\n\t\t\treturn ob_get_clean();\n\t\t}", "public function output()\n\t{\n\t\t$template_path = THEMES_DIR.PAGE_PATH.'.html';\n\t\tif(!file_exists($template_path)) {\n\t\t\t// or the first file in the first existing path\n\t\t\t$existing_path = $this->first_realpath(THEMES_DIR, PAGE_PATH);\n\t\t\t$tpl_list = $this->list_files(THEMES_DIR . $existing_path, '*.html');\n\t\t\t$template_path = reset($tpl_list);\n\t\t}\n\t\t$content = file_get_contents($template_path);\n\t\t$content = $this->parse($content, false, true, 'template \"'.$template_path.'\"');\n\t\treturn $content;\n\t}", "function shortcode_tour_booking( $atts, $content = null ) {\n\t\tob_start();\n\t\ttrav_get_template( 'tour-booking.php', '/templates/tour' );\n\t\t$output = ob_get_contents();\n\t\tob_end_clean();\n\t\treturn $output;\n\t}", "function shortcode_template( $atts, $content = null ) {\r\n\t\t\tglobal $mpc_ma_options;\r\n\t\t\tif ( ! defined( 'MPC_MASSIVE_FULL' ) || ( defined( 'MPC_MASSIVE_FULL' ) && $mpc_ma_options[ 'single_js_css' ] !== '1' ) ) {\r\n\t\t\t\t$this->enqueue_shortcode_scripts();\r\n\t\t\t}\r\n\r\n\t\t\t$atts = shortcode_atts( array(\r\n\t\t\t\t'class' => '',\r\n\t\t\t\t'preset' => '',\r\n\t\t\t\t'content_preset' => '',\r\n\t\t\t\t'style' => 'horizontal',\r\n\t\t\t\t'space' => '',\r\n\t\t\t\t'fullwidth' => '',\r\n\r\n\t\t\t\t'padding_css' => '',\r\n\t\t\t\t'margin_css' => '',\r\n\t\t\t\t'border_css' => '',\r\n\r\n\t\t\t\t'icon_type' => 'icon',\r\n\t\t\t\t'icon' => '',\r\n\t\t\t\t'icon_character' => '',\r\n\t\t\t\t'icon_image' => '',\r\n\t\t\t\t'icon_image_size' => 'thumbnail',\r\n\t\t\t\t'icon_preset' => '',\r\n\t\t\t\t'icon_color' => '#333333',\r\n\t\t\t\t'icon_size' => '',\r\n\r\n\t\t\t\t'icon_margin_css' => '',\r\n\t\t\t\t'icon_animation' => 'none',\r\n\r\n\t\t\t\t'background_type' => 'color',\r\n\t\t\t\t'background_color' => '',\r\n\t\t\t\t'background_image' => '',\r\n\t\t\t\t'background_image_size' => 'large',\r\n\t\t\t\t'background_repeat' => 'no-repeat',\r\n\t\t\t\t'background_size' => 'initial',\r\n\t\t\t\t'background_position' => 'middle-center',\r\n\t\t\t\t'background_gradient' => '#83bae3||#80e0d4||0;100||180||linear',\r\n\r\n\t\t\t\t'animation_in_type' => 'none',\r\n\t\t\t\t'animation_in_duration' => '300',\r\n\t\t\t\t'animation_in_delay' => '0',\r\n\t\t\t\t'animation_in_offset' => '100',\r\n\r\n\t\t\t\t'animation_loop_type' => 'none',\r\n\t\t\t\t'animation_loop_duration' => '1000',\r\n\t\t\t\t'animation_loop_delay' => '1000',\r\n\t\t\t\t'animation_loop_hover' => '',\r\n\t\t\t), $atts );\r\n\r\n\t\t\t$styles = $this->shortcode_styles( $atts );\r\n\t\t\t$css_id = $styles[ 'id' ];\r\n\r\n\t\t\t$icon = MPC_Parser::icon( $atts );\r\n\t\t\t$animation = MPC_Parser::animation( $atts );\r\n\r\n\t\t\t$classes = $animation != '' ? ' mpc-animation' : '';\r\n\t\t\t$classes .= $atts[ 'fullwidth' ] != '' ? ' mpc-fullwidth' : '';\r\n\t\t\t$classes .= $atts[ 'style' ] == 'horizontal' ? ' mpc-style--horizontal' : ' mpc-style--vertical';\r\n\t\t\t$classes .= ' ' . esc_attr( $atts[ 'class' ] );\r\n\r\n\t\t\t$separator_classes = $icon[ 'class' ] == '' && $icon[ 'content' ] == '' ? ' mpc-empty' : '';\r\n\r\n\t\t\tglobal $mpc_button_separator;\r\n\t\t\t$mpc_button_separator = '<span class=\"mpc-button-separator-wrap\"><span class=\"mpc-button-separator-box\"><span class=\"mpc-button-separator ' . $icon[ 'class' ] . $separator_classes . '\">' . $icon[ 'content' ] . '</span></span></span>';\r\n\r\n\t\t\t$return = '<div id=\"' . $css_id . '\" class=\"mpc-button-set mpc-init' . $classes . '\"' . $animation . ( $atts[ 'icon_animation' ] != 'none' ? ' data-animation=\"' . esc_attr( $atts[ 'icon_animation' ] ) . '\"' : '' ) . '>';\r\n\t\t\t\t$return .= do_shortcode( $content );\r\n\t\t\t$return .= '</div>';\r\n\r\n\t\t\t$mpc_button_separator = null;\r\n\r\n\t\t\tglobal $mpc_frontend;\r\n\t\t\tif ( $mpc_frontend ) {\r\n\t\t\t\t$return .= '<style>' . $styles[ 'css' ] . '</style>';\r\n\t\t\t}\r\n\r\n\t\t\treturn $return;\r\n\t\t}", "public function actionGetTemplate(){\n $post = Yii::$app->getRequest()->post();\n echo file_get_contents(dirname(\\Yii::getAlias('@webroot')).'/frontend/views/templates/'.$post['template']);\n }", "function audio_logger_shortcode($atts = [], $content = null){\n\n ob_start();\n\n\n require_once(plugin_dir_path(__FILE__) . '/audio-logger-scripts.php');\n\n $output = ob_get_clean();\n $run_shortcodes = do_shortcode($output);\n return $run_shortcodes;\n}", "function html5_shortcode_demo($atts, $content = null)\n{\n return '<div class=\"shortcode-demo\">' . do_shortcode($content) . '</div>'; // do_shortcode allows for nested Shortcodes\n}", "function output($template) {\n\n\t\tglobal $polarbear_u, $polarbear_a;\n\t\t$isOk = false;\n\n\t\tif ($this->isPublished()) {\n\t\t\t$isOk = true;\n\t\t} else if ($this->getStatus()==\"preview\" && is_object($polarbear_u) && $polarbear_u->isAdmin()) {\n\t\t\t$isOk = true;\n\t\t}\n\t\t\n\t\tif ($isOk == false) {\n\t\t\treturn '';\n\t\t}\n\t\t$dwoo = new Dwoo();\n\t\t$dwoo->setCompileDir(POLARBEAR_STORAGEPATH . 'dwoo');\n\t\t$data = new Dwoo_Data(); \n\t\t$tpl = new Dwoo_Template_String($template);\n\n\t\t// add variables\n\t\t$data->assign('id', $this->getId());\n\t\t$data->assign('titleArticle', htmlspecialchars($this->getTitleArticle(), ENT_COMPAT, \"UTF-8\"));\n\t\t$data->assign('titleArticleRaw', $this->getTitleArticle());\n\t\t$data->assign('titlePage', htmlspecialchars($this->getTitlePage(), ENT_COMPAT, \"UTF-8\"));\n\t\t$data->assign('titleNav', htmlspecialchars($this->getTitleNav(), ENT_COMPAT, \"UTF-8\"));\n\t\t$data->assign('href', $this->href());\n\t\t$data->assign('hrefFull', $this->hrefFull());\n\t\t$data->assign('fullPageTitle', $this->fullPageTitle());\n\t\t$data->assign('teaser', $this->getTeaser());\n\t\t$data->assign('teaserNoTags', strip_tags($this->getTeaser()));\n\t\t$data->assign('hasTeaser', $this->hasTeaser());\n\t\t$data->assign('body', $this->getBody());\n\t\t$data->assign('bodyNoTags', strip_tags($this->getBody()));\n\t\t$data->assign('hasBody', $this->hasBody());\n\t\t$data->assign('datePublish', $this->getDatePublish());\n\t\t$data->assign('dateChanged', $this->getDateChanged());\n\t\t$data->assign('metaDescription', trim($this->getMetaDescription()));\n\t\t$data->assign('metaKeywords', trim($this->getMetaKeywords()));\n\n\t\tif ($this->getStatus()==\"preview\") {\n\t\t\t// no edit icons in preview mode\n\t\t} else {\n\t\t\t$data->assign('edit', $this->getEditString());\n\t\t\t$data->assign('editPrio', $this->getEditPrioString());\n\t\t\t$data->assign('editAdd', $this->getEditAddString());\n\t\t\t$data->assign('editAddChild', $this->getEditAddChildString());\n\t\t}\n\n\t\t$SEOMetaTags = \"\";\n\t\tif (trim($this->getMetaDescription())) {\n\t\t\t$SEOMetaTags .= '<meta name=\"description\" content=\"' . htmlspecialchars(trim($this->getMetaDescription()), ENT_COMPAT, \"UTF-8\") . '\" />';\n\t\t}\n\t\tif (trim($this->getMetaKeywords())) {\n\t\t\t$SEOMetaTags .= '<meta name=\"keywords\" content=\"' . htmlspecialchars(trim($this->getMetaKeywords()), ENT_COMPAT, \"UTF-8\") . '\" />';\n\t\t}\n\t\t$data->assign('SEOMetaTags', $SEOMetaTags);\n\n\t\t// $isCurrentArticle, good for using i lists\n\t\t$isCurrentArticle = false;\n\t\tif ($polarbear_a && $polarbear_a->getId() == $this->getId()) {\n\t\t\t$isCurrentArticle = true;\n\t\t}\n\t\t$data->assign('isCurrentArticle', $isCurrentArticle);\n\t\t\n\n\t\t// fetch parent so vi easily can check if current article is child of some article\n\t\t// todo: since these are the same as for the current article maybe we could make a wrapper for it.. somehow\n\t\t$parentA = PolarBear_Article::getInstance($this->parentID);\n\t\t$data->assign('parentId', $parentA->getId());\n\t\t$data->assign('parentTitleArticle', htmlspecialchars($parentA->getTitleArticle(), ENT_COMPAT, \"UTF-8\"));\n\t\t$data->assign('parentTitlePage', htmlspecialchars($parentA->getTitlePage(), ENT_COMPAT, \"UTF-8\"));\n\t\t$data->assign('parentTitleNav', htmlspecialchars($parentA->getTitleNav(), ENT_COMPAT, \"UTF-8\"));\n\t\t$data->assign('parentHref', $parentA->href());\n\t\t$data->assign('parentHrefFull', $parentA->href());\n\t\t$data->assign('parentFullPageTitle', $parentA->fullPageTitle());\n\t\t$data->assign('parentTeaser', $parentA->getTeaser());\n\t\t$data->assign('parentHasTeaser', $parentA->hasTeaser());\n\t\t$data->assign('parentBody', $parentA->getBody());\n\t\t$data->assign('parentHasBody', $parentA->hasBody());\n\t\t$data->assign('parentDatePublish', $parentA->getDatePublish());\n\t\t$data->assign('parentDateChanged', $parentA->getDateChanged());\n\t\t$data->assign('parentMetaDescription', $parentA->getMetaDescription());\n\t\t$data->assign('parentMetaKeywords', $parentA->getMetaKeywords());\n\n\t\t$fieldValues = $this->fieldValues();\n\t\t$data->assign('fields', $fieldValues);\n\t\t\n\t\t$out = $dwoo->get($tpl, $data);\n\t\t$out = pb_event_fire(\"article_output\", array(\"article\" => $this, \"output\" => $out));\n\t\t$out = $out[\"output\"];\n\n\t\t#pb_pqp_log_speed(\"article output()\");\n\n\t\treturn $out;\n\t}", "function rqdshortcode () {\nob_start();\n?>\n\n<div class=\"rqd-container\">\n \t<?php\n\t\t$args=array('post_type'=>'quote', 'orderby'=>'rand', 'posts_per_page'=>'1');\n\n\t\t$randomquote=new WP_Query($args);\n\t\twhile ($randomquote->have_posts()) : $randomquote->the_post();\n\t\t\t$ctd_newtitle = get_the_title();\t\t\t\n\t\t\n\t\t\t?><p class=\"rqd-quote\"><?php echo \"\\\"\" . $ctd_newtitle . \"\\\"\";?></p>\n \n <?php $authorname = get_post_meta( get_the_ID(), 'author-box-text', true ); ?>\n <p class=\"rqd-author\"><?php echo \"- \" . $authorname . \" -\";?></p>\n <?php \n\t\tendwhile;\n\t\twp_reset_postdata();\n\t\t?> </div> <?php\n\t\t\n\t\t$output = ob_get_contents();\n\t\tob_end_clean();\n\n\t\treturn $output;\n\t}", "function shortcode ( $content ) {\n return short_code ( $content );\n}", "function endcore_socialbuttons_shortcode($atts, $content = null) {\n if(is_admin()) {\n return;\n }\n\n\tob_start();\t\n\tget_template_part('parts/stuff/code', 'social');\n\t$output = ob_get_contents();\n\tob_end_clean();\n\treturn $output;\n}", "function shortcode_template( $atts, $content = null ) {\r\n\t\t\tglobal $MPC_Shortcode, $mpc_ma_options;\r\n\t\t\tif ( ! defined( 'MPC_MASSIVE_FULL' ) || ( defined( 'MPC_MASSIVE_FULL' ) && $mpc_ma_options[ 'single_js_css' ] !== '1' ) ) {\r\n\t\t\t\t$this->enqueue_shortcode_scripts();\r\n\t\t\t}\r\n\r\n\t\t\t$atts = shortcode_atts( array(\r\n\t\t\t\t'class' => '',\r\n\t\t\t\t'preset' => '',\r\n\r\n\t\t\t\t/* General */\r\n\t\t\t\t'properties' => '',\r\n\t\t\t\t'properties_font_color' => '',\r\n\t\t\t\t'properties_font_align' => '',\r\n\t\t\t\t'properties_font_transform' => '',\r\n\t\t\t\t'prop_padding_css' => '',\r\n\r\n\t\t\t\t'prop_even_background_type' => 'color',\r\n\t\t\t\t'prop_even_background_color' => '',\r\n\t\t\t\t'prop_even_background_image' => '',\r\n\t\t\t\t'prop_even_background_image_size' => 'large',\r\n\t\t\t\t'prop_even_background_repeat' => 'no-repeat',\r\n\t\t\t\t'prop_even_background_size' => 'initial',\r\n\t\t\t\t'prop_even_background_position' => 'middle-center',\r\n\t\t\t\t'prop_even_background_gradient' => '#83bae3||#80e0d4||0;100||180||linear',\r\n ), $atts );\r\n\r\n\t\t\t/* Prepare */\r\n\t\t\t$styles = $this->shortcode_styles( $atts );\r\n\t\t\t$css_id = $styles[ 'id' ];\r\n\t\t\t$MPC_Shortcode[ 'pricing' ][ 'style' ] .= $styles[ 'css' ];\r\n\r\n\t\t\t$animation = MPC_Parser::animation( $atts );\r\n\t\t\t$properties = explode( '|||', $atts[ 'properties' ] );\r\n\r\n\t\t\t/* Fonts Presets */\r\n\t\t\t$title_classes = $MPC_Shortcode[ 'pricing' ][ 'presets' ][ 'title' ] != '' ? ' mpc-typography--' . $MPC_Shortcode[ 'pricing' ][ 'presets' ][ 'title' ] : '';\r\n\t\t\t$price_classes = $MPC_Shortcode[ 'pricing' ][ 'presets' ][ 'price' ] != '' ? ' mpc-typography--' . $MPC_Shortcode[ 'pricing' ][ 'presets' ][ 'price' ] : '';\r\n\t\t\t$props_classes = $MPC_Shortcode[ 'pricing' ][ 'presets' ][ 'prop' ] != '' ? ' mpc-typography--' . $MPC_Shortcode[ 'pricing' ][ 'presets' ][ 'prop' ] : '';\r\n\r\n\t\t\t/* Prepare Parts */\r\n\t\t\t$title = $MPC_Shortcode[ 'pricing' ][ 'disable' ][ 'title' ] == '' ? '<div class=\"mpc-pricing__title' . $title_classes . '\">&nbsp;</div>' : '';\r\n\t\t\t$price = $MPC_Shortcode[ 'pricing' ][ 'disable' ][ 'price' ] == '' ? '<div class=\"mpc-pricing__price' . $price_classes . '\">&nbsp;</div>' : '';\r\n\r\n\t\t\t$props = '<div class=\"mpc-pricing__properties' . $props_classes . '\">';\r\n\t\t\tforeach( $properties as $property ) {\r\n\t\t\t\t$props .= '<div class=\"mpc-pricing__property\">' . $property . '</div>';\r\n\t\t\t}\r\n\t\t\t$props .= '</div>';\r\n\r\n\t\t\t/* Shortcode classes | Animation | Layout */\r\n\t\t\t$classes = $animation != '' ? ' mpc-animation' : '';\r\n\t\t\t$classes .= ' ' . esc_attr( $atts[ 'class' ] );\r\n\r\n\t\t\t/* Shortcode Output */\r\n\t\t\t$return = '<div id=\"' . $css_id . '\" class=\"mpc-pricing-column mpc-pricing-legend' . $classes . '\" ' . $animation . '>';\r\n\t\t\t\t$return .= $title . $price . $props;\r\n\t\t\t$return .= '</div>';\r\n\r\n\t\t\t$MPC_Shortcode[ 'pricing' ][ 'parts' ][ 'legend' ] = $return;\r\n\r\n\t\t\tglobal $mpc_frontend;\r\n\t\t\tif ( $mpc_frontend ) {\r\n\t\t\t\t$css = '<style>' . $styles[ 'css' ] . '</style>';\r\n\r\n\t\t\t\treturn $css;\r\n\t\t\t}\r\n\r\n\t\t\treturn;\r\n\t\t}", "function show_template($template) {\n\treturn templates . '/' . $template . '.php';\n}", "public function showTemplate(){\n\t\tinclude \"view/template.php\";\n\t}", "public function output() {\n\n if (!file_exists($this->view)) {\n \treturn \"Voeg eerst een template toe ($this->view).<br />\";\n }\n $output = file_get_contents($this->view);\n \n foreach ($this->variabeles as $key => $variable) {\n \t$tagToReplace = \"[@$key]\";\n \t$output = str_replace($tagToReplace, $variable, $output);\n }\n\n return $output;\n }", "function html5_shortcode_demo( $atts, $content = null ) {\n return '<div class=\"shortcode-demo\">' . do_shortcode( $content ) . '</div>'; // do_shortcode allows for nested Shortcodes\n}", "function get_template()\n {\n }", "public function shortcode($atts) {\n global $wpdb;\n if (isset($atts['slug'])) {\n $q=$wpdb->prepare(\n \"SELECT id \".\n \"FROM {$wpdb->prefix}h5p_contents \".\n \"WHERE slug=%s\",\n $atts['slug']\n );\n $row=$wpdb->get_row($q,ARRAY_A);\n\n if ($wpdb->last_error) {\n return sprintf(__('Database error: %s.', $this->plugin_slug), $wpdb->last_error);\n }\n\n if (!isset($row['id'])) {\n return sprintf(__('Cannot find H5P content with slug: %s.', $this->plugin_slug), $atts['slug']);\n }\n\n $atts['id']=$row['id'];\n }\n\n $id = isset($atts['id']) ? intval($atts['id']) : NULL;\n $content = $this->get_content($id);\n if (is_string($content)) {\n // Return error message if the user has the correct cap\n return current_user_can('edit_h5p_contents') ? $content : NULL;\n }\n\n // Log view\n new H5P_Event('content', 'shortcode',\n $content['id'],\n $content['title'],\n $content['library']['name'],\n $content['library']['majorVersion'] . '.' . $content['library']['minorVersion']);\n\n return $this->add_assets($content);\n }", "function accouk_guitar_tab($atts) {\n\n $tab_content = '';\n $file_path_relative = '';\n $file_path_full = '';\n $downloadable = false;\n\n $a = shortcode_atts(array(\n 'file' => null,\n\t\t'download' => null\n\t), $atts);\n\n $file_path_full = $_SERVER['DOCUMENT_ROOT'] . \"/\" . $a['file'];\n $valid_text_file = accouk_is_valid_text_file($file_path_full);\n\n // Only process the file contents if we're confident it's a .txt file\n if($valid_text_file === true) {\n $tab_content = file_get_contents($file_path_full);\n }\n\n // Only show download link if the text file is valid and the user has specified the link\n if($valid_text_file && $a['download'] === \"yes\") {\n $downloadable = true;\n $file_path_relative = $a['file'];\n }\n\n // Output with template\n ob_start();\n include('templates/guitar-tab.php');\n $element = ob_get_contents();\n ob_end_clean();\n\n\treturn $element;\n}", "protected function compile()\n {\n // Backend mode\n if (TL_MODE == 'BE') {\n return $this->compileBackend('### Showcase Overview ###');\n }\n\n // Add folder navigation\n \\Input::setGet('showcase', \\Input::get('showcase'));\n\n if (!empty(\\Input::get('showcase'))) {\n return '';\n }\n\n // Add isotope JS library\n $GLOBALS['TL_JAVASCRIPT'][] = Environment::get('path').'/bundles/comoloshowcase/js/isotope.pkgd.min.js|static';\n $GLOBALS['TL_JAVASCRIPT'][] = Environment::get('path').'/bundles/comoloshowcase/js/isotope-script.js|static';\n\n $this->Template->categories = ShowcaseCategoryModel::findBy('pid', $this->showcase, ['order' => 'sorting ASC']);\n $this->Template->strShowcases = $this->parseShowcases();\n }", "function do_utcw_shortcode($args) {\n\t\n\t// Shortcodes should return values, not echo out\n\t$args['return'] = true;\n\t\n\treturn do_utcw($args);\n}", "public function output(): string\n {\n $data = $this->data;\n\n // Render data\n ob_start();\n include $this->templateFile;\n $rendered = ob_get_clean();\n return $rendered;\n }", "public function display() {\r\n echo $this->template;\r\n }", "function echotheme_jquerycycle_shortcode( $atts ){\n\tob_start();\n\tget_template_part('part', 'jquerycycle-gallery');\n\treturn ob_get_clean();\n}", "function template( $file, $args ){\n if ( !file_exists( $file ) ) {\n return '';\n }\n // Make values in the associative array easier to access by extracting them\n if ( is_array( $args ) ){\n extract( $args );\n }\n // buffer the output (including the file is \"output\")\n ob_start();\n include $file;\n return ob_get_clean();\n }", "function custom_registration_shortcode() {\n ob_start();\n custom_registration_function();\n return ob_get_clean();\n}", "public function render()\n {\n \n $v = $this->vars;\n \n ob_start();\n foreach( $this->templates as $template )\n {\n if( Fs::exists( GAIA_PATH.'modules/'.$template.'.tpl' ) )\n include GAIA_PATH.'modules/'.$template.'.tpl';\n elseif( Fs::exists( GAIA_PATH.'wbf/'.$template.'.tpl' ) )\n include GAIA_PATH.'wbf/'.$template.'.tpl';\n else \n echo 'Missing Template '.$template.NL;\n }\n \n $maincontent = ob_get_contents();\n ob_end_clean();\n \n $this->renderedContent = $maincontent;\n\n return $this->renderedContent;\n\n }", "public function processaTemplate() {\n return $this->fetch('ricerca_'.$this->_layout.'.tpl');\n }", "public function run()\n\t{\n\t\techo vsprintf($this->template,$this->_contents);\n\t}", "function vslider_short_code($atts) {\r\n\tob_start();\r\n extract(shortcode_atts(array(\r\n\t\t\"name\" => ''\r\n\t), $atts));\r\n\tvslider($name);\r\n\t$output = ob_get_clean();\r\n\treturn $output;\r\n}", "function shortcodes_xh_version()\n{\n global $pth;\n\n return '<h1>Shortcodes_xh</h1>'.\"\\n\"\n\t. tag('img src=\"'.$pth['folder']['plugins'].'shortcodes_xh/help/ShortCode_XH.png\" style=\"float: left; margin: 0 20px 20px 0\"')\n\t. '<p>This plugin is to use the familiar <a href=\"https://codex.wordpress.org/Shortcode_API\" target=\"_blank\">WordPress shortcode syntax</a> in CMSimple_XH.</p>'\n\t. '<p>Version: '.SHORTCODES_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>Original <a href=\"https://github.com/Badcow/Shortcodes\" target=\"_blank\">Badcow/Shortcodes Latest commit 5 Apr 2015</a></p>'\n\t. '<p style=\"text-align: justify\">'\n\t. '<b>License</b>'. tag('br') . \"\\n\"\n\t. ' Art License Terms : <a href=\"http://creativecommons.org/licenses/by-sa/4.0/\" target=\"_blank\">Creative Commons License </a> . Detail <a href=\"https://github.com/Badcow/Shortcodes\" target=\"_blank\">https://github.com/Badcow/Shortcodes</a>'. tag('br').\"\\n\"\n\t. ' Software License terms : <a href=\"http://www.gnu.org/licenses/\" target=\"_blank\">GPLv3.</a>';\n}", "function getTemplate();", "public function generateCode() {\n $content = \"\";\n foreach ($this->arrTemplates as $template) {\n if (!file_exists($template)) {\n //Template not found\n continue;\n }\n $content .= file_get_contents($template);\n }\n \n foreach ($this->attributes as $key => $val) {\n $content = str_replace($this->placeHolderStart.$key.$this->placeHolderEnd, $val, $content);\n }\n return $content;\n }", "public function add_short_code()\n {\n add_shortcode('colorYourLife', array($this, 'generate_short_code_content'));\n }", "public abstract function do_shortcode( $atts, $content, $tag );", "function tz_one_third( $atts, $content = null ) {\n return '<div class=\"one_third\">' . do_shortcode($content) . '</div>';\n}", "function tc_epo_show_shortcode( $atts, $content = NULL ) {\n\textract( shortcode_atts( array(\n\t\t'action' => '',\n\t), $atts ) );\n\n\tob_start();\n\tdo_action( $action );\n\n\t$content = ob_get_contents();\n\tob_end_clean();\n\n\treturn $content;\n}", "public function output()\n {\n\t\t$this->page = new Template(FP_ROOT . '/include/templates/structure.page.php');\n\t\t$this->page->header = $this->header();\n\t\t$this->page->content = $this->content();\n\t\t$this->page->footer = $this->footer();\n\t\treturn $this->page->render();\n }", "function demolistposts_handler() {\n $demolph_output = demolistposts_function();\n //send back text to replace shortcode in post\n return $demolph_output;\n}", "function ahr_render_tpl( $path, $data = array() ) {\r\n \r\n ob_start();\r\n include( $path );\r\n $output = ob_get_clean();\r\n echo $output;\r\n \r\n}", "function shortcode() {\n\n ob_start();\n\n if ( is_user_logged_in() ) {\n $this->prepare_form();\n } else {\n printf( __( \"This page is restricted. Please %s to view this page.\", 'wpuf' ), wp_loginout( '', false ) );\n }\n\n $content = ob_get_contents();\n ob_end_clean();\n\n return $content;\n }", "public function output()\n\t{\n\t\t$this->do_tags();\n\n\t\t$this->final_output = '';\n\n\t\tforeach ($this->merged as $block)\n\t\t{\n\t\t\t$this->final_output .= $block;\n\t\t}\n\n\t\t$this->last_file = '';\n\t\t$this->values = array();\n\t\t$this->files = array();\n\t\t$this->merged = array();\n\n\t\t// the final template all put together\n\t\treturn $this->final_output;\n\t}", "public function output()\r\n {\r\n if (!file_exists($this->_template))\r\n trigger_error(' Template File not found ' . $this->_template);\r\n\r\n $output = file_get_contents($this->_template);\r\n\r\n foreach ($this->values as $key => $value) {\r\n $tagToReplace = \"[@$key]\";\r\n $output = str_replace($tagToReplace, $value, $output);\r\n }\r\n\r\n return $output;\r\n }", "public function output_shortcode(){\n if(!is_user_logged_in()){\n echo '<p>Please login</p>';\n\n return false;\n }\n\n ob_start();\n\n if(!function_exists('acf_form')){ return; }\n\n //user is currently filling out the form\n if(!this->current_multistep_form_is_finished()){\n $this->output_acf_form(array('post_type' => $this->post_type));\n }\n else{\n //form has been filled entirely\n $form_complete_message = get_field('kickoff_form_complete_message', 'option');\n echo apply_filters('the_content', wp_kses_post($form_complete_message));\n }\n\n return ob_get_clean();\n }", "function address_shortcode() {\n ob_start();\n get_template_part('address');\n return ob_get_clean();\n}", "public function Display()\n {\n include($this->template);\n }", "function Template()\r\n\t{\t\t\r\n\t\tglobal $_REQUEST;\t\t\r\n\t\t$theme = $this->theme;\r\n\t\t/*** Get Template By Page Id ***/\r\n\t\t$file = $this->get_template();\r\n\t\t\r\n\t\tif($_SETTINGS['debug'] == 1){\r\n\t\t\techo \"TEMPLATE: \".$file.\" <Br>\";\r\n\t\t}\r\n\t\t\r\n\t\t$websitepath = $this->website_path;\r\n\t\t//die(\"FILE: $file\");\r\n\t\t//exit();\r\n\t\tinclude''.$_SERVER['DOCUMENT_ROOT'].$websitepath.'themes/'.$theme.''.$file.'';\r\n\t}", "public function getTemplateFile();", "function historias_consultants_shortcode( $atts ) {\n ob_start();\n\n extract( shortcode_atts( array (\n 'type' => 'consultant',\n 'order' => 'ASC',\n 'orderby' => 'title',\n 'posts' => -1,\n ), $atts ) );\n\n $options = array(\n 'post_type' => $type,\n 'order' => $order,\n 'orderby' => $orderby,\n 'posts_per_page' => $posts,\n );\n\n $query = new WP_Query( $options );\n if ( $query->have_posts() ) { ?>\n <div class=\"media-container\">\n <?php while ( $query->have_posts() ) : $query->the_post(); ?>\n <div <?php post_class('media'); ?>>\n <?php if ( has_post_thumbnail() ) : ?>\n <div class=\"img\">\n <?php $thumbnail_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'medium' ); ?>\n <div class=\"consultant__avatar\" style=\"background-image:url(<?php echo $thumbnail_url[0] ?>)\">\n </div>\n </div>\n <?php endif ?>\n <div class=\"bd\">\n <h3 class=\"consultant__name\"><?php the_title(); ?></h3>\n <?php the_content(); ?>\n <?php edit_post_link( sprintf( __( '%s Edit', 'historias' ), '<i class=\"fa fa-pencil\"></i>' ) ); ?>\n </div>\n </div>\n <?php endwhile;\n wp_reset_postdata(); ?>\n </div>\n <?php $myvariable = ob_get_clean();\n return $myvariable;\n }\n}", "public function generate()\n {\n \n if (TL_MODE == 'BE') {\n $template = new \\BackendTemplate('be_wildcard');\n \n $template->wildcard = 'pdfbo';\n //$template->title = $this->headline;\n $template->title = \"\";\n $template->id = $this->id;\n $template->link = $this->name;\n $template->href = 'contao?do=themes&amp;table=tl_module&amp;act=edit&amp;id='.$this->id;\n \n return $template->parse();\n }\n \n return parent::generate();\n }", "function echotheme_flexslider_shortcode($atts)\n{\n\tob_start();\n\tget_template_part('part', 'flexslider-gallery');\n\treturn ob_get_clean();\n}", "function output_markup();", "public function on_shortcode ($atts, $content = '')\n {\n // NOTE: this function keeps the shortcode tags around because\n // we still need them in case we have to save the post.\n //\n // BUG: wpautop Works only if the shortcode tag and\n // attributes are on one line.\n\n // error_log (\"on_shortcode () ==> enter\");\n\n $this->page_has_shortcode = true;\n\n if (!$this->post_id) {\n // relevanssi uses get_the_content () instead of\n // the_content () and thus does not exercise the\n // 'the_content' filter stack\n return $content;\n }\n\n $atts = shortcode_atts (\n array (\n 'xml' => '',\n 'xslt' => '',\n 'params' => '',\n 'stringparams' => '',\n ),\n $atts\n );\n $xml = urljoin (get_opt ('xmlroot'), $atts['xml']);\n $xslt = urljoin (get_opt ('xsltroot'), $atts['xslt']);\n $params = wp_parse_args ($atts['params']);\n $stringparams = wp_parse_args ($atts['stringparams']);\n $xsltproc = get_opt ('xsltproc');\n\n $xml_file_time = intval (filemtime ($xml));\n $xslt_file_time = intval (filemtime ($xslt));\n\n if (!$xml_file_time) {\n return \"XML file $xml not found.\";\n }\n if (!$xslt_file_time) {\n return \"XSLT file $xslt not found.\";\n }\n\n // phpinfo ();\n // passthru ('/usr/bin/xsltproc --help');\n // passthru ('/vol/local/bin/tidy -help');\n\n // do a transform if any of page, xml, or xsl changed\n $do_transform = $this->cache_time < max ($this->modified_time, $xml_file_time, $xslt_file_time);\n // do a transform if http query param cap_xsl == 'reload'\n $do_transform = $do_transform || (get_query_var ('cap_xsl', '') == 'reload');\n $this->is_stale |= $do_transform;\n\n // do a revision only if page or xml changed\n $this->do_revision |= $this->cache_time < max ($this->modified_time, $xml_file_time);\n\n // Keep track of the XML files that make up this page.\n if (!in_array ($xml, $this->xmlfiles)) {\n $this->xmlfiles[] = $xml;\n }\n\n if (!$this->do_xsl || !$do_transform) {\n // Cached copy of this XSL is current. Return the cached copy. The\n // shortcode is already stripped, so we must add it again, so that\n // we can protect our content from the dreaded wp_autop.\n\n // error_log ('on_shortcode () ==> exit cached');\n return $this->wrap_in_shortcode ($content, $atts);\n }\n\n // The cached copy is out of date. Run the XSLT processor. Then add the\n // shortcodes back so we can save them into the db.\n\n $retval = 666;\n $cmdline = array ();\n $cmdline[] = $xsltproc;\n foreach ($params as $key => $value) {\n $key = escapeshellarg ($key);\n $value = escapeshellarg ($value);\n $cmdline[] = \"--param $key $value\";\n }\n foreach ($stringparams as $key => $value) {\n $key = escapeshellarg ($key);\n $value = escapeshellarg ($value);\n $cmdline[] = \"--stringparam $key $value\";\n }\n $cmdline[] = escapeshellarg ($xslt);\n $cmdline[] = escapeshellarg ($xml);\n // '| /vol/local/bin/tidy -qni -xml -utf8 -wrap 80'\n\n // redirect stderr to stdout to keep server error logs small\n // (seems to be a problem at uni-koeln.de)\n $cmdline[] = '2>/dev/null';\n\n $cmdline = join (' ', $cmdline);\n\n $output = array ();\n exec ($cmdline, $output, $retval);\n if (strncmp ($output[0], '<?xml ', 6) == 0) {\n array_shift ($output);\n }\n array_unshift ($output, '<div class=\"xsl-output\">');\n $output[] = '</div>';\n $content = join (\"\\n\", $output);\n\n // A hook to let other plugins know that we just transformed a file.\n // Used by the metadata extraction plugin to keep metadata up-to-date.\n do_action ('cap_xsl_transformed', $this->post_id, $xml, $xslt, $params, $stringparams);\n\n // error_log ('on_shortcode () ==> exit transformed');\n\n return $this->wrap_in_shortcode ($content, $atts);\n }", "public function render_template_options_template() { ?>\n\n <script type=\"text/html\" id=\"tmpl-cv-builder-template-options\">\n\n <div class=\"cv-modal-content-padding\">\n\n <a class=\"cv-composer-large-option has-icon\" data-action=\"prepend\">\n <i class=\"icon-up-bold\"></i>\n <strong><?php _e( 'Add Before Existing Content', 'canvys' ); ?></strong>\n <span><?php _e( 'Insert the selected template before the existing page content.', 'canvys' ); ?></span>\n </a>\n <a class=\"cv-composer-large-option has-icon\" data-action=\"replace\">\n <i class=\"icon-stop\"></i>\n <strong><?php _e( 'Replace Existing Content', 'canvys' ); ?></strong>\n <span><?php _e( 'Replace the existing page content with the selected template.', 'canvys' ); ?></span>\n </a>\n <a class=\"cv-composer-large-option has-icon\" data-action=\"append\">\n <i class=\"icon-down-bold\"></i>\n <strong><?php _e( 'Add After Existing Content', 'canvys' ); ?></strong>\n <span><?php _e( 'Insert the selected template after the existing page content.', 'canvys' ); ?></span>\n </a>\n\n </div>\n\n </script>\n\n <?php }", "public function getTemplate(): string;", "public function getTemplate(): string;", "public function getTemplate(): string;", "public function getTemplate(): string;", "function show_template() {\n\tglobal $template;\n\tprint_r($template);\n}", "protected function content_template() {}", "protected function content_template() {}", "public function run ()\n\t{\n\t\t$dump = template::dump ();\n\n\t\t$head = '';\n\t\tforeach ( $dump ['css'] as $file )\n\t\t{\n\t\t\t$head .= $this->twig->render ( 'system/html/web/snippets/css.twig', [ 'file' => $file, 'defer' => substr ( $file, 0, 2 ) == '//' ] );\n\t\t}\n\n\t\tforeach ( $dump ['js'] as $file )\n\t\t{\n\t\t\t$head .= $this->twig->render ( 'system/html/web/snippets/js.twig', [ 'file' => $file, 'defer' => substr ( $file, 0, 2 ) == '//' ] );\n\t\t}\n\n\t\t$body = '';\n\t\tforeach ( $dump ['templates'] as $template )\n\t\t{\n\t\t\t$body .= $this->twig->render ( $template ['path'], $template ['environment'] );\n\t\t}\n\n\t\t// We do not use die incase some modules need to run after the layout have been generated\n\t\techo $this->twig->render ('system/html/web/base.twig', [\n\t\t\t'head' => $head,\n\t\t\t'body' => $body\n\t\t] );\n\t}", "public function template();", "function do_shortcode($content, $ignore_html = \\false)\n {\n }", "public function generate()\r\n\t{\r\n\t\tif (TL_MODE == 'BE')\r\n\t\t{\r\n\t\t\t$objTemplate = new BackendTemplate('be_wildcard');\r\n\t\t\t$objTemplate->wildcard = '### ISOTOPE ECOMMERCE: KIENER CUSTOM FILTER ###';\r\n\t\t\t$objTemplate->title = $this->headline;\r\n\t\t\t$objTemplate->id = $this->id;\r\n\t\t\t$objTemplate->link = $this->name;\r\n\t\t\t$objTemplate->href = $this->Environment->script.'?do=modules&amp;act=edit&amp;id=' . $this->id;\r\n\r\n\t\t\treturn $objTemplate->parse();\r\n\t\t}\r\n\t\t\r\n\t\treturn parent::generate();\r\n\t}", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "function generalTemplate ($data){\n\t\t\tob_start();\t\t\n\t\t\tif(isset($data['title']) and isset($data['description'])):\n\t\t\t?>\n\t\t\t<div class=\"title text\">\n\t\t\t\t<h1><?php echo $data['title']; ?></h1>\n\t\t\t</div>\n \n <div id=\"description text\">\n\t\t\t\t<?php echo $data['description']; ?>\n </div>\n\t\t\t<?php\n\t\t\tendif;\n\t\t\t$output = ob_get_contents();\n\t\t\tob_end_clean();\t\n\t\t\t\n\t\t\treturn $output;\n\t\t}", "public function getTemplate() {}", "function br_rc_single_transcript_template() {\n\n\t$single_transcript_template = plugin_dir_path( dirname( __FILE__ ) );\n\t$single_transcript_template .= 'templates/br-rc-single-resource-transcript.php';\n\n\t// Filter the default path\n\t$single_transcript_template = apply_filters( 'br_rc_single_transcript_template_filter',\n\t\t\t\t\t\t\t\t\t\t\t\t $single_transcript_template );\n\n\t// Return the path\n\treturn $single_transcript_template;\n}", "function odm_get_template($slug, array $params = array(), $output = true) {\n if(!$output) ob_start();\n\n if (!$template_file = locate_template(\"inc/templates/{$slug}.php\", false, false)) {\n trigger_error(sprintf(__('Error locating %s for inclusion', 'sage'), $slug), E_USER_ERROR);\n }\n\n extract($params, EXTR_SKIP);\n\n require($template_file);\n\n if(!$output) \n return ob_get_clean();\n}", "public function display($templateFile='',$charset='',$contentType='',$content='',$prefix='') {\n G('viewStartTime');\n // View of the start tag\n tag('view_begin',$templateFile);\n // Parse and get the template content\n $content = $this->fetch($templateFile,$content,$prefix);\n // Output template content\n $this->render($content,$charset,$contentType);\n // View closing tag\n tag('view_end');\n }", "public function FrontendOutputPostGenerate() {\n\t\t\tfile_put_contents($this->location, $this->template);\n\t\t}", "function ffd_get_template_html( $template_name, $args = array(), $template_path = '', $default_path = '' ) {\r\n\tob_start();\r\n\tffd_get_template( $template_name, $args, $template_path, $default_path );\r\n\treturn ob_get_clean();\r\n}", "public static function create_preview()\n\t{\n\t\t$current = self::current_layout();\n\t\t\n\t\t//start output buffer\n\t\tob_start();\t\t\n\t\t\n\t\t//output current tmpl\n\t\trequire_once( THEME_LAYOUTS . $current . '/templates/tmpl-layout.php' );\t\n\t\t\n\t\t//get output buffer and store in an array\t\t\n\t\t$output = ob_get_clean();\n\t\t\n\t\treturn $output;\t\n\t}", "function my_shortcode() {\n\n$options = get_option('foodrecipecptplugin_settings');\nreturn \"<p>Recipe Name:\" . $options['foodrecipecptplugin_text_field_0'] . \"</p>\".\"<p>Category: \" . $options['foodrecipecptplugin_text_field_1'].\"</p>\".\"<p>Ingredients: \". $options['foodrecipecptplugin_text_field_2'].\"</p>\".\"<p>Recipe Instructions: \" . $options['foodrecipecptplugin_text_field_3'] . \"</p>\";\n}", "public function generate()\n\t{\n\t\tif (TL_MODE == 'BE')\n\t\t{\n\t\t\t$objTemplate = new \\BackendTemplate('be_wildcard');\n\n\t\t\t$objTemplate->wildcard = '### WEEKLY MENUS ###';\n\t\t\t$objTemplate->title = $this->headline;\n\t\t\t$objTemplate->id = $this->id;\n\t\t\t$objTemplate->link = $this->name;\n\t\t\t$objTemplate->href = 'contao/main.php?do=themes&amp;table=tl_module&amp;table=tl_module&amp;act=edit&amp;id=' . $this->id;\n\n\t\t\treturn $objTemplate->parse();\n\t\t}\n\n\t\treturn parent::generate();\n\t}", "public function generate()\n{\n$user_code=\"{% extends 'resource.twig.c' %}\\n\".$this->user_code;\n\n$buf=$this->gen->renderer->render_string($this->filename,$user_code\n\t,array('resource' =>$this, 'global' => $this->gen));\n$this->gen->file_write($this->dest_filename,$buf);\n}" ]
[ "0.7330106", "0.729067", "0.7058859", "0.70191", "0.69832873", "0.6894244", "0.68663245", "0.6846297", "0.6584655", "0.65807545", "0.6562797", "0.654471", "0.648997", "0.64553416", "0.64412135", "0.6409177", "0.6407938", "0.6407573", "0.63941586", "0.6376069", "0.6367218", "0.63663864", "0.6330332", "0.630402", "0.6301893", "0.6300872", "0.6253823", "0.6245308", "0.623943", "0.62372434", "0.62308776", "0.62235814", "0.62207925", "0.6217186", "0.6210734", "0.61976105", "0.6195802", "0.6190774", "0.6175188", "0.61674976", "0.6165796", "0.6153459", "0.61531496", "0.6148753", "0.61479264", "0.6113859", "0.6113028", "0.6089032", "0.60842466", "0.60835683", "0.6082426", "0.6080988", "0.60687864", "0.606449", "0.6064475", "0.6061327", "0.60534847", "0.6048868", "0.6042195", "0.60396117", "0.60372436", "0.6022104", "0.6019057", "0.6017087", "0.6013863", "0.60104865", "0.6008066", "0.60033613", "0.6000558", "0.5971397", "0.59681517", "0.59681284", "0.5957692", "0.5957692", "0.5957692", "0.5957692", "0.595348", "0.5951049", "0.5951049", "0.5950515", "0.59401274", "0.59291327", "0.59280515", "0.59279627", "0.59279627", "0.59279627", "0.59279627", "0.59279627", "0.59279627", "0.5924079", "0.5923407", "0.59230435", "0.5921666", "0.5914436", "0.5913081", "0.5909101", "0.59062064", "0.5903548", "0.58984166", "0.58945954" ]
0.5911558
95
Array of shortcode parameters.
public static function get_params() { $params = array( // General array( 'type' => 'textfield', 'heading' => esc_html__( 'Heading', 'total-theme-core' ), 'param_name' => 'heading', 'value' => 'Sample Heading', ), array( 'type' => 'textarea_html', 'holder' => 'div', 'heading' => esc_html__( 'Content', 'total-theme-core' ), 'param_name' => 'content', 'value' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed faucibus feugiat convallis. Integer nec eros et risus condimentum tristique vel vitae arcu.', ), array( 'type' => 'textfield', 'heading' => esc_html__( 'Element ID', 'total-theme-core' ), 'param_name' => 'unique_id', 'admin_label' => true, 'description' => vcex_shortcode_param_description( 'unique_id' ), ), array( 'type' => 'textfield', 'heading' => esc_html__( 'Extra class name', 'total-theme-core' ), 'description' => esc_html__( 'Style particular content element differently - add a class name and refer to it in custom CSS.', 'total-theme-core' ), 'param_name' => 'classes', ), array( 'type' => 'vcex_visibility', 'heading' => esc_html__( 'Visibility', 'total-theme-core' ), 'param_name' => 'visibility', ), array( 'type' => 'vcex_hover_animations', 'heading' => esc_html__( 'Hover Animation', 'total-theme-core'), 'param_name' => 'hover_animation', ), vcex_vc_map_add_css_animation(), array( 'type' => 'textfield', 'heading' => esc_html__( 'Animation Duration', 'total'), 'param_name' => 'animation_duration', 'description' => esc_html__( 'Enter your custom time in seconds (decimals allowed).', 'total'), ), array( 'type' => 'textfield', 'heading' => esc_html__( 'Animation Delay', 'total'), 'param_name' => 'animation_delay', 'description' => esc_html__( 'Enter your custom time in seconds (decimals allowed).', 'total'), ), // Style array( 'type' => 'dropdown', 'heading' => esc_html__( 'Style', 'total-theme-core' ), 'param_name' => 'style', 'value' => array( esc_html__( 'Default', 'total-theme-core' ) => '', esc_html__( 'Plain', 'total-theme-core' ) => 'one', esc_html__( 'Boxed Rounded', 'total-theme-core' ) => 'two', esc_html__( 'Boxed Square', 'total-theme-core' ) => 'three', esc_html__( 'Outline', 'total-theme-core' ) => 'four', ), 'group' => esc_html__( 'Style', 'total-theme-core' ), ), array( 'type' => 'dropdown', 'heading' => esc_html__( 'Bottom Margin', 'total-theme-core' ), 'param_name' => 'bottom_margin', 'value' => vcex_margin_choices(), 'admin_label' => true, 'group' => esc_html__( 'Style', 'total-theme-core' ), ), array( 'type' => 'dropdown', 'heading' => esc_html__( 'Shadow', 'total' ), 'param_name' => 'shadow', 'value' => vcex_shadow_choices(), 'group' => esc_html__( 'Style', 'total-theme-core' ), ), array( 'type' => 'vcex_text_alignments', 'heading' => esc_html__( 'Text Align', 'total-theme-core' ), 'param_name' => 'text_align', 'std' => '', 'group' => esc_html__( 'Style', 'total-theme-core' ), ), array( 'type' => 'vcex_trbl', 'heading' => esc_html__( 'Padding', 'total-theme-core' ), 'param_name' => 'padding', 'dependency' => array( 'element' => 'style', 'value' => array( 'two', 'three' ) ), 'group' => esc_html__( 'Style', 'total-theme-core' ), ), array( 'type' => 'vcex_colorpicker', 'heading' => esc_html__( 'Background Color', 'total-theme-core' ), 'param_name' => 'background', 'dependency' => array( 'element' => 'style', 'value' => array( 'two', 'three' ) ), 'group' => esc_html__( 'Style', 'total-theme-core' ), ), array( 'type' => 'vcex_colorpicker', 'heading' => esc_html__( 'Border Color', 'total-theme-core' ), 'param_name' => 'border_color', 'dependency' => array( 'element' => 'style', 'value' => array( 'four' ) ), 'group' => esc_html__( 'Style', 'total-theme-core' ), ), array( 'type' => 'textfield', 'heading' => esc_html__( 'Border Radius', 'total-theme-core' ), 'param_name' => 'border_radius', 'dependency' => array( 'element' => 'style', 'value' => array( 'two', 'three', 'four' ) ), 'group' => esc_html__( 'Style', 'total-theme-core' ), ), // Heading array( 'type' => 'vcex_colorpicker', 'heading' => esc_html__( 'Color', 'total-theme-core' ), 'param_name' => 'heading_color', 'group' => esc_html__( 'Heading', 'total-theme-core' ), ), array( 'type' => 'vcex_select_buttons', 'heading' => esc_html__( 'Tag', 'total-theme-core' ), 'param_name' => 'heading_type', 'group' => esc_html__( 'Heading', 'total-theme-core' ), 'std' => 'h2', 'choices' => 'html_tag', ), array( 'type' => 'vcex_font_family_select', 'heading' => esc_html__( 'Font Family', 'total-theme-core' ), 'param_name' => 'heading_font_family', 'group' => esc_html__( 'Heading', 'total-theme-core' ), ), array( 'type' => 'vcex_font_weight', 'heading' => esc_html__( 'Font Weight', 'total-theme-core' ), 'param_name' => 'heading_weight', 'group' => esc_html__( 'Heading', 'total-theme-core' ), ), array( 'type' => 'vcex_text_transforms', 'heading' => esc_html__( 'Text Transform', 'total-theme-core' ), 'param_name' => 'heading_transform', 'group' => esc_html__( 'Heading', 'total-theme-core' ), ), array( 'type' => 'vcex_responsive_sizes', 'target' => 'font-size', 'heading' => esc_html__( 'Font Size', 'total-theme-core' ), 'param_name' => 'heading_size', 'description' => vcex_shortcode_param_description( 'font_size' ), 'group' => esc_html__( 'Heading', 'total-theme-core' ), ), array( 'type' => 'vcex_trbl', 'heading' => esc_html__( 'Margin', 'total-theme-core' ), 'param_name' => 'heading_margin', 'description' => vcex_shortcode_param_description( 'margin' ), 'group' => esc_html__( 'Heading', 'total-theme-core' ), ), array( 'type' => 'textfield', 'heading' => esc_html__( 'Letter Spacing', 'total-theme-core' ), 'param_name' => 'heading_letter_spacing', 'description' => vcex_shortcode_param_description( 'letter_spacing' ), 'group' => esc_html__( 'Heading', 'total-theme-core' ), ), // Content array( 'type' => 'dropdown', 'heading' => esc_html__( 'Top Spacing', 'total-theme-core' ), 'param_name' => 'content_top_margin', 'value' => vcex_margin_choices(), 'group' => esc_html__( 'Content', 'total-theme-core' ), ), array( 'type' => 'vcex_colorpicker', 'heading' => esc_html__( 'Background', 'total-theme-core' ), 'param_name' => 'content_background', 'group' => esc_html__( 'Content', 'total-theme-core' ), ), array( 'type' => 'vcex_colorpicker', 'heading' => esc_html__( 'Color', 'total-theme-core' ), 'param_name' => 'content_color', 'group' => esc_html__( 'Content', 'total-theme-core' ), ), array( 'type' => 'vcex_trbl', 'heading' => esc_html__( 'Margin', 'total-theme-core' ), 'param_name' => 'content_margin', 'description' => vcex_shortcode_param_description( 'margin' ), 'group' => esc_html__( 'Content', 'total-theme-core' ), ), array( 'type' => 'vcex_trbl', 'heading' => esc_html__( 'Padding', 'total-theme-core' ), 'param_name' => 'content_padding', 'description' => vcex_shortcode_param_description( 'padding' ), 'group' => esc_html__( 'Content', 'total-theme-core' ), ), array( 'type' => 'vcex_responsive_sizes', 'target' => 'font-size', 'heading' => esc_html__( 'Font Size', 'total-theme-core' ), 'param_name' => 'content_font_size', 'description' => vcex_shortcode_param_description( 'font_size' ), 'group' => esc_html__( 'Content', 'total-theme-core' ), ), array( 'type' => 'vcex_font_weight', 'heading' => esc_html__( 'Font Weight', 'total-theme-core' ), 'param_name' => 'content_font_weight', 'group' => esc_html__( 'Content', 'total-theme-core' ), ), // Media array( 'type' => 'dropdown', 'heading' => esc_html__( 'Source', 'total-theme-core' ), 'param_name' => 'image_source', 'std' => 'media_library', 'value' => array( esc_html__( 'Media Library', 'total-theme-core' ) => 'media_library', esc_html__( 'External', 'total-theme-core' ) => 'external', ), 'group' => esc_html__( 'Media', 'total-theme-core' ), ), array( 'type' => 'attach_image', 'heading' => esc_html__( 'Image', 'total-theme-core' ), 'param_name' => 'image', 'dependency' => array( 'element' => 'image_source', 'value' => 'media_library' ), 'group' => esc_html__( 'Media', 'total-theme-core' ), ), array( 'type' => 'textfield', 'heading' => esc_html__( 'External Image URL', 'total-theme-core' ), 'param_name' => 'external_image', 'dependency' => array( 'element' => 'image_source', 'value' => 'external' ), 'group' => esc_html__( 'Media', 'total-theme-core' ), ), array( 'type' => 'textfield', 'heading' => esc_html__( 'Image Alt', 'total-theme-core' ), 'param_name' => 'image_alt', 'group' => esc_html__( 'Media', 'total-theme-core' ), 'dependency' => array( 'element' => 'image', 'not_empty' => true ), ), array( 'type' => 'textfield', 'heading' => esc_html__( 'Video link', 'total-theme-core' ), 'param_name' => 'video', 'description' => esc_html__( 'Enter in a video URL that is compatible with WordPress\'s built-in oEmbed feature.', 'total-theme-core' ), 'group' => esc_html__( 'Media', 'total-theme-core' ), ), array( 'type' => 'vcex_select_buttons', 'heading' => esc_html__( 'Image Style', 'total-theme-core' ), 'param_name' => 'img_style', 'std' => '', 'choices' => array( '' => esc_html__( 'Auto', 'total-theme-core' ), 'stretch' => esc_html__( 'Stretch', 'total-theme-core' ), ), 'group' => esc_html__( 'Media', 'total-theme-core' ), ), array( 'type' => 'vcex_text_alignments', 'heading' => esc_html__( 'Align', 'total-theme-core' ), 'param_name' => 'img_align', 'std' => '', 'group' => esc_html__( 'Media', 'total-theme-core' ), ), array( 'type' => 'dropdown', 'heading' => esc_html__( 'Border Radius', 'total-theme-core' ), 'param_name' => 'img_border_radius', 'value' => vcex_border_radius_choices(), 'group' => esc_html__( 'Media', 'total-theme-core' ), ), array( 'type' => 'dropdown', 'heading' => esc_html__( 'Bottom Margin', 'total-theme-core' ), 'param_name' => 'img_bottom_margin', 'value' => vcex_margin_choices(), 'group' => esc_html__( 'Media', 'total-theme-core' ), ), array( 'type' => 'vcex_image_sizes', 'heading' => esc_html__( 'Image Size', 'total-theme-core' ), 'param_name' => 'img_size', 'std' => 'wpex_custom', 'group' => esc_html__( 'Media', 'total-theme-core' ), 'dependency' => array( 'element' => 'image_source', 'value' => 'media_library' ), ), array( 'type' => 'vcex_image_crop_locations', 'heading' => esc_html__( 'Image Crop Location', 'total-theme-core' ), 'param_name' => 'img_crop', 'group' => esc_html__( 'Media', 'total-theme-core' ), 'dependency' => array( 'element' => 'img_size', 'value' => 'wpex_custom' ), 'dependency' => array( 'element' => 'image_source', 'value' => 'media_library' ), ), array( 'type' => 'textfield', 'heading' => esc_html__( 'Image Crop Width', 'total-theme-core' ), 'param_name' => 'img_width', 'group' => esc_html__( 'Media', 'total-theme-core' ), 'dependency' => array( 'element' => 'img_size', 'value' => 'wpex_custom' ), ), array( 'type' => 'textfield', 'heading' => esc_html__( 'Image Crop Height', 'total-theme-core' ), 'param_name' => 'img_height', 'description' => esc_html__( 'Leave empty to disable vertical cropping and keep image proportions.', 'total-theme-core' ), 'group' => esc_html__( 'Media', 'total-theme-core' ), 'dependency' => array( 'element' => 'img_size', 'value' => 'wpex_custom' ), ), array( 'type' => 'vcex_image_filters', 'heading' => esc_html__( 'Image Filter', 'total-theme-core' ), 'param_name' => 'img_filter', 'group' => esc_html__( 'Media', 'total-theme-core' ), ), array( 'type' => 'vcex_image_hovers', 'heading' => esc_html__( 'CSS3 Image Hover', 'total-theme-core' ), 'param_name' => 'img_hover_style', 'group' => esc_html__( 'Media', 'total-theme-core' ), ), // Link array( 'type' => 'vc_link', 'heading' => esc_html__( 'URL', 'total-theme-core' ), 'param_name' => 'url', 'group' => esc_html__( 'Link', 'total-theme-core' ), ), array( 'type' => 'vcex_ofswitch', 'heading' => esc_html__( 'Local Scroll', 'total-theme-core' ), 'param_name' => 'url_local_scroll', 'group' => esc_html__( 'Link', 'total-theme-core' ), 'std' => 'false', ), // CSS array( 'type' => 'css_editor', 'heading' => esc_html__( 'CSS box', 'total-theme-core' ), 'param_name' => 'css', 'group' => esc_html__( 'CSS', 'total-theme-core' ), ), ); return apply_filters( 'vcex_shortcode_params', $params, 'vcex_teaser' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getParamsListToInject(): array\n {\n return [\n 'sectionTitle',\n 'sectionSubtitle',\n 'tiles'\n ];\n }", "private static function ParamList ()\n {\n return array (\n \"a\" => array (\n \"charset\", \"coords\", \"href\",\n \"hreflang\", \"name\", \"rel\",\n \"rev\", \"shape\", \"target\",\n \"style\",\n ),\n \"button\" => array (\n \"disabled\", \"name\", \"type\",\n \"value\", \"accesskey\", \"class\",\n \"dir\", \"id\", \"lang\", \"style\",\n \"tabindex\", \"title\", \"xml:lang\",\n ),\n );\n }", "public function getParameters()\n {\n return array();\n }", "public static function get_params() {\n\n\t\t\t$params = array(\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Shortcode', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'content',\n\t\t\t\t\t'admin_label' => true,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'dropdown',\n\t\t\t\t\t'heading' => esc_html__( 'Bottom Margin', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'bottom_margin',\n\t\t\t\t\t'value' => vcex_margin_choices(),\n\t\t\t\t\t'admin_label' => true,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_visibility',\n\t\t\t\t\t'heading' => esc_html__( 'Visibility', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'visibility',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Extra class name', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'el_class',\n\t\t\t\t\t'description' => esc_html__( 'Style particular content element differently - add a class name and refer to it in custom CSS.', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tvcex_vc_map_add_css_animation(),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Animation Duration', 'total'),\n\t\t\t\t\t'param_name' => 'animation_duration',\n\t\t\t\t\t'description' => esc_html__( 'Enter your custom time in seconds (decimals allowed).', 'total'),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Animation Delay', 'total'),\n\t\t\t\t\t'param_name' => 'animation_delay',\n\t\t\t\t\t'description' => esc_html__( 'Enter your custom time in seconds (decimals allowed).', 'total'),\n\t\t\t\t),\n\t\t\t);\n\n\t\t\treturn apply_filters( 'vcex_shortcode_params', $params, 'vcex_shortcode' );\n\n\t\t}", "public function parameters(): array;", "public function getAssembledParams()\r\n {\r\n return array();\r\n }", "public static function get_params() {\n\n\t\t\t$params = array(\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'admin_label' => true,\n\t\t\t\t\t'heading' => esc_html__( 'Height', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'size',\n\t\t\t\t\t'value' => '30px',\n\t\t\t\t\t'description' => vcex_shortcode_param_description( 'height' ),\n\t\t\t\t\t'dependency' => array( 'element' => 'responsive', 'value' => 'false' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_ofswitch',\n\t\t\t\t\t'heading' => esc_html__( 'Responsive?', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'responsive',\n\t\t\t\t\t'value' => 'false',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_responsive_sizes',\n\t\t\t\t\t'heading' => esc_html__( 'Height', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'size_responsive',\n\t\t\t\t\t'value' => '30px',\n\t\t\t\t\t'description' => vcex_shortcode_param_description( 'height' ),\n\t\t\t\t\t'dependency' => array( 'element' => 'responsive', 'value' => 'true' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Custom Classes', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'class',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_visibility',\n\t\t\t\t\t'heading' => esc_html__( 'Visibility', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'visibility',\n\t\t\t\t),\n\t\t\t);\n\n\t\t\treturn apply_filters( 'vcex_shortcode_params', $params, 'vcex_spacing' );\n\n\t\t}", "public function getParameters(): array;", "public function params(): array;", "public function parameters(): array\n {\n return $this->getAttribute('parameters');\n }", "function getParameters(): array;", "public function get_embed_params() {\n $settings = $this->get_settings_for_display();\n\n $params = [];\n\n if ( $settings['autoplay'] && ! $this->has_image_overlay() ) {\n $params['autoplay'] = '1';\n }\n\n $params_dictionary = [];\n\n\n foreach ( $params_dictionary as $key => $param_name ) {\n $setting_name = $param_name;\n\n if ( is_string( $key ) ) {\n $setting_name = $key;\n }\n\n $setting_value = $settings[ $setting_name ] ? '1' : '0';\n\n $params[ $param_name ] = $setting_value;\n }\n\n return $params;\n }", "public function parameters()\n\t{\n\t\treturn [\n\t\t\t'code' => $this->has('code')\n\t\t];\n\t}", "protected function getArguments()\n {\n return array(\n );\n }", "public function params()\n\t{\n\t\t$r = array();\n\t\tforeach (func_get_args() as $name)\n\t\t\t$r[] = @$this->params[$name];\n\t\treturn $r;\n\t}", "public function getArrayParameters(): array;", "public static function get_parameters() { \r\n $retVal = array_merge(\r\n parent::get_parameters(),\r\n array(\r\n array(\r\n 'name' => 'square_location_type_id',\r\n 'caption' => 'Square location type id',\r\n 'description' => 'ID of the NPMS square location type.',\r\n 'type'=>'string',\r\n 'group' => 'IDs',\r\n ),\r\n array(\r\n 'name' => 'user_square_attr_id',\r\n 'caption' => 'User square attr id',\r\n 'description' => 'ID of the person attribute that holds user square allocations.',\r\n 'type'=>'string',\r\n 'group' => 'IDs',\r\n ),\r\n )\r\n );\r\n return $retVal;\r\n }", "public function cpt_params( ){\n\t\t\t\n\t\t\t$a = $this->cpt_args;\n\t\t\t\n\t\t\t$labels = $this->cpt_labels();\n\t\t\t\n\t\t\t$caps = $this->set_caps(\n\t\t\t\t\tarray( \n\t\t\t\t\t\t'cap_posts' => $a[ 'cap_posts' ], \n\t\t\t\t\t\t'cap_post' => $a[ 'cap_post' ] )\n\t\t\t\t);\n\t\t\t\n\t\t\t\n\t\t\t$params = array(\n\t\t\t\t'labels' => $labels,\n\t\t\t\t'capabilities' => $caps, \n\t\t\t\t'description' => $a[ 'description' ],\n\t\t\t\t'public' => true ,\n\t\t\t\t'publicly_queryable' => true,\n\t\t\t\t'query_var' => true,\n\t\t\t\t'show_ui' => true,\n\t\t\t\t'show_in_menu' => $a[ 'show_in_menu' ], //Toggle here to hide from main menu. \n\t\t\t\t'has_archive' => true, \n\t\t\t\t'hierarchical' => true,\n\t\t\t\t'menu_position' => $a[ 'menu_pos' ],\n\t\t\t\t'menu_icon' => 'dashicons-'. $a[ 'menu_icon' ],\n\t\t\t\t'supports' => $a[ 'supports' ], \n\t\t\t\t'capability_type'=>'post',\n\t\t\t\t'map_meta_cap'=> true, \n\t\t\t\t'rewrite' => array( 'slug' => $a[ 'rewrite' ] )\n\t\t\t);\n\t\t\t\n\t\t\treturn $params;\n\t\t\t\n\t\t}", "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "public function getSettingParameters() : array\n {\n \treturn $this->settings['parameters'];\n }", "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function get_arguments(): array {\n\t\treturn [];\n\t}", "public function getParams(){\n if($params = json_decode($this->params)){\n\n // si la variable es un array, tengo que concatenar sus valores porque el component/slot no admite paso de arrays\n foreach ($params as &$value) {\n if(is_array($value)){\n $value = implode($value,',');\n }\n }\n\n return $params;\n }\n else{\n return [];\n }\n }", "protected function getArguments() {\n\t\treturn array(\n\t\t);\n\t}", "public function getParams(): array;", "public function getParams() :array;", "protected function getArguments()\n {\n return [\n\n ];\n }", "protected function getArguments()\n {\n return [\n\n ];\n }", "public function getParameters() : array\n {\n return $this->parameters;\n }", "public function shortcode_parameters( $params ) {\n\t\t// General tab\n\t\t$params[] = array(\n\t\t\t'type' => 'textfield',\n\t\t\t'heading' => __( 'Widget Title', 'mountain' ),\n\t\t\t'description' => __( 'Enter text which will be used as widget title. Leave blank if no title is needed.', 'mountain' ),\n\t\t\t'param_name' => 'widget_title'\n\t\t);\n\n\t\t$params[] = array(\n\t\t\t'type' => 'textfield',\n\t\t\t'heading' => __( 'Categories', 'mountain' ),\n\t\t\t'description' => __( 'If you want to narrow output, enter category names here. Note: Only listed categories will be included.', 'mountain' ),\n\t\t\t'param_name' => 'categories'\n\t\t);\n\n\t\t$params[] = array(\n\t\t\t'type' => 'textfield',\n\t\t\t'heading' => __( 'Tags', 'mountain' ),\n\t\t\t'description' => __( 'If you want to narrow output, enter tag names here. Note: Only listed tags will be included.', 'mountain' ),\n\t\t\t'param_name' => 'tags'\n\t\t);\n\n\t\t$params[] = array(\n\t\t\t'type' => 'dropdown',\n\t\t\t'heading' => __( 'Display Mode', 'mountain' ),\n\t\t\t'param_name' => 'mode',\n\t\t\t'std' => 3,\n\t\t\t'value' => array(\n\t\t\t\t__( 'Grid Classic', 'mountain' ) => 'grid',\n\t\t\t\t__( 'Grid Masonry', 'mountain' ) => 'masonry',\n\t\t\t\t__( 'Grid No Margin', 'mountain' ) => 'no-margin',\n\t\t\t\t__( 'Carousel', 'mountain' ) => 'carousel'\n\t\t\t)\n\t\t);\n\n\t\t$params[] = array(\n\t\t\t'type' => 'dropdown',\n\t\t\t'heading' => __( 'Columns', 'mountain' ),\n\t\t\t'description' => __( 'The number of columns will be shown', 'mountain' ),\n\t\t\t'param_name' => 'columns',\n\t\t\t'std' => 3,\n\t\t\t'value' => array(\n\t\t\t\t__( '1 Column', 'mountain' ) => 1,\n\t\t\t\t__( '2 Columns', 'mountain' ) => 2,\n\t\t\t\t__( '3 Columns', 'mountain' ) => 3,\n\t\t\t\t__( '4 Columns', 'mountain' ) => 4,\n\t\t\t\t__( '5 Columns', 'mountain' ) => 5,\n\t\t\t)\n\t\t);\n\n\t\t$params[] = array(\n\t\t\t'type' => 'dropdown',\n\t\t\t'heading' => __( 'Show Items Filter', 'mountain' ),\n\t\t\t'param_name' => 'filter',\n\t\t\t'std' => 'yes',\n\t\t\t'value' => array(\n\t\t\t\t__( 'Yes', 'mountain' ) => 'yes',\n\t\t\t\t__( 'No', 'mountain' ) => 'no'\n\t\t\t)\n\t\t);\n\n\t\t$params[] = array(\n\t\t\t'type' => 'dropdown',\n\t\t\t'heading' => __( 'Filter By', 'mountain' ),\n\t\t\t'param_name' => 'filter_by',\n\t\t\t'std' => 'category',\n\t\t\t'value' => array(\n\t\t\t\t__( 'Categories', 'mountain' ) => 'category',\n\t\t\t\t__( 'Tags', 'mountain' ) => 'tag'\n\t\t\t)\n\t\t);\n\n\t\t$params[] = array(\n\t\t\t'type' => 'textfield',\n\t\t\t'heading' => __( 'Limit', 'mountain' ),\n\t\t\t'description' => __( 'The number of posts will be shown', 'mountain' ),\n\t\t\t'param_name' => 'limit',\n\t\t\t'value' => 9\n\t\t);\n\n\t\t$params[] = array(\n\t\t\t'type' => 'textfield',\n\t\t\t'heading' => __( 'Offset', 'mountain' ),\n\t\t\t'description' => __( 'The number of posts to pass over', 'mountain' ),\n\t\t\t'param_name' => 'offset',\n\t\t\t'value' => 0\n\t\t);\n\n\t\t$params[] = array(\n\t\t\t'type' => 'textfield',\n\t\t\t'heading' => __( 'Thumbnail Size', 'mountain' ),\n\t\t\t'description' => __( 'Enter image size. Example: \"thumbnail\", \"medium\", \"large\", \"full\" or other sizes defined by current theme. Alternatively enter image size in pixels: 200x100 (Width x Height). Leave empty to use \"thumbnail\" size.', 'mountain' ),\n\t\t\t'param_name' => 'thumbnail_size'\n\t\t);\n\n\t\t$params[] = array(\n\t\t\t'type' => 'dropdown',\n\t\t\t'heading' => __( 'Order By', 'mountain' ),\n\t\t\t'description' => __( 'Select how to sort retrieved posts.', 'mountain' ),\n\t\t\t'param_name' => 'order',\n\t\t\t'std' => 'date',\n\t\t\t'value' => array(\n\t\t\t\t__( 'Date', 'mountain' ) => 'date',\n\t\t\t\t__( 'ID', 'mountain' ) => 'ID',\n\t\t\t\t__( 'Author', 'mountain' ) => 'author',\n\t\t\t\t__( 'Title', 'mountain' ) => 'title',\n\t\t\t\t__( 'Modified', 'mountain' ) => 'modified',\n\t\t\t\t__( 'Random', 'mountain' ) => 'rand',\n\t\t\t\t__( 'Comment count', 'mountain' ) => 'comment_count',\n\t\t\t\t__( 'Menu order', 'mountain' ) => 'menu_order'\n\t\t\t)\n\t\t);\n\n\t\t$params[] = array(\n\t\t\t'type' => 'dropdown',\n\t\t\t'heading' => __( 'Order Direction', 'mountain' ),\n\t\t\t'description' => __( 'Designates the ascending or descending order.', 'mountain' ),\n\t\t\t'param_name' => 'direction',\n\t\t\t'std' => 'DESC',\n\t\t\t'value' => array(\n\t\t\t\t__( 'Ascending', 'mountain' ) => 'ASC',\n\t\t\t\t__( 'Descending', 'mountain' ) => 'DESC'\n\t\t\t)\n\t\t);\n\n\t\t$params[] = array(\n\t\t\t'type' => 'textfield',\n\t\t\t'heading' => __( 'Extra Class', 'mountain' ),\n\t\t\t'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'mountain' ),\n\t\t\t'param_name' => 'class'\n\t\t);\n\n\t\t// Carousel Options\n\t\t$params[] = array(\n\t\t\t'type' => 'dropdown',\n\t\t\t'heading' => __( 'Autoplay?', 'mountain' ),\n\t\t\t'param_name' => 'autoplay',\n\t\t\t'group' => __( 'Carousel Options', 'mountain' ),\n\t\t\t'std' => 'yes',\n\t\t\t'value' => array(\n\t\t\t\t__( 'Yes', 'mountain' ) => 'yes',\n\t\t\t\t__( 'No', 'mountain' ) => 'no'\n\t\t\t)\n\t\t);\n\n\t\t$params[] = array(\n\t\t\t'type' => 'dropdown',\n\t\t\t'heading' => __( 'Stop On Hover?', 'mountain' ),\n\t\t\t'description' => __( 'Rewind speed in milliseconds', 'mountain' ),\n\t\t\t'param_name' => 'hover_stop',\n\t\t\t'group' => __( 'Carousel Options', 'mountain' ),\n\t\t\t'std' => 'yes',\n\t\t\t'value' => array(\n\t\t\t\t__( 'Yes', 'mountain' ) => 'yes',\n\t\t\t\t__( 'No', 'mountain' ) => 'no'\n\t\t\t)\n\t\t);\n\n\t\t$params[] = array(\n\t\t\t'type' => 'checkbox',\n\t\t\t'heading' => __( 'Slider Controls', 'mountain' ),\n\t\t\t'param_name' => 'controls',\n\t\t\t'group' => __( 'Carousel Options', 'mountain' ),\n\t\t\t'std' => 'navigation,rewind-navigation,pagination,pagination-numbers',\n\t\t\t'value' => array(\n\t\t\t\t__( 'Navigation', 'mountain' ) => 'navigation',\n\t\t\t\t__( 'Rewind Navigation', 'mountain' ) => 'rewind-navigation',\n\t\t\t\t__( 'Pagination', 'mountain' ) => 'pagination',\n\t\t\t\t__( 'Pagination Numbers', 'mountain' ) => 'pagination-numbers'\n\t\t\t)\n\t\t);\n\n\t\t$params[] = array(\n\t\t\t'type' => 'dropdown',\n\t\t\t'heading' => __( 'Scroll Per Page?', 'mountain' ),\n\t\t\t'param_name' => 'scroll_page',\n\t\t\t'group' => __( 'Carousel Options', 'mountain' ),\n\t\t\t'std' => 'yes',\n\t\t\t'value' => array(\n\t\t\t\t__( 'Yes', 'mountain' ) => 'yes',\n\t\t\t\t__( 'No', 'mountain' ) => 'no'\n\t\t\t)\n\t\t);\n\n\t\t$params[] = array(\n\t\t\t'type' => 'dropdown',\n\t\t\t'heading' => __( 'Allow Mouse Drag?', 'mountain' ),\n\t\t\t'param_name' => 'mouse_drag',\n\t\t\t'group' => __( 'Carousel Options', 'mountain' ),\n\t\t\t'std' => 'yes',\n\t\t\t'value' => array(\n\t\t\t\t__( 'Yes', 'mountain' ) => 'yes',\n\t\t\t\t__( 'No', 'mountain' ) => 'no'\n\t\t\t)\n\t\t);\n\n\t\t$params[] = array(\n\t\t\t'type' => 'dropdown',\n\t\t\t'heading' => __( 'Allow Touch Drag?', 'mountain' ),\n\t\t\t'param_name' => 'touch_drag',\n\t\t\t'group' => __( 'Carousel Options', 'mountain' ),\n\t\t\t'std' => 'yes',\n\t\t\t'value' => array(\n\t\t\t\t__( 'Yes', 'mountain' ) => 'yes',\n\t\t\t\t__( 'No', 'mountain' ) => 'no'\n\t\t\t)\n\t\t);\n\n\t\t// Speed\n\t\t$params[] = array(\n\t\t\t'type' => 'textfield',\n\t\t\t'heading' => __( 'Autoplay Speed', 'mountain' ),\n\t\t\t'description' => __( 'Autoplay speed in milliseconds', 'mountain' ),\n\t\t\t'param_name' => 'autoplay_speed',\n\t\t\t'group' => __( 'Speed', 'mountain' ),\n\t\t\t'value' => 5000\n\t\t);\n\n\t\t$params[] = array(\n\t\t\t'type' => 'textfield',\n\t\t\t'heading' => __( 'Slide Speed', 'mountain' ),\n\t\t\t'description' => __( 'Slide speed in milliseconds', 'mountain' ),\n\t\t\t'param_name' => 'slide_speed',\n\t\t\t'group' => __( 'Speed', 'mountain' ),\n\t\t\t'value' => 200\n\t\t);\n\n\t\t$params[] = array(\n\t\t\t'type' => 'textfield',\n\t\t\t'heading' => __( 'Pagination Speed', 'mountain' ),\n\t\t\t'description' => __( 'Pagination speed in milliseconds', 'mountain' ),\n\t\t\t'param_name' => 'pagination_speed',\n\t\t\t'group' => __( 'Speed', 'mountain' ),\n\t\t\t'value' => 200\n\t\t);\n\n\t\t$params[] = array(\n\t\t\t'type' => 'textfield',\n\t\t\t'heading' => __( 'Rewind Speed', 'mountain' ),\n\t\t\t'description' => __( 'Rewind speed in milliseconds', 'mountain' ),\n\t\t\t'param_name' => 'rewind_speed',\n\t\t\t'group' => __( 'Speed', 'mountain' ),\n\t\t\t'value' => 200\n\t\t);\n\n\t\t// Responsive\n\t\t$params[] = array(\n\t\t\t'type' => 'dropdown',\n\t\t\t'heading' => __( 'Enable Responsive?', 'mountain' ),\n\t\t\t'param_name' => 'responsive',\n\t\t\t'group' => __( 'Responsive', 'mountain' ),\n\t\t\t'std' => 'yes',\n\t\t\t'value' => array(\n\t\t\t\t__( 'Yes', 'mountain' ) => 'yes',\n\t\t\t\t__( 'No', 'mountain' ) => 'no'\n\t\t\t)\n\t\t);\n\n\t\t$params[] = array(\n\t\t\t'type' => 'dropdown',\n\t\t\t'heading' => __( 'Items On Tablet', 'mountain' ),\n\t\t\t'description' => __( 'The maximum amount of items displayed at a time on tablet device', 'mountain' ),\n\t\t\t'param_name' => 'tablet_items',\n\t\t\t'group' => __( 'Responsive', 'mountain' ),\n\t\t\t'value' => array_combine( range( 1, 6 ), range( 1, 6 ) ),\n\t\t\t'std' => 2\n\t\t);\n\n\t\t$params[] = array(\n\t\t\t'type' => 'dropdown',\n\t\t\t'heading' => __( 'Items On Mobile', 'mountain' ),\n\t\t\t'description' => __( 'The maximum amount of items displayed at a time on mobile device', 'mountain' ),\n\t\t\t'param_name' => 'mobile_items',\n\t\t\t'group' => __( 'Responsive', 'mountain' ),\n\t\t\t'value' => array_combine( range( 1, 6 ), range( 1, 6 ) ),\n\t\t\t'std' => 1\n\t\t);\n\n\t\t$params[] = array(\n\t\t\t'type' => 'css_editor',\n\t\t\t'param_name' => 'css',\n\t\t\t'group' => __( 'Design Options', 'mountain' )\n\t\t);\n\t\treturn $params;\n\t}", "private function post_params() {\n return [\n 'title' => $this->params['title'],\n 'excerpt' => $this->params['excerpt'],\n 'content' => $this->params['content'],\n 'tags' => $this->params['tags']\n ];\n }", "protected function getArguments()\n {\n $arg = array();\n $arg[InstagramSocialMedia::PARAM_ACCESS_TOKEN] = $this->instagram_access_token;\n $arg[FacebookSocialMedia::PARAM_ACCESS_TOKEN] = $this->facebook_access_token;\n \n return $arg;\n }", "protected function getArguments()\n {\n return [\n ];\n }", "public function parameters()\n\t{\n\t\treturn [\n\t\t\t'parent_id' => $this->input('parent_id'),\n\t\t\t'title' => $this->input('title'),\n\t\t\t'icon' => $this->input('icon'),\n\t\t\t'description' => $this->input('description'),\n\t\t\t'is_active' => $this->has('is_active')\n\t\t];\n\t}", "protected function getArguments()\n\t{\n\t\treturn [\n\n\t\t];\n\t}", "protected function getArguments()\n\t{\n\t\treturn [\n\n\t\t];\n\t}", "public function getParameters(): array\n {\n return $this->parameters;\n }", "public function getParameters(): array\n {\n return $this->parameters;\n }", "public function getParameters(): array\n {\n return $this->parameters;\n }", "public function getParameters(): array\n {\n return $this->parameters;\n }", "public static function settings_to_params() {\n\t\t\treturn [\n\t\t\t\t'full_width_border_color' => 'border_color',\n\t\t\t\t'full_width_border_size' => 'border_size',\n\t\t\t\t'full_width_bg_color' => 'background_color',\n\t\t\t\t'full_width_gradient_start_color' => 'gradient_start_color',\n\t\t\t\t'full_width_gradient_end_color' => 'gradient_end_color',\n\t\t\t\t'link_color' => 'link_color',\n\t\t\t\t'link_hover_color' => 'primary_color',\n\t\t\t];\n\t\t}", "protected function getArguments()\n\t{\n\t\treturn array();\n\t}", "protected function getArguments()\n\t{\n\t\treturn array();\n\t}", "protected function getArguments()\n\t{\n\t\treturn array();\n\t}", "protected function getArguments()\n\t{\n\t\treturn array();\n\t}", "protected function getArguments()\n\t{\n\t\treturn array();\n\t}", "protected function getArguments()\n\t{\n\t\treturn array();\n\t}", "protected function getArguments()\n\t{\n\t\treturn array();\n\t}", "protected function getArguments()\n\t{\n\t\treturn array();\n\t}", "protected function getArguments()\n\t{\n\t\treturn array();\n\t}", "protected function getArguments()\n\t{\n\t\treturn array();\n\t}", "protected function getArguments()\n\t{\n\t\treturn array();\n\t}", "protected function getArguments()\n\t{\n\t\treturn array();\n\t}", "private function compileParameters()\n {\n $params = [\n 'queueName' => property_exists($this, 'queueName') ? $this->queueName : null,\n 'exchangeName' => property_exists($this, 'exchangeName') ? $this->exchangeName : null,\n 'exchangeType' => property_exists($this, 'exchangeType') ? $this->exchangeType : null,\n 'passive' => property_exists($this, 'passive') ? $this->passive : null,\n 'durable' => property_exists($this, 'durable') ? $this->durable : null,\n 'autoDelete' => property_exists($this, 'autoDelete') ? $this->autoDelete : null,\n 'deliveryMode' => property_exists($this, 'deliveryMode') ? $this->deliveryMode : null,\n ];\n\n return array_filter($params);\n }", "protected function getArguments()\n\t{\n\t\treturn [\n\t\t];\n\t}", "protected function getArguments() {\n\t\treturn array();\n\t}", "protected function queryParameters()\n {\n return [\n 'access_key' => $this->accessKey,\n 'base' => $this->defaultCurrency,\n 'symbols' => implode(',', $this->currencies()),\n ];\n }", "protected function getArguments()\n {\n return array(\n array('types', InputArgument::IS_ARRAY),\n );\n }", "protected function getArguments()\r\n\t{\r\n\t\treturn array();\r\n\t}", "protected function getArguments()\r\n\t{\r\n\t\treturn array();\r\n\t}", "protected function getArguments() : array\n {\n return [];\n }", "protected function getArguments()\n {\n return array();\n }", "protected function getArguments()\n {\n return array();\n }", "protected function getArguments()\n {\n return array();\n }", "protected function getArguments()\n {\n return array();\n }", "protected function getArguments()\n {\n return array();\n }", "protected function getArguments()\n {\n return array();\n }", "public function getParameters();", "public function getParameters();", "public function getParameters();", "public function getParameters();", "public function getParameters();", "public function getParameters();", "public function getParameters();", "public function getParameters();", "public function parameters();", "public function parameters();", "protected function queryParameters()\n {\n return [\n 'app_id' => $this->accessKey,\n 'base' => $this->defaultCurrency,\n 'symbols' => collect($this->currencies())->implode(','),\n ];\n }", "protected function getArguments(): array\n {\n return [];\n }", "public function getAllParams():array\n {\n $params = $this->getParams();\n $params = array_add($params,'MerchantId',$this->getEchargeObject()->getMerchantId());\n return $params;\n }", "private function setArguments()\n {\n return array(\n 'labels' => $this->labels,\n 'public' => $this->public,\n 'menuIcon' => $this->menuIcon,\n 'capabilities' => $this->capabilities,\n 'supports' => $this->supports,\n );\n }", "protected function _getParams()\n {\n $aResult = array();\n $aParams = (array)$this->_getContainer()->getConfig()->getRequestParameter('aParams');\n\n foreach ($aParams as $sKey => $sValue) {\n $aResult[html_entity_decode($sKey)] = html_entity_decode($sValue);\n }\n\n return $aResult;\n }", "function _completeModuleParamsArray()\n {\n $params = array(\n 'show_numbers'=>false,\n 'fields'=>'',\n 'show_comments'=>false,\n 'comments_words'=>10,\n 'tn_mode'=>'crop',\n 'tn_size'=>'100x100',\n 'tn_show'=>true,\n 'tn_position'=>'left',\n 'columns'=>1,\n 'orientation'=>'horizontal',\n 'slideshow'=>false,\n 'slideshow_interval'=>6,\n 'nav_position'=>'bottom'\n );\n\n $this->params['module'] = array_merge($params, $this->params['module']);\n }", "protected function getParameters(): array\n {\n return array(\n \"offset\" => $this->offset,\n \"max\" => $this->limit,\n );\n }", "public function getParams();", "public function getParams();", "public function getParams();", "public function getParams();", "public function getParams();", "public function getParams();", "public function getParams();" ]
[ "0.6760509", "0.67428076", "0.6679754", "0.66720974", "0.66237247", "0.6500914", "0.6493657", "0.64737517", "0.6448983", "0.6444302", "0.64024913", "0.6360206", "0.6352497", "0.6301536", "0.6279113", "0.62610877", "0.62238526", "0.6219414", "0.62165016", "0.62165016", "0.62165016", "0.62165016", "0.6204042", "0.6201397", "0.6201397", "0.6201397", "0.6201397", "0.6201397", "0.6201397", "0.6201397", "0.6197155", "0.61941975", "0.6188261", "0.61881673", "0.6185545", "0.6181435", "0.6181435", "0.617482", "0.6134488", "0.6125111", "0.61249626", "0.61230916", "0.6098379", "0.6085463", "0.6085463", "0.60843307", "0.60843307", "0.60843307", "0.60843307", "0.6077983", "0.60670304", "0.60670304", "0.60670304", "0.60670304", "0.60670304", "0.60670304", "0.60670304", "0.60670304", "0.60670304", "0.60670304", "0.60670304", "0.60670304", "0.6054261", "0.6050155", "0.6042703", "0.60416895", "0.6037937", "0.6021103", "0.6021103", "0.60168654", "0.6005067", "0.6005067", "0.6005067", "0.6005067", "0.6005067", "0.6005067", "0.5995897", "0.5995897", "0.5995897", "0.5995897", "0.5995897", "0.5995897", "0.5995897", "0.5995897", "0.59925735", "0.59925735", "0.59916955", "0.59791833", "0.59698", "0.5968841", "0.59665555", "0.59467834", "0.59458226", "0.5938666", "0.5938666", "0.5938666", "0.5938666", "0.5938666", "0.5938666", "0.5938666" ]
0.65749663
5
Transform value to standart calculations.
private function transX($x) { return ($x - $this->meanValue) / $this->standardDeviation; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function transform($value);", "abstract protected function calculateValue();", "public function transform($value)\n {\n return $value;\n }", "protected function normalize(): void\n {\n $coordinate = new BaseCoordinate(array(0, $this->value));\n $latitude = (float)$coordinate->getLongitude();\n\n $this->value = $latitude;\n }", "public function applyValue($value);", "protected function normalize($value)\n {\n if (null === $this->normalizationTransformer) {\n return $value;\n }\n return $this->normalizationTransformer->transform($value);\n }", "private function normToView(mixed $value): mixed\n {\n // Scalar values should be converted to strings to\n // facilitate differentiation between empty (\"\") and zero (0).\n // Only do this for simple forms, as the resulting value in\n // compound forms is passed to the data mapper and thus should\n // not be converted to a string before.\n if (!($transformers = $this->config->getViewTransformers()) && !$this->config->getCompound()) {\n return null === $value || \\is_scalar($value) ? (string) $value : $value;\n }\n\n try {\n foreach ($transformers as $transformer) {\n $value = $transformer->transform($value);\n }\n } catch (TransformationFailedException $exception) {\n throw new TransformationFailedException(sprintf('Unable to transform value for property path \"%s\": ', $this->getPropertyPath()).$exception->getMessage(), $exception->getCode(), $exception, $exception->getInvalidMessage(), $exception->getInvalidMessageParameters());\n }\n\n return $value;\n }", "public function TransformForControl($Value) {\n\n $this->TransError= false;\n $Decimals= intval($this->GetOption('Decimals'));\n $Lang= $this->GetOption('Lang');\n $LocalService= $this->GetService('Localization');\n return $LocalService->FormatNumber($Value, $Decimals, $Lang);\n }", "public function resolveTransformedValue($value)\n {\n return transform($value, $this->transformCallback ?? function ($value) {\n return $value;\n });\n }", "public function TransformForStorage($Value) {\n\n $this->TransError= false;\n $Lang= $this->GetOption('Lang');\n $LocalService= $this->GetService('Localization');\n return $LocalService->UnFormatNumber($Value, $Lang);\n }", "public function getStandardValue()\n {\n }", "private function _pxToCm($value) {\n return $value * 0.264583333; //($value*25.4)/150;\n }", "public function compute($value) {\n return ($value * $this->factor) + $this->delta;\n }", "public function normalize($value)\n {\n if ($value instanceof Expression ||\n $value instanceof Expressionable) {\n return $value;\n }\n\n return parent::normalize($value);\n }", "private function calculate(): float\n {\n return $this->conversionMultiple / $this->getUnitValue($this->to);\n }", "public function valueWithoutVat($value)\n {\n if(!$value) {\n return $value;\n }\n\n return $value / (1 + ($this->config->TVA / 100));\n }", "public function normalize() {\n return $this->div($this->norm());\n }", "private function modelToNorm(mixed $value): mixed\n {\n try {\n foreach ($this->config->getModelTransformers() as $transformer) {\n $value = $transformer->transform($value);\n }\n } catch (TransformationFailedException $exception) {\n throw new TransformationFailedException(sprintf('Unable to transform data for property path \"%s\": ', $this->getPropertyPath()).$exception->getMessage(), $exception->getCode(), $exception, $exception->getInvalidMessage(), $exception->getInvalidMessageParameters());\n }\n\n return $value;\n }", "private function calcolaValutazione()\n {\n\n $media=0;\n $i=0;\n foreach ($this->valutazioni as &$value){\n $media=$media+$value->getvoto();\n $i++;}\n $this->valutazione=$media/$i;\n\n }", "public function calcularValorLlamada();", "public function reverseTransform($value)\n {\n return $value;\n }", "protected function transform($value)\n {\n if (null === $this->valueTransformer) {\n return null === $value ? '' : $value;\n }\n return $this->valueTransformer->transform($value);\n }", "protected function normalize()\r\n\t{\r\n\t\tif ($this->isFetched())\r\n\t\t{\r\n\t\t\tif ($this->validationInfo)\r\n\t\t\t{\r\n\t\t\t\t$this->normalizedValue = $this->validationInfo->normalize($this->taintValue);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$this->normalizedValue = $this->taintValue;\r\n\t\t\t}\t\r\n\t\t}\r\n\t}", "protected function denormalize($value)\n {\n if (null === $this->normalizationTransformer) {\n return $value;\n }\n return $this->normalizationTransformer->reverseTransform($value, $this->data);\n }", "protected function normalizeValue($value) {\n\t\tif ($value instanceof \\PHPParser\\Node\\NodeInterface) {\n\t\t\treturn $value;\n\t\t} elseif (is_null($value)) {\n\t\t\treturn new ConstFetchExpression(\n\t\t\t\t\tnew NameNode('null')\n\t\t\t);\n\t\t} elseif (is_bool($value)) {\n\t\t\treturn new ConstFetchExpression(\n\t\t\t\t\tnew NameNode($value ? 'true' : 'false')\n\t\t\t);\n\t\t} elseif (is_int($value)) {\n\t\t\treturn new LNumberScalar($value);\n\t\t} elseif (is_float($value)) {\n\t\t\treturn new DNumberScalar($value);\n\t\t} elseif (is_string($value)) {\n\t\t\treturn new StringScalar($value);\n\t\t} elseif (is_array($value)) {\n\t\t\t$items = array();\n\t\t\t$lastKey = -1;\n\t\t\tforeach ($value as $itemKey => $itemValue) {\n\t\t\t\t// for consecutive, numeric keys don't generate keys\n\t\t\t\tif (null !== $lastKey && ++$lastKey === $itemKey) {\n\t\t\t\t\t$items[] = new ArrayItemExpression(\n\t\t\t\t\t\t\t$this->normalizeValue($itemValue)\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\t$lastKey = null;\n\t\t\t\t\t$items[] = new ArrayItemExpression(\n\t\t\t\t\t\t\t$this->normalizeValue($itemValue),\n\t\t\t\t\t\t\t$this->normalizeValue($itemKey)\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn new ArrayExpression($items);\n\t\t} else {\n\t\t\tthrow new \\LogicException('Invalid value');\n\t\t}\n\t}", "function c2f ($value){\n $fahrenheit=$value/5*9+32;\n return $fahrenheit;\n }", "public function getValueModelTransformer();", "public function set(string $value): CalcInterface;", "abstract public function transform();", "public function getValueFrom():float {\n return $this->valueFrom;\n }", "public function apply($value);", "public static function normalizeValue($value)\n {\n if ($value instanceof Node) {\n return $value;\n } elseif (is_null($value)) {\n return new Expr\\ConstFetch(\n new Name('null')\n );\n } elseif (is_bool($value)) {\n return new Expr\\ConstFetch(\n new Name($value ? 'true' : 'false')\n );\n } elseif (is_int($value)) {\n return new Scalar\\LNumber($value);\n } elseif (is_float($value)) {\n return new Scalar\\DNumber($value);\n } elseif (is_string($value)) {\n return new Scalar\\String_($value);\n } elseif (is_array($value)) {\n $items = [];\n $lastKey = -1;\n foreach ($value as $itemKey => $itemValue) {\n // for consecutive, numeric keys don't generate keys\n if (null !== $lastKey && ++$lastKey === $itemKey) {\n $items[] = new Expr\\ArrayItem(\n self::normalizeValue($itemValue)\n );\n } else {\n $lastKey = null;\n $items[] = new Expr\\ArrayItem(\n self::normalizeValue($itemValue),\n self::normalizeValue($itemKey)\n );\n }\n }\n return new Expr\\Array_($items);\n } else {\n throw new \\LogicException('Invalid value');\n }\n }", "abstract public function convertFromRawValue($value);", "public function abs($value) : int|float|array\n\t{\n\t\treturn $this->handlers->map($value, function ($value) {\n\t\t\treturn abs($value);\n\t\t});\n\t}", "public function fromPt($value)\n {\n return ($value / $this->scaleFactor);\n }", "function normalisasiData(){\n\n\t\tglobal $uanData;\n\t\tglobal $testData;\n\t\tglobal $minR;\n\t\tglobal $maxR;\n\t\tglobal $minT;\n\t\tglobal $maxT;\n\n\t\tif ($uanData < $minR) $minR = $uanData;\n\t\tif ($uanData > $maxR) $maxR = $uanData;\n\t\tif ($testData < $minT) $minT = $testData;\n\t\tif ($testData > $maxT) $maxT = $testData;\n\t\t\n\n\t\t$newDataUan = ($uanData-$minR)/($maxR-$minR);\n\t\t$newDataTest = ($testData-$minT)/($maxT-$minT);\n\n\t}", "private function viewToNorm(mixed $value): mixed\n {\n if (!$transformers = $this->config->getViewTransformers()) {\n return '' === $value ? null : $value;\n }\n\n try {\n for ($i = \\count($transformers) - 1; $i >= 0; --$i) {\n $value = $transformers[$i]->reverseTransform($value);\n }\n } catch (TransformationFailedException $exception) {\n throw new TransformationFailedException(sprintf('Unable to reverse value for property path \"%s\": ', $this->getPropertyPath()).$exception->getMessage(), $exception->getCode(), $exception, $exception->getInvalidMessage(), $exception->getInvalidMessageParameters());\n }\n\n return $value;\n }", "protected function normalizeValue($value) {\n\t\tif ($value instanceof PHPParser_Node) {\n\t\t\treturn $value;\n\t\t} elseif (is_null ( $value )) {\n\t\t\treturn new PHPParser_Node_Expr_ConstFetch ( new PHPParser_Node_Name ( 'null' ) );\n\t\t} elseif (is_bool ( $value )) {\n\t\t\treturn new PHPParser_Node_Expr_ConstFetch ( new PHPParser_Node_Name ( $value ? 'true' : 'false' ) );\n\t\t} elseif (is_int ( $value )) {\n\t\t\treturn new PHPParser_Node_Scalar_LNumber ( $value );\n\t\t} elseif (is_float ( $value )) {\n\t\t\treturn new PHPParser_Node_Scalar_DNumber ( $value );\n\t\t} elseif (is_string ( $value )) {\n\t\t\treturn new PHPParser_Node_Scalar_String ( $value );\n\t\t} elseif (is_array ( $value )) {\n\t\t\t$items = array ();\n\t\t\t$lastKey = - 1;\n\t\t\tforeach ( $value as $itemKey => $itemValue ) {\n\t\t\t\t// for consecutive, numeric keys don't generate keys\n\t\t\t\tif (null !== $lastKey && ++ $lastKey === $itemKey) {\n\t\t\t\t\t$items [] = new PHPParser_Node_Expr_ArrayItem ( $this->normalizeValue ( $itemValue ) );\n\t\t\t\t} else {\n\t\t\t\t\t$lastKey = null;\n\t\t\t\t\t$items [] = new PHPParser_Node_Expr_ArrayItem ( $this->normalizeValue ( $itemValue ), $this->normalizeValue ( $itemKey ) );\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn new PHPParser_Node_Expr_Array ( $items );\n\t\t} else {\n\t\t\tthrow new LogicException ( 'Invalid value' );\n\t\t}\n\t}", "private function normalizeValue($value, $param, $min, $max) {\n $denominator = $max - $min;\n\n if ($denominator == 0) {\n return 1;\n }\n\n if ($param == Car::MILEAGE or $param == Car::ACCELERATION or $param == Car::PRICE) {\n return ($max - $value) / $denominator;\n } else {\n return 1 - ($max - $value) / $denominator;\n }\n }", "public function getCalculationValue($v)\n\t{\n\t\tif ($v == '')\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t\t$date = JFactory::getDate($v);\n\t\treturn $this->toSeconds($date);\n\t}", "function runden($value){\r\n\tglobal $eqdkp;\r\n\t$ret_val\t\t= $value;\r\n\t$precision\t= $eqdkp->config['pk_round_precision'];\r\n\r\n\tif (($precision < 0) or ($precision > 5) ){\r\n\t\t$precision = 2;\r\n\t}\r\n\r\n\tif ($eqdkp->config['pk_round_activate'] == \"1\"){\r\n\t\t$ret_val = round($value,$precision)\t;\r\n\t}\r\n\treturn $ret_val;\r\n}", "public function getValueTo():float {\n return $this->valueTo;\n }", "function get_tva($value, $tax)\r\n\t{\r\n\t\tglobal $config;\r\n\t\t$tva = $value * $tax / 100;\r\n\t\treturn $tva;\r\n\t}", "private function format($value)\n {\n if (is_callable($this->formatter)) {\n $value = call_user_func($this->formatter, $value, $this->dataSet);\n }\n return $value;\n }", "private function normToModel(mixed $value): mixed\n {\n try {\n $transformers = $this->config->getModelTransformers();\n\n for ($i = \\count($transformers) - 1; $i >= 0; --$i) {\n $value = $transformers[$i]->reverseTransform($value);\n }\n } catch (TransformationFailedException $exception) {\n throw new TransformationFailedException(sprintf('Unable to reverse value for property path \"%s\": ', $this->getPropertyPath()).$exception->getMessage(), $exception->getCode(), $exception, $exception->getInvalidMessage(), $exception->getInvalidMessageParameters());\n }\n\n return $value;\n }", "private static function renderFloat($value)\n {\n return Yii::$app->formatter->asDecimal($value);\n }", "public function normalize(): self;", "public function calcularValor(): self\n {\n $valor_reserva = 0;\n $total_hospedes = $this->getTotalHospedes();\n\n $dispon_quarto = $this->getQuarto()->getDisponibilidade($this->getCheckin(), $this->getCheckout());\n $dispon_quarto->map(function (Disponibilidade $dispon) use (&$valor_reserva, $total_hospedes) {\n $valor_reserva += (float)$dispon->getValorPorQtdePessoasComDesconto($total_hospedes);\n });\n\n $this->setValor($valor_reserva);\n return $this;\n }", "public function convertToDrupalValue($value);", "public function value(): Number\n {\n return $this->value;\n }", "public function getPriceAttribute($value)\n {\n return $value/100;\n }", "public abstract function makeValue($value);", "function convertValueToLusin($value) {\r\n\t$unit_lusin = floor($value/12);\r\n\treturn $unit_lusin;\t\t\r\n}", "function f2c ($value){\n $celsius=($value-32)/9*5;\n return $celsius;\n }", "public function prevision ($value){\n\n for ($i = 0; $i < count($value); $i++){\n for ($j = 0; $j < count($value[0]); $j++){\n $input[$i][$j] = ($value[$i][$j] - $this->min) / ($this->max - $this->min);\n }\n }\n\n $result = 0;\n $net = array();\n $netOut = 0;\n\n $p = -1;\n for ($i = 0; $i < count($input); $i++) {\n for ($h = 0; $h < $this->hiddenNeurons; $h++) {\n for ($j = 0; $j < count($input[0]); $j++) {\n $p++;\n $net[$h] = $this->gBest[$p] * $input[$i][$j];\n }\n }\n for ($g = 0; $g < count($net); $g++) {\n $p++;\n $net[$g] += $this->gBest[$p];\n $net[$g] = $this->sigmoid($net[$g]);\n }\n for ($y = 0; $y < count($net); $y++) {\n $p++;\n $netOut = $this->gBest[$p] * $net[$y];\n }\n $netOut += $this->gBest[$p + 1];\n\n $result = round($this->denormalize($netOut),3);\n\n $netOut = 0;\n $p = -1;\n\n for ($j = 0; $j < count($net); $j++){\n $net[$j] = 0;\n }\n }\n\n // echo $s;\n\n return $result;\n }", "public function getValue()\n {\n return (float) $this->value;\n }", "public function mapResponse() {\n // TODO: Check mapping is defined here?\n if ($this->cardinality == 'single') {\n if (array_key_exists($this->value, $this->mapping['mapEntry'])) {\n $value = $this->mapping['mapEntry'][$this->value];\n } else {\n $value = $this->mapping['defaultValue'];\n }\n } else {\n $value = 0;\n // array_unique used because values should only be counted once - see mapResponse documentation\n foreach(array_unique($this->value) as $response) {\n if (array_key_exists($response, $this->mapping['mapEntry'])) {\n $value += $this->mapping['mapEntry'][$response];\n } else if ($this->type == 'pair') { // Check pair opposite way round\n $responseReversed = implode(' ', array_reverse(explode(' ', $response)));\n if (array_key_exists($responseReversed, $this->mapping['mapEntry'])) {\n $value += $this->mapping['mapEntry'][$responseReversed];\n } else {\n $value += $this->mapping['defaultValue'];\n }\n } else {\n $value += $this->mapping['defaultValue'];\n }\n \n }\n }\n\n return new qti_variable('single', 'float', array('value' => $value));\n }", "public function getAmount(): float;", "function PLOT__correctValuesMapperForTime($v) {\n\treturn round($v*1000);\n}", "public function transform($transformationType, $value);", "function aMathematicalfunction($input)\r\n{\r\n\treturn $value\r\n}", "public function set($value = null)\r\n {\r\n return parent::set((float)$value);\r\n }", "protected function convertDiscount(string $value, array $params): float\n\t{\n\t\treturn -((float) $value);\n\t}", "public function calc() {\n $this->getChildNodes(0, 0, 0);\n }", "public function calculate();", "public function calculate();", "protected function giveCost()\n {\n $novoValor = 4;\n $this->valueNow = 210.54 / $novoValor;\n return $this->valueNow;\n }", "public function value();", "public function value();", "public function value();", "protected function filterUfloat($value) {\n return abs($this->filterFloat($value));\n }", "public function doFormat($value)\n {\n return $value;\n }", "private function transform($value) {\n $CI = & get_instance();\n // caso seja um array\n if (is_array($value)) {\n // percorre os valores\n foreach ($value as $x) {\n // se for um inteiro\n if (is_integer($x)) {\n $foo[] = $x;\n } else if (is_string($x)) {\n // se for string, adiciona aspas\n $foo[] = $CI->db->escape($x);\n }\n }\n // converte o array em string separada por \",\"\n $result = '(' . implode(',', $foo) . ')';\n }\n // caso seja uma string\n else if (is_string($value)) {\n // adiciona aspas\n $result = $CI->db->escape($value);\n }\n // caso seja valor nullo\n else if (is_null($value)) {\n // armazena NULL\n $result = 'NULL';\n }\n\n // caso seja booleano\n else if (is_bool($value)) {\n // armazena TRUE ou FALSE\n $result = $value ? 'TRUE' : 'FALSE';\n } else {\n $result = $CI->db->escape($value);\n }\n // retorna o valor\n return $result;\n }", "private function setCalculate() {\n\n if($this->getType() == 2) {\n $det = new CalculateTwo($this->array);\n $this->result = $det->getResult();\n $this->rule = $det->getRule();\n $this->ruleExplanation = $det->getRuleExplanation();\n }\n elseif($this->getType() == 3) {\n\n $det = new CalculateThree($this->array);\n $this->result = $det->getResult();\n $this->rule = $det->getRule();\n $this->ruleExplanation = $det->getRuleExplanation();\n }\n else {\n $this->getPivot();\n $this->result = $this->setResult();\n $this->rule = $this->getPivotRule();\n $this->ruleExplanation = $this->process;\n }\n }", "private static function normalize_field_value($value, $expectedMinVal, $expectedMaxVal)\n {\n if($value === null)\n return 0.5;\n\n return ($value - $expectedMinVal) / ($expectedMaxVal - $expectedMinVal);\n }", "public function getSum(): float;", "function convertToFlOz ($inputUnit, $inputValue) {\n\t\tswitch ($inputUnit) {\n\t\t\tcase 'tsp':\n\t\t\t\t$valueConverted = $inputValue * 0.166667;\n\t\t\t\treturn $valueConverted;\n\t\t\t\tbreak;\n\t\t\tcase 'tbsp':\n\t\t\t\t$valueConverted = $inputValue * 0.5;\n\t\t\t\treturn $valueConverted;\n\t\t\t\tbreak;\n\t\t\tcase 'flOz':\n\t\t\t\t$valueConverted = $inputValue;\n\t\t\t\treturn $valueConverted;\n\t\t\t\tbreak;\n\t\t\tcase 'cp':\n\t\t\t\t$valueConverted = $inputValue * 8;\n\t\t\t\treturn $valueConverted;\n\t\t\t\tbreak;\n\t\t\tcase 'pt':\n\t\t\t\t$valueConverted = $inputValue * 16;\n\t\t\t\treturn $valueConverted;\n\t\t\t\tbreak;\n\t\t\tcase 'qt':\n\t\t\t\t$valueConverted = $inputValue * 32;\n\t\t\t\treturn $valueConverted;\n\t\t\t\tbreak;\n\t\t\tcase 'gal':\n\t\t\t\t$valueConverted = $inputValue * 128;\n\t\t\t\treturn $valueConverted;\n\t\t\t\tbreak;\n\t\t}\n\n}", "public function getMin(): float;", "function convertToDryOz ($inputUnit, $inputValue) {\n\t\tswitch ($inputUnit) {\n\t\t\tcase 'lb':\n\t\t\t\t$valueConverted = $inputValue * 16;\n\t\t\t\treturn $valueConverted;\n\t\t\t\tbreak;\n\t\t}\n\n}", "function convertValueToPcs($value) {\r\n\tconvertValueToLusin($value_lusin);\r\n\t$to_pcs = floor(convertValueToLusin($value_lusin) % 12);\r\n\treturn $to_pcs;\t\r\n}", "protected function doTransform($value)\n {\n $title = array_shift($value);\n // calculate maximum string lengths of each column\n $size = array_map('mb_strlen',$title);\n foreach (array_map('array_values',$value) as $row) {\n $size = array_map('max',$size,array_map('mb_strlen',$row));\n }\n // create formats to output data\n foreach ($size as $n) {\n $format[] = \"%-{$n}s\";\n $line[] = str_repeat('-',$n);\n }\n $format = '| '.implode(' | ',$format).\" |\".EOL;\n $line = '+-'.implode('-+-',$line).\"-+\".EOL;\n // build table from title, data and existing formats\n $table = $line.vsprintf($format,$title).$line;\n foreach ($value as $row) {\n $table .= vsprintf($format,$row);\n }\n if (count($value)>0) $table .= $line;\n return rtrim($table);\n }", "abstract public function calculate(Shippable $model): float;", "public function getAmountAttribute($value)\n {\n $curr = \"{$this->currency}\";\n\n switch ($curr) {\n case \"\":\n $newForm = 'Kshs' . ' ' . $value;\n break;\n default:\n $newForm = $curr . ' ' . $value;\n }\n\n return $newForm;\n }", "protected function filterUdouble($value) {\n return abs((double) $value);\n }", "private function _getCartRulesValues(){\n $rules_values = (float)0;\n \n $cart_rules = $this->context->cart->getCartRules();\n if (count($cart_rules) > 0){\n foreach ($cart_rules as $rule)\n $rules_values += $rule['value_real'];\n }\n\n return number_format(Tools::ps_round($rules_values, 2), 2, '.', '') * (-1);\n }", "public function setValue($value) {\n // this is an improvise\n // detect the currency by symbol,\n $currencySign = mb_substr($value, 0, 1, 'utf-8');\n // seperated out amount from currecy symbol, although this is not \n // correct but since data is missing from csv\n $this->value = (float) mb_substr($value, 1, mb_strlen($value) - 1, 'utf-8');\n $this->detectCurrencyBySign($currencySign);\n }", "public function getFechaEstimadaSolucionAttribute($value)\n {\n return date('d/m/Y' , strtotime($value));\n }", "public function transformTemperature(float $temperature): float;", "private function map($value, $low1, $high1, $low2, $high2) {\n // https://github.com/processing/p5.js/blob/master/src/math/calculation.js#L463\n return ($value - $low1) / ($high1 - $low1) * ($high2 - $low2) + $low2;\n }", "function value()\r\n {\r\n return number_format( $this->Value, 4, \".\", \"\" );\r\n }", "public function getValue(): mixed;", "public function getValue(): mixed;", "public function getValorAttribute($valor){\n return number_format($valor / 100, 2, '.', '');\n }", "function GetNormalisasi($data, $maxmin, $status){\n if(strtolower($status) == 'benefit'){\n return round( $data / $maxmin, 2);\n }else{\n return round($maxmin / $data, 2);\n }\n}", "protected function LiveRawTableValue()\n {\n // if (! isset(self::$temp_raw_table_value[$this->OrderID])) {\n $currentRate = $this->LiveCurrentRate();\n $currentCountry = $this->LiveCountry();\n $itemsTax = $this->workoutOrderItemsTax($currentRate, $currentCountry);\n $modifiersTax = $this->workoutModifiersTax($currentRate, $currentCountry);\n return $itemsTax + $modifiersTax;\n }", "protected function value()\n {\n $this->value = $this->lexeme;\n }", "public function calculateNextValue() {}", "protected function _convertValue ($value) {\n switch ($value) {\n case 'null':\n # Null value\n $value = null;\n break;\n\n case 'true':\n # Boolean\n $value = true;\n break;\n\n case 'false':\n # Boolean\n $value = false;\n break;\n\n default:\n if (is_numeric ($value)) {\n\n # Number\n if (preg_match ('/^-?[1-9][0-9]*$/', $value)) {\n\n # Regular 10-base integer\n $value = intval ($value, 10);\n\n } else if (preg_match ('/^-?0[0-7]*$/', $value)) {\n\n # 8-base integer\n $value = intval ($value, 8);\n\n } else if (preg_match ('/^-?0x[0-9a-z]*$/i', $value)) {\n\n # 16-base integer\n $value = intval ($value, 16);\n\n } else {\n\n # Floating point number\n $value = $value + 0;\n\n }\n\n } else {\n\n # String\n /*NOP*/;\n\n }\n }\n return $value;\n }", "public function spread () {\n $low = min($this->values);\n $high = max($this->values);\n return round(((1 - ($low/$high)) * 100), 3);\n }", "public static function normalize($value)\n {\n if ($value === true) {\n $value = \"true\";\n } elseif ($value === false) {\n $value = \"false\";\n }\n\n return $value;\n }" ]
[ "0.6336758", "0.62555844", "0.6025224", "0.58538264", "0.5833574", "0.57894933", "0.5758018", "0.56056947", "0.5554127", "0.55469507", "0.5526371", "0.5519989", "0.55185723", "0.55010295", "0.5486529", "0.54742205", "0.54536766", "0.54082537", "0.53880477", "0.5384943", "0.5354222", "0.53421116", "0.53130716", "0.52705", "0.5268883", "0.52481896", "0.52283126", "0.5202661", "0.5188368", "0.5179653", "0.51696086", "0.5168924", "0.5168739", "0.51512414", "0.5141377", "0.5141177", "0.5124326", "0.5115635", "0.5112318", "0.5106867", "0.50799596", "0.5054917", "0.503651", "0.5034611", "0.5025286", "0.501864", "0.501684", "0.5013689", "0.5005113", "0.49979135", "0.49683768", "0.49642023", "0.49571887", "0.49500194", "0.49358177", "0.49320447", "0.49278325", "0.49223667", "0.49139613", "0.48932016", "0.4882351", "0.48806077", "0.4866794", "0.48587334", "0.4856348", "0.4856348", "0.485253", "0.48362896", "0.48362896", "0.48362896", "0.4830748", "0.482678", "0.4825011", "0.4812143", "0.48105234", "0.48089147", "0.48074424", "0.48035678", "0.47993758", "0.4797698", "0.47963217", "0.47952718", "0.47854206", "0.4779068", "0.4773335", "0.4767297", "0.47667223", "0.475411", "0.4749593", "0.4738643", "0.47379106", "0.47379106", "0.4729775", "0.47275823", "0.4726287", "0.472016", "0.47165883", "0.47054186", "0.4702138", "0.47007945" ]
0.50381094
42
method of help soft delete from admin
public function admin_delete($help_id) { if ($this->Auth->user('account_level') != 51) throw new ForbiddenException; $this->autoRender=false; $conditions = array( 'Help.id' => $help_id, 'Help.status'=> 0, ); if ($this->Help->hasAny($conditions)){ $this->Help->delete($help_id); } else { $this->Session->setFlash(__('Can not delete'), 'error_form', array(), 'error'); } if(isset($this->params['url']['redirect_url'])){ return $this->redirect(urldecode($this->params['url']['redirect_url'])); } else { return $this->redirect(array('controller' => 'helps', 'action' => 'index', 'admin' => true)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function undeleteAction(){\n\t}", "public function admin_delete($id = false) {\r\n\t\tif($id) {\r\n\t\t\t$this->{$this->modelClass}->delete($id);\t\t\t\r\n\t\t}\r\n\t\tif(isset($this->data)) {\r\n\t\t\t$this->{$this->modelClass}->delete($this->data[$this->modelClass]['id']);\r\n\t\t\t$message = $this->modelClass . ' deleted';\r\n\t\t\t$this->_message($message, array('action' => 'index'));\r\n\t\t} else {\r\n\t\t\t$this->viewPath = 'shared';\r\n\t\t}\r\n }", "public function delete($id)\n {\n echo 'in soft delete';\n }", "public function deleting()\n {\n # code...\n }", "public function delete()\n\t{\n\t\t$this->hard_delete();\n\t}", "public function softdelete(){\n $articulo = Articulo::find(2);\n $articulo->delete();\n return\"enviado a la papeleria de reciclaje\";\n \n }", "function before_delete() {}", "public function forceDelete()\n {\n //\n }", "public function preDelete() { }", "public function deleteAction() {\n \n }", "public function deleteAction()\n {\n \n }", "function procMenuAdminDeleteButton()\n\t{\n\t\t$menu_srl = Context::get('menu_srl');\n\t\t$menu_item_srl = Context::get('menu_item_srl');\n\t\t$target = Context::get('target');\n\t\t$filename = Context::get('filename');\n\t\tFileHandler::removeFile($filename);\n\n\t\t$this->add('target', $target);\n\t}", "public function DELETE() {\n\t\t$this->scriptForceHint('DELETE');\n\t}", "public function forceDelete();", "public function Do_delete_Example1(){\n\n\t}", "public function actionDelete() {}", "public function actionDelete() {}", "protected function delete() {\n\t}", "public function onBeforeDelete();", "protected function _preDelete() {}", "public function deleteAction() {\n\t\t$this->_notImplemented();\n\t}", "public function deleteAction() {\n parent::deleteAction();\n }", "protected function _postDelete() {}", "protected function _postDelete() {}", "public function delete(){\n\t\treturn $this->soft_delete();\n\t}", "public function index_delete(){\n\t\t\n\t\t}", "protected function deleteInternal() {\n $this->isdeleted = 1;\n $this->deleteduser = \\Yii::$app->user->getId();\n $this->deletedtime = date(\"Y-m-d H:i:s\");\n \n return parent::updateInternal(['isdeleted', 'deletedtime', 'deleteduser']);\n }", "abstract function allowDeleteAction();", "protected function _delete()\n\t{\n\t}", "public function delete() {\n $this->remove_content();\n\n parent::delete();\n }", "public function adminRemove()\r\n\t{\r\n\t\treturn;\r\n\t}", "public function delete()\n\t{\n\t\t$this->plugin->setResponse('in delete');\n\t}", "protected function deleteAction()\n {\n }", "function call_delete() {\n parent::call_delete();\n }", "function admin_delete($id)\n {\n $this->lordModel('Post');\n //$this->Post->delete($id);\n $this->session->setflash('mon contenu a bien ete supprimer');\n $this->redirect('admin/posts/index');\n }", "protected function beforeDelete()\n {\n }", "function admin_delete($id){\n\t\t$this->loadModel('Pri');\n\t\t$this->Pri->delete($id);\n\t\t$this->Session->setFlash('Le contenu a bien été supprimé'); \n\t\t$this->redirect('admin/prix/index'); \n\t}", "public function delete(){\n\t $this->model->clear()->filter(array('preview_master_id' => WaxUrl::get(\"id\")))->delete();\n\t parent::delete();\n\t}", "public function delete() {\n\t\t$this->deleted = true;\n\t}", "function flag_note_for_deletion($module_key,$space_key,$link_key,$delete_action) \r\n{\r\n \r\n\treturn true;\r\n\r\n}", "public function delete(){ return false; }", "public function delete(){ return false; }", "public function delete(){ return false; }", "public function delete(){ return false; }", "function preDelete()\n {\n }", "protected function _predelete() {\n }", "function deleteThemengebietes() {\n\t\t$status = $GLOBALS['TYPO3_DB']->exec_DELETEquery('tx_topic_detail', 'uid='.intval(t3lib_div::_POST('uid')));\n\t\treturn $status;\n\t}", "public function delete(){\n }", "protected function confirmDelete() {\n\t}", "public function del()\n {\n }", "public function delete()\n {\n //\n }", "public static function delete() {\r\n\t\t\r\n\t}", "public function deleteAction()\n {\n }", "public function delete()\n\t{\n\t}", "function delete()\n {\n }", "public function deleteAction()\n {\n if ($this->isConfirmedItem($this->_('Delete %s'))) {\n $model = $this->getModel();\n $deleted = $model->delete();\n\n $this->addMessage(sprintf($this->_('%2$u %1$s deleted'), $this->getTopic($deleted), $deleted), 'success');\n $this->_reroute(array('action' => 'index'), true);\n }\n }", "public static function delete(){\r\n }", "public function delete() {\r\n }", "function delete()\r\n {\r\n\r\n }", "public function delete()\r\n\t{\r\n\t}", "function delAdminHandler() {\n global $inputs;\n $sql = \"DELETE FROM `admin` WHERE id = \" . $inputs['id'];\n execSql($sql);\n formatOutput(true, 'delete success');\n}", "public function annimalDelAction()\n {\n }", "public static function delete() {\n\n\n\t\t}", "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}", "public function DELETE() {\n #\n }", "protected function afterDelete()\r\n {\r\n }", "protected function _postDelete()\n\t{\n\t}", "public function delete()\n {\n \n }", "function default_delete(){\n\tglobal $assign_list, $_CONFIG, $_SITE_ROOT, $mod,$log;\n\tglobal $core, $clsModule, $clsButtonNav;\n\t$classTable = \"Setting_Lipe\";\n\t$pkeyTable = \"id\";\n\t//################### CAN NOT MODIFY BELOW CODE ###################\n\t$clsTable = new $classTable();\n\t$pval = isset($_REQUEST[$pkeyTable])? $_REQUEST[$pkeyTable] : \"\";\n\t$c_id = isset($_REQUEST[\"c_id\"])? $_REQUEST[\"c_id\"] : \"\";\n\tif ($pval!=\"\"){\n\t\t$clsTable->deleteOne($pval);\n $log->logThis('DELETE Settting Lipe '.$c_id);\n\t\theader(\"location: ?$_SITE_ROOT&mod=$mod&c_id=$c_id\");\n\t}\n\t$checkList = isset($_REQUEST[\"checkList\"])? $_REQUEST[\"checkList\"] : \"\";\n\tif (is_array($checkList)){\n\t\tforeach ($checkList as $key => $val){\n\t\t\t$clsTable->deleteOne($val);\n\t\t}\n\t\t $username=$_COOKIE['username'];\n\t\t\t\t$actionlog=new ActionLog();\n\t\t\t\t$actionlog->insertValue($username,'Setting Lipe / Delete a lipe ','Course id: '.$c_id);\n\t\theader(\"location: ?$_SITE_ROOT&mod=$mod&c_id=$c_id\");\n\t}\n\tunset($clsTable);\n}", "private function actionListDelete() {\n $put_vars = $this->actionListPutConvert();\n $this->loadModel($put_vars['id'])->delete();\n }", "function deleteItemFromDB()\n {\n if ($this->isAdmin()) {\n $this->loadThis();\n } else {\n echo $this->user_model->deleteSystemUser($_POST['id']);\n }\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n\n }", "function default_delete(){\n\tglobal $assign_list, $_CONFIG, $_SITE_ROOT, $mod;\n\tglobal $core, $clsModule, $clsButtonNav;\n\t$classTable = \"User\";\n\t$pkeyTable = \"id\";\n\t//################### CAN NOT MODIFY BELOW CODE ###################\n\t$clsTable = new $classTable();\n\t$pval = isset($_REQUEST[$pkeyTable])? $_REQUEST[$pkeyTable] : \"\";\n\tif ($pval!=\"\"){\n\t\t$clsTable->deleteOne($pval);\n\t\theader(\"location: ?$_SITE_ROOT&mod=$mod\");\n\t}\n\t$checkList = isset($_POST[\"checkList\"])? $_POST[\"checkList\"] : \"\";\n\tif (is_array($checkList)){\n\t\tforeach ($checkList as $key => $val){\n\t\t\t$clsTable->deleteOne($val);\n\t\t}\n\t\theader(\"location: ?$_SITE_ROOT&mod=$mod\");\n\t}\n\tunset($clsTable);\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "function delete()\r\n {\r\n $db =& eZDB::globalDatabase();\r\n $res[] = $db->query( \"DELETE FROM eZTodo_Priority WHERE ID='$this->ID'\" );\r\n eZDB::finish( $res, $db );\r\n }", "public function delete() {\n $this->isdeleted = 1;\n $this->deleteduser = \\Yii::$app->user->getId();\n $this->deletedtime = date(\"Y-m-d H:i:s\");\n \n return parent::update(FALSE, ['isdeleted', 'deletedtime', 'deleteduser']);\n }" ]
[ "0.7206121", "0.71060973", "0.70654786", "0.70231533", "0.69690436", "0.6964411", "0.6964134", "0.6957735", "0.69520015", "0.6891051", "0.68468726", "0.6839106", "0.68307066", "0.68208027", "0.680907", "0.680533", "0.680533", "0.67860824", "0.67738336", "0.6760083", "0.67141485", "0.67140925", "0.670614", "0.6705657", "0.670375", "0.66875494", "0.6683091", "0.6677197", "0.66660345", "0.66632944", "0.66569906", "0.66442335", "0.6632585", "0.6610272", "0.6603387", "0.660176", "0.65997857", "0.65975744", "0.65822685", "0.6579516", "0.6573517", "0.6573517", "0.6573517", "0.6573517", "0.655973", "0.65549827", "0.6549932", "0.65328723", "0.6523914", "0.6506179", "0.6505845", "0.6498806", "0.6494059", "0.6491374", "0.6491179", "0.6488955", "0.64791954", "0.64781255", "0.6471496", "0.64707863", "0.6470375", "0.6453991", "0.64495146", "0.6447404", "0.6441162", "0.64386094", "0.6435132", "0.6431525", "0.6425933", "0.64236814", "0.64091367", "0.640599", "0.640599", "0.640599", "0.640599", "0.640599", "0.640599", "0.640599", "0.640599", "0.640599", "0.640599", "0.6389849", "0.638961", "0.6381792", "0.6381792", "0.6381792", "0.6381792", "0.6381792", "0.6381792", "0.6381792", "0.6381792", "0.6381792", "0.6381792", "0.6381792", "0.6381792", "0.6381792", "0.6381792", "0.6381792", "0.63790727", "0.6378616" ]
0.6832098
12
method of help active/deactive from admin
public function admin_active($help_id,$active=NULL) { if ($this->Auth->user('account_level') != 51) throw new ForbiddenException; $this->autoRender=false; $conditions = array( 'Help.id' => $help_id, ); if ($this->Help->hasAny($conditions)){ $this->Help->updateAll( array( 'Help.status' =>$active ), $conditions ); $this->Help->afterSave(false); } else { $this->Session->setFlash(__('Can not save'), 'error_form', array(), 'error'); } if(isset($this->params['url']['redirect_url'])){ return $this->redirect(urldecode($this->params['url']['redirect_url'])); } else { return $this->redirect(array('controller' => 'helps', 'action' => 'index', 'admin' => true)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function menu_get_active_help()\n {\n return menu_get_active_help();\n }", "public function helpAction() {}", "public function admin_action() {\n\t}", "public function admin_action() {\n\t}", "public function setup_help_tab()\n {\n }", "public function admin()\n {\n $this->view->books = $this->help->getBookList();\n $this->view->title = $this->lang->help->common;\n $this->display();\n }", "protected function isHelp() {}", "function acp_helps()\n\t{\n\t\t$this->ipsclass->input['step']++;\n\t\t$uninstall = ( $this->ipsclass->input['un'] == 1 ) ? \"&amp;un=1\" : \"\";\n\t\t\n\t\t$object = ( $this->tasks['acp_helps'] == 1 ) ? 'ACP Help Entry' : 'ACP Help Entries';\n\t\t$operation = ( $this->ipsclass->input['un'] ) ? 'removed' : 'created';\n\t\t$helpkeys = array();\n\t\t\n\t\tforeach ( $this->xml_array['acp_helps_group']['acp_help'] as $k => $v )\n\t\t{\n\t\t\t$helpkeys[] = \"'{$v['page_key']['VALUE']}'\";\n\t\t}\n\t\t\n\t\t$this->ipsclass->DB->do_delete( 'acp_help', \"page_key IN (\".implode( \",\", $helpkeys ).\")\" );\n\t\t\n\t\tif ( !$this->ipsclass->input['un'] )\n\t\t{\n\t\t\tforeach ( $this->xml_array['acp_helps_group']['acp_help'] as $k => $v )\n\t\t\t{\n\t\t\t\t$this->_add_acp_help( $v );\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->ipsclass->admin->redirect( \"{$this->ipsclass->form_code}&amp;code=work&amp;mod={$this->ipsclass->input['mod']}&amp;step={$this->ipsclass->input['step']}{$uninstall}{$group}&amp;st={$this->ipsclass->input['st']}\", \"{$this->xml_array['mod_info']['title']['VALUE']}<br />{$this->tasks['acp_helps']} {$object} {$operation}....\" );\n\t}", "function admin_hide_help() { \n $screen = get_current_screen();\n $screen->remove_help_tabs();\n}", "public function displayInAdmin()\n {\n return self::_enabled();\n }", "public function get_help_tabs()\n {\n }", "public function help_tab() {\n $export_url = $this->get_property_export_url();\n\n if ( !$export_url ) {\n return;\n }\n\n $export_url = $export_url . '&limit=10&format=xml';\n\n $this->get_template_part( 'admin/settings-help-export', array(\n 'export_url' => $export_url,\n ) );\n }", "public function help();", "public function help() \n {\n if (!isset($_SESSION)) { \n session_start(); \n }\n $title = 'Aide';\n $customStyle = $this->setCustomStyle('help');\n require('../src/View/HelpView.php');\n }", "function ShowAdminHelp()\r\n{\r\n\tglobal $txt, $helptxt, $context, $scripturl;\r\n\r\n\tif (!isset($_GET['help']) || !is_string($_GET['help']))\r\n\t\tfatal_lang_error('no_access', false);\r\n\r\n\tif (!isset($helptxt))\r\n\t\t$helptxt = array();\r\n\r\n\t// Load the admin help language file and template.\r\n\tloadLanguage('Help');\r\n\r\n\t// Permission specific help?\r\n\tif (isset($_GET['help']) && substr($_GET['help'], 0, 14) == 'permissionhelp')\r\n\t\tloadLanguage('ManagePermissions');\r\n\r\n\tloadTemplate('Help');\r\n\r\n\t// Set the page title to something relevant.\r\n\t$context['page_title'] = $context['forum_name'] . ' - ' . $txt['help'];\r\n\r\n\t// Don't show any template layers, just the popup sub template.\r\n\t$context['template_layers'] = array();\r\n\t$context['sub_template'] = 'popup';\r\n\r\n\t// What help string should be used?\r\n\tif (isset($helptxt[$_GET['help']]))\r\n\t\t$context['help_text'] = $helptxt[$_GET['help']];\r\n\telseif (isset($txt[$_GET['help']]))\r\n\t\t$context['help_text'] = $txt[$_GET['help']];\r\n\telse\r\n\t\t$context['help_text'] = $_GET['help'];\r\n\r\n\t// Does this text contain a link that we should fill in?\r\n\tif (preg_match('~%([0-9]+\\$)?s\\?~', $context['help_text'], $match))\r\n\t\t$context['help_text'] = sprintf($context['help_text'], $scripturl, $context['session_id'], $context['session_var']);\r\n}", "public function admin_head() {\n\t \t\t// Remove the fake Settings submenu\n\t \t\tremove_submenu_page( 'options-general.php', 'wc_talks' );\n\n\t \t\t//Generate help if one is available for the current screen\n\t \t\tif ( wct_is_admin() || ! empty( $this->is_plugin_settings ) ) {\n\n\t \t\t\t$screen = get_current_screen();\n\n\t \t\t\tif ( ! empty( $screen->id ) && ! $screen->get_help_tabs() ) {\n\t \t\t\t\t$help_tabs_list = $this->get_help_tabs( $screen->id );\n\n\t \t\t\t\tif ( ! empty( $help_tabs_list ) ) {\n\t \t\t\t\t\t// Loop through tabs\n\t \t\t\t\t\tforeach ( $help_tabs_list as $key => $help_tabs ) {\n\t \t\t\t\t\t\t// Make sure types are a screen method\n\t \t\t\t\t\t\tif ( ! in_array( $key, array( 'add_help_tab', 'set_help_sidebar' ) ) ) {\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\tforeach ( $help_tabs as $help_tab ) {\n\t \t\t\t\t\t\t\t$content = '';\n\n\t \t\t\t\t\t\t\tif ( empty( $help_tab['content'] ) || ! is_array( $help_tab['content'] ) ) {\n\t \t\t\t\t\t\t\t\tcontinue;\n\t \t\t\t\t\t\t\t}\n\n\t \t\t\t\t\t\t\tif ( ! empty( $help_tab['strong'] ) ) {\n\t \t\t\t\t\t\t\t\t$content .= '<p><strong>' . $help_tab['strong'] . '</strong></p>';\n\t \t\t\t\t\t\t\t}\n\n\t \t\t\t\t\t\t\tforeach ( $help_tab['content'] as $tab_content ) {\n\t\t\t\t\t\t\t\t\tif ( is_array( $tab_content ) ) {\n\t\t\t\t\t\t\t\t\t\t$content .= '<ul><li>' . join( '</li><li>', $tab_content ) . '</li></ul>';\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t$content .= '<p>' . $tab_content . '</p>';\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\t\t\t$help_tab['content'] = $content;\n\n\t \t\t\t\t\t\t\tif ( 'add_help_tab' == $key ) {\n\t \t\t\t\t\t\t\t\t$screen->add_help_tab( $help_tab );\n\t \t\t\t\t\t\t\t} else {\n\t \t\t\t\t\t\t\t\t$screen->set_help_sidebar( $content );\n\t \t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t}\n\t \t\t\t\t\t}\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t}\n\n\t \t\t// Add some css\n\t\t\t?>\n\n\t\t\t<style type=\"text/css\" media=\"screen\">\n\t\t\t/*<![CDATA[*/\n\n\t\t\t\t/* Bubble style for Main Post type menu */\n\t\t\t\t#adminmenu .wp-menu-open.menu-icon-<?php echo $this->post_type?> .awaiting-mod {\n\t\t\t\t\tbackground-color: #2ea2cc;\n\t\t\t\t\tcolor: #fff;\n\t\t\t\t}\n\n\t\t\t\t#wordcamp-talks-csv span.dashicons-media-spreadsheet {\n\t\t\t\t\tvertical-align: text-bottom;\n\t\t\t\t}\n\n\t\t\t\t<?php if ( wct_is_admin() && ! wct_is_rating_disabled() ) : ?>\n\t\t\t\t\t/* Rating stars in screen options and in talks WP List Table */\n\t\t\t\t\t.metabox-prefs .talk-rating-bubble:before,\n\t\t\t\t\tth .talk-rating-bubble:before {\n\t\t\t\t\t\tfont: normal 20px/.5 'dashicons';\n\t\t\t\t\t\tspeak: none;\n\t\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\t\tpadding: 0;\n\t\t\t\t\t\ttop: 4px;\n\t\t\t\t\t\tleft: -4px;\n\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\tvertical-align: top;\n\t\t\t\t\t\t-webkit-font-smoothing: antialiased;\n\t\t\t\t\t\t-moz-osx-font-smoothing: grayscale;\n\t\t\t\t\t\ttext-decoration: none !important;\n\t\t\t\t\t\tcolor: #444;\n\t\t\t\t\t}\n\n\t\t\t\t\tth .talk-rating-bubble:before,\n\t\t\t\t\t.metabox-prefs .talk-rating-bubble:before {\n\t\t\t\t\t\tcontent: '\\f155';\n\t\t\t\t\t}\n\n\t\t\t\t\t.metabox-prefs .talk-rating-bubble:before {\n\t\t\t\t\t\tvertical-align: baseline;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* Rates management */\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates {\n\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\tlist-style: none;\n\t\t\t\t\t\tclear: both;\n\t\t\t\t\t\tmargin: 0;\n\t\t\t\t\t\tpadding: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates li {\n\t\t\t\t\t\tlist-style: none;\n\t\t\t\t\t\toverflow: hidden;\n\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\tpadding:15px 0;\n\t\t\t\t\t\tborder-bottom:dotted 1px #ccc;\n\t\t\t\t\t}\n\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates li:last-child {\n\t\t\t\t\t\tborder:none;\n\t\t\t\t\t}\n\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates li div.admin-talk-rates-star {\n\t\t\t\t\t\tfloat:left;\n\t\t\t\t\t}\n\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates li div.admin-talk-rates-star {\n\t\t\t\t\t\twidth:20%;\n\t\t\t\t\t\tfont-weight: bold;\n\t\t\t\t\t}\n\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates li div.admin-talk-rates-users {\n\t\t\t\t\t\tmargin-left: 20%;\n\t\t\t\t\t}\n\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates li div.admin-talk-rates-users span.user-rated {\n\t\t\t\t\t\tdisplay:inline-block;\n\t\t\t\t\t\tmargin:5px;\n\t\t\t\t\t\tpadding:5px;\n\t\t\t\t\t\t-webkit-box-shadow: 0 1px 1px 1px rgba(0,0,0,0.1);\n\t\t\t\t\t\tbox-shadow: 0 1px 1px 1px rgba(0,0,0,0.1);\n\t\t\t\t\t}\n\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates li div.admin-talk-rates-users a.del-rate {\n\t\t\t\t\t\ttext-decoration: none;\n\t\t\t\t\t}\n\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates li div.admin-talk-rates-users a.del-rate div {\n\t\t\t\t\t\tvertical-align: baseline;\n\t\t\t\t\t}\n\t\t\t\t<?php endif; ?>\n\n\t\t\t/*]]>*/\n\t\t\t</style>\n\t\t\t<?php\n\t\t}", "function helps()\n\t{\n\t\t$this->ipsclass->input['step']++;\n\t\t$uninstall = ( $this->ipsclass->input['un'] == 1 ) ? \"&amp;un=1\" : \"\";\n\t\t\n\t\t$object = ( $this->tasks['helps'] == 1 ) ? 'Help File' : 'Help Files';\n\t\t$operation = ( $this->ipsclass->input['un'] ) ? 'removed' : 'created';\n\t\t$helpkeys = array();\n\t\t\n\t\tforeach ( $this->xml_array['helps_group']['help'] as $k => $v )\n\t\t{\n\t\t\t$helpkeys[] = \"'{$v['title']['VALUE']}'\";\n\t\t}\n\t\t\n\t\t$this->ipsclass->DB->do_delete( 'faq', \"title IN (\".implode( \",\", $helpkeys ).\")\" );\n\t\t\n\t\tif ( !$this->ipsclass->input['un'] )\n\t\t{\n\t\t\tforeach ( $this->xml_array['helps_group']['help'] as $k => $v )\n\t\t\t{\n\t\t\t\t$this->_add_help( $v );\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->ipsclass->admin->redirect( \"{$this->ipsclass->form_code}&amp;code=work&amp;mod={$this->ipsclass->input['mod']}&amp;step={$this->ipsclass->input['step']}{$uninstall}{$group}&amp;st={$this->ipsclass->input['st']}\", \"{$this->xml_array['mod_info']['title']['VALUE']}<br />{$this->tasks['helps']} {$object} {$operation}....\" );\n\t}", "public function help_tab(){\r\n $screen = get_current_screen();\r\n\r\n foreach($this->what_helps as $help_id => $tab) {\r\n $callback_name = $this->generate_callback_name($help_id);\r\n if(method_exists($this, 'help_'.$callback_name.'_callback')) {\r\n $callback = array($this, 'help_'.$callback_name.'_callback');\r\n }\r\n else {\r\n $callback = array($this, 'help_callback');\r\n }\r\n // documentation tab\r\n $screen->add_help_tab( array(\r\n 'id' => 'hw-help-'.$help_id,\r\n 'title' => __( $tab['title'] ),\r\n //'content' => \"<p>sdfsgdgdfghfhfgh</p>\",\r\n 'callback' => $callback\r\n )\r\n );\r\n }\r\n }", "public function setHelpTabs() {\n $this->args['help_tabs'][] = array(\n 'id' => 'redux-help-tab-1',\n 'title' => __( 'Theme Information 1', 'slova' ),\n 'content' => __( '<p>This is the tab content, HTML is allowed.</p>', 'slova' )\n );\n\n $this->args['help_tabs'][] = array(\n 'id' => 'redux-help-tab-2',\n 'title' => __( 'Theme Information 2', 'slova' ),\n 'content' => __( '<p>This is the tab content, HTML is allowed.</p>', 'slova' )\n );\n\n // Set the help sidebar\n $this->args['help_sidebar'] = __( '<p>This is the sidebar content, HTML is allowed.</p>', 'slova' );\n }", "function admin_menu()\n {\n }", "function admin_menu()\n {\n }", "function admin_menu()\n {\n }", "public function help()\n {\n $url = array('url' => current_url());\n\n $this->session->set_userdata($url);\n\n $this->data['help'] = $this->home_m->get_data('help')->row_array();\n\n $body = 'help' ;\n\n $this->load_pages($body,$this->data);\n }", "public function get_contextual_help() {\n\t\treturn '<p>' . __( 'Hovering over a row in the intrusions list will display action links that allow you to manage the intrusion. You can perform the following actions:', 'mute-screamer' ) . '</p>' .\n\t\t\t'<ul>' .\n\t\t\t'<li>' . __( 'Exclude automatically adds the item to the Exception fields list.', 'mute-screamer' ) . '</li>' .\n\t\t\t'<li>' . __( 'Delete permanently deletes the intrusion.', 'mute-screamer' ) . '</li>' .\n\t\t\t'</ul>';\n\t}", "function adminOptions() {\r\n\t\t\tTrackTheBookView::render('admin-options');\r\n\t\t}", "public function makeHelpButton() {}", "public function admin_page()\n {\n }", "public function admin_page()\n {\n }", "function edithistory_activate()\n{\n\tglobal $db;\n\t$insertarray = array(\n\t\t'name' => 'edithistory',\n\t\t'title' => 'Edit History Settings',\n\t\t'description' => 'Various option related to edit history (edithistory.php) can be managed and set here.',\n\t\t'disporder' => 32,\n\t\t'isdefault' => 0,\n\t);\n\t$gid = $db->insert_query(\"settinggroups\", $insertarray);\n\n\t$insertarray = array(\n\t\t'name' => 'editmodvisibility',\n\t\t'title' => 'Edit History Visibility',\n\t\t'description' => 'Allows you to determine who has permission to view edit histories.',\n\t\t'optionscode' => 'radio\n0=Admins, Super Mods and Mods\n1=Admins and Super Mods only\n2=Admins only',\n\t\t'value' => 0,\n\t\t'disporder' => 1,\n\t\t'gid' => $gid\n\t);\n\t$db->insert_query(\"settings\", $insertarray);\n\n\t$insertarray = array(\n\t\t'name' => 'editsperpages',\n\t\t'title' => 'Edits Per Page',\n\t\t'description' => 'Here you can enter the number of edits to show per page.',\n\t\t'optionscode' => 'text',\n\t\t'value' => 10,\n\t\t'disporder' => 2,\n\t\t'gid' => $gid\n\t);\n\t$db->insert_query(\"settings\", $insertarray);\n\n\t$insertarray = array(\n\t\t'name' => 'edithistorychar',\n\t\t'title' => 'Post Character Cutoff',\n\t\t'description' => 'The number of characters needed for the post to be cut off and a link to view the full text appears.',\n\t\t'optionscode' => 'text',\n\t\t'value' => 500,\n\t\t'disporder' => 3,\n\t\t'gid' => $gid\n\t);\n\t$db->insert_query(\"settings\", $insertarray);\n\n\trebuild_settings();\n\n\t$insert_array = array(\n\t\t'title'\t\t=> 'edithistory',\n\t\t'template'\t=> $db->escape_string('<html>\n<head>\n<title>{$mybb->settings[\\'bbname\\']} - {$lang->edit_history}</title>\n{$headerinclude}\n</head>\n<body>\n{$header}\n{$multipage}\n<table border=\"0\" cellspacing=\"{$theme[\\'borderwidth\\']}\" cellpadding=\"{$theme[\\'tablespace\\']}\" class=\"tborder\">\n<tr>\n<td class=\"thead\" colspan=\"5\"><strong>{$lang->edit_history}</strong></td>\n</tr>\n<tr>\n<td class=\"tcat\" align=\"center\"><span class=\"smalltext\"><strong>{$lang->edit_reason}</strong></span></td>\n<td class=\"tcat\" width=\"15%\" align=\"center\"><span class=\"smalltext\"><strong>{$lang->edited_by}</strong></span></td>\n<td class=\"tcat\" width=\"10%\" align=\"center\"><span class=\"smalltext\"><strong>{$lang->ip_address}</strong></span></td>\n<td class=\"tcat\" width=\"15%\" align=\"center\"><span class=\"smalltext\"><strong>{$lang->date}</strong></span></td>\n<td class=\"tcat\" width=\"40%\" align=\"center\"><span class=\"smalltext\"><strong>{$lang->original_text}</strong></span></td>\n</tr>\n{$edit_history}\n</tr>\n</table>\n{$multipage}\n{$footer}\n</body>\n</html>'),\n\t\t'sid'\t\t=> '-1',\n\t\t'version'\t=> '',\n\t\t'dateline'\t=> TIME_NOW\n\t);\n\t$db->insert_query(\"templates\", $insert_array);\n\n\t$insert_array = array(\n\t\t'title'\t\t=> 'edithistory_nohistory',\n\t\t'template'\t=> $db->escape_string('<tr>\n<td class=\"trow1\" colspan=\"5\" align=\"center\">{$lang->no_history}</td>\n</tr>'),\n\t\t'sid'\t\t=> '-1',\n\t\t'version'\t=> '',\n\t\t'dateline'\t=> TIME_NOW\n\t);\n\t$db->insert_query(\"templates\", $insert_array);\n\n\t$insert_array = array(\n\t\t'title'\t\t=> 'edithistory_item',\n\t\t'template'\t=> $db->escape_string('<tr>\n<td class=\"{$alt_bg}\" align=\"center\">{$history[\\'reason\\']}</td>\n<td class=\"{$alt_bg}\" align=\"center\">{$history[\\'username\\']}</td>\n<td class=\"{$alt_bg}\" align=\"center\">{$history[\\'ipaddress\\']}</td>\n<td class=\"{$alt_bg}\" align=\"center\">{$dateline}</td>\n<td class=\"{$alt_bg}\">{$originaltext}<br /><span class=\"smalltext\">[<a href=\"edithistory.php?action=compare&pid={$history[\\'pid\\']}&eid={$history[\\'eid\\']}\">{$lang->compare_posts}</a>]<span></td>\n</tr>'),\n\t\t'sid'\t\t=> '-1',\n\t\t'version'\t=> '',\n\t\t'dateline'\t=> TIME_NOW\n\t);\n\t$db->insert_query(\"templates\", $insert_array);\n\n\t$insert_array = array(\n\t\t'title'\t\t=> 'postbit_edithistory',\n\t\t'template'\t=> $db->escape_string('<span class=\"smalltext\"><em>(<a href=\"edithistory.php?pid={$post[\\'pid\\']}\">{$lang->view_edit_history}</a>)</em></span>'),\n\t\t'sid'\t\t=> '-1',\n\t\t'version'\t=> '',\n\t\t'dateline'\t=> TIME_NOW\n\t);\n\t$db->insert_query(\"templates\", $insert_array);\n\n\t$insert_array = array(\n\t\t'title'\t\t=> 'edithistory_comparison',\n\t\t'template'\t=> $db->escape_string('<html>\n<head>\n<title>{$mybb->settings[\\'bbname\\']} - {$lang->edit_history}</title>\n{$headerinclude}\n<style type=\"text/css\">\nins {\nbackground: #bfb;\ntext-decoration: none;\npadding: 2px;\n}\n\ndel {\nbackground: #fbb;\ntext-decoration: none;\npadding: 2px;\n}\n</style>\n</head>\n<body>\n{$header}\n<span class=\"smalltext\">{$lang->highlight_added}</span><br />\n<span class=\"smalltext\">{$lang->highlight_deleted}</span><br />\n<br />\n<table border=\"0\" cellspacing=\"{$theme[\\'borderwidth\\']}\" cellpadding=\"{$theme[\\'tablespace\\']}\" class=\"tborder\">\n<tr>\n<td class=\"thead\" colspan=\"5\"><strong>{$lang->edit_history}</strong></td>\n</tr>\n<tr>\n<td class=\"tcat\" width=\"50%\"><span class=\"smalltext\"><strong>{$lang->edit_as_of}</strong></span></td>\n<td class=\"tcat\" width=\"50%\"><span class=\"smalltext\"><strong>{$lang->current_post}</strong></span></td>\n</tr>\n<tr>\n<td class=\"trow1\" width=\"50%\">{$comparison}</td>\n<td class=\"trow1\" width=\"50%\">{$post[\\'message\\']}</td>\n</tr>\n</table>\n{$footer}\n</body>\n</html>'),\n\t\t'sid'\t\t=> '-1',\n\t\t'version'\t=> '',\n\t\t'dateline'\t=> TIME_NOW\n\t);\n\t$db->insert_query(\"templates\", $insert_array);\n\n\t$insert_array = array(\n\t\t'title'\t\t=> 'edithistory_viewfull',\n\t\t'template'\t=> $db->escape_string('<html>\n<head>\n<title>{$mybb->settings[\\'bbname\\']} - {$lang->view_full_post}</title>\n{$headerinclude}\n</head>\n<body>\n<table border=\"0\" cellspacing=\"{$theme[\\'borderwidth\\']}\" cellpadding=\"{$theme[\\'tablespace\\']}\" class=\"tborder\">\n<tr>\n<td class=\"trow1\" align=\"center\">\n<strong><span class=\"largetext\">{$lang->view_full_post}</span></strong>\n<table cellspacing=\"{$theme[\\'borderwidth\\']}\" cellpadding=\"{$theme[\\'tablespace\\']}\" class=\"tborder\">\n<tr>\n<td class=\"trow2\"><strong>{$lang->edited_by}:</strong></td>\n<td class=\"trow2\">{$viewfulledit[\\'username\\']}</td>\n</tr>\n<tr>\n<td class=\"trow1\"><strong>{$lang->ip_address}:</strong></td>\n<td class=\"trow1\">{$viewfulledit[\\'ipaddress\\']}</td>\n</tr>\n<tr>\n<td class=\"trow2\"><strong>{$lang->subject}:</strong></td>\n<td class=\"trow2\">{$viewfulledit[\\'subject\\']}</td>\n</tr>\n<tr>\n<td class=\"trow1\"><strong>{$lang->date}:</strong></td>\n<td class=\"trow1\">{$dateline}</td>\n</tr>\n<tr>\n<td class=\"trow2\"><strong>{$lang->edit_reason}</strong></td>\n<td class=\"trow2\">{$viewfulledit[\\'reason\\']}</td>\n</tr>\n<tr>\n<td class=\"trow2\" colspan=\"2\">{$originaltext}</td>\n</tr>\n</table>\n<br /><br />\n<div style=\"text-align: center;\">\n<script type=\"text/javascript\">\n<!--\ndocument.write(\\'[<a href=\"javascript:window.close();\">{$lang->close_window}</a>]\\');\n// -->\n</script>\n</div>\n</td>\n</tr>\n</table>\n</body>\n</html>'),\n\t\t'sid'\t\t=> '-1',\n\t\t'version'\t=> '',\n\t\t'dateline'\t=> TIME_NOW\n\t);\n\t$db->insert_query(\"templates\", $insert_array);\n\n\t$insert_array = array(\n\t\t'title'\t\t=> 'editpost_reason',\n\t\t'template'\t=> $db->escape_string('<tr>\n<td class=\"trow2\"><strong>{$lang->edit_reason}</strong></td>\n<td class=\"trow2\"><input type=\"text\" class=\"textbox\" name=\"reason\" size=\"40\" maxlength=\"200\" value=\"{$postreason}\" tabindex=\"2\" /></td>\n</tr>'),\n\t\t'sid'\t\t=> '-1',\n\t\t'version'\t=> '',\n\t\t'dateline'\t=> TIME_NOW\n\t);\n\t$db->insert_query(\"templates\", $insert_array);\n\n\tinclude MYBB_ROOT.\"/inc/adminfunctions_templates.php\";\n\tfind_replace_templatesets(\"editpost\", \"#\".preg_quote('{$posticons}').\"#i\", '{$reason}{$posticons}');\n\tfind_replace_templatesets(\"postbit_editedby\", \"#\".preg_quote('{$post[\\'editedprofilelink\\']}.)</span>').\"#i\", '{$post[\\'editedprofilelink\\']}.<!-- editreason -->)</span>');\n\tfind_replace_templatesets(\"postbit\", \"#\".preg_quote('{$post[\\'editedmsg\\']}').\"#i\", '{$post[\\'editedmsg\\']}{$post[\\'edithistory\\']}');\n\tfind_replace_templatesets(\"postbit_classic\", \"#\".preg_quote('{$post[\\'editedmsg\\']}').\"#i\", '{$post[\\'editedmsg\\']}{$post[\\'edithistory\\']}');\n\n\tchange_admin_permission('tools', 'edithistory');\n}", "protected function getQuickHelp() {\r\n $strOldAction = $this->getAction();\r\n $this->setAction($this->strOriginalAction);\r\n $strQuickhelp = parent::getQuickHelp();\r\n $this->setAction($strOldAction);\r\n return $strQuickhelp;\r\n }", "function cmdAdmin()\n\t{\n\t\t$cmd = $this->cmd;\n\n\t\tswitch ($this->cmd)\n\t\t{\n\t\t\tcase NULL:\n\t\t\tcase \"clientlist\":\n\t\t\t\t$this->setDisplayMode(\"view\");\n\t\t\t\t$this->displayClientList();\n\t\t\t\t$this->active_tab = \"clientlist\";\n\t\t\t\tbreak;\n\n\t\t\tcase \"changepassword\":\n\t\t\t\t$this->setDisplayMode(\"view\");\n\t\t\t\t$this->changeMasterPassword();\n\t\t\t\t$this->active_tab = \"password\";\n\t\t\t\tbreak;\n\n\t\t\tcase \"mastersettings\":\n\t\t\t\t$this->setDisplayMode(\"view\");\n\t\t\t\t$this->changeMasterSettings();\n\t\t\t\t$this->active_tab = \"basicsettings\";\n\t\t\t\tbreak;\n\n\t\t\tcase \"determineToolsPath\":\n\t\t\t\t$this->setDisplayMode(\"view\");\n\t\t\t\t$this->determineToolsPath();\n\t\t\t\tbreak;\n\n\t\t\tcase \"changedefault\":\n\t\t\t\t$this->changeDefaultClient();\n\t\t\t\tbreak;\n\n\t\t\tcase \"newclient\":\n\t\t\t\t$this->cmd = \"selectdb\";\n\t\t\t\t$this->setDisplayMode(\"setup\");\n\t\t\t\t$this->setup->ini_client_exists = $this->setup->newClient();\n\t\t\t\t$this->selectDBType();\n\t\t\t\tbreak;\n\n\t\t\tcase \"selectdbtype\":\n\t\t\tcase \"displayIni\":\n\t\t\t\t$this->cmd = \"ini\";\n\t\t\t\t$this->setDisplayMode(\"setup\");\n\t\t\t\t//$this->setup->ini_client_exists = $this->setup->newClient($this->client_id);\n\t\t\t\t$this->displayIni();\n\t\t\t\tbreak;\n\n\t\t\tcase \"startup\":\n\t\t\t\t$this->setDisplayMode(\"setup\");\n\t\t\t\t$this->setup->ini_client_exists = $this->setup->newClient();\n\t\t\t\t$this->displayStartup();\n\t\t\t\tbreak;\n\n\t\t\tcase \"delete\":\n\t\t\t\t$this->setDisplayMode(\"view\");\n\t\t\t\t$this->displayDeleteConfirmation();\n\t\t\t\tbreak;\n\n\t\t\tcase \"togglelist\":\n\t\t\t\t$this->setDisplayMode(\"view\");\n\t\t\t\t$this->toggleClientList();\n\t\t\t\tbreak;\n\n\t\t\tcase \"preliminaries\":\n\t\t\t\t$this->setup->checkPreliminaries();\n\t\t\t\t$this->displayPreliminaries();\n\t\t\t\t$this->active_tab = \"preliminaries\";\n\t\t\t\tbreak;\n\n\t\t\tcase \"updateBasicSettings\":\n\t\t\tcase \"performLogin\":\n\t\t\tcase \"performMLogin\":\n\t\t\t\t$this->$cmd();\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\t$this->cmdClient();\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function activate() {\n MenuItem::add(array(\n 'plugin' => $this->_plugin,\n 'name' => 'menu',\n 'labelKey' => $this->_plugin . '.menu-title',\n 'icon' => 'git-square',\n 'action' => 'h-gitter-index'\n ));\n\n $htracker = PLugin::get('h-tracker');\n if($htracker && !$htracker->isActive()) {\n $htracker->activate();\n\n $items = MenuItem::getPluginMenuItems('h-tracker');\n\n foreach($items as $item) {\n $item->delete();\n }\n }\n }", "function dfcg_plugin_help() {\n\t\n\tglobal $current_screen;\n\t\n\t$sidebar = dfcg_help_sidebar();\n\t\n\t$current_screen->set_help_sidebar( $sidebar );\n\t\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-general',\n\t\t'title' => __( 'General info', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_general'\n\t));\n\t\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-theme',\n\t\t'title' => __( 'Theme integration', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_theme'\n\t));\n\t\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-quick',\n\t\t'title' => __( 'Quick Start', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_quick'\n\t));\n\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-gallery',\n\t\t'title' => __( 'Gallery Method', DFCG_DOMAIN ),\n\t\t'callback' => \"dfcg_help_gallery\"\n\t));\n\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-images',\n\t\t'title' => __( 'Image Management', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_images'\n\t));\n\t\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-desc',\n\t\t'title' => __( 'Descriptions', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_desc'\n\t));\n\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-css',\n\t\t'title' => __( 'Gallery CSS', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_css'\n\t));\n\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-scripts',\n\t\t'title' => __( 'Load Scripts', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_scripts'\n\t));\n\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-troubleshooting',\n\t\t'title' => __( 'Troubleshooting', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_trouble'\n\t));\n}", "protected function admin_page_action() {\n\n\t\tif ( $this->is_admin_request_for_users_forget() ) {\n\t\t\t$this->users_forget();\n\t\t}\n\n\t\tif ( $this->is_admin_request_for_users_send_email() ) {\n\t\t\t$this->users_send_email();\n\t\t}\n\n\t\tif ( $this->is_admin_request_for_users_remove() ) {\n\t\t\t$this->users_remove_from_list();\n\t\t}\n\n\t\t/* Default settings page */\n\t\t$this->add_view_option( 'data', $this->get_all_requested_users_data( $confirmed_only = true ) );\n\n\t}", "function deactivate(){\n\n\t\t//update_option( WPC_OPTIONS, array() );\n\t\t//update_option( WPC_OPTIONS_COMMENTS, array() );\n\t\t//update_option( WPC_OPTIONS_LIKE_BUTTON, array() );\n\n\t}", "function admin_activate_cmspage($is_active = null,$cms_id = null,$model_name = null){\r\r\n\t\t\r\r\n\t\t$this->layout = \"\";\r\r\n\t\t$this->autoRender = false;\r\r\n\t\t$cms_id = DECRYPT_DATA($cms_id);\r\r\n\t\tif(isset($is_active) && isset($cms_id) && isset($model_name)){\r\r\n\t\t\tApp::import(\"Model\",$model_name);\r\r\n\t\t\t$this->$model_name = new $model_name();\r\r\n\t\t\tif($is_active == 0){//Activate Status\r\r\n\t\t\t $this->$model_name->updateAll(array(\"$model_name.is_active\"=>\"'1'\"),array(\"$model_name.id\"=>$cms_id));\r\r\n\t\t\t $this->Session->setFlash(RECORD_ACTIVATED, 'message/green');\r\r\n\t\t\t}\r\r\n\t\t\telse if($is_active == 1){//Inactivate Status\r\r\n\t\t\t $this->$model_name->updateAll(array(\"$model_name.is_active\"=>\"'0'\"),array(\"$model_name.id\"=>$cms_id));\r\r\n\t\t\t $this->Session->setFlash(RECORD_DEACTIVATED, 'message/green');\r\r\n\t\t\t}\r\r\n\t\t}\r\r\n\t\t$this->redirect($this->referer());exit();\t\r\r\n\t}", "public static function es_admin_option() {\n\t}", "public function remove_help_tabs()\n {\n }", "public function edit()\n {\n //\n\t\treturn 'ini halaman edit';\n }", "function listPage_quickAction(){\n $this->data_view['dataTable']['quickAction'] = array(\n array('action'=>$this->_table.'/set_status/is_active/0','title'=>'Ẩn','popup'=>false),\n array('action'=>$this->_table.'/set_status/is_active/1','title'=>'Hiện','popup'=>false),\n array('action'=>$this->_table.'/delete_popup','title'=>'Xóa','popup'=>true),\n array('action'=>$this->_table.'/tag_popup/create','title'=>'Thêm tag','popup'=>true),\n array('action'=>$this->_table.'/tag_popup/delete','title'=>'Xóa tag','popup'=>true),\n array('action'=>$this->_table.'/cate_popup/create','title'=>'Thêm vào danh mục','popup'=>true),\n array('action'=>$this->_table.'/cate_popup/delete','title'=>'Xóa khỏi danh mục','popup'=>true),\n );\n }", "function hook_admin_tools() {\n\t\treturn null;\n\t}", "function hook_admin_tools() {\n\t\treturn null;\n\t}", "function admin_extensions() {\n\t\t\tswitch ($_GET['method']) {\n\t\t\t\tcase 'activate'\t\t\t\t:\n\t\t\t\t\tcheck_admin_referer('newsletters_extension_activate_' . $_GET['plugin']);\n\t\t\t\t\tactivate_plugin(plugin_basename($_GET['plugin']));\n\t\t\t\t\t$this -> redirect($this -> url, 'message', __('Extension has been activated.', $this -> plugin_name));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'deactivate'\t\t\t:\n\t\t\t\t\tcheck_admin_referer('newsletters_extension_deactivate_' . $_GET['plugin']);\n\t\t\t\t\tdeactivate_plugins(array(plugin_basename($_GET['plugin'])));\n\t\t\t\t\t$this -> redirect($this -> url, 'error', __('Extension has been deactivated.', $this -> plugin_name));\n\t\t\t\t\tbreak;\n\t\t\t\tdefault\t\t\t\t\t\t:\n\t\t\t\t\t$this -> render('extensions' . DS . 'index', false, true, 'admin');\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "protected function renderHelp() {}", "public function displayAdminPanel() {}", "public function help(){\n\t\t$screen = get_current_screen();\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/installing\" target=\"_blank\">' . __( 'Installing the Plugin', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/staying-updated\" target=\"_blank\">' . __( 'Staying Updated', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/glossary\" target=\"_blank\">' . __( 'Glossary', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-general-info',\n\t\t\t'title' => __( 'General Info', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/forms-interface\" target=\"_blank\">' . __( 'Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/forms-creating\" target=\"_blank\">' . __( 'Creating a New Form', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/forms-sorting\" target=\"_blank\">' . __( 'Sorting Your Forms', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/forms-building\" target=\"_blank\">' . __( 'Building Your Forms', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-forms',\n\t\t\t'title' => __( 'Forms', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/entries-interface\" target=\"_blank\">' . __( 'Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/entries-managing\" target=\"_blank\">' . __( 'Managing Your Entries', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/entries-searching-filtering\" target=\"_blank\">' . __( 'Searching and Filtering Your Entries', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-entries',\n\t\t\t'title' => __( 'Entries', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/email-design\" target=\"_blank\">' . __( 'Email Design Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/analytics\" target=\"_blank\">' . __( 'Analytics Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-email-analytics',\n\t\t\t'title' => __( 'Email Design &amp; Analytics', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/import\" target=\"_blank\">' . __( 'Import Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/export\" target=\"_blank\">' . __( 'Export Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-import-export',\n\t\t\t'title' => __( 'Import &amp; Export', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/conditional-logic\" target=\"_blank\">' . __( 'Conditional Logic', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/templating\" target=\"_blank\">' . __( 'Templating', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/custom-capabilities\" target=\"_blank\">' . __( 'Custom Capabilities', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/hooks\" target=\"_blank\">' . __( 'Filters and Actions', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-advanced',\n\t\t\t'title' => __( 'Advanced Topics', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<p>' . __( '<strong>Always load CSS</strong> - Force Visual Form Builder Pro CSS to load on every page. Will override \"Disable CSS\" option, if selected.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable CSS</strong> - Disable CSS output for all forms.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable Email</strong> - Disable emails from sending for all forms.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable Notifications Email</strong> - Disable notification emails from sending for all forms.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Skip Empty Fields in Email</strong> - Fields that have no data will not be displayed in the email.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable saving new entry</strong> - Disable new entries from being saved.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable saving entry IP address</strong> - An entry will be saved, but the IP address will be removed.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Place Address labels above fields</strong> - The Address field labels will be placed above the inputs instead of below.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Remove default SPAM Verification</strong> - The default SPAM Verification question will be removed and only a submit button will be visible.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable meta tag version</strong> - Prevent the hidden Visual Form Builder Pro version number from printing in the source code.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Skip PayPal redirect if total is zero</strong> - If PayPal is configured, do not redirect if the total is zero.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Prepend Confirmation</strong> - Always display the form beneath the text confirmation after the form has been submitted.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Max Upload Size</strong> - Restrict the file upload size for all forms.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Sender Mail Header</strong> - Control the Sender attribute in the mail header. This is useful for certain server configurations that require an existing email on the domain to be used.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>reCAPTCHA Public Key</strong> - Required if \"Use reCAPTCHA\" option is selected in the Secret field.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>reCAPTCHA Private Key</strong> - Required if \"Use reCAPTCHA\" option is selected in the Secret field.', 'visual-form-builder-pro' ) . '</p>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-settings',\n\t\t\t'title' => __( 'Settings', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t}", "function mod_core_admin() {\n\t\tglobal $NeptuneCore;\n\t\tglobal $NeptuneSQL;\n\t\tglobal $NeptuneAdmin;\n\t\t\n\t\tif (!isset($NeptuneCore)) {\n\t\t\t$NeptuneCore = new NeptuneCore();\n\t\t}\t\n\t\tif (!isset($NeptuneSQL)) {\n\t\t\t$NeptuneSQL = new NeptuneSQL();\n\t\t}\t\n\t\tif (!isset($NeptuneAdmin)) {\n\t\t\t$NeptuneAdmin = new NeptuneAdmin();\n\t\t}\t\n\t\t\n\t\t\n\t\tif (neptune_get_permissions() >= 3) {\n\t\t\t$query = $NeptuneCore->var_get(\"system\",\"query\");\n\t\t\tif (@isset($query[1]) && @isset($query[2])) {\n\t\t\t\t$AdminFunction = \"acp_\" . $query[1] . \"_\" . $query[2];\n\t\t\t\t\n\t\t\t\t$AdminFunction();\n\t\t\t} else {\n\t\t\t\t$NeptuneAdmin->run();\n\t\t\t}\n\t\t} else {\n\t\t\t$NeptuneCore->title($NeptuneCore->var_get(\"locale\",\"accessdenied\"));\n\t\t\t$NeptuneCore->neptune_echo(\"<p>\" . $NeptuneCore->var_get(\"locale\",\"nopermission\") . \"</p>\");\n\t\t\t\n\t\t\theader(\"HTTP/1.1 403 Forbidden\");\n\t\t}\n\t}", "public function relatorio4(){\n $this->isAdmin();\n }", "function mass_actions () {\n\t\t$OBJECT_NAME\t= \"help\";\n\n\t\tif (isset($_POST[\"delete\"])) {\n\t\t\t$CURRENT_OPERATION = \"delete\";\n\t\t} elseif (isset($_POST[\"close\"])) {\n\t\t\t$CURRENT_OPERATION = \"close\";\n\t\t} elseif (isset($_POST[\"activate\"])) {\n\t\t\t$CURRENT_OPERATION = \"activate\";\n\t\t} elseif (isset($_POST[\"mass_reply\"])) {\n\t\t\t$CURRENT_OPERATION = \"mass_reply\";\n\t\t}\n\t\t// Check if we determine current operation\n\t\tif (empty($CURRENT_OPERATION)) {\n\t\t\treturn _e(\"Please select operation\");\n\t\t}\n\t\t// Prepare ads ids\n\t\tforeach ((array)$_POST[\"items\"] as $cur_id) {\n\t\t\t$cur_id = intval($cur_id);\n\t\t\tif (empty($cur_id)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$items_ids[$cur_id] = $cur_id;\n\t\t}\n\t\t// Get tickets\n\t\tif (!empty($items_ids)) {\n\t\t\t$Q = db()->query(\"SELECT * FROM \".db('help_tickets').\" WHERE id IN(\".implode(\",\", $items_ids).\")\");\n\t\t\twhile ($A = db()->fetch_assoc($Q)) {\n\t\t\t\t$tickets_infos[$A[\"id\"]]\t= $A;\n\t\t\t\t$emails[$A[\"email\"]]\t\t= _es($A[\"email\"]);\n\t\t\t}\n\t\t}\n\t\t// Get users details\n\t\tif (!empty($emails)) {\n\t\t\t$Q = db()->query(\"SELECT * FROM \".db('user').\" WHERE email IN('\".implode(\"','\", $emails).\"')\");\n\t\t\twhile ($A = db()->fetch_assoc($Q)) {\n\t\t\t\t$users_infos[$A[\"email\"]] = $A;\n\t\t\t}\n\t\t}\n\t\t// Do get current admin info\n\t\t$admin_info = db()->query_fetch(\"SELECT * FROM \".db('admin').\" WHERE id=\".intval($_SESSION[\"admin_id\"]));\n\t\t$admin_name = $admin_info[\"first_name\"].\" \".$admin_info[\"last_name\"];\n\t\t// Switch between operation\n\t\t// ###########################################\n\t\tif ($CURRENT_OPERATION == \"delete\") {\n\n\t\t\tif (!empty($items_ids)) {\n\t\t\t\tdb()->query(\"DELETE FROM \".db('help_tickets').\" WHERE id IN(\".implode(\",\",$items_ids).\")\");\n\t\t\t}\n\n\t\t// ###########################################\n\t\t} elseif ($CURRENT_OPERATION == \"close\") {\n\n\t\t\tif (!empty($items_ids)) {\n\t\t\t\tdb()->query(\"UPDATE \".db('help_tickets').\" SET status='closed' WHERE id IN(\".implode(\",\",$items_ids).\")\");\n\t\t\t}\n\n\t\t// ###########################################\n\t\t} elseif ($CURRENT_OPERATION == \"activate\") {\n\n\t\t\tforeach ((array)$tickets_infos as $_id => $_ticket_info) {\n\t\t\t\t$user_info = $users_infos[$_ticket_info[\"email\"]];\n\t\t\t\tif (empty($user_info) \n\t\t\t\t\t|| $user_info[\"is_deleted\"] == 1\n\t\t\t\t) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t// Do activate user's account\n\t\t\t\tdb()->query(\"UPDATE \".db('user').\" SET active='1' WHERE id=\".intval($user_info[\"id\"]));\n\t\t\t\t// Prepare email\n\t\t\t\t$replace = array(\n\t\t\t\t\t\"user_name\"\t\t=> _prepare_html(_display_name($user_info)),\n\t\t\t\t\t\"user_login\"\t=> _prepare_html($user_info[\"login\"]),\n\t\t\t\t\t\"user_password\"\t=> _prepare_html($user_info[\"password\"]),\n\t\t\t\t);\n\t\t\t\t$message = tpl()->parse($_GET[\"object\"].\"/email_on_auto_activate\", $replace);\n\t\t\t\t// Do send mail\n\t\t\t\t$from_name = $this->ADD_ADMIN_NAME ? \"Admin \".SITE_ADVERT_NAME : SITE_ADMIN_NAME;\n\t\t\t\t$send_result = common()->send_mail(SITE_ADMIN_EMAIL_ADV, $from_name, $_ticket_info[\"email\"], $_ticket_info[\"email\"], \"Help ticket answer\", $message, nl2br($message));\n\t\t\t\t// Close ticket\n\t\t\t\tdb()->query(\"UPDATE \".db('help_tickets').\" SET status='closed' WHERE id=\".intval($_ticket_info[\"id\"]));\n\t\t\t\t// Do not close ticket if we have troubles with sending email\n\t\t\t\tif ($send_result) {\n\t\t\t\t} else {\n\t\t\t\t\t// comment that we have trouble with sending email\n\t\t\t\t\t$messqge = \"Error with sending confirmation email to user\";\n\t\t\t\t}\n\t\t\t\t// Add comment\n\t\t\t\tdb()->INSERT(\"comments\", array(\n\t\t\t\t\t\"object_name\"\t\t=> _es(\"help\"),\n\t\t\t\t\t\"object_id\"\t\t\t=> intval($_ticket_info[\"id\"]),\n\t\t\t\t\t\"user_id\"\t\t\t=> 0,\n\t\t\t\t\t\"user_name\"\t\t\t=> _es(\"Admin: \".$admin_name),\n\t\t\t\t\t\"text\" \t\t\t\t=> _es($message),\n\t\t\t\t\t\"add_date\"\t\t\t=> time(),\n\t\t\t\t\t\"active\"\t\t\t=> 1,\n\t\t\t\t));\n\t\t\t}\n\n\t\t// ###########################################\n\t\t} elseif ($CURRENT_OPERATION == \"mass_reply\") {\n\n\t\t\t// Get first site info\n\t\t\tif (is_array(_class('sites_info')->info))\t{\n\t\t\t\t$FIRST_SITE_INFO = array_shift(_class('sites_info')->info);\n\t\t\t}\n\t\t\t$processed_tickets_ids = array();\n\t\t\t// Process selected tickets\n\t\t\tforeach ((array)$tickets_infos as $_id => $_ticket_info) {\n\t\t\t\t// Prepare ticket id\n\t\t\t\t$TICKET_ID = $_ticket_info[\"ticket_key\"];\n// TODO: need to do something when text is empty\n\t\t\t\t// Prepare text to replay\n\t\t\t\t$replace_pairs = array(\n\t\t\t\t\t'%%user_name%%'\t\t=> !empty($user_info) ? _display_name($user_info) : $_ticket_info[\"name\"],\n\t\t\t\t\t'%%account_type%%'\t=> !empty($user_info) ? $this->_account_types[$user_info[\"group\"]] : \"\",\n\t\t\t\t);\n\t\t\t\t$PREPARED_TEXT = str_replace(\n\t\t\t\t\tarray_keys($replace_pairs), \n\t\t\t\t\tarray_values($replace_pairs), \n\t\t\t\t\t$_POST[\"reply_text\"]\n\t\t\t\t);\n\t\t\t\t// Do insert record\n\t\t\t\tdb()->INSERT(\"comments\", array(\n\t\t\t\t\t\"object_name\"\t\t=> _es($OBJECT_NAME),\n\t\t\t\t\t\"object_id\"\t\t\t=> intval($_ticket_info[\"id\"]),\n\t\t\t\t\t\"user_id\"\t\t\t=> 0,\n\t\t\t\t\t\"user_name\"\t\t\t=> _es(\"Admin: \".$admin_name),\n\t\t\t\t\t\"text\" \t\t\t\t=> _es($PREPARED_TEXT),\n\t\t\t\t\t\"add_date\"\t\t\t=> time(),\n\t\t\t\t\t\"active\"\t\t\t=> 1,\n\t\t\t\t));\n\t\t\t\t$RECORD_ID = db()->INSERT_ID();\n\t\t\t\t// Add activity points for registered user if needed\n\t\t\t\tif (!empty($_ticket_info[\"user_id\"])) {\n\t\t\t\t\tcommon()->_add_activity_points($_ticket_info[\"user_id\"], \"bug_report\", 1000, $RECORD_ID);\n\t\t\t\t}\n\t\t\t\t$replace = array(\n\t\t\t\t\t\"name\"\t\t\t\t=> _prepare_html($_ticket_info[\"name\"]),\n\t\t\t\t\t\"site_name\"\t\t\t=> _prepare_html($FIRST_SITE_INFO[\"name\"]),\n\t\t\t\t\t\"author_name\"\t\t=> _prepare_html($this->ADD_ADMIN_NAME ? SITE_ADVERT_NAME.\" Admin \".$admin_name : SITE_ADMIN_NAME),\n\t\t\t\t\t\"text\"\t\t\t\t=> _prepare_html($PREPARED_TEXT),\n\t\t\t\t\t\"ticket_id\"\t\t\t=> _prepare_html($TICKET_ID),\n\t\t\t\t\t\"ticket_url\"\t\t=> process_url(\"./?object=help&action=view_answers&id=\".$TICKET_ID, 1, $_ticket_info[\"site_id\"]),\n\t\t\t\t\t\"request_subject\"\t=> _prepare_html($_ticket_info[\"subject\"]),\n\t\t\t\t\t\"request_message\"\t=> _prepare_html($_ticket_info[\"message\"]),\n\t\t\t\t);\n\t\t\t\t$text\t\t= tpl()->parse($_GET[\"object\"].\"/email_to_user\", $replace);\n\t\t\t\t$email_from\t= SITE_ADMIN_EMAIL;\n\t\t\t\t$name_from\t= $this->ADD_ADMIN_NAME ? SITE_ADVERT_NAME.\" Admin \".$admin_name : SITE_ADMIN_NAME;\n\t\t\t\t$email_to\t= $_ticket_info[\"email\"];\n\t\t\t\t$name_to\t= _prepare_html($_ticket_info[\"name\"]);\n\t\t\t\t$subject\t= \"Response to support ticket #\".$TICKET_ID;\n\t\t\t\t$send_result= common()->send_mail($email_from, $name_from, $email_to, $name_to, $subject, $text, nl2br($text));\n\t\t\t\t// Store processed tickets ids\n\t\t\t\t$processed_tickets_ids[$_ticket_info[\"id\"]] = $_ticket_info[\"id\"];\n\t\t\t}\n\t\t\t// Mass change status on reply\n\t\t\tif (!empty($processed_tickets_ids)) {\n\t\t\t\tdb()->query(\n\t\t\t\t\t\"UPDATE \".db('help_tickets').\" \n\t\t\t\t\tSET status = '\".(!empty($_POST[\"reply_close\"]) ? \"closed\" : \"read\").\"' \n\t\t\t\t\tWHERE id IN(\".implode(\",\", $processed_tickets_ids).\")\"\n\t\t\t\t);\n\t\t\t}\n\n\t\t// ###########################################\n\t\t}\n\t\treturn js_redirect($_SERVER[\"HTTP_REFERER\"], 0);\n\t}", "public static function activate() {\n //delete_option( 'ptb_plugin_options' );\n }", "abstract public function displayHelp();", "function ShowHelp()\r\n{\r\n\tglobal $settings, $user_info, $language, $context, $txt, $sourcedir, $options, $scripturl;\r\n\r\n\tloadTemplate('Help');\r\n\tloadLanguage('Manual');\r\n\r\n\t$manual_areas = array(\r\n\t\t'getting_started' => array(\r\n\t\t\t'title' => $txt['manual_category_getting_started'],\r\n\t\t\t'description' => '',\r\n\t\t\t'areas' => array(\r\n\t\t\t\t'introduction' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_intro'],\r\n\t\t\t\t\t'template' => 'manual_intro',\r\n\t\t\t\t),\r\n\t\t\t\t'main_menu' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_main_menu'],\r\n\t\t\t\t\t'template' => 'manual_main_menu',\r\n\t\t\t\t),\r\n\t\t\t\t'board_index' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_board_index'],\r\n\t\t\t\t\t'template' => 'manual_board_index',\r\n\t\t\t\t),\r\n\t\t\t\t'message_view' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_message_view'],\r\n\t\t\t\t\t'template' => 'manual_message_view',\r\n\t\t\t\t),\r\n\t\t\t\t'topic_view' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_topic_view'],\r\n\t\t\t\t\t'template' => 'manual_topic_view',\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t),\r\n\t\t'registering' => array(\r\n\t\t\t'title' => $txt['manual_category_registering'],\r\n\t\t\t'description' => '',\r\n\t\t\t'areas' => array(\r\n\t\t\t\t'when_how' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_when_how_register'],\r\n\t\t\t\t\t'template' => 'manual_when_how_register',\r\n\t\t\t\t),\r\n\t\t\t\t'registration_screen' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_registration_screen'],\r\n\t\t\t\t\t'template' => 'manual_registration_screen',\r\n\t\t\t\t),\r\n\t\t\t\t'activating_account' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_activating_account'],\r\n\t\t\t\t\t'template' => 'manual_activating_account',\r\n\t\t\t\t),\r\n\t\t\t\t'logging_in' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_logging_in_out'],\r\n\t\t\t\t\t'template' => 'manual_logging_in_out',\r\n\t\t\t\t),\r\n\t\t\t\t'password_reminders' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_password_reminders'],\r\n\t\t\t\t\t'template' => 'manual_password_reminders',\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t),\r\n\t\t'profile_features' => array(\r\n\t\t\t'title' => $txt['manual_category_profile_features'],\r\n\t\t\t'description' => '',\r\n\t\t\t'areas' => array(\r\n\t\t\t\t'profile_info' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_profile_info'],\r\n\t\t\t\t\t'template' => 'manual_profile_info_summary',\r\n\t\t\t\t\t'description' => $txt['manual_entry_profile_info_desc'],\r\n\t\t\t\t\t'subsections' => array(\r\n\t\t\t\t\t\t'summary' => array($txt['manual_entry_profile_info_summary'], 'template' => 'manual_profile_info_summary'),\r\n\t\t\t\t\t\t'posts' => array($txt['manual_entry_profile_info_posts'], 'template' => 'manual_profile_info_posts'),\r\n\t\t\t\t\t\t'stats' => array($txt['manual_entry_profile_info_stats'], 'template' => 'manual_profile_info_stats'),\r\n\t\t\t\t\t),\r\n\t\t\t\t),\r\n\t\t\t\t'modify_profile' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_modify_profile'],\r\n\t\t\t\t\t'template' => 'manual_modify_profile_settings',\r\n\t\t\t\t\t'description' => $txt['manual_entry_modify_profile_desc'],\r\n\t\t\t\t\t'subsections' => array(\r\n\t\t\t\t\t\t'settings' => array($txt['manual_entry_modify_profile_settings'], 'template' => 'manual_modify_profile_settings'),\r\n\t\t\t\t\t\t'forum' => array($txt['manual_entry_modify_profile_forum'], 'template' => 'manual_modify_profile_forum'),\r\n\t\t\t\t\t\t'look' => array($txt['manual_entry_modify_profile_look'], 'template' => 'manual_modify_profile_look'),\r\n\t\t\t\t\t\t'auth' => array($txt['manual_entry_modify_profile_auth'], 'template' => 'manual_modify_profile_auth'),\r\n\t\t\t\t\t\t'notify' => array($txt['manual_entry_modify_profile_notify'], 'template' => 'manual_modify_profile_notify'),\r\n\t\t\t\t\t\t'pm' => array($txt['manual_entry_modify_profile_pm'], 'template' => 'manual_modify_profile_pm'),\r\n\t\t\t\t\t\t'buddies' => array($txt['manual_entry_modify_profile_buddies'], 'template' => 'manual_modify_profile_buddies'),\r\n\t\t\t\t\t\t'groups' => array($txt['manual_entry_modify_profile_groups'], 'template' => 'manual_modify_profile_groups'),\r\n\t\t\t\t\t),\r\n\t\t\t\t),\r\n\t\t\t\t'actions' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_profile_actions'],\r\n\t\t\t\t\t'template' => 'manual_profile_actions_subscriptions',\r\n\t\t\t\t\t'description' => $txt['manual_entry_modify_profile_desc'],\r\n\t\t\t\t\t'subsections' => array(\r\n\t\t\t\t\t\t'subscriptions' => array($txt['manual_entry_profile_actions_subscriptions'], 'template' => 'manual_profile_actions_subscriptions'),\r\n\t\t\t\t\t\t'delete' => array($txt['manual_entry_profile_actions_delete'], 'template' => 'manual_profile_actions_delete'),\r\n\t\t\t\t\t),\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t),\r\n\t\t'posting_basics' => array(\r\n\t\t\t'title' => $txt['manual_category_posting_basics'],\r\n\t\t\t'description' => '',\r\n\t\t\t'areas' => array(\r\n\t\t\t\t/*'posting_screen' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_posting_screen'],\r\n\t\t\t\t\t'template' => 'manual_posting_screen',\r\n\t\t\t\t),*/\r\n\t\t\t\t'posting_topics' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_posting_topics'],\r\n\t\t\t\t\t'template' => 'manual_posting_topics',\r\n\t\t\t\t),\r\n\t\t\t\t/*'quoting_posts' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_quoting_posts'],\r\n\t\t\t\t\t'template' => 'manual_quoting_posts',\r\n\t\t\t\t),\r\n\t\t\t\t'modifying_posts' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_modifying_posts'],\r\n\t\t\t\t\t'template' => 'manual_modifying_posts',\r\n\t\t\t\t),*/\r\n\t\t\t\t'smileys' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_smileys'],\r\n\t\t\t\t\t'template' => 'manual_smileys',\r\n\t\t\t\t),\r\n\t\t\t\t'bbcode' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_bbcode'],\r\n\t\t\t\t\t'template' => 'manual_bbcode',\r\n\t\t\t\t),\r\n\t\t\t\t/*'wysiwyg' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_wysiwyg'],\r\n\t\t\t\t\t'template' => 'manual_wysiwyg',\r\n\t\t\t\t),*/\r\n\t\t\t),\r\n\t\t),\r\n\t\t'personal_messages' => array(\r\n\t\t\t'title' => $txt['manual_category_personal_messages'],\r\n\t\t\t'description' => '',\r\n\t\t\t'areas' => array(\r\n\t\t\t\t'messages' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_pm_messages'],\r\n\t\t\t\t\t'template' => 'manual_pm_messages',\r\n\t\t\t\t),\r\n\t\t\t\t/*'actions' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_pm_actions'],\r\n\t\t\t\t\t'template' => 'manual_pm_actions',\r\n\t\t\t\t),\r\n\t\t\t\t'preferences' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_pm_preferences'],\r\n\t\t\t\t\t'template' => 'manual_pm_preferences',\r\n\t\t\t\t),*/\r\n\t\t\t),\r\n\t\t),\r\n\t\t'forum_tools' => array(\r\n\t\t\t'title' => $txt['manual_category_forum_tools'],\r\n\t\t\t'description' => '',\r\n\t\t\t'areas' => array(\r\n\t\t\t\t'searching' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_searching'],\r\n\t\t\t\t\t'template' => 'manual_searching',\r\n\t\t\t\t),\r\n\t\t\t\t/*'memberlist' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_memberlist'],\r\n\t\t\t\t\t'template' => 'manual_memberlist',\r\n\t\t\t\t),\r\n\t\t\t\t'calendar' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_calendar'],\r\n\t\t\t\t\t'template' => 'manual_calendar',\r\n\t\t\t\t),*/\r\n\t\t\t),\r\n\t\t),\r\n\t);\r\n\r\n\t// Set a few options for the menu.\r\n\t$menu_options = array(\r\n\t\t'disable_url_session_check' => true,\r\n\t);\r\n\r\n\trequire_once($sourcedir . '/Subs-Menu.php');\r\n\t$manual_area_data = createMenu($manual_areas, $menu_options);\r\n\tunset($manual_areas);\r\n\r\n\t// Make a note of the Unique ID for this menu.\r\n\t$context['manual_menu_id'] = $context['max_menu_id'];\r\n\t$context['manual_menu_name'] = 'menu_data_' . $context['manual_menu_id'];\r\n\r\n\t// Get the selected item.\r\n\t$context['manual_area_data'] = $manual_area_data;\r\n\t$context['menu_item_selected'] = $manual_area_data['current_area'];\r\n\r\n\t// Set a title and description for the tab strip if subsections are present.\r\n\tif (isset($context['manual_area_data']['subsections']))\r\n\t\t$context[$context['manual_menu_name']]['tab_data'] = array(\r\n\t\t\t'title' => $manual_area_data['label'],\r\n\t\t\t'description' => isset($manual_area_data['description']) ? $manual_area_data['description'] : '',\r\n\t\t);\r\n\r\n\t// Bring it on!\r\n\t$context['sub_template'] = isset($manual_area_data['current_subsection'], $manual_area_data['subsections'][$manual_area_data['current_subsection']]['template']) ? $manual_area_data['subsections'][$manual_area_data['current_subsection']]['template'] : $manual_area_data['template'];\r\n\t$context['page_title'] = $manual_area_data['label'] . ' - ' . $txt['manual_smf_user_help'];\r\n\r\n\t// Build the link tree.\r\n\t$context['linktree'][] = array(\r\n\t\t'url' => $scripturl . '?action=help',\r\n\t\t'name' => $txt['help'],\r\n\t);\r\n\tif (isset($manual_area_data['current_area']) && $manual_area_data['current_area'] != 'index')\r\n\t\t$context['linktree'][] = array(\r\n\t\t\t'url' => $scripturl . '?action=admin;area=' . $manual_area_data['current_area'],\r\n\t\t\t'name' => $manual_area_data['label'],\r\n\t\t);\r\n\tif (!empty($manual_area_data['current_subsection']) && $manual_area_data['subsections'][$manual_area_data['current_subsection']][0] != $manual_area_data['label'])\r\n\t\t$context['linktree'][] = array(\r\n\t\t\t'url' => $scripturl . '?action=admin;area=' . $manual_area_data['current_area'] . ';sa=' . $manual_area_data['current_subsection'],\r\n\t\t\t'name' => $manual_area_data['subsections'][$manual_area_data['current_subsection']][0],\r\n\t\t);\r\n\r\n\t// We actually need a special style sheet for help ;)\r\n\t$context['template_layers'][] = 'manual';\r\n\r\n\t// The smiley info page needs some cheesy information.\r\n\tif ($manual_area_data['current_area'] == 'smileys')\r\n\t\tShowSmileyHelp();\r\n}", "public function admin_actions() {\n\t\t$menutitle = '<img src=\"' . get_bloginfo('url') . '/wp-content/plugins/paywithafacebookpost/img/paywithfb.png\" alt=\"\" />' ;\n\t\tadd_options_page($menutitle . \" Pay With A Facebook Post\", $menutitle . \" Pay With A Facebook Post\", 8, basename(__FILE__), array(\"plgPayWithAFacebookPost\",\"admin\"));\n\t}", "protected function toggleDisableAction() {}", "public function custom_help_tab() {\n\n\t\t\t$screen = get_current_screen();\n\n\t\t\t// Return early if we're not on the needed post type.\n\t\t\tif ( ( $this->object_type == 'post' && $this->object != $screen->post_type ) || \n\t\t\t\t ( $this->object_type == 'taxonomy' && $this->object != $screen->taxonomy ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Add the help tabs.\n\t\t\tforeach ( $this->args->help_tabs as $tab ) {\n\t\t\t\t$screen->add_help_tab( $tab );\n\t\t\t}\n\n\t\t\t// Add the help sidebar.\n\t\t\t$screen->set_help_sidebar( $this->args->help_sidebar );\n\t\t}", "function admin_demoMode()\n{\n\tstatic $once = false;\n\tif ($once) {\n\t\treturn;\n\t}\n\n\tglobal $g_user_login;\n\tif ($g_user_login->userID() === '1') # If the logged user is the super administrator, then disable the demo mode !!!\n\t{\n\t\tadmin_demoMode_message(LANG_ADMIN_DEMO_MODE_TIPS_SUPER_ADMIN);\n\t} else {\n\t\tadmin_demoMode_message(LANG_ADMIN_DEMO_MODE_TIPS);\n\n\t\t$_REQUEST\t= NULL;\n\t\t$_POST\t\t= NULL;\n\t\tforeach($_GET as $k => $v) {\n\t\t\tif (!in_array($k, array('go', 'tab', 'menu'))) { # Preserve the admin navigation !\n\t\t\t\tunset($_GET[$k]);\n\t\t\t}\n\t\t}\n\t}\n\n\t$once = true;\n}", "function procMenuAdminAllActList()\n\t{\n\t\t$oModuleModel = getModel('module');\n\t\t$installed_module_list = $oModuleModel->getModulesXmlInfo();\n\t\tif(is_array($installed_module_list))\n\t\t{\n\t\t\t$currentLang = Context::getLangType();\n\t\t\t$menuList = array();\n\t\t\tforeach($installed_module_list AS $key=>$value)\n\t\t\t{\n\t\t\t\t$info = $oModuleModel->getModuleActionXml($value->module);\n\t\t\t\tif($info->menu) $menuList[$value->module] = $info->menu;\n\t\t\t\tunset($info->menu);\n\t\t\t}\n\t\t}\n\t\t$this->add('menuList', $menuList);\n\t}", "function foodpress_admin_help_tab_content() {\r\n\t$screen = get_current_screen();\r\n\r\n\t$screen->add_help_tab( array(\r\n\t 'id'\t=> 'foodpress_overview_tab',\r\n\t 'title'\t=> __( 'Overview', 'foodpress' ),\r\n\t 'content'\t=>\r\n\r\n\t \t'<p>' . __( 'Thank you for using FoodPress plugin. ', 'foodpress' ). '</p>'\r\n\r\n\t) );\r\n\r\n\r\n\r\n\r\n\t$screen->set_help_sidebar(\r\n\t\t'<p><strong>' . __( 'For more information:', 'foodpress' ) . '</strong></p>' .\r\n\t\t'<p><a href=\"http://demo.myfoodpress.com/\" target=\"_blank\">' . __( 'foodpress Demo', 'foodpress' ) . '</a></p>' .\r\n\t\t\r\n\t\t'<p><a href=\"http://demo.myfoodpress.com/documentation/\" target=\"_blank\">' . __( 'Documentation', 'foodpress' ) . '</a></p>'.\r\n\t\t'<p><a href=\"https://foodpressplugin.freshdesk.com/support/home/\" target=\"_blank\">' . __( 'Support', 'foodpress' ) . '</a></p>'\r\n\t);\r\n}", "function helpDesk_edit()\n {\n //create model object\n $helpDeskObj=new HelpDeskModel();\n \n // Check region valid code thorugh ajax\n if(isset($_REQUEST['ajaxCall']) && $_REQUEST['ajaxCall']!=\"\")\n {\n $isExist = false;\n if (isset($_REQUEST['code']) && $_REQUEST['code'] != '') {\n $isExist = ($helpDeskObj->check_helpDesk_code($_REQUEST['code']) == '') ? true : false;\n }\n \n if (!$isExist) {\n echo 'false';\n } else {\n echo 'true';\n }\n exit;\n }\n \n //Save category record\n $helpDeskObj->saveHelpDesk();\n\n \n \n //get record for update\n $data['helpDeskData']=$helpDeskObj->getHelpDeskData(APP::$curId);\n \n /*\n * Following Code For Manage Whene Login User Roll As Help Desk Manager \n * Only Display Those Help Desk Which Can Assign To Current Login Help Desk Admin User\n * @Author Mayur Patel<[email protected]> \n */\n \n /*\n $filteHelpDeskUserUserLoginFilterId=\"\";\n if($_SESSION['user_login']['roll_name'] == \"Help Desk Manager\"){\n //pre($_SESSION,1);\n $filteHelpDeskUserUserLoginFilterId=$_SESSION['user_login']['id'];\n }\n //get record for update\n $data['helpDeskData']=$helpDeskObj->getHelpDeskData(APP::$curId,$filteHelpDeskUserUserLoginFilterId);\n \n // Following Code Help To Restric Access to The Un-Assign HelpDesk Edit \n if(empty($data['helpDeskData']) && isset(APP::$curId))\n {\n $_SESSION['actionResult']=array(\"warning\"=>\"You Cant Access This Help Desk\"); // different type success, info, warning, error \n UTIL::redirect(URI::getURL(APP::$moduleName,\"helpDesk_list\")); // Redirect to the list page\n }\n */\n \n\n //load user manager model\n Load::loadModel(\"region\",\"mod_region\");\n\n // create object\n $regionObj = new RegionModel();\n\n //get all region record for update\n// $data['allRegionData']=$regionObj->getAllRegion(); // Its Return All Region Without Parent Child Group\n $data['allRegionData']=$regionObj->getParentAllRegion(); // Its Return All Region With Parent Child Group\n //print_r($data['allRegionData']);\n $data['remainRegionData']=$regionObj->getRemainParentRegion();\n \n $data['remainingManagerData']=$helpDeskObj->getRemainManager();\n //load user manager model\n Load::loadModel(\"user\",\"mod_user\");\n\n // create object\n $userObj = new UserModel();\n if(count($data['remainingManagerData'])==0)\n {\n $data['remainingManagerData']=$userObj->getAllHelpDeskManager();\n }\n //$data['registerRegionData']=$regionObj->getAssignParentRegion();\n \n \n\n //get all help desk manager Users record for update\n $data['helpDeskManagersData']=$userObj->getAllHelpDeskManager();\n \n// pre($data,1);\n \n //include js in footer\n $jsData=Layout::bufferContent(URI::getAbsModulePath().\"/js/helpDesk_edit.php\",$data);\n\n // create javascrpt variable for ajax url\n Layout::addFooter($jsData);\n \n //render layout\n Layout::renderLayout();\n \n }", "function show_edit()\n\t{\n\t\treturn '';\n\t}", "function omn_superadmin_overview_page() {\n\n\tif( isset($_REQUEST['action']) ) {\n $action = $_REQUEST['action'];\n } else {\n $action = 'default';\n }\n \n switch( $action ) {\n case 'add':\n \tomn_superadmin_overview_page_add();\n \tbreak;\n case 'delete-notification':\n \tomn_delete_notification( $_GET['user'], $_GET['message'] );\n \tomn_superadmin_overview_page_default();\n \tbreak;\n case 'expire-message':\n \tomn_delete_notifications( $_GET['id'] );\n \tomn_superadmin_overview_page_default();\n \tbreak;\n case 'delete-message':\n \tomn_delete_message( $_GET['id'] );\n \tomn_superadmin_overview_page_default();\n \tbreak;\n default:\n \tomn_superadmin_overview_page_default();\n \tbreak;\n }\n}", "public function dashboard_page_mscr_intrusions() {\n\t\t// WordPress 3.3\n\t\tif ( function_exists( 'wp_suspend_cache_addition' ) ) {\n\t\t\t$args = array(\n\t\t\t\t'title' => 'Help',\n\t\t\t\t'id' => 'mscr_help',\n\t\t\t\t'content' => $this->get_contextual_help(),\n\t\t\t);\n\t\t\tget_current_screen()->add_help_tab( $args );\n\t\t}\n\t\t// WordPress 3.1 and later\n\t\telse if ( function_exists( 'get_current_screen' ) ) {\n\t\t\t// Add help to the intrusions list page\n\t\t\tadd_contextual_help( get_current_screen(), $this->get_contextual_help() );\n\t\t}\n\t}", "public function onWpAdminMenu() {\n\t}", "abstract public function getAdminToggle($count);", "public function admin()\n {\n $this->template_admin->displayad('admin');\n }", "function admin_index()\n\t{\n\t \n\t}", "public function showEdit()\n {\n\n }", "public function active() {\n\n $data = array();\n $data['result'] = $this->property_model->fetchAll(getLoginUserId(), 1); // Approved\n $data['title'] = \"Active Properties\";\n \n $this->render('admin/property/active', $data);\n }", "function cacheplugin_admin_menu_old() {\r\n \t\t\t echo '<h3><a href=\"#\">Cache Plugin</a></h3>\r\n \t\t\t\t <ul>\r\n \t\t\t <li><a href=\"' . osc_admin_render_plugin_url(osc_plugin_folder(__FILE__) . 'admin/conf.php') . '\">&raquo; ' . __('Settings', 'cacheplugin') . '</a></li>\r\n \t\t <li><a href=\"' . osc_admin_render_plugin_url(osc_plugin_folder(__FILE__) . 'admin/help.php') . '\">&raquo; ' . __('Help', 'cacheplugin') . '</a></li>\r\n \t\t\t </ul>';\r\n \t\t }", "public function adminMenu() {\n\t\t$cap = is_multisite() ? 'manage_network_options' : 'manage_options';\n\t\t$action = \"actionIndex\";\n\t\tadd_submenu_page( 'wp-defender', esc_html__( \"IP Lockouts\", \"defender-security\" ), esc_html__( \"IP Lockouts\", \"defender-security\" ), $cap, $this->slug, array(\n\t\t\t&$this,\n\t\t\t$action\n\t\t) );\n\t}", "public function get_help_sidebar()\n {\n }", "function edithistory_deactivate()\n{\n\tglobal $db;\n\t$db->delete_query(\"settings\", \"name IN('editmodvisibility','editsperpages','edithistorychar')\");\n\t$db->delete_query(\"settinggroups\", \"name IN('edithistory')\");\n\t$db->delete_query(\"templates\", \"title IN('edithistory','edithistory_nohistory','edithistory_item','postbit_edithistory','edithistory_comparison','edithistory_viewfull','editpost_reason')\");\n\trebuild_settings();\n\n\tinclude MYBB_ROOT.\"/inc/adminfunctions_templates.php\";\n\tfind_replace_templatesets(\"editpost\", \"#\".preg_quote('{$reason}').\"#i\", '', 0);\n\tfind_replace_templatesets(\"postbit_editedby\", \"#\".preg_quote('<!-- editreason -->').\"#i\", '', 0);\n\tfind_replace_templatesets(\"postbit\", \"#\".preg_quote('{$post[\\'edithistory\\']}').\"#i\", '', 0);\n\tfind_replace_templatesets(\"postbit_classic\", \"#\".preg_quote('{$post[\\'edithistory\\']}').\"#i\", '', 0);\n\n\tchange_admin_permission('tools', 'edithistory', -1);\n}", "function ajan_core_admin_hook() { \n\t$hook = ajan_core_do_network_admin() ? 'network_admin_menu' : 'admin_menu';\n\n\treturn apply_filters( 'ajan_core_admin_hook', $hook );\n}", "public function cli_help() {}", "public function controlActions(){\n // Check if the tables are created.\n $this->mode = 'admin';\n $this->object = new $this->type();\n $this->titlePage = __((string)$this->object->info->info->form->title);\n $this->layout = (string)$this->object->info->info->form->layout;\n $this->menuInside = $this->menuInside();\n $ui = new NavigationAdmin_Ui($this);\n switch ($this->action) {\n default:\n header('Location: '.url($this->type.'/listAdmin', true));\n exit();\n break;\n case 'listAdmin':\n /**\n * This is the main action for the BackEnd. If we are in DEBUG mode\n * it will create the table automatically.\n */\n $this->checkLoginAdmin();\n $this->content = $this->listAdmin();\n return $ui->render();\n break;\n case 'insertView':\n /**\n * This is the action that shows the form to insert a record in the BackEnd.\n */\n $this->checkLoginAdmin();\n $this->content = $this->insertView();\n return $ui->render();\n break;\n case 'insert':\n /**\n * This is the action that inserts a record in the BackEnd.\n * If the insertion is successful it shows a form to check the record,\n * if not it creates a form with the errors to correct.\n */\n $this->checkLoginAdmin();\n $insert = $this->insert();\n if ($insert['success']=='1') {\n header('Location: '.url($this->type.'/insertCheck/'.$insert['id'], true));\n exit();\n } else {\n $this->messageError = __('errorsForm');\n $this->content = $insert['html'];\n return $ui->render();\n }\n break;\n case 'modifyView':\n case 'modifyViewCheck':\n case 'insertCheck':\n /**\n * This is the action that shows the form to check a record insertion.\n */\n $this->checkLoginAdmin();\n $this->message = ($this->action=='insertCheck' || $this->action=='modifyViewCheck') ? __('savedForm') : '';\n $this->content = $this->modifyView();\n return $ui->render();\n break;\n case 'modifyViewNested':\n /**\n * This is the action that shows the form to modify a record.\n */\n $this->checkLoginAdmin();\n $this->object = $this->object->readObject($this->id);\n $uiObjectName = $this->type.'_Ui';\n $uiObject = new $uiObjectName($this->object);\n $values = array_merge($this->object->valuesArray(), $this->values);\n $this->content = $uiObject->renderForm(array_merge(\n array('values'=>$values,\n 'action'=>url($this->type.'/modifyNested', true),\n 'class'=>'formAdmin formAdminModify',\n 'nested'=>true),\n array()));\n return $ui->render();\n break;\n case 'modify':\n case 'modifyNested':\n /**\n * This is the action that updates a record when updating it.\n */\n $this->checkLoginAdmin();\n $nested = ($this->action == 'modifyNested') ? true : false;\n $modify = $this->modify($nested);\n if ($modify['success']=='1') {\n if (isset($this->values['submit-saveCheck'])) {\n header('Location: '.url($this->type.'/modifyViewCheck/'.$modify['id'], true));\n } else {\n header('Location: '.url($this->type.'/listAdmin', true));\n }\n exit();\n } else {\n $this->messageError = __('errorsForm');\n $this->content = $modify['html'];\n return $ui->render();\n }\n break;\n case 'delete':\n /**\n * This is the action that deletes a record.\n */\n $this->checkLoginAdmin();\n if ($this->id != '') {\n $type = new $this->type();\n $object = $type->readObject($this->id);\n $object->delete();\n }\n header('Location: '.url($this->type.'/listAdmin', true));\n exit();\n break;\n case 'sortSave':\n /**\n * This is the action that saves the order of a list of records.\n * It is used when sorting using the BackEnd.\n */\n $this->checkLoginAdmin();\n $this->mode = 'ajax';\n $object = new $this->type();\n $newOrder = (isset($this->values['newOrder'])) ? $this->values['newOrder'] : array();\n $object->updateOrder($newOrder);\n break;\n case 'sortList':\n /**\n * This is the action that changes the order of the list.\n */\n $this->checkLoginAdmin();\n $object = new $this->type();\n $info = explode('_', $this->id);\n if (isset($info[1]) && $object->attributeInfo($info[1])!='') {\n $orderType = ($info[0]=='asc') ? 'asc' : 'des';\n Session::set('ord_'.$this->type, $orderType.'_'.$info[1]);\n }\n header('Location: '.url($this->type, true));\n exit();\n break;\n case 'addSimple':\n /**\n * This is the action that adds a simple record.\n */\n $this->checkLoginAdmin();\n $this->mode = 'ajax';\n $formObject = $this->type.'_Form';\n $form = new $formObject();\n return $form->createFormFieldMultiple();\n break;\n case 'multiple-delete':\n /**\n * This is the action that deletes multiple records at once.\n */\n $this->checkLoginAdmin();\n $this->mode = 'ajax';\n if (isset($this->values['list-ids'])) {\n $type = new $this->type();\n foreach ($this->values['list-ids'] as $id) {\n $object = $type->readObject($id);\n $object->delete();\n }\n }\n break;\n case 'multiple-activate':\n case 'multiple-deactivate':\n /**\n * This is the action that activates or deactivates multiple records at once.\n * It just works on records that have an attribute named \"active\",\n */\n $this->checkLoginAdmin();\n $this->mode = 'ajax';\n if (isset($this->values['list-ids'])) {\n $primary = (string)$this->object->info->info->sql->primary;\n $where = '';\n foreach ($this->values['list-ids'] as $id) {\n $where .= $primary.'=\"'.$id.'\" OR ';\n }\n $where = substr($where, 0, -4);\n $active = ($this->action == 'multiple-activate') ? '1' : '0';\n $query = 'UPDATE '.Db::prefixTable($this->type).' SET active=\"'.$active.'\" WHERE '.$where;\n Db::execute($query);\n }\n break;\n case 'autocomplete':\n /**\n * This is the action that returns a json string with the records that match a search string.\n * It is used for the autocomplete text input.\n */\n $this->mode = 'json';\n $autocomplete = (isset($_GET['term'])) ? $_GET['term'] : '';\n if ($autocomplete!='') {\n $where = '';\n $concat = '';\n $items = explode('_', $this->id);\n foreach ($items as $itemIns) {\n $item = $this->object->attributeInfo($itemIns);\n $name = (string)$item->name;\n if (is_object($item) && $name!='') {\n $concat .= $name.',\" \",';\n $where .= $name.' LIKE \"%'.$autocomplete.'%\" OR ';\n }\n }\n $where = substr($where, 0, -4);\n $concat = 'CONCAT('.substr($concat, 0, -5).')';\n if ($where!='') {\n $query = 'SELECT '.(string)$this->object->info->info->sql->primary.' as idItem, \n '.$concat.' as infoItem\n FROM '.Db::prefixTable($this->type).'\n WHERE '.$where.'\n ORDER BY '.$name.' LIMIT 20';\n $results = array();\n $resultsAll = Db::returnAll($query);\n foreach ($resultsAll as $result) {\n $resultsIns = array();\n $resultsIns['id'] = $result['idItem'];\n $resultsIns['value'] = $result['infoItem'];\n $resultsIns['label'] = $result['infoItem'];\n array_push($results, $resultsIns);\n }\n return json_encode($results); \n }\n }\n break;\n case 'search':\n /**\n * This is the action that does the default \"search\" on a content object.\n */\n $this->checkLoginAdmin();\n if ($this->id != '') {\n $this->content = $this->listAdmin();\n return $ui->render();\n } else {\n if (isset($this->values['search']) && $this->values['search']!='') {\n $searchString = urlencode(html_entity_decode($this->values['search']));\n header('Location: '.url($this->type.'/search/'.$searchString, true));\n } else {\n header('Location: '.url($this->type.'/listAdmin', true));\n } \n }\n break;\n case 'export-json':\n /**\n * This is the action that exports the complete list of objects in JSON format.\n */\n $this->mode = 'ajax';\n $query = 'SELECT * FROM '.Db::prefixTable($this->type);\n $items = Db::returnAll($query);\n $file = $this->type.'.json';\n $options = array('content'=>json_encode($items), 'contentType'=>'application/json');\n File::download($file, $options);\n return '';\n break;\n }\n }", "public function adminmenu()\n {\n\n $vue = new ViewAdmin(\"Administration\");\n $vue->generer(array());\n }", "public function helpAction()\r\n {\r\n $this->view->liste = $this->_helper->ListeDocuments('public/documents');\r\n $this->view->docPath = $this->getUrlDocs();\r\n }", "function ren_help($mode = 1, $addtextfunc = \"addtext\", $helpfunc = \"help\")\n{\n return display_help(\"helpb\", $mode, $addtextfunc, $helpfunc = \"help\");\n}", "function getActive() {return $this->_active;}", "function admin_index()\n\t{\n\t $this->set('pagetitle',\"Manage Pages\");\n\t $this->paginate=array('order'=>'Page.name ASC');\n\t $lists = $this->paginate('Page');\n\t $this->set('list', $lists);\n\t \n\t if((isset($this->data[\"Page\"][\"setStatus\"])))\n\t {\n\t\t$status = ife($_POST['active'],1,0);\n\t\t$record = $this->data[\"Page\"][\"Record\"];\n\t\t$CheckedList=$_POST['box1'];\n\t\t$controller= $this->params['controller'];\n\t\t$action='index'; \n\t\t$prefix='admin';\n\t\t$model='Page';\n\t\t$relation=null;\n\t\t\n\t\tswitch($status)\n\t\t{ \n\t\t case '1': \n\t\t\t$this->setStatus('1',$CheckedList,$model,$relation,$controller,$action,$prefix,$record); \n\t\t break;\n\t\t case '0':\n\t\t\t$this->setStatus('0',$CheckedList,$model,$relation,$controller,$action,$prefix,$record); \n\t\t break; \n\t\t}\n\t }\n\t}", "function toggleActivated () {\n if (!isset($_SESSION['admin_auth']) OR empty($_SESSION['admin_auth']))\n\treturn false;\n\n // get name and type\n $type = (isset($_GET['type']) and $_GET['type'] == 'app')\n\t? 'app' : 'style';\n $name = (isset($_GET['name'])) ? $_GET['name'] : '';\n if (empty($name)) {\n\t$_SESSION['admin_error'] = 'TOGGLEACTIVATED__ERROR';\n\treturn false;\n }\n\n // get object\n $Obj = NULL;\n switch ($type) {\n case 'app':\n\t$Obj = new App($name);\n\tbreak;\n case 'style':\n\t$Obj = new Style($name);\n\tbreak;\n default:\n\t$_SESSION['admin_error'] = 'TOGGLEACTIVATED__ERROR';\n\treturn false;\n }\n\n // Toggle\n if (!$Obj->toggleActivated()) {\n\t// error\n\t$_SESSION['admin_error'] = 'TOGGLEACTIVATED__ERROR';\n\treturn false;\n }\n\n $_SESSION['admin_info'] = 'TOGGLEACTIVATED__INFO';\n header('Location:?event=show'.(($type == 'app') ? 'Apps' : 'Styles'));\n exit;\n}", "public function bp_advancedsubnav_tab_action() {\n\t\techo $this->get_instance( \\MyVideoRoomExtrasParking\\Library\\SectionTemplates::class )->control_panel_store_advanced();\n\t}", "function show_add_button(){\n if($this->session->system_admin){\n return true;\n }\n \n }", "function dblions_general_options() {\n\techo 'Edit general features';\n}", "public function isFrontendEditingActive() {}", "function network_admin_menu()\n {\n }", "protected function isFrontendEditActive() {}", "protected function isFrontendEditActive() {}", "function help()\n\t{\n\t\t$help['b'] = array();\n\t\t$help['i'] = array();\n\t\t\n\t\t$help['b'][] = 'Laisser une ligne vide entre chaque bloc <em>de même nature</em>.';\n\t\t$help['b'][] = '<strong>Paragraphe</strong> : du texte et une ligne vide';\n\t\t\n\t\tif ($this->getOpt('active_title')) {\n\t\t\t$help['b'][] = '<strong>Titre</strong> : <code>!!!</code>, <code>!!</code>, '.\n\t\t\t'<code>!</code> pour des titres plus ou moins importants';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_hr')) {\n\t\t\t$help['b'][] = '<strong>Trait horizontal</strong> : <code>----</code>';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_lists')) {\n\t\t\t$help['b'][] = '<strong>Liste</strong> : ligne débutant par <code>*</code> ou '.\n\t\t\t'<code>#</code>. Il est possible de mélanger les listes '.\n\t\t\t'(<code>*#*</code>) pour faire des listes de plusieurs niveaux. '.\n\t\t\t'Respecter le style de chaque niveau';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_pre')) {\n\t\t\t$help['b'][] = '<strong>Texte préformaté</strong> : espace devant chaque ligne de texte';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_quote')) {\n\t\t\t$help['b'][] = '<strong>Bloc de citation</strong> : <code>&gt;</code> ou '.\n\t\t\t'<code>;:</code> devant chaque ligne de texte';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_fr_syntax')) {\n\t\t\t$help['i'][] = 'La correction de ponctuation est active. Un espace '.\n\t\t\t\t\t\t'insécable remplacera automatiquement tout espace '.\n\t\t\t\t\t\t'précédant les marques \";\",\"?\",\":\" et \"!\".';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_em')) {\n\t\t\t$help['i'][] = '<strong>Emphase</strong> : deux apostrophes <code>\\'\\'texte\\'\\'</code>';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_strong')) {\n\t\t\t$help['i'][] = '<strong>Forte emphase</strong> : deux soulignés <code>__texte__</code>';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_br')) {\n\t\t\t$help['i'][] = '<strong>Retour forcé à la ligne</strong> : <code>%%%</code>';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_ins')) {\n\t\t\t$help['i'][] = '<strong>Insertion</strong> : deux plus <code>++texte++</code>';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_del')) {\n\t\t\t$help['i'][] = '<strong>Suppression</strong> : deux moins <code>--texte--</code>';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_urls')) {\n\t\t\t$help['i'][] = '<strong>Lien</strong> : <code>[url]</code>, <code>[nom|url]</code>, '.\n\t\t\t'<code>[nom|url|langue]</code> ou <code>[nom|url|langue|titre]</code>.';\n\t\t\t\n\t\t\t$help['i'][] = '<strong>Image</strong> : comme un lien mais avec une extension d\\'image.'.\n\t\t\t'<br />Pour désactiver la reconnaissance d\\'image mettez 0 dans un dernier '.\n\t\t\t'argument. Par exemple <code>[image|image.gif||0]</code> fera un lien vers l\\'image au '.\n\t\t\t'lieu de l\\'afficher.'.\n\t\t\t'<br />Il est conseillé d\\'utiliser la nouvelle syntaxe.';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_img')) {\n\t\t\t$help['i'][] = '<strong>Image</strong> (nouvelle syntaxe) : '.\n\t\t\t'<code>((url|texte alternatif))</code>, '.\n\t\t\t'<code>((url|texte alternatif|position))</code> ou '.\n\t\t\t'<code>((url|texte alternatif|position|description longue))</code>. '.\n\t\t\t'<br />La position peut prendre les valeur L ou G (gauche), R ou D (droite) ou C (centré).';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_anchor')) {\n\t\t\t$help['i'][] = '<strong>Ancre</strong> : <code>~ancre~</code>';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_acronym')) {\n\t\t\t$help['i'][] = '<strong>Acronyme</strong> : <code>??acronyme??</code> ou '.\n\t\t\t'<code>??acronyme|titre??</code>';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_q')) {\n\t\t\t$help['i'][] = '<strong>Citation</strong> : <code>{{citation}}</code>, '.\n\t\t\t'<code>{{citation|langue}}</code> ou <code>{{citation|langue|url}}</code>';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_code')) {\n\t\t\t$help['i'][] = '<strong>Code</strong> : <code>@@code ici@@</code>';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_footnotes')) {\n\t\t\t$help['i'][] = '<strong>Note de bas de page</strong> : <code>$$Corps de la note$$</code>';\n\t\t}\n\t\t\n\t\t$res = '<dl class=\"wikiHelp\">';\n\t\t\n\t\t$res .= '<dt>Blocs</dt><dd>';\n\t\tif (count($help['b']) > 0)\n\t\t{\n\t\t\t$res .= '<ul><li>';\n\t\t\t$res .= implode('&nbsp;;</li><li>', $help['b']);\n\t\t\t$res .= '.</li></ul>';\n\t\t}\n\t\t$res .= '</dd>';\n\t\t\n\t\t$res .= '<dt>Éléments en ligne</dt><dd>';\n\t\tif (count($help['i']) > 0)\n\t\t{\n\t\t\t$res .= '<ul><li>';\n\t\t\t$res .= implode('&nbsp;;</li><li>', $help['i']);\n\t\t\t$res .= '.</li></ul>';\n\t\t}\n\t\t$res .= '</dd>';\n\t\t\n\t\t$res .= '</dl>';\n\t\t\n\t\treturn $res;\t\n\t}", "public function userbyLocationsAction() {\n $this->_helper->content->setEnabled();\n }", "public function index()\n {\n $this->help();\n }", "function help()\n\t{\n\t\t/* check if all required plugins are installed */\n\t\t\n\t\t$text = \"<div class='center buttons-bar'><form method='post' action='\".e_SELF.\"?\".e_QUERY.\"' id='core-db-import-form'>\";\n\t\t$text .= e107::getForm()->admin_button('importThemeDemo', 'Install Demo', 'other');\n\t\t$text .= '</form></div>';\n \n\t \treturn $text;\n\t}", "function mmf_admin_actions() {\n\t\tadd_options_page(\"MapMyFitness\", \"MapMyFitness\", 1, \"mmf\", \"mmf_admin\");\n\t}", "public function help()\n {\n $help = file_get_contents(BUILTIN_SHELL_HELP . 'list.txt');\n $this->put($help);\n }", "public function helpdeskstatusAction(){\n\n $this->view->helpdeskstatus = $this->ModelObj->allheldeskstatus(); \n\n }", "function menuConfig()\t{\n\t\tglobal $LANG;\n\t\t$this->MOD_MENU = Array (\n\t\t\t\"function\" => Array (\n\t\t\t\t\"2\" => \"Update typo3conf\",\n\t\t\t\t\"1\" => \"Check cluster health\",\n\t\t\t)\n\t\t);\n\t\tparent::menuConfig();\n\t}", "public function setActive() {}", "function bureau_theme_options() {\n echo 'Activate and Deactivate';\n}", "public function admin_menu() {\n\t\t$intrusion_count = (int) Mute_Screamer::instance()->get_option( 'new_intrusions_count' );\n\t\t$intrusions_menu_title = sprintf( __( 'Intrusions %s', 'mute-screamer' ), \"<span class='update-plugins count-$intrusion_count' title='$intrusion_count'><span class='update-count'>\" . number_format_i18n( $intrusion_count ) . '</span></span>' );\n\t\tadd_dashboard_page( __( 'Mute Screamer Intrusions', 'mute-screamer' ), $intrusions_menu_title, 'activate_plugins', 'mscr_intrusions', array( $this, 'intrusions' ) );\n\t\tadd_options_page( __( 'Mute Screamer Configuration', 'mute-screamer' ), __( 'Mute Screamer', 'mute-screamer' ), 'activate_plugins', 'mscr_options', array( $this, 'options' ) );\n\n\t\t// Modify the Dashboard menu updates count\n\t\t$this->set_update_badge();\n\t}", "public function optionsAction()\n\t{\n\t\treturn '';\n\t}" ]
[ "0.67637116", "0.6720985", "0.6514366", "0.6514366", "0.6486435", "0.6416981", "0.63709176", "0.6369762", "0.63072854", "0.6217914", "0.61954725", "0.6134044", "0.6062505", "0.60475945", "0.60307544", "0.6016189", "0.5979386", "0.59650606", "0.59568644", "0.59522694", "0.59522694", "0.59522694", "0.59482515", "0.5935817", "0.59142756", "0.59141314", "0.58901376", "0.58901376", "0.58886915", "0.58814156", "0.5872587", "0.58589613", "0.58572304", "0.58457977", "0.58361584", "0.583167", "0.5825632", "0.58179486", "0.57994825", "0.5778306", "0.5766468", "0.5766468", "0.5762082", "0.57610965", "0.57591695", "0.5754752", "0.5751915", "0.5746787", "0.5745793", "0.57417494", "0.5734256", "0.57315713", "0.57293224", "0.57259035", "0.5714824", "0.57081485", "0.5707624", "0.5707466", "0.5706511", "0.570339", "0.5702141", "0.56984586", "0.5695765", "0.56911194", "0.5691007", "0.5686956", "0.56713474", "0.5662427", "0.5658446", "0.56564397", "0.5650802", "0.5645877", "0.5644789", "0.56418556", "0.56397635", "0.5638417", "0.56379133", "0.56348515", "0.5633318", "0.5629016", "0.5627403", "0.56221175", "0.5620824", "0.5619155", "0.56181777", "0.5603996", "0.5595", "0.5595", "0.5587802", "0.55874056", "0.55814314", "0.55808717", "0.5580051", "0.557925", "0.5578635", "0.5575989", "0.5575688", "0.5572241", "0.557159", "0.55705935" ]
0.6669913
2
Przypisanie sciezki do kontrolera
public function bind(string $methodName, string $path, $action) { //sprawdza czy metoda jest dozwolona $this->checkIfMethodAllowed($methodName); //tworzymy bindowanie routingu $route = new AppRouterBinding(); $route->method($methodName); $route->path($path); $route->action($action); $this->routes[] = $route; return $route; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function AggiornaPrezzi(){\n\t}", "public function masodik()\n {\n }", "public function serch()\n {\n }", "function cl_tfd_situacaopedidotfd() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"tfd_situacaopedidotfd\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_clientesmodulosproc() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"clientesmodulosproc\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function sankcionisi_korisnika()\n {\n\n $sankcionisaniIme= $this->request->getVar('korisnik');\n $kazna=$this->request->getVar('kazna');\n // echo $sankcionisaniIme;\n //echo $kazna;\n $admin= $this->session->get(\"korisnik\");\n $sankcionisaniIme= $this->request->getVar('korisnik');//ili na bilo koji drugi nacin dohvatanje\n $kazna=$this->request->getVar('kazna');//ili na bilo koji drugi nacin dohvatanje\n $korisnikModel=new KorisnikModel();\n $sankcionisani=$korisnikModel->dohvati_korisnika($sankcionisaniIme);\n $korisnikModel->sankcionisi($sankcionisani, $kazna);\n return redirect()->to( $_SERVER['HTTP_REFERER']);\n \n }", "public function actionHotelski_restoran()\n\t{\n\t $this->getLang();\n\t\t$this->base('hotelski_restoran');\n $this->naslovStranice = 'Hotelski Restoran';\n\t\t$this->render('clanak');\n \n\t}", "function cl_sau_receitamedica() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"sau_receitamedica\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function baseSlajderi()\n {\n \n $this->linija = Slajderi::model()->findAllByAttributes(array('jezik'=>Yii::app()->session[\"lang\"]),array('order'=>'id'));\n $this->nalovSlajderi = $this->linija[0] -> naslov;\n \n \n }", "function cl_rhconsignadomovimentoservidorrubrica() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhconsignadomovimentoservidorrubrica\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_contacorrenteregravinculo() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"contacorrenteregravinculo\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "private function najitNavstevu(){\n $this->tpl = \"konec-navstevy\";\n }", "function cl_criterioavaliacaodisciplina() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"criterioavaliacaodisciplina\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_conplanoorcamento() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"conplanoorcamento\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_pcorcamfornelic() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"pcorcamfornelic\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function ispisiOsobu(){\n // echo \"$this->ime $this->prezime $this->godRdoj\";\n echo \"<br>Ime: \" . $this->getIme() . \"<br>Prezime: \" . $this->getPrezime() . \"<br>Godina rodjenja: \" . $this->getGodRodj() . \"<br>\";\n }", "function cl_reconhecimentocontabil() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"reconhecimentocontabil\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_conplanosis() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"conplanosis\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function uputstvo()\n {\n $this->prikaz(\"uputstvo\", []);\n }", "function cl_tipovistoriasrec() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"tipovistoriasrec\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_condicionante() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"condicionante\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_habitcandidatointeresseprograma() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"habitcandidatointeresseprograma\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function contrato()\r\n\t{\r\n\t}", "function cl_conplanoconplanoorcamento() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"conplanoconplanoorcamento\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_sau_triagemavulsa() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"sau_triagemavulsa\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_issplan() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"issplan\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function salidaAction()\n {\n \n }", "function cl_liccomissao() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"liccomissao\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function ingresoController(){\n\t\tif ( empty($_POST['usuariolg']) || empty($_POST['passlg'])) {\n\t\t\t//echo \"Varibles vacias\";\n\t\t}else{\n\t\t\t\n\t\t\t$respuesta = (new AdminModel) -> ingresoM($_POST['usuariolg'], $_POST['passlg']);\n\t\t\tif (strtolower($respuesta[\"usuario\"]) == strtolower($_POST['usuariolg']) && $respuesta[\"password\"] == $_POST['passlg']) {\t\n\t\t\t\techo \"<span class=''>Salió</span>\";\n\t\t\t\tif($_SESSION['usuario']){\n\t\t\t\t\techo '<br>';\n\t\t\t\t\tif (empty($_GET['Tid'])) {\n\t\t\t\t\t\theader('Location: ?');\t\n\t\t\t\t\t}else{\n\t\t\t\t\t\theader('Location: ?action=cartelera&Tid='.$_GET['Tid']);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t\techo \"<span class='noti'>Verifique sus datos<br> \".$respuesta['usuario'].\"</span>\";\n\t\t\t\t\t}\n\t\t\t}\t\n\t}", "public function pretragaIdeja(){\n $data['kor_ime']=$this->session->get('kor_tip');\n $idejaModel=new IdejaModel();\n $korisnik= $this->request->getVar(\"pretraga\");\n $ideje=$idejaModel->dohvati_ideje_po_korisnickom_imenu($korisnik);\n $data['ideje']=$ideje;\n $this->prikaz('pregled_ideja', $data);\n }", "function cl_sau_prochabilitacao() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"sau_prochabilitacao\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function prn_wejscie() {\n global $Cuzytkownik,$db, $_GLOBAL, $L;\n \n $DD[] = \"IT_AKTYWACJA\";\n \n $query = \"select * from \" . dn('kontrahent') . \" where ko_id=\" . $Cuzytkownik->get_id() . \";\";\n $res = $db->query($query);\n $dane= $db->fetch($res);\n $A['{PANELTITLE}'] = $dane['ko_nazwa'];\n \n // <div class=\"panelmenu\"><a href=\"' . $_GLOBAL['page_url'] . $_GLOBAL['lang'] . '/uzytkownik/dlaciebie/\"><div>' . $L['{T_SPECJALNIE_DLA_CIEBIE}'] . '</div></a></div>\n $A['{PANELMENU}'] = '<div class=\"steps\">\n <div class=\"panelmenu\"><a href=\"' . $_GLOBAL['page_url'] . $_GLOBAL['lang'] . '/uzytkownik/rabat/\"><div>' . $L['{T_TWOJ_RABAT}'] . '</div></a></div>\n <div class=\"panelmenu\"><a href=\"' . $_GLOBAL['page_url'] . $_GLOBAL['lang'] . '/uzytkownik/obserwowane/\"><div>' . $L['{T_OBSERWOWANE}'] . '</div></a></div>\n <div class=\"panelmenu\"><a href=\"' . $_GLOBAL['page_url'] . $_GLOBAL['lang'] . '/uzytkownik/dane/\"><div>' . $L['{T_MOJE_DANE}'] . '</div></a></div>\n <div class=\"panelmenu\"><a href=\"' . $_GLOBAL['page_url'] . $_GLOBAL['lang'] . '/zamowienie/\"><div>' . $L['{T_HISTORIA_ZAMOWIEN}'] . '</div></a></div>\n <div class=\"panelmenu\"><a href=\"' . $_GLOBAL['page_url'] . $_GLOBAL['lang'] . '/koszyk/\"><div>' . $L['{T_PRZEJDZ_DO_KOSZYKA}'] . '</div></a></div>\n </div>';\n\n $query = \"select * from \" . dn('cms') . \" where st_id=72;\";\n $res = $db->query($query);\n $dane= $db->fetch($res);\n \n if ($_GLOBAL['langid'] == 2) {\n $A['{PANELCONTENTSTART}'] = str_replace('\\\"','\"',$dane['st_tresc_en']);\n } else {\n $A['{PANELCONTENTSTART}'] = str_replace('\\\"','\"',$dane['st_tresc']); \n }\n \n return get_template(\"user_enter\",$A,$DD);\n }", "function cl_itinerarioescolaproc() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"itinerarioescolaproc\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function inativarregistroAction()\n\t{\n\n\t}", "function cl_rhemitecontracheque() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhemitecontracheque\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function hacer(){\n // renderizamos vista\n require_once 'views/pedido/hacer.php';\n }", "private function metodo_privado() {\n }", "function FotografiaControl(){\n\t\t$this->acceso=new AccesoDatos();\n\t}", "function cl_rhsolicita() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhsolicita\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_escrito() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"escrito\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_db_projetoscliente() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"db_projetoscliente\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "private function prehledNavstev(){\n $this->tpl = \"historie-navstev\";\n \n \t$prehled = new HlavniPrehled($this->db);\n \n $this->render = array(\n\t\t\t'navstevy' => $prehled->vypis(@$_POST), \n\t\t);\t\n }", "public function actionPorodicni_vikend()\n\t{\n\t $this->getLang();\n\t\t$this->base('porodicni_vikend');\n $this->naslovStranice = 'Porodicni Vikend';\n\t\t$this->render('clanak');\n \n\t}", "public function seminarioClase( ) {\n\n\n AccesoGui::$guiSistema->esperarInicioSistema();\n\n AccesoControladoresDispositivos::$ctrlLuz->setLucesEscenarios(LuzTecho::$ESCENARIO_SEMINARIO_CLASE);\n AccesoControladoresDispositivos::$ctrlMatrizVGA->asignarAudio(1,1);\n AccesoControladoresDispositivos::$ctrlAutomata->encenderLuzSala(Automata::$intensidades[\"maxima\"]);\n usleep(500000);\n ConexionServidorCliente::$ctrlGuiPantallas->subirPantallaElectrica();\n AccesoControladoresDispositivos::$ctrlFoco->apagar();\n ConexionServidorCliente::$ctrlGuiPlasmas->encender();\n\t//Comentado mientras se repara el visor de opacos.\n //ConexionServidorCliente::$ctrlGuiCamaraDocumentos->camaraDocumentosApagar();\n ConexionServidorCliente::$ctrlGuiProyectores->apagarPizarra();\n ConexionServidorCliente::$ctrlGuiProyectores->apagarCentral();\n AccesoControladoresDispositivos::$ctrlMesaMezclas->preset90();\n\tAccesoControladoresDispositivos::$ctrlMesaMezclas->desactivarMicPresidencia(\"M1\");\n ConexionServidorCliente::$ctrlGuiPantallas->pipEnPantallaPresi();\n AccesoGui::$guiEscenarios->escenarioSeminario();\n AccesoGui::$guiMenus->menuPrincipal(true);\n AccesoGui::$guiSistema->mostrarMenu();\n AccesoGui::$guiEscenarios->enviarEstadoVideoconferencia();\n\tAccesoControladoresDispositivos::$ctrlProyectores->estadoCentral();\n\tAccesoControladoresDispositivos::$ctrlProyectores->estadoPizarra();\n }", "public function accueil()\n {\n }", "function seznam_cz(){\n\t\t$this->layout = 'xml/seznam_zbozi';\n\t\t\n\t\t$products = $this->get_products();\n\t\t\n\t\t$this->set('products', $this->get_products());\n\t\t\n\t\t// produkty zobrazovane na detailu na firmy.cz\n\t\t$this->set('firmy_cz_products', array(762, 971, 880, 363, 654));\n\t}", "function cl_traperm() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"traperm\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function init(){\n\t\t$this->_arrParam = $this->_request->getParams();\n\t\t\n\t\t//Duong dan cua Controller\n\t\t$this->_currentController = '/' . $this->_arrParam['module'] \n\t\t\t\t\t\t\t\t\t . '/' . $this->_arrParam['controller'];\t\t\n\t\t//Duong dan cua Action chinh\t\t\n\t\t$this->_actionMain = '/' . $this->_arrParam['module'] \n\t\t\t\t\t\t\t . '/' . $this->_arrParam['controller']\t. '/index';\n\t\t\t\t\t\t\t \n\t\t$this->_paginator['currentPage'] = $this->_request->getParam('page',1);\n\t\t$this->_arrParam['paginator'] = $this->_paginator;\n\t\t\n\t\t//Luu cac du lieu filter vao SESSION\n\t\t//Dat ten SESSION\n\t\t$this->_namespace = $this->_arrParam['module'] . '-' . $this->_arrParam['controller'];\n\t\t$ssFilter = new Zend_Session_Namespace($this->_namespace);\n\t\t//$ssFilter->unsetAll();\n\t\tif(empty($ssFilter->col)){\n\t\t\t$ssFilter->lang \t\t= '';\n\t\t}\n\t\t$this->_arrParam['ssFilter']['lang'] \t\t= $this->_arrParam['lang'];\t\n\t\t\n\t\t/*====================================================\n\t\t * Load Zendvn Translate for Controller\n\t\t *====================================================*/\n\t\t/*$this->_langObj->setLangFile(array('default.language.tmx'));\t\t\n\t\tZend_Registry::set('Zend_Translate', $this->_langObj->generate());*/\n\t\t\n\t\t$info = new Zendvn_System_Info();\n\t\t$language = $info->getLanguage('admin');\n\t\tif(empty($language)){\n\t\t\t$language = 'vi';\n\t\t}\n\t\t$translate = array(\n\t\t\t\t\t\t\t'adapter' => 'tmx',\n\t\t\t\t\t\t\t'content' => LANG_PATH . '/' . $language . '/admin/default.language.tmx',\n\t\t\t\t\t\t\t'locale' => $language,\n\t\t\t\t\t\t\t);\n\t\t$translate = new Zend_Translate($translate);\n\t\tZend_Registry::set('Zend_Translate', $translate);\n\t\t\n\t\t//Truyen ra view\n\t\t$this->view->arrParam = $this->_arrParam;\n\t\t$this->view->currentController = $this->_currentController;\n\t\t$this->view->actionMain = $this->_actionMain;\t\t\n\t\t$template_path = TEMPLATE_PATH . \"/public/system\";\n\t\t$this->loadTemplate($template_path,'template.ini','template');\t\t\n\t}", "function _ObtenerSecciones()\n\t{\n\t\tinclude_once('../Entidades/Secciones.php');\n\t\t$OBJUsuarios = new Secciones;\n\t\t$secciones=$OBJUsuarios -> ObtenerSeccionesparaCategorias();\n\n\n\t\tif ($secciones>=0) {\n\t\t\t\n\t\t\t$privilegios = $_SESSION['privilegios'];\n\t\t\t\n\t\t\tinclude_once('../ModuloAdministrador/vistas/FormularioCategorias.php');\n\t\t\t$OBJUsuarios = new FormularioCategorias;\n\t\t\t$OBJUsuarios -> MostrarFormularioCategorias($secciones,$privilegios);\n\n\t\t}\n\n\t\telse{\n\n\t\t\t\t $mensaje=\"llame al administrador o contacte a [email protected]\";\n\t\t\t\t include('../includes/FormularioMensaje.php');\n\t\t\t\t $objmen = new FormularioMensaje;\n \t $objmen->MostrarMensajeLogin($mensaje);\n\n\t\t}\n\t}", "function __construct(){\n // debug($_SESSION) ;\n //URL taper par l'utilisateur\n $this->request = new \\Projet\\App\\Request() ;\n //parser l'URL\n //Router::parse($this->request->url,$this->request);\n //charger le controller appellé par l'utilisateur\n $controller = $this->loadController() ;\n\n //action appellé par utilisateur\n $action = $this->request->action;\n /*faire appelle aux fonctions des controleurs qui correspend aux nom des actions tapez par l'utilisateur\n comme $controller->view($this->request->params) ;*/\n }", "public function zahtev_za_prijavu()\n {\n if(!$this->validate(['uname'=>'required|min_length[5]|max_length[30]', 'pword'=>'required|min_length[8]|max_length[20]']))\n return $this->prijava($this->validator->getErrors());\n $pwordhash = hash(\"sha256\",$this->request->getVar('pword'));\n $km = new korisnikModel();\n $korisnici = $km->pretraga_kIme($this->request->getVar('uname'));\n if(count($korisnici)==1)\n {\n if($korisnici[0]->sifra==$pwordhash)\n {\n if($korisnici[0]->tipKorisnika<3)\n {\n $tipK = ['Administrator','Predstavnik','Kupac'];\n $sessiondata=['idK'=>$korisnici[0]->idKorisnik,\n 'tipK'=>$tipK[$korisnici[0]->tipKorisnika]];\n $this->session->set($sessiondata);\n }\n if($korisnici[0]->tipKorisnika==0) return redirect()->to(site_url('Administrator/index'));\n else if($korisnici[0]->tipKorisnika==1) return redirect()->to(site_url('Predstavnik/index'));\n else if($korisnici[0]->tipKorisnika==2) return redirect()->to(site_url('Kupac/index'));\n else return $this->prijava('Administrator jos uvek nije odobrio zahtev');\n }\n return $this->prijava('Sifra nije ispravna');\n }\n return $this->prijava('Korisnik sa tim imenom ne postoji');\n }", "public function stronyAction() {\n\t\t\t$db = Zend_Registry::get('db');\n\n\t\t\t$id = (int)$this->getRequest()->getParam('id');\n\t\t\t$this->view->inwestycja = $db->fetchRow($db->select()->from('inwestycje')->where('id = ?', $id));\n\t\t\t$this->view->strony = $db->fetchAll($db->select()->from('inwestycje_strony')->where('id_inwest =?', $id)->order('sort ASC'));\n\t\t}", "function cl_ossoario() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"ossoario\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_iptuconstr() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"iptuconstr\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function sobrenos() {\n $this->load_template('sobrenos');\n }", "function cl_rhempenhofolharubrica() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhempenhofolharubrica\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_rhbasesreg() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhbasesreg\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function execute() {\n\t\t$userLogin = null;\n\t\t$userIsAuth = false;\n\t\t$userLogin = $this->_session->userLogin;\n\t\t$userIsAuth = $this->_session->userIsAuth;\n\t\tif(empty($userLogin) || ($userIsAuth == false)) {\n\t\t\tthrow new ControllerException('Brak dostepu');\n\t\t}\t\t\t\n\t\t\n\t\t$baseUrl = $this->_request->getBaseUrl();\n\t\t$flashNotice = $this->_session->getFlashData('notice');\n\t\t$currentPageNumber = $this->_request->get('page');\n\t\t\n\t\t//pobieranie danych z modelu\n\t\t$resourceFieldsNames = $this->_resourceMapper->getFieldsNames();\n\t\t$resourceRelationsNames = $this->_resourceMapper->getRelationsNames();\n\t\t$groupFieldsNames = $this->_groupMapper->getFieldsNames();\n\t\t\n\t\t$countAll = $this->_resourceMapper->countAll();\n\t\t$this->_paginator->setLink($baseUrl.'/admin/resource/list/'); \n\t\t$this->_paginator->setNumberOfRecords($countAll);\n\t\t$this->_paginator->setCurrentPageNumber($currentPageNumber); \n\t\t$resources = $this->_resourceMapper->getAllResources($this->_paginator->getLimit(), $this->_paginator->getOffset());\n\t\t\n\t\t//przygotowanie tablicy z lista zasobow\n\t\t$resourcesToView = array();\n\t\tforeach($resources AS $resource) {\n\t\t\t$r = array();\n\t\t\t$r = $resource->toArray($resourceFieldsNames);\n\t\t\t$groups = $resource->groups->getCollection();\n\t\t\t$groupsToView = array();\n\t\t\tforeach($groups AS $group) {\n\t\t\t\t$g = array();\n\t\t\t\t$g = $group->toArray($groupFieldsNames);\n\t\t\t\t$groupsToView[] = $g;\n\t\t\t}\n\t\t\t$r['groups'] = $groupsToView;\n\t\t\t$resourcesToView[] = $r;\n\t\t}\n\t\t\n\t\t//przygotowanie dodatkowych danych dla widoku\n\t\t$links = array('view'=>array($this->_i18n->translate('view'), $baseUrl.'/admin/resource/view/id/'), 'edit'=>array($this->_i18n->translate('edit'), $baseUrl.'/admin/resource/editForm/id/'), 'delete'=>array($this->_i18n->translate('delete'), $baseUrl.'/admin/resource/delete/id/'));\n\t\t$resourceTableHeadersNames = array_map(array($this->_i18n, 'translate'), $resourceFieldsNames);\n\t\t\t\t\n\t\t//dolaczenie danych do widoku\n\t\t$this->_view->assign('resources', $resourcesToView);\n\t\t$this->_view->assign('flashNotice', $flashNotice);\n\t\t$this->_view->assign('links', $links);\n\t\t$this->_view->assign('paginator', $this->_paginator->getPaginator());\t\t\t\n\t\t$this->_view->assign('resourceTableHeadersNames', $resourceTableHeadersNames);\n\t\t$this->_view->assign('groupsString', $this->_i18n->translate($resourceRelationsNames['groups']));\t\t\n\t\t$this->_view->assign('resourceListTitle', $this->_i18n->translate('Resources list'));\n\t\t$this->_view->assign('noResourceMessage', $this->_i18n->translate('No resources in data base'));\t\t\n\t\t$this->_view->assign('noGroupMessage', $this->_i18n->translate('Resource has no group'));\n\t\t\n\t}", "public function jalan() {\n echo \"method jalan() berisi : Hewan ini terbang\";\n }", "function cl_rechumano() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rechumano\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function enlacesPaginasController(){\n //Viene del templete\n //Se verifica el contenido del action desde la url\n if(isset($_GET[\"action\"])){\n //en caso de contener algo esto es almacenado para poder dirigirnos a el \n $enlacesController = $_GET[\"action\"];\n }else{\n //caso contrario nos redirige al index para una verificacion.\n $enlacesController=\"index\";\n }\n //Ingresamos a la clase EnlacesPaginas y a su metdo que nos verifica a donde queremos ir\n $respuesta = EnlacesPaginas::enlacesPaginasModel($enlacesController);\n //y lo que recibimos es el docuemtnto que se incluira en el actual.\n include $respuesta;\n }", "function cl_moblevantamentoedi() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"moblevantamentoedi\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_cemiteriorural() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"cemiteriorural\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function main(ChansonStorageMySQL $chansonStorage, AccountStorageMysql $accountStorage){\n session_start();\n \n // verifiacation s'il n'existe pas des information à afficher \n $feedback = key_exists('feedback', $_SESSION) ? $_SESSION['feedback'] : '';\n $_SESSION['feedback'] = '';\n\n // on passe le routeur à la vue\n if(!key_exists(\"user\",$_SESSION)){\n $this->view= new View($this,$feedback);\n }else{\n if($_SESSION[\"user\"]->getStatut()===\"admin\" ){\n $this->view= new AdminView($this,$_SESSION[\"user\"],$feedback);\n }else{\n $this->view= new PrivateView($this,$_SESSION[\"user\"],$feedback);\n }\n }\n\n \n\n // on instancie notre controller\n $controllerChansons= new Controller($this->view, $chansonStorage,$accountStorage);\n $controllerAccount= new ControllerAccount($this->view,$accountStorage);\n\n /**\n * gestion des urls afin de pouvoir afficher les pages correspondantes\n */\n // si le parametre ou action son passe en url\n if(key_exists(\"PATH_INFO\" , $_SERVER)){\n\n $tab= explode('/', $_SERVER[\"PATH_INFO\"]);\n $size=count($tab);\n $i=1;\n\n if($size===2){\n $action=htmlspecialchars($tab[1]);\n switch ($action) {\n case 'apropos':\n $this->view->makeApropos();\n break;\n case 'liste':\n $controllerChansons->showList();\n break;\n case 'listUser':\n if(key_exists(\"user\",$_SESSION)){\n if($_SESSION[\"user\"]->getStatut()===\"admin\"){\n $controllerAccount->showUserList();\n }else{\n $this->view->displayAdminPageFeedBack(\".\",\"Vous de ver etre admin pour voir la liste des utilisateur \");\n }\n \n }else{\n $this->view->displayConnexionFeedback(\"Connetez vous pour voir la liste des utilisateur attention vous devez être egalement de statut admin\"); \n }\n \n break;\n\n case 'nouveau':\n if(key_exists(\"user\",$_SESSION)){\n $controllerChansons->getView()->makeCreationFormChansonPage($controllerChansons->newChanson());\n }else{\n $this->view->displayConnexionFeedback(\"Connetez vous pour voir la page personnaliser de la chanson\");\n } \n break;\n\n case 'sauverNouveau':\n if($_SERVER[\"REQUEST_METHOD\"] === \"POST\"){\n if(key_exists(\"user\",$_SESSION)){\n $controllerChansons->saveNewChanson($_POST);\n }else{\n $this->view->displayConnexionFeedback(\"Vous devez etre connecter pour enregistrer une nouvelle chanson\");\n } \n }else{\n $this->view->makePageUnaccessible();\n }\n break;\n case '':\n $this->view->welcomePage();\n break;\n case 'connexion':\n if(!key_exists(\"user\",$_SESSION)){\n $this->view->makeLoginFormPage();\n }else{\n $this->view->displayAlreadyConnectSuccess();\n } \n break;\n case 'deconnexion':\n if(key_exists(\"user\",$_SESSION)){\n $controllerChansons->logout();\n }else{\n $this->view->displayConnexionFeedback(\"Vous devez etre connecter pour experer vous deconnecter\");\n } \n break;\n case 'inscription':\n $this->view->makeSignInFormPage($controllerAccount->newAccount());\n break;\n // à changer pour modification ie controller des account à part;\n case \"confirmConnexion\":\n if($_SERVER[\"REQUEST_METHOD\"] === \"POST\"){\n $controllerChansons->login($_POST);\n }else{\n $this->view->makePageUnaccessible();\n }\n break;\n case 'confirmInscription':\n if($_SERVER[\"REQUEST_METHOD\"] === \"POST\"){\n $controllerAccount->saveAccount($_POST);\n }else{\n $this->view->makePageUnaccessible();\n }\n default:\n if(key_exists(\"user\",$_SESSION)){\n $controllerChansons->showInformation($action);\n }else{\n $this->view->displayConnexionFeedback(\"Connetez vous pour voir la page personnaliser de la chanson\");\n } \n break;\n }\n }\n\n \n if($size===3){\n for($i; $i<$size ; $i++){\n $action= $tab[$i];\n switch ($action){\n case 'supprimer':\n if(key_exists(\"user\",$_SESSION)){\n $id= htmlspecialchars($tab[$i-1]);\n $controllerChansons->askChansonDeletion($id);\n }else{\n $this->view->displayConnexionFeedback(\"Vous devez être connecter pour supprimer des chansons\");\n }\n break;\n case 'confirmerSuppression':\n if($_SERVER[\"REQUEST_METHOD\"] === \"POST\"){\n if(key_exists(\"user\",$_SESSION)){\n $id= htmlspecialchars($tab[$i-1]);\n $controllerChansons->deleteChanson($id);\n }else{\n $this->view->displayConnexionFeedback(\"Vous devez être connecter pour supprimer des chansons\");\n }\n }else{\n $this->view->makePageUnaccessible();\n }\n break;\n case 'confirmerModification':\n if($_SERVER[\"REQUEST_METHOD\"] === \"POST\"){\n if(key_exists(\"user\",$_SESSION)){\n $id= htmlspecialchars($tab[$i-1]);\n // echo \"pas dedans\";\n $controllerChansons->updateChanson($_POST,$id);\n }else{\n $this->view->displayConnexionFeedback(\"Vous devez être connecter pour modifier des chansons\");\n }\n }else{\n $this->view->makePageUnaccessible();\n }\n break;\n case \"modifier\":\n if(key_exists(\"user\",$_SESSION)){\n $id= htmlspecialchars($tab[$i-1]);\n $controllerChansons->askChansonModification($id);\n }else{\n $this->view->displayConnexionFeedback(\"Vous devez être connecter pour modifier des chansons\");\n }\n \n break;\n break;\n case 'supprimerUser':\n if(key_exists(\"user\",$_SESSION)){\n if($_SESSION[\"user\"]->getStatut()===\"admin\"){\n $id= htmlspecialchars($tab[$i-1]);\n $controllerAccount->askDeletionUser($id);\n }else{\n $this->view->displayAdminPageFeedBack(\"Vous de ver etre admin pour supprimer un \");\n }\n }else{\n $this->view->displayConnexionFeedback(\"Connetez vous pour pouvoir supprimer un comptes\"); \n }\n break;\n case 'confirmSuppressionUser':\n if($_SERVER[\"REQUEST_METHOD\"] === \"POST\"){\n if(key_exists(\"user\",$_SESSION)){\n if($_SESSION[\"user\"]->getStatut()===\"admin\"){\n $id= htmlspecialchars($tab[$i-1]);\n $controllerAccount->DeleteAccount($id);\n }else{\n $this->view->displayAdminPageFeedBack(\"Vous devez etre admin pour supprimer un utilisateur\");\n }\n }else{\n $this->view->displayConnexionFeedback(\"Connetez vous pour pouvoir supprimer un comptes\"); \n }\n }else{\n $this->view->makePageUnaccessible();\n }\n break;\n\n default:\n $this->view->makePageUnaccessible();\n break;\n }\n \n \n }\n }\n\n if($size >4){\n //chargement de la page d'erreur \n\n }\n\n\n }else{\n // affichage de la page principale avec menu \n $this->view->welcomePage();\n }\n\n\n\n $this->view->render();\n\n }", "function cl_ouvidoriaatendimento() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"ouvidoriaatendimento\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function pasien()\n\t{\n\t\t$data['pasien'] \t\t= $this->Kesehatan_M->readS('pasien')->result();\n\t\t$this->load->view('static/header');\n\t\t$this->load->view('static/navbar');\n\t\t$this->load->view('admin/daftar_pasien',$data);\n\t\t$this->load->view('static/footer');\n\t}", "function cl_evolucaodividaativa() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"evolucaodividaativa\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_aguacorte() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"aguacorte\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function acessarRelatorios(){\n\n }", "public function pregledtudjegpredv() {\n $data['kor_ime']=$this->session->get('kor_tip');\n $trenprikaz='prikazprofpredv_admin'; \n $username=$this->request->uri->getSegment(3);\n $korisnikModel=new KorisnikModel();\n $data['user']=$korisnikModel->dohvati_korisnika($username);\n if(($data['user']->Username)==($this->session->get('korisnik')->Username)) {$data['user']=$this->session->get('korisnik'); $trenprikaz='profilkorisnikpredvidjanja'; }\n $predvidjanjeModel=new PredvidjanjeModel();\n $predvidjanja=$predvidjanjeModel->dohvati_predvidjanja_po_korisnickom_imenu($data['user']->Username);\n $data['predvidjanja']=$predvidjanja;\n $this->prikaz($trenprikaz, $data);\n }", "public function cetakLapKartuStok()\r\n\t{\r\n\t\t//{\r\n\t\t\t$session=new THttpSession;\r\n\t\t\t$session->open();\r\n\t\t\t$session['cetakLapUmurHutangTbsSql'] = $this->getViewState('sql');\r\n\t\t\r\n\t\t\t$this->Response->redirect($this->Service->constructUrl('Keuangan.cetakLapUmurHutangTbsPdf'));\r\n\t\t/*}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$this->getPage()->getClientScript()->registerEndScript\r\n\t\t\t\t\t('','\r\n\t\t\t\t\ttoastr.error(\"Pilih Bulan Dan Tahun !\");\r\n\t\t\t\t\t');\r\n\t\t}*/\r\n\t}", "public function nowyPunktAction() {\n\t\t\t$db = Zend_Registry::get('db');\n\t\t\t$this->_helper->viewRenderer('form', null, true);\n\t\t\t$this->view->pagename = \" - Nowa lokalizacja\";\n\n\t\t\t$id_inwest = (int)$this->_request->getParam('inwestycja');\n\t\t\t$this->view->back = '<div class=\"back\"><a href=\"'.$this->view->baseUrl.'/admin/inwestycje/lokalizacja/id/'.$id_inwest.'/\">Wróć do listy</a></div>';\n\t\t\t$this->view->info = '<div class=\"info\">Wymiary obrazka: szerokość <b>1165px</b> / wysokość <b>655px</b></div>';\n\t\t\t$this->view->tinymce = \"1\";\n\n\t\t\t// Wyswietl formularz\n\t\t\t$form = new Form_LokalizacjaForm();\n\t\t\t$this->view->form = $form;\n\n\t\t\t\t//Akcja po wcisnieciu Submita\n\t\t\t\tif ($this->_request->getPost()) {\n\n\t\t\t\t\t//Odczytanie wartosci z inputów \n\t\t\t\t\t$formData = $this->_request->getPost();\n\t\t\t\t\tunset($formData['MAX_FILE_SIZE']);\n\t\t\t\t\tunset($formData['obrazek']);\n\t\t\t\t\tunset($formData['submit']);\n\t\t\t\t\t$formData['id_inwest'] = $id_inwest;\n\t\t\t\t\t\n\t\t\t\t\t$obrazek = $_FILES['obrazek']['name'];\n\t\t\t\t\t$plik = zmiana($formData['nazwa']).'_'.$id_inwest.'.'.zmiennazwe($obrazek);\n\t\t\t\t\t\n\t\t\t\t\t//Sprawdzenie poprawnosci forma\n\t\t\t\t\tif ($form->isValid($formData)) {\n\n\t\t\t\t\t\t$db->insert('inwestycje_markery', $formData);\n\t\t\t\t\t\t$lastId = $db->lastInsertId();\n\n\t\t\t\t\t\tif ($obrazek) {\n\n\t\t\t\t\t\t\tmove_uploaded_file($_FILES['obrazek']['tmp_name'], FILES_PATH.'/inwestycje/lokalizacja/'.$plik);\n\t\t\t\t\t\t\t$upfile = FILES_PATH.'/inwestycje/lokalizacja/'.$plik;\n\t\t\t\t\t\t\tchmod($upfile, 0755);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\trequire_once 'kCMS/Thumbs/ThumbLib.inc.php';\n\n\t\t\t\t\t\t\t$options = array('jpegQuality' => 80);\n\t\t\t\t\t\t\t$thumb = PhpThumbFactory::create($upfile, $options)->adaptiveResizeQuadrant(1165, 655)->save($upfile);\n\n\t\t\t\t\t\t\t$dataImg = array('plik' => $plik);\n\t\t\t\t\t\t\t$db->update('inwestycje_markery', $dataImg, 'id = '.$lastId);\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\t$this->_redirect('/admin/inwestycje/lokalizacja/id/'.$id_inwest.'/');\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\t\n\t\t\t\t\t\t//Wyswietl bledy\t\n\t\t\t\t\t\t$this->view->message = '<div class=\"error\">Formularz zawiera błędy</div>';\n\t\t\t\t\t\t$form->populate($formData);\n\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public static function dodajArtikelVKosarico() {\n $id = $_SESSION[\"uporabnik_id\"];\n $uporabnik = UporabnikiDB::get($id);\n\n $id_artikla = filter_input(INPUT_POST, \"id\", FILTER_SANITIZE_SPECIAL_CHARS);\n $status = \"kosarica\";\n\n // ce narocilo ze obstaja mu samo povecamo kolicino \n // drugace narocilo ustvarimo\n $narocilo = NarocilaDB::getByUporabnikId($id, $status);\n\n if (!$narocilo) {\n\n $id_narocila = NarocilaDB::insert($id, $status);\n PodrobnostiNarocilaDB::insert($id_artikla, 1, $id_narocila);\n\n } else {\n\n $podrobnost_narocila = PodrobnostiNarocilaDB::getByNarociloAndArtikel($narocilo[\"id\"], $id_artikla);\n\n if (!$podrobnost_narocila) {\n PodrobnostiNarocilaDB::insert($id_artikla, 1, $narocilo[\"id\"]);\n } else {\n PodrobnostiNarocilaDB::edit($id_artikla, $podrobnost_narocila[\"kolicina\"] + 1, $narocilo[\"id\"]); \n } \n }\n\n echo ViewHelper::redirect(BASE_URL);\n\n }", "public function init(){\n\t\t$this->_arrParam = $this->_request->getParams();\n\t\n\t\t//Duong dan cua Controller\n\t\t$this->_currentController = '/' . $this->_arrParam['module'] . '/' . $this->_arrParam['controller'];\n\t\n\t\t//Duong dan cua Action chinh\n\t\t$this->_actionMain = '/' . $this->_arrParam['module'] . '/'\t. $this->_arrParam['controller'] . '/index';\t\n\t\n\t\t//Luu cac du lieu filter vaof SESSION\n\t\t//Dat ten SESSION\n\t\t$this->_namespace = $this->_arrParam['module'] . '-' . $this->_arrParam['controller'];\n\t\t$ssFilter = new Zend_Session_Namespace($this->_namespace);\n\t\t//Lay thong tin so phan tu tren mot trang\n\t\tif(isset($this->_arrParam['limitPage'])){\n\t\t\t$ssFilter->limitPage = $this->_request->getParam('limitPage');\n\t\t\t$this->_paginator['itemCountPerPage'] = $ssFilter->limitPage;\n\t\t}elseif(!empty($ssFilter->limitPage)){\n\t\t\t$this->_paginator['itemCountPerPage'] = $ssFilter->limitPage;\n\t\t}\n\t\t\n\t\t//Trang hien tai\n\t\tif(isset($this->_arrParam['page'])){\n\t\t\t$this->_paginator['currentPage'] = $this->_arrParam['page'];\n\t\t\t$this->_page = '/page/' . $this->_arrParam['page'];\n\t\t}\n\t\t\n\t\t//Truyen thong tin phan trang vao mang du lieu\n\t\t$this->_arrParam['paginator'] = $this->_paginator;\n\t\t\n\t\t//$ssFilter->unsetAll();\n\t\tif(empty($ssFilter->col)){\n\t\t\t$ssFilter->keywords = '';\n\t\t\t$ssFilter->col \t\t= 'l.id';\n\t\t\t$ssFilter->id \t\t= 'DESC';\n\t\t\t$ssFilter->order\t= 'DESC';\n\t\t\t$ssFilter->cat_id\t= 0;\n\t\t\t$ssFilter->lang_code= '*';\n\t\t}\n\t\t$this->_arrParam['ssFilter']['keywords'] \t= $ssFilter->keywords;\n\t\t$this->_arrParam['ssFilter']['col'] \t\t= $ssFilter->col;\n\t\t$this->_arrParam['ssFilter']['order'] \t\t= $ssFilter->order;\n\t\t$this->_arrParam['ssFilter']['cat_id'] \t\t= $ssFilter->cat_id;\n\n\t\tif(empty($ssFilter->lang_code)){\n\t\t\t$language = new Zend_Session_Namespace('language');\n\t\t\t$this->_arrParam['ssFilter']['lang_code'] = $language->lang;\n\t\t}else{\n\t\t\t$this->_arrParam['ssFilter']['lang_code'] \t= $ssFilter->lang_code;\n\t\t}\n\n\t\t//Truyen ra ngoai view\n\t\t$this->view->arrParam = $this->_arrParam;\n\t\t$this->view->currentController = $this->_currentController;\n\t\t$this->view->actionMain = $this->_actionMain;\n\t\n\t\t$siteConfig = Zend_Registry::get('siteConfig');\n\t\t$template_path = TEMPLATE_PATH . \"/admin/\" . $siteConfig['template']['admin'];\n\t\t$this->loadTemplate($template_path, 'template.ini', 'template');\n\t}", "function cl_issarqsimplesreg() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"issarqsimplesreg\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function ToonFormulierAfspraak()\n{\n\n}", "public function mojProfil(){\n $korisnik=$this->session->get('korisnik');\n $this->prikaz('mojProfil', ['korisnik'=>$korisnik]);\n }", "public function renderPrivlastnit()\n {\n $spis_id = $this->getParameter('id', null);\n\n $orgjednotka_id = Orgjednotka::dejOrgUzivatele();\n\n $Spis = new Spis;\n $sp = $Spis->getInfo($spis_id);\n if (!empty($sp->orgjednotka_id) || !empty($sp->orgjednotka_id_predano))\n $this->flashMessage('Operace zamítnuta.', 'error');\n else if (!isset($orgjednotka_id))\n $this->flashMessage('Nemůžete převzít spis, protože nejste zařazen do organizační jednotky.',\n 'warning');\n else if ($Spis->zmenitOrg($spis_id, $orgjednotka_id)) {\n $this->flashMessage('Úspěšně jste si převzal tento spis. Pokud spis obsahoval dokumenty, jejich vlastnictví změněno nebylo.');\n } else {\n $this->flashMessage('Převzetí spisu do vlastnictví se nepodařilo. Zkuste to znovu.',\n 'warning');\n }\n\n $this->redirect(':Spisovka:Spisy:detail', array('id' => $spis_id));\n }", "function cl_bomov() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"bomov\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function __construct ()\n {\n // CETTE METHODE SERA APPELEE PAR TOUTES LES ROUTES\n // CAR LA ROUTE PRECISE QUELLE CLASSE ET QUELLE METHODE APPELER\n // DONC LE FRAMEWORK W DOIT CREER UN OBJET DE CETTE CLASSE\n // AVANT D'ACTIVER LA METHODE\n // ET LES CLASSES DANS LES ROUTES HERITENT DE CETTE CLASSE\n // FormController\n // DONC LA METHODE __construct DE LA CLASSE FormController\n // EST AUSSI APPELEE A LA CREATION DE L'OBJET...\n \n // ON PEUT DONC AJOUTER ICI LE CODE QU'ON VEUT ACTIVER\n // POUR TOUTES LES ROUTES...\n \n // APPELER LE CONSTRUCTEUR DU parent\n // POUR CONTINUER A GARDER LA MECANIQUE DU FRAMEWORK W\n // parent::__construct();\n \n // TRAITEMENT DU FORMULAIRE\n $idFormClasse = $this->verifierSaisie(\"idFormClasse\");\n $idFormMethode = $this->verifierSaisie(\"idFormMethode\");\n \n // UN PEU DE SECURITE...\n // JE VAIS COMPLETER LE CHEMIN VERS LE NAMESPACE DE LA CLASSE\n $idFormClasse = \"\\Controller\\Traitement\\\\$idFormClasse\";\n \n if ( ($idFormClasse != \"\") && ($idFormMethode != \"\") )\n {\n // ON A UN FORMULAIRE A TRAITER\n // ON CHERCHE SI IL Y A UNE CLASSE AVEC LA METHODE DEMANDEE\n // http://php.net/manual/fr/function.method-exists.php\n if (method_exists($idFormClasse, $idFormMethode))\n {\n // ON PEUT APPELER LA METHODE\n // ON CREE UN OBJET\n // ET AVEC L'OBJET ON APPELLE LA METHODE\n \n // ASTUCE:\n // CREATION DYNAMIQUE D'OBJET\n // ET APPEL DYNAMIQUE A UNE METHODE\n // http://php.net/manual/fr/language.oop5.basic.php\n $objet = new $idFormClasse;\n // $this EST L'OBJET DE CLASSE FormController\n $objet->$idFormMethode($this);\n }\n }\n \n }", "public function contarInventario(){\n\t}", "function cl_ensino() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"ensino\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function promovisati()\n {\n \n $promovisaniIme=$this->request->getVar('korisnik');\n $korisnikModel=new KorisnikModel();\n $promovisani=$korisnikModel->dohvati_korisnika($promovisaniIme);\n $stara_uloga=$korisnikModel->pronadjiUlogu($promovisani);\n if($stara_uloga=='OBICAN' || $stara_uloga==\"ADMIN\") { \n return redirect()->to( $_SERVER['HTTP_REFERER']);\n }\n $uloga=$this->request->getVar('uloga');\n if($uloga=='admin') $nova_uloga='ADMIN';\n else if($uloga=='mod') $nova_uloga='MODERATOR';\n $korisnikModel->promovisi($promovisani, $stara_uloga, $nova_uloga);\n return redirect()->to( $_SERVER['HTTP_REFERER']);\n \n }", "function cl_pesdiver() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"pesdiver\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public static function posodobiKosarico() {\n $id = $_SESSION[\"uporabnik_id\"];\n $uporabnik = UporabnikiDB::get($id);\n\n $id_artikla = filter_input(INPUT_POST, \"id\", FILTER_SANITIZE_SPECIAL_CHARS);\n $status = \"kosarica\";\n\n $narocilo = NarocilaDB::getByUporabnikId($id, $status);\n $podrobnost_narocila = PodrobnostiNarocilaDB::getByNarociloAndArtikel($narocilo[\"id\"], $id_artikla);\n $kolicina = filter_input(INPUT_POST, \"num\", FILTER_SANITIZE_SPECIAL_CHARS);\n\n if ($kolicina < 1) {\n if (PodrobnostiNarocilaDB::delete($podrobnost_narocila[\"id_podrobnosti_narocila\"])) {\n echo ViewHelper::redirect(BASE_URL . \"kosarica\");\n } else {\n echo(\"Napaka\");\n }\n } else {\n\n if (PodrobnostiNarocilaDB::edit($podrobnost_narocila[\"id_podrobnosti_narocila\"], $id_artikla, $kolicina, $narocilo[\"id\"])) {\n echo ViewHelper::redirect(BASE_URL . \"kosarica\");\n } else {\n echo(\"Napaka\");\n }\n }\n }", "public function kawasan()\n {\n $data = ['aktif' => 'kawasan',\n 'data_kws' => $this->M_prospektus->get_data_kawasan()->result_array()\n ];\n\n $this->template->load('template', 'prospektus/V_kawasan', $data);\n }", "public function mostra(){\n }", "public function correu(){\n echo \" correu !\";\n }", "function cl_tarefa_lanc() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"tarefa_lanc\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function actionSeguir(){\r\n $me = new MetodosExtras();\r\n \r\n $ss = new Sessao();\r\n $sm = new SeguirModel();\r\n $sm->setId($ss->devSessao('id'));\r\n $sm->setIdSeguir($_GET['usu']);\r\n \r\n $sd = new SeguirDAO();\r\n if($sd->insereSeguir($sm)):\r\n if($_GET['tp'] == 1):\r\n $me->redireciona('Artista/Perfil&usu='.$_GET['usu'].'&tp='.$_GET['tp'].'&op=um&en=sim');\r\n else:\r\n $me->redireciona('Companhia/Perfil&usu='.$_GET['usu'].'&tp='.$_GET['tp'].'&op=um&en=sim');\r\n endif;\r\n else:\r\n if($_GET['tp'] == 1):\r\n $me->redireciona('Artista/Perfil&usu='.$_GET['usu'].'&tp='.$_GET['tp'].'&op=dois');\r\n else:\r\n $me->redireciona('Companhia/Perfil&usu='.$_GET['usu'].'&tp='.$_GET['tp'].'&op=dois');\r\n endif;\r\n endif;\r\n }", "function controlAcceso () {\n \t/*\n \techo $this->uri->segment(1);\n \techo $this->uri->segment(2);\n \techo $this->uri->segment(3);\n \techo $this->uri->segment(4);\n \techo $this->uri->segment(); \t\n*/\n\n \t$idusuario = 1;\n \t\n \tif ($this->compruebaAcceso($idusuario)) {\n\t\t\t$crud = new grocery_CRUD();\n\t\t\t\n\t\t\t$crud->set_table('USUARIO');\n\t\t\t$crud->where('IDUSUARIO',$idusuario);\n\t\t\t\n\t\t\t\n\t\t\t$output = $crud->render();\n\t\t\t\n\t\t\t$this->_example_output($output);\n\t\t\n \t} else {\n \t\t$this->load->view('usuario_no_autorizado.php');\n \t}\n \t\n \t\n }", "function cl_rhfolhapagamento() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhfolhapagamento\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function pokazAction() {\n\t\t\t$db = Zend_Registry::get('db');\n\t\t\t$this->view->kat = $id = (int)$this->getRequest()->getParam('id');\n\t\t\t$this->view->katalog = $db->fetchRow($db->select()->from('galeria')->where('id =?', $id));\n\t\t\t$this->view->zdjecia = $db->fetchAll($db->select()->from('galeria_zdjecia')->order('sort ASC')->where('id_gal =?', $id));\n\t\t}", "public function SR(){\n\t\t\tparent::view('Home/SoummisionResidentiel');\n\t\t}", "public function pregledprofilapredvidjanja() {\n $data['user']=$this->session->get('korisnik');\n $predvidjanjeModel=new PredvidjanjeModel();\n $predvidjanja=$predvidjanjeModel->dohvati_predvidjanja_po_korisnickom_imenu($data['user']->Username);\n $data['predvidjanja']=$predvidjanja;\n $this->prikaz('profilkorisnikpredvidjanja', $data);\n }", "function realizarHomologacionPendientes(){ \n $this->mostrarFormularioProyecto();\n }", "public function trasnaction(){\n\n\t}", "function hitung()\n\t{\n\t\t$this->model->hitungMhs();\n\t\t//$this->dashboardukmapendaftar(); //controller dikembalikan ke method index setelah selesai mengakses method ini.\n\t}", "function cl_aguacalc() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"aguacalc\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_conarquivospad() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"conarquivospad\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function __construct() {\n\t\t\t\t// INSTANSIASI CLASS KONEKSI \n\t\t\t\tparent::__construct();\t\n\n\t\t\t}" ]
[ "0.69011366", "0.6443108", "0.6434743", "0.64181143", "0.63752866", "0.6342618", "0.6310155", "0.62929565", "0.6283741", "0.62501335", "0.6227391", "0.6211188", "0.6203384", "0.619416", "0.6193799", "0.61876225", "0.6175906", "0.61727506", "0.6164882", "0.6154179", "0.6149322", "0.61407954", "0.6137111", "0.6126864", "0.61111116", "0.6107591", "0.6097594", "0.6061927", "0.605414", "0.60537285", "0.6046217", "0.6042858", "0.60382205", "0.6025468", "0.6011536", "0.59962404", "0.59951234", "0.59922874", "0.59889495", "0.5982001", "0.59722763", "0.59706753", "0.5965616", "0.59655386", "0.59521645", "0.5951009", "0.5934692", "0.59328043", "0.5932766", "0.59307176", "0.5928674", "0.59248626", "0.5922985", "0.5915664", "0.5914329", "0.5913313", "0.59130657", "0.5909397", "0.5909223", "0.59060216", "0.5897104", "0.58962536", "0.58933574", "0.5892936", "0.58812666", "0.5879039", "0.5874616", "0.58734137", "0.586771", "0.5857795", "0.58511525", "0.5850826", "0.5843347", "0.58415437", "0.58406526", "0.583799", "0.58264244", "0.58260196", "0.58249426", "0.5822116", "0.5821714", "0.5819788", "0.58127874", "0.58112", "0.5802083", "0.5801051", "0.5800035", "0.57973355", "0.5793283", "0.5790546", "0.5790188", "0.5787782", "0.5786287", "0.5785683", "0.57810134", "0.5780552", "0.57801354", "0.5766867", "0.576636", "0.5760521", "0.57603186" ]
0.0
-1
Sprawdzamy czy metoda dozwolona
private function checkIfMethodAllowed(string $methodName) { if (!in_array($methodName, $this->allowedMethods)) throw new \Exception('Undefinded method'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function masodik()\n {\n }", "public function getMataPelajaran();", "public function tampilDataGalang(){\n\t\t\n\t}", "public function AggiornaPrezzi(){\n\t}", "public function ispisiOsobu(){\n // echo \"$this->ime $this->prezime $this->godRdoj\";\n echo \"<br>Ime: \" . $this->getIme() . \"<br>Prezime: \" . $this->getPrezime() . \"<br>Godina rodjenja: \" . $this->getGodRodj() . \"<br>\";\n }", "public function getMarca(){ return $this->marca;}", "abstract public function getPasiekimai();", "public function tratarDados(){\r\n\t\r\n\t\r\n }", "public function getChapeau();", "public function mostra(){\n }", "function getAllFromProizvod(){\n\t\treturn $this->ime . \"&nbsp\" . $this->imeProizvođača . \"&nbsp\" \n\t\t. $this->prezimeProizvođača . \"&nbsp\" . $this->cijena;\n\t}", "public function contrato()\r\n\t{\r\n\t}", "public function getPlaca(){ return $this->placa;}", "public function valorpasaje();", "function ToonFormulierAfspraak()\n{\n\n}", "public function getMilage()\n {\n }", "public function moverse(){\n\t\techo \"Soy $this->nombre y me estoy moviendo a \" . $this->getVelocidad();\n\t}", "function berinamateman ($teman) {\n $this->nama_teman=$teman;\n }", "public function stampaDipendenti() {\n echo '<p> Nome: ' . $this->nome . '</p>';\n echo '<p> Cognome: ' . $this->cognome . '</p>';\n echo '<p> Software utilizzati: ' . $this->software . '</p>';\n }", "public function boleta()\n\t{\n\t\t//\n\t}", "public function mostrarInfo()\n {\n // $datos.= \"Cuatrimestre\".$this->cuatrimestre;\n // return parent::mostrarInfo().\" \".$datos;\n }", "public function semuaData(){ \n return Mata_Kuliah::find(3)->Mahasiswa()->detach(); //gausah diisi arraynya\n }", "public function elso()\n {\n }", "protected function convertirMayuscula(){\n $cadena=strtoupper($this->tipo);\n $this->tipo=$cadena;\n }", "private function Zapis_kolize_formulare($pole, $idcka_skolizi, $iducast, $formular) { \r\n//znevalidneni vsech kolizi pro ucastnika a tento formular\r\n self::Znevalidni_kolize_ucastnika_formulare($iducast, $formular); \r\n\r\n//zapis do uc_kolize_table pro kazdou nastalou s_kolizi\r\n foreach ($idcka_skolizi as $id_skolize) { //zapisovana policka jsou v $pole\r\n //echo \"policko: \" . $pole['uc_kolize_table§' . $id_skolize . '_revidovano'];\r\n $kolize = new Projektor2_Table_UcKolizeData ($iducast, (int)$id_skolize,\r\n $pole['uc_kolize_table§' . $id_skolize . '_revidovano'],\r\n $pole['uc_kolize_table§' . $id_skolize . '_revidovano_pozn'],\r\n null, 1,\r\n null,null,null,null,null) ;\r\n // echo \"v Zapis_kolize_temp\" . var_dump ($kolize);\r\n $kolize->Zapis_jednu_kolizi(); //kdyz je v tabulce uc_kolize_table, tak prepsat, kdyz neni, tak insert\r\n }\r\n\r\n}", "public function linea_colectivo();", "public function getJadwalDimulai();", "public static function metodo_estatico () {\n }", "public function obtenerViajesplus();", "public function getDetalle();", "public function getModelo(){ return $this->modelo;}", "public function test_medio_boleto_viaje_plus(){\n $tiempo = new Tiempo();\n $tiempo->avanzar(36000);\n $medio_boleto = new Tarjeta_Medio_Boleto( Null );\n $colectivo = new Colectivo( 'mixta', '133', 420 );\n\t\t\n $this->assertEquals( $medio_boleto->getViajesPlus(), 2 );\n\t\t\n $medio_boleto->pagarConTarjeta( $colectivo , $tiempo );\n $this->assertEquals( $medio_boleto->getViajesPlus(), 1 );\n\t\t\n $medio_boleto->gastarPlus();\n $this->assertEquals( $medio_boleto->getViajesPlus(), 0 );\n\t\t\n $boleto = $medio_boleto->pagarConTarjeta( $colectivo , $tiempo );\n $this->assertEquals( $boleto->getTipoBoleto(), 'Saldo Insuficiente' );\n }", "public function mostra(){\n echo \"<tr><td>\".$this->codi.\"</td><td>\".$this->nom.\"</td></tr>\";\n }", "public function metodo_publico() {\n }", "public function getAsientos(){ return $this->asientos;}", "public function getCollisimoLaPoste()\n\t{\n\t\treturn $this->em->getRepository(\"VPMTransporteurBundle:Transporteur\")->findOneByNom(\"Colissimo La Poste\");\n\t}", "function rekamMedis($nomor_pasien)\n\t{\n\n\t}", "function __toString()\r\n {\r\n return $this->ime .\" \". $this->prezime .\" (\". $this->korisnickoIme .\")\";\r\n }", "function getSorpresa(){\r\n return $this->sorpresa;\r\n }", "public static function Najdi_kolize_pro_formular_dosud_nezavolane ($iducast, $formular, $pole_id_volanych ) {\r\n $query= \"SELECT * FROM s_typ_kolize WHERE formular='\" . $formular . \"' and valid\" ;\r\n $kolize_pole = self::Najdi_kolize ($query,$iducast) ; //to jsou vsechny pro formular\r\n \r\n //ty, co uz volal, z pole vypustit\r\n $kolize_pole_redukovane = array();\r\n \r\n foreach ($kolize_pole as $kprvek) {\r\n if ( in_array( $kprvek->id_s_typ_kolize_FK, $pole_id_volanych) ) {\r\n }\r\n else {\r\n array_push ($kolize_pole_redukovane, $kprvek ); //$kprvek->id_s_typ_kolize_FK);\r\n } \r\n }\r\n \r\n return $kolize_pole_redukovane; \r\n}", "public function id_fiche(){ return $this->id_fiche; }", "public function mesto($data)\n {\n if(property_exists($data, 'mestoNalaska'))\n {\n if(property_exists($data, 'prikaziNelokalizovanePodatke') && $data->prikaziNelokalizovanePodatke == true)\n {\n return 'where (Mesto.naziv LIKE :mestoNalaska or Toznaka.lokalizovano = false) ';\n\n }\n else\n {\n //ne mora left join - mora da ima mesto\n return 'where Mesto.naziv LIKE :mestoNalaska ';\n\n }\n\n }\n else\n //vracamo nesto sto je uvek tacno, ali da fiksiramo gde je where\n return \"where Mesto.naziv LIKE '%' \";\n }", "public function getToiletSiswaLaki()\n {\n return $this->toilet_siswa_laki;\n }", "public function displayDatoSeguimiento($etapa_id){\n try{\n log_message(\"INFO\", \"Obteniendo valor de campo para etapa: \".$etapa_id, FALSE);\n log_message(\"INFO\", \"Nombre campo: \".$this->nombre, FALSE);\n\n $dato = Doctrine::getTable('DatoSeguimiento')->findByNombreHastaEtapa($this->nombre,$etapa_id);\n if(!$dato ){\n //Se deben crear\n $dato = new DatoSeguimiento();\n $dato->nombre = $this->nombre;\n $dato->etapa_id = $etapa_id;\n $dato->valor = NULL;\n }\n log_message(\"INFO\", \"Nombre dato: \".$dato->nombre, FALSE);\n log_message(\"INFO\", \"Valor dato: .\".$dato->valor.\".\", FALSE);\n log_message(\"INFO\", \"this->valor_default: \".$this->valor_default, FALSE);\n if(isset($this->valor_default) && strlen($this->valor_default) > 0 && $dato->valor === NULL){\n $regla=new Regla($this->valor_default);\n $valor_dato=$regla->getExpresionParaOutput($etapa_id);\n $dato->valor = $valor_dato;\n $dato->save();\n }else{\n $valor_dato = $dato->valor;\n }\n\n log_message(\"INFO\", \"valor_default: \".$valor_dato, FALSE);\n\n return $valor_dato;\n }catch(Exception $e){\n log_message('error',$e->getMessage());die;\n throw $e;\n }\n }", "public function tampil_data(){\n $sql= \"Select * From penjualan Order By id_penjualan DESC\";\n $data=$this->konek->query($sql);\n while ($row=mysqli_fetch_array($data)) {\n $hasil[]=$row;\n }\n return $hasil;\n }", "function data_mhs(){\r\n\t\t\techo \"KodeMataKuliah : \".$this->KodeMataKuliah.\"<br />\";\r\n\t\t\techo \"SKS : \".$this->SKS.\"<br />\";\r\n\t\t\techo \"Daftar matakuliah yang diambil:<br />\";\r\n\t\t\t\r\n\t\t\t$i = 0; // nomor urut daftar SKS matakuliah yang diambil\r\n\t\t\tforeach($this->NamaMataKuliah as $mk){\r\n\t\t\t\techo ++$i.\". \".$mk.\"<br />\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Cuma buat ganti baris aja kok :-)\r\n\t\t\techo \"<br />\";\r\n\t\t}", "public function mostrarA(){\n \n echo \"Classe a) Publico = {$this->publico}<br>\";\n echo \"Classe a) Privado = {$this->privado}<br>\"; \n echo \"Classe a) Protegido = {$this->protegido}<br>\";\n }", "public function getMaitre()\n {\n return $this->maitre;\n }", "function get_tipos_espacios_mtrx()\n\t{\n\t\t$ef = new Tipo_espacio();\n\t\t$ef->order_by('tag');\n\t\t$ef->get();\n\t\tif($ef->c_rows>0){\n\t\t\t$colect[0]=\"TODOS\";\n\t\t\tforeach($ef->all as $row){\n\t\t\t\t$colect[$row->id]=$row->tag;\n\t\t\t}\n\t\t\treturn $colect;\n\t\t} else\n\t\t\treturn 0;\n\t}", "public function nom_alien()\r\n{\r\n return $this->_nom_alien;\r\n}", "public function getToiletSiswaPerempuan()\n {\n return $this->toilet_siswa_perempuan;\n }", "function getLeja(){\r\n return $this->leja;\r\n }", "public function getCodiceFiscale(){ return $this->codiceFiscale;}", "public function getExamen_medico(){\n return $this->examen_medico;\n }", "public function test_medio_boleto_trasbordo_CUVP(){\n $tiempo = new Tiempo();\n $tiempo->avanzar( 36000 );\n $medio_boleto = new Tarjeta_Medio_Boleto( Null );\n $colectivo = new Colectivo( 'mixta', '133', 420 );\n $colectivo2 = new Colectivo( 'mixta', '102', 421 );\n\t\t\n $medio_boleto->recargar( 50.0 );\n $boleto = $medio_boleto->pagarConTarjeta( $colectivo , $tiempo );\n\t\t\n $this->assertEquals( $boleto->getValor(), $this->getCostoMedioBoleto() );\n $medio_boleto->gastarPlus();\n\t\t\n $tiempo->avanzar( 300 );\n $boleto = $medio_boleto->pagarConTarjeta( $colectivo2 , $tiempo );\n\t\t\n $this->assertEquals( $boleto->getValor(), $this->getCostoViaje() );\n }", "function getNombre(){\t\treturn $this->mNombre;\t}", "public function test_medio_boleto_tiempo() {\n $tiempo = new Tiempo();\n $tiempo->avanzar( 36000 );\n $medio_boleto = new Tarjeta_Medio_Boleto( Null );\n $medio_boleto->recargar( 50.0 );\n $colectivo = new Colectivo( 'mixta', '133', 420 );\n $boleto = $medio_boleto->pagarConTarjeta( $colectivo , $tiempo );\n $tiempo->avanzar( 240 );\n $boleto2 = $medio_boleto->pagarConTarjeta( $colectivo , $tiempo );\n $this->assertEquals( $boleto2->getValor(), $this->getCostoViaje() );\n }", "public function getPico();", "public function obtenerViajesplusAbonados();", "public function GetNoticias(){\r\n return $this -> __buscar; \r\n \r\n }", "public function hapus_toko(){\n\t}", "public function test_medio_boleto_trasbordo_normal(){\n $tiempo = new Tiempo();\n $tiempo->avanzar(36000);\n $medio_boleto = new Tarjeta_Medio_Boleto( Null );\n $colectivo = new Colectivo( 'mixta', '133', 420 );\n $colectivo2 = new Colectivo( 'mixta', '102', 421 );\n\t\t\n $medio_boleto->recargar( 50.0 );\n $boleto = $medio_boleto->pagarConTarjeta( $colectivo , $tiempo );\n\t\t\n $this->assertEquals( $boleto->getValor() , $this->getCostoMedioBoleto() );\n\t\t\n $tiempo->avanzar( 300 );\n $boleto = $medio_boleto->pagarConTarjeta( $colectivo2 , $tiempo );\n $this->assertEquals( $boleto->getValor(), $this->getCostoTransbordo() );\n }", "function matricularVehiculo(){\r\n $matricula _aleatoria = rand();\r\n\r\n $encontrado = false;\r\n for ($i=0; $i< count ($this->vehiculos) && ($encontrado==false); $i++) {\r\n if ($this->vehiculos[$i] != null) {\r\n if($this->vehiculos[$i]->getMatricula() =='') {}\r\n $this->vehiculos[$i]->getMatricula($matricula_aleatoria);\r\n $encontrado = true;\r\n $pos = $i;\r\n }\r\n }\r\n }", "function get_tipos_espacios()\n\t{\n\t\t// Create a temporary user object\n\t\t$e = new Tipo_espacio();\n\n\t\t//Buscar en la base de datos\n\t\t$e->get();\n\t\tif($e->c_rows>0){\n\t return $e;\n\t\t} else {\n\t return FALSE;\n\t\t}\n\t}", "public function valordelospasajesplus();", "function getMeGustaId($id, $id_usuario) {\n $c = new Conexion();\n $resultado = $c->query(\"SELECT val_mg.megusta FROM valoracion_mg val_mg, usuario usu where val_mg.id_usuario=usu.id && val_mg.id_contenido=$id && val_mg.id_usuario=$id_usuario\");\n\n if ($objeto = $resultado->fetch(PDO::FETCH_OBJ)) {\n return $objeto;\n }\n else{\n return null;\n } \n}", "public function uputstvo()\n {\n $this->prikaz(\"uputstvo\", []);\n }", "function mostrar_producto_publico($id){\n\t\t\n\t\t$sql=\"SELECT * FROM producto WHERE id_pro='$id'\";\n\t\t$consulta=mysql_query($sql) or die(mysql_error());\n\t\t$resultado = mysql_fetch_array($consulta);\n\t\t$this->id=$id;\n\t\t$this->codigo=$resultado['codigo_pro'];\n\t\tsetlocale(LC_ALL, 'es_ES');\n\t\t//$this->nombre=ucwords(strtolower($resultado['nombre_pro']));\n\t\t$this->nombre=$resultado['nombre_pro'];\n\t\t\n\t\t$this->suiche=false;\n\t\t$this->ruta=\"\"; $this->categoria=\"\";\n\t\t$this->buscar_ruta_nodo($resultado['categoria_pro']);\n\t\tfor($i=count($this->ruta)-1;$i>=0;$i--){\n\t\t\t$this->categoria.=\" &raquo; \".$this->ruta[$i]['nombre_cat'];\n\t\t}\n\t\t\n\t\t$this->id_cat=$resultado['categoria_pro'];\n\t\t$this->prioridad=$resultado['prioridad_pro'];\n\t\t$this->vistas=$resultado['vistas_pro'];\n\t\t\n\t\t$this->detal=$this->convertir_moneda($resultado['detal_pro']);\n\t\t$this->mayor=$this->convertir_moneda($resultado['mayor_pro']);\n\t\t\n\t\t$this->cantidad=$resultado['limite_pro'];\n\t\t$this->fecha=$this->convertir_fecha($resultado['fecha_pro']);\n\t\t$temp=$resultado['limite_pro'];\n\t\t$this->limite2=$temp=10;\n\t\t//echo \"Numero: \".$temp;\n\t\tfor($i=1;$i<=$temp;$i++){\n\t\t\tif($i<=12) $this->limite[]=$i; else break;\n\t\t}\n\t\t$this->descripcion=$resultado['descripcion_pro'];\n\t\t$this->claves=$resultado['claves_pro'];\n\t\t$this->marca=$resultado['marca_pro'];\n\t\n\t}", "function getSecond()\r\n {\r\n return $this->segundo;\r\n }", "public function podrskaPotvrdjeno(){\n $this->prikaz('podrskaPotvrdjeno' , []);\n }", "public function getPoznamka()\n {\n return $this->poznamka;\n }", "function berinamateman($teman){\n\t\t$this->nama_teman=$teman;\n\t}", "public function nadar()\n {\n }", "public function getPrezzo() \n\t{\n return $this->prezzo;\n }", "protected function getMois()\n{\nreturn substr($this->getDateSysteme(), 5, 2);\n}", "function getChambrehospi(){\n return $this->chambre;\n }", "public function dosen_matakuliah(){ // UNTUK MENENTUKAN HUBUNGANNYA, DIBUAT FUNGSI DENGAN NAMA DOSEN_MATAKULIAH PADA MODEL MATAKULIAH\n\n return $this->hasMany(Dosen_matakuliah::class); // memberikan nilai return dari fungsi hasMany yang merelasikan matakuliah dengan banyak dosen_matakuliah dengan foreign key matakuliah_id\n\n }", "function ler($nome) {\n $x = 1;\n\t while($x < $this->bd[0][0] && !$this->str_igual($nome, $this->bd[$x][2])) {$x++;}\n if($x >= $this->bd[0][0]) {return 0;}\n //comecando a setar tudo\n $this->id = $this->bd[$x][0];\n $this->maximo = $this->bd[$x][1];\n $this->nome = $this->bd[$x][2];\n $this->categoria = $this->bd[$x][3];\n $this->tipo = $this->bd[$x][4];\n $this->atributo = $this->bd[$x][5];\n $this->specie = $this->bd[$x][6];\n $this->lv = $this->bd[$x][7];\n $this->atk = $this->bd[$x][8];\n $this->def = $this->bd[$x][9];\n $this->preco = $this->bd[$x][10];\n $this->descricao = $this->bd[$x][11];\n $this->img = '../imgs/cards/'.$this->id.'.png';\nreturn 1;\n }", "public function poliSesuaiJadwal()\n {\n $poliTujuan = JadwalDokter::where('kd_poli',$this->kodePoli())->where('hari_kerja', $this->dayToHari())->first();\n $poliSesuaiJadwal = $poliTujuan->poli['nm_poli'];\n return $poliSesuaiJadwal;\n }", "function mostrar($automovil){\r\n\techo \"<p> Hola soy un $automovil->marca, modelo $automovil->modelo</p>\";\r\n}", "private static function showProdotti($id_magazzino, $categoria, $nome, $prezzo_min, $prezzo_max){\n if(!isset($id_magazzino)) $sql_id_magazzino=\"id_magazzino LIKE '%'\";\n else $sql_id_magazzino=\"id_magazzino=$id_magazzino\"; //possiible che devo trasformare il id in un nnumero??? con intval? Oppure i singoli apici....\n\n if(!isset($categoria)) $sql_nome_categoria=\"categorie.nome LIKE '%'\";\n else $sql_nome_categoria=\"categorie.nome='$categoria'\";\n\n if(!isset($nome)) $sql_nome_prodotto=\"prodotti.nome LIKE '%'\";\n else $sql_nome_prodotto= \"prodotti.nome LIKE '%$nome%'\";\n\n if(!isset($prezzo_min)) $sql_prezzo_min=\"prodotti.prezzo > -1\";\n else $sql_prezzo_min = \"prodotti.prezzo > $prezzo_min\";\n\n if(!isset($prezzo_max)) $sql_prezzo_max=\"prodotti.prezzo < 999999999\";\n else $sql_prezzo_max=\"prodotti.prezzo < $prezzo_max\";\n\n\n $items=\\Singleton::DB()->query(\"SELECT DISTINCT prodotti.id as id_prodotto , prodotti.nome as nome_prodotto, prodotti.descrizione as descrizione_prodotto, prodotti.info as info_prodotto, prodotti.prezzo as prezzo_prodotto, prodotti.valuta as valuta_prodotto, items_magazzino.quantita as quantita_prodotto , categorie.id as id_categoria, categorie.nome as nome_categoria, items_magazzino.id_magazzino as id_magazzino, comuni.nome as comune_magazzino, comuni.provincia as provincia_magazzino, comuni.CAP as cap_magazzino, indirizzi.via as via_magazzino, indirizzi.civico as civico_magazzino FROM prodotti,categorie,items_magazzino,magazzini, indirizzi, comuni WHERE $sql_id_magazzino AND items_magazzino.id_prodotto=prodotti.id AND prodotti.id_categoria=categorie.id AND $sql_nome_categoria AND $sql_nome_prodotto AND $sql_prezzo_min AND $sql_prezzo_max AND id_magazzino=magazzini.id AND magazzini.id_indirizzo=indirizzi.id AND indirizzi.id_comune=comuni.id ;\");\n while($r = mysqli_fetch_assoc($items)) {$rows[] = $r; }\n if(isset($rows)) echo json_encode($rows);\n else self::setSuccess(\"empty\");\n }", "function elPlanTieneEstructuraDefinida(){\r\n \r\n $plan_id = $this->data['Anio']['plan_id'];\r\n\r\n $et = $this->Plan->tieneEstructuraDefinida($plan_id);\r\n\r\n return $et;\r\n\r\n }", "public function get_superficie(){ return $this->_superficie;}", "function tampil_mahasiswa($id_mhs){\n\t\t\tglobal $con;\n\n\t\t\t$query=mysqli_query($con, \"SELECT a.*,b.*\n\t\t\t\t\t\t\t\t\t\tFROM tb_mahasiswa a,tb_prodi b \n\t\t\t\t\t\t\t\t\t\tWHERE a.id_prodi=b.id_prodi\n\t\t\t\t\t\t\t\t\t\tAND a.id_mhs='$id_mhs'\");\n\t\t\twhile($row=mysqli_fetch_array($query))\n\t\t\t\t$data[] = $row;\n\n\t\t\t\treturn $data;\n\t\t}", "public function smanjiCenu(){\n if($this->getGodiste() < 2010){\n $discount=$this->cenapolovnogauta*0.7;\n return $this->cenapolovnogauta=$discount;\n }\n return $this->cenapolovnogauta; \n }", "public function __construct() {\n self::$presidencia=new Camara(\"CamaraPresidencia\");\n self::$alumnos1=new Camara(\"CamaraAlumnos1\");\n self::$alumnos2=new Camara(\"CamaraAlumnos2\");\n }", "function getAukstis() {\n return $this->aukstis; // grazina nauja reiksme mums\n }", "public function alimentar()\n {\n }", "function meteo($saison, $température){\n echo \"Nous sommes en $saison et il fait $température degré(s) <br>\";\n}", "public function testTrasbordoMedio()\n {\n $tiempo = new TiempoFalso;//$tiempo = new TiempoFalso(0);\n $recargable = new Recargable();\n $tarjeta = new Medio(0, $tiempo,$recargable);\n $tiempo->avanzar(28800);\n $tarjeta->recargar(100);\n $tarjeta->recargar(100);\n $colectivo1 = new Colectivo(122, \"Semtur\", 37);\n $colectivo2 = new Colectivo(134, \"RosarioBus\", 52);\n\t\t$saldoEsperado =200;\n\n /*\n Pruebo pagar un trasbordo un dia feriado con 90 minutos de espera y el texto del boleto\n */\n $boleto = $colectivo1->pagarCon($tarjeta);\n\t\t$saldoEsperado=$saldoEsperado-(32.50/2);\n $this->assertEquals(date('N', $tiempo->time()), '4');\n $this->assertEquals(date('G', $tiempo->time()), '8');\n $this->assertEquals(date('d-m', $tiempo->time()), \"01-01\");\n $this->assertEquals($tarjeta->obtenerSaldo(), $saldoEsperado);\n\n $tiempo->avanzar(4200);\n\t\t$saldoEsperado=$saldoEsperado-((32.50/2)*0);\n $boleto2 = $colectivo2->pagarCon($tarjeta);\n $this->assertEquals($tarjeta->obtenerSaldo(), $saldoEsperado);\n }", "function spefisik($dataid_kematian)\n\t{\n\n\t\t# codenya sql sepert select*from penduduk where nik = $datanik dimna $datanik adalah yg sudah dipilih. jadi cuma 1 row.\n\t\t$query = $this->db->query(\"SELECT*FROM `kematian` left join penduduk on kematian.nik = penduduk.nik where id_kematian = '$dataid_kematian' \");\n\n\t\t// itu adalah perintah sql join 2 table, yaitupenduduk dan kematian, karena data yanglenkap ada ditable pendudukjadiharus dijoin, \n\t\treturn $query->row();\n\t\t\n\t}", "public function Zapis_vsechny_kolize_v_zaveru_formulare ($pole, $idcka_skolizi, $iducast, $formular){\r\n //zapise kolize formulare \r\n self::Zapis_kolize_formulare($pole,$idcka_skolizi, $iducast, $formular);\r\n //-----------------------------------------------------------------------------\r\n \r\n \r\n //a zjisti a zapise kolize ucastnika pro vsechny formulare \r\n $vsechny_kolize_ucastnika_pole = self::Najdi_kolize_vsechny($iducast);\r\n //echo \"<br>**Vsechny kolize_pole v Zapis_vsechny_kolize..... **\";\r\n //var_dump($vsechny_kolize_ucastnika_pole);\r\n \r\n //znevalidneni vsech kolizi pro ucastnika \r\n self::Znevalidni_kolize_ucastnika_vsechny($iducast);\r\n foreach($vsechny_kolize_ucastnika_pole as $jedna_kolize){\r\n if ($jedna_kolize->kolize_nastala) {\r\n $jedna_kolize->Zapis_jednu_kolizi();\r\n } \r\n }\r\n \r\n}", "public function __construct($cokolwiek) {\n return $this->description=$cokolwiek;//jakie efekt teraz bedzie\n }", "public function baseSlajderi()\n {\n \n $this->linija = Slajderi::model()->findAllByAttributes(array('jezik'=>Yii::app()->session[\"lang\"]),array('order'=>'id'));\n $this->nalovSlajderi = $this->linija[0] -> naslov;\n \n \n }", "public function getElementos();", "function ambas()\n {\n print \"Ejecución de la función ambas<br>\";\n # mediante $this-> requerimos la ejecución de metodo prueba\n # de la clase actual\n $this->prueba();\n # al señalar parent:: requerimos la ejecución de metodo prueba\n # de la clase padre\n parent::prueba();\n }", "public function __toString() {\r\n return $this->persona->getNombres().' '.$this->persona->getApellidos();\r\n }", "public function baseCjenovnik()\n\t{\n\t\t\n\t\t$p = array();\n\t\t$this->red = Cjenovnik::model()->findAll(\"id>0\");\n $this->red1 = TekstCjenovnik::model()->findAllByAttributes(array('jezik'=>Yii::app()->session[\"lang\"]));\n\t/*\t$this->period_od = $konj->period_od;\n\t\t$this->period_do = $row->period_do;\n\t\t$this->tip = $row->tip;\n\t\t$this->cjena_km = $row->cjena_km;\n\t\t$this->cjena_eur = $row->cjena_eur;*/\n\t}", "public function tipo_tarjeta();", "function getEstanteria(){\r\n return $this->estanteria;\r\n }", "public function __construct(){\n $this->idade = 10;\n }" ]
[ "0.6715339", "0.65673023", "0.6241145", "0.6229831", "0.61918586", "0.61260915", "0.6062131", "0.60151136", "0.6000335", "0.59653497", "0.58926266", "0.58115715", "0.57728374", "0.57713336", "0.57631254", "0.57475597", "0.5743206", "0.5734784", "0.5732884", "0.57256764", "0.572441", "0.5722748", "0.57058936", "0.5686728", "0.5670288", "0.56640714", "0.5648869", "0.5639707", "0.5612682", "0.5609988", "0.5599128", "0.55985266", "0.5587806", "0.558687", "0.556829", "0.5563212", "0.55574965", "0.55405295", "0.55367714", "0.5532313", "0.55306923", "0.55095667", "0.5508248", "0.5505311", "0.550179", "0.5499724", "0.5493662", "0.549127", "0.54849094", "0.54798406", "0.5479282", "0.54757977", "0.5472947", "0.5472317", "0.5468243", "0.54583365", "0.54429483", "0.54376006", "0.54352945", "0.54139996", "0.54077417", "0.53988487", "0.53934956", "0.5392359", "0.5389521", "0.5389475", "0.5385986", "0.5381518", "0.53755796", "0.5374646", "0.53740925", "0.5372803", "0.5369608", "0.5367673", "0.536723", "0.53594613", "0.535853", "0.5355935", "0.53555715", "0.53506535", "0.5349836", "0.53498065", "0.53402627", "0.5339959", "0.53364307", "0.5330913", "0.5328527", "0.53279907", "0.5327884", "0.5323942", "0.5323061", "0.5321763", "0.53210235", "0.5311562", "0.5310062", "0.5308874", "0.53086716", "0.53080803", "0.5307785", "0.5301127", "0.5299137" ]
0.0
-1
Tworzymy obiekt z informacjami jak stworzyc kontroler i jakie metody wywolac
private function createControllerBuilderInfo($action,$additionalVariables) { $data = explode('@', $action); $controllerBuilderInfo = new ControllerBuilderInfoImpl($data[0], $data[1]); foreach ($additionalVariables as $kay=>$value){ $controllerBuilderInfo->addVariable($kay, $value); } return $controllerBuilderInfo; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function informacao() {\n $this->layout = '_layout.perfilUsuario';\n $usuario = new Usuario();\n $api = new ApiUsuario();\n $usuario->codgusario = $this->getParametro(0);\n\n $this->dados = array(\n 'dados' => $api->Listar_informacao_cliente($usuario)\n );\n $this->view();\n }", "public function ispisiOsobu(){\n // echo \"$this->ime $this->prezime $this->godRdoj\";\n echo \"<br>Ime: \" . $this->getIme() . \"<br>Prezime: \" . $this->getPrezime() . \"<br>Godina rodjenja: \" . $this->getGodRodj() . \"<br>\";\n }", "public function mostrarInfo()\n {\n // $datos.= \"Cuatrimestre\".$this->cuatrimestre;\n // return parent::mostrarInfo().\" \".$datos;\n }", "public function actionKontaktirajte_nas()\n\t{\n\t\t$this->getLang();\n\t\t$this->base('kontaktirajte_nas');\n $this->naslovStranice = 'Kontakt Info';\n\t\t$this->render('clanak');\n \n\t}", "public function informacionViaje(){\n $this->view->informacionDetalladaViaje();\n}", "function ingresoController(){\n\t\tif ( empty($_POST['usuariolg']) || empty($_POST['passlg'])) {\n\t\t\t//echo \"Varibles vacias\";\n\t\t}else{\n\t\t\t\n\t\t\t$respuesta = (new AdminModel) -> ingresoM($_POST['usuariolg'], $_POST['passlg']);\n\t\t\tif (strtolower($respuesta[\"usuario\"]) == strtolower($_POST['usuariolg']) && $respuesta[\"password\"] == $_POST['passlg']) {\t\n\t\t\t\techo \"<span class=''>Salió</span>\";\n\t\t\t\tif($_SESSION['usuario']){\n\t\t\t\t\techo '<br>';\n\t\t\t\t\tif (empty($_GET['Tid'])) {\n\t\t\t\t\t\theader('Location: ?');\t\n\t\t\t\t\t}else{\n\t\t\t\t\t\theader('Location: ?action=cartelera&Tid='.$_GET['Tid']);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t\techo \"<span class='noti'>Verifique sus datos<br> \".$respuesta['usuario'].\"</span>\";\n\t\t\t\t\t}\n\t\t\t}\t\n\t}", "public function viewInformasiTerkirim()\n\t{\n\t\t$ambil_akun1 = $this->Wali_Kelas_model->ambil_user($this->session->userdata('uname'));\n\t\t$ambil_status = $this->Wali_Kelas_model->ambil_status($this->session->userdata('kode'));\n\t\t$data = array(\n\t\t\t'user1' => $ambil_akun1,\n\t\t\t'status' => $ambil_status\n\t\t);\n\t\t$data['jumlah']=$this->Wali_Kelas_model->ambil_jumlah($this->session->userdata('uname'));\n\t\t$data['notifInformasi']=$this->Wali_Kelas_model->notifInformasi_Wali();\n\t\t$data['ListNotifInformasi']=$this->Wali_Kelas_model->ListNotifInformasi_Wali();\n\t\t$data['notif'] = $this->Wali_Kelas_model->notifikasiPesan();\n\t\t$data['LihatNotifRespon']=$this->Wali_Kelas_model->LihatNotifRespon_Wali();\n\t\t$data['notifPesan'] = $this->Wali_Kelas_model->notifPesan_Wali();\n\t\t$data['ListnotifPesan'] = $this->Wali_Kelas_model->ListNotifPesan_Wali();\n\t\t$data['listInformasi'] = $this->Wali_Kelas_model->getAllInformasi();\n\t\t$this->load->view('W_Lihat_InformasiTerkirim',$data);\n\t}", "public function viewInformasiOrtuTerbaca()\n\t{\n\t\t$id=$this->uri->segment(3);\n\t\t$ambil_akun1 = $this->Wali_Kelas_model->ambil_user($this->session->userdata('uname'));\n\t\t$ambil_status = $this->Wali_Kelas_model->ambil_status($this->session->userdata('kode'));\n\t\t$ambil_informasi = $this->Wali_Kelas_model->ambil_informasi($id);\n\t\t$data = array(\n\t\t\t'user1' => $ambil_akun1,\n\t\t\t'status' => $ambil_status,\n\t\t\t'info' => $ambil_informasi\n\t\t);\n\t\t$this->Wali_Kelas_model->Ubahnotifikasi_IWali($id);\n\t\t$data['jumlah']=$this->Wali_Kelas_model->ambil_jumlah($this->session->userdata('uname'));\n\t\t$data['notifInformasi']=$this->Wali_Kelas_model->notifInformasi_Wali();\n\t\t$data['ListNotifInformasi']=$this->Wali_Kelas_model->ListNotifInformasi_Wali();\n\t\t$data['jumlahOrtu']=$this->Wali_Kelas_model->getAllJumlah();\n\t\t$data['notif'] = $this->Wali_Kelas_model->notifikasiPesan();\n\t\t$data['LihatNotifRespon']=$this->Wali_Kelas_model->LihatNotifRespon_Wali();\n\t\t$data['notifPesan'] = $this->Wali_Kelas_model->notifPesan_Wali();\n\t\t$data['ListnotifPesan'] = $this->Wali_Kelas_model->ListNotifPesan_Wali();\n\t\t$data['Ortu']=$this->Wali_Kelas_model->getOrangTua();\n\t\t$data['listOrtuTerbaca'] = $this->Wali_Kelas_model->getOrangTuaTerbaca($id);\n\t\t$data['listInfoOrtuTerbaca'] = $this->Wali_Kelas_model->getOrangTuaTerbaca2($id);\n\t\t$this->load->view('W_InfoOrtuTerbaca',$data);\n\t}", "function cariObat()\n\t{\n\t\tif ($this->input->get() != NULL) {\n\t\t\t$dataForm = $this->input->get();\n\t\t\t\n\t\t\t$dataReturn = $this->db->query(\" SELECT * FROM logistik WHERE nama LIKE '%\".$dataForm['term']['term'].\"%' ESCAPE '!' AND stok > 0\")->result();\t\t\t\n\n\t\t\t$data = array();\n\t\t\tforeach ($dataReturn as $key => $value) {\n\t\t\t\t$data[$key]['id'] = $value->id.\"|\".$value->nama;\n\t\t\t\t$data[$key]['text'] = $value->nama;\n\t\t\t\t$data[$key]['stok'] = $value->stok;\n\t\t\t\tif ($value->kadaluarsa < date(\"Y-m-d-d\")) {\n\t\t\t\t\t$data[$key]['stok'] .= \" Sudah kadaluarsa\";\n\t\t\t\t}\n\t\t\t\t$data[$key]['satuan'] = $value->satuan;\n\t\t\t}\n\t\t\techo json_encode($data);\n\t\t}else{\n\t\t\tredirect();\n\t\t}\t\t\n\t}", "public function personaldatapokokAction()\n\t{\n\t\t\n\t\t\t\n\t\t//echo \"nip=$nip\";\n\t\t$userid = $this->user;\n\t\t$this->view->perintah = $_REQUEST['perintah'];\n\t\t\n\t\t//echo $this->view->perintah;\n\t\tif($this->view->perintah == \"UPDATE\")\n\t\t{\n\t\t\t$nip = $_REQUEST['nip'];\n\t\t}\n\t\t\n\t\t$this->view->nip=$nip;\n\t\t\n\t\t$this->view->personalStatusList = $this->auditor_serv->getPersonalStatusList();\n\t\t//$this->view->personalList = $this->auditor_serv->getPersonalListByUser($nip, $nama, $stat, 1, 1);\n\t\t$this->view->personalDetail = $this->auditor_serv->getPersonalDetail($nip);\n\t\t\n\t\t$this->view->propinsiList = $this->auditor_serv->getPropinsiListAll();\n\t\t$prop1 = $this->view->personalDetail['a_peg_propinsi'];\n\t\t$this->view->kabupatenList = $this->auditor_serv->getKabupatenByProp($prop1);\n\t\t$this->view->kelurahanList = $this->auditor_serv->getKelurahan();\n\t\t\n\t\t$this->view->perintahproses = $_POST['perintahproses'];\n\t\t\n\t\tif($this->view->perintahproses)\n\t\t{\n\t\t\t//if($this->view->periintahproses == \"SIMPAN\")\n\t\t\t//{\n\t\t\t\t$nip = $_POST['nip'];\n\t\t\t\t$nipH = $_POST['nipH'];\n\t\t\t\t$namaPegawai = $_POST['namaPegawai'];\n\t\t\t// }\n\t\t\t// else\n\t\t\t// {\n\t\t\t\t// $nip = $_POST['nipH'];\n\t\t\t\t// $namaPegawai = $_POST['namaPegawaiH'];\n\t\t\t// }\n\t\t\t$gelarDpn = $_POST['gelarDpn'];\n\t\t\t$gelarBlk = $_POST['gelarBlk'];\n\t\t\t\n\t\t\t$tmpLahir = $_POST['tmpLahir'];\n\t\t\t\n\t\t\t$hrLahir = $_POST['hrLahir'];\n\t\t\t$blnLahir = $_POST['blnLahir'];\n\t\t\t$thnLahir = $_POST['thnLahir'];\n\t\t\t\n\t\t\tif(!$hrLahir)\n\t\t\t{\n\t\t\t\t$tanggalLahir = null;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(!$blnLahir)\n\t\t\t\t{\n\t\t\t\t\t$tanggalLahir = null;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif(!$thnLahir)\n\t\t\t\t\t{\n\t\t\t\t\t\t$tanggalLahir = null;\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$tanggalLahir = \"$thnLahir-$blnLahir-$hrLahir\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$jenisKelamin = $_POST['jenisKelamin'];\n\t\t\t$stsNikah = $_POST['stsNikah'];\n\t\t\t$agama = $_POST['agama'];\n\t\t\t$hrMasuk = $_POST['hrMasuk'];\n\t\t\t$blnMasuk = $_POST['blnMasuk'];\n\t\t\t$thnMasuk = $_POST['thnMasuk'];\n\t\t\t$tanggalMasuk = \"$thnMasuk-$blnMasuk-$hrMasuk\";\n\t\t\t\n\t\t\t$alamat = $_POST['alamat'];\n\t\t\t$rt = $_POST['rt'];\n\t\t\t$rw = $_POST['rw'];\n\t\t\t$kelurahan = $_POST['kelurahan'];\n\t\t\t$kecamatan = $_POST['kecamatan'];\n\t\t\t$propinsi = $_POST['propinsi'];\n\t\t\t$kabupaten = $_POST['kabupaten'];\n\t\t\t$kodePos = $_POST['kodePos'];\n\t\t\t$teleponRumah = $_POST['teleponRumah'];\n\t\t\t$tlpGenggam = $_POST['tlpGenggam'];\n\t\t\t$email = $_POST['email'];\n\t\t\t$email2 = $_POST['email2'];\n\t\t\t\n\t\t\t$paramDataPokok = array(\"nip\" => $nip,\n\t\t\t\t\t\t\t\t\t\"nipH\" => $nipH,\n\t\t\t\t\t\t\t\t\t\"namaPegawai\" => $namaPegawai,\n\t\t\t\t\t\t\t\t\t\"gelarDpn\" => $gelarDpn,\n\t\t\t\t\t\t\t\t\t\"gelarBlk\" => $gelarBlk,\n\t\t\t\t\t\t\t\t\t\"tmpLahir\" => $tmpLahir,\n\t\t\t\t\t\t\t\t\t\"tanggalLahir\" => $tanggalLahir,\n\t\t\t\t\t\t\t\t\t\"jenisKelamin\" => $jenisKelamin,\n\t\t\t\t\t\t\t\t\t\"stsNikah\" => $stsNikah,\n\t\t\t\t\t\t\t\t\t\"agama\" => $agama,\n\t\t\t\t\t\t\t\t\t\"tanggalMasuk\" => $tanggalMasuk,\n\t\t\t\t\t\t\t\t\t\"alamat\" => $alamat,\n\t\t\t\t\t\t\t\t\t\"rt\" => $rt,\n\t\t\t\t\t\t\t\t\t\"rw\" => $rw,\n\t\t\t\t\t\t\t\t\t\"kelurahan\" => $kelurahan,\n\t\t\t\t\t\t\t\t\t\"kecamatan\" => $kecamatan,\n\t\t\t\t\t\t\t\t\t\"propinsi\" => $propinsi,\n\t\t\t\t\t\t\t\t\t\"kabupaten\" => $kabupaten,\n\t\t\t\t\t\t\t\t\t\"kodePos\" => $kodePos,\n\t\t\t\t\t\t\t\t\t\"teleponRumah\" => $teleponRumah,\n\t\t\t\t\t\t\t\t\t\"tlpGenggam\" => $tlpGenggam,\n\t\t\t\t\t\t\t\t\t\"email\" => $email,\n\t\t\t\t\t\t\t\t\t\"email2\" => $email2,\n\t\t\t\t\t\t\t\t\t\"userid\" =>$userid\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t//var_dump($paramDataPokok);\n\t\t\t\n\t\t\t\n\t\t\tif((isset($_FILES['foto']['error']) && $_FILES['foto'] == 0) || (!empty($_FILES['foto']['tmp_name']) && $_FILES['foto']['tmp_name'] != 'none'))\n\t\t\t{\n\t\t\t\t$size = filesize($_FILES['foto']['tmp_name']);\n\t\t\t\tif (($size != 0) && ($size > 2048000)) \n\t\t\t\t{ ?> \n\t\t\t\t\t<script>alert('File Terlalu Besar');</script>\n\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$fileName = $_FILES['foto']['name'];\n\t\t\t\t\t$extention = substr($fileName, -3, 3);\n\t\t\t\t\t\n\t\t\t\t\tif (($extention == \"jpg\") || ($extention == \"JPG\")) \n\t\t\t\t\t{\n\t\t\t\t\t\t$destDir = \"..\\etc\\data\\auditor\\foto\\\\\";\n\t\t\t\t\t\t$newFileName = \"$nip.jpg\";\n\t\t\t\t\t\t$tujuan = $destDir.$newFileName;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$file = $_FILES['foto']['tmp_name'];\n\t\t\t\t\t\t\n\t\t\t\t\t\t$prosesUpload = move_uploaded_file($file,$tujuan);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif($prosesUpload == \"1\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($this->view->perintahproses == \"SIMPAN\")\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$hasil = $this->auditor_serv->insertPersonalDataPokok($paramDataPokok);\t\n\t\t\t\t\t\t\t\t$proses = \"1\";\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$hasil = $this->auditor_serv->updatePersonalDataPokok($paramDataPokok);\n\t\t\t\t\t\t\t\t$proses = \"2\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//$hasil = \"sukses\";\n\t\t\t\t\t\t\t//var_dump($paramDataPokok);\n\t\t\t\t\t\t\tif($hasil == \"sukses\")\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$keterangan = \"Data Pokok Personal\";\n\t\t\t\t\t\t\t\t$status = $hasil;\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$keterangan = \"Data Pokok Personal\";\n\t\t\t\t\t\t\t\t$status = $hasil;\n\t\t\t\t\t\t\t\tif(file_exists($tujuan))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tunlink($tujuan);\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}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$proses = \"1\";\n\t\t\t\t\t\t\t$keterangan = \"File\";\n\t\t\t\t\t\t\t$status = \"Gagal\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$this->view->status = $status;\n\t\t\t\t\t\t$this->view->proses = $proses;\n\t\t\t\t\t\t$this->view->keterangan = $keterangan;\n\n\t\t\t\t\t\tunset($_POST);\n\t\t\t\t\t\t/* $this->personalsearchAction();\n\t\t\t\t\t\t$this->render('personalsearch'); */\n\t\t\t\t\t\tunset($_REQUEST);\n\t\t\t\t\t\t$_REQUEST = array(\"perintah\" => \"UPDATE\",\n\t\t\t\t\t\t\t\t\t\t\"nip\" => $nip);\n\t\t\t\t\t\t$this->personaldatapokokAction();\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t?> \n\t\t\t\t\t\t<script>alert('File Harus Dalam Format jpg');</script>\n\t\t\t\t\t<? \n\t\t\t\t\t\t$this->render('personaldatapokok');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif($this->view->perintahproses == \"SIMPAN\")\n\t\t\t\t{\n\t\t\t\t\t//echo \"hhhhhhhhhh\";\n\t\t\t\t\t$hasil = $this->auditor_serv->insertPersonalDataPokok($paramDataPokok);\n\t\t\t\t\t$proses = \"1\";\n\t\t\t\t\t$status = $hasil;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{ \n//echo \"iiiiiiii\";\n\t\t\t\t\t$hasil = $this->auditor_serv->updatePersonalDataPokok($paramDataPokok);\n\t\t\t\t\t$proses = \"2\";\n\t\t\t\t\t$status = $hasil;\n\t\t\t\t\t$destDir = \"..\\etc\\data\\auditor\\foto\\\\\";\n\t\t\t\t\t$newFileName1 = \"$nipH.jpg\";\n\t\t\t\t\t$tujuan1 = $destDir.$newFileName1;\n\t\t\t\t\t$newFileName = \"$nip.jpg\";\n\t\t\t\t\t$tujuan = $destDir.$newFileName;\n\t\t\t\t\tif(file_exists($tujuan1))\n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\trename($tujuan1, $tujuan);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\t//$hasil = \"sukses\";\n\t\t\t\t\t//var_dump($paramDataPokok);\n\t\t\t\t\tif($hasil == \"sukses\")\n\t\t\t\t\t{\n\t\t\t\t\t\t$keterangan = \"Data Pokok Personal\";\n\t\t\t\t\t\t$status = $hasil;\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$keterangan = \"Data n'Pokok Personal\";\n\t\t\t\t\t\t$status = $hasil;\n\t\t\t\t\t\tif(file_exists($tujuan))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tunlink($tujuan);\n\t\t\t\t\t\t}\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$this->view->status = $status;\n\t\t\t\t\t$this->view->proses = $proses;\n\t\t\t\t\t$this->view->keterangan = $keterangan;\n\n\t\t\t\t\tunset($_POST);\n\t\t\t\t\tunset($_REQUEST);\n\t\t\t\t\t$_REQUEST = array(\"perintah\" => \"UPDATE\",\n\t\t\t\t\t\t\t\t\t\"nip\" => $nip);\n\t\t\t\t\t$this->personaldatapokokAction();\n\t\t\t\t\t//$this->render('personalsearch');\n\t\t\t\t//}\n\t\t\t\t//var_dump($_REQUEST);\n\t\t\t}\n\t\t}\n\t\t\n\t}", "function SolicitarContrato(){\n $this->procedimiento = 'adq.f_cotizacion_ime';\n $this->transaccion = 'ADQ_SOLCON_IME';\n $this->tipo_procedimiento='IME';\n \n //Define los parametros para la funcion\n $this->setParametro('id_proceso_wf','id_proceso_wf','int4');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "public function waktu_nilai(){\n\t\t$t_waktu = \"t_waktu_nilai\";\n\t\t$data['waktu'] = $this->m_aka->get_all($t_waktu);\n\t\t$data['content'] = \"mahasiswa/waktu_nilai\";\n\t\t$this->load->view(\"content\", $data);\n\t}", "public function viewInformasiTerbaca()\n\t{\n\t\t$ambil_akun1 = $this->Wali_Kelas_model->ambil_user($this->session->userdata('uname'));\n\t\t$ambil_status = $this->Wali_Kelas_model->ambil_status($this->session->userdata('kode'));\n\t\t$data = array(\n\t\t\t'user1' => $ambil_akun1,\n\t\t\t'status' => $ambil_status\n\t\t);\n\t\t$data['jumlah']=$this->Wali_Kelas_model->ambil_jumlah($this->session->userdata('uname'));\n\t\t$data['notifInformasi']=$this->Wali_Kelas_model->notifInformasi_Wali();\n\t\t$data['ListNotifInformasi']=$this->Wali_Kelas_model->ListNotifInformasi_Wali();\n\t\t$data['jumlahOrtu']=$this->Wali_Kelas_model->getAllJumlah();\n\t\t$data['notif'] = $this->Wali_Kelas_model->notifikasiPesan();\n\t\t$data['LihatNotifRespon']=$this->Wali_Kelas_model->LihatNotifRespon_Wali();\n\t\t$data['notifPesan'] = $this->Wali_Kelas_model->notifPesan_Wali();\n\t\t$data['ListnotifPesan'] = $this->Wali_Kelas_model->ListNotifPesan_Wali();\n\t\t$data['listInformasiTerbaca'] = $this->Wali_Kelas_model->getAllInformasiTerbaca();\n\t\t$this->load->view('W_Lihat_InformasiTerbaca',$data);\n\t}", "public function nowyPunktAction() {\n\t\t\t$db = Zend_Registry::get('db');\n\t\t\t$this->_helper->viewRenderer('form', null, true);\n\t\t\t$this->view->pagename = \" - Nowa lokalizacja\";\n\n\t\t\t$id_inwest = (int)$this->_request->getParam('inwestycja');\n\t\t\t$this->view->back = '<div class=\"back\"><a href=\"'.$this->view->baseUrl.'/admin/inwestycje/lokalizacja/id/'.$id_inwest.'/\">Wróć do listy</a></div>';\n\t\t\t$this->view->info = '<div class=\"info\">Wymiary obrazka: szerokość <b>1165px</b> / wysokość <b>655px</b></div>';\n\t\t\t$this->view->tinymce = \"1\";\n\n\t\t\t// Wyswietl formularz\n\t\t\t$form = new Form_LokalizacjaForm();\n\t\t\t$this->view->form = $form;\n\n\t\t\t\t//Akcja po wcisnieciu Submita\n\t\t\t\tif ($this->_request->getPost()) {\n\n\t\t\t\t\t//Odczytanie wartosci z inputów \n\t\t\t\t\t$formData = $this->_request->getPost();\n\t\t\t\t\tunset($formData['MAX_FILE_SIZE']);\n\t\t\t\t\tunset($formData['obrazek']);\n\t\t\t\t\tunset($formData['submit']);\n\t\t\t\t\t$formData['id_inwest'] = $id_inwest;\n\t\t\t\t\t\n\t\t\t\t\t$obrazek = $_FILES['obrazek']['name'];\n\t\t\t\t\t$plik = zmiana($formData['nazwa']).'_'.$id_inwest.'.'.zmiennazwe($obrazek);\n\t\t\t\t\t\n\t\t\t\t\t//Sprawdzenie poprawnosci forma\n\t\t\t\t\tif ($form->isValid($formData)) {\n\n\t\t\t\t\t\t$db->insert('inwestycje_markery', $formData);\n\t\t\t\t\t\t$lastId = $db->lastInsertId();\n\n\t\t\t\t\t\tif ($obrazek) {\n\n\t\t\t\t\t\t\tmove_uploaded_file($_FILES['obrazek']['tmp_name'], FILES_PATH.'/inwestycje/lokalizacja/'.$plik);\n\t\t\t\t\t\t\t$upfile = FILES_PATH.'/inwestycje/lokalizacja/'.$plik;\n\t\t\t\t\t\t\tchmod($upfile, 0755);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\trequire_once 'kCMS/Thumbs/ThumbLib.inc.php';\n\n\t\t\t\t\t\t\t$options = array('jpegQuality' => 80);\n\t\t\t\t\t\t\t$thumb = PhpThumbFactory::create($upfile, $options)->adaptiveResizeQuadrant(1165, 655)->save($upfile);\n\n\t\t\t\t\t\t\t$dataImg = array('plik' => $plik);\n\t\t\t\t\t\t\t$db->update('inwestycje_markery', $dataImg, 'id = '.$lastId);\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\t$this->_redirect('/admin/inwestycje/lokalizacja/id/'.$id_inwest.'/');\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\t\n\t\t\t\t\t\t//Wyswietl bledy\t\n\t\t\t\t\t\t$this->view->message = '<div class=\"error\">Formularz zawiera błędy</div>';\n\t\t\t\t\t\t$form->populate($formData);\n\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function stampaDipendenti() {\n echo '<p> Nome: ' . $this->nome . '</p>';\n echo '<p> Cognome: ' . $this->cognome . '</p>';\n echo '<p> Software utilizzati: ' . $this->software . '</p>';\n }", "function ToonFormulierAfspraak()\n{\n\n}", "public function show(Informacion $informacion)\n {\n //\n }", "public function getInfoSolicitante() {\n $data = SolicitanteModel::getSolicitanteModel(['dni' => $_POST['solicitud-dni']]);\n\n if($data->rowCount() == 1) {\n $row = $data->fetch();\n\n $message = [\n 'error' => false,\n 'name' => $row['nombre'],\n 'lastName' => $row['apellido'],\n 'email' => $row['email'],\n 'phone' => $row['celular'],\n 'direction' => $row['direccion']\n ];\n } else {\n $message = [\n 'error' => true,\n 'message' => 'No existe ese usuario'\n ];\n }\n\n echo json_encode($message);\n }", "public function ispisiObavestenja() {\n //Iscitavanje id obavestenja metodom get\n $idOba = $this->input->get('id');\n \n //Iscitavanje obavestenja iz baze\n $obavestenja = ['obavestenja' => $this->ObavModel->dohvatiObavestenje($idOba)];\n \n //Ispisivanje obavestenja pozivanjem metode iz view-a\n echo $this->load->view('obavestenja/ispisObavestenja', $obavestenja, true);\n \n }", "function informationsMonCompte() {\n $this->vue = new V_Vue(\"../vues/templates/template.inc.php\");\n $this->vue->ecrireDonnee(\"titreVue\",\"Margo : Mon Compte\");\n $this->vue->ecrireDonnee('centre',\"../vues/includes/gestionDeCompte/centreMonCompte.inc.php\");\n \n $this->vue->ecrireDonnee(\"titreSection\",\"Mon Compte: Informations\");\n // Centre : formulaire de connexion\n $this->vue->ecrireDonnee('loginAuthentification',MaSession::get('login')); \n \n // ... depuis la BDD \n $daoPers = new M_DaoPersonne();\n $daoPers->connecter();\n $perso = $daoPers->getOneByLogin(MaSession::get('login'));\n \n $this->vue->ecrireDonnee(\"infoPerso\",$perso);\n \n $this->vue->afficher();\n }", "public function show(informasi $informasi)\n {\n //\n }", "public function actionIndex()\n {\n \t$id=$_SESSION['idPdsDik'];\n \t\n \t$idJenisSurat='p15'; \n $modelDik = $this->findModelDik($id);\n $sql = \"SELECT COUNT(*) FROM pidsus.pds_dik_surat where id_jenis_surat='\".$idJenisSurat.\"' and id_pds_dik='\".$id.\"'\";\n\t\t$numClients = Yii::$app->db->createCommand($sql)->queryScalar();\n\t\tif($numClients== 0){\n $model= new PdsDikSurat();\n\t\t\t$model->id_pds_dik=$id;\n\t\t\t$model->id_jenis_surat=$idJenisSurat;\n\t\t\t$model->create_by=(string)Yii::$app->user->identity->username;\n\t\t\t$model->create_ip=(string)$_SERVER['REMOTE_ADDR'];\n\t\t\t$model->save();\n\t\t\t$model = $this->findModel($id,$modelDik,$idJenisSurat);\n\t\t}\n\t\t$model = $this->findModel($id,$modelDik,$idJenisSurat);\n\t\t\n\n\t\t$modelTembusan= PdsDikTembusan::findBySql('select * from pidsus.select_surat_tembusan_dik(\\''.$model->id_pds_dik_surat.'\\',\\''.Yii::$app->user->id.'\\')')->orderby('no_urut')->all(); \n\t\t$modelSuratIsi= PdsDikSuratIsi::findBySql('select * from pidsus.select_surat_isi_dik(\\''.$model->id_pds_dik_surat.'\\',\\''.Yii::$app->user->id.'\\')')->all();\n\t\t//$modelKpPegawai= KpPegawai::findBySql('select distinct from kepegawaian.kp_pegawai')->all();\n\t\t$modelJaksa=PdsDikSuratJaksa::find()->where('id_pds_dik_surat=\\''.$model->id_pds_dik_surat.'\\' order by no_urut')->all();\n\t\t$countSuratDetailDasar= Yii::$app->db->createCommand('select count(*) from pidsus.select_surat_detail(\\''.$model->id_pds_dik_surat.'\\',\\''.Yii::$app->user->id.'\\') Where tipe_surat_detail=\\'Dasar\\'')->queryScalar();\n\t\t$countSuratDetailPertimbangan= Yii::$app->db->createCommand('select count(*) from pidsus.select_surat_detail(\\''.$model->id_pds_dik_surat.'\\',\\''.Yii::$app->user->id.'\\') Where tipe_surat_detail=\\'Pertimbangan\\'' )->queryScalar();\n\t\t$countSuratDetailUntuk= Yii::$app->db->createCommand('select count(*) from pidsus.select_surat_detail(\\''.$model->id_pds_dik_surat.'\\',\\''.Yii::$app->user->id.'\\') Where tipe_surat_detail=\\'Untuk\\'')->queryScalar();\n\t\t$modelSuratDetail=PdsDikSuratDetail::findBySql('select * from pidsus.select_surat_detail_dik(\\''.$model->id_pds_dik_surat.'\\',\\''.Yii::$app->user->id.'\\') order by no_urut,sub_no_urut')->all();\n\t\tif(isset($_SESSION['cetak'])){\n\t\t\t$_SESSION['cetak']=null;\n\t\t\t$link = \"<script>window.open(\\\"../pidsus/default/viewreportdik?id=$model->id_pds_dik_surat\\\")</script>\";\n\t\t\techo $link;\n\t\t}\n\t\tif ($model->load(Yii::$app->request->post())) {\n\n\t\t\t$model->update_by=(string)Yii::$app->user->identity->username;\n\t\t\t$model->update_date=date('Y-m-d H:i:s');$model->flag='1';\n\t\t\t$model->update_ip=(string)$_SERVER['REMOTE_ADDR'];\n\t\t\t$model->save();\n\t\t\tif(PdsDikSuratDetail::loadMultiple($modelSuratDetail, Yii::$app->request->post()) && PdsDikSuratDetail::validateMultiple($modelSuratDetail)){\n\t\t\t\tforeach($modelSuratDetail as $suratDetailRow){\n\t\t\t\t\t$suratDetailRow->save();\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(PdsDikSuratIsi::loadMultiple($modelSuratIsi, Yii::$app->request->post()) && PdsDikSuratDetail::validateMultiple($modelSuratIsi)){\n\t\t\t\tforeach($modelSuratIsi as $row){\n\t\t\t\t\t$row->save();\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(isset($_POST['modelDetailDasar'])){\n\t\t\t\t$modelDetailDasar= $_POST['modelDetailDasar'];\n\t\t\t\t$newNoUrutDasar= $_POST['new_no_urutDasar'];\n\t\t\t}\n\t\t\telse $modelDetailDasar=null;\n\t\t\t\n\t\t\tif(isset($_POST['modelDetailPertimbangan'])){\n\t\t\t\t$modelDetailPertimbangan=$_POST['modelDetailPertimbangan'];\n\t\t\t\t$newNoUrutPertimbangan= $_POST['new_no_urutPertimbangan'];\n\t\t\t}\n\t\t\telse $modelDetailPertimbangan=null;\n\t\t\t\n\t\t\tif(isset($_POST['modelDetailUntuk'])){\n\t\t\t\t$modelDetailUntuk=$_POST['modelDetailUntuk'];\n\t\t\t\t$newNoUrutUntuk= $_POST['new_no_urutUntuk'];\n\t\t\t}\n\t\t\telse $modelDetailUntuk=null;\n\t\t\t\n\n\t\t\tif(isset($_POST['nip_jpu'])){\n\t\t\t\t$nip_jpu=$_POST['nip_jpu'];\n\t\t\t}\n\t\t\telse $nip_jpu=null;\n\t\t\t\n\t\t\tif(isset($_POST['hapus_jpu'])){\n\t\t\t\t$hapus_jpu=$_POST['hapus_jpu'];\n\t\t\t}\n\t\t\telse $hapus_jpu=null;\n\n\t\t\tif ($hapus_jpu!=null){\n\t\t\t\tfor($i = 0; $i < count($hapus_jpu); $i++){\n\t\t\t\t\tPdsDikJaksa::deleteAll(['id_jaksa' => $hapus_jpu[$i], 'id_pds_dik'=>$id]);\n\t\t\t\t\tPdsDikSuratJaksa::deleteAll(['id_jaksa' => $hapus_jpu[$i], 'id_pds_dik_surat'=>$model->id_pds_dik_surat]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(isset($_POST['hapus_detail'])){\n\t\t\t\tfor($i = 0; $i < count($_POST['hapus_detail']); $i++){\n\t\t\t\t\tPdsDikSuratDetail::deleteAll(['id_pds_dik_surat_detail' => $_POST['hapus_detail'][$i]]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ($nip_jpu!=null){\n\t\t\t\tfor($i = 0; $i < count($nip_jpu); $i++){\n\t\t\t\t\t$modelJaksaSurat= new PdsDikSuratJaksa();\n\t\t\t\t\t$modelJaksaMain = new PdsDikJaksa();\n\t\t\t\t\t$modelJaksaSurat->create_by=(string)Yii::$app->user->identity->username;\n\t\t\t\t\t$modelJaksaMain->create_by=(string)Yii::$app->user->identity->username;\n\t\t\t\t\t$modelJaksaSurat->id_pds_dik_surat=$model->id_pds_dik_surat;\n\t\t\t\t\t$modelJaksaMain->id_pds_dik=$id;\n\t\t\t\t\t$modelJaksaSurat->id_jaksa=$nip_jpu[$i];\n\t\t\t\t\t$modelJaksaMain->id_jaksa=$nip_jpu[$i];\n\t\t\t\t\t$modelJaksaSurat->save();\n\t\t\t\t\t$modelJaksaMain->save();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif($modelDetailDasar!=null){\n\t\t\t\tfor ($i = 0; $i < count($modelDetailDasar); $i++) {\n\t\t\t\t\t$countSuratDetailDasar++;\n\t\t\t\t\t$modelDetailNew= new PdsDikSuratDetail();\n\t\t\t\t\t$modelDetailNew->id_pds_dik_surat=$model->id_pds_dik_surat;\n\t\t\t\t\t$modelDetailNew->no_urut=1;\n\t\t\t\t\t$modelDetailNew->sub_no_urut=$newNoUrutDasar[$i];\n\t\t\t\t\t$modelDetailNew->tipe_surat_detail='Dasar';\n\t\t\t\t\t$modelDetailNew->isi_surat_detail=$modelDetailDasar[$i];\n\t\t\t\t\t$modelDetailNew->save();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif($modelDetailPertimbangan!=null){\n\t\t\t\tfor ($i = 0; $i < count($modelDetailPertimbangan); $i++) {\n\t\t\t\t\t$countSuratDetailPertimbangan++;\n\t\t\t\t\t$modelDetailNew= new PdsDikSuratDetail();\n\t\t\t\t\t$modelDetailNew->id_pds_dik_surat=$model->id_pds_dik_surat;\n\t\t\t\t\t$modelDetailNew->no_urut=2;\n\t\t\t\t\t$modelDetailNew->sub_no_urut=$newNoUrutPertimbangan[$i];\n\t\t\t\t\t$modelDetailNew->tipe_surat_detail='Pertimbangan';\n\t\t\t\t\t$modelDetailNew->isi_surat_detail=$modelDetailPertimbangan[$i];\n\t\t\t\t\t$modelDetailNew->save();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif($modelDetailUntuk!=null){\n\t\t\t\tfor ($i = 0; $i < count($modelDetailUntuk); $i++) {\n\t\t\t\t\t$countSuratDetailUntuk++;\n\t\t\t\t\t$modelDetailNew= new PdsDikSuratDetail();\n\t\t\t\t\t$modelDetailNew->id_pds_dik_surat=$model->id_pds_dik_surat;\n\t\t\t\t\t$modelDetailNew->no_urut=3;\n\t\t\t\t\t$modelDetailNew->sub_no_urut=$newNoUrutUntuk[$i];\n\t\t\t\t\t$modelDetailNew->tipe_surat_detail='Untuk';\n\t\t\t\t\t$modelDetailNew->isi_surat_detail=$modelDetailUntuk[$i];\n\t\t\t\t\t$modelDetailNew->save();\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(PdsDikTembusan::loadMultiple($modelTembusan, Yii::$app->request->post()) && PdsDikTembusan::validateMultiple($modelTembusan)){\n \t\t$noUrutTembusan=1;foreach($modelTembusan as $row){$row->no_urut=$noUrutTembusan;$noUrutTembusan++;\n \t\t\t$row->update_by=Yii::$app->user->identity->username;\n \t\t\t$row->update_date=date('Y-m-d H:i:s');\n \t\t\t$row->save(); \t\n \t\t}\n \t}\n \tif(isset($_POST['new_tembusan'])){\n \t\tfor($i = 0; $i < count($_POST['new_tembusan']); $i++){\n\t \t\t$modelNewTembusan= new PdsDiktembusan();\n\t \t\t$modelNewTembusan->id_pds_dik_surat=$model->id_pds_dik_surat;\n\t \t\t$modelNewTembusan->no_urut=$noUrutTembusan;$noUrutTembusan++;\n\t \t\t$modelNewTembusan->tembusan=$_POST['new_tembusan'][$i];\n\t\t\t\t\t$modelNewTembusan->create_by=(string)Yii::$app->user->identity->username;\n\t\t\t\t\t$modelNewTembusan->save();\n \t\t}\n \t}\n \tif(isset($_POST['hapus_tembusan'])){\n \t\tfor($i=0; $i<count($_POST['hapus_tembusan']);$i++){\n \t\t\tPdsDiktembusan::deleteAll(['id_pds_dik_tembusan' => $_POST['hapus_tembusan'][$i]]);\n \t\t}\n \t}\n\n \tif($_POST['PdsDik']['is_final']==1 && isset($_POST['lokasi_penuntutan'])&& $_POST['lokasi_penuntutan']!==''){\n \t\t$rawData=Yii::$app->db->createCommand(\"select * from pidsus.kirim_dik_ke_tut('\".$modelDik->id_satker.\"','\".$_POST['lokasi_penuntutan'].\"','\".$model->id_pds_dik.\"','\".(string)Yii::$app->user->identity->username.\"','localhost')\")->queryAll();\n \t\t\t\n \t}\n\t\tif ($_POST['btnSubmit']=='simpan'){\n \t\treturn $this->redirect(['../pidsus/default/viewlaporandik','id'=>$model->id_pds_dik]);\n \t}\n \telse {\n \t\t$_SESSION['cetak']=1; return $this->refresh(); //return $this->redirect(['../pidsus/default/viewreport', 'id'=>$model->id_pds_dik_surat]);\n \t}\n\t\t}\n\n\t\telse {\n\t\t\t$_SESSION['idPdsDikSurat']=$model->id_pds_dik_surat;\n\t\t\treturn $this->render('index', [\n 'model' => $model,\n 'modelDik' => $modelDik,\n \t'modelSuratIsi' => $modelSuratIsi,\n \t'modelSuratDetail' => $modelSuratDetail,\n \t'modelTembusan'\t =>$modelTembusan,\n\t\t\t\t'modelKpPegawai' =>null,\n\t\t\t\t'modelJaksa' =>$modelJaksa,\n \t'readOnly' => false,\n ]);\n\t\t}\n\t\t\n }", "public function afficherInformation()\n {\n //la version de la méthode implémenté dans la classe parent (Personne)\n return \"le héro est \".$this->pseudo.\" et est un \".$this->getCote();\n }", "public function recordacoes(){\n $this->validaAutenticacao();\n $comentario = Container::getModel('Comentarios');\n $this->view->comentarios = $comentario->getComentariosNaoAprovado();\n\n $vitimas = Container::getModel('Vitimas');\n $this->view->vitimas = $vitimas->getAllDashboard();\n\n $this->menu();\n $this->render('recordacoes', 'layout-dashboard');\n }", "public function actionInformasi()\n {\n \n\n return $this->render('informasi');\n }", "public function viewInformasiTerbaca2()\n\t{\n\t\t$id=$this->uri->segment(3);\n\t\t$ambil_akun1 = $this->Wali_Kelas_model->ambil_user($this->session->userdata('uname'));\n\t\t$ambil_status = $this->Wali_Kelas_model->ambil_status($this->session->userdata('kode'));\n\t\t$data = array(\n\t\t\t'user1' => $ambil_akun1,\n\t\t\t'status' => $ambil_status\n\t\t);\n\t\t$this->Wali_Kelas_model->Ubahnotifikasi_IWali($id);\n\t\t$data['jumlah']=$this->Wali_Kelas_model->ambil_jumlah($this->session->userdata('uname'));\n\t\t$data['notifInformasi']=$this->Wali_Kelas_model->notifInformasi_Wali();\n\t\t$data['ListNotifInformasi']=$this->Wali_Kelas_model->ListNotifInformasi_Wali();\n\t\t$data['jumlahOrtu']=$this->Wali_Kelas_model->getAllJumlah();\n\t\t$data['notif'] = $this->Wali_Kelas_model->notifikasiPesan();\n\t\t$data['LihatNotifRespon']=$this->Wali_Kelas_model->LihatNotifRespon_Wali();\n\t\t$data['notifPesan'] = $this->Wali_Kelas_model->notifPesan_Wali();\n\t\t$data['ListnotifPesan'] = $this->Wali_Kelas_model->ListNotifPesan_Wali();\n\t\t$data['listInformasiTerbaca'] = $this->Wali_Kelas_model->getInformasiTerbaca($id);\n\t\t$this->load->view('W_InformasiTerbaca',$data);\n\t}", "public function setPrenom($prenom){\n if(empty($prenom)){\n header(\"Location:../vu/formulaire_inscription.php\");\n return;\n\n\n //on declare de la variable prenom puis on appelle la varibale prive prenom\n $this->_prenom = $prenom;\n }\n\n public function setMail($mail){\n //Si mail est vide on fait\n if(empty($mail)){\n header(\"Location:../vu/formulaire_inscription.php\");\n return;\n\n }\n //on declare de la variable mail puis on appelle la varibale prive mail\n $this->_mail = $mail;\n }\n\n public function setAdresse($adresse){\n //Si adresse est vide on fait\n if(empty($adresse)){\n header(\"Location:../vu/formulaire_inscription.php\");\n return;\n }\n //on declare de la variable adresse puis on appelle la varibale prive adresse\n $this->_adresse = $adresse;\n }\n\n public function setNumero($numero){\n //Si numero est vide on fait\n if(empty($numero)){\n header(\"Location:../vu/formulaire_inscription.php\");\n return;\n\n }\n //on declare de la variable numero puis on appelle la varibale prive numero\n $this->_numero = $numero;\n }\n\n public function setMot_de_passe($mdp){\n //Si mdp est vide on fait\n if(empty($mdp)){\n header(\"Location:../vu/formulaire_inscription.php\");\n return;\n }\n //on declare de la varaible mdp puis on appelle la varibale prive mdp\n $this->_mdp = $mdp;\n }\n\n public function getNom(){return $this->_nom;} // on retourne nom\n public function getPrenom(){return $this->_prenom;} // on retourne prenom\n public function getMail(){return $this->_mail;} // on retourne mail\n public function getAdresse(){return $this->_adresse;} // on retourne adresse\n public function getNumero(){return $this->_numero;} // on retourne numero\n public function getMot_de_passe(){return $this->_mdp;} // on retourne mdp\n\n}", "public function sankcionisi_korisnika()\n {\n\n $sankcionisaniIme= $this->request->getVar('korisnik');\n $kazna=$this->request->getVar('kazna');\n // echo $sankcionisaniIme;\n //echo $kazna;\n $admin= $this->session->get(\"korisnik\");\n $sankcionisaniIme= $this->request->getVar('korisnik');//ili na bilo koji drugi nacin dohvatanje\n $kazna=$this->request->getVar('kazna');//ili na bilo koji drugi nacin dohvatanje\n $korisnikModel=new KorisnikModel();\n $sankcionisani=$korisnikModel->dohvati_korisnika($sankcionisaniIme);\n $korisnikModel->sankcionisi($sankcionisani, $kazna);\n return redirect()->to( $_SERVER['HTTP_REFERER']);\n \n }", "function realizarHomologacionPendientes(){ \n $this->mostrarFormularioProyecto();\n }", "function index_get() {\n $id = $this->get('id'); // Mengecek apakah ada property id pada address sehingga data yang ditampilkan dapat diseleksi berdasarkan id atau ditampikan semua\n if ($id == '') {\n $kontak = $this->db->get('telepon')->result(); // Jika id tidak ada maka data ditampilkan semua\n } else {\n $this->db->where('id', $id);\n $kontak = $this->db->get('telepon')->result(); // Data ditampilkan berdasarkan id yang terdapat di property address\n }\n $this->response($kontak, 200);\n }", "public function casutapostalaAction()\r\n {\r\n // $this->_checkFurnizoriGroup();\r\n \r\n /**\r\n * Check if customer has this option available\r\n */\r\n // if (!$this->_getSession()->getCustomer()->getAcOpNotificariEmail()) {\r\n // $this->_redirect('customer/account/');\r\n // return;\r\n // }\r\n \r\n /**\r\n * continue if customer is furnizor and is enabled notifications \r\n */\r\n \r\n if (!Mage::getSingleton('customer/session')->isLoggedIn()) {\r\n $this->_redirect('customer/account/');\r\n return;\r\n }\r\n \r\n Mage::getSingleton('catalog/layer')->setReplyTo('');\r\n \r\n $this->loadLayout();\r\n \r\n $this->_initLayoutMessages('customer/session');\r\n $this->_initLayoutMessages('catalog/session');\r\n \r\n $this->getLayout()->getBlock('head')->setTitle($this->__('Casuta postala'));\r\n $this->renderLayout();\r\n }", "function index_get() {\n $id = $this->get('id_formk');\n if ($id == '') {\n $admintaxi = $this->db->get('t_form_kotamobagu')->result();\n } else {\n $this->db->where('id_formk', $id);\n $admintaxi = $this->db->get('t_form_kotamobagu')->result();\n }\n $this->response($admintaxi, 200);\n }", "public function edytujPunktAction() {\n\t\t\t$db = Zend_Registry::get('db');\n\t\t\t$this->_helper->viewRenderer('form', null, true);\n\n\t\t\t// Odczytanie id\n\t\t\t$id = (int)$this->getRequest()->getParam('id');\n\t\t\t$id_inwest = (int)$this->_request->getParam('inwestycja');\n\t\t\t$this->view->back = '<div class=\"back\"><a href=\"'.$this->view->baseUrl.'/admin/inwestycje/lokalizacja/id/'.$id_inwest.'/\">Wróć do listy</a></div>';\n\t\t\t$this->view->info = '<div class=\"info\">Wymiary obrazka: szerokość <b>1165px</b> / wysokość <b>655px</b></div>';\n\t\t\t\n\t\t\t$wpis = $this->view->mapa = $db->fetchRow($db->select()->from('inwestycje_markery')->where('id = ?', $id));\n\t\t\t$this->view->pagename = \" - Edytuj lokalizacje: \".$wpis->nazwa;\n\t\t\t$this->view->tinymce = \"1\";\n\n\t\t\t$form = new Form_LokalizacjaForm();\n\t\t\t$this->view->form = $form;\n\n\t\t\t// Załadowanie do forma\n\t\t\t$array = json_decode(json_encode($wpis), true);\n\t\t\t$form->populate($array);\n\n\t\t\t\t//Akcja po wcisnieciu Submita\n\t\t\t\tif ($this->_request->getPost()) {\n\n\t\t\t\t\t//Odczytanie wartosci z inputów\n\t\t\t\t\t$formData = $this->_request->getPost();\n\t\t\t\t\tunset($formData['MAX_FILE_SIZE']);\n\t\t\t\t\tunset($formData['obrazek']);\n\t\t\t\t\tunset($formData['submit']);\n\t\t\t\t\t$formData['id_inwest'] = $id_inwest;\n\t\t\t\t\t\n\t\t\t\t\t$obrazek = $_FILES['obrazek']['name'];\n\t\t\t\t\t$plik = zmiana($formData['nazwa']).'_'.$id_inwest.'.'.zmiennazwe($obrazek);\n\n\n\t\t\t\t\t//Sprawdzenie poprawnosci forma\n\t\t\t\t\tif ($form->isValid($formData)) {\n\n\t\t\t\t\t$db->update('inwestycje_markery', $formData, 'id = '.$id);\n\n\t\t\t\t\tif ($obrazek) {\n\t\t\t\t\t\tunlink(FILES_PATH.\"/inwestycje/lokalizacja/\".$wpis->plik);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tmove_uploaded_file($_FILES['obrazek']['tmp_name'], FILES_PATH.'/inwestycje/lokalizacja/'.$plik);\n\t\t\t\t\t\t$upfile = FILES_PATH.'/inwestycje/lokalizacja/'.$plik;\n\t\t\t\t\t\tchmod($upfile, 0755);\n\t\t\t\t\t\t\n\t\t\t\t\t\trequire_once 'kCMS/Thumbs/ThumbLib.inc.php';\n\n\t\t\t\t\t\t$options = array('jpegQuality' => 80);\n\t\t\t\t\t\t$thumb = PhpThumbFactory::create($upfile, $options)->adaptiveResizeQuadrant(1165, 655)->save($upfile);\n\n\t\t\t\t\t\t$dataImg = array('plik' => $plik);\n\t\t\t\t\t\t$db->update('inwestycje_markery', $dataImg, 'id = '.$id);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$this->_redirect('/admin/inwestycje/lokalizacja/id/'.$id_inwest.'/');\n\n\t\t\t\t} else {\n\t\t\t\t\t\t\n\t\t\t\t\t//Wyswietl bledy\t\n\t\t\t\t\t$this->view->message = '<div class=\"error\">Formularz zawiera błędy</div>';\n\t\t\t\t\t$form->populate($formData);\n\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function zahtev_za_registraciju()\n {\n if(!$this->validate(['uname'=>'required|min_length[5]|max_length[30]', 'email'=>'required|min_length[10]|max_length[30]', 'pword1'=>'required|min_length[8]|max_length[20]', 'pword2'=>'required|min_length[8]|max_length[20]|matches[pword1]']))\n return $this->registracija($this->validator->getErrors());\n $km = new korisnikModel();\n $kIme = $km->pretraga_kIme($this->request->getVar('uname'));\n $email = $km->pretraga_email($this->request->getVar('email'));\n if(count($kIme)>0) return $this->registracija(['Korisnicko ime je zauzeto']);\n if(count($email)>0) return $this->registracija(['Email se vec koristi']);\n if($this->request->getVar('tip')==2)\n {\n $km->insert([ 'kIme'=>$this->request->getVar('uname'),\n 'sifra'=>$pwordhash = hash(\"sha256\",$this->request->getVar('pword1')),\n 'email'=>$this->request->getVar('email'),\n 'tipKorisnika'=>$this->request->getVar('tip')]);\n }\n else\n {\n $this->session->set(\"kIme\",$this->request->getVar('uname'));\n $this->session->set(\"sifra\",hash(\"sha256\",$this->request->getVar('pword1')));\n $this->session->set(\"email\",$this->request->getVar('email'));\n $this->session->set(\"tipKorisnika\",$this->request->getVar('tip'));\n return redirect()->to(site_url(\"/Gost/dodavanje_radnje\"));\n }\n return $this->prijava('Vas nalog je dodat');\n \n }", "public function idinformacion(){\n\t\treturn $this->_idinformacion;\n\t}", "function ispisiNotifikaciju($idNovosti){\n\t\t$autorID = nadjiAutora();\n\n\t\t$veza = konekcija();\n\t\t$upit = $veza->prepare(\"SELECT * From novost WHERE id = :id AND autor_id = :idAutora\");\n\t\t$upit->bindValue(':id', $idNovosti);\n\t\t$upit->bindValue(':idAutora', $autorID);\n\t\t$upit->execute();\n\t\t\n\t\t//autor novosti nije korisnik koji je prijavljen\n\t\tif($upit->rowCount() <= 0) return; \n\n\t\t$broj = brojNeprocitanih($idNovosti);\n\t\tif($broj > 0){\n\t\t\tprint \"<p>Broj nepročitanih komentara: \";\n\t\t\tprint $broj;\n\t\t\tprint \"</p>\";\n\t\t}\t\t\n\t}", "public function correu(){\n echo \" correu !\";\n }", "public static function dodajArtikelVKosarico() {\n $id = $_SESSION[\"uporabnik_id\"];\n $uporabnik = UporabnikiDB::get($id);\n\n $id_artikla = filter_input(INPUT_POST, \"id\", FILTER_SANITIZE_SPECIAL_CHARS);\n $status = \"kosarica\";\n\n // ce narocilo ze obstaja mu samo povecamo kolicino \n // drugace narocilo ustvarimo\n $narocilo = NarocilaDB::getByUporabnikId($id, $status);\n\n if (!$narocilo) {\n\n $id_narocila = NarocilaDB::insert($id, $status);\n PodrobnostiNarocilaDB::insert($id_artikla, 1, $id_narocila);\n\n } else {\n\n $podrobnost_narocila = PodrobnostiNarocilaDB::getByNarociloAndArtikel($narocilo[\"id\"], $id_artikla);\n\n if (!$podrobnost_narocila) {\n PodrobnostiNarocilaDB::insert($id_artikla, 1, $narocilo[\"id\"]);\n } else {\n PodrobnostiNarocilaDB::edit($id_artikla, $podrobnost_narocila[\"kolicina\"] + 1, $narocilo[\"id\"]); \n } \n }\n\n echo ViewHelper::redirect(BASE_URL);\n\n }", "function _dispen_hari(){\n\t\t$CI =& get_instance();\n\t\t$api_url \t= URL_API_SIA.'sia_sistem/data_view';\n\t\t$parameter = array('api_kode' =>200002, 'api_subkode' => 1, 'api_search' => array());\n\t\t$data \t\t= $CI->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\treturn $data[0]->KADALUWARSA_HARI1;\n\t}", "public function tratamientosAplicados()\n {\n\n $tratamientos = (new \\App\\Models\\Tratamientos())->getAll();\n View::set('tratamientos', $tratamientos);\n echo View::render('tratamientosAplicados');\n\n }", "function index()\n\t{\n\t\t$data['hardware'] = $this->Mhardware->tampil_hardware();\n\t\t//mengambil data dari fungsi tampil_departemen\n\t\t$data['departemen'] = $this->Mdepartemen->tampil_departemen();\n\t\t\n\t\t$data['judul'] = \"Tabel Aset Kantor\";\n\t\t$this->theme->set_ui(\"admin/tampilhardware\", $data);\n\t}", "public function accueilAction () {\n\t\t$session = $_SESSION['ident'];\n\t\t$app_title=\"Connexion \" ;\n\t\t$app_body=\"Body_Connecte\" ;\n\t\t$app_desc=\"Comeca\" ;\n\t\t// si l admin est connecté\n\t\t$auth = $this->authModule->estConnecte();\n\n\t\trequire_once('Model/SqlModel.php');\n\t\t$AttenteModel = new SqlModel();\n\t\t\t\t \n\t\t$ListeAttente = $AttenteModel->AfficheEnAttente();\n\n\t\trequire('View/Connecte/accueil.php') ;\n\t}", "public function contrato()\r\n\t{\r\n\t}", "public function tampil()\n\t{\t\n\t\t\n\t\t$this->session->set_userdata(\"judul\",\"Data Master\");\n\t\t$ba = [\n\t\t'judul' => \"Data Master\",\n\t\t'subjudul' => \"Registrasi\",\n\t\t];\n\t\t$d = [\n\t\t'jenis' => $this->registrasi->get_enum(\"srk_registrasi\", \"reg_jenis\"),\n\t\t'pasien' => $this->registrasi->get_pasien(),\n\t\t'dokter' => $this->registrasi->get_dokter(),\n\t\t'poly' => $this->registrasi->get_poly(),\n\t\t];\n\t\t$this->load->helper('url');\n\t\t$this->load->view('background_atas', $ba);\n\t\t$this->load->view('registrasi', $d);\n\t\t$this->load->view('background_bawah');\n\t}", "public function getInformacionOtro()\n {\n return $this->informacion_otro;\n }", "public function message () \n {\n return \"Mohon maaf data untuk {$this->attributes} yang di inputkan sudah tersedia. Mohon ganti dengan yang lain\";\n }", "function cl_tipovistoriasrec() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"tipovistoriasrec\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function penarikan_tunai()\n\t{\n\t\t$data['container'] = 'transaction/penarikan_tunai';\n\t\t$data['rembugs'] = $this->model_cif->get_cm_data();\n\t\t$data['current_date'] = $this->format_date_detail($this->current_date(),'id',false,'/');\n\t\t$data['account_cash'] = $this->model_transaction->get_account_cash();\n\t\t$this->load->view('core',$data);\n\t}", "function detail_transaksi()\n\t{\n\t\terror_reporting(0);\n\t\t$id = antiInjection(trim($this->uri->segment(3)));\n\n\t\tif (!empty($id)) {\n\n\t\t\t$this->User_model->has_login();\n\n\t\t\t$output['PAGE_TITLE'] = 'Pinjaman Mikro';\n\n\t\t\t$mainData['top_css'] = '';\n\t\t\t$mainData['top_js'] = '';\n\t\t\t$mainData['bottom_js'] = '';\n\t\t\t$mainData['bottom_js'] .= add_js('js/data/transaksi_pinjaman_mikro.js');\n\t\t\t$mainData['bottom_js'] .= add_js('js/global.js');\n\n\t\t\t$output['EDIT'] = $this->Log_transaksi_model->get_log_transaksi_pinjam($id);\n\t\t\t$output['pendana'] = $this->Log_transaksi_model->get_log_transaksi_pendana_byloan($id);\n\n\t\t\t//_d($output['EDIT']);\n\n\t\t\t$mainData['mainContent'] = $this->load->view('loan/vpinjaman_detail_mikro', $output, true);\n\n\t\t\t$this->load->view('vbase',$mainData);\n\t\t}\n\t}", "public static function AccesoMetodo($arr)\n\t\t\t{\n\t\t\t\t$cadenaUsar = '';\n\t\t\t\t$opcionNavega = (isset($arr[\"opcionNavega\"]) && $arr[\"opcionNavega\"]!='') ? $arr[\"opcionNavega\"]: 111;\n\t\t\t\t$claveSeccion = (isset($arr[\"ClaveSeccion\"]) && $arr[\"ClaveSeccion\"]!='') ? '&amp;clave_seccion='.$arr[\"ClaveSeccion\"]: '';\n\t\t\t\t\n\t\t\t\t$action = 'index.php?opc='.$opcionNavega.$claveSeccion;\n\t\t\t\t$presentacion = ( isset($arr[\"presentacion\"]) && $arr[\"presentacion\"]!='' ) ? $arr[\"presentacion\"] : 'echo';\n\t\t\t\t$class =(isset($arr[\"class\"]) && $arr[\"class\"]!='') ? $arr[\"class\"]: 'margen_cero';\n\t\t\t\t$method = (isset($arr[\"method\"]) && $arr[\"method\"]!='') ? $arr[\"ClaveSeccion\"]:'POST';\n\t\t\t\t$name = (isset($arr[\"name\"]) && $arr[\"name\"]!='') ? $arr[\"name\"] : 'FormularioAcceso';\n\t\t\t\t$id =(isset($arr[\"id\"]) && $arr[\"id\"]!='') ? $arr[\"id\"] : 'FormularioAcceso';\n\t\t\t\t$OpcAntes = (isset($arr[\"OpcAntes\"]) && $arr[\"OpcAntes\"]!='') ? $arr[\"OpcAntes\"]: '';\n\t\t\t\t$OpcDespues = (isset($arr[\"OpcDespues\"]) && $arr[\"OpcDespues\"]!='') ? $arr[\"OpcDespues\"]: '';\n\t\t\t\t$BText = (isset($arr[\"BText\"]) && $arr[\"BText\"]!='') ? $arr[\"BText\"] : 'Acceso Metodo';\n\t\t\t\t$BName = (isset($arr[\"BName\"]) && $arr[\"BName\"]!='') ? $arr[\"BName\"]: 'Boton_Metodo';\n\t\t\t\t$BId = (isset($arr[\"BId\"]) && $arr[\"BId\"]!='') ? $arr[\"BId\"] :'Boton_Metodo';\n\t\t\t\t$BSrc = (isset($arr[\"BSrc\"]) && $arr[\"BSrc\"]!='') ?$arr[\"BSrc\"] : '';\n\t\t\t\t$OpcOcultas = (isset($arr[\"OpcOcultas\"]) && $arr[\"OpcOcultas\"]!='') ? $arr[\"OpcOcultas\"]: array();\n\t\t\t\t//Inicio formularo\n\t\t\t\t$cadenaUsar = html::form(array('presentacion'=>'return', 'action'=>$action , 'class'=>$class, 'name'=>$name, 'id'=>$id, 'tipo'=>'ini') );\n\t\t\t\t//Boton\n\t\t\t\t$cadenaUsar .= $OpcAntes;\t\t\t\t\n\t\t\t\t$cadenaUsar .= html::input(array( 'presentacion'=>'return', 'type'=>'submit', 'value'=>$BText, 'id'=>$BId , 'name'=>$BName , 'src'=>$BSrc ) );\n\t\t\t\t$cadenaUsar .= $OpcDespues;\n\t\t\t\t//Opciones Ocultas\n\t\t\t\tforeach($OpcOcultas as $nombre => $valor)\n\t\t\t\t\t{ \n\t\t\t\t\t\t$cadenaUsar .= html::input( array('presentacion'=>'return','type'=>'hidden', 'value'=>$valor, 'id'=>$nombre , 'name'=>$nombre ) ); \n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t$cadenaUsar .= html::form(array('presentacion'=>'return','tipo'=>'fin'));\n\t\t\t\t//Mandar Datos\n\t\t\t\tif($presentacion=='echo')\n\t\t\t\t\techo $cadenaUsar;\n\t\t\t\telse if($presentacion=='return')\n\t\t\t\t\treturn $cadenaUsar;\n\t\t\t}", "private function getInfoForValidtion() {\n\t\t\t$Name = $this->getInterstName();\n\t\t\t$Email = $this->getInterstEmail();\n\t\t\t$Message = $this->getInterstMsg();\n\t\t\t$this->validation->InterestFormValidation($Name,$Email,$Message);\n\t\t}", "public function accueil()\n {\n }", "public function baseCjenovnik()\n\t{\n\t\t\n\t\t$p = array();\n\t\t$this->red = Cjenovnik::model()->findAll(\"id>0\");\n $this->red1 = TekstCjenovnik::model()->findAllByAttributes(array('jezik'=>Yii::app()->session[\"lang\"]));\n\t/*\t$this->period_od = $konj->period_od;\n\t\t$this->period_do = $row->period_do;\n\t\t$this->tip = $row->tip;\n\t\t$this->cjena_km = $row->cjena_km;\n\t\t$this->cjena_eur = $row->cjena_eur;*/\n\t}", "public function message () \n {\n return \"Mohon maaf data {$this->attributes_alias} yang di inputkan sudah tersedia. Mohon ganti dengan yang lain\";\n }", "public function masodik()\n {\n }", "function TablaServiciosDiariasAdmin()\n {\n //Logo\n $this->Image(\"./assets/img/logo.png\" , 20 ,12, 60 , 20 , \"PNG\"); \n //Arial bold 15\n $this->SetFont('Courier','B',10);\n //Movernos a la derecha\n $this->Cell(100);\n //Título\n $this->Cell(65,20,'LISTADO DE SERVICIOS DEL DIA '.date(\"Y-m-d\").'',0,0,'C');\n //Salto de línea\n $this->Ln(25);\n\t\n\t$con = new Login();\n $con = $con->ConfiguracionPorId();\n\t\n\t$this->SetFont('courier','B',9);\n\t$this->SetFillColor(2,157,116);\n\t$this->Cell(10,5,'',0,0,'');\n\t$this->Cell(35,5,'CÉDULA GERENTE: ',0,0,'');\n\t$this->Cell(44,5,$con[0]['cedresponsable'],0,0,'');\n\t$this->Cell(30,5,'NOMBRE GERENTE:',0,0,'');\n\t$this->Cell(83,5,$con[0]['nomresponsable'],0,1,'');\n \n $this->Cell(10,5,'',0,0,'');\n\t$this->Cell(35,5,'TELÉFONO GERENTE: ',0,0,'');\n $this->Cell(44,5,utf8_decode($con[0]['tlfresponsable']),0,0,'');\n $this->Cell(30,5,'CORREO GERENTE:',0,0,'');\n $this->Cell(83,5,utf8_decode($con[0]['correoresponsable']),0,0,'');\n $this->Ln(8);\n\t\n\t$this->SetFont('courier','B',9);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es blanco)\n $this->SetFillColor(249, 187, 31); // establece el color del fondo de la celda (en este caso es NARANJA)\n\t$this->CellFitSpace(8,8,'N°',1,0,'C', True);\n\t$this->CellFitSpace(30,8,'CÓDIGO SERVICIO',1,0,'C', True);\n\t$this->CellFitSpace(18,8,'N° CAJA',1,0,'C', True);\n\t$this->CellFitSpace(28,8,'FECHA SERVICIO',1,0,'C', True);\n\t$this->CellFitSpace(20,8,'SERVICIOS',1,0,'C', True);\n\t$this->CellFitSpace(25,8,'SUBTOTAL',1,0,'C', True);\n\t$this->CellFitSpace(20,8,'IVA',1,0,'C', True);\n\t$this->CellFitSpace(20,8,'DESCUENTO',1,0,'C', True);\n\t$this->CellFitSpace(26,8,'TOTAL PAGO',1,1,'C', True);\n\t\n $tra = new Login();\n $reg = $tra->ListarServiciosDiarias();\n\t$serviciosTotal=0;\n\t$pagoSubtotal=0;\n\t$pagoIva=0;\n\t$pagoDescuento=0;\n\t$pagoTotal=0;\n\t$a=1;\n for($i=0;$i<sizeof($reg);$i++){\n\t$serviciosTotal+=$reg[$i]['cantidad'];\n\t$pagoSubtotal+=$reg[$i]['subtotal']; \n\t$pagoIva+=$reg[$i]['totaliva']; \n\t$pagoDescuento+=$reg[$i]['totaldescuento']; \n\t$pagoTotal+=$reg[$i]['totalpago'];\n\t$this->SetFont('courier','',7); \n\t$this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es negro)\n $this->Cell(8,5,$a++,1,0,'C');\n\t$this->CellFitSpace(30,5,$reg[$i][\"codservicio\"],1,0,'C');\n $this->CellFitSpace(18,5,utf8_decode($reg[$i][\"nrocaja\"]),1,0,'C');\n\t$this->CellFitSpace(28,5,utf8_decode(date(\"d-m-Y h:i:s\",strtotime($reg[$i]['fechaservicio']))),1,0,'C');\n\t$this->CellFitSpace(20,5,utf8_decode($reg[$i][\"cantidad\"]),1,0,'C');\n\t$this->CellFitSpace(25,5,utf8_decode(number_format($reg[$i]['subtotal'], 2, '.', ',')),1,0,'C');\n\t$this->CellFitSpace(20,5,utf8_decode(number_format($reg[$i]['totaliva'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(20,5,utf8_decode(number_format($reg[$i]['totaldescuento'], 2, '.', ',')),1,0,'C');\n\t$this->CellFitSpace(26,5,utf8_decode(number_format($reg[$i]['totalpago'], 2, '.', ',')),1,0,'C');\n $this->Ln();\n\t\n } \n \n\t$this->Cell(8,5,'',1,0,'C');\n $this->Cell(30,5,'',1,0,'C');\n $this->Cell(18,5,'',1,0,'C');\t\n $this->SetFont('courier','B',9);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es blanco)\n $this->Cell(28,5,'TOTAL GENERAL',1,0,'C', True);\n $this->SetFont('courier','B',7);\n $this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es blanco)\n $this->Cell(20,5,utf8_decode($serviciosTotal),1,0,'C');\n $this->Cell(25,5,utf8_decode(number_format($pagoSubtotal, 2, '.', ',')),1,0,'C');\n $this->Cell(20,5,utf8_decode(number_format($pagoIva, 2, '.', ',')),1,0,'C');\n $this->Cell(20,5,utf8_decode(number_format($pagoDescuento, 2, '.', ',')),1,0,'C'); \n $this->CellFitSpace(26,5,utf8_decode(number_format($pagoTotal, 2, '.', ',')),1,0,'C');\n $this->Ln();\n\n \n $this->Ln(15); \n $this->SetFont('courier','B',9);\n $this->Cell(190,0,'ELABORADO POR: '.utf8_decode($_SESSION[\"nombres\"]).' RECIBIDO POR:___________________________','',1,'C');\n $this->Ln(4);\n }", "public function form_informacion_basica(){\n //Tomamos los datos del productor logeado\n $datos = \\DB::table('enc_productores')->orderBy('id_productor', 'desc')->where('object_id', Auth::user()->object_id)->where('activo', 1)->get();\n\n //Si esta vacio, significa que no hay el registro, envìa a formulario vacio\n if (empty($datos->first())) {\n return $this->form_informacion_basica_agregar();\n }\n else {\n //Por el contrario, si hay el registro, envìa a actualizar\n return $this->form_informacion_basica_editar();\n }\n //return view(\"formularios.encuestas.form_informacion_basica_agregar\");\n }", "public function action_responder() {\r\n $info = Array();\r\n if ($_POST['aceptar']) {\r\n $id_seg = Arr::get($_POST, 'id_seg');\r\n $nur = Arr::get($_POST, 'nur');\r\n $id_tipo = Arr::get($_POST, 'documento');\r\n $fucov = Arr::get($_POST, 'fucov');\r\n $id_memo = Arr::get($_POST, 'id_documento');\r\n\r\n $seguimiento = ORM::factory('seguimiento', $id_seg);\r\n if ($seguimiento->loaded()) {\r\n //Freddy Validamos si el memo ya tiene un fucov asignado\r\n \r\n $pvfucov = ORM::factory('pvfucovs')->where('id_memo', '=', $id_memo)->find();\r\n if ($pvfucov->loaded() && $id_tipo==13) {\r\n\r\n $info['info'] = '<b>Mensaje!: </b>El siguiente documento ' . $nur . ' ya tiene asignado un fucov';\r\n $oSeg = New Model_Seguimiento();\r\n $entrada = $oSeg->pendiente($this->user->id);\r\n $carpetas = ORM::factory('carpetas')->where('id_oficina', '=', $this->user->id_oficina)->find_all();\r\n $arrCarpetas = array();\r\n foreach ($carpetas as $c) {\r\n $arrCarpetas[$c->id] = $c->carpeta;\r\n }\r\n $oDoc = New Model_Tipos();\r\n $documentos = $oDoc->misTipos($this->user->id);\r\n $options = array();\r\n foreach ($documentos as $d) {\r\n $options[$d->id] = $d->tipo;\r\n }\r\n $this->template->styles = array('media/css/tablas.css' => 'all', 'media/css/modal.css' => 'screen');\r\n $this->template->title .= ' | Pendientes';\r\n $this->template->content = View::factory('bandeja/pendientes')\r\n ->bind('entrada', $entrada)\r\n ->bind('carpetas', $arrCarpetas)\r\n ->bind('info', $info)\r\n ->bind('options', $options);\r\n } else {\r\n $tipo = ORM::factory('tipos', $id_tipo);\r\n $oOficina = New Model_Oficinas();\r\n $correlativo = $oOficina->correlativo($this->user->id_oficina, $tipo->id);\r\n $abre = $oOficina->tipo($tipo->id);\r\n $sigla = $oOficina->sigla($this->user->id_oficina);\r\n if ($abre != '')\r\n $abre = $abre . '/';\r\n $codigo = $abre . $sigla . ' Nº ' . $correlativo . '/' . date('Y');\r\n //obtenemos el id_proceso del documento original\r\n $proceso = ORM::factory('documentos')->where('nur', '=', $nur)->and_where('original', '=', 1)->find();\r\n\r\n //Modificado por freddy\r\n $odoc = new Model_Documentos();\r\n $odoc->updateEstado($nur);\r\n $memo = ORM::factory('documentos', $id_memo);\r\n $pvcomision = ORM::factory('pvcomisiones')->where('id_documento', '=', $id_memo)->find();\r\n /////////////////////////////////////////////\r\n //generamos el documento\r\n $documento = ORM::factory('documentos');\r\n $documento->id_user = $this->user->id;\r\n $documento->codigo = $codigo;\r\n $documento->cite_original = $codigo;\r\n $documento->id_tipo = $id_tipo;\r\n $documento->nombre_destinatario = $seguimiento->nombre_emisor;\r\n $documento->cargo_destinatario = $seguimiento->cargo_emisor;\r\n $documento->nombre_remitente = $this->user->nombre;\r\n $documento->cargo_remitente = $this->user->cargo;\r\n $documento->mosca_remitente = $this->user->mosca;\r\n if ($fucov == 1 && $id_tipo==13) {\r\n $documento->referencia = $memo->referencia;\r\n }\r\n $documento->fecha_creacion = date('Y-m-d H:i:s');\r\n $documento->nur = $nur;\r\n $documento->id_seguimiento = $id_seg;\r\n $documento->original = 0; //important !! \r\n $documento->id_proceso = $proceso->id_proceso;\r\n $documento->id_oficina = $this->user->id_oficina;\r\n $documento->id_entidad = $this->user->id_entidad;\r\n $documento->fucov = 0;\r\n $documento->save();\r\n\r\n if ($documento->id) {\r\n\r\n //Modificado por freddy\r\n if ($fucov == 1 && $id_tipo==13) {\r\n $entidad = ORM::factory('entidades', $this->user->id_entidad);\r\n \r\n $pvfucov = ORM::factory('pvfucovs');\r\n $pvfucov->id_documento = $documento->id;\r\n $pvfucov->origen = $pvcomision->origen;\r\n $pvfucov->destino = $pvcomision->destino;\r\n $pvfucov->fecha_salida = $pvcomision->fecha_inicio;\r\n $pvfucov->fecha_arribo = $pvcomision->fecha_fin;\r\n $pvfucov->cancelar = $entidad->sigla;\r\n $pvfucov->transporte = 'Aereo';\r\n $pvfucov->representacion = 'No';\r\n $pvfucov->impuesto = 'No';\r\n $pvfucov->id_tipoviaje = 0;\r\n $pvfucov->id_programatica = 0;\r\n $pvfucov->id_memo = $id_memo;\r\n $pvfucov->etapa_proceso = 0;\r\n $pvfucov->tipo_cambio = 0;\r\n $pvfucov->tipo_moneda = 0;\r\n $pvfucov->fecha_creacion = date('Y-m-d H:i:s');\r\n $pvfucov->fecha_modificacion = date('Y-m-d H:i:s');\r\n $pvfucov->estado = 1;\r\n $pvfucov->save();\r\n\r\n if ($pvfucov->id) {\r\n $pvpoas = ORM::factory('pvpoas');\r\n $pvpoas->fecha_creacion = date('Y-m-d H:i:s');\r\n $pvpoas->fecha_modificacion = date('Y-m-d H:i:s');\r\n $pvpoas->id_fucov = $pvfucov->id;\r\n $pvpoas->estado = 1;\r\n $pvpoas->save();\r\n }\r\n }\r\n /////////end////////////\r\n //cazamos al documento con el nur asignado\r\n $rs = $documento->has('nurs', $nur);\r\n $documento->add('nurs', $nur);\r\n $_POST = array();\r\n $this->request->redirect('documento/editar/' . $documento->id);\r\n }\r\n }\r\n } else {\r\n echo 'Error: no se pudo generar el documento';\r\n }\r\n } else {\r\n $this->template->content = View::factory('');\r\n }\r\n }", "function budynekKoncowy(){\r\n\t\t$this->retriveDataRow();\r\n\t\treturn $this->data['id_budynku_koncowego'];\r\n\t}", "function edit_info()\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->DB->simple_construct( array( 'select' => '*', 'from' => 'languages', 'where' => \"lid='\".$this->ipsclass->input['id'].\"'\" ) );\n\t\t$this->ipsclass->DB->simple_exec();\n\n\t\tif ( ! $row = $this->ipsclass->DB->fetch_row() )\n\t\t{\n\t\t\t$this->ipsclass->admin->error(\"Невозможно найти язык по введенному ID\");\n\t\t}\n\n\t\t$final['lname'] = stripslashes($_POST['lname']);\n\n\t\tif (isset($_POST['lname']))\n\t\t{\n\t\t\t$final['lauthor'] = stripslashes($_POST['lauthor']);\n\t\t\t$final['lemail'] = stripslashes($_POST['lemail']);\n\t\t}\n\n\t\t$this->ipsclass->DB->do_update( 'languages', $final, \"lid='\".$this->ipsclass->input['id'].\"'\" );\n\n\t\t$this->rebuild_cache();\n\n\t\t$this->ipsclass->admin->done_screen(\"Языковой модуль обновлен\", \"Управление языками\", \"{$this->ipsclass->form_code}\" );\n\n\t}", "abstract public function getPasiekimai();", "public function actionLaporanBukuRegister() {\n $format = new MyFormatter();\n $model = new PPBukuregisterpasienV(); \n $model->unsetAttributes();\n $model->jns_periode = \"hari\";\n $model->tgl_awal = date('Y-m-d');\n $model->tgl_akhir = date('Y-m-d');\n $model->bln_awal = date('Y-m');\n $model->bln_akhir = date('Y-m');\n $model->thn_awal = date('Y');\n $model->thn_akhir = date('Y');\n\n if (isset($_GET['PPBukuregisterpasienV'])) {\n $model->attributes = $_GET['PPBukuregisterpasienV']; \n $model->jns_periode = $_GET['PPBukuregisterpasienV']['jns_periode'];\n $model->tgl_awal = $format->formatDateTimeForDb($_GET['PPBukuregisterpasienV']['tgl_awal']);\n $model->tgl_akhir = $format->formatDateTimeForDb($_GET['PPBukuregisterpasienV']['tgl_akhir']);\n $model->bln_awal = $format->formatMonthForDb($_GET['PPBukuregisterpasienV']['bln_awal']);\n $model->bln_akhir = $format->formatMonthForDb($_GET['PPBukuregisterpasienV']['bln_akhir']);\n $model->thn_awal = $_GET['PPBukuregisterpasienV']['thn_awal'];\n $model->thn_akhir = $_GET['PPBukuregisterpasienV']['thn_akhir'];\n $bln_akhir = $model->bln_akhir.\"-\".date(\"t\",strtotime($model->bln_akhir));\n $thn_akhir = $model->thn_akhir.\"-\".date(\"m-t\",strtotime($model->thn_akhir.\"-12\"));\n switch($model->jns_periode){\n case 'bulan' : $model->tgl_awal = $model->bln_awal.\"-01\"; $model->tgl_akhir = $bln_akhir; break;\n case 'tahun' : $model->tgl_awal = $model->thn_awal.\"-01-01\"; $model->tgl_akhir = $thn_akhir; break;\n default : null;\n }\n $model->tgl_awal = $model->tgl_awal.\" 00:00:00\";\n $model->tgl_akhir = $model->tgl_akhir.\" 23:59:59\";\n }\n\n $this->render($this->pathViewPP.'bukuRegister/adminBukuRegister', array(\n 'model' => $model, 'format' => $format\n ));\n }", "public function setoran_tunai()\n\t{\n\t\t$data['container'] = 'transaction/setoran_tunai';\n\t\t$data['rembugs'] = $this->model_cif->get_cm_data();\n\t\t$data['current_date'] = $this->format_date_detail($this->current_date(),'id',false,'/');\n\t\t$data['account_cash'] = $this->model_transaction->get_account_cash();\n\t\t$this->load->view('core',$data);\n\t}", "public function dodajformAction()\n {\n $this->params->tryb='Dodawanie';\n $this->template='admin/rabat/form.html.twig';\n $this->params->rabaty=$this->model->lista();\n $this->params->samochody=$this->loadModel('Samochod')->lista();\n }", "function recuperar_contrasenia()\n\t{\n\t\t$opt \t\t= $this->uri->segment(1);\n\t\t$op['opt'] \t\t= $this->data_model->cargarOptimizacion($opt);\n\n\t\t//validacion para identificar tipo de usuario y desglosar info\n\t\t$user\t\t\t\t= $this->session->userdata('user');\n\t\t$op['info']\t\t\t= array();\n\n\t\tif ($user['uid'] != '') {\n\t\t\t$tipo = 'info_'.$user['tipoUsuario'];\n\t\t\t$op['info']\t= $this->data_model->$tipo($user['uid']);\n\t\t}\n\n\t\t//Vista//\n\t\t$this->load->view('recuperarContrasenia-view' ,$op);\n\t}", "public function ctlInventarioNuez () {\n \t//if ($_SERVER[\"REQUEST_METHOD\"] == \"POST\") {\n \t\t//$Respuesta = Datos::mdlInventarioNuez ($_POST[\"producto\"]);\n \t\t$Respuesta = Datos::mdlInventarioNuez ();\n \t\tforeach ($Respuesta as $Row => $item) {\n\t \t\techo \"<tr>\n\t \t\t\t<td>\".$item[\"nombre\"].\"</td>\n\t \t\t\t<td>\".$item[\"calidad\"].\"</td>\n\t \t\t\t<td>\".$item[\"kgs\"].\"</td>\n\t \t\t\t<td>\".$item[\"precioPromedio\"].\"</td>\n\t \t\t</tr>\";\n\t \t}\n\n\n \t//}\n }", "static function View_ChuyenDi(){\r\n\t\techo '<table width=\"100%\" border=\"1px\" cellpadding=\"1px\" style=\"border-collapse:collapse; \t\t margin-bottom:150px; background-color:#e7e7e7\" bordercolor=\"#000000\">\r\n\t\t <tr style=\"color:#087a41\">\r\n\t\t\t <td width=\"20%\">Mã Chuyến</td>\r\n\t\t\t <td width=\"20%\">Tên Chuyến</td>\t\t\t\r\n\t\t\t <td width=\"15%\">Giờ Đi</td>\r\n\t\t\t <td width=\"20%\">Loại Xe</td>\t\r\n\t\t\t <td width=\"10%\">Số Ghế</td>\r\n\t\t\t <td width=\"15%\">Gía Vé</td>\t\r\n\t\t</tr>';\t\t\r\n\t\t\t$row=ChuyenDi::GetAll();\t\r\n\t\t\tfor($i=0;$i<count($row);$i++)\t\t\t\t\t\t\r\n\t\t\t{\r\n\t\t\techo '<tr>\r\n\t\t\t\t\t<td>\r\n\t\t\t\t\t\t'.$row[$i]->MaChuyen.'\r\n\t\t\t\t\t</td>\r\n\t\t\t\t\t<td>\r\n\t\t\t\t\t\t'.$row[$i]->TenTuyen.'\r\n\t\t\t\t\t</td>\r\n\t\t\t\t\t<td>\r\n\t\t\t\t\t\t'.$row[$i]->GioDi.'\t\t\t\t\t\t\r\n\t\t\t\t\t</td>\r\n\t\t\t\t\t<td>\r\n\t\t\t\t\t\t'.$row[$i]->LoaiXe.'\r\n\t\t\t\t\t</td>\t\t\t\t\t\t\r\n\t\t\t\t\t<td>\r\n\t\t\t\t\t\t'.$row[$i]->SoGhe.'\t\t\t\t\t\t\r\n\t\t\t\t\t</td>\r\n\t\t\t\t\t<td>\r\n\t\t\t\t\t\t'.$row[$i]->GiaVe.'\r\n\t\t\t\t\t</td>';\r\n\t\t\t}\t \t\r\n\techo '</table>\r\n\t</form>';\r\n\t\t}", "function habilitarContrato(){\n $this->procedimiento = 'adq.f_cotizacion_ime';\n $this->transaccion = 'ADQ_HABCONT_IME';\n $this->tipo_procedimiento='IME';\n \n //Define los parametros para la funcion\n $this->setParametro('id_cotizacion','id_cotizacion','int4');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "function loadClienteForm(){\n\t\t$this->procedimiento='rec.ft_cliente_ime';\n\t\t$this->transaccion='REC_CLI_GET';//'\n\t\t$this->tipo_procedimiento='IME';//tipo de transaccion\n\n\t\t$this->setParametro('id_cliente','id_cliente','int4');\n\n\t\t$this->captura('v_valor','varchar');\n\t\t$this->captura('genero','varchar');\n\t\t$this->captura('ci','varchar');\n\t\t$this->captura('email','varchar');\n\t\t$this->captura('email2','varchar');\n\t\t$this->captura('direccion','varchar');\n\t\t$this->captura('celular','varchar');\n\t\t$this->captura('nombre','varchar');\n\t\t$this->captura('lugar_expedicion','varchar');\n\t\t$this->captura('apellido_paterno','varchar');\n\t\t$this->captura('telefono','varchar');\n\t\t$this->captura('ciudad_residencia','varchar');\n\t\t$this->captura('id_pais_residencia','int4');\n\t\t$this->captura('nacionalidad','varchar');\n\t\t$this->captura('barrio_zona','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('apellido_materno','varchar');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('usuario_ai','varchar');\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\n\t\t$this->captura('nombre_completo1','text');\n\t\t$this->captura('nombre_completo2','text');\n\t\t$this->captura('pais_residencia','varchar');\n\t\t//Definicion de la lista del resultado del query\n\t\t/*$this->captura('v_id_cliente','int4');\n\t\t$this->captura('v_genero','varchar');\n\t\t$this->captura('v_ci','varchar');\n\t\t$this->captura('v_email','varchar');\n\t\t$this->captura('v_direccion','varchar');\n\t\t$this->captura('v_celular','varchar');\n\t\t$this->captura('v_nombre','varchar');\n\t\t$this->captura('v_lugar_expedicion','varchar');\n\t\t$this->captura('v_apellido_paterno','varchar');\n\t\t$this->captura('v_telefono','varchar');\n\t\t$this->captura('v_ciudad_residencia','varchar');\n\t\t$this->captura('v_id_pais_residencia','int4');\n\t\t$this->captura('v_nacionalidad','varchar');\n\t\t$this->captura('v_barrio_zona','varchar');\n\t\t//$this->captura('estado_reg','varchar');\n\t\t$this->captura('v_apellido_materno','varchar');\n\t\t//$this->captura('id_usuario_ai','int4');\n\t\t//$this->captura('fecha_reg','timestamp');\n\t\t//$this->captura('usuario_ai','varchar');\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\n\t\t$this->captura('v_completo','text');\n\t\t$this->captura('v_nombre_completo2','text');\n\t\t$this->captura('v_pais_residencia','varchar');*/\n\t\t//$this->captura('nombre','varchar');\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}", "public function mostrarInfo(Coche $miObjeto){\n if(is_object($miObjeto)){\n $informacion = \"<h1>Informacion del coche</h1>\";\n $informacion .= \"<br/> Modelo: \".$miObjeto->modelo;\n $informacion .= \"<br/> Color: \".$miObjeto->color;\n $informacion .= \"<br/> Marca: \".$miObjeto->marca;\n $informacion .= \"<br/> Caballos: \".$miObjeto->caballos;\n $informacion .= \"<br/> Velocidad: \".$miObjeto->velocidad;\n $informacion .= \"<br/> Plazas: \".$miObjeto->plazas; \n }else{\n $informacion = \"Tu dato es este: \n $miObjeto\";\n }\n\n\n return $informacion;\n }", "public function informasi()\n {\n //Query untuk mengambil semua data informasi yang diuurutkan berdasarkan tanggal\n $query = $this->db->query(\"SELECT A.tanggal, A.subject, A.pesan, A.id_informasi, C.nama FROM informasi A \n LEFT JOIN karyawan C ON C.nik = A.id_user\n ORDER BY A.tanggal DESC\");\n return $query;\n }", "function consultar_usuario(){\n $this->layout='_layout.perfilUsuario';\n \n if(!empty($_POST)):\n \n $api = new ApiUsuario();\n $this->dados = array(\n 'listBusca' => $api->consultas(new Usuario('POST'))\n );\n \n $this->view(); \n else :\n \n $this->view(); \n endif;\n \n }", "public function mojProfil(){\n $korisnik=$this->session->get('korisnik');\n $this->prikaz('mojProfil', ['korisnik'=>$korisnik]);\n }", "function info()\n{\nglobal $client; ←\u0004\nLa programmation objet\nCHAPITRE 9 249\n//Utilisation de variables globales et d'un tableau superglobal\necho \"<h2> Bonjour $client, vous êtes sur le serveur: \",\n➥$_SERVER[\"HTTP_HOST\"],\"</h2>\"; ←\u0007\necho \"<h3>Informations en date du \",date(\"d/m/Y H:i:s\"),\"</h3>\";\necho \"<h3>Bourse de {$this–>bourse[0]} Cotations de {$this–>bourse[1]}\n➥à {$this–>bourse[2]} </h3>\"; ←\u0005\n//Informations sur les horaires d'ouverture\n$now=getdate();\n$heure= $now[\"hours\"];\n$jour= $now[\"wday\"];\necho \"<hr />\";\necho \"<h3>Heures des cotations</h3>\";\nif(($heure>=9 && $heure <=17)&& ($jour!=0 && $jour!=6))\n{ echo \"La Bourse de Paris ( \", self:: PARIS,\" ) est ouverte\n➥<br>\"; } ←\u0006\nelse\n{ echo \"La Bourse de Paris ( \", self:: PARIS,\" ) est fermée <br>\"; }", "public function accueilAction () {\n\t\t$session = $_SESSION['ident'];\n\t\t$app_title=\"Connexion \" ;\n\t\t$app_body=\"Body_Connecte\" ;\n\t\t$app_desc=\"Comeca\" ;\n\t\t// si l admin est connecté\n\t\t$auth = $this->authModule->estConnecte();\n\t\t// si connecté => redirection vers indexAction de CategorieController \n\t\trequire_once('Model/SqlModel.php');\n\t\t\n\t\t$AttenteModel = new SqlModel();\n\t\t$ListeAttente = $AttenteModel->AfficheEnAttente();\n \n\t\trequire('View/Connecte/accueil.php') ;\n\t}", "public function contarInventario(){\n\t}", "public function getTableAcara(){\r\r\n\t\t$key = 1;\r\r\n\t\tif($this->input->post(\"key\")!==NULL){\r\r\n\t\t\t$key = intval($this->input->post(\"key\"));\r\r\n\t\t\tif($key < 0) $key = 1;\r\r\n\t\t}\r\r\n\t\t$s=true;\r\r\n\t\t$string = \"<h4>Informasi Acara</h4><div class='well'>Data Tidak ditemukan</div>\";\r\r\n\t\t$n = 1;\r\r\n\t\t$z = 1;\r\r\n\t\t$koko = 0;\r\r\n\t\t$this->loadLib('ControlEvent');\r\r\n\t\t$tempKejadian = (new ControlEvent($this->gateControlModel))->getAllData();\r\r\n\t\tif($tempKejadian){\r\r\n\t\t\twhile($tempKejadian->getNextCursor()){\r\r\n\t\t\t\tif($n <= 5 && $z == $key){\r\r\n\t\t\t\t\tif($s){\r\r\n\t\t\t\t\t\t$string = \"<h4>Informasi Acara</h4>\";\r\r\n\t\t\t\t\t\t$s = false;\t\r\r\n\t\t\t\t\t}\t\t\t\r\r\n\t\t\t\t\tif($tempKejadian->getKode() == '1'){\t\r\r\n\t\t\t\t\t\t$string .= \"<div class='well'>\";\r\r\n\t\t\t\t\t\t$string .= $tempKejadian->getJudul().\"<br>\".$tempKejadian->getIsi();\r\r\n\t\t\t\t\t\t//$string .= $tempKejadian->getJudul().\"<br>\".$tempKejadian->getIsi().\" Pada tahun ajaran \".substr($tempKejadian->getTahunAk(),0,strlen($tempKejadian->getTahunAk())-1).\"-\".(intval(substr($tempKejadian->getTahunAk(),0,strlen($tempKejadian->getTahunAk())-1))+1).\" Semester \".$tempKejadian->getTahunAk()[4].\" dimulai pada tanggal \".$tempKejadian->getMulai().\" hingga tanggal \".$tempKejadian->getBerakhir();\r\r\n\t\t\t\t\t\t$string .= \"</div>\";\t\r\r\n\t\t\t\t\t}else{\r\r\n\t\t\t\t\t\t$string .= \"<div class='well'>\";\r\r\n\t\t\t\t\t\t$string .= $tempKejadian->getJudul().\"<br>\".$tempKejadian->getIsi();\r\r\n\t\t\t\t\t\t$string .= \"</div>\";\r\r\n\t\t\t\t\t}\r\r\n\t\t\t\t\t$koko ++;\r\r\n\t\t\t\t\t$n++;\r\r\n\t\t\t\t}else if($n == 5 && $z < $key){\r\r\n\t\t\t\t\t$n = 1;\r\r\n\t\t\t\t\t$z++;\r\r\n\t\t\t\t}else{\r\r\n\t\t\t\t\t$n++;\r\r\n\t\t\t\t}\r\r\n\t\t\t}\r\r\n\t\t}\r\r\n\t\techo \"1\".$string;\r\r\n\t\tif($key == 1){\r\r\n\t\t\tif($koko == 5)\r\r\n\t\t\t\techo '<div class=\"dataTables_paginate paging_two_button\">\r\r\n\t\t\t\t\t\t<a class=\"paginate_disabled_previous\" tabindex=\"0\" role=\"button\" aria-controls=\"DataTables_Table_0\"> Sebelumnya </a>\r\r\n\t\t\t\t\t\t<a class=\"paginate_enabled_next\" tabindex=\"0\" role=\"button\" aria-controls=\"DataTables_Table_0\" onclick=\"nextPageBerandaBase();\"> Sesudahnya </a>\r\r\n\t\t\t\t\t</div>';\r\r\n\t\t\telse\r\r\n\t\t\t\techo '<div class=\"dataTables_paginate paging_two_button\">\r\r\n\t\t\t\t\t\t<a class=\"paginate_disabled_previous\" tabindex=\"0\" role=\"button\" aria-controls=\"DataTables_Table_0\"> Sebelumnya </a>\r\r\n\t\t\t\t\t\t<a class=\"paginate_disabled_next\" tabindex=\"0\" role=\"button\" aria-controls=\"DataTables_Table_0\"> Sesudahnya </a>\r\r\n\t\t\t\t\t</div>';\r\r\n\t\t}else{\r\r\n\t\t\tif($koko == 5)\r\r\n\t\t\t\techo '<div class=\"dataTables_paginate paging_two_button\">\r\r\n\t\t\t\t\t\t<a class=\"paginate_enabled_previous\" tabindex=\"0\" role=\"button\" aria-controls=\"DataTables_Table_0\" onclick=\"previousPageBerandaBase();\"> Sebelumnya </a>\r\r\n\t\t\t\t\t\t<a class=\"paginate_enabled_next\" tabindex=\"0\" role=\"button\" aria-controls=\"DataTables_Table_0\" onclick=\"nextPageBerandaBase();\"> Sesudahnya </a>\r\r\n\t\t\t\t\t</div>';\r\r\n\t\t\telse\r\r\n\t\t\t\techo '<div class=\"dataTables_paginate paging_two_button\">\r\r\n\t\t\t\t\t\t<a class=\"paginate_enabled_previous\" tabindex=\"0\" role=\"button\" aria-controls=\"DataTables_Table_0\" onclick=\"previousPageBerandaBase();\"> Sebelumnya </a>\r\r\n\t\t\t\t\t\t<a class=\"paginate_disabled_next\" tabindex=\"0\" role=\"button\" aria-controls=\"DataTables_Table_0\"> Sesudahnya </a>\r\r\n\t\t\t\t\t</div>';\r\r\n\t\t}\r\r\n\t\t\r\r\n\t}", "public function NotifInformasi()\n\t{\n\t\t$ambil_akun1 = $this->Wali_Kelas_model->ambil_user($this->session->userdata('uname'));\n\t\t$ambil_status = $this->Wali_Kelas_model->ambil_status($this->session->userdata('kode'));\n\t\t$ambil_kelas = $this->Wali_Kelas_model->ambil_kelas($this->input->get('kelas'));\n\t\t$data = array(\n\t\t\t'user1' => $ambil_akun1,\n\t\t\t'status' => $ambil_status,\n\t\t\t'kls' => $ambil_kelas\n\t\t);\n\t\t$data['jumlah']=$this->Wali_Kelas_model->ambil_jumlah($this->session->userdata('uname'));\n\t\t$data['notifInformasi']=$this->Wali_Kelas_model->notifInformasi_Wali();\n\t\t$data['ListNotifInformasi']=$this->Wali_Kelas_model->ListNotifInformasi_Wali();\n\t\t$data['notif'] = $this->Wali_Kelas_model->notifikasiPesan();\n\t\t$data['LihatNotifRespon']=$this->Wali_Kelas_model->LihatNotifRespon_Wali();\n\t\t$data['notifPesan'] = $this->Wali_Kelas_model->notifPesan_Wali();\n\t\t$data['ListnotifPesan'] = $this->Wali_Kelas_model->ListNotifPesan_Wali();\t\n\t\t$this->load->view('Notifikasi/W_NotifInformasi',$data);\n\t}", "private function telaRecuperaSenha() {\n //self::getObjSmarty()->assign(\"POST_LOGIN\",\"?c=\".self::getObjCrypt()->cryptData(\"Login\"));\n //$this->getObjJs()->addJs(FWK_JS.\"validaLogin.js\");\n try {\n //self::getObjHttp()->escreEm(\"RODAPE_LOGIN_ADMIN\",self::getRodapeRecuperaSenha());\n self::getObjHttp()->escreEm(\"CORPO\", self::getTplRecuperaSenha());\n } catch (HtmlException $e) {\n die(\"ViewAdminPage()->telaLogin(): \" . self::getTplRecuperaSenha() . $e->__toString());\n }\n }", "function display($tpl = null){\n\t\t\t\t\n\t\t\t$this->titolo = $this->get('Titolo'); //Prende Titolo dal model attuale tramite il GET\n\n\t\t\t$this->num_giorno_attuale = $this->modelData->getInfo('NumGiornoAttuale');\t\n\t\t\t$this->num_mese_attuale=$this->modelData->getInfo('NumMeseAttuale');\n\t\t\t$this->num_mese_prossimo=$this->modelData->getInfo('NumMeseProssimo');\n\t\t\t$this->mese_attuale = $this->modelData->getInfo('MeseAttuale');\n\t\t\t$this->mese_prossimo = $this->modelData->getInfo('MeseProssimo');\n\t\t\t$this->anno_attuale = $this->modelData->getInfo('AnnoAttuale');\t\n\t\t\t$this->anno_mese_prossimo = $this->modelData->getInfo('AnnoMeseProssimo');\n\t\t\t\n\t\t\t$this->giorni_mese_attuale = $this->modelData->days_in_month($this->num_mese_attuale, $this->anno_attuale);\n\t\t\t$this->giorni_mese_prossimo = $this->modelData->days_in_month($this->num_mese_prossimo, $this->anno_mese_prossimo);\n\t\t\t\n\t\t\t$this->servizi_mese_attuale=$this->modelFunzioni->servizi($this->num_mese_attuale, $this->anno_attuale);\n\t\t\t$this->servizi_mese_prossimo=$this->modelFunzioni->servizi($this->num_mese_prossimo, $this->anno_mese_prossimo);\n\t\t\t\n\t\t\t$this->presenze_mese_attuale=$this->modelOpDB->presenzeServizi($this->num_mese_attuale, $this->anno_attuale);\n\t\t\t$this->presenze_mese_attuale_formattato=$this->modelFunzioni->formattaPresenze($this->presenze_mese_attuale);\n\t\t\t\n\t\t\t$this->presenze_mese_prossimo=$this->modelOpDB->presenzeServizi($this->num_mese_prossimo, $this->anno_mese_prossimo);\n\t\t\t$this->presenze_mese_prossimo_formattato=$this->modelFunzioni->formattaPresenze($this->presenze_mese_prossimo);\n\t\t\t\n\t\t\t$this->note_mese_attuale=$this->modelOpDB->leggiNote($this->num_mese_attuale, $this->anno_attuale);\n\t\t\t$this->note_mese_prossimo=$this->modelOpDB->leggiNote($this->num_mese_prossimo, $this->anno_mese_prossimo);\n\n\t\t\t$Clowns = $this->modelOpDB->leggiElencoClowns();\n\t\t\t$this->nomi = $Clowns['nomi'];\n\t\t\t$this->cognomi = $Clowns['cognomi'];\n\t\t\t$this->nomiClowns = $Clowns['nomiClowns'];\n\t\t\t$this->mail = $Clowns['nomiClowns'];\n\t\t\t\n\t\t\t\n\t\t\t// Check for errors.\n\t\t\tif (count($errors = $this->get('Errors')))\n\t\t\t{\n\t\t\t\tJError::raiseError(500, implode('<br />', $errors));\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\t// Display the view\n\t\t\tparent::display($tpl);\n\t}", "function __toString()\r\n {\r\n return $this->ime .\" \". $this->prezime .\" (\". $this->korisnickoIme .\")\";\r\n }", "public function profilIzmena() {\n echo view(\"profilIzmena\");\n }", "function opcion__info()\n\t{\n\t\t$p = $this->get_proyecto();\n\t\t$param = $this->get_parametros();\n\t\t$this->consola->titulo( \"Informacion sobre el PROYECTO '\" . $p->get_id() . \"' en la INSTANCIA '\" . $p->get_instancia()->get_id() . \"'\");\n\t\t$this->consola->mensaje(\"Version de la aplicación: \".$p->get_version_proyecto().\"\\n\");\n\t\tif ( isset( $param['-c'] ) ) {\n\t\t\t// COMPONENTES\n\t\t\t$this->consola->subtitulo('Listado de COMPONENTES');\n\t\t\t$this->consola->tabla( $p->get_resumen_componentes_utilizados() , array( 'Tipo', 'Cantidad') );\n\t\t} elseif ( isset( $param['-g'] ) ) {\n\t\t\t// GRUPOS de ACCESO\n\t\t\t$this->consola->subtitulo('Listado de GRUPOS de ACCESO');\n\t\t\t$this->consola->tabla( $p->get_lista_grupos_acceso() , array( 'ID', 'Nombre') );\n\t\t} else {\n\t\t\t$this->consola->subtitulo('Reportes');\n\t\t\t$subopciones = array( \t'-c' => 'Listado de COMPONENTES',\n\t\t\t\t\t\t\t\t\t'-g' => 'Listado de GRUPOS de ACCESO' ) ;\n\t\t\t$this->consola->coleccion( $subopciones );\n\t\t}\n\t}", "function clsRecordSeGeUs_mant()\n {\n\n global $FileName;\n $this->Visible = true;\n $this->Errors = new clsErrors();\n $this->ErrorBlock = \"Record SeGeUs_mant/Error\";\n $this->ds = new clsSeGeUs_mantDataSource();\n $this->InsertAllowed = true;\n $this->UpdateAllowed = true;\n $this->DeleteAllowed = true;\n if($this->Visible)\n {\n $this->ComponentName = \"SeGeUs_mant\";\n $CCSForm = split(\":\", CCGetFromGet(\"ccsForm\", \"\"), 2);\n if(sizeof($CCSForm) == 1)\n $CCSForm[1] = \"\";\n list($FormName, $FormMethod) = $CCSForm;\n $this->EditMode = ($FormMethod == \"Edit\");\n $this->FormEnctype = \"application/x-www-form-urlencoded\";\n $this->FormSubmitted = ($FormName == $this->ComponentName);\n $Method = $this->FormSubmitted ? ccsPost : ccsGet;\n $this->lbTitulo = new clsControl(ccsLabel, \"lbTitulo\", \"lbTitulo\", ccsText, \"\", CCGetRequestParam(\"lbTitulo\", $Method));\n $this->usu_login = new clsControl(ccsTextBox, \"usu_login\", \"Usu Login\", ccsText, \"\", CCGetRequestParam(\"usu_login\", $Method));\n $this->usu_login->Required = true;\n $this->usu_Password = new clsControl(ccsTextBox, \"usu_Password\", \"Usu Password\", ccsText, \"\", CCGetRequestParam(\"usu_Password\", $Method));\n $this->usu_Nombre = new clsControl(ccsTextBox, \"usu_Nombre\", \"Usu Nombre\", ccsText, \"\", CCGetRequestParam(\"usu_Nombre\", $Method));\n $this->usu_Grupo = new clsControl(ccsListBox, \"usu_Grupo\", \"Usu Grupo\", ccsText, \"\", CCGetRequestParam(\"usu_Grupo\", $Method));\n $this->usu_Grupo->DSType = dsListOfValues;\n $this->usu_Grupo->Values = array(array(\"10\", \"Usuarios\"), array(\"1000\", \"Supervisor\"), array(\"10000\", \"Administrador\"), array(\"20000\", \"Admin. de Seguridad\"));\n $this->usu_Activo = new clsControl(ccsListBox, \"usu_Activo\", \"Usu Activo\", ccsInteger, \"\", CCGetRequestParam(\"usu_Activo\", $Method));\n $this->usu_Activo->DSType = dsListOfValues;\n $this->usu_Activo->Values = array(array(\"0\", \"Inactivo\"), array(\"1\", \"Activo\"));\n $this->usu_Activo->Required = true;\n $this->usu_PagInicial = new clsControl(ccsTextBox, \"usu_PagInicial\", \"Usu Pag Inicial\", ccsText, \"\", CCGetRequestParam(\"usu_PagInicial\", $Method));\n $this->usu_AuxId = new clsControl(ccsTextBox, \"usu_AuxId\", \"Usu Aux Id\", ccsInteger, \"\", CCGetRequestParam(\"usu_AuxId\", $Method));\n $this->usu_ValidoDesde = new clsControl(ccsTextBox, \"usu_ValidoDesde\", \"Usu Valido Desde\", ccsDate, Array(\"dd\", \"/\", \"mmm\", \"/\", \"yyyy\"), CCGetRequestParam(\"usu_ValidoDesde\", $Method));\n $this->usu_ValidoDesde->Required = true;\n $this->usu_ValidoHasta = new clsControl(ccsTextBox, \"usu_ValidoHasta\", \"Usu Valido Hasta\", ccsDate, Array(\"dd\", \"/\", \"mmm\", \"/\", \"yyyy\"), CCGetRequestParam(\"usu_ValidoHasta\", $Method));\n $this->usu_ValidoHasta->Required = true;\n $this->Button_Insert = new clsButton(\"Button_Insert\");\n $this->Button_Update = new clsButton(\"Button_Update\");\n $this->Button_Delete = new clsButton(\"Button_Delete\");\n $this->Button_Cancel = new clsButton(\"Button_Cancel\");\n $this->btRegresar = new clsButton(\"btRegresar\");\n $this->Button1 = new clsButton(\"Button1\");\n if(!$this->FormSubmitted) {\n if(!is_array($this->usu_Activo->Value) && !strlen($this->usu_Activo->Value) && $this->usu_Activo->Value !== false)\n $this->usu_Activo->SetText(0);\n if(!is_array($this->usu_ValidoDesde->Value) && !strlen($this->usu_ValidoDesde->Value) && $this->usu_ValidoDesde->Value !== false)\n $this->usu_ValidoDesde->SetValue(time());\n if(!is_array($this->usu_ValidoHasta->Value) && !strlen($this->usu_ValidoHasta->Value) && $this->usu_ValidoHasta->Value !== false)\n $this->usu_ValidoHasta->SetText(2005-12-31);\n }\n }\n }", "public function readAllInfo()\n {\n //recupération des données en post\n $data = $this->request->data;\n try\n {\n //selection d'une UE en foction de l'identifiant\n if (!empty($data['id_matiere'])) {\n $results = $this->model->read_all_info_id((int)$data['id_matiere']);\n\n if (empty($results)) {\n $this->_return('la matière demandée n\\'existe pas dans la base de donnée', false);\n }\n $this->_return('Informations sur la matière '.$results->nom_matiere.' ', true, $results);\n }\n //selection de toutes les UE d'enseignement\n $results = $this->model->read_all_info_matiere();\n if (empty($results)) {\n $this->_return('Vous n\\'avez pas encore de matière en base de données', false);\n }\n $this->_return('liste des matières disponibles dans la base de données', true, $results);\n }\n catch(Exception $e)\n {\n $this->_exception($e);\n }\n }", "public function index(){\n $tarjeta_rokys_service=new TarjetaRokysService;\n $tarjeta_rokys=$tarjeta_rokys_service->getFirst();\n if(isset($tarjeta_rokys)){\n $this->datos['codigo_tarjeta']=$tarjeta_rokys;\n $this->getView('registro_cliente');\n }else{\n die('Se agotaron las tarjetas!!....');\n }\n }", "function form_init_elements() \r\n {\r\n //we want an confirmation page for this form.\r\n //$this->set_confirm();\r\n\r\n //Crea una caja de texto llamada nombre y longitud 50\r\n $elemT = new FEText(\"Asunto\", FALSE, 50);\r\n //$elemT->set_style_attribute('align', 'right');\r\n //Le asignamos el id nombre y la tecla de acceso n (ctrl+n)\r\n $elemT->set_attribute(\"id\",\"asunto\");\r\n $elemT->set_attribute(\"accesskey\",\"n\"); \r\n //Añade en el contenedor formulario el elemento creado e inicializado\r\n $this->add_element($elemT);\r\n\t\r\n //Creamos un Area de Texto llamada comentario\r\n $elemTA = new FETextArea(\"Comentario\", FALSE, 10, 60,\"500px\", \"100px\");\r\n $elemTA->set_attribute('wrap', 'physical');\r\n //Le asignamos el id email y la tecla de acceso c (ctrl+c) \r\n $elemTA->set_attribute(\"id\",\"comentario\");\r\n $elemTA->set_attribute(\"accesskey\",\"d\");\r\n //Añade en el contenedor formulario el elemento creado e inicializado\r\n $this->add_element($elemTA);\r\n\r\n //Añade un campo oculto llamado id. En ocasiones este campo se utiliza para indicar ciertas operaciones.\r\n //OJO!! es un punto sensible porque el usuario podría cambiar su valor de forma inexperada para el código.\r\n// $this->add_hidden_element(\"id\");\r\n\r\n //Añade un boton con la acción submit\r\n $submit = $this->_formatElem(\"base_SubmitButton\", \"Aceptar\", \"submit\", agt(\"miguel_Enter\"));\r\n //$submit->set_attribute('id',''); \r\n $submit->set_attribute('accesskey','e'); \r\n $this->add_element($submit); \r\n\t\t\t\t\r\n\t\t\t\t$this->add_hidden_element('status');\r\n \t\t$this->set_hidden_element_value('status', 'new');\r\n }", "public function info($id){\n \n \n $this->_data['s_info']=$s_info = $this->session->userdata('userInfo'); \n // $this->muser->permision(\"mailto\",\"info\");\n \n\n if(is_numeric($id) && $id>0){ \n $this->_data['title'] = \"Chi tiet\";\n $this->_data['info'] = NULL;\n $this->_data[\"record_read\"] = $this->mmailto->countQuery(\"mailto_read = 0 and mailto_status != -1 and mailto_title !='Khách hàng đăng ký nhận mail'\");\n $this->_data[\"record_trash\"] = $this->mmailto->countQuery(\"mailto_read = 0 and mailto_status = -1\"); \n $this->_data['info'] = $this->mmailto->getOnceAnd(array(\"id\"=>$id));\n if($this->_data['info']){\n /**begin cap nhat trang thai*/\n $this->_data['update_status'] = array(\n \"mailto_read\"=>1\n );\n $this->mmailto->update($id,$this->_data['update_status']);\n /**end cap nhat trang thai*/\n }\n $this->my_layout->view(\"backend/mailto/mailto_info_view\",$this->_data);\n }\n }", "public function informacion($Codigo_Cliente = 0, $Proceso = '')\r\n\t{\r\n\t\t\r\n\t\t\r\n\t\tif(0 == $Codigo_Cliente)\r\n\t\t{\r\n\t\t\t$Codigo_Cliente = $this->input->post('cliente');\r\n\t\t\t$Proceso = $this->input->post('proceso');\r\n\t\t}\r\n\t\t\r\n\t\t$Codigo_Cliente = $this->seguridad_m->mysql_seguro($Codigo_Cliente);\r\n\t\t$Proceso = $this->seguridad_m->mysql_seguro($Proceso);\r\n\t\t\r\n\t\t//Necesito el id del proceso\r\n\t\t$this->load->model('procesos/buscar_proceso_m', 'info');\r\n\t\t$Id_Proceso = $this->info->cliente_proceso(\r\n\t\t\t$Codigo_Cliente,\r\n\t\t\t$Proceso\r\n\t\t);\r\n\t\t\r\n\t\tif(0 != count($Id_Proceso))\r\n\t\t{\r\n\t\t\t\r\n\t\t\t$Id_Proceso = $Id_Proceso['id_proceso'];\r\n\t\t\t\r\n\t\t\t//Especificaciones del pedido solicitado\r\n\t\t\t$this->load->model('pedidos/especificacion_informacion_m', 'esp_inf');\r\n\t\t\t$Variables['Ajax'] = $this->esp_inf->ultima($Id_Proceso);\r\n\t\t\t\r\n\t\t\t$Variables['Ajax'] = json_encode($Variables['Ajax']);\r\n\t\t\t\r\n\t\t\t$this->load->view('ajax_v', $Variables);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}", "public function Consultar(){\n require_once 'view/include/cabecera_usuario.php';\n require_once 'view/mostrar_estadobien.php';\n require_once 'view/include/pie_mostrar.php';\n }", "function act_tipo_entrada(){\n\t\t$u= new Tipo_entrada();\n\t\t$related = $u->from_array($_POST);\n\n\t\t// save with the related objects\n\t\tif($u->save($related))\n\t\t{\n\t\t\techo \"<html> <script>alert(\\\"Se han actualizado los datos del Tipo de Entrada.\\\"); window.location='\".base_url().\"index.php/inicio/acceso/\".$GLOBALS['ruta'].\"/menu';</script></html>\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tshow_error(\"\".$u->error->string);\n\t\t}\n\t}", "public function cercaDaNome(){\n if(($_SERVER['REQUEST_METHOD']==\"POST\")){\n $view = new VRisultati();\n $nome = $view->recuperaNome(); //nome inserito nella barra di ricerca\n $pm = FPersistentManager::getInstance();\n $ricette = $pm->search(\"ricetta\", $nome, \"nome\");\n if($ricette!=null){\n $msg = \"\";\n } else {\n $msg = \"Non ci sono ricette che soddisfano questi parametri\";\n }\n $view->mostraRisultati($ricette, $msg);\n\n }\n else{\n header('HTTP/1.1 405 Method Not Allowed');\n header('Allow: POST');\n }\n\n\n }", "public function actionDaftar()\n {\n\n $modelSignupForm = new SignupForm();\n $model = new Capil();\n if ($model->load(Yii::$app->request->post())) {\n\n $params = [\n \"nik\"=>$model->capil_nik,\n \"user_id\"=>\"1010201912196devi\",\n \"password\"=>\"acxkom1377\",\n \"ip_user\"=>Yii::$app->getRequest()->getUserIP(),\n ];\n $curl = new \\linslin\\yii2\\curl\\Curl();\n $apiUrl = 'http://180.250.53.159:8080/dukcapil/get_json/13-77/1377_diskominfo/adm_desa';\n $getAPI = $curl->setRequestBody(json_encode($params))\n ->setHeaders([\n 'Content-Type' => 'application/json; charset=UTF-8',\n ])\n ->post($apiUrl);\n $rest = json_decode($getAPI,true);\n\n $dataPenduduk = $rest['content'][0];\n$carinik = Capil::findOne(['capil_nik'=>$dataPenduduk['NIK']]);\n// var_dump($carinik);die();\n\n if (count($dataPenduduk) == 33 and $dataPenduduk['NO_KAB'] == 77 and !$carinik) {\n // var_dump(\n // if(!$carinik){\n $model->capil_nik = $dataPenduduk['NIK'];\n $model->capil_nama_lgkp = $dataPenduduk['NAMA_LGKP'];\n $model->capil_jenis_klmin = $dataPenduduk['JENIS_KLMIN'];\n $model->capil_tmpt_lhr = $dataPenduduk['TMPT_LHR'];\n $model->capil_tgl_lhr = $dataPenduduk['TGL_LHR'];\n $model->capil_no_akta_lhr = $dataPenduduk['NO_AKTA_LHR'];\n $model->capil_gol_darah = $dataPenduduk['GOL_DARAH'];\n $model->capil_agama = $dataPenduduk['AGAMA'];\n $model->capil_status_kawin = $dataPenduduk['STATUS_KAWIN'];\n $model->capil_tgl_kwn = $dataPenduduk['TGL_KWN'];\n $model->capil_no_akta_kwn = $dataPenduduk['NO_AKTA_KWN'];\n $model->capil_tgl_crai = $dataPenduduk['TGL_CRAI'];\n $model->capil_no_akta_crai = $dataPenduduk['NO_AKTA_CRAI'];\n $model->capil_pddk_akh = $dataPenduduk['PDDK_AKH'];\n $model->capil_jenis_pkrjn = $dataPenduduk['JENIS_PKRJN'];\n $model->capil_stat_hbkel = $dataPenduduk['STAT_HBKEL'];\n $model->capil_no_kk = $dataPenduduk['NO_KK'];\n $model->capil_alamat = $dataPenduduk['ALAMAT'];\n $model->capil_dusun = $dataPenduduk['DUSUN'];\n $model->capil_no_rt = $dataPenduduk['NO_RT'];\n $model->capil_no_rw = $dataPenduduk['NO_RW'];\n $model->capil_no_kel = $dataPenduduk['NO_KEL'];\n $model->capil_no_kec = $dataPenduduk['NO_KEC'];\n $model->capil_no_kab = $dataPenduduk['NO_KAB'];\n $model->capil_no_prop = $dataPenduduk['NO_PROP'];\n $model->capil_kel_name = $dataPenduduk['KEL_NAME'];\n $model->capil_kec_name = $dataPenduduk['KEC_NAME'];\n $model->capil_kab_name = $dataPenduduk['KAB_NAME'];\n $model->capil_prop_name = $dataPenduduk['PROP_NAME'];\n $model->capil_nik_ayah = $dataPenduduk['NIK_AYAH'];\n $model->capil_nama_lgkp_ayah = $dataPenduduk['NAMA_LGKP_AYAH'];\n $model->capil_nik_ibu = $dataPenduduk['NIK_IBU'];\n $model->capil_nama_lgkp_ibu = $dataPenduduk['NAMA_LGKP_IBU'];\n $model->capil_dateinput = date('Y-m-d H:i:s');\n $model->capil_ip = Yii::$app->getRequest()->getUserIP();\n // );die;\n $model->save(false);\n // - - - - - - - - - - -\n\n\n // }\n\n Yii::$app->session->setFlash('msg', '\n <div class=\"alert alert-success alert-dismissable\">\n <button aria-hidden=\"true\" data-dismiss=\"alert\" class=\"close\" type=\"button\">×</button>\n <strong>Anda Sukses! </strong> Data ditemukan dan disimpan.</div>'\n );\n\n // return $this->render('view', [\n // 'model' => $this->findModel($id),\n // ]);\n // return $this->redirect(['capil', 'id' => $model->capil_id]);\n // return $this->redirect(['view', 'id' => $model->capil_id]);\n }\n\n \n\n elseif($dataPenduduk['NO_KAB'] !== 77){\n // var_dump(!$dataPenduduk['NO_KAB'] == 77);die();\n Yii::$app->session->setFlash('danger', 'NIK Anda tidak terdaftar di Kota pariaman'); \n }\n elseif($carinik==true){\n // var_dump($carinik);die();\n Yii::$app->session->setFlash('msg', '\n <div class=\"alert alert-success alert-dismissable\">\n <button aria-hidden=\"true\" data-dismiss=\"alert\" class=\"close\" type=\"button\">×</button>\n <strong>NIK ANDA SUDAH TERDAFTAR! </strong> Data ditemukan dan telah disimpan.</div>'\n );\n// var_dump(->capil_nama_lgkp);die();\n return $this->render('capil', [\n 'model' => $carinik,\n ]);\n }elseif (count($dataPenduduk) == 2) {\n Yii::$app->session->setFlash('msg', '\n <div class=\"alert alert-warning alert-dismissable\">\n <button aria-hidden=\"true\" data-dismiss=\"alert\" class=\"close\" type=\"button\">×</button>\n <strong>Kuota Pencarian Habis! </strong>...Waktu Selesai...</div>'\n );\n \n }\n \n\n }\n \n \n\n return $this->render('daftarakun', [\n 'model' => $model,\n 'modelSignup' => $modelSignupForm,\n ]);\n }", "function berita_tanggungjwb(){\n\t\tcek_session_admin();\n\t\t$data['berita'] = $this->model_tanggungjwb->berita_tanggungjwb();\n\n\t\t$this->load->view('administrator/mod_berita_tanggungjwb/view_tanggungjwb',$data);\n\t}", "public function actionMasaze_i_tretmani()\n\t{\n\t $this->getLang();\n\t\t$this->base('masaze_i_tretmani');\n $this->naslovStranice = 'Masaže i Tretmani';\n\t\t$this->render('clanak');\n \n\t}", "public function index(){\n\t\t$data=array();\n\t\t$data['paquete']=$this->paquete->get_info();\n\n\t\t$this->load->view('administrador/teleoperacion',$data);\n\t}", "public function actionFindIdentificacion2()\n {\n $data = Usuario::model()->find(\"tipo_documento =\".$_POST['tipo_documento'].\" AND cedula = '\".$_POST['identificacion'].\"'\");\n if(count($data)!= 0){\n $id_usuario = $data->id_usuario_sistema;\n ?>\n \n <div class=\"row\">\n <div class=\"col-md-4\">\n <center>\n <?php\n $host= $_SERVER[\"HTTP_HOST\"];\n $url= $_SERVER[\"REQUEST_URI\"];\n $urlParte = \"http://\".$host.\"/images/usuario/\".$data->img;\n ?>\n <img style=\"border-style: solid ; border-width: 2px; height: 220px; width: 220px;\" src=\"<?php echo $urlParte;?>\" alt=\"...\" class=\"img-responsive img-circle img-thumbnail\">\n </center>\n </div>\n <div class=\"col-md-8\">\n <table class=\"table table-hover\">\n <tr>\n <td>\n <center>\n <strong>\n <?php echo __('Name:'); ?>\n </strong>\n </center>\n </td>\n <td>\n <?php\n echo $data->primer_nombre.\" \".$data->primer_apellido;\n ?>\n </td>\n </tr>\n <tr>\n <td>\n <center>\n <strong>\n <?php echo __('Email:'); ?>\n </strong>\n </center>\n </td>\n <td>\n <?php\n echo $data->correo;\n ?>\n </td>\n </tr>\n <tr>\n <td>\n <center>\n <strong>\n <?php echo __('Identification:'); ?>\n </strong>\n </center>\n </td>\n <td>\n <?php\n echo $data->correo;\n ?>\n </td>\n </tr>\n <tr>\n <td>\n <center>\n <strong>\n <?php echo __('Number of Identification:'); ?>\n </strong>\n </center>\n </td>\n <td>\n <?php\n echo $data->cedula;\n ?>\n </td>\n </tr>\n <tr>\n <td>\n <center>\n <strong>\n <?php echo __('Birthdate:'); ?>\n </strong>\n </center>\n </td>\n <td>\n <?php\n echo $data->anio.\"/\".$data->mes.\"/\".$data->dia;\n ?>\n </td>\n </tr>\n </table>\n </div>\n </div>\n <hr>\n <h3><?php echo __('Competitor pass'); ?></h3>\n \n <div class=\"row\">\n <div class=\"col-sm-12 col-md-12\">\n <div class=\"panel panel-default\">\n <div class=\"panel-heading\"><?php echo __('List of Registrations Registered by the user'); ?></div>\n <div class=\"panel-body\">\n\n <div class=\"table-responsive\">\n\n <table style=\" width: 100%;\" id=\"example\" class=\"table table-hover\" cellspacing=\"0\">\n <thead>\n <tr class=\"warning\" >\n <td><center><strong>ID Pass</strong></center></td>\n <td><center><strong><?php echo __('Pass'); ?></strong></center></td>\n <td><center><strong><?php echo __('Status'); ?></strong></center></td>\n </tr>\n </thead>\n <tbody>\n <?php\n $pagos = Pago::model()->findAll('id_tipo_pago = 1 AND id_usuario ='.$id_usuario);\n foreach ($pagos as $pago){\n ?>\n <tr>\n <td>\n <center><?php echo $pago->id_pago; ?></center>\n </td>\n <td>\n <center><?php echo __('Pass Competitor'); ?></center>\n </td>\n <td>\n <center>\n <?php \n if($pago->id_pago_estatus == 1){ echo __('For paying'); }\n if($pago->id_pago_estatus == 2){ echo __('Confirmed'); }\n if($pago->id_pago_estatus == 3){ echo __('Rejected'); }\n if($pago->id_pago_estatus == 4){ echo __('On hold'); }\n ?>\n </center>\n </td>\n </tr>\n <?php\n }\n ?>\n </tbody>\n </table>\n\n </div>\n </div>\n </div>\n </div>\n </div>\n \n \n <hr>\n <h3><?php echo __('List of registrations'); ?></h3>\n <br>\n <!--=============================================================================-->\n <!-- 1\n <!--=============================================================================-->\n <div class=\"row\">\n <div class=\"col-sm-12 col-md-12\">\n <div class=\"panel panel-default\">\n <div class=\"panel-heading\"><?php echo __('List of Registrations Registered by the user'); ?></div>\n <div class=\"panel-body\">\n\n <div class=\"table-responsive\">\n\n <table style=\" width: 100%;\" id=\"example\" class=\"table table-hover\" cellspacing=\"0\">\n <thead>\n <tr class=\"warning\" >\n <td><center><strong>Id registration</strong></center></td>\n <td><center><strong><?php echo __('Competition'); ?></strong></center></td>\n <td><center><strong><?php echo __('Category'); ?></strong></center></td>\n <td><center><strong><?php echo __('Kind'); ?></strong></center></td>\n <td><center><strong><?php echo __('Group'); ?></strong></center></td>\n <td><center><strong><?php echo __('Participants'); ?></strong></center></td>\n <td><center><strong><?php echo __('Audio'); ?></strong></center></td>\n <td><center><strong><?php echo __('Validations'); ?></strong></center></td>\n <td><center><strong><?php echo __('Round'); ?></strong></center></td>\n <td><center><strong><?php echo __('Date of the round'); ?></strong></center></td>\n <td><center><strong><?php echo __('Competition time'); ?></strong></center></td>\n </tr>\n </thead>\n <tbody>\n <?php\n $inscripciones = Inscripcion::model()->findAll('id_usuario ='.$id_usuario);\n function validacion($tipo){\n if($tipo == 1){\n echo \"Si\";\n }\n if($tipo == 0){\n echo \"No\";\n }\n }\n foreach ($inscripciones as $inscripcion){\n ?>\n <tr>\n <td><center><?php echo $inscripcion->id_inscripcion; ?></center></td>\n <td><center><?php echo $inscripcion->idCopetencia->competencia; ?></center></td>\n <td><center><?php echo $inscripcion->idCategoria->categoria; ?></center></td>\n <td>\n <center>\n <?php\n if($inscripcion->id_competencia_tipo == 1){\n echo \"Solista\";\n $grupo = \"-\";\n\n }\n if($inscripcion->id_competencia_tipo == 2){\n echo \"Pareja\";\n $grupo = \"-\";\n }\n if($inscripcion->id_competencia_tipo == 3){\n echo \"Grupo\";\n $grupo = $inscripcion->grupo;\n }\n\n ?>\n </center>\n </td>\n <td><center><?php echo $grupo ?></center></td>\n <td>\n <!--<center>-->\n <?php \n $participantes = Participante::model()->findAll('id_inscripcion ='.$inscripcion->id_inscripcion);\n if(count($participantes) != 0){\n ?><ul><?php\n foreach ($participantes as $participante){\n ?><li><?php echo $participante->idUsuario->primer_nombre.\" \".$participante->idUsuario->primer_apellido; ?></li><?php\n }\n ?></ul><?php\n }else{\n echo \"<center>0 participantes</center>\";\n }\n ?>\n <!--</center>-->\n </td>\n <td><center><?php echo $inscripcion->audio; ?></center></td>\n <td>\n <!--<center>-->\n <ul>\n <li>\n Acreditado: <?php echo validacion($inscripcion->acreditado); ?>\n </li>\n <li>\n Validado: <?php echo validacion($inscripcion->validado); ?>\n </li>\n <li>\n Musica validada: <?php echo validacion($inscripcion->musica_validada); ?>\n </li>\n <li>\n Orde de Participación: <?php echo $inscripcion->orden; ?>\n </li>\n </ul>\n <!--</center>-->\n </td>\n <td><center>\n <?php \n if(!$inscripcion->ronda){\n echo __('Round not assigned');\n }else{\n if($inscripcion->ronda == 1){\n echo __('Final');\n }\n if($inscripcion->ronda == 2){\n echo __('Semifinal');\n }\n if($inscripcion->ronda == 3){\n echo __('Play off');\n }\n }\n ?>\n </center></td>\n <td><center>\n <?php \n if(!$inscripcion->ronda){\n echo __('Round not assigned');\n }else{\n echo $inscripcion->idRonda->fecha_inicio.\" / \".$inscripcion->idRonda->fecha_final;\n //echo $inscripcion->idRonda->fecha_inicio.\" / \".$inscripcion->idRonda->fecho_inicio;\n }\n ?>\n </center></td><td><center>\n <?php \n if(!$inscripcion->ronda){\n echo __('Round not assigned');\n }else{\n $categoria = CompetenciaCategoria::model()->find('id_copetencia = 47 AND id_categoria ='.$inscripcion->id_categoria);\n echo $categoria->hora.\":\".$categoria->minuto;\n }\n ?>\n </center></td>\n\n </tr>\n <?php\n }\n ?>\n </tbody>\n </table>\n\n </div>\n </div>\n </div>\n </div>\n </div>\n \n <div class=\"row\">\n <div class=\"col-sm-12 col-md-12\">\n <div class=\"panel panel-danger\">\n <div class=\"panel-heading\"><?php echo __('List of Registrations where you participate'); ?></div>\n <div class=\"panel-body\">\n\n <div class=\"table-responsive\">\n\n <table style=\" width: 100%;\" id=\"example2\" class=\"table table-hover\" cellspacing=\"0\">\n <thead>\n <tr class=\"warning\" >\n <td><center><strong><?php echo __('Participant ID'); ?></strong></center></td>\n <td><center><strong><?php echo __('ID Registration'); ?></strong></center></td>\n <td><center><strong><?php echo __('Competition'); ?></strong></center></td>\n <td><center><strong><?php echo __('Category'); ?></strong></center></td>\n <td><center><strong><?php echo __('Kind'); ?></strong></center></td>\n <td><center><strong><?php echo __('Group'); ?></strong></center></td>\n <td><center><strong><?php echo __('Competitor'); ?></strong></center></td>\n <td><center><strong><?php echo __('Round'); ?></strong></center></td>\n <td><center><strong><?php echo __('Date of the round'); ?></strong></center></td>\n <td><center><strong><?php echo __('Competition time'); ?></strong></center></td>\n </tr>\n </thead>\n <tbody>\n <?php\n $participantes = Participante::model()->findAll('id_usuario ='.$id_usuario);\n foreach ($participantes as $participante){\n ?>\n <tr>\n <td><center><?php echo $participante->id_participante; ?></center></td>\n <td><center><?php echo $participante->id_inscripcion; ?></center></td>\n <td><center><?php echo $participante->idCompetencia->competencia; ?></center></td>\n <td><center><?php echo $participante->idCategoria->categoria; ?></center></td>\n <td>\n <center>\n <?php\n if($participante->idInscripcion->id_competencia_tipo == 1){\n echo \"Solista\";\n $grupo = \"-\";\n\n }\n if($participante->idInscripcion->id_competencia_tipo == 2){\n echo \"Pareja\";\n $grupo = \"-\";\n }\n if($participante->idInscripcion->id_competencia_tipo == 3){\n echo \"Grupo\";\n $grupo = $participante->idInscripcion->grupo;\n }\n ?>\n </center>\n </td>\n <td><center><?php echo $grupo; ?></center></td>\n <td><center><?php echo $participante->idUsuario->primer_nombre.\" \".$participante->idUsuario->primer_apellido; ?></center></td>\n <td><center>\n <?php \n if(!$inscripcion->ronda){\n echo __('Round not assigned');\n }else{\n if($inscripcion->ronda == 1){\n echo __('Final');\n }\n if($inscripcion->ronda == 2){\n echo __('Semifinal');\n }\n if($inscripcion->ronda == 3){\n echo __('Play off');\n }\n }\n ?>\n </center></td>\n <td><center>\n <?php \n if(!$inscripcion->ronda){\n echo __('Round not assigned');\n }else{\n echo $inscripcion->idRonda->fecha_inicio.\" / \".$inscripcion->idRonda->fecha_final;\n //echo $inscripcion->idRonda->fecha_inicio.\" / \".$inscripcion->idRonda->fecho_inicio;\n }\n ?>\n </center></td><td><center>\n <?php \n if(!$inscripcion->ronda){\n echo __('Round not assigned');\n }else{\n $categoria = CompetenciaCategoria::model()->find('id_copetencia = 47 AND id_categoria ='.$inscripcion->id_categoria);\n echo $categoria->hora.\":\".$categoria->minuto;\n }\n ?>\n </center></td>\n \n </tr>\n <?php\n }\n\n\n ?>\n </tbody>\n </table>\n\n </div>\n </div>\n </div>\n </div>\n </div>\n \n \n \n <?php\n }else{\n ?>\n <div class=\"alert alert-danger\">\n <b><?php echo __('This user does not exist in our data base.'); ?></b>\n </div>\n <?php\n }\n }", "function userInfo($id){\n\t$server = new Database_access();\n\t$user = $server->getInformation($id);\n\t$status = -1;\n\tif($user['postaveni'] == 0){\n\t\t$status = \"zaměstnanec\";\n\t}\n\telse{\n\t\t$status = \"správce\";\n\t}\n\n\t$mail;\n\t$phone;\n\n\tif(!(isset($user['telefon']))){\n\t\t$phone = \"N/A\";\n\t}\n\telse{\n\t\t$phone = $user['telefon'];\n\t}\n\n\tif(!(isset($user['email']))){\n\t\t$mail = \"N/A\";\n\t}\n\telse{\n\t\t$mail = $user['email'];\n\t}\n\n\t$wealth = $server->getWealth($_SESSION['pobocka']);\n\t?>\t\n\t<div class=\"info\">\n\t\tUživatel: <? echo $user['jmeno'];echo \" \"; echo $user['prijmeni']; ?><br>\n\t\tLogin: <? echo $_SESSION['user']; ?><br>\n\t\tEmail: <? echo $mail; ?><br>\n\t\tTelefon: <? echo $phone; ?><br>\n\t\tStatus: <? echo $status; ?><br>\n\t\tPobočka: <? echo $user['pobocka']; ?><br>\n\t\t<?php\n\t\tif($user['postaveni'] == 1){\n\t\t\t?>\n\t\t\tPeněz na pobočce: <?echo $wealth;?> Kč<br>\n\t\t\t<?php\n\t\t}\n\t\t?>\n\t</div>\n\t<br>\n\t<form action=\"account.php\" method=\"get\">\n\t\t<button id=\"account\" class=\"userButton\" type=\"submit\">Správa účtu</button>\n\t</form>\t\n\t<form action=\"logout.php\" method=\"get\">\n\t\t<button id=\"logout\" class=\"userButton\" type=\"submit\">Odhlásit se</button>\n\t</form>\n\t<?php\t\n}", "public function luu_tt_sanpham()\n\t\t{\n\t\t\t//lay du lieu tu view \n\t\t\tif (isset($_POST['tensanpham'])&& isset($_POST['tenloaisanpham'])&& isset($_POST['img'])&& isset($_POST['mota'])&& isset($_POST['baohanh'])&& isset($_POST['gia'])){\n\t\t\t\t//goi ham luu data cua model san pham\n\t\t\t\t$this->tensanpham = $_POST['tensanpham'];\n\t\t\t\t$this->id_loaisp = $_POST['tenloaisanpham'];\n\t\t\t\t$this->img = $_POST['img'];\n\t\t\t\t$this->mota = $_POST['mota'];\n\t\t\t\t$this->baohanh = $_POST['baohanh'];\n\t\t\t\t$this->gia = $_POST['gia'];\n\t\t\t\t//goi ham luu data cua model sanpham\n\t\t\t\t$kq = $this->sanpham_model->insert_sanpham($this->tensanpham,$this->id_loaisp,$this->img,$this->mota,$this->baohanh,$this->gia);\n\t\t\t\tif ($kq) {\n\t\t\t\t\techo 'luu du lieu thanh cong -- sanphamcontroller';\n\t\t\t\t} else {\n\t\t\t\t\techo'luu du lieu that bai -- sanphamcontroller';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\techo 'ban chua nhap du lieu -- sanphamcontroller';\n\t\t\t}\t\t\t\n\t\t}", "public function index(){\n\t\t\t//$nombre=$this->articuloModelo->obtenerDatos();\n\t\t\t$PersonasRequest=$this->Personas->MostrarPersonas();\n\t\t\t//$PersonasR=$this->Personas->Insertar();\n\t\t\t$datos=[\n\t\t\t'Valores'=> 'Bienvenido',\n\t\t\t'Personas' => $PersonasRequest\n\t\t\t];\n\t\t\t$this->vista(\"PersonasV\",$datos);\n\n\t\t}", "public function administrarsuscripcion($leng) {\r\n if (Auth::is_valid()) {\r\n if (Auth::get(\"rol_usu\") == \"cliente\") {\r\n $this->leng = $leng;\r\n $this->estado_sol = \"1\";\r\n $datos_cliente = new cliente();\r\n $id_cliente = Auth::get(\"id\");\r\n\r\n if ($datos_cliente->find_by_sql(\"select * from cliente where id_usu=\" . $id_cliente)) {\r\n //*********************************\r\n //Se obtienen los datos del cliente\r\n //*********************************\r\n $this->nombre_cli = $datos_cliente->nombre_cli;\r\n $this->nombre_usu = $datos_cliente->nombre_usu;\r\n $this->rut_usu = $datos_cliente->rut_usu;\r\n $this->rut_cli = $datos_cliente->rut_cli;\r\n $this->nombre_usu = $datos_cliente->nombre_usu;\r\n $this->giro_cli = $datos_cliente->giro_cli;\r\n $this->telefono_cli = $datos_cliente->telefono_cli;\r\n $this->tipo_plan = $datos_cliente->tipo_plan;\r\n $this->ini_sus = $datos_cliente->fecha_ini_sus;\r\n\r\n $tipo_plan = $datos_cliente->tipo_plan;\r\n //$this->fin_sus = $datos_cliente->fecha_fin_sus;\r\n //En caso de que el plan sea free se muestra el mensaje indefinido\r\n $fin = $datos_cliente->fecha_fin_sus;\r\n if ($fin == \"\") {\r\n $this->fin_sus = \"Indefinido\";\r\n } else {\r\n $this->fin_sus = $datos_cliente->fecha_fin_sus;\r\n }\r\n //Fin mensaje indefinido\r\n //*********************************\r\n //Fin obtencion datos del cliente\r\n //*********************************\r\n //\r\n //******************************************************************\r\n //Se obtienen los datos de la solicitud aceptada asociada al cliente\r\n //******************************************************************\r\n $datos_solicitud = new solicitud();\r\n $datos_solicitud->solicitud_aceptada($id_cliente); // obtengo los datos de la solicitud\r\n\r\n $this->fecha_solicitud = $datos_solicitud->fecha_sol;\r\n $this->observaciones = $datos_solicitud->observaciones_sol;\r\n $this->id_solicitud = $datos_solicitud->id;\r\n //******************************************************************\r\n //Fin obtencion datos de la solicitud aceptada asociada al cliente\r\n //****************************************************************** \r\n // \r\n //////////////////////////////////////////////////////////////////////////////////////// \r\n /////////////////////////////////////////////////////////////////////////////////////// \r\n /////////////////////////////////MODULO DE RENOVACIÓN///////////////////////////////// \r\n /////////////////////////////////////////////////////////////////////////////////////\r\n ////////////////////////////////////////////////////////////////////////////////////\r\n // \r\n //**************************************\r\n //Para poder mostar el boton de renovar\r\n //**************************************\r\n //Se revisa que el tipo de plan sea normal o plus\r\n if ($tipo_plan != \"free\") {\r\n date_default_timezone_set('America/Santiago');\r\n //Se obtiene la fecha actual\r\n $fecha_actual = date(\"Y-m-d\");\r\n\r\n $comprobar = new solicitud(); // sirve para validar que no exista otra solicitud de renovacion\r\n //Se obtiene la fecha del fin suscripcion\r\n $fecha_fin_suscripcion = $datos_cliente->fecha_fin_sus;\r\n //Flash::info($fecha_actual.\" \".$fecha_fin_suscripcion);\r\n //Paso el dia, mes y año para poder comprarlos despues\r\n //list($ano, $mes, $dia) = explode('-', $fecha_fin_suscripcion);\r\n //Se valida de que se cumpla las condiciones de fecha y de que no exista otra solicitud de renovacion\r\n if ($fecha_fin_suscripcion <= $fecha_actual && !$comprobar->solicitud_renovacion($id_cliente)) {\r\n // se se cumple las condiciones el boton puede ser mostrado\r\n $this->muestra_boton = \"Si\";\r\n $this->estado_sol = \"1\";\r\n } else {\r\n $this->noexiste = \"<center><b>Todav&iacute;a no cumple los requisitos de renovaci&oacute;n</b></center>\";\r\n $this->estado_sol = \"1\";\r\n }\r\n\r\n //******************\r\n //Fin boton renovar\r\n //******************\r\n //\r\n //************************************************************\r\n //Leyendas y panel de administracion de la nueva solicitud de \r\n //administracion, cuando el boton renovar no aparece despues de haber \r\n //mandado la solicitud de renovacion\r\n //************************************************************\r\n\r\n $leyendas = new solicitud();\r\n if ($leyendas->solicitud_renovacion($id_cliente)) {\r\n //Se obtienen los datos de la solicitud renovacion, para poder mostrar el panel de administracion de la misma\r\n\r\n $this->panel_suscripcion_renovacion = $leyendas->tipo_sol;\r\n $this->estado_sol = $leyendas->estado_sol;\r\n $this->fecha_sol = $leyendas->fecha_sol;\r\n $this->observaciones_sol = $leyendas->observaciones_sol;\r\n $this->id_usu = $leyendas->id_usu;\r\n $this->mail_sol = $leyendas->mail_sol;\r\n } else {\r\n //$this->existe =\"<center><b>Ya tiene una solicitud de renovacion pendiente</b></center>\";\r\n $this->estado_sol = \"1\";\r\n }\r\n //************************************************\r\n //Fin leyendas cuando el boton renovar no aparece\r\n //************************************************\r\n //////////////////////////////////////////////////////////////////////////////////////// \r\n /////////////////////////////////////////////////////////////////////////////////////// \r\n ///////////////////////////////FIN MODULO DE RENOVACIÓN/////////////////////////////// \r\n /////////////////////////////////////////////////////////////////////////////////////\r\n //////////////////////////////////////////////////////////////////////////////////// \r\n } else if ($tipo_plan == \"free\") {\r\n //////////////////////////////\r\n //////MODULO CAMBIO PLAN/////\r\n ////////////////////////////\r\n $solicitud_cambio_existe = new solicitud;\r\n\r\n if ($solicitud_cambio_existe->verifica_solicitud_cambio(Auth::get(\"id\"))) {\r\n $this->activacion_panel_cambio_plan = \"No mostrar\";\r\n $this->estado = $solicitud_cambio_existe->estado_sol;\r\n $this->mail = $solicitud_cambio_existe->mail_sol;\r\n } else {\r\n $this->activacion_panel_cambio_plan = \"Mostrar\";\r\n }\r\n //////////////////////////////////\r\n //////FIN MODULO CAMBIO PLAN/////\r\n ////////////////////////////////\r\n }\r\n } else {\r\n Flash::info('No tiene suscripci&oacute;n activa');\r\n Router::redirect(\"cliente/ingresarsolicitud\");\r\n }\r\n } else {\r\n Flash::info('No posee los privilegios necesarios');\r\n Router::redirect(\"/\");\r\n }\r\n } else {\r\n Flash::info('Debe iniciar sesión');\r\n Router::redirect(\"/\");\r\n }\r\n }" ]
[ "0.6672369", "0.6474163", "0.6429142", "0.6280648", "0.6123156", "0.6059062", "0.6056225", "0.6026287", "0.60177565", "0.60066414", "0.59362423", "0.59180117", "0.59161174", "0.58974016", "0.5894266", "0.5869622", "0.58601516", "0.5819736", "0.58151096", "0.5803979", "0.57835543", "0.57803994", "0.5780266", "0.57782865", "0.57740307", "0.5771828", "0.5759118", "0.57527643", "0.5752367", "0.57452804", "0.57427937", "0.57304484", "0.5729125", "0.5728617", "0.5726536", "0.57234603", "0.5720397", "0.57085866", "0.57069105", "0.570594", "0.5704729", "0.5704262", "0.570319", "0.56951517", "0.5694939", "0.56929696", "0.5685863", "0.5683452", "0.56770146", "0.5676548", "0.56763655", "0.5672099", "0.56649023", "0.5662591", "0.5662278", "0.56548303", "0.5646176", "0.56432253", "0.5641572", "0.56369925", "0.563638", "0.56341374", "0.56315464", "0.56301844", "0.5624494", "0.5623201", "0.56216085", "0.56195444", "0.5611131", "0.56109154", "0.5604509", "0.5601287", "0.56002975", "0.5594976", "0.55945796", "0.55937624", "0.55918896", "0.559095", "0.55890983", "0.55871606", "0.55860865", "0.5585418", "0.5583904", "0.55832005", "0.5583185", "0.5581954", "0.5581941", "0.5576441", "0.5576351", "0.55735815", "0.5570051", "0.5568579", "0.5567907", "0.5565665", "0.55628365", "0.55557597", "0.5549612", "0.55477387", "0.5547451", "0.5543938", "0.5543651" ]
0.0
-1
Run the database seeds.
public function run() { AboutUs::create([ 'img_path' => 'assets/images/picture.svg', 'body' => '<p>Halaman About Us</p>' ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n factory(App\\Editeur::class, 40) ->create();\n factory(App\\Auteur::class, 40) ->create();\n factory(App\\Livre::class, 80) ->create();\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('auteur_livre')->insert([\n 'livre_id' => rand(1, 40),\n 'auteur_id' => $i\n ]);\n }\n }\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('post')->insert(\n [\n 'title' => 'Test Post1',\n 'desc' => str_random(100).\" post1\",\n 'alias' => 'test1',\n 'keywords' => 'test1',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post2',\n 'desc' => str_random(100).\" post2\",\n 'alias' => 'test2',\n 'keywords' => 'test2',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post3',\n 'desc' => str_random(100).\" post3\",\n 'alias' => 'test3',\n 'keywords' => 'test3',\n ]\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n factory('App\\User', 10 )->create();\n\n $users= \\App\\User::all();\n $users->each(function($user){ factory('App\\Category', 1)->create(['user_id'=>$user->id]); });\n $users->each(function($user){ factory('App\\Tag', 3)->create(['user_id'=>$user->id]); });\n\n\n $users->each(function($user){\n factory('App\\Post', 10)->create([\n 'user_id'=>$user->id,\n 'category_id'=>rand(1,20)\n ]\n );\n });\n\n $posts= \\App\\Post::all();\n $posts->each(function ($post){\n\n $post->tags()->attach(array_unique([rand(1,20),rand(1,20),rand(1,20)]));\n });\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }", "public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => '[email protected]', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"[email protected]\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }", "public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }", "public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }", "public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // MyList::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n MyList::create([\n 'title' => 'List-'.($i+1),\n 'color' => $faker->sentence,\n 'icon' => $faker->randomDigitNotNull,\n 'index' => $faker->randomDigitNotNull,\n 'user_id' => 1,\n ]);\n }\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->create();\n }", "public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }", "public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => '[email protected]',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => '[email protected]',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }", "public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> '[email protected]',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }", "public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }", "public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }", "public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }", "public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }", "public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }", "public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }", "public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }", "public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n }", "public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}", "public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }", "public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}", "public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }", "public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }", "public function run()\n {\n $this->call([\n CountryTableSeeder::class,\n ProvinceTableSeeder::class,\n TagTableSeeder::class\n ]);\n\n User::factory()->count(10)->create();\n Category::factory()->count(5)->create();\n Product::factory()->count(20)->create();\n Section::factory()->count(5)->create();\n Bundle::factory()->count(20)->create();\n\n $bundles = Bundle::all();\n // populate bundle-product table (morph many-to-many)\n Product::all()->each(function ($product) use ($bundles) {\n $product->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray(),\n ['default_quantity' => rand(1, 10)]\n );\n });\n // populate bundle-tags table (morph many-to-many)\n Tag::all()->each(function ($tag) use ($bundles) {\n $tag->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray()\n );\n });\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker=Faker\\Factory::create();\n\n for($i=0;$i<100;$i++){\n \tApp\\Blog::create([\n \t\t'title' => $faker->catchPhrase,\n 'description' => $faker->text,\n 'showns' =>true\n \t\t]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(BusinessTableSeeder::class);\n $this->call(PrinterTableSeeder::class);\n factory(App\\Tag::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Subcategory::class,50)->create();\n factory(App\\Provider::class,10)->create();\n factory(App\\Product::class,24)->create()->each(function($product){\n\n $product->images()->saveMany(factory(App\\Image::class, 4)->make());\n\n });\n\n\n factory(App\\Client::class,10)->create();\n }", "public function run()\n {\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->sentence,\n 'sku' => $faker->paragraph,\n 'price' => $faker->number,\n ]);\n }\n }", "public function run()\n {\n Storage::deleteDirectory('public/products');\n Storage::makeDirectory('public/products');\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n $this->call(ProductSeeder::class);\n Order::factory(4)->create();\n Order_Detail::factory(4)->create();\n Size::factory(100)->create();\n }", "public function run()\n {\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Doctor::factory(25)->create();\n Patient::factory(50)->create();\n Status::factory(3)->create();\n Appointment::factory(100)->create();\n }", "public function run()\n\t{\n\t\t\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tTodolist::truncate();\n\n\t\tforeach(range(1, 50) as $index)\n\t\t{\n\n\t\t\t$user = User::create([\n\t\t\t\t'name' => $faker->name,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 'password',\n\t\t\t\t'confirmation_code' => mt_rand(0, 9),\n\t\t\t\t'confirmation' => rand(0,1) == 1\n\t\t\t]);\n\n\t\t\t$list = Todolist::create([\n\t\t\t\t'name' => $faker->sentence(2),\n\t\t\t\t'description' => $faker->sentence(4),\n\t\t\t]);\n\n\t\t\t// BUILD SOME TASKS FOR EACH LIST ITEM\n\t\t\tforeach(range(1, 10) as $index) \n\t\t\t{\n\t\t\t\t$task = new Task;\n\t\t\t\t$task->name = $faker->sentence(2);\n\t\t\t\t$task->description = $faker->sentence(4);\n\t\t\t\t$list->tasks()->save($task);\n\t\t\t}\n\n\t\t}\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n\n\t}", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }", "public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }", "public function run()\n {\n //\n DB::table('foods')->delete();\n\n Foods::create(array(\n 'name' => 'Chicken Wing',\n 'author' => 'Bambang',\n 'overview' => 'a deep-fried chicken wing, not in spicy sauce'\n ));\n\n Foods::create(array(\n 'name' => 'Beef ribs',\n 'author' => 'Frank',\n 'overview' => 'Slow baked beef ribs rubbed in spices'\n ));\n\n Foods::create(array(\n 'name' => 'Ice cream',\n 'author' => 'Lou',\n 'overview' => ' A sweetened frozen food typically eaten as a snack or dessert.'\n ));\n\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }", "public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Models\\Category::class, 3)\n ->create()\n ->each(function ($u) {\n $u->courses()->saveMany(factory(App\\Models\\Course::class,3)->make())->each(function ($c){\n $c->exams()->saveMany(factory(\\App\\Models\\Exam::class,3)->make())->each(function ($e){\n $e->questions()->saveMany(factory(\\App\\Models\\Question::class,4)->make())->each(function ($q){\n $q->answers()->saveMany(factory(\\App\\Models\\Answer::class,4)->make())->each(function ($a){\n $a->correctAnswer()->save(factory(\\App\\Models\\Correct_answer::class)->make());\n });\n });\n });\n });\n\n });\n\n }", "public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }", "public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => '[email protected]']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }", "public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'[email protected]',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','[email protected]')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => '[email protected]']);\n\n factory(Category::class, 5)->create();\n }", "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }", "public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }", "public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }", "public function run()\n {\n $this->call([\n LanguagesTableSeeder::class,\n ListingAvailabilitiesTableSeeder::class,\n ListingTypesTableSeeder::class,\n RoomTypesTableSeeder::class,\n AmenitiesTableSeeder::class,\n UsersTableSeeder::class,\n UserLanguagesTableSeeder::class,\n ListingsTableSeeder::class,\n WishlistsTableSeeder::class,\n StaysTableSeeder::class,\n GuestsTableSeeder::class,\n TripsTableSeeder::class,\n ReviewsTableSeeder::class,\n RatingsTableSeeder::class,\n PopularDestinationsTableSeeder::class,\n ImagesTableSeeder::class,\n ]);\n\n // factory(App\\User::class, 5)->states('host')->create();\n // factory(App\\User::class, 10)->states('hostee')->create();\n\n // factory(App\\User::class, 10)->create();\n // factory(App\\Models\\Listing::class, 30)->create();\n }", "public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }", "public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => '[email protected]',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Paul'\n ]);\n }", "public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }", "public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }", "public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}", "public function run()\n {\n /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1,200) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'phone' => $faker->randomDigitNotNull,\n 'address'=> $faker->streetAddress,\n 'password' => bcrypt('secret'),\n ]);\n }\n }", "public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }", "public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }", "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Runner::create([\n 'external_id' => $faker->uuid,\n 'name' => $faker->name,\n 'race_id' =>rand(1,5),\n 'age' => rand(30, 45),\n 'sex' => $faker->randomElement(['male', 'female']),\n 'color' => $faker->randomElement(['#ecbcb4', '#d1a3a4']),\n ]);\n }\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }", "public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }", "public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'sab',\n\n ]\n );\n }", "public function run()\n {\n //Acá se define lo que el seeder va a hacer.\n //insert() para insertar datos.\n //Array asociativo. La llave es el nombre de la columna.\n// DB::table('users')->insert([\n// //Para un solo usuario.\n// 'name' => 'Pedrito Perez',\n// 'email' => '[email protected]',\n// 'password' => bcrypt('123456')\n// ]);//Se indica el nombre de la tabla.\n\n //Crea 50 usuarios (sin probar)\n// factory(App\\User::class, 50)->create()->each(function($u) {\n// $u->posts()->save(factory(App\\Post::class)->make());\n// });\n\n factory(App\\User::class, 10)->create(); //Así se ejecuta el model factory creado en ModelFactory.php\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'[email protected]', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'[email protected]', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }", "public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }" ]
[ "0.80140394", "0.7980541", "0.79775697", "0.79547316", "0.79514134", "0.79500794", "0.79444957", "0.794259", "0.79382807", "0.7937482", "0.7934376", "0.7892533", "0.7881253", "0.78794724", "0.7879101", "0.7875628", "0.787215", "0.7870168", "0.78515327", "0.7850979", "0.7841958", "0.7834691", "0.78279406", "0.78198457", "0.78093415", "0.78030044", "0.7802443", "0.7801398", "0.7798975", "0.77957946", "0.77905124", "0.7789201", "0.77866685", "0.77786297", "0.7777914", "0.7764813", "0.7762958", "0.7762118", "0.77620417", "0.77614594", "0.7760672", "0.77599436", "0.77577287", "0.7753593", "0.7749794", "0.7749715", "0.77473587", "0.77301705", "0.77296484", "0.77280766", "0.77165425", "0.77143145", "0.7714117", "0.77136046", "0.7712814", "0.7712705", "0.7711485", "0.7711305", "0.77110684", "0.77102643", "0.7705902", "0.77048075", "0.77041686", "0.77038115", "0.7703085", "0.7702133", "0.77009964", "0.7698874", "0.769864", "0.76973957", "0.7696364", "0.7694127", "0.7692633", "0.76910555", "0.7690765", "0.7688756", "0.76879585", "0.76873547", "0.76871854", "0.7685407", "0.7683626", "0.76794547", "0.7678361", "0.7678022", "0.7676884", "0.7672536", "0.76717764", "0.7669418", "0.76692647", "0.76690245", "0.76667875", "0.76628584", "0.76624", "0.76618767", "0.7660002", "0.76567614", "0.76542175", "0.76541024", "0.7652618", "0.76524657", "0.7651689" ]
0.0
-1
/ Plugin Name: Facebook Share Feed Dialog Plugin URI: Description: This plugin creates a javascript function fb_share_feed_dialog(). You can use this function to let people post directly to their Timeline Version: 1.01 Author: The Anh Author URI:
function ta_share_fb_script() { wp_enqueue_script( 'social-share-fb', plugins_url('js/share-fb.js', __FILE__), array( 'jquery' ), '1.0.0', true ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function culturefeed_search_ui_add_facebook_share() {\n\n $fb_app_id = variable_get('culturefeed_search_ui_fb_app_id', '');\n if (!empty($fb_app_id)) {\n drupal_add_js(drupal_get_path('module', 'culturefeed') . '/js/facebook_share.js');\n drupal_add_js(array('culturefeed' => array('fbAppId' => $fb_app_id)), 'setting');\n }\n\n}", "function add_social_sharing() { ?>\r\n\t<h3>Share this post</h3>\r\n\t<ul class=\"share-buttons\">\r\n <li><a href=\"https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Flocalhost%2Ftestsite&t=Test%20site\" title=\"Share on Facebook\" target=\"_blank\" onclick=\"window.open('https://www.facebook.com/sharer/sharer.php?u=' + encodeURIComponent(document.URL) + '&t=' + encodeURIComponent(document.URL)); return false;\"><img src=\"http://your-wp-site.com/wp-content/themes/twentyfifteen-child/images/flat_web_icon_set/black/Facebook.png\"></a></li>\r\n <li><a href=\"https://twitter.com/intent/tweet?source=http%3A%2F%2Flocalhost%2Ftestsite&text=Test%20site:%20http%3A%2F%2Flocalhost%2Ftestsite\" target=\"_blank\" title=\"Tweet\" onclick=\"window.open('https://twitter.com/intent/tweet?text=' + encodeURIComponent(document.title) + ':%20' + encodeURIComponent(document.URL)); return false;\"><img src=\"http://your-wp-site.com/wp-content/themes/twentyfifteen-child/images/flat_web_icon_set/black/Twitter.png\"></a></li>\r\n <li><a href=\"https://plus.google.com/share?url=http%3A%2F%2Flocalhost%2Ftestsite\" target=\"_blank\" title=\"Share on Google+\" onclick=\"window.open('https://plus.google.com/share?url=' + encodeURIComponent(document.URL)); return false;\"><img src=\"http://your-wp-site.com/wp-content/themes/twentyfifteen-child/images/flat_web_icon_set/black/Google+.png\"></a></li>\r\n <li><a href=\"http://www.tumblr.com/share?v=3&u=http%3A%2F%2Flocalhost%2Ftestsite&t=Test%20site&s=\" target=\"_blank\" title=\"Post to Tumblr\" onclick=\"window.open('http://www.tumblr.com/share?v=3&u=' + encodeURIComponent(document.URL) + '&t=' + encodeURIComponent(document.title)); return false;\"><img src=\"http://your-wp-site.com/wp-content/themes/twentyfifteen-child/images/flat_web_icon_set/black/Tumblr.png\"></a></li>\r\n <li><a href=\"http://pinterest.com/pin/create/button/?url=http%3A%2F%2Flocalhost%2Ftestsite&description=Test%20site\" target=\"_blank\" title=\"Pin it\" onclick=\"window.open('http://pinterest.com/pin/create/button/?url=' + encodeURIComponent(document.URL) + '&description=' + encodeURIComponent(document.title)); return false;\"><img src=\"http://your-wp-site.com/wp-content/themes/twentyfifteen-child/images/flat_web_icon_set/black/Pinterest.png\"></a></li>\r\n <li><a href=\"https://getpocket.com/save?url=http%3A%2F%2Flocalhost%2Ftestsite&title=Test%20site\" target=\"_blank\" title=\"Add to Pocket\" onclick=\"window.open('https://getpocket.com/save?url=' + encodeURIComponent(document.URL) + '&title=' + encodeURIComponent(document.title)); return false;\"><img src=\"http://your-wp-site.com/wp-content/themes/twentyfifteen-child/images/flat_web_icon_set/black/Pocket.png\"></a></li>\r\n <li><a href=\"http://www.reddit.com/submit?url=http%3A%2F%2Flocalhost%2Ftestsite&title=Test%20site\" target=\"_blank\" title=\"Submit to Reddit\" onclick=\"window.open('http://www.reddit.com/submit?url=' + encodeURIComponent(document.URL) + '&title=' + encodeURIComponent(document.title)); return false;\"><img src=\"http://your-wp-site.com/wp-content/themes/twentyfifteen-child/images/flat_web_icon_set/black/Reddit.png\"></a></li>\r\n <li><a href=\"http://www.linkedin.com/shareArticle?mini=true&url=http%3A%2F%2Flocalhost%2Ftestsite&title=Test%20site&summary=Test%20site&source=http%3A%2F%2Flocalhost%2Ftestsite\" target=\"_blank\" title=\"Share on LinkedIn\" onclick=\"window.open('http://www.linkedin.com/shareArticle?mini=true&url=' + encodeURIComponent(document.URL) + '&title=' + encodeURIComponent(document.title)); return false;\"><img src=\"http://your-wp-site.com/wp-content/themes/twentyfifteen-child/images/flat_web_icon_set/black/LinkedIn.png\"></a></li>\r\n <li><a href=\"http://wordpress.com/press-this.php?u=http%3A%2F%2Flocalhost%2Ftestsite&t=Test%20site&s=Test%20site\" target=\"_blank\" title=\"Publish on WordPress\" onclick=\"window.open('http://wordpress.com/press-this.php?u=' + encodeURIComponent(document.URL) + '&t=' + encodeURIComponent(document.title)); return false;\"><img src=\"http://your-wp-site.com/wp-content/themes/twentyfifteen-child/images/flat_web_icon_set/black/Wordpress.png\"></a></li>\r\n <li><a href=\"https://pinboard.in/popup_login/?url=http%3A%2F%2Flocalhost%2Ftestsite&title=Test%20site&description=Test%20site\" target=\"_blank\" title=\"Save to Pinboard\" onclick=\"window.open('https://pinboard.in/popup_login/?url=' + encodeURIComponent(document.URL) + '&title=' + encodeURIComponent(document.title)); return false;\"><img src=\"http://your-wp-site.com/wp-content/themes/twentyfifteen-child/images/flat_web_icon_set/black/Pinboard.png\"></a></li>\r\n <li><a href=\"mailto:?subject=Test%20site&body=Test%20site:%20http%3A%2F%2Flocalhost%2Ftestsite\" target=\"_blank\" title=\"Email\" onclick=\"window.open('mailto:?subject=' + encodeURIComponent(document.title) + '&body=' + encodeURIComponent(document.URL)); return false;\"><img src=\"http://your-wp-site.com/wp-content/themes/twentyfifteen-child/images/flat_web_icon_set/black/Email.png\"></a></li>\r\n</ul>\r\n\r\n<?php }", "function facebook_share_button($content){\n if(get_post_detail('url',false)!==''){\n $content .= '<div id=\"fb-root\"></div>\n <script>(function(d, s, id) {\n var js, fjs = d.getElementsByTagName(s)[0];\n if (d.getElementById(id)) return;\n js = d.createElement(s); js.id = id;\n js.src = \"//connect.facebook.net/en_US/sdk.js#xfbml=1&appId=840986119244731&version=v2.0\";\n fjs.parentNode.insertBefore(js, fjs);\n }(document,\\'script\\', \\'facebook-jssdk\\'));\n </script>\n <div class=\"fb-share-button\" data-href=\"'.WWW.get_post_detail('url',false).'.html\" data-layout=\"button\"></div>';\n }\n return $content;\n}", "function frame_share($provider, $post_id = null)\n{\n\n // $postid = url_to_postid( $url );\n\n $defaults = array(\n 'provider' => null,\n 'post_id' => $post_id,\n 'url' => ($post_id === null) ? $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'] : get_permalink($post_id),\n 'title' => ($post_id === null) ? '' : get_the_title($post_id),\n 'description' => '',\n 'tags' => '',\n 'source' => ''\n );\n\n if (is_array($provider))\n {\n $args = wp_parse_args($provider, $defaults);\n }\n else if (is_string($provider))\n {\n\n }\n\n\n\n // Get the URL to share\n $url = ($post_id === null) ? $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'] : get_permalink($post_id);\n $url = urlencode($url);\n\n switch($args['provider'])\n {\n case 'facebook':\n break;\n\n case 'google':\n break;\n\n case 'linkedin':\n break;\n\n case 'pinterest':\n break;\n\n case 'reddit':\n break;\n\n case 'twitter':\n break;\n\n default:\n break;\n }\n\n\n}", "function foucs_share_this_post($title,$permalink){\n\n\t$twitterHandler = ( get_option('twitter_handler') ? '&amp;via='.esc_attr( get_option('twitter_handler') ) : '' );\n\t\t\n\t$twitter = 'https://twitter.com/intent/tweet?text=Hey! Read this: ' . $title . '&amp;url=' . $permalink . $twitterHandler .'';\n\t$facebook = 'https://www.facebook.com/sharer/sharer.php?u=' . $permalink;\n\t$google = 'https://plus.google.com/share?url=' . $permalink;\n\t$pinterest = 'http://pinterest.com/pin/create/bookmarklet/?is_video=false&url=' . $permalink;\n\techo '<li><a href=\"'. $facebook .'\" target=\"_blank\" rel=\"nofollow\"><i class=\"fab fa-facebook-f\" aria-hidden=\"true\"></i></a></li>';\n\techo '<li><a href=\"'. $twitter .'\" target=\"_blank\" rel=\"nofollow\"><i class=\"fab fa-twitter\" aria-hidden=\"true\"></i></a></li>';\n\techo '<li><a href=\"'. $pinterest .'\" target=\"_blank\" rel=\"nofollow\"><i class=\"fab fa-pinterest\" aria-hidden=\"true\"></i></a></li>';\n\techo '<li><a href=\"'. $google .'\" target=\"_blank\" rel=\"nofollow\"><i class=\"fab fa-google-plus-g\" aria-hidden=\"true\"> </i></a></li>';\n\t\t\t\n}", "function widget_ffes_feed($args) {\r\n extract($args);\r\n $defaults = array('count' => 10, 'username' => 'wordpress');\r\n $options = (array) get_option('widget_ffes_feed');\r\n\r\n foreach ( $defaults as $key => $value )\r\n if ( !isset($options[$key]) )\r\n $options[$key] = $defaults[$key];\r\n//feed copy\r\n$feed_text = \"<script language=\\\"JavaScript\\\" type=\\\"text/javascript\\\">document.write('<scr' + 'ipt language=\\\"JavaScript\\\" type=\\\"text/javascript\\\" src=\\\"http://www.familyfeatures.com/wordpress/food/foodhandler.ashx' + window.location.search + '\\\"></scr' + 'ipt>'\r\n);</script>\";\r\n ?>\r\n <?php echo $before_widget; ?>\r\n <?php echo $before_title . $options['title'] . $after_title; ?>\r\n <?php echo \"$feed_text\"; ?>\r\n <?php echo $after_widget; ?>\r\n<?php\r\n }", "function quasar_get_post_share($args=null){\n\tglobal $post;\n\t\t\n\t$social_html\t=\t'';\n\t$social_js\t\t=\t'';\n\t\n\tif($args && is_array($args)){\n\t\textract($args);\n\t}\n\t\t\n\t//Facebook\n\t$social_html\t.=\t'<div class=\"fb-like\" data-href=\"'.get_permalink().'\" data-width=\"90\" data-layout=\"button_count\" data-show-faces=\"false\" data-send=\"false\"></div>';\t\n\t$social_js\t\t.=\t'\n\t\t(function(d, s, id) {\n\t\t var js, fjs = d.getElementsByTagName(s)[0];\n\t\t if (d.getElementById(id)) return;\n\t\t js = d.createElement(s); js.id = id;\n\t\t js.src = \"//connect.facebook.net/en_US/all.js#xfbml=1\";\n\t\t fjs.parentNode.insertBefore(js, fjs);\n\t\t}(document, \"script\", \"facebook-jssdk\"));\n\t';\n\t\n\t//Twitter\n\t$social_html\t.=\t'<a href=\"https://twitter.com/share\" class=\"twitter-share-button\">Tweet</a>';\n\t$social_js\t\t.=\t'!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?\"http\":\"https\";if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+\"://platform.twitter.com/widgets.js\";fjs.parentNode.insertBefore(js,fjs);}}(document, \"script\", \"twitter-wjs\");';\n\n\t//Google+\n\t$social_html\t.=\t'<div class=\"g-plusone\" data-size=\"medium\"></div>';\n\t$social_js\t\t.=\t'\n\t (function() {\n\t\tvar po = document.createElement(\"script\"); po.type = \"text/javascript\"; po.async = true;\n\t\tpo.src = \"https://apis.google.com/js/plusone.js\";\n\t\tvar s = document.getElementsByTagName(\"script\")[0]; s.parentNode.insertBefore(po, s);\n\t })();\n\t';\n\t\n\t//Pinterest\n\t$social_html\t.=\t'<a href=\"//pinterest.com/pin/create/button/?url='.get_permalink().'&media='.get_permalink().'&description='.get_permalink().'\" data-pin-do=\"buttonPin\" data-pin-config=\"beside\"><img src=\"//assets.pinterest.com/images/pidgets/pin_it_button.png\" /></a>';\n\n\t\n\t$social_html\t=\tapply_filters('quasar_post_social_html',$social_html);\n\t$social_js\t\t=\tapply_filters('quasar_post_social_js',$social_js);\n\t\n\t$return\t\t=\t'';\n\t\n\t$return\t\t.=\t'<script type=\"text/javascript\">'.$social_js.'</script>';\n\t\n\t$return\t\t.=\t'<div class=\"quasar-post-social\">'.$social_html.'</div><div class=\"clear\"></div>';\n\t\n\treturn $return;\n}", "function ubiq_add_socialgraph() {\n if (!get_option('ubiq_fb_opengraph')) { return; }\n\n if (is_single()) {\n global $post;\n \n $image_id = get_post_thumbnail_id();\n $image_url = wp_get_attachment_image_src($image_id,'large', true);\n \n \n $content = $post->post_content;\n $content = strip_shortcodes( $content );\n \t\t$content = strip_tags($content);\n\t\t$excerpt_length = 55;\n\t\t$words = explode(' ', $content, $excerpt_length + 1);\n\t\tif(count($words) > $excerpt_length) :\n\t\t\tarray_pop($words);\n\t\t\tarray_push($words, '...');\n\t\t\t$content = implode(' ', $words);\n\t\tendif;\n \n ?>\n <meta property=\"og:title\" content=\"<?php the_title() ?>\"/>\n <meta property=\"og:type\" content=\"article\"/>\n <meta property=\"og:url\" content=\"<?php echo get_permalink() ?>\"/>\n <?php\n if (get_the_post_thumbnail()) {\n ?>\n <meta property=\"og:image\" content=\"<?php echo $image_url[0] ?>\"/>\n <?php } else { ?>\n <meta property=\"og:image\" content=\"<?php header_image(); ?>\"/>\n <?php } ?>\n <meta property=\"og:site_name\" content=\"<?php echo get_bloginfo('name') ?>\"/> \n <meta property=\"og:description\" content=\"<?php echo $content ?>\"/>\n <?php if (get_option('ubiq_fb_appid')) { ?>\n <meta property=\"fb:app_id\" content=\"<?php echo get_option('ubiq_fb_appid') ?>\" />\n <?php } ?>\n <?php\n if (function_exists('sharing_display')) {\n add_filter( 'excerpt_length', 'calculate_excerpt_length' ); \n add_filter( 'the_excerpt', 'sharing_display', 19 );\n }\n } else if(is_home()) {\n ?>\n <meta property=\"og:title\" content=\"<?php echo get_bloginfo('name') ?>\"/>\n <meta property=\"og:type\" content=\"website\"/>\n <meta property=\"og:url\" content=\"<?php bloginfo('url') ?>\"/>\n <meta property=\"og:image\" content=\"<?php header_image(); ?>\"/>\n <meta property=\"og:site_name\" content=\"<?php echo get_bloginfo('name') ?>\"/> \n <meta property=\"og:description\" content=\"<?php echo bloginfo('description') ?>\"/>\n <?php if (get_option('ubiq_fb_appid')) { ?>\n <meta property=\"fb:app_id\" content=\"<?php echo get_option('ubiq_fb_appid') ?>\" />\n <?php } ?>\n <?php\n }\n}", "function ejo_social_share() {\n ?>\n <aside class=\"social-share\">\n <h3>Deel dit bericht</h3>\n <a target=\"_blank\" title=\"Share on Twitter\" href=\"https://twitter.com/share?url=<?php echo get_permalink(); ?>\">Twitter</a>\n <a target=\"_blank\" title=\"Share on Facebook\" href=\"https://www.facebook.com/sharer/sharer.php?<?php echo get_permalink(); ?>\">Facebook</a>\n </aside>\n <?php\n}", "public function hook_js()\n {\n ?>\n <script>window.fbAsyncInit = function () {\n FB.init({\n appId: '<?php echo get_option('grimage_facebook_appid');?>',\n xfbml: true,\n version: 'v2.6'\n });\n };\n (function (d, s, id) {\n var js, fjs = d.getElementsByTagName(s)[0];\n if (d.getElementById(id)) {\n return;\n }\n js = d.createElement(s);\n js.id = id;\n js.src = \"//connect.facebook.net/en_US/sdk.js\";\n fjs.parentNode.insertBefore(js, fjs);\n }(document, 'script', 'facebook-jssdk'));\n\n (function ($) {\n $(document).ready(function () {\n function getCookie(cname) {\n var name = cname + \"=\";\n var ca = document.cookie.split(';');\n for (var i = 0; i < ca.length; i++) {\n var c = ca[i];\n while (c.charAt(0) == ' ') {\n c = c.substring(1);\n }\n if (c.indexOf(name) == 0) {\n return c.substring(name.length, c.length);\n }\n }\n return \"\";\n }\n // bind it late for infinite scroll posts....\n $('.grimage .clicker').on('click',function (e) {\n console.log('sharing this page...'+$(e.currentTarget).data('url'));\n var image_url = $(e.currentTarget).siblings('img').attr('src');\n FB.ui({\n method: 'share',\n href: $(e.currentTarget).data('url'),\n // title: 'This should be set in the meta headers..',\n picture: image_url,\n // caption: 'This should be set in the meta headers..',\n // description: 'This should be set in the meta headers..'\n }, function (response) {\n // Debug response (optional)\n //console.log(response);\n // Make sure the modal hasn't been shown in the last 7 days, and make sure the modal hasn't already been clicked like.\n if (getCookie('grimage_modal_shown') == \"\" && getCookie('grimage_modal_liked') == \"\") {\n setTimeout(function () {\n // click the modal button to show the modal :)\n //$('#show_grimage_modal').click();\n $('.grimage_modal .grimage_modal-dialog').css('-webkit-transform', 'translate(0, 0)');\n $('.grimage_modal .grimage_modal-dialog').css('-ms-transform', 'translate(0, 0)');\n $('.grimage_modal .grimage_modal-dialog').css('transform', 'translate(0, 0)');\n $('.grimage_modal .grimage_modal-dialog').css('top', '20%');\n $('.grimage_modalclose').click(function (e) {\n e.preventDefault();\n\n // User clicked the close button, so lets set a cookie to prevent the modal from popping up for a few days..\n document.cookie = \"grimage_modal_shown=true; expires=<?php echo date('D, d M Y', strtotime('+1 WEEK'));?> 12:00:00 UTC\";\n $('.grimage_modal').hide();\n });\n }, 500);\n } // end if hide modal...\n });\n FB.Event.subscribe('edge.create', function (response) {\n document.cookie = \"grimage_modal_liked=true; expires=<?php echo date('D, d M Y', strtotime('+1 YEAR'));?> 12:00:00 UTC\";\n //console.log('like button clicked!');\n $('.grimage_modal').hide();\n });\n });\n });\n }(jQuery))</script>\n <?php\n }", "function ejos_register_social_share_shortcode() {\n add_shortcode( 'social_share', 'ejos_social_share_shortcode' );\n}", "function social_share(){\n\t?>\n\t<style type=\"text/css\">\n\t\tp.share-info{\n\t\t\tmargin-bottom: 0;\n\t\t}\n\t\t.share-buttons .has-tip{\n\t\t\tborder: none;\n\t\t}\n\t\t.share-buttons a{\n\t\t\tborder: none;\n\t\t\twidth: 33px;\n\t\t\theight: 33px;\n\t\t}\n\t\t.share-buttons a.button{\n\t\t\tpadding: 0;\n\t\t\tmargin-right: 3px;\n\t\t}\n\t\t.share-buttons a.button.facebook{\n\t\t\tbackground: rgb(59, 89, 152);\n\t\t}\n\t\t.share-buttons a.button.twitter{\n\t\t\tbackground: rgb(29, 161, 242);\n\t\t}\n\t\t.share-buttons a.button.linkedin{\n\t\t\tbackground: rgb(0, 119, 181);\n\t\t}\n\t\t.share-buttons a.button.google-plus{\n\t\t\tbackground: rgb(220, 78, 65);\n\t\t}\n\t\t.share-buttons a i{\n\t\t\tfont-size: 1.4rem;\n\t\t\tline-height: 2.4rem;\n\t\t}\n\t</style>\n\t<p class=\"share-info\"><small>Compartilhe:</small></p>\n\t<div class=\"button-group share-buttons\">\n\t\t<span data-tooltip aria-haspopup=\"true\" class=\"has-tip top\" data-disable-hover=\"false\" tabindex=\"1\" title=\"Facebook\">\n\t\t\t<a class=\"button facebook\" href=\"https://www.facebook.com/sharer/sharer.php?u=<?php the_permalink(); ?>\" onclick=\"window.open(this.href, 'Compartilhar notícia', 'width=490,height=530');return false;\"><i class=\"fa fa-facebook\"></i></a>\n\t\t</span>\n\t\t<span data-tooltip aria-haspopup=\"true\" class=\"has-tip top\" data-disable-hover=\"false\" tabindex=\"1\" title=\"Twitter\">\n\t\t\t<a class=\"button twitter\" href=\"https://twitter.com/home?status=<?php the_permalink(); ?>\" onclick=\"window.open(this.href, 'Compartilhar notícia', 'width=490,height=530');return false;\"><i class=\"fa fa-twitter\"></i></a>\n\t\t</span>\n\t\t<span data-tooltip aria-haspopup=\"true\" class=\"has-tip top\" data-disable-hover=\"false\" tabindex=\"1\" title=\"LinkedIn\">\n\t\t\t<a class=\"button linkedin\" href=\"https://www.linkedin.com/shareArticle?mini=true&url=<?php the_permalink(); ?>&title=<?php the_title( ); ?>&summary=&source=<?php bloginfo( 'url' ); ?>\" onclick=\"window.open(this.href, 'Compartilhar notícia', 'width=490,height=530');return false;\"><i class=\"fa fa-linkedin\"></i></a>\n\t\t</span>\n\t\t<span data-tooltip aria-haspopup=\"true\" class=\"has-tip top\" data-disable-hover=\"false\" tabindex=\"1\" title=\"Google plus\">\n\t\t\t<a class=\"button google-plus\" href=\"https://plus.google.com/share?url=<?php the_permalink(); ?>\" onclick=\"window.open(this.href, 'Compartilhar notícia', 'width=490,height=530');return false;\"><i class=\"fa fa-google-plus\"></i></a>\n\t\t</span>\t\t\t\t\t\t\t\n\t</div>\n\t<?php\n}", "function get_facebook_share_url( $the_post = null ) {\n\tglobal $post;\n\tif ( empty( $the_post ) ) {\n\t\t$the_post = $post;\n\t}\n\n\t$permalink = get_the_permalink( $the_post->ID );\n\t$the_title = get_the_title( $the_post->ID );\n\t$handle = get_theme_mod( 'facebook_url' );\n\n\treturn 'http://www.facebook.com/sharer.php?&u=' . $permalink;\n}", "function x_add_social_sharing ( $content ) {\n\t\n if ( is_singular('post') ) {\n\t \n echo do_shortcode('[share title=\"Share this Post\" facebook=\"true\" twitter=\"true\" google_plus=\"true\" linkedin=\"true\" pinterest=\"false\" reddit=\"false\" email=\"true\"]');\n \n }\n}", "public function getFacebookShareUrl() {\n return 'http://www.facebook.com/sharer.php?s=100&p[url]='.$this->socialData['url']\n .'&p[images][0]='.$this->socialData['image']\n .'&p[title]='.$this->socialData['title']\n .'&p[summary]='.$this->socialData['description'];\n }", "public function displayFastSocialSharing($content = null)\n {\n global $post;\n\n // Get current page URL\n $fssURL = urlencode(get_permalink());\n\n // Get current page title\n $fssTitle = str_replace(' ', '%20', get_the_title());\n\n // Get Post Thumbnail for pinterest\n //$fssThumbnail = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'full');\n if (is_page() || is_single()) {\n $fssThumbnail = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'full');\n } else {\n $fssThumbnail[0] = '';\n }\n\n // Construct sharing URL without using any script\n $twitterURL = 'https://twitter.com/intent/tweet?text='.$fssTitle.'&amp;url='.$fssURL;\n $facebookURL = 'https://www.facebook.com/sharer/sharer.php?u='.$fssURL;\n $googleURL = 'https://plus.google.com/share?url='.$fssURL;\n //$bufferURL = 'https://bufferapp.com/add?url='.$fssURL.'&amp;text='.$fssTitle;\n //$whatsappURL = 'whatsapp://send?text='.$fssTitle . ' ' . $fssURL;\n //$linkedInURL = 'https://www.linkedin.com/shareArticle?mini=true&url='.$fssURL.'&amp;title='.$fssTitle;\n $pinterestURL = 'https://pinterest.com/pin/create/button/?url='.$fssURL.'&amp;media='.$fssThumbnail[0].'&amp;description='.$fssTitle;\n $emailURL = 'mailto:?&subject='.$fssTitle.'&body='.$fssURL;\n\n // Add sharing button at the end of page/page content\n $content .= '<div class=\"fss-social\">';\n\n //$content .= '<h5>SHARE ON</h5> <a class=\"fss-link fss-twitter\" href=\"'. $twitterURL .'\" target=\"_blank\">Twitter</a>';\n //$content .= '<a class=\"fss-link fss-facebook\" href=\"'.$facebookURL.'\" target=\"_blank\">Facebook</a>';\n //$content .= '<a class=\"fss-link fss-whatsapp\" href=\"'.$whatsappURL.'\" target=\"_blank\">WhatsApp</a>';\n //$content .= '<a class=\"fss-link fss-googleplus\" href=\"'.$googleURL.'\" target=\"_blank\">Google+</a>';\n //$content .= '<a class=\"fss-link fss-buffer\" href=\"'.$bufferURL.'\" target=\"_blank\">Buffer</a>';\n //$content .= '<a class=\"fss-link fss-linkedin\" href=\"'.$linkedInURL.'\" target=\"_blank\">LinkedIn</a>';\n //$content .= '<a class=\"fss-link fss-pinterest\" href=\"'.$pinterestURL.'\" data-pin-custom=\"true\" target=\"_blank\">Pin It</a>';\n\n $content .= '<h5>SHARE ON</h5><a class=\"fss-link fss-facebook\" href=\"'.$facebookURL.'\" target=\"_blank\"></a>';\n $content .= '<a class=\"fss-link fss-twitter\" href=\"'. $twitterURL .'\" target=\"_blank\"></a>';\n $content .= '<a class=\"fss-link fss-googleplus\" href=\"'.$googleURL.'\" target=\"_blank\"></a>';\n $content .= '<a class=\"fss-link fss-pinterest\" href=\"'.$pinterestURL.'\" data-pin-custom=\"true\" target=\"_blank\"></a>';\n $content .= '<a class=\"fss-link fss-email\" href=\"'.$emailURL.'\" target=\"_blank\"></a>';\n $content .= '</div>';\n\n return $content;\n }", "function genesisawesome_subscribe_sharebox() {\n\n\tif ( ! is_singular( 'post' ) )\n\t\treturn;\n\t?>\n\n\t<?php if ( genesis_get_option( 'enable_post_subscribe_box', GA_CHILDTHEME_FIELD ) ) : ?>\n<div id='ga-subscribebox'>\n\t<h4><?php _e( 'Subscribe to Our Blog Updates!', 'genesisawesome' );?></h4>\n\t<p class='message'><?php _e( 'Subscribe to Our Free Email Updates!', 'genesisawesome' );?></p>\n\t<form action='http://feedburner.google.com/fb/a/mailverify' class='subscribeform' method='post' onsubmit='window.open(\"http://feedburner.google.com/fb/a/mailverify?uri=<?php echo esc_attr( genesis_get_option( 'feedburner_id', GA_CHILDTHEME_FIELD ) );?>\", \"popupwindow\", \"scrollbars=yes,width=550,height=520\");return true' target='popupwindow'>\n\t\t<input name='uri' type='hidden' value='<?php echo esc_attr( genesis_get_option( 'feedburner_id', GA_CHILDTHEME_FIELD ) );?>'/>\n\t\t<input name='loc' type='hidden' value='en_US'/>\n\t\t<input class='einput' name='email' onblur='if (this.value == \"\") {this.value = \"Enter your email...\";}' onfocus='if (this.value == \"Enter your email...\") {this.value = \"\"}' type='text' value='Enter your email...'/>\n\t\t<input class='ebutton' title='' type='submit' value='<?php _e( 'Subscribe', 'genesisawesome' );?>'/>\n\t</form>\n</div>\n\t<?php endif; ?>\n\n\t<?php if ( genesis_get_option( 'enable_post_social_share', GA_CHILDTHEME_FIELD ) ) : ?>\n<div id=\"ga-sharebox\">\n\t<h4><?php _e( 'Share this article!', 'genesisawesome' );?></h4>\n\t<table width='100%'>\n\t\t<tr>\n\t\t\t<td><iframe allowTransparency='true' src='//www.facebook.com/plugins/like.php?href=<?php echo urlencode( get_permalink() ); ?>&amp;send=false&amp;layout=box_count&amp;width=50&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=65' frameborder='0' scrolling='no' style='border:none; overflow:hidden; width:50px; height:65px;'></iframe></td>\n\t\t\t<td><a class='twitter-share-button' data-count='vertical' data-lang='en' data-title='<?php the_title_attribute(); ?>' data-url='<?php the_permalink(); ?>' href='https://twitter.com/share'>Tweet</a></td>\n\t\t\t<td>\t\n\t\t\t\t<div style='position:relative;'>\n\t\t\t\t\t<a class='pin-it-button' count-layout='vertical' href='http://pinterest.com/pin/create/button/?url=<?php echo urldecode( get_permalink() ); ?>'>Pin It now!</a>\n\t\t\t\t\t<a href='javascript:void(run_pinmarklet())' style='position:absolute;top:0;bottom:0;left:0;right:0;'></a>\n\t\t\t\t</div>\n\t\t\t</td>\n\t\t\t<td><g:plusone href='<?php the_permalink(); ?>' size='tall'></g:plusone></td>\n\t\t\t<td>\n\t\t\t\t<su:badge layout=\"5\" location=\"<?php get_permalink();?>\"></su:badge>\n\t\t\t</td>\n\t\t\t<td><a class='DiggThisButton DiggMedium'></a></td>\n\t\t\t<td>\n\t\t\t\t<script src='//platform.linkedin.com/in.js' type='text/javascript'></script>\n\t\t\t\t<script data-counter='top' data-url='<?php the_permalink(); ?>' type='IN/Share'></script>\n\t\t\t</td>\n\t\t</tr>\n\t</table>\n</div>\n\t<?php endif; ?>\n\n\t<?php if ( genesis_get_option( 'enable_post_related_posts', GA_CHILDTHEME_FIELD ) ) :?>\n<div id='ga-relatedposts'>\n\t <h4><?php _e( 'Related Posts', 'genesisawesome' );?></h4>\n\t <?php genesisawesome_related_posts(); ?>\n</div>\n\t<?php endif; ?>\n\n\t<?php\n\n}", "public function social() {\n\t\t?>\n\t\t<p>\n\t\t<div class=\"g-plusone\" data-size=\"medium\" data-href=\"http://wp-buddy.com/products/plugins/google-drive-as-wordpress-cdn-plugin/\"></div>\n\t\t</p>\n\n\t\t<script type=\"text/javascript\">\n\t\t\t(function () {\n\t\t\t\tvar po = document.createElement( 'script' );\n\t\t\t\tpo.type = 'text/javascript';\n\t\t\t\tpo.async = true;\n\t\t\t\tpo.src = 'https://apis.google.com/js/plusone.js';\n\t\t\t\tvar s = document.getElementsByTagName( 'script' )[0];\n\t\t\t\ts.parentNode.insertBefore( po, s );\n\t\t\t})();\n\t\t</script>\n\n\t\t<p>\n\t\t\t<a href=\"https://twitter.com/share\" class=\"twitter-share-button\" data-url=\"http://wp-buddy.com/products/plugins/google-drive-as-wordpress-cdn-plugin/\" data-text=\"Check out the Google Drive as CDN WordPress Plugin\" data-related=\"wp_buddy\">Tweet</a>\n\t\t</p>\n\t\t<script>!function ( d, s, id ) {\n\t\t\t\tvar js, fjs = d.getElementsByTagName( s )[0];\n\t\t\t\tif ( !d.getElementById( id ) ) {\n\t\t\t\t\tjs = d.createElement( s );\n\t\t\t\t\tjs.id = id;\n\t\t\t\t\tjs.src = \"//platform.twitter.com/widgets.js\";\n\t\t\t\t\tfjs.parentNode.insertBefore( js, fjs );\n\t\t\t\t}\n\t\t\t}( document, \"script\", \"twitter-wjs\" );</script>\n\n\t\t<p>\n\t\t\t<iframe src=\"//www.facebook.com/plugins/like.php?href=<?php echo urlencode( 'http://wp-buddy.com/products/plugins/google-drive-as-wordpress-cdn-plugin/' ); ?>&amp;send=false&amp;layout=button_count&amp;width=150&amp;show_faces=false&amp;font&amp;colorscheme=light&amp;action=like&amp;height=21\" scrolling=\"no\" frameborder=\"0\" style=\"border:none; overflow:hidden; width:150px; height:21px;\" allowTransparency=\"true\"></iframe>\n\t\t</p>\n\t<?php\n\t}", "public function widget( $args, $instance ) {\n\t$title = apply_filters( 'widget_title', $instance['title'] );\n\t// before and after widget arguments are defined by themes\n\techo $args['before_widget'];\n\tif ( ! empty( $title ) )\n\t\techo $args['before_title'] . $title . $args['after_title'];\n\t// This is where you run the code and display the output\n\t\techo '<div class=\"social-share\"> <a data-fb-link=\"';\n\t\techo the_permalink();\n\t\techo '\" href=\"https://www.facebook.com/sharer/sharer.php?u=';\n\t\techo the_permalink();\n\t\techo '\" title=\"Share on Facebook\" name=\"fb_share\" onclick=\"window.open(this.href,\\'targetWindow\\',\\'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=660,height=380,left=100,top=100\\');return false;\" class=\"facebook\"><span><i class=\"fab fa-facebook-f\"></i></span> Facebook</a>';\n\t\techo '<a href=\"https://twitter.com/intent/tweet?text=';\n\t\techo the_title(); \n\t\techo '&url=';\n\t\techo the_permalink();\n\t\techo '\" class=\"share-icon share-button share-icon-twitter twitter\" title=\"Share on Twitter\" onclick=\"window.open(this.href,\\'targetWindow\\',\\'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=660,height=380,left=100,top=100\\');return false;\"><span><i class=\"fab fa-twitter\"></i></span> Twitter</a>'; \n\t\techo '<a href=\"https://plus.google.com/share?url=';\n\t\techo the_permalink();\n\t\techo '\" class=\"share-icon share-button share-icon-google-plus google\" title=\"Share on Google+\" onclick=\"window.open(this.href,\\'targetWindow\\',\\'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=480,height=400,left=100,top=100\\');return false;\"><span><i class=\"fab fa-google-plus-g\"></i></span> Google +</a>'; \n\t\techo '<a class=\"social-email\" href=\"mailto:?subject=I wanted to share this story with you: || ';\n\t\techo the_title();\n\t\techo '&body=I found this story on '; \n\t\techo bloginfo('url');\n\t\techo 'and I thought you would like it:';\n\t\techo the_permalink();\n\t\techo ' Here is an excerpt:';\n\t\techo strip_tags( get_the_excerpt() );\n\t\techo '\"><span><i class=\"fa fa-share-square\"></i></span>Email a Friend</a></div>';\n\t\techo $args['after_widget'];\n}", "function desertdelta_social_sharing_buttons($content) {\n\tglobal $post;\n\tif(is_singular() || is_home()){\n\n\t\t// Get current page URL\n\t\t$desertdeltaURL = urlencode(get_permalink());\n\n\t\t// Get current page title\n\t\t$desertdeltaTitle = htmlspecialchars(urlencode(html_entity_decode(get_the_title(), ENT_COMPAT, 'UTF-8')), ENT_COMPAT, 'UTF-8');\n\t\t// $desertdeltaTitle = str_replace( ' ', '%20', get_the_title());\n\n\t\t// Get Post Thumbnail for pinterest\n\t\t$desertdeltaThumbnail = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' );\n\n\t\t// Construct sharing URL without using any script\n\t\t$twitterURL = 'https://twitter.com/intent/tweet?text='.$desertdeltaTitle.'&amp;url='.$desertdeltaURL.'&amp;via=Crunchify';\n\t\t$facebookURL = 'https://www.facebook.com/sharer/sharer.php?u='.$desertdeltaURL;\n\n\t\t// Based on popular demand added Pinterest too\n\t\t$pinterestURL = 'https://pinterest.com/pin/create/button/?url='.$desertdeltaURL.'&amp;media='.$desertdeltaThumbnail[0].'&amp;description='.$desertdeltaTitle;\n\n\t\t// Add sharing button at the end of page/page content\n\t\t$content .= '<!-- Implement your own superfast social sharing buttons without any JavaScript loading. No plugin required. Detailed steps here: http://crunchify.me/1VIxAsz -->';\n\t\t$content .= '<div class=\"contactSocials\"><h5 class=\"heading heading__sm\">SHARE </h5>';\n\t\t$content .= ' <a href=\"'. $twitterURL .'\" target=\"_blank\"><i class=\"fab fa-twitter\"></i></a>';\n\t\t$content .= '<a href=\"'.$facebookURL.'\" target=\"_blank\"><i class=\"fab fa-facebook-square\"></i></a>';\n\t\t$content .= '</div>';\n\n\t\treturn $content;\n\t}else{\n\t\t// if not a post/page then don't include sharing button\n\t\treturn $content;\n\t}\n}", "function social_sharing_buttons() {\n $siteURL = site_url();\n $pageURL = wp_get_shortlink();\n\n // Get current page title\n $pageTitle = str_replace( ' ', '%20', get_the_title());\n\n // Construct sharing URL without using any script\n $twitterURL = 'https://twitter.com/intent/tweet?text='.$pageTitle.'&amp;url='.$pageURL.'&amp;via=YOUR_TWITTER_USERNAME';\n $facebookURL = 'https://facebook.com/sharer/sharer.php?u='.$pageURL;\n $googleURL = 'https://plus.google.com/share?url='.$pageURL;\n $linkedinURL = 'https://www.linkedin.com/shareArticle?mini=true&url='.$pageURL.'&title='.$pageTitle.'&source='.$siteURL;\n $telegramURL = 'https://telegram.me/share/url?url='.$pageURL.'&text='.$pageTitle;\n\n // Add sharing button at the end of page/page content\n $content = '<div class=\"share-modal share-modal--close\" >\n <div class=\"share-body\">\n <a class=\"share-modal__close\" href=\"#\" id=\"closeModalButton\">\n <i class=\"fa fa-close icon\" aria-hidden=\"true\"></i>\n </a>\n <p class=\"share-modal__title\">\n <span>انتشار مطلب</span>\n <i class=\"fa fa-share icon\" aria-hidden=\"true\"></i>\n </p>\n <p class=\"share-modal__post-title\">'.urldecode($pageTitle).'</p>\n\n <div class=\"share-buttons-container\">\n <a class=\"twitter\" href=\"'.$twitterURL .'\" target=\"_blank\"><i class=\"fa fa-twitter icon\" aria-hidden=\"true\"></i></a>\n <a class=\"facebook\" href=\"'.$facebookURL.'\" target=\"_blank\"><i class=\"fa fa-facebook icon\" aria-hidden=\"true\"></i></a>\n <a class=\"google-plus\" href=\"'.$googleURL.'\" target=\"_blank\"><i class=\"fa fa-google-plus icon\" aria-hidden=\"true\"></i></a>\n <a class=\"linkedin\" href=\"'.$linkedinURL.'\" target=\"_blank\"><i class=\"fa fa-linkedin icon\" aria-hidden=\"true\"></i></a>\n <a class=\"telegram\" href=\"'.$telegramURL.'\" target=\"_blank\"><i class=\"fa fa-paper-plane icon\" aria-hidden=\"true\"></i></a>\n </div>\n\n <p class=\"share-modal__post-title share-modal__post-title--small\">آدرس کوتاه شده این مطلب</p>\n <input type=\"text\" readonly=\"\" class=\"share-modal__link-box\" value=\"'.$pageURL.'\" onClick=\"this.select();\">\n </div>\n</div>';\n\n return $content;\n}", "function wpbook_safe_publish_to_facebook($post_ID) { \n\t$debug_file= WP_PLUGIN_DIR .'/wpbook/wpbook_pub_debug.txt';\n\n\tif(!class_exists('Facebook')) {\n\t\tinclude_once(WP_PLUGIN_DIR.'/wpbook/includes/client/facebook.php');\n\t}\t \n\t$wpbookOptions = get_option('wpbookAdminOptions');\n \n\tif (!empty($wpbookOptions)) {\n\t\tforeach ($wpbookOptions as $key => $option)\n\t\t$wpbookAdminOptions[$key] = $option;\n\t}\n \n\tif($wpbookOptions['wpbook_enable_debug'] == \"true\")\n\t\tdefine ('WPBOOKDEBUG',true);\n\telse\n\t\tdefine ('WPBOOKDEBUG',false);\n \n\t$api_key = $wpbookAdminOptions['fb_api_key'];\n\t$secret = $wpbookAdminOptions['fb_secret'];\n\t$target_admin = $wpbookAdminOptions['fb_admin_target'];\n\t$target_page = $wpbookAdminOptions['fb_page_target'];\n\t$stream_publish = $wpbookAdminOptions['stream_publish'];\n\t$stream_publish_pages = $wpbookAdminOptions['stream_publish_pages'];\n\t$wpbook_show_errors = $wpbookAdminOptions['show_errors'];\n\t$wpbook_promote_external = $wpbookAdminOptions['promote_external'];\n\t$wpbook_attribution_line = $wpbookAdminOptions['attribution_line'];\n\t$wpbook_as_note = $wpbookAdminOptions['wpbook_as_note'];\n\t$wpbook_target_group = $wpbookAdminOptions['wpbook_target_group'];\n \n\tif($wpbookOptions['wpbook_disable_sslverify'] == \"true\") {\n\t\tFacebook::$CURL_OPTS[CURLOPT_SSL_VERIFYPEER] = false;\n\t\tFacebook::$CURL_OPTS[CURLOPT_SSL_VERIFYHOST] = 2;\n\t}\n \n \n\t$facebook = new Facebook($api_key, $secret);\n\t$wpbook_user_access_token = get_option('wpbook_user_access_token','');\n\t$wpbook_page_access_token = get_option('wpbook_page_access_token','');\n \n\tif($wpbook_user_access_token == '') {\n\t\tif(WPBOOKDEBUG) {\n\t\t\t$fp = @fopen($debug_file, 'a');\n\t\t\tif(($fp) && (filesize($debug_file) > 500 * 1024)) { // 500k max to file\n\t\t\t\tfclose($fp);\n\t\t\t\t$fp = @fopen($debug_file,'w+'); // start over with a new file\n\t\t\t}\n\t\t\tif(!$fp) \n\t\t\t\tdefine('WPBOOKDEBUG',false); // stop trying\n\t\t\t$debug_string=date(\"Y-m-d H:i:s\",time()).\" : No user access token\\n\";\n\t\t\tif(is_writeable($debug_file)) {\n\t\t\t\tfwrite($fp, $debug_string);\n\t\t\t} else {\n\t\t\t\tfclose($fp);\n\t\t\t\tdefine (WPBOOKDEBUG,false); // if it isn't writeable don't keep trying \n\t\t\t}\n\t\t}\n\t}\n\tif((!empty($api_key)) && (!empty($secret)) && (!empty($target_admin)) && (($stream_publish == \"true\") || $stream_publish_pages == \"true\")) {\n\t\tif(($wpbook_user_access_token == '')&&($wpbook_page_access_token == '')) {\n\t\t\t// if both of these are blank, no point in the rest of publish_to_facebook\n\t\t\tif(WPBOOKDEBUG) {\n\t\t\t\t$fp = @fopen($debug_file, 'a');\n\t\t\t\t$debug_string=date(\"Y-m-d H:i:s\",time()).\" : No user access token or page access token.\\n\";\n\t\t\t\tfwrite($fp, $debug_string);\n\t\t\t}\n\t\t\tif($wpbook_show_errors) {\n\t\t\t\t$wpbook_message = 'Both user access token AND page access_token are blank. You must grant permissions before publishing will work.'; \n\t\t\t\twp_die($wpbook_message,'WPBook Error');\n\t\t\t}\n\t\treturn;\n\t\t} \n\n\t\tif(WPBOOKDEBUG) {\n\t\t\t$fp = @fopen($debug_file, 'a');\n\t\t\t$debug_string=date(\"Y-m-d H:i:s\",time()).\" : publish_to_facebook running, target_admin is \" . $target_admin .\"\\n\";\n\t\t\tfwrite($fp, $debug_string);\n\t\t}\n \n\t\t$my_post = get_post($post_ID);\n\t\tif(!empty($my_post->post_password)) { // post is password protected, don't post\n\t\t\treturn;\n\t\t}\n\t\tif(get_post_type($my_post->ID) != 'post') { // only do this for posts\n\t\t\treturn;\n\t\t}\n\t\tif(WPBOOKDEBUG) {\n\t\t\t$fp = @fopen($debug_file, 'a');\n\t\t\t$debug_string=date(\"Y-m-d H:i:s\",time()).\" : Post ID is \". $my_post->ID .\"\\n\";\n\t\t\tfwrite($fp, $debug_string);\n\t\t}\n \n\t\t$publish_meta = get_post_meta($my_post->ID,'wpbook_fb_publish',true); \n\t\tif(($publish_meta == 'no')) { // user chose not to post this one\n\t\t\treturn;\n\t\t}\n\t\t$my_title=$my_post->post_title;\n\t\t$my_author=get_userdata($my_post->post_author)->display_name;\n\t\tif($wpbook_promote_external) { \n\t\t\t$my_permalink = get_permalink($post_ID);\n\t\t} else {\n\t\t\t$my_permalink = wpbook_always_filter_postlink(get_permalink($post_ID));\n\t\t}\n\n\t\tif(WPBOOKDEBUG) {\n\t\t\t$fp = @fopen($debug_file, 'a');\n\t\t\t$debug_string=date(\"Y-m-d H:i:s\",time()).\" : My permalink is \". $my_permalink .\"\\n\";\n\t\t\tfwrite($fp, $debug_string);\n\t\t}\n \n\t\t$publish_meta_message = get_post_meta($my_post->ID,'wpbook_message',true); \n\t\tif($publish_meta_message) {\n\t\t\t$wpbook_description = $publish_meta_message;\n\t\t} else {\n\t\t\tif(($my_post->post_excerpt) && ($my_post->post_excerpt != '')) {\n\t\t\t\t$wpbook_description = stripslashes(wp_filter_nohtml_kses(apply_filters('the_content',$my_post->post_excerpt)));\n\t\t\t} else { \n\t\t\t\t$wpbook_description = stripslashes(wp_filter_nohtml_kses(apply_filters('the_content',$my_post->post_content)));\n\t\t\t}\n\t\t}\n\t\tif(strlen($wpbook_description) >= 995) {\n\t\t\t$space_index = strrpos(substr($wpbook_description, 0, 995), ' ');\n\t\t\t$short_desc = substr($wpbook_description, 0, $space_index);\n\t\t\t$short_desc .= '...';\n\t\t\t$wpbook_description = $short_desc;\n\t\t}\n\n\t\tif (function_exists('get_the_post_thumbnail') && has_post_thumbnail($my_post->ID)) {\n\t\t\tif(WPBOOKDEBUG) {\n\t\t\t\t$fp = @fopen($debug_file, 'a');\n\t\t\t\t$debug_string=date(\"Y-m-d H:i:s\",time()).\" : function exists, and this post has_post_thumbnail - post_Id is \". $my_post->ID .\" \\n\";\n\t\t\t\tfwrite($fp, $debug_string);\n\t\t\t} \n\t\t\t$my_thumb_id = get_post_thumbnail_id($my_post->ID);\n\t\t\tif(WPBOOKDEBUG) {\n\t\t\t\t$fp = @fopen($debug_file, 'a');\n\t\t\t\t$debug_string=date(\"Y-m-d H:i:s\",time()).\" : my_thumb_id is \". $my_thumb_id .\" \\n\";\n\t\t\t\tfwrite($fp, $debug_string);\n\t\t\t}\n\t\t\t$my_thumb_array = wp_get_attachment_image_src($my_thumb_id);\n\t\t\t$my_image = $my_thumb_array[0]; // this should be the url\n\t\t\tif(WPBOOKDEBUG) {\n\t\t\t\t$fp = @fopen($debug_file, 'a');\n\t\t\t\t$debug_string=date(\"Y-m-d H:i:s\",time()).\" : my_image is \". $my_image .\" \\n\";\n\t\t\t\tfwrite($fp, $debug_string);\n\t\t\t}\n\t\t} else {\n\t\t\tif(WPBOOKDEBUG) {\n\t\t\t\t$fp = @fopen($debug_file, 'a');\n\t\t\t\t$debug_string=date(\"Y-m-d H:i:s\",time()).\" : Get Post Thumbnail function does not exist, or no thumb \\n\";\n\t\t\t\tfwrite($fp, $debug_string);\n\t\t\t}\t\t \n\t\t\t$my_image = '';\n\t\t}\n\n\t\tif(WPBOOKDEBUG) {\n\t\t\t$fp = @fopen($debug_file, 'a');\n\t\t\t$debug_string=date(\"Y-m-d H:i:s\",time()).\" : Post thumbail is \". $my_image .\"\\n\";\n\t\t\tfwrite($fp, $debug_string);\n\t\t}\n\t\t$actions = json_encode(array(array('name'=>'Read More','link'=>$my_permalink)));\n\t\tif(WPBOOKDEBUG) {\n\t\t\t$fp = @fopen($debug_file, 'a');\n\t\t\t$debug_string=date(\"Y-m-d H:i:s\",time()).\" : Post share link is \". $my_link .\"\\n\";\n\t\t\tfwrite($fp, $debug_string);\n\t\t}\n \n\t\t/* This section handles publishing to user's wall */ \n\t\tif($stream_publish == \"true\") {\n\t\t\tif(WPBOOKDEBUG) {\n\t\t\t\t$fp = @fopen($debug_file, 'a');\n\t\t\t\t$debug_string=date(\"Y-m-d H:i:s\",time()).\" : Publishing to personal wall, admin is \" .$target_admin .\"\\n\";\n\t\t\t\tfwrite($fp, $debug_string);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\t$facebook->setAccessToken($wpbook_user_access_token);\n\t\t\t} catch (FacebookApiException $e) {\n\t\t\t\tif($wpbook_show_errors) {\n\t\t\t\t\t$wpbook_message = 'Caught exception setting user access token: ' . $e->getMessage() .'Error code: '. $e->getCode(); \n\t\t\t\t\twp_die($wpbook_message,'WPBook Error');\n\t\t\t\t} // end if for show errors\n\t\t\t} // end try-catch\n\t \n\t\t\t$fb_response = '';\n\t\t\ttry{\n\t\t\t\tif(($wpbook_as_note == 'note') || ($wpbook_as_note == 'true')) {\n\t\t\t\t\t/* notes on walls don't allow much */ \n\t\t\t\t\t$allowedtags = array('img'=>array('src'=>array(), 'style'=>array()), \n 'span'=>array('id'=>array(), 'style'=>array()), \n 'a'=>array('href'=>array()), 'p'=>array(),\n 'b'=>array(),'i'=>array(),'u'=>array(),'big'=>array(),\n 'small'=>array(), 'ul' => array(), 'li'=>array(),\n 'ol'=> array(), 'blockquote'=> array(),'h1'=>array(),\n 'h2'=> array(), 'h3'=>array(),\n );\n\t\t\t\t\tif(!empty($my_image)) {\n /* message, picture, link, name, caption, description, source */ \n\t\t\t\t\t\t$attachment = array( \n\t\t\t\t\t\t\t\t\t\t\t'subject' => $my_title,\n\t\t\t\t\t\t\t\t\t\t\t'link' => $my_permalink,\n\t\t\t\t\t\t\t\t\t\t\t'message' => wp_kses(stripslashes(apply_filters('the_content',$my_post->post_content)),$allowedtags), \n\t\t\t\t\t\t\t\t\t\t\t'picture' => $my_image, \n\t\t\t\t\t\t\t\t\t\t\t'actions' => $actions,\n\t\t\t\t\t\t\t\t\t\t\t); \n\t\t\t\t\t} else {\n\t\t\t\t\t\t$attachment = array( \n\t\t\t\t\t\t\t\t\t\t\t'subject' => $my_title,\n\t\t\t\t\t\t\t\t\t\t\t'link' => $my_permalink,\n\t\t\t\t\t\t\t\t\t\t\t'message' => wp_kses(stripslashes(apply_filters('the_content',$my_post->post_content)),$allowedtags), \n\t\t\t\t\t\t\t\t\t\t\t'actions' => $actions,\n\t\t\t\t\t\t\t\t\t\t\t); \n\t\t\t\t\t}\n\t\t\t\t\t/* allow other plugins to impact the attachment before posting */ \n\t\t\t\t\t$attachment = apply_filters('wpbook_attachment', $attachment, $my_post->ID);\n\t\t\t\t\tif(WPBOOKDEBUG) {\n\t\t\t\t\t\t$fp = @fopen($debug_file, 'a');\n\t\t\t\t\t\t$debug_string=date(\"Y-m-d H:i:s\",time()).\" : Publishing as note, $my_image is \" . $my_image .\" \\n\";\n\t\t\t\t\t\tfwrite($fp, $debug_string);\n\t\t\t\t\t}\n\t\t\t\t\t$fb_response = $facebook->api('/'. $target_admin .'/notes', 'POST', $attachment);\n\t\t\t\t\tif(WPBOOKDEBUG) {\n\t\t\t\t\t\t$fp = @fopen($debug_file, 'a');\n\t\t\t\t\t\t$debug_string=date(\"Y-m-d H:i:s\",time()).\" : Just published to api, fb_response is \". print_r($fb_response,true) .\"\\n\";\n\t\t\t\t\t\tfwrite($fp, $debug_string);\n\t\t\t\t\t}\n\t\t\t\t} elseif ($wpbook_as_note == 'link') {\n\t\t\t\t\t// post as link\n\t\t\t\t\t$attachment = array(\n\t\t\t\t\t\t\t\t\t\t'link' => $my_permalink,\n\t\t\t\t\t\t\t\t\t\t'message' => $wpbook_description,\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t$fb_response = $facebook->api('/'. $target_admin .'/links', 'POST', $attachment);\n\t\t\t\t} else {\n\t\t\t\t\t// post as a post\n\t\t\t\t\tif(!empty($my_image)) {\n\t\t\t\t\t\t/* message, picture, link, name, caption, description, source */ \n\t\t\t\t\t\t$attachment = array( \n\t\t\t\t\t\t\t\t\t\t\t'name' => $my_title,\n\t\t\t\t\t\t\t\t\t\t\t'link' => $my_permalink,\n\t\t\t\t\t\t\t\t\t\t\t'description' => $wpbook_description, \n\t\t\t\t\t\t\t\t\t\t\t'picture' => $my_image,\n\t\t\t\t\t\t\t\t\t\t\t'actions' => $actions,\n\t\t\t\t\t\t\t\t\t\t\t); \n\t\t\t\t\t} else {\n\t\t\t\t\t\t$attachment = array( \n\t\t\t\t\t\t\t\t\t\t\t'name' => $my_title,\n\t\t\t\t\t\t\t\t\t\t\t'link' => $my_permalink,\n\t\t\t\t\t\t\t\t\t\t\t'description' => $wpbook_description, \n\t\t\t\t\t\t\t\t\t\t\t'comments_xid' => $post_ID, \n\t\t\t\t\t\t\t\t\t\t\t'actions' => $actions,\n\t\t\t\t\t\t\t\t\t\t\t); \n\t\t\t\t\t}\n\t\t\t\t\t\t/* allow other plugins to impact the attachment before posting */ \n\t\t\t\t\t$attachment = apply_filters('wpbook_attachment', $attachment, $my_post->ID);\n\t\t\t\t\tif(WPBOOKDEBUG) {\n\t\t\t\t\t\t$fp = @fopen($debug_file, 'a');\n\t\t\t\t\t\t$debug_string=date(\"Y-m-d H:i:s\",time()).\" : Publishing as excerpt, $my_image is \" . $my_image .\" \\n\";\n\t\t\t\t\t\tfwrite($fp, $debug_string);\n\t\t\t\t\t}\n\t\t\t\t\t$fb_response = $facebook->api('/'. $target_admin .'/feed', 'POST', $attachment); \n\t\t\t\t\tif(WPBOOKDEBUG) {\n\t\t\t\t\t\t$fp = @fopen($debug_file, 'a');\n\t\t\t\t\t\t$debug_string=date(\"Y-m-d H:i:s\",time()).\" : Just published to api, fb_response is \". print_r($fb_response,true) .\"\\n\";\n\t\t\t\t\t\tfwrite($fp, $debug_string);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (FacebookApiException $e) {\n\t\t\t\tif($wpbook_show_errors) {\n\t\t\t\t\t$wpbook_message = 'Caught exception in stream publish for user: ' . $e->getMessage() .'Error code: '. $e->getCode(); \n\t\t\t\t\twp_die($wpbook_message,'WPBook Error');\n\t\t\t\t} // end if for show errors\n\t\t\t} // end try-catch\n\t\t\tif($fb_response != '') {\n\t\t\t\tadd_post_meta($my_post->ID,'_wpbook_user_stream_id', $fb_response[id]);\n\t\t\t\tadd_post_meta($my_post->ID,'_wpbook_user_stream_time',0); // no comments imported yet\n\t\t\t} // end of if $response\n\t\t} // end of if stream_publish \n \n\t\tif(WPBOOKDEBUG) {\n\t\t\t$fp = @fopen($debug_file, 'a');\n\t\t\t$debug_string=date(\"Y-m-d H:i:s\",time()).\" : Past stream_publish, fb_response is \". print_r($fb_response,true) .\"\\n\";\n\t\t\tfwrite($fp, $debug_string);\n\t\t}\n \n\t\t/* This section handls publishing to group wall */ \n\t\tif(($stream_publish_pages == \"true\") && (!empty($wpbook_target_group))) {\n\t\t\t$fb_response = '';\n\t\t\t/* Publishing to a group's wall requires the user access token, and \n\t\t\t * is published as coming from the user, not the group - different process\n\t\t\t * than Pages \n\t\t\t */ \n\t\t\ttry {\n\t\t\t\t$facebook->setAccessToken($wpbook_user_access_token);\n\t\t\t} catch (FacebookApiException $e) {\n\t\t\t\tif($wpbook_show_errors) {\n\t\t\t\t\t$wpbook_message = 'Caught exception setting user access token: ' . $e->getMessage() .'Error code: '. $e->getCode(); \n\t\t\t\t\twp_die($wpbook_message,'WPBook Error');\n\t\t\t\t} // end if for show errors\n\t\t\t} // end try-catch\n\n\t\t\tif(WPBOOKDEBUG) {\n\t\t\t\t$fp = @fopen($debug_file, 'a');\n\t\t\t\t$debug_string=date(\"Y-m-d H:i:s\",time()).\" : Group access token is \". $wpbook_user_access_token .\"\\n\";\n\t\t\t\t$debug_string=date(\"Y-m-d H:i:s\",time()).\" : Publishing to group \" . $wpbook_target_group .\"\\n\";\n\t\t\t\tfwrite($fp, $debug_string);\n\t\t\t}\n\t\t\ttry{\n\t\t\t\t// post as an excerpt\n\t\t\t\tif(!empty($my_image)) {\n\t\t\t\t\t/* message, picture, link, name, caption, description, source */ \n\t\t\t\t\t$attachment = array( \n\t\t\t\t\t\t\t\t\t\t'name' => $my_title,\n\t\t\t\t\t\t\t\t\t\t'link' => $my_permalink,\n\t\t\t\t\t\t\t\t\t\t'description' => $wpbook_description, \n\t\t\t\t\t\t\t\t\t\t'picture' => $my_image, \n\t\t\t\t\t\t\t\t\t\t'actions' => $actions,\n\t\t\t\t\t\t\t\t\t\t); \n\t\t\t\t} else {\n\t\t\t\t\t$attachment = array( \n\t\t\t\t\t\t\t\t\t\t'name' => $my_title,\n\t\t\t\t\t\t\t\t\t\t'link' => $my_permalink,\n\t\t\t\t\t\t\t\t\t\t'description' => $wpbook_description, \n\t\t\t\t\t\t\t\t\t\t'actions' => $actions,\n\t\t\t\t\t\t\t\t\t\t); \n\t\t\t\t}\n\t\t\t\t/* allow other plugins to impact the attachment before posting */ \n\t\t\t\t$attachment = apply_filters('wpbook_attachment', $attachment, $my_post->ID);\n\t\t\t\tif(WPBOOKDEBUG) {\n\t\t\t\t\t$fp = @fopen($debug_file, 'a');\n\t\t\t\t\t$debug_string=date(\"Y-m-d H:i:s\",time()).\" : Publishing to group, image is \" . $my_image .\" \\n\";\n\t\t\t\t\tfwrite($fp, $debug_string);\n\t\t\t\t}\n\t\t\t\tif($wpbook_as_link == 'link') {\n\t\t\t\t\t$attachment = array(\n\t\t\t\t\t\t\t\t\t\t'link' => $my_permalink,\n\t\t\t\t\t\t\t\t\t\t'message' => $wpbook_description,\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t$fb_response = $facebook->api('/'. $wpbook_target_group .'/links','POST',$attachment);\n\t\t\t\t} else {\n\t\t\t\t\t$fb_response = $facebook->api('/'. $wpbook_target_group .'/feed/','POST', $attachment); \n\t\t\t\t}\n\t\t\t\tif(WPBOOKDEBUG) {\n\t\t\t\t\t$fp = @fopen($debug_file, 'a');\n\t\t\t\t\t$debug_string=date(\"Y-m-d H:i:s\",time()).\" : Just published to group via api, fb_response is \". print_r($fb_response,true) .\"\\n\";\n\t\t\t\t\tfwrite($fp, $debug_string);\n\t\t\t\t}\n\t\t\t} catch (FacebookApiException $e) {\n\t\t\t\tif($wpbook_show_errors) {\n\t\t\t\t\t$fp = @fopen($debug_file, 'a');\n\t\t\t\t\t$wpbook_message = 'Caught exception in publish to group ' . $e->getMessage() . ' Error code: ' . $e->getCode();\n\t\t\t\t\twp_die($wpbook_message,'WPBook Error');\n\t\t\t\t} // end if for show errors\n\t\t\t} // end try/catch for publish to group\n\t\t\tif($fb_response != '') {\n\t\t\t\tadd_post_meta($my_post->ID,'_wpbook_group_stream_id',$fb_response[id]);\n\t\t\t\tadd_post_meta($my_post->ID,'_wpbook_group_stream_time',0); // no comments imported\n\t\t\t} else {\n\t\t\t\t$wpbook_message = 'No post id returned from Facebook, $fb_response was ' . print_r($fb_response,true) . '/n';\n\t\t\t\t$wpbook_message = $wpbook_message . ' and $fb_page_type was ' . $fb_page_type;\n\t\t\t\t$wpbook_message .= ' and $wpbook_description was ' . $wpbook_description;\n\t\t\t\t$wpbook_message .= ' and $my_title was ' . $my_title;\n\t\t\t\twp_die($wpbook_message,'WPBook Error publishing to group'); \n\t\t\t} \n\t\t} // end of publish to group\n \n\t\t/* This section handles publishing to page wall */ \n\t\tif(($stream_publish_pages == \"true\") && (!empty($target_page))) { \n\t\t\t// publish to page with new api\n\t\t\t$fb_response = '';\n\t\t\tif($wpbook_page_access_token == '') {\n\t\t\t\tif(WPBOOKDEBUG) {\n\t\t\t\t\t$fp = @fopen($debug_file, 'a');\n\t\t\t\t\t$debug_string=date(\"Y-m-d H:i:s\",time()).\" : No Access Token for Publishing to Page\\n\";\n\t\t\t\t\tfwrite($fp, $debug_string);\n\t\t\t\t}\n\t\t\t\treturn; // no page access token, no point in trying to publish\n\t\t\t} \t \n\t\t\tif(WPBOOKDEBUG) {\n\t\t\t\t$fp = @fopen($debug_file, 'a');\n\t\t\t\t$debug_string=date(\"Y-m-d H:i:s\",time()).\" : Page access token is \". $wpbook_page_access_token .\"\\n\";\n\t\t\t\t$debug_string=date(\"Y-m-d H:i:s\",time()).\" : Publishing to page \" . $target_page .\"\\n\";\n\t\t\t\tfwrite($fp, $debug_string);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\t$facebook->setAccessToken($wpbook_page_access_token);\n\t\t\t} catch (FacebookApiException $e) {\n\t\t\t\tif($wpbook_show_errors) {\n\t\t\t\t\t$wpbook_message = 'Caught exception setting page access token: ' . $e->getMessage() .'Error code: '. $e->getCode(); \n\t\t\t\t\twp_die($wpbook_message,'WPBook Error');\n\t\t\t\t} // end if for show errors\n\t\t\t} // end try-catch\n\t\t\ttry{\n\t\t\t\t// post as an excerpt\n\t\t\t\tif(!empty($my_image)) {\n\t\t\t\t\t/* message, picture, link, name, caption, description, source */ \n\t\t\t\t\t$attachment = array( \n\t\t\t\t\t\t\t\t\t\t'name' => $my_title,\n\t\t\t\t\t\t\t\t\t\t'link' => $my_permalink,\n\t\t\t\t\t\t\t\t\t\t'description' => $wpbook_description, \n\t\t\t\t\t\t\t\t\t\t'picture' => $my_image, \n\t\t\t\t\t\t\t\t\t\t'actions' => $actions, \n\t\t\t\t\t\t\t\t\t\t); \n\t\t\t\t} else {\n\t\t\t\t\t$attachment = array( \n\t\t\t\t\t\t\t\t\t\t'name' => $my_title,\n\t\t\t\t\t\t\t\t\t\t'link' => $my_permalink,\n\t\t\t\t\t\t\t\t\t\t'description' => $wpbook_description, \n\t\t\t\t\t\t\t\t\t\t'actions' => $actions,\n\t\t\t\t\t\t\t\t\t\t); \n\t\t\t\t}\n\t\t\t\t/* allow other plugins to impact the attachment before posting */ \n\t\t\t\t$attachment = apply_filters('wpbook_attachment', $attachment, $my_post->ID);\n\t\t\t\tif(WPBOOKDEBUG) {\n\t\t\t\t\t$fp = @fopen($debug_file, 'a');\n\t\t\t\t\t$debug_string=date(\"Y-m-d H:i:s\",time()).\" : Publishing to page, image is \" . $my_image .\" \\n\";\n\t\t\t\t\tfwrite($fp, $debug_string);\n\t\t\t\t}\n\t\t\t\tif($wpbook_as_link == 'link') {\n\t\t\t\t\t$attachment = array(\n\t\t\t\t\t\t\t\t\t\t'link' => $my_permalink,\n\t\t\t\t\t\t\t\t\t\t'message' => $wpbook_description,\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t$fb_response = $facebook->api('/'. $target_page .'/links/','POST',$attachment); \n\t\t\t\t} else {\n\t\t\t\t\t$fb_response = $facebook->api('/'. $target_page .'/feed/','POST', $attachment); \n\t\t\t\t}\n\t\t\t\tif(WPBOOKDEBUG) {\n\t\t\t\t\t$fp = @fopen($debug_file, 'a');\n\t\t\t\t\t$debug_string=date(\"Y-m-d H:i:s\",time()).\" : Just published as page to api, fb_response is \". print_r($fb_response,true) .\"\\n\";\n\t\t\t\t\tfwrite($fp, $debug_string);\n\t\t\t\t}\n\t\t\t} catch (FacebookApiException $e) {\n\t\t\t\tif($wpbook_show_errors) {\n\t\t\t\t\t$fp = @fopen($debug_file, 'a');\n\t\t\t\t\t$wpbook_message = 'Caught exception in publish to page ' . $e->getMessage() . ' Error code: ' . $e->getCode();\n\t\t\t\t\twp_die($wpbook_message,'WPBook Error');\n\t\t\t\t} // end if for show errors\n\t\t\t} // end try/catch for publish to page\n\t\t\tif($fb_response != '') {\n\t\t\t\tadd_post_meta($my_post->ID,'_wpbook_page_stream_id',$fb_response[id]);\n\t\t\t\tadd_post_meta($my_post->ID,'_wpbook_page_stream_time',0); // no comments imported\n\t\t\t} else {\n\t\t\t\t$wpbook_message = 'No post id returned from Facebook, $fb_response was ' . print_r($fb_response,true) . '/n';\n\t\t\t\t$wpbook_message = $wpbook_message . ' and $fb_page_type was ' . $fb_page_type;\n\t\t\t\t$wpbook_message .= ' and $wpbook_description was ' . $wpbook_description;\n\t\t\t\t$wpbook_message .= ' and $my_title was ' . $my_title;\n\t\t\t\twp_die($wpbook_message,'WPBook Error publishing to page'); \n\t\t\t}\n\t\t} // end of if stream_publish_pages is true AND target_page non-empty\n\t} // end for if stream_publish OR stream_publish_pages is true\n}", "function insert_fb_in_head()\n{\n\t\tglobal $post;\n\t\tif (!is_singular()) //if it is not a post or a page\n\t\t\t\treturn;\n\n\t\tif ($excerpt = $post->post_excerpt)\n\t\t{\n\t\t\t\t$excerpt = strip_tags($post->post_excerpt);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\t$excerpt = get_bloginfo('description');\n\t\t}\n\n\t\t//echo '<meta property=\"fb:app_id\" content=\"YOUR APPID\"/>'; //<-- this is optional\n\t\techo '<meta property=\"og:title\" content=\"' . get_the_title() . '\"/>';\n\t\techo '<meta property=\"og:description\" content=\"' . $excerpt . '\"/>';\n\t\techo '<meta property=\"og:type\" content=\"article\"/>';\n\t\techo '<meta property=\"og:url\" content=\"' . get_permalink() . '\"/>';\n\t\techo '<meta property=\"og:site_name\" content=\"' . get_bloginfo() . '\"/>';\n\n\t\techo '<meta name=\"twitter:title\" content=\"' . get_the_title() . '\"/>';\n\t\techo '<meta name=\"twitter:card\" content=\"summary\" />';\n\t\techo '<meta name=\"twitter:description\" content=\"' . $excerpt . '\" />';\n\t\techo '<meta name=\"twitter:url\" content=\"' . get_permalink() . '\"/>';\n\n\t\tif (!has_post_thumbnail($post->ID))\n\t\t{\n\t\t\t\t//the post does not have featured image, use a default image\n\t\t\t\t//$default_image = \"http://example.com/image.jpg\"; //<--replace this with a default image on your server or an image in your media library\n\t\t\t\t//echo '<meta property=\"og:image\" content=\"' . $default_image . '\"/>';\n\t\t\t\t//echo '<meta name=\"twitter:image\" content=\"' . $default_image . '\"/>';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\t$thumbnail_src = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'large');\n\t\t\t\techo '<meta property=\"og:image\" content=\"' . esc_attr($thumbnail_src[0]) . '\"/>';\n\t\t\t\techo '<meta name=\"twitter:image\" content=\"' . esc_attr($thumbnail_src[0]) . '\"/>';\n\t\t}\n}", "function post_like() {\n\t\n$like = '<iframe src=\"http://www.facebook.com/plugins/like.php?href=' . get_permalink() .'&amp;layout=button_count&amp;show_faces=false&amp;width=450&amp;action=like&amp;colorscheme=light\" scrolling=\"no\" frameborder=\"0\" allowTransparency=\"true\" style=\"border:none; overflow:hidden; width:450px; height:60px;\"></iframe>';\necho $like;\n $twwite='<a href=\"http://twitter.com/share\" class=\"twitter-share-button\" data-text=\"<?php the_title(); ?>\" data-url=\"' . get_permalink() .'\" data-via=\"diythemes\">Tweet</a>\n <script type=\"text/javascript\" src=\"http://platform.twitter.com/widgets.js\"></script>';\necho $twwite;\n\t\t\n}", "function sfc_publish_automatic($id, $post) {\r\n\tif ($post->post_status !== 'publish') return;\r\n\t\r\n\t// check options to see if we need to send to FB at all\r\n\t$options = get_option('sfc_options');\r\n\tif (!$options['autopublish_app'] && !$options['autopublish_profile']) \r\n\t\treturn; \r\n\r\n\t// load facebook platform\r\n\tinclude_once 'facebook-platform/facebook.php';\r\n\t$fb=new Facebook($options['api_key'], $options['app_secret']);\r\n\r\n\t// check to see if we can send to FB at all\r\n\t$result = $fb->api_client->users_hasAppPermission('publish_stream');\r\n\tif (!$result) return; \r\n\t\r\n\t// build the post to send to FB\r\n\t\r\n\t// apply the content filters, in case some plugin is doing weird image stuff\r\n\t$content = apply_filters('the_content', $post->post_content);\r\n\r\n\t// look for the images to add with image_src\r\n\t// TODO use the new post thumbnail functionality in 2.9, somehow. Perhaps force that image first? Dunno.\r\n\t$images = array();\r\n\tif ( preg_match_all('/<img (.+?)>/', $content, $matches) ) {\r\n\t\tforeach ($matches[1] as $match) {\r\n\t\t\tforeach ( wp_kses_hair($match, array('http')) as $attr) \r\n\t\t\t\t$img[$attr['name']] = $attr['value'];\r\n\t\t\tif ( isset($img['src']) ) {\r\n\t\t\t\tif ( isset( $img['class'] ) && false === strpos( $img['class'], 'wp-smiley' ) ) { // ignore smilies\r\n\t\t\t\t\t$images[] = $img['src'];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// build the attachment\r\n\t$permalink = get_permalink($post->ID);\r\n\t$attachment['name'] = $post->post_title;\r\n\t$attachment['href'] = $permalink;\r\n\t$attachment['description'] = sfc_publish_make_excerpt($post->post_content);\r\n\t$attachment['comments_xid'] = urlencode($permalink);\r\n\r\n\t// image attachments (up to 5, as that's all FB allows)\r\n\t$count=0;\r\n\tforeach ($images as $image) {\r\n\t\t$attachment['media'][$count]['type'] = 'image';\r\n\t\t$attachment['media'][$count]['src'] = $image;\r\n\t\t$attachment['media'][$count]['href'] = $permalink;\r\n\t\t$count++; if ($count==5) break;\r\n\t}\r\n\r\n\t// Read Post link\r\n\t$action_links[0]['text'] = 'Read Post';\r\n\t$action_links[0]['href'] = $permalink;\r\n\t\r\n\t// Link to comments\r\n\t$action_links[1]['text'] = 'See Comments';\r\n\t$action_links[1]['href'] = get_comments_link($post->ID);\r\n\r\n\r\n\t// publish to page\r\n\t/* Does not work yet: See http://bugs.developers.facebook.com/show_bug.cgi?id=8184\r\n\tif ($options['autopublish_app'] && !get_post_meta($id,'_fb_post_id_app',true)) {\r\n\t\tif ($options['fanpage']) $who = $options['fanpage'];\r\n\t\telse $who = $options['appid'];\r\n\t\t$fb_post_id = $fb->api_client->stream_publish(null, json_encode($attachment), json_encode($action_links), $who, $who);\r\n\t\tif ($fb_post_id) {\r\n\t\t\t// update the post id so as to prevent automatically posting it twice\r\n\t\t\tupdate_post_meta($id,'_fb_post_id_app',$fb_post_id);\r\n\t\t}\r\n\t}\r\n\t*/\r\n\t\r\n\t// publish to profile\r\n\tif ($options['autopublish_profile'] && !get_post_meta($id,'_fb_post_id_profile',true)) {\r\n\t\t$fb_post_prof_id = $fb->api_client->stream_publish(null, json_encode($attachment), json_encode($action_links));\r\n\t\tif ($fb_post_prof_id) {\r\n\t\t\t// update the post id so as to prevent automatically posting it twice\r\n\t\t\tupdate_post_meta($id,'_fb_post_id_profile',$fb_post_prof_id);\r\n\t\t}\r\n\t}\t\r\n}", "function widget_ffes_feed_init() {\r\n\r\n // Check for the required API functions\r\n if ( !function_exists('register_sidebar_widget') || !function_exists('register_widget_control') )\r\n return;\r\n\r\n // This saves options and prints the widget's config form.\r\n function widget_ffes_feed_control() {\r\n $options = $newoptions = get_option('widget_ffes_feed');\r\n if ( $_POST['ffes-feed-submit'] ) {\r\n $newoptions['title'] = strip_tags(stripslashes($_POST['ffes-feed-title']));\r\n }\r\n if ( $options != $newoptions ) {\r\n $options = $newoptions;\r\n update_option('widget_ffes_feed', $options);\r\n }\r\n ?>\r\n <div style=\"text-align:right\">\r\n <label for=\"ffes-feed-title\" style=\"line-height:35px;display:block;\"><?php _e('Widget title:', 'ffes_widgets'); ?>\r\n <input type=\"text\" id=\"ffes-feed-title\" name=\"ffes-feed-title\" value=\"<?php echo wp_specialchars($options['title'], true); ?>\" /></label>\r\n <input type=\"hidden\" name=\"ffes-feed-submit\" id=\"ffes-feed-submit\" value=\"1\" />\r\n </div>\r\n <?php\r\n }\r\n\r\n // This prints the widget\r\n function widget_ffes_feed($args) {\r\n extract($args);\r\n $defaults = array('count' => 10, 'username' => 'wordpress');\r\n $options = (array) get_option('widget_ffes_feed');\r\n\r\n foreach ( $defaults as $key => $value )\r\n if ( !isset($options[$key]) )\r\n $options[$key] = $defaults[$key];\r\n//feed copy\r\n$feed_text = \"<script language=\\\"JavaScript\\\" type=\\\"text/javascript\\\">document.write('<scr' + 'ipt language=\\\"JavaScript\\\" type=\\\"text/javascript\\\" src=\\\"http://www.familyfeatures.com/wordpress/food/foodhandler.ashx' + window.location.search + '\\\"></scr' + 'ipt>'\r\n);</script>\";\r\n ?>\r\n <?php echo $before_widget; ?>\r\n <?php echo $before_title . $options['title'] . $after_title; ?>\r\n <?php echo \"$feed_text\"; ?>\r\n <?php echo $after_widget; ?>\r\n<?php\r\n }\r\n\r\n // Tell Dynamic Sidebar about our new widget and its control\r\n register_sidebar_widget(array('Weekly Food Section Widget', 'ffes_widgets'), 'widget_ffes_feed');\r\n register_widget_control(array('Weekly Food Section Widget', 'ffes_widgets'), 'widget_ffes_feed_control');\r\n\r\n}", "function print_embed_sharing_dialog()\n {\n }", "public function add_open_graph_meta() {\n\t\t// Create/check default values\n\t\t$info = array(\n\t\t\t'postID' => absint( get_the_ID() ),\n\t\t\t'title' => esc_html( get_the_title() ),\n\t\t\t'imageURL' => get_post_thumbnail_id( absint( get_the_ID() ) ),\n\t\t\t'description' => esc_html( Kiwi_Social_Share_Helper::get_excerpt_by_id( absint( get_the_ID() ) ) ),\n\t\t\t'fb_app_id' => esc_attr( Kiwi_Social_Share_Helper::get_setting_value( 'facebook_page_id', '', 'kiwi_social_identities' ) ),\n\t\t\t'fp_url' => esc_attr( Kiwi_Social_Share_Helper::get_setting_value( 'facebook_page_url', '', 'kiwi_social_identities' ) ),\n\t\t\t'user_twitter_handle' => esc_attr( Kiwi_Social_Share_Helper::get_setting_value( 'twitter_username', '', 'kiwi_social_identities' ) )\n\t\t);\n\n\t\tif ( ! empty( $info['user_twitter_handle'] ) ) {\n\t\t\t$info['user_twitter_handle'] = str_replace( '@', '', $info['user_twitter_handle'] );\n\t\t}\n\n\t\t$metabox = array(\n\t\t\t'title' => get_post_meta( get_the_ID(), 'kiwi_social-media-title', true ),\n\t\t\t'description' => get_post_meta( get_the_ID(), 'kiwi_social-media-description', true ),\n\t\t\t'imageURL' => get_post_meta( get_the_ID(), 'kiwi_social-media-image', true ),\n\t\t\t'twitter_description' => get_post_meta( get_the_ID(), 'kiwi_social-media-custom-tweet', true ),\n\t\t);\n\n\t\t$info = wp_parse_args( $metabox, $info );\n\n\t\t$twitter_button = new Kiwi_Social_Share_Social_Button_Twitter();\n\t\t$url = $twitter_button->get_current_page_url( get_the_ID() );\n\n\t\t$info['header_output'] = '';\n\t\t// We only modify the Open Graph tags on single blog post pages\n\t\tif ( is_singular() ) {\n\t\t\tif ( ( isset( $info['title'] ) && $info['title'] ) || ( isset( $info['description'] ) && $info['description'] ) || ( isset( $info['imageURL'] ) && $info['imageURL'] ) ) {\n\n\t\t\t\t// Check if Yoast Exists so we can coordinate output with their plugin accordingly\n\t\t\t\tif ( ! defined( 'WPSEO_VERSION' ) ) {\n\t\t\t\t\t// Add twitter stuff\n\t\t\t\t\t$info['header_output'] .= PHP_EOL . '<!-- Twitter OG tags by Kiwi Social Sharing Plugin -->';\n\n\t\t\t\t\t$info['header_output'] .= PHP_EOL . '<meta name=\"twitter:card\" content=\"summary\" />';\n\t\t\t\t\t$info['header_output'] .= PHP_EOL . '<meta name=\"twitter:title\" content=\"' . trim( $info['title'] ) . '\" />';\n\t\t\t\t\t$info['header_output'] .= PHP_EOL . '<meta name=\"twitter:url\" content=\"' . esc_url( $url ) . '\" />';\n\n\t\t\t\t\tif ( ! empty( $info['user_twitter_handle'] ) ) {\n\t\t\t\t\t\t$info['header_output'] .= PHP_EOL . '<meta name=\"twitter:site\" content=\"' . trim( $info['user_twitter_handle'] ) . '\" />';\n\t\t\t\t\t\t$info['header_output'] .= PHP_EOL . '<meta name=\"twitter:creator\" content=\"' . trim( $info['user_twitter_handle'] ) . '\" />';\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( ! empty( $info['twitter_description'] ) ) {\n\t\t\t\t\t\t$info['header_output'] .= PHP_EOL . '<meta name=\"twitter:description\" content=\"' . esc_attr( $info['twitter_description'] ) . '\" />';\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( ! empty( $info['imageURL'] ) ) {\n\t\t\t\t\t\t$info['header_output'] .= PHP_EOL . '<meta name=\"twitter:image\" content=\"' . esc_attr( $info['imageURL'] ) . '\" />';\n\t\t\t\t\t}\n\n\t\t\t\t\t$info['header_output'] .= PHP_EOL . '<!-- / Twitter OG tags by Kiwi Social Sharing Plugin -->';\n\n\t\t\t\t\t// Add all our Open Graph Tags to the Return Header Output\n\t\t\t\t\t$info['header_output'] .= PHP_EOL . '<!-- Meta OG tags by Kiwi Social Sharing Plugin -->';\n\t\t\t\t\t$info['header_output'] .= PHP_EOL . '<meta property=\"og:type\" content=\"article\" /> ';\n\n\t\t\t\t\t// Open Graph Title: Create an open graph title meta tag\n\t\t\t\t\tif ( $info['title'] ) {\n\t\t\t\t\t\t// If nothing else is defined, let's use the post title\n\t\t\t\t\t\t$info['header_output'] .= PHP_EOL . '<meta property=\"og:title\" content=\"' . Kiwi_Social_Share_Helper::convert_smart_quotes( htmlspecialchars_decode( get_the_title() ) ) . '\" />';\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( $info['description'] ) {\n\t\t\t\t\t\t// If nothing else is defined, let's use the post excerpt\n\t\t\t\t\t\t$info['header_output'] .= PHP_EOL . '<meta property=\"og:description\" content=\"' . Kiwi_Social_Share_Helper::convert_smart_quotes( $info['description'] ) . '\" />';\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( has_post_thumbnail( $info['postID'] ) ) {\n\t\t\t\t\t\t// If nothing else is defined, let's use the post Thumbnail as long as we have the URL cached\n\t\t\t\t\t\t$og_image = wp_get_attachment_image_src( get_post_thumbnail_id( $info['postID'] ), 'full' );\n\t\t\t\t\t\tif ( $og_image ) {\n\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL . '<meta property=\"og:image\" content=\"' . esc_url( $og_image[0] ) . '\" />';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$info['header_output'] .= PHP_EOL . '<meta property=\"og:url\" content=\"' . esc_url( $url ) . '\" />';\n\t\t\t\t\t$info['header_output'] .= PHP_EOL . '<meta property=\"og:site_name\" content=\"' . esc_attr( get_bloginfo( 'name' ) ) . '\" />';\n\t\t\t\t\t$info['header_output'] .= PHP_EOL . '<meta property=\"article:published_time\" content=\"' . esc_attr( get_post_time( 'c' ) ) . '\" />';\n\t\t\t\t\t$info['header_output'] .= PHP_EOL . '<meta property=\"article:modified_time\" content=\"' . esc_attr( get_post_modified_time( 'c' ) ) . '\" />';\n\t\t\t\t\t$info['header_output'] .= PHP_EOL . '<meta property=\"og:updated_time\" content=\"' . esc_attr( get_post_modified_time( 'c' ) ) . '\" />';\n\n\t\t\t\t\t// add facebook app id\n\t\t\t\t\tif ( ! empty( $info['fb_app_id'] ) ) {\n\t\t\t\t\t\t$info['header_output'] .= PHP_EOL . '<meta property = \"fb:app_id\" content=\"' . trim( $info['fb_app_id'] ) . '\" />';\n\t\t\t\t\t}\n\n\t\t\t\t\t// add facebook url\n\t\t\t\t\tif ( ! empty( $info['fp_url'] ) ) {\n\t\t\t\t\t\t$info['header_output'] .= PHP_EOL . '<meta property=\"article:publisher\" content=\"' . trim( $info['fp_url'] ) . '\" />';\n\t\t\t\t\t}\n\n\t\t\t\t\t// append the closing comment :)\n\t\t\t\t\t$info['header_output'] .= PHP_EOL . '<!--/end meta tags by Kiwi Social Sharing Plugin -->';\n\t\t\t\t\t// Return the variable containing our information for the meta tags\n\t\t\t\t\techo $info['header_output'] . PHP_EOL;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function ailyak_facebook_group_feed()\n{\n // fuck options!\n // hardcode everything!\n \n // @TODO remove access_token before github publishing\n $token = ''; // put your token here!\n $url = \"https://graph.facebook.com/v2.3/561003627289743/feed?limit=10&access_token={$token}\";\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_TIMEOUT, 5);\n\n $data = curl_exec($ch);\n curl_close($ch);\n $dataDecoded = json_decode($data, true);\n $posts = $dataDecoded['data'];\n \n // I have twig template,\n // but I don't have time to\n // include twig in stupid the wordpress\n \n // yes, I know ....\n // code sux... I know...\n // Today worktime: 10h 25min\n \n $return = '\n <style>\n\n .fbcomments {\n width: 100%;\n }\n \n .fbcommentreply {\n margin-left: 30px !important;\n }\n\n .fbcomments div {\n margin: auto; \n }\n\n /* Default Facebook CSS */\n .fbbody\n {\n font-family: \"lucida grande\" ,tahoma,verdana,arial,sans-serif;\n font-size: 11px;\n color: #333333;\n }\n /* Default Anchor Style */\n .fbbody a\n {\n color: #3b5998;\n outline-style: none;\n text-decoration: none;\n font-size: 11px;\n font-weight: bold;\n }\n .fbbody a:hover\n {\n text-decoration: underline;\n }\n /* Facebook Box Styles */\n .fbgreybox\n {\n background-color: #f7f7f7;\n border: 1px solid #cccccc;\n color: #333333;\n padding: 10px;\n font-size: 13px;\n font-weight: bold;\n }\n .fbbluebox\n {\n background-color: #eceff6;\n border: 1px solid #d4dae8;\n color: #333333;\n padding: 10px;\n font-size: 13px;\n font-weight: bold;\n }\n .fbinfobox\n {\n background-color: #fff9d7;\n border: 1px solid #e2c822;\n color: #333333;\n padding: 10px;\n font-size: 13px;\n font-weight: bold;\n }\n\n .fbcomment {\n text-align: left;\n }\n\n .fberrorbox\n {\n background-color: #ffebe8;\n border: 1px solid #dd3c10;\n color: #333333;\n padding: 10px;\n font-size: 13px;\n font-weight: bold;\n }\n /* Content Divider on White Background */\n .fbcontentdivider\n {\n margin-top: 15px;\n margin-bottom: 15px;\n width: 520px;\n height: 1px;\n background-color: #d8dfea;\n }\n /* Facebook Tab Style */\n .fbtab\n {\n padding: 8px;\n background-color: #d8dfea;\n color: #3b5998;\n font-weight: bold;\n float: left;\n margin-right: 4px;\n text-decoration: none;\n }\n .fbtab:hover\n {\n background-color: #3b5998;\n color: #ffffff;\n cursor: hand;\n }\n\n </style>\n ';\n \n $return .= '<div class=\"fbcomments\">';\n foreach ($posts as $post) :\n \n array_walk_recursive($post, 'ailyak_facebook_group_feed_html_escape');\n if (!empty($post['message'])):\n $postId = $post['id'];\n $postName = $post['from']['name'];\n $message = nl2br($post['message']);\n $postTimeDatetime = new \\DateTime($post['created_time']);\n $postTime = $postTimeDatetime->format(\"M, d, D, G:h\");\n $postLink = $post['actions'][0]['link'];\n \n $return .= '\n <div class=\"fbinfobox fbcomment\"> \n <div>\n <a href=\"https://www.facebook.com/' . $postId . '\">' . $postName . '</a>,\n <a href=\"' . $postLink . '\">\n ' . $postTime . '\n </a>\n </div>\n\n ' . $message . '\n </div>\n ';\n\n if (!empty($post['comments'])):\n foreach ($post['comments']['data'] as $comment):\n $commentId = $comment['id'];\n $commentFromName = $comment['from']['name'];\n $commentMessage = nl2br($comment['message']);\n $commentDateDatetime = new \\DateTime($comment['created_time']);\n $commentDate = $commentDateDatetime->format(\"M, d, D, G:h\");\n $return .= '\n <div class=\"fbgreybox fbcommentreply\"> \n <div>\n <a href=\"https://www.facebook.com/' . $commentId . '\">' . $commentFromName . '</a>,\n ' . $commentDate . '\n </div> \n ' . $commentMessage . '\n </div>\n ';\n endforeach;\n endif;\n endif;\n endforeach;\n \n return $return;\n}", "function insert_fb_in_head()\r\n{\r\n global $post;\r\n if (!is_singular()) //if it is not a post or a page\r\n return;\r\n\r\n if ($excerpt = $post->post_excerpt)\r\n {\r\n $excerpt = strip_tags($post->post_excerpt);\r\n }\r\n else\r\n {\r\n $excerpt = get_bloginfo('description');\r\n }\r\n\r\n echo '<meta property=\"fb:app_id\" content=\"YOUR APPID\"/>'; //<-- this is optional\r\n echo '<meta property=\"og:title\" content=\"' . get_the_title() . '\"/>';\r\n echo '<meta property=\"og:description\" content=\"' . $excerpt . '\"/>';\r\n echo '<meta property=\"og:type\" content=\"article\"/>';\r\n echo '<meta property=\"og:url\" content=\"' . get_permalink() . '\"/>';\r\n echo '<meta property=\"og:site_name\" content=\"' . get_bloginfo() . '\"/>';\r\n\r\n echo '<meta name=\"twitter:title\" content=\"' . get_the_title() . '\"/>';\r\n echo '<meta name=\"twitter:card\" content=\"summary\" />';\r\n echo '<meta name=\"twitter:description\" content=\"' . $excerpt . '\" />';\r\n echo '<meta name=\"twitter:url\" content=\"' . get_permalink() . '\"/>';\r\n\r\n if (!has_post_thumbnail($post->ID))\r\n {\r\n //the post does not have featured image, use a default image\r\n $default_image = \"https://www.absolutefencinggear.com/shopping/images/Not_available.jpg\"; //<--replace this with a default image on your server\r\n echo '<meta property=\"og:image\" content=\"' . $default_image . '\"/>';\r\n echo '<meta name=\"twitter:image\" content=\"' . $default_image . '\"/>';\r\n }\r\n else\r\n {\r\n $thumbnail_src = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'medium');\r\n echo '<meta property=\"og:image\" content=\"' . esc_attr($thumbnail_src[0]) . '\"/>';\r\n echo '<meta name=\"twitter:image\" content=\"' . esc_attr($thumbnail_src[0]) . '\"/>';\r\n }\r\n}", "function customRSS() {\n add_feed('active_plugins', 'createPluginRssFeed');\n}", "function wp_idolondemand_twitterfeed($args) {\n\textract($args);\t\n\techo $before_widget;\n\techo $before_title;?>twitter.com/idolondemand<?php echo $after_title;\n\tdisplay_wp_idolondemand_twitter_feed();\n\techo $after_widget;\n}", "function the_content_feed($feed_type = \\null)\n {\n }", "function fl_user_bar_box() {\n\tglobal $post;\n\t\n\tif( !is_singular('post') ) return; // only show on blog post single page\n\t\n\t// assemble the text and url we'll pass into each social media share link\n\t$social_text = urlencode(strip_tags(get_the_title() . ' ' . __( 'post from', APP_TD ) . ' ' . get_bloginfo('name')));\n\t$social_url = urlencode(get_permalink($post->ID));\n?>\n\n<div class=\"user-bar\">\n\t\n\t<?php if (comments_open()) comments_popup_link( ('<span>' . __( 'Leave a comment', APP_TD ) . '</span>'), ('<span>' . __( 'Leave a comment', APP_TD ) . '</span>'), ('<span>' . __( 'Leave a comment', APP_TD ) . '</span>'), 'btn', '' ); ?>\t\n\t\n\t<?php fl_social_share(); ?>\n\t\n</div>\n\n<?php\n}", "function gigx_dashboard_widget_function(){\n ?>\n <p>Enjoy your new website. If you've got any questions or encounter any bugs, please contact me at <a href=\"mailto:[email protected]\">[email protected]</a>.\n I will add a list of useful links and tutorials below, as well as any messages about updates.<br/><a href=\"http://axwax.de\" target=\"_blank\">Axel</a></p> \n <?php wp_widget_rss_output('http://www.axwax.de/category/support/history/feed/', array('items' => 5, 'show_author' => 0, 'show_date' => 1, 'show_summary' => 1));\n}", "function renderSocialMediaShareLinksForUrl($url)\n {\n global $facebook_app_id;\n\n $url_encoded = urlencode($url);\n\n if('' !== trim($facebook_app_id))\n {\n ?>\n <!-- Facebook -->\n <a target=\"_blank\" href=\"https://www.facebook.com/dialog/feed?app_id=<?php echo $facebook_app_id; ?>&link=<?php echo $url_encoded; ?>\"><i class=\"fa fa-lg fa-facebook-official\" aria-hidden=\"true\"></i></a>\n <?php\n }\n ?>\n \n <!-- Twitter -->\n <a target=\"_blank\" href=\"https://twitter.com/?status=<?php echo $url_encoded; ?>\"><i class=\"fa fa-lg fa-twitter-square\" aria-hidden=\"true\"></i></a>\n \n <!-- LinkedIn -->\n <a target=\"_blank\" href=\"https://www.linkedin.com/shareArticle?mini=true&url=<?php echo $url_encoded; ?>\"><i class=\"fa fa-lg fa-linkedin-square\" aria-hidden=\"true\"></i></a>\n <?php\n\n return;\n }", "public function ct_fb_mapping(){\n if (!defined('WPB_VC_VERSION')) {\n return;\n }\n\n // Map the block with vc_map()\n vc_map(\n array(\n 'name' => __('CT Facebook Feeds', 'text-domain'),\n 'base' => 'ct_facebook',\n 'description' => __('Displaying facebook feeds', 'text-domain'),\n 'category' => __('CT Test Plugins', 'text-domain'),\n 'params' => array(\n array(\n 'type' => 'dropdown',\n 'heading' => 'Style',\n 'description'=> 'Select widget coloristic style',\n 'param_name' => 'style',\n 'value' => array( '', 'dark', 'light' )\n ),\n\n array(\n 'type' => 'textfield',\n 'heading' => 'Page ID',\n 'description' => 'Your Facebook Fan Paged ID',\n 'param_name' => 'id',\n 'value' => ''\n ),\n\n array(\n 'type' => 'textfield',\n 'heading' => 'Access Token',\n 'description' => 'Access Token is needed to conect with Facebook API and so on to take page posts content',\n 'param_name' => 'access_token',\n 'value' => ''\n ),\n\n array(\n 'type' => 'checkbox',\n 'heading' => 'Embed Images',\n 'description' => 'Check for embeding images to feeds',\n 'param_name' => 'embed_images',\n 'value' => 'false'\n ),\n\n array(\n 'type' => 'textfield',\n 'heading' => 'Posts Limit',\n 'description' => 'Limit of displaying posts',\n 'param_name' => 'limit',\n 'value' => 3\n ),\n\n array(\n 'type' => 'textfield',\n 'heading' => 'Char Limit',\n 'description' => 'Limit of displaying chars per post',\n 'param_name' => 'length_limit',\n 'value' => 100\n ),\n\n array(\n 'type' => 'textfield',\n 'heading' => 'Cache',\n 'description' => 'How often widget has got to refresh (in seconds)? Default it is 300 seconds',\n 'param_name' => 'cache',\n 'value' => 300\n )\n ),\n )\n );\n }", "function insert_fb_in_head() {\n\tglobal $post;\n\tif ( !is_singular()) {//if it is not a post or a page\n\t\treturn;\n } else {\n $tf_url = get_permalink();\n $tf_title = get_the_title();\n \n if( custom_field_excerpt() ):\n $tf_desc = wp_strip_all_tags(custom_field_excerpt());\n elseif( custom_field_excerpt2() ):\n $tf_desc = wp_strip_all_tags(custom_field_excerpt2());\n elseif( custom_field_excerpt3() ):\n $tf_desc = wp_strip_all_tags(custom_field_excerpt3());\n else :\n $tf_desc = wp_strip_all_tags(get_the_excerpt());\n endif;\n \n if (has_post_thumbnail()) {\n $thumbid = get_post_thumbnail_id();\n $imgurl = wp_get_attachment_url( $thumbid );\n } else {\n $imgurl = home_url() . '/wp-content/themes/settlementPC/library/images/eo-livelearn.png';\n }\n $tf_name = str_replace('@', '', get_the_author_meta('twitter'));\n ?>\n <meta name=\"twitter:card\" value=\"summary\" />\n <meta name=\"twitter:url\" value=\"<?php echo $tf_url; ?>\" />\n <meta name=\"twitter:title\" value=\"<?php echo $tf_title; ?>\" />\n \n <meta name=\"twitter:image\" value=\"<?php echo $imgurl; ?>\" />\n <meta name=\"twitter:site\" value=\"@EnglishOnlineMB\" />\n <?php if($tf_name) { ?>\n \n <meta name=\"twitter:creator\" value=\"@<?php echo $tf_name; ?>\" />\n \n <?php }\n \n echo '<meta property=\"og:title\" content=\"' . $tf_title . '\"/>';\n echo '<meta property=\"og:type\" content=\"article\"/>';\n echo '<meta property=\"og:url\" content=\"' . $tf_url . '\"/>';\n echo '<meta property=\"og:site_name\" content=\"Live &amp; Learn: a project of English Online Inc.\"/>';\n echo '<meta property=\"og:description\" content=\"' . $tf_desc . '\"/>';\n echo '<meta property=\"og:image\" content=\"' . $imgurl . '\"/>';\n }\n \n}", "function soc_med_links( $_slug, $_name, $_image ) {\n // IF POST NAME\n if ( $_name !== \"\" ) {\n $_text = $_name . \" at xbank.amsterdam\";\n } else {\n $_text = \"xbank.amsterdam\";\n } \n // IF POST SLUG\n if ( $_slug !== \"\" ) {\n $_link = \"http://xbank.amsterdam/#\" . $_slug; \n } else {\n $_link = \"http://xbank.amsterdam\";\n } \n ?>\n <!-- FACEBOOK -->\n <li>\n <a href=\"\" \n data-mobile_iframe \n class=\"fb-share-button\" \n data-quote=\"<?php echo $_text; ?>\" \n data-href=\"<?php echo $_link; ?>\">\n <img src=\"<?php bloginfo('template_url'); ?>/img/icon_facebook.png\" alt=\"Facebook icon\" />\n </a>\n <!--<a target=\"_blank\" \n href=\"\" \n class=\"facebook_share\" \n data-text=\"<?php echo $_text; ?>\" \n data-img=\"<?php echo $_image; ?>\" \n data-link=\"<?php echo $_link; ?>\">\n <img src=\"<?php bloginfo('template_url'); ?>/img/icon_facebook.png\" alt=\"Facebook icon\" />\n </a>-->\n </li>\n <!-- TWITTER -->\n <li>\n <a class=\"twitter-share-button\" \n target=\"_blank\" \n data-url=\"<?php echo createTwitterUrl ( $_name, $_link )[1]; ?>\" \n href=\"<?php echo createTwitterUrl ( $_name, $_link )[2]; ?>\">\n <img src=\"<?php bloginfo('template_url'); ?>/img/icon_twitter.png\" alt=\"Twitter icon\" />\n </a>\n </li>\n <!-- PINTEREST -->\n <li>\n <a data-pin-do=\"buttonPin\" \n data-pin-description=\"<?php echo $_text; ?>\" \n data-pin-url=\"<?php echo $_link; ?>\" \n data-pin-media=\"<?php echo $_image; ?>\" \n data-pin-custom=\"true\" \n class=\"pinterest\" \n target=\"_blank\" \n href=\"https://www.pinterest.com/pin/create/button/\" >\n <img src=\"<?php bloginfo('template_url'); ?>/img/icon_pinterest.png\" alt=\"Pinterest icon\" />\n </a> \n </li>\n <?php \n}", "function siteorigin_share_render( $settings = array() ) {\n\t$settings = wp_parse_args( $settings, array(\n\t\t'width' => 25,\n\t\t'like_text' => __( 'like', 'vantage' ),\n\t\t'twitter' => ''\n\t) );\n\n\n\n\tstatic $facebook_loaded = false;\n\tif(!$facebook_loaded) {\n\t\t?>\n\t\t<div id=\"fb-root\"></div>\n\t\t<script type=\"text/javascript\">\n\t\t\t(function(d, s, id) {\n\t\t var js, fjs = d.getElementsByTagName(s)[0];\n\t\t if (d.getElementById(id)) return;\n\t\t js = d.createElement(s); js.id = id;\n\t\t js.src = \"//connect.facebook.net/en_GB/all.js#xfbml=1\";\n\t\t fjs.parentNode.insertBefore(js, fjs);\n\t\t}(document, 'script', 'facebook-jssdk'));\n\t\t</script>\n\t\t<?php\n\t\t$facebook_loaded = true;\n\t}\n\n\tstatic $google_loaded = false;\n\tif(!$google_loaded) {\n\t\t?>\n\t\t<script type=\"text/javascript\">\n\t\t\t// Google Plus One\n\t\t\t(function () {\n\t\t\t\tvar po = document.createElement( 'script' );\n\t\t\t\tpo.type = 'text/javascript';\n\t\t\t\tpo.async = true;\n\t\t\t\tpo.src = 'https://apis.google.com/js/plusone.js';\n\t\t\t\tvar s = document.getElementsByTagName( 'script' )[0];\n\t\t\t\ts.parentNode.insertBefore( po, s );\n\t\t\t})();\n\t\t</script>\n\t\t<?php\n\t\t$google_loaded = true;\n\t}\n\n\tstatic $linkedin_loaded = false;\n\tif(!$linkedin_loaded) {\n\t\t?>\n\t\t<script src=\"//platform.linkedin.com/in.js\" type=\"text/javascript\"> lang: en_US</script>\n\t\t<?php\n\t\t$linkedin_loaded = true;\n\t}\n\n\t?>\n\t<ul class=\"share-buttons\">\n\t\t<li class=\"network facebook\" style=\"width:<?php echo intval( $settings['width'] ) ?>%\">\n\n\t\t\t<div\n\t\t\t\tclass=\"fb-like\"\n\t\t\t\tdata-href=\"<?php echo get_permalink() ?>\"\n\t\t\t\tdata-width=\"<?php echo intval( $settings['width'] ) ?>\"\n\t\t\t\tdata-layout=\"button_count\"\n\t\t\t\tdata-send=\"false\"\n\t\t\t\tdata-height=\"21\"\n\t\t\t\tdata-show-faces=\"false\"\n\t\t\t\tdata-action=\"<?php echo esc_attr($settings['like_text']) ?>\"></div>\n\t\t</li>\n\n\t\t<li class=\"network twitter\" style=\"width:<?php echo intval( $settings['width'] ) ?>%\">\n\t\t\t<?php\n\t\t\t$related = array();\n\t\t\t$related[ ] = $settings['twitter'];\n\t\t\t$twitter_url = add_query_arg( array(\n\t\t\t\t'url' => get_permalink(),\n\t\t\t\t'via' => siteorigin_setting( 'social_twitter' ),\n\t\t\t\t'text' => get_the_title(),\n\t\t\t\t'related' => implode( ',', $related )\n\t\t\t), 'http' . (is_ssl() ? 's' : '' ) . '://platform.twitter.com/widgets/tweet_button.html' );\n\n\t\t\t?>\n\t\t\t<iframe allowtransparency=\"true\" frameborder=\"0\" scrolling=\"no\" src=\"<?php echo esc_attr( $twitter_url ) ?>\" style=\"height:20px;\"></iframe>\n\t\t</li>\n\n\t\t<li class=\"network plusone\" style=\"width:<?php echo intval( $settings['width'] )-4 ?>%\">\n\t\t\t<div class=\"g-plusone\" data-size=\"medium\" data-width=\"160\"></div>\n\t\t</li>\n\n\t\t<li class=\"network linkedin\" style=\"width:<?php echo intval( $settings['width'] )+4 ?>%;\">\n\t\t\t<script type=\"IN/Share\" data-counter=\"right\"></script>\n\t\t</li>\n\t</ul>\n\t<?php\n}", "public function facebook() : string\n {\n $parameters = [];\n\n if (empty($this->title) === false) {\n $parameters['title'] = $this->title;\n }\n\n if (empty($this->url) === false) {\n $parameters['u'] = $this->url;\n }\n\n return $this->createHtmlElement('a', [\n 'target' => '_blank',\n 'rel' => 'noopener',\n 'href' => 'https://www.facebook.com/share.php?'.http_build_query($parameters),\n ], 'Facebook');\n }", "function funct_Sandy_RSS() {\r\n register_widget( 'WP_Sandy_RSS' );\r\n}", "function recipe_share_shortcode( $atts = [], $content = null) {\n $permalink = urlencode(get_permalink($post->ID));\n $title = urlencode(get_the_title($post->ID));\n\n $o = '<span>Share</span>\n <p>\n <a href=\"http://www.facebook.com/sharer.php?u=' . $permalink . '&t=' . $title . '\" target=\"_blank\"><i class=\"fab fa-facebook-f\"></i><span class=\"show-for-sr\">Share on Facebook</span></a>\n <a href=\"http://twitter.com/share?url=' . $permalink . '\" target=\"_blank\"><i class=\"fab fa-twitter\"></i><span class=\"show-for-sr\">Share on Twitter</span></a>\n <a href=\"https://www.linkedin.com/shareArticle?mini=true&url=' . $permalink . '&title=' . $title . '&source=LinkedIn\"><i class=\"fab fa-linkedin-in\" target=\"_blank\"></i><span class=\"show-for-sr\">Share on Linkedin</span></a>\n <a href=\"mailto:?subject=' . $title . ' | Check out this recipe&body=' . $permalink . '\" title=\"Share by Email\"><i class=\"fas fa-link\"></i><span class=\"show-for-sr\">Share via Email</span></a>\n </p>\n';\n\n return $o;\n}", "function monospace_share () {\n global $post;\n\t\t?>\n\t\t<div class=\"meta\">\n\t\t\t<span class=\"share\"><?php _e('Share on', 'monospace'); ?>&nbsp;\n <?php\n $url = urlencode(get_permalink($post->ID));\n $title = urlencode(get_the_title());\n ?>\n\t\t\t\t<a href=\"<?php echo esc_url('http://twitter.com/home?status=' . $title . '%20' . $url); ?>\" target=\"_blank\">Twitter</a>&nbsp;\n\t\t\t\t<a href=\"<?php echo esc_url('http://facebook.com/sharer.php?t=' . $title . '&amp;u=' . $url); ?>\" target=\"_blank\">Facebook</a>&nbsp;\n\t\t\t\t<a href=\"<?php echo esc_url('http://google.com/reader/link?title=' . $title . '&amp;url=' . $url);?>\" target=\"_blank\">Google Reader</a>&nbsp;\n <a href=\"<?php echo esc_url('http://ping.fm/ref/?conduit&method=status&title=' . $title . '&link=' . $url); ?>\" target=\"_blank\">Ping.fm</a>\n </span>\n\t\t</div>\n\t\t<?php\n\t}", "public function widget( $args, $instance ) { \n\t\t// return if sharing is disabled\n\t\tif(!the_champ_social_sharing_enabled() || !the_champ_horizontal_sharing_enabled()){\n\t\t\treturn;\n\t\t}\n\t\textract( $args );\n\t\tif($instance['hide_for_logged_in']==1 && is_user_logged_in()) return;\n\t\t\n\t\tglobal $theChampSharingOptions, $post;\n\t\tif(NULL === $post){\n\t\t\t$postId = 0;\n\t\t}else{\n\t\t\t$postId = $post->ID;\n\t\t}\n\t\t$customUrl = apply_filters('heateor_ss_custom_share_url', '', $post);\n\t\tif($customUrl){\n\t\t\t$sharingUrl = $customUrl;\n\t\t\t$postId = 0;\n\t\t}elseif(isset($instance['target_url'])){\n\t\t\tif($instance['target_url'] == 'default'){\n\t\t\t\t$sharingUrl = html_entity_decode(esc_url(the_champ_get_http().$_SERVER[\"HTTP_HOST\"] . $_SERVER[\"REQUEST_URI\"]));\n\t\t\t\tif(is_home()){\n\t\t\t\t\t$sharingUrl = esc_url(home_url());\n\t\t\t\t\t$postId = 0;\n\t\t\t\t}elseif(!is_singular()){\n\t\t\t\t\t$sharingUrl = html_entity_decode(esc_url(the_champ_get_http().$_SERVER[\"HTTP_HOST\"] . $_SERVER[\"REQUEST_URI\"]));\n\t\t\t\t\t$postId = 0;\n\t\t\t\t}elseif(isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING']){\n\t\t\t\t\t$sharingUrl = html_entity_decode(esc_url(the_champ_get_http().$_SERVER[\"HTTP_HOST\"] . $_SERVER[\"REQUEST_URI\"]));\n\t\t\t\t}elseif(get_permalink($post-> ID)){\n\t\t\t\t\t$sharingUrl = get_permalink($post->ID);\n\t\t\t\t}\n\t\t\t}elseif($instance['target_url'] == 'homepage'){\n\t\t\t\t$sharingUrl = esc_url(home_url());\n\t\t\t\t$postId = 0;\n\t\t\t}elseif($instance['target_url'] == 'custom'){\n\t\t\t\t$sharingUrl = isset($instance['target_url_custom']) ? trim($instance['target_url_custom']) : get_permalink($post->ID);\n\t\t\t\t$postId = 0;\n\t\t\t}\n\t\t}else{\n\t\t\t$sharingUrl = get_permalink($post->ID);\n\t\t}\n\t\t$shareCountUrl = $sharingUrl;\n\t\tif(isset($instance['target_url']) && $instance['target_url'] == 'default' && is_singular()){\n\t\t\t$shareCountUrl = get_permalink($post->ID);\n\t\t}\n\t\t$customPostUrl = heateor_ss_apply_target_share_url_filter($sharingUrl, 'horizontal', !is_singular() ? true : false);\n\n\t\tif($customPostUrl != $sharingUrl){\n\t\t\t$sharingUrl = $customPostUrl;\n\t\t\t$shareCountUrl = $sharingUrl;\n\t\t}\n\n\t\t$shareCountTransientId = heateor_ss_get_share_count_transient_id($sharingUrl);\n\t\t$cachedShareCount = heateor_ss_get_cached_share_count($shareCountTransientId);\n\n\t\techo \"<div class='the_champ_sharing_container the_champ_horizontal_sharing' \" . (the_champ_is_amp_page() ? '' : 'super-socializer-data-href=\"' . (isset($shareCountUrl) && $shareCountUrl ? $shareCountUrl : $sharingUrl) . '\"') . ($cachedShareCount === false || the_champ_is_amp_page() ? \"\" : \"super-socializer-no-counts='1' \") .\">\";\n\t\t\n\t\techo $before_widget;\n\t\t\n\t\tif( !empty( $instance['title'] ) ){ \n\t\t\t$title = apply_filters( 'widget_title', $instance[ 'title' ] ); \n\t\t\techo $before_title . $title . $after_title;\n\t\t}\n\n\t\tif( !empty( $instance['before_widget_content'] ) ){ \n\t\t\techo '<div>' . $instance['before_widget_content'] . '</div>'; \n\t\t}\n\t\tif(isset($theChampSharingOptions['use_shortlinks']) && function_exists('wp_get_shortlink')){\n\t\t\t$sharingUrl = wp_get_shortlink();\n\t\t\t// if bit.ly integration enabled, generate bit.ly short url\n\t\t}elseif(isset($theChampSharingOptions['bitly_enable']) && isset($theChampSharingOptions['bitly_access_token']) && $theChampSharingOptions['bitly_access_token'] != ''){\n\t\t\t$shortUrl = the_champ_generate_sharing_bitly_url($sharingUrl, $postId);\n\t\t\tif($shortUrl){\n\t\t\t\t$sharingUrl = $shortUrl;\n\t\t\t}\n\t\t}\n\t\techo the_champ_prepare_sharing_html($sharingUrl, $shareCountUrl, 'horizontal', isset($instance['show_counts']), isset($instance['total_shares']), $shareCountTransientId, !is_singular() ? true : false);\n\n\t\tif( !empty( $instance['after_widget_content'] ) ){ \n\t\t\techo '<div>' . $instance['after_widget_content'] . '</div>'; \n\t\t}\n\t\t\n\t\techo '</div>';\n\t\tif((isset($instance['show_counts']) || isset($instance['total_shares'])) && $cachedShareCount == false){\n\t\t\techo '<script>theChampLoadEvent(\n\t\tfunction(){\n\t\t\t// sharing counts\n\t\t\ttheChampCallAjax(function(){\n\t\t\t\ttheChampGetSharingCounts();\n\t\t\t});\n\t\t}\n\t);</script>';\n\t\t}\n\t\techo $after_widget;\n\t}", "function run_blossomthemes_instagram_feed() {\r\n\r\n\t$plugin = new Blossomthemes_Instagram_Feed();\r\n\t$plugin->run();\r\n\r\n}", "function get_ua_webtide_facebook_share_url( $post_id ) {\n\t\n\treturn add_query_arg( array(\n\t\t 'app_id' \t\t=> '1407829472855501',\n\t\t 'display' \t\t=> 'page',\n\t\t 'href'\t\t\t=> urlencode( 'https://webtide.ua.edu/jobs/' ), //get_permalink( $post_id )\n\t\t 'redirect_uri' => urlencode( 'https://webtide.ua.edu/jobs/' ),\n\t\t ), 'https://www.facebook.com/dialog/share' );\n\t\n}", "function anyShare($outer){\r\n\tif(!is_single()){ return $outer; }\r\n\r\n\tglobal $post;\r\n\t$share = array();\r\n\t$pName = rawurlencode($post->post_title);\r\n\t$pHref = rawurlencode(get_permalink($post->ID));\r\n\r\n\t$share['sntwet'] = array('新浪微博', 'http://v.t.sina.com.cn/share/share.php?url='.$pHref);\r\n\t$share['qqtwet'] = array('腾讯微博', 'http://v.t.qq.com/share/share.php?appkey=2e295ab2ff8245229d96fa3768a9f779&url='.$pHref.'&title='.$pName);\r\n\t$share['qqzone'] = array('腾讯空间', 'http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url='.$pHref);\r\n\t$share['renren'] = array('人人社区', 'http://share.renren.com/share/buttonshare.do?link='.$pHref.'&title='.$pName);\r\n\t$share['douban'] = array('豆瓣社区', 'http://www.douban.com/recommend/?url='.$pHref);\r\n\t$share['bdcang'] = array('百度搜藏', 'http://cang.baidu.com/do/add?iu='.$pHref.'&it='.$pName);\r\n\t$share['facebk'] = array('facebook', 'http://www.facebook.com/share.php?u='.$pHref);\r\n\t$share['twiter'] = array('twitter', 'http://twitter.com/home?status='.$pName.'-'.$pHref);\r\n\r\n\t$outer .= \"\\n<!-- Begin anyShare -->\\n\";\r\n\t$outer .= '<link rel=\"stylesheet\" href=\"'.WP_PLUGIN_URL.'/'.dirname(plugin_basename(__FILE__)).'/anyShare.css?v=5\">';\r\n\t$outer .= '<table id=\"anyShare\"><tr><td id=\"AS-TXT\"><i>anyShare</i><b>分享到:</b></td><td id=\"AS-GPO\" rowspan=\"2\">';\r\n\t$outer .= '<script type=\"text/javascript\" src=\"https://apis.google.com/js/plusone.js\"></script><g:plusone size=\"tall\" annotation=\"bubble\" expandTo=\"top\"></g:plusone></td><td id=\"AS-IMG\" rowspan=\"2\">';\r\n\t$outer .= '</td><td id=\"AS-GPO\" rowspan=\"2\"> <g:plusone size=\"tall\"></g:plusone></td></tr><tr><td id=\"AS-BTN\">';\r\n\tforeach($share as $key => $btn){\r\n\t\t$outer .= '<a id=\"'.$key.'\" title=\"'.$btn[0].'\" href=\"'.$btn[1].'\" target=\"_blank\">&nbsp;</a>';\r\n\t}\r\n\t$outer .= '<br clear=\"all\"></td></tr></table>';\r\n\t$outer .= \"\\n<!-- anyShare Endof -->\\n\";\r\n\treturn $outer;\r\n}", "function fb_add_og_protocol() {\n\tglobal $post;\n\n\t$meta_tags = array(\n\t\t'http://ogp.me/ns#locale' => fb_get_locale(),\n\t\t'http://ogp.me/ns#site_name' => get_bloginfo( 'name' ),\n\t\t'http://ogp.me/ns#type' => 'website'\n\t);\n\t\n\tif ( is_home() || is_front_page() ) {\n\t\t$meta_tags['http://ogp.me/ns#title'] = get_bloginfo( 'name' );\n\t\t$meta_tags['http://ogp.me/ns#description'] = get_bloginfo( 'description' );\n\t} else if ( is_single() ) {\n\t\t$post_type = get_post_type();\n\t\t$meta_tags['http://ogp.me/ns#type'] = 'article';\n\t\t$meta_tags['http://ogp.me/ns#url'] = apply_filters( 'rel_canonical', get_permalink() );\n\t\tif ( post_type_supports( $post_type, 'title' ) )\n\t\t\t$meta_tags['http://ogp.me/ns#title'] = get_the_title();\n\t\tif ( post_type_supports( $post_type, 'excerpt' ) ) {\n\t\t\t// thanks to Angelo Mandato (http://wordpress.org/support/topic/plugin-facebook-plugin-conflicts-with-powerpress?replies=16)\n\t\t\t// Strip and format the wordpress way, but don't apply any other filters which adds junk that ends up getitng stripped back out\n\t\t\tif ( !post_password_required($post) ) {\n\t\t\t\t// First lets get the post excerpt (shouldn't have any html, but anyone can enter anything...)\n\t\t\t\t$desc_no_html = $post->post_excerpt;\n\t\t\t\tif ( !empty($excerpt_no_html) ) {\n\t\t\t\t\t$desc_no_html = strip_shortcodes($desc_no_html); // Strip shortcodes first in case there is HTML inside the shortcode\n\t\t\t\t\t$desc_no_html = wp_strip_all_tags($desc_no_html); // Strip all html\n\t\t\t\t\t$desc_no_html = trim($desc_no_html); // Trim the final string, we may have stripped everything out of the post so this will make the value empty if that's the case\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Recheck if empty, may be that the strip functions above made excerpt empty, doubhtful but we want to be 100% sure.\n\t\t\t\tif( empty($desc_no_html) ) {\n\t\t\t\t\t$desc_no_html = $post->post_content; // Start over, this time with the post_content\n\t\t\t\t\t$desc_no_html = strip_shortcodes( $desc_no_html ); // Strip shortcodes first in case there is HTML inside the shortcode\n\t\t\t\t\t$desc_no_html = str_replace(']]>', ']]&gt;', $desc_no_html); // Angelo Recommendation, if for some reason ]]> happens to be in the_content, rare but We've seen it happen\n\t\t\t\t\t$desc_no_html = wp_strip_all_tags($desc_no_html);\n\t\t\t\t\t$excerpt_length = apply_filters('excerpt_length', 55);\n\t\t\t\t\t$excerpt_more = apply_filters('excerpt_more', ' ' . '[...]');\n\t\t\t\t\t$desc_no_html = wp_trim_words( $desc_no_html, $excerpt_length, $excerpt_more );\n\t\t\t\t\t$desc_no_html = trim($desc_no_html); // Trim the final string, we may have stripped everything out of the post so this will make the value empty if that's the case\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$desc_no_html = str_replace( array( \"\\r\\n\", \"\\r\", \"\\n\" ), ' ',$desc_no_html); // I take it Facebook doesn't like new lines?\n\t\t\t\t$meta_tags['http://ogp.me/ns#description'] = $desc_no_html;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$meta_tags['http://ogp.me/ns/article#published_time'] = get_the_date('c');\n\t\t$meta_tags['http://ogp.me/ns/article#modified_time'] = get_the_modified_date('c');\n\t\t\n\t\tif ( post_type_supports( $post_type, 'author' ) && isset( $post->post_author ) )\n\t\t\t$meta_tags['http://ogp.me/ns/article#author'] = get_author_posts_url( $post->post_author );\n\n\t\t// add the first category as a section. all other categories as tags\n\t\t$cat_ids = get_the_category();\n\t\t\n\t\tif ( ! empty( $cat_ids ) ) {\n\t\t\t$cat = get_category( $cat_ids[0] );\n\t\t\t\n\t\t\tif ( ! empty( $cat ) )\n\t\t\t\t$meta_tags['http://ogp.me/ns/article#section'] = $cat->name;\n\n\t\t\t//output the rest of the categories as tags\n\t\t\tunset( $cat_ids[0] );\n\t\t\t\n\t\t\tif ( ! empty( $cat_ids ) ) {\n\t\t\t\t$meta_tags['http://ogp.me/ns/article#tag'] = array();\n\t\t\t\tforeach( $cat_ids as $cat_id ) {\n\t\t\t\t\t$cat = get_category( $cat_id );\n\t\t\t\t\t$meta_tags['http://ogp.me/ns/article#tag'][] = $cat->name;\n\t\t\t\t\tunset( $cat );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// add tags. treat tags as lower priority than multiple categories\n\t\t$tags = get_the_tags();\n\t\t\n\t\tif ( $tags ) {\n\t\t\tif ( ! array_key_exists( 'http://ogp.me/ns/article#tag', $meta_tags ) )\n\t\t\t\t$meta_tags['http://ogp.me/ns/article#tag'] = array();\n\t\t\t\t\n\t\t\tforeach ( $tags as $tag ) {\n\t\t\t\t$meta_tags['http://ogp.me/ns/article#tag'][] = $tag->name;\n\t\t\t}\n\t\t}\n\n\t\t// does current post type and the current theme support post thumbnails?\n\t\tif ( post_type_supports( $post_type, 'thumbnail' ) && function_exists( 'has_post_thumbnail' ) && has_post_thumbnail() ) {\n\t\t\tlist( $post_thumbnail_url, $post_thumbnail_width, $post_thumbnail_height ) = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' );\n\t\t\t\n\t\t\tif ( ! empty( $post_thumbnail_url ) ) {\n\t\t\t\t$image = array( 'url' => $post_thumbnail_url );\n\n\t\t\t\tif ( ! empty( $post_thumbnail_width ) )\n\t\t\t\t\t$image['width'] = absint( $post_thumbnail_width );\n\n\t\t\t\tif ( ! empty($post_thumbnail_height) )\n\t\t\t\t\t$image['height'] = absint( $post_thumbnail_height );\n\t\t\t\t\t\n\t\t\t\t$meta_tags['http://ogp.me/ns#image'] = array( $image );\n\t\t\t}\n\t\t}\n\t}\n\telse if ( is_author() && isset( $post->post_author ) ) {\n\t\t$meta_tags['http://ogp.me/ns#type'] = 'profile';\n\t\t$meta_tags['http://ogp.me/ns/profile#first_name'] = get_the_author_meta( 'first_name', $post->post_author );\n\t\t$meta_tags['http://ogp.me/ns/profile#last_name'] = get_the_author_meta( 'last_name', $post->post_author );\n\t\tif ( is_multi_author() )\n\t\t\t$meta_tags['http://ogp.me/ns/profile#username'] = get_the_author_meta( 'login', $post->post_author );\n\t}\n\telse if ( is_page() ) {\n\t\t$meta_tags['http://ogp.me/ns#type'] = 'article';\n\t\t$meta_tags['http://ogp.me/ns#title'] = get_the_title();\n\t\t$meta_tags['http://ogp.me/ns#url'] = apply_filters( 'rel_canonical', get_permalink() );\n\t}\n\n\t$options = get_option( 'fb_options' );\n\t\n\tif ( ! empty( $options['app_id'] ) )\n\t\t$meta_tags['http://ogp.me/ns/fb#app_id'] = $options['app_id'];\n\n\t$meta_tags = apply_filters( 'fb_meta_tags', $meta_tags, $post );\n\n\tforeach ( $meta_tags as $property => $content ) {\n\t\tfb_output_og_protocol( $property, $content );\n\t}\n}", "function easy_reader_share_button($type){\n\tswitch($type){\n\t\tcase 'rss':\n\t\t\t$link = get_bloginfo('rss2_url');\n\t\t\t$title = 'Subscribe';\n\t\t\tbreak;\n\t\t\n\t\tcase 'bebo':\n\t\t\t$link = 'http://www.bebo.com/c/share?Url='.urlencode(get_permalink()).'&Title='.urlencode(get_the_title());\n\t\t\t$title = 'Share on Bebo';\n\t\t\tbreak;\n\t\t\n\t\tcase 'delicious':\n\t\t\t$link = \"http://del.icio.us/post?url=\".urlencode(get_permalink()).\"&title=\".urlencode(get_the_title());\n\t\t\t$title = 'Bookmark on Delicious';\n\t\t\tbreak;\n\t\t\n\t\tcase 'digg':\n\t\t\t$link = \"http://digg.com/submit?phase=2&url=\".urlencode(get_permalink()).\"&title=\".urlencode(get_the_title());\n\t\t\t$title = 'Digg This';\n\t\t\tbreak;\n\t\t\n\t\tcase 'facebook':\n\t\t\t$link = \"http://www.facebook.com/sharer.php?u=\".urlencode(get_permalink()).\"&t=\".urlencode(get_the_title());\n\t\t\t$title = \"Share on Facebook\";\n\t\t\tbreak;\n\t\t\n\t\tcase 'google':\n\t\t\t$link = \"http://fusion.google.com/add?feedurl=\".urlencode(get_bloginfo('rss2_url'));\n\t\t\t$title = 'Import Into Google Reader';\n\t\t\tbreak;\n\t\t\n\t\tcase 'myspace':\n\t\t\t$link = \"http://www.myspace.com/Modules/PostTo/Pages/?u=\".urlencode(get_permalink());\n\t\t\t$title = 'Post On Myspace';\n\t\t\tbreak;\n\t\t\n\t\tcase 'orkut':\n\t\t\t$link = \"http://promote.orkut.com/preview?nt=orkut.com&du=\".urlencode(get_permalink()).\"&tt=\".urlencode(get_the_title());\n\t\t\t$title = 'Promote on Orkut';\n\t\t\tbreak;\n\t\t\n\t\tcase 'reddit':\n\t\t\t$link = \"http://reddit.com/submit?&url=\".urlencode(get_permalink()).\"&title=\".urlencode(get_the_title());\n\t\t\t$title = \"Share on Reddit\";\n\t\t\tbreak;\n\t\t\n\t\tcase 'stumbleupon':\n\t\t\t$link = \"http://www.stumbleupon.com/submit?url=\".urlencode(get_permalink()).\"&title=\".urlencode(get_the_title());\n\t\t\t$title = \"Stumble this\";\n\t\t\tbreak;\n\t\t\n\t\tcase 'technorati':\n\t\t\t$link = \"http://technorati.com/faves/?add=\".urlencode(get_permalink());\n\t\t\t$title = 'Favorite on Technorati';\n\t\t\tbreak;\n\t\t\t\n\t\tcase 'twitter':\n\t\t\t// TODO shorten this and let user add custom message\n\t\t\t$link = \"http://twitter.com/home?status=\".urlencode(get_permalink());\n\t\t\t$title = \"Tweet this\";\n\t\t\tbreak;\n\t}\n\t\n\t?><a href=\"<?php print $link ?>\" title=\"<?php print esc_attr($title) ?>\" rel=\"nofollow\"><img src=\"<?php print WP_PLUGIN_URL ?>/easy-reader/images/share/<?php print $type?>.png\" /></a><?php\n}", "function facebook_shortcode() {\n\techo get_option('feed_options_fbcode');\n}", "function social_get_share_url($service, $url, $title)\n{\n\n $links = array();\n $surl = shortener_shorten($url);\n if ($surl != $url) {\n $url = $surl;\n callmap_log($url);\n }\n\n switch ($service) {\n case 'facebook':\n $base = 'https://www.facebook.com/sharer/sharer.php';\n $query = array('u' => $url, 't' => $title);\n break;\n case 'linkedin':\n $base = 'https://www.linkedin.com/shareArticle';\n $query = array('url'=> $url, 'title'=>$title);\n break;\n case 'gplus':\n $base = 'https://plus.google.com/share';\n $query = array('url'=>$url);\n break;\n case 'whatsapp':\n $base = 'whatsapp://send';\n $query = array('text'=> $title . ' - ' . $url);\n break;\n case 'email':\n $base = 'mailto:';\n $query = array('subject'=> $title, 'body' => $title . \"\\n\" . $url);\n break;\n case 'twitter': \n $search_replace = config('twitter_search_replace', array());\n foreach ($search_replace as $search => $replace) {\n $title = str_replace($search, $replace, $title);\n }\n $base = 'https://twitter.com/intent/tweet';\n $query = array('url'=>$url, 'text'=>$title);\n break;\n default:\n return '';\n }\n return router_add_query($base, $query);\n}", "function displayArticle ($post, $author) {\n $content = file_get_contents($post);\n $shareUrl = \"http://wsle.me\" . slug($post);\n //Used for social sharing features while I'm forwarding domain.\n \n echo '<article><header><h1>' . articleName($post) . '</h1><p class=\"auth\">by: ' . $author . \" | \" . date (\"m.d.Y | h:ia\", filemtime($post)) . '</p>' . MarkdownExtra::defaultTransform($content . '***') . '<p class=\"share\">Share: <a href=\"http://www.facebook.com/sharer.php?u=' . $shareUrl . '\" target=\"_blank\">fb</a> | <a href=\"http://twitter.com/share?url=' . $shareUrl . '&text=' . ucwords(str_replace([\"-\", \"_\"], \" \", str_replace(\"/\", \"\", slug($post)))) . ' via @_wesleysinks\" target=\"_blank\">twt</a> | <a href=\"https://plusone.google.com/_/+1/confirm?hl=en&url=' . $shareUrl . '\" target=\"_blank\">g+</a></p></header></article>';\n}", "function add_feed($feedname, $callback)\n {\n }", "function comments_link_feed()\n {\n }", "public static function get_social_share_js( $attr, $id ) {\n\t\t\t$base_selector = ( isset( $attr['classMigrate'] ) && $attr['classMigrate'] ) ? '.uagb-block-' : '#uagb-social-share-';\n\t\t\t$selector = $base_selector . $id;\n\t\t\tglobal $post;\n\t\t\t// Get the featured image.\n\t\t\tif ( has_post_thumbnail() ) {\n\t\t\t\t$thumbnail_id = get_post_thumbnail_id( $post->ID );\n\t\t\t\t$thumbnail = $thumbnail_id ? current( wp_get_attachment_image_src( $thumbnail_id, 'large', true ) ) : '';\n\t\t\t} else {\n\t\t\t\t$thumbnail = null;\n\t\t\t}\n\t\t\tob_start();\n\t\t\t?>\n\t\t\tvar ssLinks = document.querySelectorAll( '<?php echo esc_attr( $selector ); ?>' );\n\t\t\tfor ( var j = 0; j < ssLinks.length; j++ ) {\n\t\t\t\tvar ssLink = ssLinks[j].querySelectorAll( \".uagb-ss__link\" );\n\t\t\t\tfor ( var i = 0; i < ssLink.length; i++ ) {\n\t\t\t\t\tssLink[i].addEventListener( \"click\", function() {\n\t\t\t\t\t\tvar social_url = this.dataset.href;\n\t\t\t\t\t\tvar target = \"\";\n\t\t\t\t\t\tif( social_url == \"mailto:?body=\" ) {\n\t\t\t\t\t\t\ttarget = \"_self\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar request_url =\"\";\n\t\t\t\t\t\tif( social_url.indexOf(\"/pin/create/link/?url=\") !== -1) {\n\t\t\t\t\t\t\trequest_url = social_url + window.location.href + \"&media=\" + '<?php echo esc_url( $thumbnail ); ?>';\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\trequest_url = social_url + window.location.href;\n\t\t\t\t\t\t}\n\t\t\t\t\t\twindow.open( request_url, target );\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t\t<?php\n\t\t\treturn ob_get_clean();\n\t\t}", "function tw_show_social_widget($args, $instance){\n if(function_exists('tw_social_widget_custom_action')){\n add_action( 'tw_social_widget_custom_hook', 'tw_social_widget_custom_action', 10, 2 );\n echo $args['before_widget'];\n do_action( 'tw_social_widget_custom_hook', $args, $instance);\n echo $args['after_widget'];\n }else{\n echo $args['before_widget'];\n $title \t\t= apply_filters('widget_title', $instance['title']);\n $message \t= $instance['message'];\n $square_social_icons = (isset($instance['square-icons']) && trim($instance['square-icons'])=='on') ? true : false;\n //$social_info = tw_get_theme_social_options($square_social_icons);\n $social_info = tw_get_social_networks($square_social_icons, true);\n if ( $title )\n echo $args['before_title'] . $title . $args['after_title']; ?>\n\t\t\t<div class=\"social-widget-container\">\n <?php if($message!==''): ?><p><?php echo $message; ?></p><?php endif; ?>\n\n <?php if($social_info): $count = count($social_info); ?>\n <div class=\"contact-social\">\n <ul>\n <?php foreach($social_info as $network=>$details):\n $title= '';\n switch($network){\n case 'facebook':\n $title = __('Like us on Facebook','tw');\n break;\n case 'twitter':\n $title = __('Follow us on Twitter','tw');\n break;\n case 'instagram':\n $title = __('Follow us on Instagram','tw');\n break;\n case 'pinterest':\n $title = __('Follow us on Pinterest','tw');\n break;\n case 'tumblr':\n $title = __('Follow us on Tumblr','tw');\n break;\n case 'linkedin':\n $title = __('Follow us on Linkedin','tw');\n break;\n case 'slideshare':\n $title = __('See our presentations on Slideshare','tw');\n break;\n case 'googleplus':\n $title = __('Follow us on Google+','tw');\n break;\n case 'youtube':\n $title = __('Subscribe to our Youtube channel','tw');\n break;\n case 'vimeo':\n $title = __('Watch our videos on Vimeo','tw');\n break;\n }\n ?>\n <li class=\"width-<?php echo $count; ?>\">\n <a class=\"contact-<?php echo $network; ?>\" href=\"<?php echo $details['url']; ?>\" target=\"_blank\" title=\"<?php echo $title; ?>\" data-toggle=\"tooltip\" data-placement=\"top\">\n <?php if($square_social_icons):?>\n <i class=\"fa <?php echo $details['icon']; ?>\"></i>\n <?php else: ?>\n <span class=\"fa-stack fa-lg\">\n <i class=\"fa fa-circle fa-stack-2x\"></i>\n <i class=\"fa <?php echo $details['icon']; ?> fa-stack-1x fa-inverse\"></i>\n </span>\n <?php endif; ?>\n </a>\n </li>\n <?php endforeach; ?>\n </ul>\n </div>\n <?php endif; ?>\n\n\t\t\t</div><!-- social-widget-container -->\n<?php echo $args['after_widget'];\n }\n}", "function notifica_post_facebook() {\n\n global $baseUrl, $mysql;\n\n $uname = $_SESSION['username'];\n $facebook = get_fb_instance();\n\n $utenti = mysql_query(\"SELECT fb_uid FROM utenti WHERE fb_uid IS NOT NULL\", $mysql);\n if($utenti)\n while($row = mysql_fetch_assoc($utenti))\n $uids[] = $row['fb_uid'];\n //$uid_string = implode(',', $uids);\n\n $attachment = array(\n 'access_token' => $facebook->getAccessToken(),\n 'name' => 'NewFantaTorneo',\n 'link' => \"$baseUrl\",\n 'caption' => \"Nuovo post di \" . $uname . \" sul wall\",\n 'description' => 'Corri a leggerlo!',\n 'picture' => $baseUrl . 'images/facebook_post_image_message.png',\n 'message' => 'Hai un nuovo messaggio in bacheca!'\n );\n\n foreach($uids as $uid)\n if($uid != $_SESSION['fb_uid'])\n @$facebook->api(\"/\" . $uid . \"/feed\", 'POST', $attachment);\n}", "function get_feed_link($feed = '')\n {\n }", "public function widget( $args, $instance ) { \n\t\t// return if sharing is disabled\n\t\tif(!the_champ_social_sharing_enabled() || the_champ_is_amp_page() || !the_champ_vertical_sharing_enabled()){\n\t\t\treturn;\n\t\t}\n\t\textract( $args );\n\t\tif($instance['hide_for_logged_in']==1 && is_user_logged_in()) return;\n\t\t\n\t\tglobal $theChampSharingOptions, $post;\n\t\tif(NULL === $post){\n\t\t\t$postId = 0;\n\t\t}else{\n\t\t\t$postId = $post->ID;\n\t\t}\n\t\t$customUrl = apply_filters('heateor_ss_custom_share_url', '', $post);\n\t\tif($customUrl){\n\t\t\t$sharingUrl = $customUrl;\n\t\t\t$postId = 0;\n\t\t}elseif(isset($instance['target_url'])){\n\t\t\tif($instance['target_url'] == 'default'){\n\t\t\t\t$sharingUrl = html_entity_decode(esc_url(the_champ_get_http().$_SERVER[\"HTTP_HOST\"] . $_SERVER[\"REQUEST_URI\"]));\n\t\t\t\tif(is_home()){\n\t\t\t\t\t$sharingUrl = esc_url(home_url());\n\t\t\t\t\t$postId = 0;\n\t\t\t\t}elseif(!is_singular()){\n\t\t\t\t\t$sharingUrl = html_entity_decode(esc_url(the_champ_get_http().$_SERVER[\"HTTP_HOST\"] . $_SERVER[\"REQUEST_URI\"]));\n\t\t\t\t\t$postId = 0;\n\t\t\t\t}elseif(isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING']){\n\t\t\t\t\t$sharingUrl = html_entity_decode(esc_url(the_champ_get_http().$_SERVER[\"HTTP_HOST\"] . $_SERVER[\"REQUEST_URI\"]));\n\t\t\t\t}elseif(get_permalink($post-> ID)){\n\t\t\t\t\t$sharingUrl = get_permalink($post->ID);\n\t\t\t\t}\n\t\t\t}elseif($instance['target_url'] == 'homepage'){\n\t\t\t\t$sharingUrl = esc_url(home_url());\n\t\t\t\t$postId = 0;\n\t\t\t}elseif($instance['target_url'] == 'custom'){\n\t\t\t\t$sharingUrl = isset($instance['target_url_custom']) ? trim($instance['target_url_custom']) : get_permalink($post->ID);\n\t\t\t\t$postId = 0;\n\t\t\t}\n\t\t}else{\n\t\t\t$sharingUrl = get_permalink($post->ID);\n\t\t}\n\n\t\t$shareCountUrl = $sharingUrl;\n\t\tif(isset($instance['target_url']) && $instance['target_url'] == 'default' && is_singular()){\n\t\t\t$shareCountUrl = get_permalink($post->ID);\n\t\t}\n\t\t$customPostUrl = heateor_ss_apply_target_share_url_filter($sharingUrl, 'vertical', false);\n\t\tif($customPostUrl != $sharingUrl){\n\t\t\t$sharingUrl = $customPostUrl;\n\t\t\t$shareCountUrl = $sharingUrl;\n\t\t}\n\n\t\t$ssOffset = 0;\n\t\tif(isset($instance['alignment']) && isset($instance[$instance['alignment'] . '_offset'])){\n\t\t\t$ssOffset = $instance[$instance['alignment'] . '_offset'];\n\t\t}\n\n\t\t$shareCountTransientId = heateor_ss_get_share_count_transient_id($sharingUrl);\n\t\t$cachedShareCount = heateor_ss_get_cached_share_count($shareCountTransientId);\n\n\t\techo \"<div class='the_champ_sharing_container the_champ_vertical_sharing\" . ( isset( $theChampSharingOptions['hide_mobile_sharing'] ) ? ' the_champ_hide_sharing' : '' ) . ( isset( $theChampSharingOptions['bottom_mobile_sharing'] ) ? ' the_champ_bottom_sharing' : '' ) . \"' \" . ( the_champ_is_amp_page() ? \"\" : \"ss-offset='\". $ssOffset .\"' \" ) . \"style='width:\" . ((isset($theChampSharingOptions['vertical_sharing_size']) ? $theChampSharingOptions['vertical_sharing_size'] : 35) + 4) . \"px;\".(isset($instance['alignment']) && $instance['alignment'] != '' && isset($instance[$instance['alignment'].'_offset']) ? $instance['alignment'].': '. ( $instance[$instance['alignment'].'_offset'] == '' ? 0 : $instance[$instance['alignment'].'_offset'] ) .'px;' : '').(isset($instance['top_offset']) ? 'top: '. ( $instance['top_offset'] == '' ? 0 : $instance['top_offset'] ) .'px;' : '') . (isset($instance['vertical_bg']) && $instance['vertical_bg'] != '' ? 'background-color: '.$instance['vertical_bg'] . ';' : '-webkit-box-shadow:none;box-shadow:none;') . \"' \" . ( the_champ_is_amp_page() ? '' : 'super-socializer-data-href=\"' . (isset($shareCountUrl) && $shareCountUrl ? $shareCountUrl : $sharingUrl) . '\"' ) . ($cachedShareCount === false || the_champ_is_amp_page() ? \"\" : \"super-socializer-no-counts='1' \") .\">\";\n\t\t\n\t\tif(isset($theChampSharingOptions['use_shortlinks']) && function_exists('wp_get_shortlink')){\n\t\t\t$sharingUrl = wp_get_shortlink();\n\t\t\t// if bit.ly integration enabled, generate bit.ly short url\n\t\t}elseif(isset($theChampSharingOptions['bitly_enable']) && isset($theChampSharingOptions['bitly_access_token']) && $theChampSharingOptions['bitly_access_token'] != ''){\n\t\t\t$shortUrl = the_champ_generate_sharing_bitly_url($sharingUrl, $postId);\n\t\t\tif($shortUrl){\n\t\t\t\t$sharingUrl = $shortUrl;\n\t\t\t}\n\t\t}\n\t\t//echo $before_widget;\n\t\techo the_champ_prepare_sharing_html($sharingUrl, $shareCountUrl, 'vertical', isset($instance['show_counts']), isset($instance['total_shares']), $shareCountTransientId);\n\t\techo '</div>';\n\t\tif((isset($instance['show_counts']) || isset($instance['total_shares'])) && $cachedShareCount == false){\n\t\t\techo '<script>theChampLoadEvent(\n\t\tfunction(){\n\t\t\t// sharing counts\n\t\t\ttheChampCallAjax(function(){\n\t\t\t\ttheChampGetSharingCounts();\n\t\t\t});\n\t\t}\n\t);</script>';\n\t\t}\n\t\t//echo $after_widget;\n\t}", "function wall()\n\t\t{\n\t\t\n\t\t// Parameters\n \t$limit = (! $this->EE->TMPL->fetch_param('limit')) ? 5 : $this->EE->TMPL->fetch_param('limit');\n \t$pageId = $this->EE->TMPL->fetch_param('page');\n\t\t\t\n\t\t// Page feed data and display\n\t\t$pageUrl = 'https://graph.facebook.com/'.$pageId.'/feed?limit='.$limit;\n\t\t$page = file_get_contents($pageUrl);\n\t\t$obj = json_decode($page);\n\t\t\n\t\t$output = '';\n\t\t\t\n\t\tforeach ($obj->data as $data) {\n\t\t\t// Display outpu if the type of Facebook entry is a status update\n\t\t\tif (($data->type) == 'status' && isset($data->from->id) && isset($data->from->name)) {\n\t\t\t\t$HTMLpattern = \"/http:\\/\\/([a-z0-9\\-]*)(\\.)+(com|net|org)/\";\n\t\t\t\t\n\t\t\t\t// This checks for apps that post and include HTML links. It will format the link and display. Else statement posts message as is.\n\t\t\t\tif (isset($data->application->id) && preg_match($HTMLpattern, ($data->message))) {\n\t\t\t\t\t$words = explode(' ', ($data->message));\n\t\t\t\t\tforeach ($words as &$text) {\n\t\t\t\t\t\tif (preg_match('/^http:\\/\\//', $text)) {\n\t\t\t\t\t\t\t$text = '<a href=\"'.$text.'\">'.$text.'</a>';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$message = implode(' ', $words);\n\t\t\t\t\t$output .= '<br /><div class=\"fb_status\"><span class=\"fb_profile_link\"><a href=\"http://www.facebook.com/profile.php?id='.\"{$data->from->id}\".'\">'.\"{$data->from->name}\".'</a></span> '.\"<div class='fb_message'>$message</div>\".'<br /></div>';\n\t\t\t\t} else {\n\t\t\t\t\t$output .= '<br /><div class=\"fb_status\"><span class=\"fb_profile_link\"><a href=\"http://www.facebook.com/profile.php?id='.\"{$data->from->id}\".'\">'.\"{$data->from->name}\".'</a></span> '.\"<div class='fb_message'>{$data->message}</div>\".'<br /></div>';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Display output if the type of Facebook entry is a photo or video\n\t\t\tif (($data->type) == 'photo' || ($data->type) == 'video' && isset($data->from->id) && isset($data->from->name)) {\n\t\t\t\t$output .= '<br /><div class=\"fb_status\"><span class=\"fb_profile_link\"><a href=\"http://www.facebook.com/profile.php?id='.\"{$data->from->id}\".'\">'.\"{$data->from->name}\".'</a></span> ';\n\t\t\t\tif (isset($data->message)) {\n\t\t\t\t\t$output .= \"<div class='fb_message'>{$data->message}</div>\\n\".'<br />';\n\t\t\t\t\t$output .= '<div class=\"fb_photo\"><a href=\"'.\"{$data->link}\".'\"><img src=\"'.\"{$data->picture}\".'\" /></a></div></div>';\n\t\t\t\t} else {\n\t\t\t\t\t$output .= '<div class=\"fb_photo\"><a href=\"'.\"{$data->link}\".'\"><img src=\"'.\"{$data->picture}\".'\" /></a></div></div>';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Display output if the type of Facebook entry is a link\n\t\t\tif (($data->type) == 'link' && isset($data->from->id) && isset($data->from->name)) {\n\t\t\t\t$output .= '<br /><div class=\"fb_status\"><span class=\"fb_profile_link\"><a href=\"http://www.facebook.com/profile.php?id='.\"{$data->from->id}\".'\">'.\"{$data->from->name}\".'</a></span> ';\n\t\t\t\tif (isset($data->message)) {\n\t\t\t\t\t$output .= \"<div class='fb_message'>{$data->message}</div>\\n\".'<br />';\n\t\t\t\t\t$output .= '<div class=\"fb_link\"><a href=\"'.\"{$data->link}\".'\">'.\"{$data->name}\\n\".'</a></div></div>';\n\n\t\t\t\t} else {\n\t\t\t\t\t$output .= '<div class=\"fb_link\"><a href=\"'.\"{$data->link}\".'\">'.\"{$data->name}\\n\".'</a></div></div>';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Display date information for posts\t\t\t\t\n\t\t\t$postTime = date('M d, Y',strtotime($data->created_time));\n\t\t\t$output .= '<div class=\"fb_time\">'.$postTime.'</div>';\n\t\t}\n\t\t\t\n\t\treturn $output;\n\t\t}", "function f1_api_feed_shortcode_handler($atts)\n{\n\treturn f1_api_feed();\n}", "function widget_ffes_feed_control() {\r\n $options = $newoptions = get_option('widget_ffes_feed');\r\n if ( $_POST['ffes-feed-submit'] ) {\r\n $newoptions['title'] = strip_tags(stripslashes($_POST['ffes-feed-title']));\r\n }\r\n if ( $options != $newoptions ) {\r\n $options = $newoptions;\r\n update_option('widget_ffes_feed', $options);\r\n }\r\n ?>\r\n <div style=\"text-align:right\">\r\n <label for=\"ffes-feed-title\" style=\"line-height:35px;display:block;\"><?php _e('Widget title:', 'ffes_widgets'); ?>\r\n <input type=\"text\" id=\"ffes-feed-title\" name=\"ffes-feed-title\" value=\"<?php echo wp_specialchars($options['title'], true); ?>\" /></label>\r\n <input type=\"hidden\" name=\"ffes-feed-submit\" id=\"ffes-feed-submit\" value=\"1\" />\r\n </div>\r\n <?php\r\n }", "function print_embed_sharing_button()\n {\n }", "function fb_like( $atts, $content=null ){\n extract(shortcode_atts(array( \n 'send' => 'false',\n 'layout' => 'standard',\n 'show_faces' => 'true',\n 'width' => '400px',\n 'action' => 'like',\n 'font' => '',\n 'colorscheme' => 'light',\n 'ref' => '',\n 'locale' => 'en_US',\n 'appId' => '' // Put your AppId here is you have one\n ), $atts));\n \n $fb_like_code = <<<HTML\n <div id=\"fb-root\"></div><script src=\"http://connect.facebook.net/$locale/all.js#appId=$appId&amp;xfbml=1\"></script>\n <fb:like ref=\"$ref\" href=\"$content\" layout=\"$layout\" colorscheme=\"$colorscheme\" action=\"$action\" send=\"$send\" width=\"$width\" show_faces=\"$show_faces\" font=\"$font\"></fb:like>\nHTML;\n \n return $fb_like_code;\n}", "function frame_share_links($providers = null, $post_id = null)\n{\n // Get the providers\n if ($providers === null)\n $providers = array('facebook', 'google', 'linkedin', 'pinterest', 'reddit', 'twitter');\n else\n $providers = (array) $providers;\n\n $output = '<ul>';\n\n foreach($providers as $provider)\n {\n // $output .= '<li>'..'</li>';\n }\n\n $output .= '</ul>';\n}", "function pt_document_open() {\n\nglobal $post, $site_options, $membersite;\n\nforeach ( $site_options as $value ) {\n\t$$value['id'] = pt_isset($value['value']); \n}\n\npt_popup_cookies();\n$seo = new PtSeo;\n\n$membersite = false;\n\n$xmlns = ( $pt_comments_type == 'fb' || $pt_comments_type == 'both') ? 'xmlns:fb=\"http://www.facebook.com/2008/fbml\" xmlns:og=\"http://opengraphprotocol.org/schema/\"' : '';\t\t\n\n?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\" <?php language_attributes(); ?> <?php echo $xmlns; ?>>\n\n<head profile=\"http://gmpg.org/xfn/11\">\n<meta http-equiv=\"Content-Type\" content=\"<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>\" />\n\n<title><?php pt_seo_title(); ?></title>\n<?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"<?php bloginfo('stylesheet_url'); ?>\" media=\"screen\" />\n<link rel=\"alternate\" type=\"application/rss+xml\" title=\"<?php bloginfo('name'); ?> RSS Feed\" href=\"<?php echo $seo->PtRss(); ?>\" />\n<link rel=\"pingback\" href=\"<?php bloginfo('pingback_url'); ?>\" />\n\n<?php wp_head(); ?>\n<?php \nif( is_page() || is_single() ) {\n\tif ( $pt_comments_type == 'fb' || $pt_comments_type == 'both' ) {\n\t$ogmeta = get_post_meta($post->ID, 'pt_post_meta_box', true);\n\t$ogthumb = pt_isset($ogmeta['post_thumb']);\n\t$ogdesc = pt_excerpt($post->post_content, 160, false );\n\n\t$remove = array(\"\\n\", \"\\r\\n\", \"\\r\");\n?>\n<meta property=\"og:title\" content=\"<?php echo trim(wptexturize($post->post_title));?>\" />\n<meta property=\"og:type\" content=\"article\" />\n<meta property=\"og:url\" content=\"<?php echo get_permalink($post->ID); ?>\" />\n<meta property=\"og:image\" content=\"<?php echo $ogthumb; ?>\" />\n<meta property=\"og:site_name\" content=\"<?php bloginfo('name'); ?>\" />\n<meta property=\"fb:app_id\" content=\"<?php echo $pt_fb_appid; ?>\" />\n<meta property=\"og:description\" content=\"<?php echo trim(wptexturize(str_replace($remove, '', $ogdesc))); ?>\" />\n\n<?php \n\t}\n} \n\nif ( get_option( 'pt_enable_custom' ) == 'true' ) {\n\techo '<link rel=\"stylesheet\" type=\"text/css\" href=\"' . get_bloginfo('template_url') . '/custom/custom-site.css\" media=\"screen\" />';\n}\n\nif ( $pt_custom_favicon ) {\n\techo '<link rel=\"shortcut icon\" type=\"image/x-icon\" href=\"' . $pt_custom_favicon . '\" />';\n}\n?>\n<link href='http://fonts.googleapis.com/css?family=Ubuntu:400,500,700|Exo:300,400,500,600,700,800|Ubuntu+Condensed|Open+Sans:400,300,600,700,800|Roboto:400,300,500,700,900|Handlee' rel='stylesheet' type='text/css'>\n</head>\n\n<body class=\"sitebody\">\n<?php\n}", "function gallo_share() {\n\t$url = urlencode(get_the_permalink());\n\t$title = urlencode(html_entity_decode(get_the_title(), ENT_COMPAT, 'UTF-8'));\n\t$media = urlencode(get_the_post_thumbnail_url(get_the_ID(), 'full'));\n\ninclude( locate_template('include/share.php', false, false) );\n}", "function\nwidget_pr_share ($title, $url)\n{\n $title = trim ($title);\n $url = trim ($url);\n $p = '';\n\n $p .= '<img src=\"images/widget/widget_relate_tellafriend.png\" border=\"0\">'\n .'<a href=\"mailto:?body='\n .$url\n .'&subject='\n .$title\n .'\"'\n .'>Share</a>'\n;\n return $p;\n}", "function facebook_live_sermon() {\n \n\t// Set UI labels for Custom Post Type\n\t\t$labels = array(\n\t\t\t'name' => _x( 'Sermon Videos', 'Post Type General Name', 'twentytwenty' ),\n\t\t\t'singular_name' => _x( 'Sermon Video', 'Post Type Singular Name', 'twentytwenty' ),\n\t\t\t'menu_name' => __( 'Sermon Videos', 'twentytwenty' ),\n\t\t\t'parent_item_colon' => __( 'Parent Sermon Video', 'twentytwenty' ),\n\t\t\t'all_items' => __( 'All Sermon Videos', 'twentytwenty' ),\n\t\t\t'view_item' => __( 'View Sermon Video', 'twentytwenty' ),\n\t\t\t'add_new_item' => __( 'Add New Sermon Video', 'twentytwenty' ),\n\t\t\t'add_new' => __( 'Add New', 'twentytwenty' ),\n\t\t\t'edit_item' => __( 'Edit Sermon Video', 'twentytwenty' ),\n\t\t\t'update_item' => __( 'Update Sermon Video', 'twentytwenty' ),\n\t\t\t'search_items' => __( 'Search Sermon Video', 'twentytwenty' ),\n\t\t\t'not_found' => __( 'Not Found', 'twentytwenty' ),\n\t\t\t'not_found_in_trash' => __( 'Not found in Trash', 'twentytwenty' ),\n\t\t);\n\t\t \n\t// Set other options for Custom Post Type\n\t\t $desc = \"Go to https://developers.facebook.com/docs/plugins/embedded-video-player and paste the facebook url and click on get code, copy that code and put in content\";\n\t\t$args = array(\n\t\t\t'label' => __( 'Sermon Videos', 'twentytwenty' ),\n\t\t\t'description' => __( 'Sermon Video news and reviews', 'twentytwenty' ),\n\t\t\t'labels' => $labels,\n\t\t\t// Features this CPT supports in Post Editor\n\t\t\t'supports' => array( 'title', 'editor', 'excerpt', 'revisions' ),\n\t\t\t/* A hierarchical CPT is like Pages and can have\n\t\t\t* Parent and child items. A non-hierarchical CPT\n\t\t\t* is like Posts.\n\t\t\t*/ \n\t\t\t'menu_icon' => 'dashicons-video-alt',\n\t\t\t'description' => $desc,\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'can_export' => true,\n\t\t\t'has_archive' => true,\n 'rewrite' => array('slug' => 'sermon-gallery'),\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\t'show_in_rest' => true,\n\t \n\t\t);\n\t\t \n\t\t// Registering your Custom Post Type\n\t\tregister_post_type( 'sermon-video', $args );\n\n\n\n\n\n\n\n\n\t\t \n\t// Set UI labels for Custom Post Type\n\t$labels = array(\n\t\t'name' => _x( 'Church Gallery', 'Post Type General Name', 'twentytwenty' ),\n\t\t'singular_name' => _x( 'Church Gallery', 'Post Type Singular Name', 'twentytwenty' ),\n\t\t'menu_name' => __( 'Church Gallery', 'twentytwenty' ),\n\t\t'parent_item_colon' => __( 'Parent Church Gallery', 'twentytwenty' ),\n\t\t'all_items' => __( 'All Church Gallery', 'twentytwenty' ),\n\t\t'view_item' => __( 'View Church Gallery', 'twentytwenty' ),\n\t\t'add_new_item' => __( 'Add New Church Gallery', 'twentytwenty' ),\n\t\t'add_new' => __( 'Add New', 'twentytwenty' ),\n\t\t'edit_item' => __( 'Edit Church Gallery', 'twentytwenty' ),\n\t\t'update_item' => __( 'Update Church Gallery', 'twentytwenty' ),\n\t\t'search_items' => __( 'Search Church Gallery', 'twentytwenty' ),\n\t\t'not_found' => __( 'Not Found', 'twentytwenty' ),\n\t\t'not_found_in_trash' => __( 'Not found in Trash', 'twentytwenty' ),\n\t);\n\t \n// Set other options for Custom Post Type\n\t\t$args = array(\n\t\t'label' => __( 'Church Gallery', 'twentytwenty' ),\n\t\t'description' => __( 'Church Gallery news and reviews', 'twentytwenty' ),\n\t\t'labels' => $labels,\n\t\t// Features this CPT supports in Post Editor\n\t\t'supports' => array( 'title', 'editor', 'excerpt', 'revisions' ),\n\t\t/* A hierarchical CPT is like Pages and can have\n\t\t* Parent and child items. A non-hierarchical CPT\n\t\t* is like Posts.\n\t\t*/ \n\t\t'menu_icon' => 'dashicons-format-gallery',\n\t\t'description' => $desc,\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'show_in_nav_menus' => true,\n\t\t'show_in_admin_bar' => true,\n\t\t'menu_position' => 5,\n\t\t'can_export' => true,\n\t\t'has_archive' => true,\n\t\t'rewrite' => array('slug' => 'sermon-video'),\n\t\t'exclude_from_search' => false,\n\t\t'publicly_queryable' => true,\n\t\t'capability_type' => 'post',\n\t\t'show_in_rest' => true,\n \n\t);\n\t \n\t// Registering your Custom Post Type\n\tregister_post_type( 'sermon-gallery', $args );\n\n\n\n\n\t\n\t\t \n\t// Set UI labels for Custom Post Type\n\t$labels = array(\n\t\t'name' => _x( 'Media Message', 'Post Type General Name', 'twentytwenty' ),\n\t\t'singular_name' => _x( 'Media Message', 'Post Type Singular Name', 'twentytwenty' ),\n\t\t'menu_name' => __( 'Media Message', 'twentytwenty' ),\n\t\t'parent_item_colon' => __( 'Parent Media Message', 'twentytwenty' ),\n\t\t'all_items' => __( 'All Media Message', 'twentytwenty' ),\n\t\t'view_item' => __( 'View Media Message', 'twentytwenty' ),\n\t\t'add_new_item' => __( 'Add New Media Message', 'twentytwenty' ),\n\t\t'add_new' => __( 'Add New', 'twentytwenty' ),\n\t\t'edit_item' => __( 'Edit Media Message', 'twentytwenty' ),\n\t\t'update_item' => __( 'Update Media Message', 'twentytwenty' ),\n\t\t'search_items' => __( 'Search Media Message', 'twentytwenty' ),\n\t\t'not_found' => __( 'Not Found', 'twentytwenty' ),\n\t\t'not_found_in_trash' => __( 'Not found in Trash', 'twentytwenty' ),\n\t);\n\t \n// Set other options for Custom Post Type\n\t\t$args = array(\n\t\t'label' => __( 'Media Message', 'twentytwenty' ),\n\t\t'description' => __( 'Media Message news and reviews', 'twentytwenty' ),\n\t\t'labels' => $labels,\n\t\t// Features this CPT supports in Post Editor\n\t\t'supports' => array( 'title', 'editor', 'excerpt', 'revisions' ),\n\t\t/* A hierarchical CPT is like Pages and can have\n\t\t* Parent and child items. A non-hierarchical CPT\n\t\t* is like Posts.\n\t\t*/ \n\t\t'menu_icon' => 'dashicons-text-page',\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'show_in_nav_menus' => true,\n\t\t'show_in_admin_bar' => true,\n\t\t'menu_position' => 5,\n\t\t'can_export' => true,\n\t\t'has_archive' => true,\n\t\t'rewrite' => array('slug' => 'media-message'),\n\t\t'exclude_from_search' => false,\n\t\t'publicly_queryable' => true,\n\t\t'capability_type' => 'post',\n\t\t'show_in_rest' => true,\n \n\t);\n\t \n\t// Registering your Custom Post Type\n\tregister_post_type( 'media-message', $args );\n\t \n\t}", "public function actionGetFacebookFeeds() {\n Yii::app()->user->SiteSessions;\n $feeds = array();\n $json_res = Yii::app()->curl\n ->setOption(CURLOPT_HTTPHEADER, array('Content-type: application/json'))\n ->post(\"https://www.facebook.com/feeds/page.php?id=175377742595349&format=json\", array());\n $json_arr = CJSON::decode($json_res);\n if (!empty($json_arr['entries'])) {\n $feeds = array_slice($json_arr['entries'], 0, 5);\n }\n\n $this->renderPartial(\"//site/_facebook_feeds\", array(\"feeds\" => $feeds));\n }", "function emc_sharing_display() {\r\n\r\n\tif ( class_exists( 'Jetpack', false ) ) {\r\n\t\t$jetpack_active_modules = get_option('jetpack_active_modules');\r\n\t\tif ( $jetpack_active_modules && in_array( 'sharedaddy', $jetpack_active_modules ) ) {\r\n\t\t\techo sharing_display();\r\n\t\t\t?>\r\n\t\t\t<!--<div class=\"sharedaddy sd-sharing-enabled\"><div class=\"robots-nocontent sd-block sd-social sd-social-icon-text sd-sharing\"><h3 class=\"sd-title\">Share this:</h3><div class=\"sd-content\"><ul><li class=\"share-facebook\"><a rel=\"nofollow\" class=\"share-facebook sd-button share-icon\" href=\"http://local.earlymath.erikson.edu/new-study-differentiating-works/?share=facebook\" title=\"Share on Facebook\" id=\"sharing-facebook-6199\"><span>Facebook</span></a></li><li class=\"share-twitter\"><a rel=\"nofollow\" class=\"share-twitter sd-button share-icon\" href=\"http://local.earlymath.erikson.edu/new-study-differentiating-works/?share=twitter\" title=\"Click to share on Twitter\" id=\"sharing-twitter-6199\"><span>Twitter</span></a></li><li class=\"share-pinterest\"><a rel=\"nofollow\" class=\"share-pinterest sd-button share-icon\" href=\"http://local.earlymath.erikson.edu/new-study-differentiating-works/?share=pinterest\" title=\"Click to share on Pinterest\"><span>Pinterest</span></a></li><li class=\"share-google-plus-1\"><a rel=\"nofollow\" class=\"share-google-plus-1 sd-button share-icon\" href=\"http://local.earlymath.erikson.edu/new-study-differentiating-works/?share=google-plus-1\" title=\"Click to share on Google+\" id=\"sharing-google-6199\"><span>Google +1</span></a></li><li class=\"share-email\"><a rel=\"nofollow\" class=\"share-email sd-button share-icon\" href=\"http://local.earlymath.erikson.edu/new-study-differentiating-works/?share=email\" title=\"Click to email this to a friend\"><span>Email</span></a></li><li class=\"share-print\"><a rel=\"nofollow\" class=\"share-print sd-button share-icon\" href=\"http://local.earlymath.erikson.edu/new-study-differentiating-works/#print\" title=\"Click to print\"><span>Print</span></a></li><li class=\"share-end\"></li></ul></div></div></div>-->\r\n\t\t\t<?php\r\n\t\t}\r\n\t}\r\n\r\n}", "function ebay_feeds_for_wordpress_Widget() {\n // curl need to be installed\n\tregister_widget( 'ebay_feeds_for_wordpress_Widget_class' );\n}", "function like_fb_menu() {\n\tadd_options_page( 'Like FB Plugin Options', 'Like FB', 'manage_options', 'like-fb-option', 'like_fb_plugin_options' );\n}", "function addFeed($feed,$url,$return=true);", "function do_feed()\n {\n }", "function wpcr_twitter_extended_callback() {\n?>\n\t<div>\n\t<br /><br />\n\t<p><b>Publish Settings</b></p><br />\n\tSettings for the Twitter Publish plugin.<br />\n\t<?php wpcr_twitter_publish_auto_callback(); ?>\n\t</div>\n\n<?php\n}", "function wolf_share_output_social_buttons( $content ) {\n\n\t$selected_post_types = wolf_share_get_option( 'post_types' );\n\t$post_type = get_post_type();\n\t$condition = ( is_single() && isset( $selected_post_types[ $post_type ] ) );\n\n\t$new_content = '';\n\n\tif ( $condition ) {\n\t\t$new_content .= wolf_share();\n\t}\n\n\t$new_content .= $content;\n\n\tif ( $condition ) {\n\t\t$new_content .= wolf_share();\n\t}\n\n\treturn $new_content;\n\n}", "public static function getFeeds(&$params)\n\t{\n\t\tself::$lastError=\"\";\n\t\t$client_id = $params->get('client_id', '');\n\t\t$client_secret = $params->get('client_secret', '');\n\t\t$pagename = $params->get('pagename', '');\n\t\t$feedcount = $params->get('feed_count', '5');\n\t\t$width = $params->get('width', '100%');\n\t\t$height = $params->get('height', '');\n\t\t$videowidth = $params->get('videowidth', '');\n\t\tif ($videowidth!='') $videowidth=\" width='$videowidth'\";\n\t\t$videoheight = $params->get('videoheight', '');\n\t\tif ($videoheight!='') $videoheight=\" height='$videoheight'\";\n\t\t\n\t\t$comment_text = $params->get('comment_text', '');\n\t\tif ($comment_text=='') $comment_text=JText::_(\"MOD_HEC_FACEBOOK_FEED_TEMPLATE_COMMENT\");\n\t\t$photo_title_text = $params->get('photo_title_text', '');\n\t\tif ($photo_title_text=='') $photo_title_text=JText::_(\"MOD_HEC_FACEBOOK_FEED_TEMPLATE_PICTURE\");\n\t\t$video_title_text = $params->get('video_title_text', '');\n\t\tif ($video_title_text=='') $video_title_text=JText::_(\"MOD_HEC_FACEBOOK_FEED_TEMPLATE_VIDEO\");\n\t\t$link_title_text = $params->get('link_title_text', '');\n\t\tif ($link_title_text=='') $link_title_text=JText::_(\"MOD_HEC_FACEBOOK_FEED_TEMPLATE_LINK\");\n\t\t$default_title_text = $params->get('default_title_text', '');\n\t\tif ($default_title_text=='') $default_title_text=JText::_(\"MOD_HEC_FACEBOOK_FEED_TEMPLATE_DEFAULT\");\n\t\t\n\t\t$show_events = ($params->get('show_events', '0')=='1');\n\t\t\n\t\t$user = JFactory::getUser();\n\t\t$language = $user->getParam('language', 'fr_FR');\n\t\t$feeds = array();\n\t\t$url = 'https://graph.facebook.com/oauth/access_token?client_id='.$client_id.'&client_secret='.$client_secret.'&grant_type=client_credentials';\n\t\t//$url = 'https://graph.facebook.com/'.$pagename.'/accounts?client_id='.$client_id.'&client_secret='.$client_secret.'&grant_type=client_credentials';\n\t\t$tokenresp = file_get_contents($url);\n\t\tif ($tokenresp)\n\t\t{\n\t\t\t$tokendata=json_decode($tokenresp);\n\t\t\t$token = $tokendata->access_token;\n\t\t\t//$tokenresp=explode('=',$tokenresp);\n\t\t\t//$token=$tokenresp[1];\n\t\t\t// Photos : https://graph.facebook.com/mach78rc/photos?fields=created_time,id,status_type,type,story,message,source,picture,link,name,description,icon,parent_id&access_token=1407222099294113|CmpdVxUxfZTgx4b9Ne9aTtIMrPg\n\t\t\t$url='https://graph.facebook.com/'.$pagename.'/feed?fields=created_time,id,status_type,type,story,message,source,picture,link,name,description,icon,parent_id,attachments&limit='.$feedcount.'&locale=$language&access_token='.$token;\n\t\t\t$payload = file_get_contents($url);\n\t\t\tif (!$payload) \n\t\t\t{\n\t\t\t\tself::$lastError = \"Bad feed answer\";\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$data = json_decode($payload);\n\t\t\t$n=0;\n\t\t\tforeach($data->data as $e)\n\t\t\t{\n\t\t\t\t$n++;\n\t\t\t\t$remove=false;\n\t\t\t\t$item=new stdClass();\n\t\t\t\t$item->content =\"\";\n\t\t\t\t$item->created_time= DateTime::createFromFormat('Y-m-d\\TH:i:s+O', $e->created_time);\n\t\t\t\t$item->id=$e->id;\n\t\t\t\t$item->link=$e->link;\n\t\t\t\tif (isset($e->message)) { $item->message=ModHECFacebookFeedHelper::addA($e->message) ;\t}\telse\t{ $item->message=\"\";\t}\n\t\t\t\tif (isset($e->description)) { $item->description=ModHECFacebookFeedHelper::addA($e->description);\t}\telse\t{ $item->description=\"\";\t}\n\t\t\t\tswitch ($e->status_type)\n\t\t\t\t{\n\t\t\t\t\tcase 'shared_story':\n\t\t\t\t\t\tswitch($e->type)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcase 'photo':\n\t\t\t\t\t\t\t\t$photourl=$e->picture;\n\t\t\t\t\t\t\t\tif (isset($e->attachments))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$media=$e->attachments->data[0]->media;\n\t\t\t\t\t\t\t\t\tif ($media)\n\t\t\t\t\t\t\t\t\t\t$photourl=$media->image->src;\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\t$item->title = str_replace(\"{name}\", $e->name, $photo_title_text );\n\t\t\t\t\t\t\t\t$item->content = \"<img src='\".$photourl.\"' class='photo-image' />\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'video':\n\t\t\t\t\t\t\t\t$item->title = str_replace(\"{name}\", $e->name, $video_title_text );\n\t\t\t\t\t\t\t\t$item->content=\"<video id='my-video-\".$n.\"' class='video-js' controls preload='none' $videoheight $videowidth\n\t\t\t\t\t\t\t\t\t\t\tdata-setup='{\\\"language\\\":\\\"fr\\\"}' poster='\".$e->picture.\"'>\n\t\t\t\t\t\t\t\t\t\t\t<source src='\".$e->source.\"' type='video/mp4'>\n\t\t\t\t\t\t\t\t\t\t\t<p class='vjs-no-js'>To view this video please enable JavaScript</p>\n\t\t\t\t\t\t\t\t\t\t</video>\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'link':\n\t\t\t\t\t\t\t\t$item->title = str_replace(\"{name}\", $e->name, $link_title_text );\n\t\t\t\t\t\t\t\t$item->content = \"<img src='\".$e->picture.\"' class='link-image' />\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t$item->title = str_replace(\"{name}\", $e->name, $default_title_text );\n\t\t\t\t\t\t\t\t$item->content =\"\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'added_photos':\n\t\t\t\t\tcase 'created_event':\n\t\t\t\t\t\t$remove=true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$item->title = $e->story;\n\t\t\t\t\t\t$item->content =\"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ($e->type=='event' && !$show_events) $remove=true;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif (!$remove)\n\t\t\t\t\t$feeds[]=$item;\n\t\t\t}\n\t\t\tself::$lastError = \"OK : \".count($feeds).\" feeds\";\n\t\t\treturn $feeds;\n\t\t}\n\t\telse \n\t\t{\n\t\t\tself::$lastError = \"Error Token\";\n\t\t\treturn false;\n\t\t}\n\t}", "function get_twitter_share_url( $the_post = null ) {\n\tglobal $post;\n\tif ( empty( $the_post ) ) {\n\t\t$the_post = $post;\n\t}\n\n\t$permalink = get_the_permalink( $the_post->ID );\n\t$the_title = get_the_title( $the_post->ID );\n\t$handle = get_theme_mod( 'twitter_handle' );\n\n\treturn 'https://twitter.com/intent/tweet?text=' . rawurlencode( $the_title ) . '&url=' . $permalink . '&via=' . $handle;\n}", "function circle_display_archive_sharing() {\n\tif ( ! circle_option( 'display_archive_sharing' ) ) {\n\t\treturn;\n\t}\n\tget_template_part( 'template-parts/post-social-sharing' );\n}", "function rad_widget_content(){\n\t//show an RSS feed\n\twp_widget_rss_output( 'http://wordpress.melissacabral.com/feed/', array(\n\t\t'items' \t\t=> 7,\n\t\t'show_summary' \t=> true,\n\t\t'show_date'\t\t=> true,\n\t\t'show_author'\t=> true,\n\t) );\n}", "function post_comments_feed_link($link_text = '', $post_id = '', $feed = '')\n {\n }", "function insert_share_product() {\n\t?>\n\t<script type=\"text/javascript\" src=\"//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-57e482b2e67c850b\"></script>\n\t<div class=\"addthis_inline_share_toolbox_4524\"></div>\n\t<?php\n}", "function spsn_admin_tab() {\n\n add_menu_page('Share blog post with social network', 'Share blog post with social network', 'manage_options', __FILE__, 'spsn_admin_page');\n}", "public function sharebuttons($atts)\n {\n\n $class = '';\n if (!empty($atts['class'])) {\n $class = $atts['class'];\n }\n\n $include = false;\n if (!empty($atts['include'])) {\n $include = explode(',', $atts['include']);\n }\n\n $exclude = false;\n if (!empty($atts['exclude'])) {\n $exclude = explode(',', $atts['exclude']);\n }\n\n $channels = array(\n 'email' => \"mailto:?Subject=\" . urlencode(get_bloginfo('name') . ': ' . get_the_title()) . \"&amp;Body=\" . urlencode(\"dit kwam ik tegen op \" . get_bloginfo('name') . \": http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]\"),\n 'facebook' => \"http://www.facebook.com/sharer.php?u=\" . site_url(),\n 'twitter' => \"https://twitter.com/share?url=\" . site_url() . \"&amp;name=\" . str_replace(' ', '_', get_bloginfo('name')) . \"&amp;hashtags=\" . str_replace(' ', '_', get_bloginfo('name')),\n 'linkedIn' => \"http://www.linkedin.com/shareArticle?mini=true&amp;url=\" . site_url(),\n 'pinterest' => \"javascript:void((function()%7Bvar%20e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('src','http://assets.pinterest.com/js/pinmarklet.js?r='+Math.random()*99999999);document.body.appendChild(e)%7D)());\",\n 'googleplus' => \"https://plus.google.com/share?url=\" . site_url(),\n 'reddit' => \"http://reddit.com/submit?url=\" . site_url() . \"&amp;title=\" . str_replace(' ', '_', get_bloginfo('name')),\n 'tumblr' => \"http://www.tumblr.com/share/link?url=\" . site_url() . \"&amp;title=\" . str_replace(' ', '_', get_bloginfo('name')),\n );\n $rs = '<ul class=\"sharebuttons ' . $class . '\">';\n foreach ($channels as $name => $link) {\n\n $toPrint = true;\n\n // included\n if ($include) {\n $toPrint = false;\n foreach ($include as $item) {\n if ($item == $name) {\n $toPrint = true;\n }\n }\n }\n\n // exclude\n else if ($exclude) {\n foreach ($exclude as $item) {\n if ($item == $name) {\n $toPrint = false;\n }\n }\n }\n\n if ($toPrint) {\n $target = 'target=blank';\n if ($name === 'email') {\n $target = '';\n }\n $rs .= '<li><a class=\"sharebutton ' . $name . '\" href=\"' . $link . '\" ' . $target . '></a></li>';\n }\n }\n $rs .= '</ul>';\n return $rs;\n }", "function f1_api_feed_block_handler($atts)\n{\n\treturn f1_api_feed();\n}", "public function social_icons() {\n\t\t$enabled_socials = get_theme_mod( 'hestia_enable_sharing_icons', true );\n\t\tif ( (bool) $enabled_socials !== true ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$post_link = esc_url( get_the_permalink() );\n\t\t$post_title = get_the_title();\n\n\t\t$facebook_url =\n\t\t\tesc_url(\n\t\t\t\tadd_query_arg(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'u' => $post_link,\n\t\t\t\t\t),\n\t\t\t\t\t'https://www.facebook.com/sharer.php'\n\t\t\t\t)\n\t\t\t);\n\n\t\t$twitter_url =\n\t\t\tesc_url(\n\t\t\t\tadd_query_arg(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'url' => $post_link,\n\t\t\t\t\t\t'text' => rawurlencode( html_entity_decode( wp_strip_all_tags( $post_title ), ENT_COMPAT, 'UTF-8' ) ),\n\t\t\t\t\t),\n\t\t\t\t\t'http://twitter.com/share'\n\t\t\t\t)\n\t\t\t);\n\n\t\t$email_title = str_replace( '&', '%26', $post_title );\n\n\t\t$email_url =\n\t\t\tesc_url(\n\t\t\t\tadd_query_arg(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'subject' => wp_strip_all_tags( $email_title ),\n\t\t\t\t\t\t'body' => $post_link,\n\t\t\t\t\t),\n\t\t\t\t\t'mailto:'\n\t\t\t\t)\n\t\t\t);\n\n\t\t$social_links = '\n <div class=\"col-md-6\">\n <div class=\"entry-social\">\n <a target=\"_blank\" rel=\"tooltip\"\n data-original-title=\"' . esc_attr__( 'Share on Facebook', 'hestia' ) . '\"\n class=\"btn btn-just-icon btn-round btn-facebook\"\n href=\"' . $facebook_url . '\">\n <i class=\"fab fa-facebook-f\"></i>\n </a>\n \n <a target=\"_blank\" rel=\"tooltip\"\n data-original-title=\"' . esc_attr__( 'Share on Twitter', 'hestia' ) . '\"\n class=\"btn btn-just-icon btn-round btn-twitter\"\n href=\"' . $twitter_url . '\">\n <i class=\"fab fa-twitter\"></i>\n </a>\n \n <a rel=\"tooltip\"\n data-original-title=\" ' . esc_attr__( 'Share on Email', 'hestia' ) . '\"\n class=\"btn btn-just-icon btn-round\"\n href=\"' . $email_url . '\">\n <i class=\"fas fa-envelope\"></i>\n </a>\n </div>\n\t\t</div>';\n\t\techo apply_filters( 'hestia_filter_blog_social_icons', $social_links );\n\t}", "public function facebook_settings_on_save_post(){\n global $wpdb;\n if ( \n ! isset($_POST['aios_facebook_publish']) \n || ! wp_verify_nonce( $_POST['aios_facebook_publish'], 'aios_facebook_publish_action' ) \n ) return false;\n\n if(isset($_POST['fb_custom_title']) && !empty($_POST['fb_custom_title'])){\n CsQuery::Cs_Update_Postmeta($_POST['post_ID'], 'aios_fb_custom_title', sanitize_text_field($_POST['fb_custom_title']));\n }\n \n if(isset($_POST['fb_custom_content']) && !empty($_POST['fb_custom_content'])){\n CsQuery::Cs_Update_Postmeta($_POST['post_ID'], 'aios_fb_custom_content', sanitize_text_field($_POST['fb_custom_content']));\n }\n \n \n if( isset( $_POST['aios_fb_instant_post']) && ! empty( $_POST['aios_fb_instant_post'])){\n $ret = $this->publish_to_facebook( $_POST['post_ID'] );\n if( $ret ){\n foreach( $ret as $item ){\n if( $item['response_code'] === 200 ){\n CsQuery::Cs_Insert(array(\n 'table' => 'aios_facebook_statistics',\n 'insert_data'=> array(\n 'post_id' => $_POST['post_ID'],\n 'fb_post_id' => $item['response_text'],\n 'created_on' => date('Y-m-d H:i:s')\n )\n ));\n }\n }\n }\n }\n \n if( isset( $_POST['aios_fb_post_schedule_val'] ) && !empty( $_POST['aios_fb_post_schedule_val'])){\n $aios_fb_post_schedule_val = $_POST['aios_fb_post_schedule_val'];\n if( $aios_fb_post_schedule_val > 0 ){\n \n date_default_timezone_set(get_option('timezone_string'));\n $schedule = strtotime($aios_fb_post_schedule_val);\n \n CsQuery::Cs_Insert(array(\n 'table' => 'aios_social_publish_schedule',\n 'insert_data' => array(\n 'type' => 1, // facebook type 1\n 'post_id' => $_POST['post_ID'],\n 'publish_on' => $schedule,\n 'created_on' => date('Y-m-d H:i:s')\n )\n ));\n \n \n //insert new schedule\n CsFlusher::Cs_Single_Cron_Schedule_Flush( array( 'schedule' => $schedule, 'hook' => \"aiosFbAutoPubCron\", 'args' => array( 'publish_on' => $schedule )));\n }\n }\n }", "public function FbSocialScript() {\n $cms = '';\n $cms .='<div id=\"fb-root\"></div>\n <script>\n (function (d, s, id) {\n var js, fjs = d.getElementsByTagName(s)[0];\n if (d.getElementById(id))\n return;\n js = d.createElement(s);\n js.id = id;\n js.src = \"//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.6\";\n fjs.parentNode.insertBefore(js, fjs);\n }(document,\"script\",\"facebook-jssdk\"));\n </script>';\n return $cms;\n }", "function newShare();", "function getFacebookShareLink($url, $title)\n {\n return 'https://www.facebook.com/sharer/sharer.php?u=' . $url .'&t=' . rawurlencode($title);\n }", "function the_champ_facebook_page(){\r\n\t// facebook options\r\n\tglobal $theChampFacebookOptions;\r\n\t// message on saving options\r\n\techo the_champ_settings_saved_notification();\r\n\trequire 'admin/social_commenting.php';\r\n}", "function get_the_content_feed($feed_type = \\null)\n {\n }", "function get_author_feed_link($author_id, $feed = '')\n {\n }", "function wprss_change_fb_url( $post_id, $url ) {\n if ( stripos( $url, 'http://facebook.com' ) === 0\n || stripos( $url, 'http://www.facebook.com' ) === 0\n || stripos( $url, 'https://facebook.com' ) === 0\n || stripos( $url, 'https://www.facebook.com' ) === 0\n ) {\n # Generate the new URL to FB Graph\n $com_index = stripos( $url, '.com' );\n $fb_page = substr( $url, $com_index + 4 ); # 4 = length of \".com\"\n $fb_graph_url = 'http://graph.facebook.com' . $fb_page;\n # Contact FB Graph and get data\n $response = wp_remote_get( $fb_graph_url );\n # If the repsonse successful and has a body\n if ( !is_wp_error( $response ) && isset( $response['body'] ) ) {\n # Parse the body as a JSON string\n $json = json_decode( $response['body'], true );\n # If an id is present ...\n if ( isset( $json['id'] ) ) {\n # Generate the final URL for this feed and update the post meta\n $final_url = \"http://www.facebook.com/feeds/page.php?format=rss20&id=\" . $json['id'];\n update_post_meta( $post_id, 'wprss_url', $final_url, $url );\n }\n }\n }\n }", "function charangoten_custom_comment(&$a1, $op) {\n if ($op == 'insert' || $op == 'update') {\n if ($a1['stream_publish']) {\n //dpm($a1, \"dff_custom_comment, publishing to stream\");\n $node = node_load($a1['nid']);\n \n // http://wiki.developers.facebook.com/index.php/Attachment_(Streams)\n $attachment = array(\n 'name' => $a1['subject'],\n 'href' => url('node/' . $a1['nid'], array('absolute' => TRUE, 'fragment' => 'comment-' . $a1['cid'])),\n 'description' => $a1['comment'],\n 'properties' => array(t('In reply to') => array('text' => $node->title, 'href' => url(\"node/\" . $node->nid, array('absolute' => TRUE)))),\n );\n\n $user_message = t('Check out my latest comment on !site...',\n array('!site' => variable_get('site_name', t('my Drupal for Facebook powered site'))));\n $actions = array();\n $actions[] = array('text' => t('Read More'),\n 'href' => url('node/'.$a1['nid'], array('absolute' => TRUE)),\n );\n fb_stream_publish_dialog(array('user_message' => $user_message,\n 'attachment' => $attachment,\n 'action_links' => $actions,\n ));\n }\n }\n\n}", "function remove_jetpack_share_button() {\r\n remove_filter( 'the_content', 'sharing_display',19 );\r\n remove_filter( 'the_excerpt', 'sharing_display',19 );\r\n}", "function publish_result($giornata, $message, $description, $image, $uids, $uid = 'me') {\n\n global $baseUrl;\n $facebook = get_fb_instance();\n\n $uids = implode(',', $uids);\n\n $attachment = array(\n 'access_token' => $facebook->getAccessToken(),\n 'name' => 'NewFantaTorneo', // Titolo\n 'link' => \"$baseUrl\", // Link del titolo\n 'caption' => \"Risultati $giornata^ giornata\", // Appare sotto il titolo\n 'description' => $description, // Testo semplice nel corpo del post (Squadra A 1 : 0 Squadra B)\n 'picture' => $baseUrl . $image, // immagine visualizzata\n 'message' => $message // 'Hai vinto!', 'Hai Perso' o 'Peccato, un pareggio!'\n// 'privacy' => array('value' => 'CUSTOM', // Rende le notifiche visibili solo agli utenti di NewFantaTorneo\n// 'friends' => 'SOME_FRIENDS',\n// 'allow' => $uids)\n );\n\n $facebook->api(\"/$uid/feed\", 'POST', $attachment);\n}", "function wpcom_vip_enable_sharing() {\n\tadd_filter( 'post_flair', 'sharing_display', 20 );\n}" ]
[ "0.7134015", "0.69734704", "0.6950652", "0.68945396", "0.6762442", "0.6704617", "0.66035175", "0.6524725", "0.64954287", "0.64785564", "0.6419238", "0.6357457", "0.6352444", "0.6305331", "0.6249466", "0.6247981", "0.6233407", "0.62130547", "0.62030596", "0.61674535", "0.61103326", "0.60713696", "0.6056141", "0.6046659", "0.59899014", "0.5980931", "0.59722924", "0.59684604", "0.59660363", "0.5952438", "0.5950613", "0.59294957", "0.59139216", "0.58645165", "0.585984", "0.5846669", "0.58177245", "0.5810562", "0.57711184", "0.5765854", "0.5740393", "0.57391566", "0.57373744", "0.573369", "0.5721304", "0.571132", "0.57014847", "0.5681249", "0.5668667", "0.56666785", "0.5634927", "0.56215054", "0.5609838", "0.56041145", "0.5595897", "0.5594305", "0.55940115", "0.5593892", "0.5584871", "0.5584296", "0.55786866", "0.55763334", "0.55684716", "0.55669713", "0.5565317", "0.5563484", "0.5563238", "0.55601203", "0.55585283", "0.5555051", "0.5542091", "0.55382216", "0.5536305", "0.5536161", "0.55355716", "0.5530882", "0.55282634", "0.552272", "0.5521593", "0.55137146", "0.55090946", "0.5505907", "0.5476142", "0.5474598", "0.54652417", "0.54649293", "0.54624987", "0.54616493", "0.5456746", "0.5445763", "0.5435598", "0.5433926", "0.5433093", "0.54249215", "0.54225063", "0.54201424", "0.5418676", "0.541465", "0.5413598", "0.54106975" ]
0.72939587
0
add_settings_section( $id, $title, $callback, $page )
function register_settings() { add_settings_section( 'main-settings-section', 'Main Settings', array($this, 'print_main_settings_section_info'), 'share-fb-sections-plugin' ); // add_settings_field( $id, $title, $callback, $page, $section, $args ) add_settings_field( 'app_id', 'App ID', array($this, 'create_input_app_id'), 'share-fb-sections-plugin', 'main-settings-section' ); // register_setting( $option_group, $option_name, $sanitize_callback ) register_setting( 'share-fb-sections-settings-group', 'share_fb_plugin_main_settings', array($this, 'plugin_main_settings_validate') ); // add_settings_section( $id, $title, $callback, $page ) add_settings_section( 'additional-settings-section', 'Additional Settings & Default Value', array($this, 'print_additional_settings_section_info'), 'share-fb-sections-plugin' ); // add_settings_field( $id, $title, $callback, $page, $section, $args ) add_settings_field( 'render_meta_tag', 'Render Meta Tag', array($this, 'create_input_render_meta_tag'), 'share-fb-sections-plugin', 'additional-settings-section' ); add_settings_field( 'title', 'Default Title', array($this, 'create_input_title'), 'share-fb-sections-plugin', 'additional-settings-section' ); add_settings_field( 'description', 'Default Description', array($this, 'create_input_description'), 'share-fb-sections-plugin', 'additional-settings-section' ); add_settings_field( 'image_url', 'Default Image URL', array($this, 'create_input_image_url'), 'share-fb-sections-plugin', 'additional-settings-section' ); // register_setting( $option_group, $option_name, $sanitize_callback ) register_setting( 'share-fb-sections-settings-group', 'share_fb_plugin_additonal_settings', array($this, 'plugin_additional_settings_validate') ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function do_settings_sections($page)\n {\n }", "public function addSection()\n\t{\n\t\t// Create the setting section with the WordPress Settings Api\n\t\tadd_settings_section(\n\t\t\t$this->section_id,\n\t\t\t$this->section_options['title'],\n\t\t\tarray($this->section_callback, 'callback'),\n\t\t\t$this->section_options['parent_id']\n\t\t);\n\t}", "function repsite_settings_section_callback( ) {\n\n }", "function custom_setting_section_callback() {\n\techo '<p>Custom Section</p>';\n}", "public function page_init()\n { \n add_settings_section(\n 'setting_section_id', // ID\n 'My Custom Settings', // Title\n array( $this, 'print_section_info' ), // Callback\n 'my-setting-admin' // Page\n ); \n\n add_settings_field(\n 'id_number', // ID\n 'ID Number', // Title \n array( $this, 'id_number_callback' ), // Callback\n 'my-setting-admin', // Page\n 'setting_section_id' // Section \n ); \n\n add_settings_field(\n 'title', \n 'Title', \n array( $this, 'title_callback' ), \n 'my-setting-admin', \n 'setting_section_id'\n );\n add_settings_field(\n 'checkbox', \n 'Checkbox', \n array( $this, 'checkbox_callback' ), \n 'my-setting-admin', \n 'setting_section_id'\n ); \n add_settings_field(\n 'radio', \n 'Radio', \n array( $this, 'radio_callback' ), \n 'my-setting-admin', \n 'setting_section_id'\n ); \n add_settings_field(\n 'textarea', \n 'Textarea', \n array( $this, 'textarea_callback' ), \n 'my-setting-admin', \n 'setting_section_id'\n );\n add_settings_field(\n 'select', \n 'Select', \n array( $this, 'select_callback' ), \n 'my-setting-admin', \n 'setting_section_id'\n ); \n }", "function settings_section() {\n\t\t}", "public function page_init()\n { \n register_setting(\n 'my_option_group', // Option group\n 'my_option_name', // Option name\n array( $this, 'sanitize' ) // Sanitize\n );\n\n add_settings_section(\n 'setting_section_id', // ID\n 'CLAS DEPT Theme Settings', // Title\n array( $this, 'print_section_info' ), // Callback\n 'my-setting-admin' // Page\n ); \n\n add_settings_field(\n 'dept_address', // ID\n 'Department Address', // Title \n array( $this, 'dept_address_callback' ), // Callback\n 'my-setting-admin', // Page\n 'setting_section_id' // Section \n ); \n\n add_settings_field(\n 'title', \n 'Footer Title', \n array( $this, 'title_callback' ), \n 'my-setting-admin', \n 'setting_section_id'\n ); \n\n add_settings_field(\n 'fb', \n 'Facebook Link', \n array( $this, 'fb_callback' ), \n 'my-setting-admin', \n 'setting_section_id'\n ); \n\n add_settings_field(\n 'twitter', \n 'Twitter Link', \n array( $this, 'twitter_callback' ), \n 'my-setting-admin', \n 'setting_section_id'\n ); \n\n add_settings_field(\n 'instagram', \n 'Instagram Link', \n array( $this, 'instagram_callback' ), \n 'my-setting-admin', \n 'setting_section_id'\n ); \n\n add_settings_field(\n 'youtube', \n 'Youtube Link', \n array( $this, 'youtube_callback' ), \n 'my-setting-admin', \n 'setting_section_id'\n ); \n\n add_settings_field(\n 'rss', \n 'RSS Link', \n array( $this, 'rss_callback' ), \n 'my-setting-admin', \n 'setting_section_id'\n ); \n\n \n }", "function settings_callback_section() {\n\t ?>\n\t <p class=\"description\"><?php _e( 'Define the Utilities to use.', 'thaim-utilities' );?></p>\n\t <?php\n\t}", "function inscal_green_settings_section_callback1( ) {\n}", "public function add_settings_sections()\n\t{\n\t\t$this->add_section( 'section-info', 'Section Info', 'print_section_info' );\n\t}", "function ed_setting_section_callback(){\n\techo '<p>Settings for the Employee Display plugin</p>';\n}", "function do_settings_fields($page, $section)\n {\n }", "function inscal_green_settings_section_callback2( ) {\n}", "public function do_settings_sections($page, $options = []) {\n\n global $wp_settings_sections, $wp_settings_fields;\n\n if ( ! isset( $wp_settings_sections[ $page ] ) ) {\n return;\n }\n\n foreach ( (array) $wp_settings_sections[ $page ] as $section ) {\n\n if (!isset($options['title']) || $options['title'] == true) {\n if ( $section['title'] ) {\n echo \"<h2>{$section['title']}</h2>\\n\";\n }\n }\n\n if ((!isset($options['description']) || $options['description'] == true) && strpos($page, $this->prefix) === 0) {\n $module = str_replace($this->prefix, '', $page);\n\n if (isset($this->app['modules'][$module])\n && $description = $this->app->module($module)->description) {\n echo '<p>' . $description . '</p>';\n }\n }\n\n if ( $section['callback'] ) {\n \\call_user_func( $section['callback'], $section );\n }\n\n if ( ! isset( $wp_settings_fields ) || ! isset( $wp_settings_fields[ $page ] ) || ! isset( $wp_settings_fields[ $page ][ $section['id'] ] ) ) {\n continue;\n }\n echo '<table class=\"form-table\" role=\"presentation\">';\n\n $this->do_settings_fields( $page, $section['id'] );\n\n echo '</table>';\n }\n\n }", "function bg_AddSettingsSectionHtml() { }", "public function add_page_fields()\r\n {\r\n // /**\r\n // * theme_option\r\n // * Option\r\n // */\r\n // register_setting(\r\n // 'theme_option', // Option group\r\n // 'theme_option', // Option name\r\n // array($this, 'sanitize_save') // Sanitize\r\n // );\r\n\r\n // /**\r\n // * theme_section_tab1\r\n // * Section\r\n // * Option > Section\r\n // */\r\n // add_settings_section(\r\n // 'theme_section_tab1', // ID\r\n // 'Tab Settings 1', // Title\r\n // array($this, 'print_section_html'), // Callback\r\n // 'theme_sections' // Page (sections)\r\n // );\r\n\r\n // /**\r\n // * theme_section_tab2\r\n // * Section\r\n // * Option > Section\r\n // */\r\n // add_settings_section(\r\n // 'theme_section_tab2', // ID\r\n // 'Tab Settings 2', // Title\r\n // array($this, 'print_section_html'), // Callback\r\n // 'theme_sections' // Page (sections)\r\n // );\r\n\r\n // /**\r\n // * Field\r\n // * Option > Section > Field\r\n // */\r\n // add_settings_field(\r\n // 'id_number', // ID\r\n // 'ID Number', // Title\r\n // array($this, 'id_number_callback'), // Callback\r\n // 'theme_sections', // Page (sections)\r\n // 'theme_section_tab1' // Section\r\n // );\r\n\r\n // /**\r\n // * Field\r\n // * Option > Section > Field\r\n // */\r\n // add_settings_field(\r\n // 'title',\r\n // 'Title',\r\n // array($this, 'title_callback'),\r\n // 'theme_sections', // Page (sections)\r\n // 'theme_section_tab1'\r\n // );\r\n\r\n // /**\r\n // * Field\r\n // * Option > Section > Field\r\n // */\r\n // add_settings_field(\r\n // 'theme_field_slug',\r\n // 'Text',\r\n // array($this, 'text_callback'),\r\n // 'theme_sections', // Page (sections)\r\n // 'theme_section_tab2',\r\n // array(\r\n // 'label_for' => 'theme_field_slug',\r\n // 'class' => 'theme_field_slug',\r\n // 'field_name' => 'theme_field_slug',\r\n // 'option_name' => 'theme_option',\r\n // )\r\n // );\r\n\r\n foreach ($this->conf as $s_key => $section) {\r\n add_settings_section(\r\n $section['name'], // Section ID\r\n $section['label'], // Section Title\r\n // array($this, $section['html']), // Callback (String)\r\n array($this, function($section){\r\n echo $section['html'];\r\n }), // Callback (String)\r\n $section['name'] // Page (sections)\r\n );\r\n foreach ($section['fields'] as $f_key => $field) {\r\n register_setting(\r\n $field['name'], // Option group\r\n $field['name'], // Option name\r\n array($this, $field['option_sanitize']) // Sanitize\r\n );\r\n add_settings_field(\r\n $field['name'], // Field ID\r\n $field['label'], // Field Title\r\n array($this, $field['html'] . '_callback'), // Callback (Type)\r\n $section['name'], // Page (sections)\r\n $section['name'], // Section ID\r\n array(\r\n 'label_for' => $field['name'],\r\n 'class' => $field['name'],\r\n 'field_name' => $field['name'],\r\n 'option_name' => $field['name'],\r\n )\r\n );\r\n }\r\n }\r\n }", "public function define_settings_page() {\n\t\t$this->hook_suffix = add_options_page(\n\t\t\t__( 'Top Story Options', 'top-story' ),\n\t\t\t__( 'Top Story', 'top-story' ),\n\t\t\t'manage_options',\n\t\t\t$this->menu_slug,\n\t\t\tarray( $this, 'option_page' )\n\t\t);\n\t}", "public function optionsdemo_setup_sections() {\n\t\t\tadd_settings_section( \"optionsdemo_section\", esc_html__( \"Section Title One\", \"optionsdemo\" ), array(),\n\t\t\t\t\"optionsdemo_general\" );\n\t\t\t\n\t\t}", "protected function _registerSettingsPage()\n {\n // Add action to register field sections to tab\n $this->on('!wprss_add_settings_fields_sections',\n array($this, '_renderSettingsPage'), 10, 1);\n }", "function myprefix_init_settings() {\t\n\t\n\t// Settings section:\n\t// Multiple settings can go into this section after we set it up.\n\t// We are going to add three settings into this one section.\n\t\tadd_settings_section(settingsSectionOneSlug, settingsSectionOneTitle, \n\t\t\tsettingsSectionOneCallbackFunction, settingsPageID);\n\t\n\t// Settings field:\n\t// We add settings fields to our settings section:\n\t\tadd_settings_field(settingOneSlug, settingOneTitle, settingOneCallbackFunction, \n\t\t\tsettingsPageID, settingsSectionOneSlug, array( 'label_for' => settingOneSlug ));\n\t\tadd_settings_field(settingTwoSlug, settingTwoTitle, settingTwoCallbackFunction, \n\t\t\tsettingsPageID, settingsSectionOneSlug, array( 'label_for' => settingTwoSlug ));\n\t\tadd_settings_field(settingThreeSlug, settingThreeTitle, settingThreeCallbackFunction, \n\t\t\tsettingsPageID, settingsSectionOneSlug, array( 'label_for' => settingThreeSlug ));\n\t\n\t// Setting:\n\t// Now we register our settings:\n\t\tregister_setting(settingsPageID, settingOneSlug, settingOneValidationFunction);\n\t\tregister_setting(settingsPageID, settingTwoSlug, settingTwoValidationFunction);\n\t\tregister_setting(settingsPageID, settingThreeSlug, settingThreeValidationFunction);\n}", "public function register_settings()\n\t{\n\t\t$this->register_setting( NHS_SECTIONS );\n\t}", "public function page_init()\n {\n register_setting(\n 'cementlap_option_group', // Option group\n 'cementlap_option_name', // Option name\n array( $this, 'sanitize' ) // Sanitize\n );\n\n add_settings_section(\n 'setting_section_id', // ID\n 'Cementlap Custom Settings', // Title\n array( $this, 'print_section_info' ), // Callback\n 'cementlap-setting-admin' // Page\n );\n\n\n\n /***** Konténer vége ******/\n\n add_settings_field(\n 'ntd',\n 'Gyártandó termékek ekkor érkezhetnek legkorábban',\n array( $this, 'ntd_callback' ),\n 'cementlap-setting-admin',\n 'setting_section_id'\n );\n add_settings_field(\n 'subtitle',\n 'Advert Sub Title',\n array( $this, 'subtitle_callback' ),\n 'cementlap-setting-admin',\n 'setting_section_id'\n );\n\n add_settings_field(\n 'button_text', // ID\n 'Advert button text', // Title\n array( $this, 'button_text_callback' ), // Callback\n 'cementlap-setting-admin', // Page\n 'setting_section_id' // Section\n );\n\n add_settings_field(\n 'button_url', // ID\n 'Button url', // Title\n array( $this, 'button_url_callback' ), // Callback\n 'cementlap-setting-admin', // Page\n 'setting_section_id' // Section\n );\n\n add_settings_field(\n 'change', // ID\n 'Euro arfolyam', // Title\n array( $this, 'change_callback' ), // Callback\n 'cementlap-setting-admin', // Page\n 'setting_section_id' // Section\n );\n\n add_settings_field(\n 'vat', // ID\n 'ÁFA', // Title\n array( $this, 'vat_callback' ), // Callback\n 'cementlap-setting-admin', // Page\n 'setting_section_id' // Section\n );\n\n\n }", "function saju_jukebox_settings_register() {\n\n\t// 1: the unique id for the section\n\t// 2: the title or name of the section\n\t// 3: callback to display the section\n\t// 4: the page name: wordlift_settings_section_page\n\tadd_settings_section( SAJU_JUKEBOX_SETTINGS_GENERAL, __( 'General Settings', SAJU_LANGUAGE_DOMAIN ), 'saju_jukebox_echo_section_top', SAJU_JUKEBOX_SETTINGS_GENERAL_PAGE );\n\n\t// Add the setting field for the display as default.\n\tadd_settings_field(\n\t\tSAJU_JUKEBOX_SETTINGS_FIELD_EVENT_URL,\n\t\t__( 'Event URL:', SAJU_LANGUAGE_DOMAIN ),\n\t\t'saju_jukebox_echo_input',\n\t\tSAJU_JUKEBOX_SETTINGS_GENERAL_PAGE,\n\t\tSAJU_JUKEBOX_SETTINGS_GENERAL,\n\t\tarray(\n\t\t\t'id' => SAJU_JUKEBOX_SETTINGS_FIELD_EVENT_URL,\n\t\t\t'size' => 100\n\t\t)\n\t);\n\n\t// Add the setting field for the color coding of entities.\n\tadd_settings_field(\n\t\tSAJU_JUKEBOX_SETTINGS_FIELD_DATASET_URL,\n\t\t__( 'Dataset URL:', SAJU_LANGUAGE_DOMAIN ),\n\t\t'saju_jukebox_echo_input',\n\t\tSAJU_JUKEBOX_SETTINGS_GENERAL_PAGE,\n\t\tSAJU_JUKEBOX_SETTINGS_GENERAL,\n\t\tarray(\n\t\t\t'id' => SAJU_JUKEBOX_SETTINGS_FIELD_DATASET_URL,\n\t\t\t'size' => 100\n\t\t)\n\t);\n\n\t// Register the settings.\n\tregister_setting( SAJU_JUKEBOX_SETTINGS_GENERAL, SAJU_JUKEBOX_SETTINGS_FIELD_EVENT_URL );\n\tregister_setting( SAJU_JUKEBOX_SETTINGS_GENERAL, SAJU_JUKEBOX_SETTINGS_FIELD_DATASET_URL );\n\n}", "function sh_add_admin_page_callback(){\n //Generate custom settings admin page\n add_menu_page( 'Custom Options', 'Custom Settings', 'manage_options', 'custom_settings', 'sh_create_custom_settings_page' );\n}", "function add_section( $args ) {\n\t\t$this->sections[$args['slug']] = new WP_Settings_Section( $args );\n\t\treturn $this;\n\t}", "public function settings_page_init() {\n global $WCPc;\n \n $settings_tab_options = array(\"tab\" => \"{$this->tab}\", \"ref\" => &$this,\n \"sections\" => array(\n // Section one\n \"default_settings_section\" => array(\n \"title\" => __('Default Settings', $WCPc->text_domain), \n \"fields\" => array( /* Hidden */\n \"id\" => array('title' => '', \n 'type' => 'hidden', \n 'id' => 'id', \n 'name' => 'id', \n 'value' => 999\n ),\n /* Text */ \n \"id_number\" => array('title' => __('ID Number', $WCPc->text_domain), \n 'type' => 'text', \n 'id' => 'id_number', \n 'label_for' => 'id_number', \n 'name' => 'id_number', \n 'hints' => __('Enter your ID Number here.', $WCPc->text_domain), \n 'desc' => __('It will represent your identification.', $WCPc->text_domain)\n ), \n /* Textarea */\n \"about\" => array('title' => __('About', $WCPc->text_domain) , \n 'type' => 'textarea', \n 'id' => 'about', \n 'label_for' => 'about', \n 'name' => 'about', \n 'rows' => 5, \n 'placeholder' => __('About you', $WCPc->text_domain), \n 'desc' => __('It will represent your significant.', $WCPc->text_domain)\n ), \n /* Text */\n \"demo_test\" => array('title' => __('Demo Test', $WCPc->text_domain),\n 'type' => 'text',\n 'id' => 'demo_test',\n 'label_for' => 'demo_test',\n 'name' => 'demo_test',\n 'placeholder' => __('Demo Test', $WCPc->text_domain)\n ),\n /* Wp Eeditor */\n \"bio\" => array('title' => __('Bio', $WCPc->text_domain), \n 'type' => 'wpeditor', \n 'id' => 'bio', \n 'label_for' => 'bio', \n 'name' => 'bio'\n ), \n /* Checkbox */\n \"is_enable\" => array('title' => __('Enable', $WCPc->text_domain), \n 'type' => 'checkbox', \n 'id' => 'is_enable', \n 'label_for' => 'is_enable', \n 'name' => 'is_enable', \n 'value' => 'Enable'\n ), \n /* Radio */\n \"offday\" => array('title' => __('Off Day', $WCPc->text_domain), \n 'type' => 'radio', \n 'id' => 'offday', \n 'label_for' => 'offday', \n 'name' => 'offday', \n 'dfvalue' => 'wednesday', \n 'options' => array('sunday' => 'Sunday', \n 'monday' => 'Monday', \n 'tuesday' => 'Tuesday', \n 'wednesday' => 'Wednesday', \n 'thrusday' => 'Thrusday'\n ), \n 'hints' => __('Choose your preferred week offday.', $WCPc->text_domain), \n 'desc' => __('By default Saterday will be offday.', $WCPc->text_domain)\n ), \n /* Select */\n \"preference\" => array('title' => __('Preference', $WCPc->text_domain), \n 'type' => 'select', \n 'id' => 'preference', \n 'label_for' => 'preference', \n 'name' => 'preference', \n 'options' => array('one' => 'One Time', \n 'two' => 'Two Time', \n 'three' => 'Three Time'\n ), \n 'hints' => __('Choose your preferred occurence count.', $WCPc->text_domain)\n ), \n /* Upload */\n \"logo\" => array('title' => __('Logo', $WCPc->text_domain), \n 'type' => 'upload', \n 'id' => 'logo', \n 'label_for' => 'logo', \n 'name' => 'logo', \n 'prwidth' => 125, \n 'hints' => __('Your presentation.', $WCPc->text_domain), \n 'desc' => __('Represent your graphical signature.', $WCPc->text_domain)\n ), \n /* Colorpicker */\n \"dc_colorpicker\" => array('title' => __('Choose Color', $WCPc->text_domain), \n 'type' => 'colorpicker', \n 'id' => 'dc_colorpicker', \n 'label_for' => 'dc_colorpicker', \n 'name' => 'dc_colorpicker', \n 'default' => '000000', \n 'hints' => __('Choose your color here.', $WCPc->text_domain),\n 'desc' => __('This lets you choose your desired color.', $WCPc->text_domain)\n ), \n /* Datepicker */\n \"dc_datepicker\" => array('title' => __('Choose DOB', $WCPc->text_domain),\n 'type' => 'datepicker', \n 'id' => 'dc_datepicker', \n 'label_for' => 'dc_datepicker', \n 'name' => 'dc_datepicker', \n 'hints' => __('Choose your DOB here', $WCPc->text_domain), \n 'desc' => __('This lets you choose your date of birth.', $WCPc->text_domain), \n 'custom_attributes' => array('date_format' => 'dd-mm-yy')\n ), \n /* Multiinput */\n \"slider\" => array('title' => __('Slider', $WCPc->text_domain) , \n 'type' => 'multiinput', \n 'id' => 'slider', \n 'label_for' => 'slider', \n 'name' => 'slider', \n 'options' => array(\n \"title\" => array('label' => __('Title', $WCPc->text_domain) , \n 'type' => 'text', \n 'label_for' => 'title', \n 'name' => 'title', \n 'class' => 'regular-text'\n ),\n \"content\" => array('label' => __('Content', $WCPc->text_domain), \n 'type' => 'textarea', \n 'label_for' => 'content', \n 'name' => 'content', \n 'cols' => 40\n ),\n \"image\" => array('label' => __('Image', $WCPc->text_domain), \n 'type' => 'upload', \n 'label_for' => 'image', \n 'name' => 'image', \n 'prwidth' => 125\n ),\n \"url\" => array('label' => __('URL', $WCPc->text_domain) , \n 'type' => 'url', \n 'label_for' => 'url', \n 'name' => 'url', \n 'class' => 'regular-text'\n ),\n \"published\" => array('label' => __('Published ON', $WCPc->text_domain), \n 'type' => 'datepicker', \n 'id' => 'published', \n 'label_for' => 'published', \n 'name' => 'published', \n 'hints' => __('Published Date', $WCPc->text_domain), \n 'custom_attributes' => array('date_format' => 'dd th M, yy')\n )\n )\n )\n )\n ), \n \"custom_settings_section\" => array(\n \"title\" => \"Demo Custom Settings\", // Another section\n \"fields\" => array(\n \"location\" => array('title' => __('Location', $WCPc->text_domain), \n 'type' => 'text', \n 'id' => 'location', \n 'name' => 'location', \n 'hints' => __('Location', $WCPc->text_domain)\n ),\n \"role\" => array('title' => __('Role', $WCPc->text_domain), \n 'type' => 'text', \n 'id' => 'role', \n 'name' => 'role', \n 'hints' => __('Role', $WCPc->text_domain)\n )\n )\n )\n )\n );\n \n $WCPc->admin->settings->wcpc_settings_field_init(apply_filters(\"wcpc_settings_{$this->tab}_tab_options\", $settings_tab_options));\n }", "public function page_init()\n {\n register_setting(\n 'sepw_option_group', // Option group\n 'sepw_settings', // Option name\n array($this, 'sanitize') // Sanitize\n );\n\n add_settings_section(\n 'info_section_id',\n __('Guide', 'sepw'),\n array($this, 'print_info_section_info'),\n 'sepw-setting-admin'\n );\n\n add_settings_section(\n 'setting_section_id', // ID\n __('Settings', 'sepw'), // Title\n array($this, 'print_settings_section_info'), // Callback\n 'sepw-setting-admin' // Page\n );\n\n add_settings_section(\n 'generate_section_id',\n __('Create Pricelist', 'sepw'),\n array($this, 'print_generate_section_info'),\n 'sepw-setting-admin'\n );\n\n add_settings_field(\n 'product_fields',\n __('Filters', 'sepw'),\n array($this, 'product_fields_callback'),\n 'sepw-setting-admin',\n 'setting_section_id'\n );\n\n add_settings_field(\n 'images_size',\n __('Thumbnail size', 'sepw'),\n array($this, 'images_size_callback'),\n 'sepw-setting-admin',\n 'setting_section_id'\n );\n\n add_settings_field(\n 'cache_lifetime',\n __('Update Frequency', 'sepw'),\n array($this, 'cache_lifetime_callback'),\n 'sepw-setting-admin',\n 'setting_section_id'\n );\n }", "function tsz_reservation_page_init()\n{ \n\n $settings = array(\n 'spaces_limit' => 'Spaces per Listing',\n 'past_months_limit' => 'Limit reservations to ? months in the past',\n 'future_months_limit' => 'Limit reservations to ? months in the future'\n );\n\n foreach($settings as $id => $label) {\n register_setting(\n 'tsz_listing_options', // Option group\n $id\n );\n\n add_settings_field(\n $id, // ID\n $label, // Title \n 'render_input_field', // Callback\n 'tsz_listing_options_page', // Page\n 'setting_section_id', // Section \n array(\"id\" => $id) \n ); \n }\n\n}", "public function add_settings_page() {\n add_options_page( \n \"WP BXSlider Settings\", // $page_title\n \"WP BXSlider\", // $menu_title\n \"manage_options\", // $capability (ie: permissions)\n $this->name, // $menu_slug\n array($this, 'render_admin_page') // callback to render view\n );\n }", "function custom_settings_page() { ?>\r\n<div class=\"wrap\">\r\n<h1>Custom Settings</h1>\r\n<form method=\"post\" action=\"options.php\">\r\n<?php settings_fields( 'section' );\r\ndo_settings_sections( 'theme-options' );\r\nsubmit_button(); ?>\r\n</form>\r\n</div>\r\n<?php }", "function custom_settings_page() { ?>\n\t<div class=\"wrap\">\n\t\t<h1>Custom Settings</h1>\n\t\t<form method=\"post\" action=\"options.php\">\n\t\t\t<?php\n settings_fields('section');\n do_settings_sections('theme-options'); \n submit_button(); \n ?>\n\t\t</form>\n\t</div>\n\t<?php }", "function fb_chat_settings_section_callback() {\r\n }", "function add_another_section($sections){\r\n\t\r\n\t$sections = array();\r\n\t$sections[] = array(\r\n\t\t\t\t'title' => __('A Section added by hook', 'SimpleKey'),\r\n\t\t\t\t'desc' => __('<p class=\"description\">This is a section created by adding a filter to the sections array, great to allow child themes, to add/remove sections from the options.</p>', 'SimpleKey'),\r\n\t\t\t\t//all the glyphicons are included in the options folder, so you can hook into them, or link to your own custom ones.\r\n\t\t\t\t//You dont have to though, leave it blank for default.\r\n\t\t\t\t'icon' => trailingslashit(get_template_directory_uri()).'options/img/glyphicons/glyphicons_062_attach.png',\r\n\t\t\t\t//Lets leave this as a blank section, no options just some intro text set above.\r\n\t\t\t\t'fields' => array()\r\n\t\t\t\t);\r\n\t\r\n\treturn $sections;\r\n\t\r\n}", "function custom_settings_page() { ?>\n <div class=\"wrap\">\n <h1>Custom Settings</h1>\n <form method=\"post\" action=\"options.php\">\n <?php\n settings_fields( 'section' );\n do_settings_sections( 'theme-options' ); \n submit_button(); \n ?> \n </form>\n </div>\n<?php }", "public function add_additional_page_settings($data){\n }", "public function add_additional_page_settings($data){\n }", "public function register_settings() {\n\t\tregister_setting('eaboot_options', 'eaboot_options', array(&$this, 'validate_settings'));\n\n\t\tforeach ($this->sections as $slug => $title) {\n\t\t\tif ($slug == 'about')\n\t\t\t\tadd_settings_section($slug, $title, array(&$this, 'display_about_section'), 'eaboot_options');\n\t\t\telse\n\t\t\t\tadd_settings_section($slug, $title, array(&$this, 'display_section'), 'eaboot_options');\n\t\t}\n\n\t\t$this->get_settings();\n\n\t\tforeach ($this->settings as $id => $setting) {\n\t\t\t$setting['id'] = $id;\n\t\t\t$this->create_setting($setting);\n\t\t}\n\t}", "function plugin_admin_add_page() {\n\t\tadd_options_page('Tupuk Sample Plugin Settings', 'Tupuk Sample Plugin', 'manage_options', 'tupuk_sample_plugin', array($this, 'plugin_options_page'));\n\t\tadd_action( 'admin_init', array($this, 'register_mysettings') ); //call register settings function\n\t}", "public function create_plugin_settings_page() {\n \t$page_title = 'My Awesome Settings Page';\n \t$menu_title = 'Awesome Plugin';\n \t$capability = 'manage_options';\n \t$slug = 'smashing_fields';\n \t$callback = array( $this, 'plugin_settings_page_content' );\n \t$icon = 'dashicons-admin-plugins';\n \t$position = 100;\n\n \tadd_menu_page( $page_title, $menu_title, $capability, $slug, $callback, $icon, $position );\n }", "function register_my_settings() {\n\t// First say,\n\t// \"Here's a hunk of stuff that\n\t// will be saved in the database.\"\n\tregister_setting(\n\t\t'my-options',\n\t\t'my-options-data',\n\t\t'washing_machine'\n\t);\n\n\t// Next say,\n\t// \"Here are the sections I want\n\t// to present my settings in\n\t// on the page I told you about earlier.\"\n\tadd_settings_section(\n\t\t'section-1',\n\t\t'Header Stuff',\n\t\t'section_ringy_dingy',\n\t\t'my-page-id'\n\t);\n\tadd_settings_section(\n\t\t'section-2',\n\t\t'Footer Stuff',\n\t\t'section_ringy_dingy',\n\t\t'my-page-id'\n\t);\n\n\t// Third, gather the information\n\t// you'll need to display your fields\n\t// into HTML\n\t$extra_tagline_args = array(\n\t\t'id'\t\t=> 'extra_tagline',\n\t\t'desc'\t\t=> 'Enter Your Extra Tagline Here',\n\t\t'label_for'\t=> 'extra_tagline'\n\t);\n\n\t$footer_text_args = array(\n\t\t'id'\t\t=> 'footer_text',\n\t\t'desc'\t\t=> 'Enter Your Footer Text Here',\n\t\t'label_for'\t=> 'footer_text'\n\t);\n\n\t// Finally say,\n\t// \"These are the fields we want\n\t// users to fill in.\"\n\tadd_settings_field(\n\t\t'extra-tagline',\n\t\t'Text for Extra Tagline',\n\t\t'render_text_field',\n\t\t'my-page-id',\n\t\t'section-1',\n\t\t$extra_tagline_args\n\t);\n\tadd_settings_field(\n\t\t'footer-text',\n\t\t'Text for Footer',\n\t\t'render_text_field',\n\t\t'my-page-id',\n\t\t'section-2',\n\t\t$footer_text_args\n\t);\n\n}", "function pnq_add_section( $section ) {\n\tglobal $pnq_settings_sections;\t\n\tif( ! array_key_exists( $section['id'], $pnq_settings_sections ) ) {\n\t\t$pnq_settings_sections[$section['id']] = $section;\n\t\treturn $section;\t\n\t}\n}", "function admin_settings_pages( $settings_pages )\n{\n $settings_pages[] = array(\n 'id' => 'general',\n 'option_name' => 'general_settings',\n 'menu_title' => __( 'Configuratie', 'textdomain' ),\n 'icon_url' => 'dashicons-layout',\n );\n // Register setting page: 'Option for site'\n $settings_pages[] = array(\n 'id' => 'admin_settings_general',\n 'option_name' => 'general_option',\n 'menu_title' => __( 'Option for site', 'textdomain' ),\n 'parent' => 'general',\n );\n return $settings_pages;\n}", "function hundope_settings_init( ) { \n\n\tregister_setting( 'options_page', 'hundope_settings' );\n\t\n//We indicated the title to be description in the options page.\n\tadd_settings_section(\n\t\t'options_page_section', \n\t\t__( 'Description', 'hundope' ), \n\t\t'hundope_settings_section_callback', \n\t\t'options_page'\n\t);\n\n//The code below adds the settings field to make our dropdown menu show up.\n\tadd_settings_field( \n\t\t'hundope_select_field', \n\t\t__( 'Choose a colour from the dropdown:', 'hundope' ), \n\t\t'hundope_select_field_render', \n\t\t'options_page', \n\t\t'options_page_section' \n\t);\n\n}", "public function registerSection()\n\t{\n\t\t// Register everything.\n\t\tregister_setting(\n\t\t\t$this->section_options['parent_id'],\n\t\t\t$this->section_id\n\t\t);\n\t}", "public function page_init()\n {\n register_setting(\n 'my_option_group', // Option group\n 'linkedin_api_option', // Option name\n array( $this, 'sanitize' ) // Sanitize\n );\n\n add_settings_section(\n 'setting_section_id', // ID\n 'Request Settings', // Title\n array(), // Callback\n 'my-setting-admin' // Page\n );\n\n add_settings_field(\n 'redirect_url', // ID\n 'Redirect URL', // Title\n array( $this, 'redirect_url_callback' ), // Callback\n 'my-setting-admin', // Page\n 'setting_section_id' // Section\n );\n\n add_settings_field(\n 'client_id',\n 'Client ID',\n array( $this, 'client_id_callback' ),\n 'my-setting-admin',\n 'setting_section_id'\n );\n\n add_settings_field(\n 'client_secret',\n 'Client Secret',\n array( $this, 'client_secret_callback' ),\n 'my-setting-admin',\n 'setting_section_id'\n );\n\n add_settings_field(\n 'authorization_code',\n 'Authorization Code For An Access Token',\n array( $this, 'authorization_code_callback' ),\n 'my-setting-admin',\n 'setting_section_id'\n );\n\n add_settings_field(\n 'access_token',\n 'Access Token',\n array( $this, 'access_token_callback' ),\n 'my-setting-admin',\n 'setting_section_id'\n );\n\n }", "public function grp_settings_page_init(){\n\t\t$settings_page = add_menu_page( 'GRP Settings', 'GRP Settings', 'edit_theme_options', 'grp-settings', array($this,'grp_settings_page') );\n\t\t//add this action to save your setting page data\n\t\tadd_action( \"load-{$settings_page}\", array( $this, 'grp_load_settings_page' ) );\n\t}", "function add_another_section($sections){\n\t\n\t//$sections = array();\n\t$sections[] = array(\n\t\t\t\t'title' => __('A Section added by hook', 'nhp-opts'),\n\t\t\t\t'desc' => __('<p class=\"description\">This is a section created by adding a filter to the sections array, great to allow child themes, to add/remove sections from the options.</p>', 'nhp-opts'),\n\t\t\t\t//all the glyphicons are included in the options folder, so you can hook into them, or link to your own custom ones.\n\t\t\t\t//You dont have to though, leave it blank for default.\n\t\t\t\t'icon' => trailingslashit(get_template_directory_uri()).'options/img/glyphicons/glyphicons_062_attach.png',\n\t\t\t\t//Lets leave this as a blank section, no options just some intro text set above.\n\t\t\t\t'fields' => array()\n\t\t\t\t);\n\t\n\treturn $sections;\n\t\n}", "public function page_init()\n { \n register_setting(\n 'program_manager_option_group', // Option group\n 'program_manager_option', // Option name\n array( $this, 'sanitize' ) // Sanitize\n );\n\n add_settings_section(\n 'program_manager_section_id', // ID\n 'Program generator options', // Title\n array( $this, 'print_section_info' ), // Callback\n 'program_manager_admin' // Page\n ); \n\n add_settings_field(\n 'pre_days', // ID\n 'PRE conference days (separated by ,)', // Title \n array( $this, 'pre_days_callback' ), // Callback\n 'program_manager_admin', // Page\n 'program_manager_section_id' // Section \n ); \n\n add_settings_field(\n 'main_days', \n 'MAIN conference days (separated by ,)', \n array( $this, 'main_days_callback' ), \n 'program_manager_admin', \n 'program_manager_section_id'\n ); \n \n\tadd_settings_field(\n 'pre_days_file', // ID\n 'PRE conference xlsx file', // Title \n array( $this, 'pre_days_file_callback' ), // Callback\n 'program_manager_admin', // Page\n 'program_manager_section_id' // Section \n ); \n\n add_settings_field(\n 'main_days_file', \n 'MAIN conference xlsx file', \n array( $this, 'main_days_file_callback' ), \n 'program_manager_admin', \n 'program_manager_section_id'\n ); \n \n }", "function hoopsai_wp_settings_do_page() {\n ?>\n <div id=\"hoopsai_wp_settings\"></div>\n <?php\n }", "function sh_custom_settings_callback() {\n //register the user picture field in the custom settings group\n register_setting( 'sh-custom-settings-group', 'user_picture');\n //register the user name field in the custom settings group\n register_setting( 'sh-custom-settings-group', 'user_name' );\n //register the user description field in the custom settings group\n register_setting( 'sh-custom-settings-group', 'user_description' );\n //add settings section\n add_settings_section( 'sh-custom-settings-options', 'Custom Options', 'sh_custom_settings_options_callback', 'custom_settings');\n //add the user name field to the hooked group of custom settings\n add_settings_field( 'sh-user-name', 'User Name', 'sh_custom_user_name_callback', 'custom_settings', 'sh-custom-settings-options');\n //add the user description field to the hooked group of custom settings\n add_settings_field( 'sh-user-description', 'User Description', 'sh_custom_user_description_callback', 'custom_settings', 'sh-custom-settings-options');\n //add the user picture field to the hooked group of custom settings\n add_settings_field( 'sh-user-picture', 'User Picture', 'sh_custom_user_picture_callback', 'custom_settings', 'sh-custom-settings-options');\n}", "public function add_settings_page() {\n\t\tadd_submenu_page(\n\t\t\t'case27/tools.php',\n\t\t\t_x( 'Map Services', 'Map Services page title in WP Admin', 'my-listing' ),\n\t\t\t_x( 'Map Services', 'Map Services page title in WP Admin', 'my-listing' ),\n\t\t\t'manage_options',\n\t\t\t'theme-mapservice-settings',\n\t\t\tfunction() {\n\t\t\t\t$config = $this->get_config();\n\t\t\t\trequire locate_template( 'templates/admin/theme-options/map-services.php' );\n\t\t\t}\n\t\t);\n\t}", "public function add_settings_page() {\n\t\t$this->settings_page_id = add_submenu_page(\n\t\t\t'edit.php?post_type=schedule',\n\t\t\t__( 'Conference Schedule Settings', 'conf-schedule' ),\n\t\t\t__( 'Settings', 'conf-schedule' ),\n\t\t\t'edit_posts',\n\t\t\t'conf-schedule-settings',\n\t\t\tarray( $this, 'print_settings_page' )\n \t);\n\t}", "function classiera_add_settings_page() { \r\n add_theme_page('Categories Custom Fields', 'Categories Custom Fields', 'manage_options', 'settings', 'classiera_theme_settings_page'); \r\n}", "function add_section($title, $section_id = '', $priority = false) {\n $this->customizer_map_array[] = array(\n 'command' => 'add_section',\n 'title' => $title,\n 'section_id' => $section_id,\n 'priority' => $priority\n );\n\n\n }", "function register_settings() {\n\t\t\tif( get_option( $this->func . '_settings' ) == false ) {\n\t\t\t\tadd_option( $this->func . '_settings' );\n\t\t\t}\n\n\t\t\tforeach( $this->get_registered_settings() as $tab => $sections ) {\n\t\t\t\tforeach( $sections as $section => $settings ) {\n\t\t\t\t\t// Check for backwards compatibility\n\t\t\t\t\t$section_tabs = $this->get_settings_tab_sections( $tab );\n\n\t\t\t\t\tif( ! is_array( $section_tabs ) || ! array_key_exists( $section, $section_tabs ) ) {\n\t\t\t\t\t\t$section = 'main';\n\t\t\t\t\t\t$settings = $sections;\n\t\t\t\t\t}\n\n\t\t\t\t\tadd_settings_section(\n\t\t\t\t\t\t$this->func . '_settings_' . $tab . '_' . $section,\n\t\t\t\t\t\t__return_null(),\n\t\t\t\t\t\t'__return_false',\n\t\t\t\t\t\t$this->func . '_settings_' . $tab . '_' . $section\n\t\t\t\t\t);\n\n\t\t\t\t\tforeach( $settings as $option ) {\n\t\t\t\t\t\t// For backwards compatibility\n\t\t\t\t\t\tif( empty( $option['id'] ) ) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$name = isset( $option['name'] ) ? $option['name'] : '';\n\n\t\t\t\t\t\tadd_settings_field(\n\t\t\t\t\t\t\t$this->func . '_settings[' . $option['id'] . ']',\n\t\t\t\t\t\t\t$name,\n\t\t\t\t\t\t\tfunction_exists( $this->func . '_' . $option['type'] . '_callback' ) ? $this->func . '_' . $option['type'] . '_callback' : ( method_exists( $this, $option['type'] . '_callback' ) ? array( $this, $option['type'] . '_callback' ) : array( $this, 'missing_callback' ) ),\n\t\t\t\t\t\t\t$this->func . '_settings_' . $tab . '_' . $section,\n\t\t\t\t\t\t\t$this->func . '_settings_' . $tab . '_' . $section,\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'section' => $section,\n\t\t\t\t\t\t\t\t'id' => isset( $option['id'] ) ? $option['id'] : null,\n\t\t\t\t\t\t\t\t'desc' => ! empty( $option['desc'] ) ? $option['desc'] : '',\n\t\t\t\t\t\t\t\t'name' => isset( $option['name'] ) ? $option['name'] : null,\n\t\t\t\t\t\t\t\t'size' => isset( $option['size'] ) ? $option['size'] : null,\n\t\t\t\t\t\t\t\t'options' => isset( $option['options'] ) ? $option['options'] : '',\n\t\t\t\t\t\t\t\t'std' => isset( $option['std'] ) ? $option['std'] : '',\n\t\t\t\t\t\t\t\t'min' => isset( $option['min'] ) ? $option['min'] : null,\n\t\t\t\t\t\t\t\t'max' => isset( $option['max'] ) ? $option['max'] : null,\n\t\t\t\t\t\t\t\t'step' => isset( $option['step'] ) ? $option['step'] : null,\n\t\t\t\t\t\t\t\t'select2' => isset( $option['select2'] ) ? $option['select2'] : null,\n\t\t\t\t\t\t\t\t'placeholder' => isset( $option['placeholder'] ) ? $option['placeholder'] : null,\n\t\t\t\t\t\t\t\t'multiple' => isset( $option['multiple'] ) ? $option['multiple'] : null,\n\t\t\t\t\t\t\t\t'allow_blank' => isset( $option['allow_blank'] ) ? $option['allow_blank'] : true,\n\t\t\t\t\t\t\t\t'readonly' => isset( $option['readonly'] ) ? $option['readonly'] : false,\n\t\t\t\t\t\t\t\t'buttons' => isset( $option['buttons'] ) ? $option['buttons'] : null,\n\t\t\t\t\t\t\t\t'wpautop' => isset( $option['wpautop'] ) ? $option['wpautop'] : null,\n\t\t\t\t\t\t\t\t'teeny' => isset( $option['teeny'] ) ? $option['teeny'] : null,\n\t\t\t\t\t\t\t\t'tab' => isset( $option['tab'] ) ? $option['tab'] : null,\n\t\t\t\t\t\t\t\t'tooltip_title' => isset( $option['tooltip_title'] ) ? $option['tooltip_title'] : false,\n\t\t\t\t\t\t\t\t'tooltip_desc' => isset( $option['tooltip_desc'] ) ? $option['tooltip_desc'] : false,\n\n\t\t\t\t\t\t\t\t'available_header'\t=> isset( $option['available_header'] ) ? $option['available_header'] : null,\n\t\t\t\t\t\t\t\t'selected_header'\t=> isset( $option['selected_header'] ) ? $option['selected_header'] : null,\n\n\t\t\t\t\t\t\t\t'class' => isset( $option['class'] ) ? $option['class'] : '',\n\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tregister_setting( $this->func . '_settings', $this->func . '_settings', array( $this, 'settings_sanitize' ) );\n\t\t}", "public function adminInitFromPage($page)\n {\n $sectionID = 'k-p-' . $page->get('id') . '-s-' . $this->get('id');\n\n add_settings_section(\n $sectionID, // id\n $this->get('title'), // title\n array($this, 'callbackDisplaySection'), // display callback\n $page->getID() // page\n );\n\n $registeredOptions = $this->getRegisteredOptions();\n foreach ($registeredOptions->keys() as $key) {\n $option = $registeredOptions->get($key);\n $option->adminInitFromSection($page, $this, $sectionID, $page->getID());\n }\n }", "public function register_settings() {\n\n\t\t// This include creates a variable called $settings.\n\t\t// TODO: Load this from a file instead ...\n\t\t$settings = array(\n\t\t\tarray(\n\t\t\t\t/*Sections*/\n\t\t\t\t'name'\t\t=> 'default',\n\t\t\t\t'title'\t\t=> __('General Settings','wpchaosclient'),\n\t\t\t\t'fields'\t=> array(\n\t\t\t\t\t/*Section fields*/\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'wpchaos-servicepath',\n\t\t\t\t\t\t'title' => __('Service Path','wpchaosclient'),\n\t\t\t\t\t\t'type' => 'text'\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'wpchaos-clientguid',\n\t\t\t\t\t\t'title' => __('Client GUID','wpchaosclient'),\n\t\t\t\t\t\t'type' => 'text'\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'wpchaos-accesspoint-guid',\n\t\t\t\t\t\t'title' => __('Access Point GUID','wpchaosclient'),\n\t\t\t\t\t\t'type' => 'text'\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'wpchaos-email',\n\t\t\t\t\t\t'title' => __('E-mail used for authentication','wpchaosclient'),\n\t\t\t\t\t\t'type' => 'text'\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'wpchaos-password',\n\t\t\t\t\t\t'title' => __('Password','wpchaosclient'),\n\t\t\t\t\t\t'type' => 'password'\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t\t$this->settings = apply_filters('wpchaos-config', $settings);\n\n\t\tforeach($this->settings as $section) {\n\n\t\t\t//Validate\n\t\t\tif(!isset($section['name'],$section['title'],$section['fields']))\n\t\t\t\tcontinue;\n\n\t\t\t//Add section to WordPress\n\t\t\tadd_settings_section(\n\t\t\t\t$section['name'],\n\t\t\t\t$section['title'],\n\t\t\t\tnull,\n\t\t\t\t$this->menu_page\n\t\t\t);\n\n\t\t\tforeach($section['fields'] as $setting) {\n\t\t\t\t//Validate\n\t\t \t\tif(!isset($setting['title'],$setting['name'],$setting['type']))\n\t\t \t\t\tcontinue;\n\n\t\t \t\t//Are there any preconditions for this field to work properly?\n\t\t \t\tif(isset($setting['precond'])) {\n\t\t \t\t\tforeach($setting['precond'] as $precondition) {\n\t\t \t\t\t\tif(!$precondition['cond'])\n\t\t \t\t\t\t\tadd_action( 'admin_notices', function() use(&$precondition) { echo '<div class=\"error\"><p>'.$precondition['message'].'</p></div>'; },10);\n\t\t \t\t\t}\n\t\t \t\t}\n\n\t\t \t\t// Add field to section\n\t\t \t\tadd_settings_field($setting['name'],\n\t\t\t\t\t$setting['title'],\n\t\t\t\t\tarray(&$this,'create_setting_field'),\n\t\t\t\t\t$this->menu_page,\n\t\t\t\t\t$section['name'],\n\t\t\t\t\t$setting);\n\n\t\t \t\t// Register field to be manipulated with\n\t\t \t\tregister_setting($this->menu_page,$setting['name']);\n\t\t\t}\n\n\t\t}\n\n\t }", "function tb_section_callback() {\n echo \"<p>Theme settings for Tickets Broadway</p>\";\n}", "function admin_section_builder($data,$args) {echo '<div class=\"options-description\" style=\"padding:10px; line-height: 1.6;\">' . $args['args']['description'] . '</div><table class=\"form-table\">'; do_settings_fields( $this->page, $args['args']['section'] ); echo '</table>';}", "function ywig_create_settings_page_cb() {\n\trequire_once get_template_directory() . '/inc/templates/ywig-site-settings.php';\n}", "function cpjr3_settings_page() {\n\n add_options_page( __( 'Click Points Settings', 'cpjr3' ), __( 'Click Points', 'cpjr3' ), 'administrator', __FILE__, 'cpjr3_settings_fn' );\n\n}", "function j2_yt_api_settings_section() {\n add_settings_section(\n 'youtube_api_settings_section', // Section ID\n 'API Settings', // Section Title\n 'j2_yt_api_section_callback', // Callback\n 'general' // Show Settings on the `General Settings` Page\n );\n\n // Add a Form Field for the API key\n add_settings_field(\n 'youtube_api_key', // Option ID\n 'Youtube API Key', // Label\n 'j2_yt_textbox_callback', // Set callback args\n 'general', // Show Field on the `General Settings` Page\n 'youtube_api_settings_section', // Name of the section created above\n array( // $args\n 'youtube_api_key' // Should match Option ID\n )\n );\n\n // Add a Form Field for the Channel ID\n add_settings_field(\n 'youtube_api_channel_id', // Option ID\n 'Youtube API Channel ID', // Label\n 'j2_yt_textbox_callback', // Set callback args\n 'general', // Show Field on the `General Settings` Page\n 'youtube_api_settings_section', // Name of the section created above\n array( // $args\n 'youtube_api_channel_id' // Should match Option ID\n )\n );\n\n // Register the fields\n register_setting('general','youtube_api_key', 'esc_attr');\n register_setting('general','youtube_api_channel_id', 'esc_attr');\n }", "function custom_settings_page() { ?>\n <div class=\"wrap\">\n <h1>Social Links</h1>\n <form method=\"post\" action=\"options.php\">\n <?php\n settings_fields( 'section' );\n do_settings_sections( 'theme-options' ); \n submit_button(); \n ?> \n </form>\n </div>\n<?php }", "public function settings_page() {\r\n\t\tif ( ! isset( $this->hook_suffix ) )\r\n\t\t\treturn;\r\n\r\n\t\tadd_action( 'inf_member_settings_after_header_' . $this->hook_suffix, array( 'Inf_Member_App_Settings', 'after_header' ) );\r\n\r\n Inf_Member_Settings::settings_page_template( $this->hook_suffix, __( 'Inf Member Settings', 'inf-member' ) );\r\n\t}", "public function register_sections() {\n\t\t\t// Use default\n\t\t\tif ( !is_array( $this->_sections ) ) {\n\t\t\t\t$this->register_fields( $this->default_section, 0 );\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$i = 1;\n\t\t\tforeach ( $this->_sections as $key => $section ) {\n\t\t\t\t$page = $this->default_group;\n\n\t\t\t\tadd_settings_section(\n\t\t\t\t\t$section['id'],\t\t\t\t\t\n\t\t\t\t\t$section['title'],\n\t\t\t\t\tarray( &$this, $section['callback']),\n\t\t\t\t\t$this->default_group\n\t\t\t\t);\n\t\t\t\t$this->register_fields( $section['id'], $key );\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}", "function admin_menu(){\t\tif(!empty($this->settings_manager->sections)){\n\t\t\tadd_theme_page(__('Theme Settings'), __('Theme Settings'), 'edit_theme_options', $this->options->option_name, array($this, 'theme_settings'));\n\t\t}\n\t}", "function _add_section( $data=array() )\n\t{\n\t\t$section = array();\n\t\t\n\t\t$section['conf_title_title'] = $data['conf_title_title']['VALUE'];\n\t\t$section['conf_title_desc'] = $data['conf_title_desc']['VALUE'];\n\t\t$section['conf_title_count'] = 0;\n\t\t$section['conf_title_noshow'] = $data['conf_title_noshow']['VALUE'];\n\t\t$section['conf_title_keyword'] = $data['conf_title_keyword']['VALUE'];\n\t\t$section['conf_title_module'] = $data['conf_title_module']['VALUE'];\n\t\t\n\t\t$this->ipsclass->DB->do_insert( 'conf_settings_titles', $section );\n\t\t\n\t\treturn $this->ipsclass->DB->get_insert_id();\n\t}", "public function page_init()\r\n {\r\n register_setting(\r\n 'tapatalk_general_group', \r\n 'tapatalk_general',\r\n array($this, 'sanitize')\r\n );\r\n\r\n $this->add_default_value('tapatalk_general', array(\r\n 'mobile_welcome_screen' => false,\r\n 'mobile_smart_banner' => true,\r\n 'facebook_twitter_deep_link' => true,\r\n ));\r\n\r\n add_settings_section(\r\n 'tapatalk_general', // ID\r\n 'Tapatalk-General', // Title\r\n array($this, 'print_section_info'), // Callback\r\n 'tapatalk_general_admin' // Page\r\n );\r\n\r\n add_settings_field(\r\n 'mobile_welcome_screen', // ID\r\n 'Mobile Welcome Screen', // Title \r\n array($this->page_common, 'create_section_for_checkbox'), // Callback\r\n 'tapatalk_general_admin', // Page\r\n 'tapatalk_general', // Section\r\n array( //Callback function parameter\r\n \"id\" => \"mobile_welcome_screen\",\r\n \"group\" => \"tapatalk_general\",\r\n \"options\" => array(\r\n \"desc\" => 'Tapatalk will show a one-time welcome screen to mobile web users informing them to download and view your site in the free app.',\r\n ),\r\n )\r\n );\r\n\r\n add_settings_field(\r\n 'mobile_smart_banner',\r\n 'Mobile Smart Banner',\r\n array($this->page_common, 'create_section_for_checkbox'), \r\n 'tapatalk_general_admin',\r\n 'tapatalk_general',\r\n array(\r\n \"id\" => \"mobile_smart_banner\",\r\n \"group\" => \"tapatalk_general\",\r\n \"options\" => array(\r\n \"desc\" => 'Tapatalk will show a smart banner to mobile users, when your site is viewed by a mobile web browser.',\r\n ),\r\n )\r\n );\r\n\r\n add_settings_field(\r\n 'facebook_twitter_deep_link',\r\n 'Facebook and Twitter Deep Linking',\r\n array($this->page_common, 'create_section_for_checkbox'), \r\n 'tapatalk_general_admin',\r\n 'tapatalk_general',\r\n array(\r\n \"id\" => \"facebook_twitter_deep_link\",\r\n \"group\" => \"tapatalk_general\",\r\n \"options\" => array(\r\n \"desc\" => 'Allow your members to open the same blog in Tapatalk from your Facebook post / Twitter tweet.',\r\n ),\r\n )\r\n );\r\n\r\n add_settings_field(\r\n 'api_key',\r\n 'Tapatalk Key',\r\n array($this->page_common, 'create_section_for_text'),\r\n 'tapatalk_general_admin',\r\n 'tapatalk_general',\r\n array(\r\n \"desc\" => \"This field is mandatory. Please input the key provided in tapatalk site owner account.\",\r\n \"id\" => \"api_key\",\r\n \"group\" => \"tapatalk_general\",\r\n \"title\" => 'Tapatalk API Key',\r\n \"std\" => '',\r\n )\r\n );\r\n }", "function project_register_settings() {\n\tregister_setting(\n\t\t'project_options',\t\t\t\t\t\t// option group\n\t\t'project_options',\t\t\t\t\t\t// option name\n\t\t'project_callback_validate_options'\t\t// callable sanitize callback\n\t);\n\n\tadd_settings_section(\n\t\t'project_section_login',\t\t\t\t// section id\n\t\t'Customize Login Page',\t\t\t\t\t// section title\n\t\t'project_callback_section_login',\t\t// callable \n\t\t'project'\t\t\t\t\t\t\t\t// page on which section to be displayed\n\t);\n\n\tadd_settings_section(\n\t\t'project_section_admin',\n\t\t'Customize Admin Area',\n\t\t'project_callback_section_admin',\n\t\t'project'\n\t);\n\n\tadd_settings_field(\n\t\t'custom_url',\t\t\t\t\t\t\t// id\n\t\t'Custom URL',\t\t\t\t\t\t\t// title\n\t\t'project_callback_field_text',\t\t\t// callback\n\t\t'project',\t\t\t\t\t\t\t\t// page\n\t\t'project_section_login',\t\t\t\t// section\n\t\t['id' => 'custom_url', 'label' => 'Custom URL for the login logo link']\t// args\n\t);\n\n\tadd_settings_field(\n\t\t'custom_title',\t\t\t\t\t\t\n\t\t'Custom Title',\t\t\t\t\t\t\t\n\t\t'project_callback_field_text',\t\t\t\n\t\t'project',\t\t\t\t\t\t\t\t\n\t\t'project_section_login',\t\t\t\t\n\t\t['id' => 'custom_title', 'label' => 'Custom Title attribute for logo link']\t\n\t);\n\n\tadd_settings_field(\n\t\t'custom_style',\t\t\t\t\t\t\n\t\t'Custom Style',\t\t\t\t\t\t\t\n\t\t'project_callback_field_radio',\t\t\t\n\t\t'project',\t\t\t\t\t\t\t\t\n\t\t'project_section_login',\t\t\t\t\n\t\t['id' => 'custom_style', 'label' => 'Custom CSS for the Login screen']\t\n\t);\n\n\tadd_settings_field(\n\t\t'custom_message',\t\t\t\t\t\t\n\t\t'Custom Message',\t\t\t\t\t\t\t\n\t\t'project_callback_field_textarea',\t\t\t\n\t\t'project',\t\t\t\t\t\t\t\t\n\t\t'project_section_login',\t\t\t\t\n\t\t['id' => 'custom_message', 'label' => 'Custom text and/or markup']\t\n\t);\n\n\tadd_settings_field(\n\t\t'custom_footer',\t\t\t\t\t\t\n\t\t'Custom Footer',\t\t\t\t\t\t\t\n\t\t'project_callback_field_text',\t\t\t\n\t\t'project',\t\t\t\t\t\t\t\t\n\t\t'project_section_admin',\t\t\t\t\n\t\t['id' => 'custom_footer', 'label' => 'Custom footer text']\t\n\t);\n\n\tadd_settings_field(\n\t\t'custom_toolbar',\t\t\t\t\t\t\n\t\t'Custom Toolbar',\t\t\t\t\t\t\t\n\t\t'project_callback_field_checkbox',\t\t\t\n\t\t'project',\t\t\t\t\t\t\t\t\n\t\t'project_section_admin',\t\t\t\t\n\t\t['id' => 'custom_toolbar', 'label' => 'Remove new post and comment links from the Toolbar']\t\n\t);\n\n\tadd_settings_field(\n\t\t'custom_scheme',\t\t\t\t\t\t\n\t\t'Custom Scheme',\t\t\t\t\t\t\t\n\t\t'project_callback_field_select',\t\t\t\n\t\t'project',\t\t\t\t\t\t\t\t\n\t\t'project_section_admin',\t\t\t\t\n\t\t['id' => 'custom_scheme', 'label' => 'Default color scheme for new users']\t\n\t);\n}", "public function KemiSitemap_settings()\n {\n\n // Register new settings for \"KemiSitemap_options\" page\n register_setting('KemiSitemap_group', 'KemiSitemap_options');\n\n // Register a new section in the \"KemiSitemap_options\" page\n add_settings_section(\n 'KemiSitemap_options',\n __('Kemi Sitemap', 'KemiSitemap'),\n array( $this, 'KemiSitemap_description' ),\n 'KemiSitemap_group'\n );\n }", "function settings_page() { include($this->plugin_basename . '/core/admin/settings.php'); }", "function edds_settings_section( $sections ) {\n\t$sections['edd-stripe'] = __( 'Stripe', 'edds' );\n\n\treturn $sections;\n}", "function mfl_add_sttings_page_callback(){\n\tglobal $mfl_setting;\n\t\n\t?>\n\t\t<div class=\"warp\">\n\t\t\t<h1><?php _e('My Facebook PAge Link', 'mfl_textdomain'); ?></h1>\n\t\t\t<p><?php _e('Change Your facebook page plugin settings from here.', 'mfl_textdomain'); ?></p>\n\t\t\t<form action=\"options.php\" method=\"post\" >\n\t\t\t\t<?php settings_fields( 'mafl_settings_group' ); ?>\n\t\t\t\t<table class=\"form-table\" >\n\t\t\t\t\t<!-- enable plugin field -->\n\t\t\t\t\t<tr scope=\"row\" >\n\t\t\t\t\t<?php echo $mfl_setting['enable']; ?>\n\t\t\t\t\t\t<th>\n\t\t\t\t\t\t\t<label for=\"mfl_setting[enable]\"><?php _e('Enable Plugin', 'mfl_textdomain'); ?></label>\n\t\t\t\t\t\t</th>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<input type=\"checkbox\" <?php checked('1', $mfl_setting['enable'] ); ?> name=\"mfl_setting[enable]\" value=\"1\" id=\"mfl_setting[enable]\" />\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t\n\t\t\t\t\t<!-- facebook url field -->\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th>\n\t\t\t\t\t\t\t<label for=\"mfl_setting[url]\"><?php _e('Your facebook page url', 'mfl_textdomain'); ?></label>\n\t\t\t\t\t\t</th>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<input class=\"regular-text\" type=\"text\" name=\"mfl_setting[url]\" value=\"<?php echo esc_attr($mfl_setting['url']); ?>\" id=\"mfl_setting[url]\" />\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<!-- Show in Blog page -->\n\t\t\t\t\t<tr scope=\"row\" >\n\t\t\t\t\t\t<th>\n\t\t\t\t\t\t\t<label for=\"mfl_setting[sibp]\"><?php _e('Show In Blog Page', 'mfl_textdomain'); ?></label>\n\t\t\t\t\t\t</th>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<input type=\"checkbox\" <?php checked('1', $mfl_setting['sibp'] ); ?> name=\"mfl_setting[sibp]\" value=\"1\" id=\"mfl_setting[sibp]\" />\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t\n\t\t\t\t</table>\n\t\t\t\t<p class=\"submit\"><input type=\"submit\" name=\"submit\" id=\"submit\" class=\"button button-primary\" value=\"Save Changes\"></p>\n\t\t\t</form>\n\t\t</div>\n\t\n\t\n\t<?php\n }", "function achilles_settings_init() {\n\t\n\t//create one option to store all of our values. \n register_setting( 'achilles-settings-group', 'achilles-settings' );\n add_settings_section( 'achilles-general-settings', 'General Settings', 'achilles_general_settings_callback', 'achilles' );\n add_settings_field('resident-portal', 'Resident Portal URL', 'resident_portal_url_callback', 'achilles', 'achilles-general-settings');\n add_settings_field('facebook-url', 'Facebook URL', 'facebook_url_callback', 'achilles', 'achilles-general-settings' );\n add_settings_field('google-analytics-id', 'Google Analytics ID', 'google_analytics_id_callback', 'achilles', 'achilles-general-settings');\n\t\n}", "public function add_sections() {\n\t\t/**\n\t\t * Add generic section without label as it's requirement for `add_settings_field`.\n\t\t */\n\t\t\\add_settings_section(\n\t\t\t'bwcpp_settings_general',\n\t\t\t'',\n\t\t\t'',\n\t\t\t'bwcpp_settings'\n\t\t);\n\n\t\t/**\n\t\t * Add limit pictures setting.\n\t\t *\n\t\t * Pass through `intval` for sanitization.\n\t\t * Default value set to `20`.\n\t\t */\n\t\t\\register_setting(\n\t\t\t'bwcpp_settings',\n\t\t\tBWCPP_LIMIT_OPTION_NAME,\n\t\t\tarray(\n\t\t\t\t'type' => 'integer',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'default' => 20,\n\t\t\t),\n\t\t);\n\n\t\t/**\n\t\t * Adds settings field for limit pictures setting.\n\t\t */\n\t\t\\add_settings_field(\n\t\t\tBWCPP_LIMIT_OPTION_NAME,\n\t\t\t__( 'Max pictures per user', 'bwcpp' ),\n\t\t\tarray( $this, 'render_max_control' ),\n\t\t\t'bwcpp_settings',\n\t\t\t'bwcpp_settings_general',\n\t\t\tarray(\n\t\t\t\t'label_for' => BWCPP_LIMIT_OPTION_NAME,\n\t\t\t\t'id' => BWCPP_LIMIT_OPTION_NAME,\n\t\t\t\t'description' => __( 'Enter 0 for unlimited.', 'bwcpp' ),\n\t\t\t)\n\t\t);\n\t}", "public function register_settings() {\n\n\t\tadd_settings_section(\n\t \t'thaim_utilities_section',\n\t \t__( 'Thaim Utilities Settings', 'thaim-utilities' ),\n\t \tarray( $this, 'settings_callback_section' ),\n\t \t'buddypress'\n\t );\n\n\t $settings = apply_filters( 'thaim_utilities_settings_fields', array( \n\t \tarray(\n\t \t\t'name' => 'thaim_link_wordpress_org',\n\t \t\t'title' => __( 'WordPress.org account', 'thaim-utilities' ),\n\t \t\t'display' => array( $this, 'link_wp_org_callback' ),\n\t \t\t'sanitize' => 'sanitize_text_field',\n\t \t),\n\t \tarray(\n\t \t\t'name' => 'thaim_perpage_wordpress_org',\n\t \t\t'title' => __( 'Number of WordPress plugins to display', 'thaim-utilities' ),\n\t \t\t'display' => array( $this, 'perpage_wp_org_callback' ),\n\t \t\t'sanitize' => 'absint',\n\t \t),\n\t \tarray(\n\t \t\t'name' => 'thaim_list_github_repos',\n\t \t\t'title' => __( 'List your github repos', 'thaim-utilities' ),\n\t \t\t'display' => array( $this, 'list_github_repos_callback' ),\n\t \t\t'sanitize' => 'sanitize_text_field',\n\t \t),\n\t ) );\n\n\t\tforeach( $settings as $setting ) {\n\t\t\tadd_settings_field(\n\t\t\t\t$setting['name'],\n\t\t\t\t$setting['title'],\n\t\t\t\t$setting['display'],\n\t\t\t\t'buddypress',\n\t\t\t\t'thaim_utilities_section'\n\t\t\t);\n\n\t\t\tregister_setting(\n\t\t\t\t'buddypress',\n\t\t\t\t$setting['name'],\n\t\t\t\t$setting['sanitize']\n\t\t\t);\n\t\t}\n\t}", "public function settings_admin_page()\n {\n add_action('wp_cspa_before_closing_header', [$this, 'back_to_optin_overview']);\n add_action('wp_cspa_before_post_body_content', array($this, 'optin_theme_sub_header'), 10, 2);\n add_filter('wp_cspa_main_content_area', [$this, 'optin_form_list']);\n\n $instance = Custom_Settings_Page_Api::instance();\n $instance->page_header(__('Add New', 'mailoptin'));\n $this->register_core_settings($instance);\n $instance->build(true, true);\n }", "function settings() {\n // ADD SETTINGS SECTION\n // Args: name of section, subtitle of section (can be null), html content if needed e.g. description text, page slug to add section to\n add_settings_section('wcp_first_section', null, null, 'word-count-settings-page');\n\n // LOCATION SETTING\n // Args: name of setting to tie to, html label text i.e. name users will see, function to build html, page slug for settings page we're using, which section to add option in\n add_settings_field('wcp_location', 'Display Location', array($this, 'locationHTML'),'word-count-settings-page', 'wcp_first_section');\n // Args: group settings belong to, name of setting, array with sanitise callback and default value\n register_setting('wordcountplugin', 'wcp_location', array('sanitize_callback' => array($this, 'sanitizeLocation'), 'default' => '0'));\n\n // HEADLINE TEXT SETTING\n add_settings_field('wcp_headline', 'Headline Text', array($this, 'headlineHTML'),'word-count-settings-page', 'wcp_first_section');\n register_setting('wordcountplugin', 'wcp_headline', array('sanitize_callback' => 'sanitize_text_field', 'default' => 'Post Statistics'));\n\n // WORD COUNT DISPLAY SETTING\n // Extra param to pass name to HTML display function\n add_settings_field('wcp_wordcount', 'Word Count', array($this, 'checkboxHTML'),'word-count-settings-page', 'wcp_first_section', array('boxName' => 'wcp_wordcount'));\n register_setting('wordcountplugin', 'wcp_wordcount', array('sanitize_callback' => 'sanitize_text_field', 'default' => '1'));\n\n // CHARACTER COUNT DISPLAY SETTING\n add_settings_field('wcp_charcount', 'Character Count', array($this, 'checkboxHTML'),'word-count-settings-page', 'wcp_first_section', array('boxName' => 'wcp_charcount'));\n register_setting('wordcountplugin', 'wcp_charcount', array('sanitize_callback' => 'sanitize_text_field', 'default' => '1'));\n\n // READ TIME DISPLAY SETTING\n add_settings_field('wcp_readtime', 'Read Time', array($this, 'checkboxHTML'),'word-count-settings-page', 'wcp_first_section', array('boxName' => 'wcp_readtime'));\n register_setting('wordcountplugin', 'wcp_readtime', array('sanitize_callback' => 'sanitize_text_field', 'default' => '1'));\n }", "function myprefix_settings_section_content() {\n\techo '<p>';\n\t_e('Settings section description.');\n\techo '</p>';\n}", "function achilles_theme_settings_page(){ ?>\n <div class=\"wrap\">\n <h2><?php printf(__('%s Settings', 'achilles'), wp_get_theme()); ?></h2>\n <div class=\"updated\">\n <p><?php _e('Enter in your property settings below.', 'achilles'); ?></p>\n </div>\n <?php settings_errors(); ?> \n \n <form action=\"options.php\" method=\"POST\">\n <?php settings_fields( 'achilles-settings-group' ); ?>\n <?php do_settings_sections( 'achilles' ); ?>\n <?php submit_button(); ?>\n </form>\n \n </div> <!-- end settings wrap -->\n \n\t\n<?php }", "public function settings_admin_page()\n {\n add_action('wp_cspa_before_closing_header', [$this, 'back_to_optin_overview']);\n add_action('wp_cspa_before_post_body_content', array($this, 'optin_theme_sub_header'), 10, 2);\n add_filter('wp_cspa_main_content_area', [$this, 'optin_form_list']);\n\n $instance = Custom_Settings_Page_Api::instance();\n $instance->page_header(__('Add New Optin', 'mailoptin'));\n $this->register_core_settings($instance, true);\n $instance->build(true);\n }", "public function add_sections()\n {\n }", "public function page_init()\n { \n register_setting(\n 'ccgr_extras_options', // Group name. Must match the settings_fields function call\n 'cc_restricted_email_domains', // Option name\n array( $this, 'sanitize' ) // Callback function for validation.\n );\n\n add_settings_section(\n 'ccgr_extras_options', // ID for the section\n 'Registration Extras', // Title\n array( $this, 'print_section_info' ), // Callback function. Outputs section description.\n 'ccgr_extras' // Page name. Must match do_settings_section function call.\n ); \n\n add_settings_field(\n 'restricted_domains', // ID for the field\n 'Restricted Email Domains', // Title \n array( $this, 'print_domain_form_field' ), // Callback function. Outputs form field inputs.\n 'ccgr_extras', // Page name. Must match do_settings_section function call.\n 'ccgr_extras_options' // ID of the settings section that this goes into (same as the first argument of add_settings_section). \n );\n\n }", "function snax_admin_get_settings_sections() {\n\treturn (array) apply_filters( 'snax_admin_get_settings_sections', array(\n\t\t'snax_settings_general' => array(\n\t\t\t'title' => __( 'Frontend Submission', 'snax' ),\n\t\t\t'callback' => 'snax_admin_settings_general_section_description',\n\t\t\t'page' => 'snax-general-settings',\n\t\t),\n\t\t'snax_settings_lists' => array(\n\t\t\t'title' => __( 'Lists', 'snax' ),\n\t\t\t'callback' => 'snax_admin_settings_lists_section_description',\n\t\t\t'page' => 'snax-lists-settings',\n\t\t),\n\t\t'snax_settings_pages' => array(\n\t\t\t'title' => __( 'Pages', 'snax' ),\n\t\t\t'callback' => 'snax_admin_settings_pages_section_description',\n\t\t\t'page' => 'snax-pages-settings',\n\t\t),\n\t\t'snax_settings_voting' => array(\n\t\t\t'title' => __( 'Voting', 'snax' ),\n\t\t\t'callback' => 'snax_admin_settings_voting_section_description',\n\t\t\t'page' => 'snax-voting-settings',\n\t\t),\n\t\t'snax_settings_limits' => array(\n\t\t\t'title' => __( 'General', 'snax' ),\n\t\t\t'callback' => 'snax_admin_settings_limits_section_description',\n\t\t\t'page' => 'snax-limits-settings',\n\t\t),\n\t\t'snax_settings_auth' => array(\n\t\t\t'title' => __( 'Auth', 'snax' ),\n\t\t\t'callback' => 'snax_admin_settings_auth_section_description',\n\t\t\t'page' => 'snax-auth-settings',\n\t\t),\n\t\t'snax_settings_demo' => array(\n\t\t\t'title' => __( 'Demo', 'snax' ),\n\t\t\t'callback' => 'snax_admin_settings_demo_section_description',\n\t\t\t'page' => 'snax-demo-settings',\n\t\t),\n\t\t'snax_settings_embedly' => array(\n\t\t\t'title' => __( 'Embedly', 'snax' ),\n\t\t\t'callback' => 'snax_admin_settings_embedly_section_description',\n\t\t\t'page' => 'snax-embedly-settings',\n\t\t),\n\t\t'snax_permalinks' => array(\n\t\t\t'title' => _x( 'Snax', 'Permalink Settings', 'snax' ),\n\t\t\t'callback' => 'snax_permalinks_section_description',\n\t\t\t'page' => 'permalink',\n\t\t),\n\t) );\n}", "function add_settings_page() {\n\tadd_menu_page( __( 'Theme Options' ), __( 'Theme Options' ), 'manage_options', 'settings', 'theme_settings_page');\n}", "function subway_setting_section_callback_function() {\n\t// Do nothing.\n\treturn;\n}", "public function create_sections() {\n\t\tif ( count( $this->sections ) > 0 ) {\n\t\t\tforeach ( $this->sections as $k => $v ) {\n\t\t\t\tadd_settings_section( $k, $v['name'], array( $this, 'section_description' ), $this->token );\n\t\t\t}\n\t\t}\n\t}", "public function pluginSettingsMenu()\n {\n $hook_suffix = add_options_page(__('Rundizable WP Features', 'rundizable-wp-features'), __('Rundizable WP Features', 'rundizable-wp-features'), 'manage_options', 'rundizable-wp-features-settings', [$this, 'pluginSettingsPage']);\n add_action('load-' . $hook_suffix, [$this, 'registerScripts']);\n unset($hook_suffix);\n\n //add_options_page(__('Rundizable WP Features read settings value', 'rundizable-wp-features'), __('Rundizable WP Features read settings', 'rundizable-wp-features'), 'manage_options', 'rundizable-wp-features-read-settings', [$this, 'pluginReadSettingsPage']);\n }", "public function make($id, $options, $parent)\n\t{\n\t\t$this->section_id = $this->setting_prefix . $id;\n\n\t\t// Bring out the options.\n\t\textract($options);\n\n\t\t// Is the parent set?\n\t\tif (!is_null($parent)) {\n\t\t\n\t\t\t// If subtab style is independent, then the section will just be grouped in the parent id.\n\t\t\t// If subtabs should be build off of sections, then the group will be the section id.\n\t\t\t$options['parent_id'] = $parent->options['subtab_style'] == 'independent' ? $parent->options['id'] : $id;\n\n\t\t// If there is no parent set then just put the sections in the general settings.\n\t\t} else {\n\t\t\t$options['parent_id'] = 'general';\n\t\t}\n\n\t\t$this->section_options = $options;\n\n\t\t// Set up the callback class.\n\t\t$this->section_callback = new SectionCallbacks;\n\t\t$this->section_callback->setProperties(array(\n\t\t\t'id'\t\t\t=> $this->section_id,\n\t\t\t'title'\t\t\t=> $this->section_options['title'],\n\t\t\t'description' \t=> $this->section_options['description'],\n\t\t\t'group'\t\t\t=> $this->section_options['parent_id']\n\t\t));\n\n\t\tif ($parent) {\n\t\t\t$parent->registerChild('section', $id, $options);\n\t\t}\n\n\t\t// Create the Section with the Wordpress Settings Api.\n\t\t$this->addSection();\n\t\t// add_action('admin_init', array($this, 'addSection'));\n\n\t\t// Register it later when all of it's children are registered.\n\t\t$this->registerSection();\n\t\t// add_action('admin_init', array($this, 'registerSection'), 11);\n\t\t\n\t\t// Register the setting section with the setting registrar.\n\t\tSettingsRegistrar::getInstance()->registerSettingSection($this, $this->section_id, $this->section_options);\n\t\t\n\t\t// Create the children\n\t\t$this->makeChildren($contents, $this->section_callback);\n\t}", "public function initialize_settings_page()\n {\n }", "public function page_init() { \n\n\t\t\tif (!get_option('dls_settings_site_id')) {\n\t\t\t\tadd_option('dls_settings_site_id');\n\t\t\t}\n\n\t\t\tif (!get_option('dls_settings_enabled_post_types')) {\n\t\t\t\tadd_option('dls_settings_enabled_post_types');\n\t\t\t}\n\n\t\t\tif (!get_option('dls_settings_replace_host_list')) {\n\t\t\t\tadd_option('dls_settings_replace_host_list');\n }\n\n\t\t\tif (!get_option('dls_settings_auto_redirect_to_admin_page')) {\n\t\t\t\tadd_option('dls_settings_auto_redirect_to_admin_page');\n }\n\n\t\t\tif (!get_option('dls_overwrite_viewable_permalink')) {\n\t\t\t\tadd_option('dls_overwrite_viewable_permalink');\n }\n\n \t\t\tif (!get_option('dls_overwrite_viewable_permalink_host')) {\n\t\t\t\tadd_option('dls_overwrite_viewable_permalink_host');\n\t\t\t}\n \n register_setting( 'my_option_group', 'dls_settings_site_id', array( $this, 'sanitize' ) );\n register_setting( 'my_option_group', 'dls_settings_enabled_post_types', array( $this, 'sanitize' ) );\n register_setting( 'my_option_group', 'dls_settings_replace_host_list', array( $this, 'sanitize' ) );\n register_setting( 'my_option_group', 'dls_settings_auto_redirect_to_admin_page', array( $this, 'sanitize' ) );\n register_setting( 'my_option_group', 'dls_overwrite_viewable_permalink', array( $this, 'sanitize' ) );\n register_setting( 'my_option_group', 'dls_overwrite_viewable_permalink_host', array( $this, 'sanitize' ) );\n\n add_settings_section( 'settings_site_id', 'Site ID', array( $this, 'print_site_id' ), 'my-setting-admin' ); \n\t\t\tadd_settings_field( 'dls-settings', 'Set the site id for this site', array( $this, 'site_id_callback'), 'my-setting-admin', 'settings_site_id' ); \n\n add_settings_section( 'setting_section_id', 'Post types settings', array( $this, 'print_post_types_info' ), 'my-setting-admin' ); \n\t\t\tadd_settings_field( 'dls-settings', 'Select post types', array( $this, 'post_type_callback'), 'my-setting-admin', 'setting_section_id' ); \n\n add_settings_section( 'settings_replace_hosts', 'Hosts to replace', array( $this, 'print_replace_hosts_info' ), 'my-setting-admin' ); \n\t\t\tadd_settings_field( 'dls-settings', 'List of hosts', array( $this, 'replace_hosts_callback'), 'my-setting-admin', 'settings_replace_hosts' ); \n\n add_settings_section( 'settings_auto_redirect_to_admin', 'Auto redirect to admin page', array( $this, 'print_auto_redirect_to_admin' ), 'my-setting-admin' ); \n\t\t\tadd_settings_field( 'dls-settings', 'Auto redirect to admin page', array( $this, 'auto_redirect_to_admin_callback'), 'my-setting-admin', 'settings_auto_redirect_to_admin' ); \n\n add_settings_section( 'settings_overwrite_viewable_permalink', 'Overwrite the viewable permalink', array( $this, 'print_overwrite_viewable_permalink' ), 'my-setting-admin' ); \n\t\t\tadd_settings_field( 'dls-settings', 'Overwrite the viewable permalink', array( $this, 'overwrite_viewable_permalink_callback'), 'my-setting-admin', 'settings_overwrite_viewable_permalink' ); \n\t\t\tadd_settings_field( 'dls-settings-overwrite_viewable_permalink_host', 'Overwrite the viewable permalink host', array( $this, 'overwrite_viewable_permalink_host_callback'), 'my-setting-admin', 'settings_overwrite_viewable_permalink' ); \n\n\t\t}", "public function page_init () {\n foreach ($this->accounts as $key => $account) {\n register_setting('option_group', $account. '_account');\n }\n\n // Add section for the page.\n add_settings_section(\n 'social_accounts', // Id section.\n 'Social account settings', // Title page.\n [$this, 'create_page_info'], // Callback.\n 'settings_social_accounts' // Name of the option page SLUG.\n );\n\n foreach ($this->accounts as $key => $account) {\n $label = ucfirst($account) .' account';\n $function = 'create_'. $account .'_input';\n $account .= '_account';\n \n $this->$function = function ($account) {\n ?>\n <input type=\"text\"\n id=\"<?= $account ?>\"\n name=\"<?= $account ?>\"\n value=\"<?= $this->options[$account] ?>\"\n />\n <?php\n };\n add_settings_field(\n $account,\n $label,\n [$this, $function],\n 'settings_social_accounts',\n 'social_accounts',\n $account\n );\n }\n }", "function display_my_page() {\n?>\n\t<div class=\"wrap\">\n\t\t<h2>Theme Options</h2>\n\t\t<form method=\"post\" action=\"options.php\">\n\t\t\t<?php settings_fields( 'my-options' ); ?>\n\t\t\t<?php do_settings_sections( 'my-page-id' ); ?>\n\t\t\t<?php submit_button( 'Ka-Pow!' ); ?>\n\t\t</form>\n\t</div>\n<?php\n}", "function gssettings_theme_options() {\n global $_gssettings_settings_pagehook;\n $_gssettings_settings_pagehook = add_submenu_page( 'genesis', 'Sandbox Settings', 'Sandbox Settings', 'edit_theme_options', GSSETTINGS_SETTINGS_FIELD, 'gssettings_theme_options_page' );\n \n //add_action( 'load-'.$_gssettings_settings_pagehook, 'gssettings_settings_styles' );\n add_action( 'load-'.$_gssettings_settings_pagehook, 'gssettings_settings_scripts' );\n add_action( 'load-'.$_gssettings_settings_pagehook, 'gssettings_settings_boxes' );\n }", "function add_options_page($page_title, $menu_title, $capability, $menu_slug, $callback = '', $position = \\null)\n {\n }", "public function admin_init() {\n //register settings sections\n foreach ( $this->settings_sections as $tab_key => $sections ) {\n foreach ($sections as $section){\n if ( false == get_option( $this->get_option_prefix($section['id']) ) ) {\n add_option( $this->get_option_prefix($section['id']) );\n }\n\n if ( isset($section['desc']) && !empty($section['desc']) ) {\n $section['desc'] = '<div class=\"inside\">'.$section['desc'].'</div>';\n $callback = function () use($section) {\n echo str_replace('\"', '\\\"', $section['desc']);\n };\n } else if ( isset( $section['callback'] ) ) {\n $callback = $section['callback'];\n } else {\n $callback = null;\n }\n\n add_settings_section( $section['id'], $section['title'], $callback, $tab_key );\n }\n }\n\n //register settings fields\n foreach ( $this->settings_fields as $tab_key => $sections ) {\n foreach ($sections as $section_key => $field ) {\n foreach ($field as $field_args) {\n\n $args = $this->set_default_field_args( $field_args, $tab_key, $section_key );\n\n if ($args['global'] === true) {\n register_setting($tab_key, $args['name_id'], (is_callable($args['sanitize_callback'])) ? $args['sanitize_callback'] : false);\n }\n\n add_settings_field($args['name_id'], $args['label'], array($this, 'callback_' . $args['type']), $tab_key, $section_key, $args);\n\n if ($args['sub_fields']) {\n\n foreach ( $args['sub_fields'] as $sub_field_args ) {\n $sub_field_args['parent'] = $args;\n $sub_args = $this->set_default_field_args( $sub_field_args, $tab_key, $section_key );\n\n add_settings_field($sub_args['name_id'], $sub_args['label'], array($this, 'callback_' . $sub_args['type']), $tab_key, $section_key, $sub_args);\n }\n\n }\n }\n }\n }\n\n // creates our settings in the options table\n foreach ( $this->settings_sections as $tab_key => $sections ) {\n foreach ($sections as $section) {\n register_setting( $tab_key, $this->get_option_prefix( $section['id'] ), array( $this, 'sanitize_options' ) );\n }\n }\n\n }", "public function settings_page() { ?>\n\n <div class=\"wrap\">\n <?php $this->settings_api->settings_html(); ?>\n </div><?php\n }", "function settings_page() {\n global $wpdb, $wp_properties;\n\n include_once( __DIR__ . '/ui/settings-section.php' );\n\n }", "public function settings_page () {\n\n // Build page HTML\n $html = '<div class=\"wrap\" id=\"' . $this->_token . '_settings\">' . \"\\n\";\n $html .= '<h2>' . __( 'Plugin Settings' , 'listeo_core' ) . '</h2>' . \"\\n\";\n\n $tab = '';\n if ( isset( $_GET['tab'] ) && $_GET['tab'] ) {\n $tab .= $_GET['tab'];\n }\n\n // Show page tabs\n if ( is_array( $this->settings ) && 1 < count( $this->settings ) ) {\n\n $html .= '<h2 class=\"nav-tab-wrapper\">' . \"\\n\";\n\n $c = 0;\n foreach ( $this->settings as $section => $data ) {\n\n // Set tab class\n $class = 'nav-tab';\n if ( ! isset( $_GET['tab'] ) ) {\n if ( 0 == $c ) {\n $class .= ' nav-tab-active';\n }\n } else {\n if ( isset( $_GET['tab'] ) && $section == $_GET['tab'] ) {\n $class .= ' nav-tab-active';\n }\n }\n\n // Set tab link\n $tab_link = add_query_arg( array( 'tab' => $section ) );\n if ( isset( $_GET['settings-updated'] ) ) {\n $tab_link = remove_query_arg( 'settings-updated', $tab_link );\n }\n\n // Output tab\n $html .= '<a href=\"' . $tab_link . '\" class=\"' . esc_attr( $class ) . '\">' . esc_html( $data['title'] ) . '</a>' . \"\\n\";\n\n ++$c;\n }\n\n $html .= '</h2>' . \"\\n\";\n }\n\n $html .= '<form method=\"post\" action=\"options.php\" enctype=\"multipart/form-data\">' . \"\\n\";\n\n // Get settings fields\n ob_start();\n settings_fields( $this->_token . '_settings' );\n do_settings_sections( $this->_token . '_settings' );\n $html .= ob_get_clean();\n\n $html .= '<p class=\"submit\">' . \"\\n\";\n $html .= '<input type=\"hidden\" name=\"tab\" value=\"' . esc_attr( $tab ) . '\" />' . \"\\n\";\n $html .= '<input name=\"Submit\" type=\"submit\" class=\"button-primary\" value=\"' . esc_attr( __( 'Save Settings' , 'listeo_core' ) ) . '\" />' . \"\\n\";\n $html .= '</p>' . \"\\n\";\n $html .= '</form>' . \"\\n\";\n $html .= '</div>' . \"\\n\";\n\n echo $html;\n }", "public function settings_page()\n {\n\n // Build page HTML\n $html = '<div class=\"wrap\" id=\"' . $this->parent->_token . '_settings\">' . \"\\n\";\n $html .= '<h2>' . __('SUAPI Settings', 'wp-suapi') . '</h2>' . \"\\n\";\n\n $tab = '';\n if (isset($_GET['tab']) && $_GET['tab']) {\n $tab .= $_GET['tab'];\n }\n\n // Show page tabs\n if (is_array($this->settings) && 1 < count($this->settings)) {\n\n $html .= '<h2 class=\"nav-tab-wrapper\">' . \"\\n\";\n\n $c = 0;\n foreach ($this->settings as $section => $data) {\n\n // Set tab class\n $class = 'nav-tab';\n if (!isset($_GET['tab'])) {\n if (0 == $c) {\n $class .= ' nav-tab-active';\n }\n } else {\n if (isset($_GET['tab']) && $section == $_GET['tab']) {\n $class .= ' nav-tab-active';\n }\n }\n\n // Set tab link\n $tab_link = add_query_arg(array('tab' => $section));\n if (isset($_GET['settings-updated'])) {\n $tab_link = remove_query_arg('settings-updated', $tab_link);\n }\n\n // Output tab\n $html .= '<a href=\"' . $tab_link . '\" class=\"' . esc_attr($class) . '\">' . esc_html($data['title']) . '</a>' . \"\\n\";\n\n ++$c;\n }\n\n $html .= '</h2>' . \"\\n\";\n }\n\n $html .= '<form method=\"post\" action=\"options.php\" enctype=\"multipart/form-data\">' . \"\\n\";\n\n // Get settings fields\n ob_start();\n settings_fields($this->parent->_token . '_settings');\n do_settings_sections($this->parent->_token . '_settings');\n $html .= ob_get_clean();\n\n $html .= '<p class=\"submit\">' . \"\\n\";\n $html .= '<input type=\"hidden\" name=\"tab\" value=\"' . esc_attr($tab) . '\" />' . \"\\n\";\n $html .= '<input name=\"Submit\" type=\"submit\" class=\"button-primary\" value=\"' . esc_attr(__('Save Settings', 'wp-suapi')) . '\" />' . \"\\n\";\n $html .= '</p>' . \"\\n\";\n $html .= '</form>' . \"\\n\";\n $html .= '</div>' . \"\\n\";\n\n echo $html;\n }" ]
[ "0.79533756", "0.78925526", "0.7864827", "0.78374994", "0.7810609", "0.76864356", "0.76244366", "0.74595255", "0.7435266", "0.74153584", "0.7328516", "0.7306709", "0.7303976", "0.71077335", "0.71015227", "0.7093092", "0.70522577", "0.7010303", "0.7009345", "0.69956946", "0.6950402", "0.69450265", "0.6852313", "0.68511635", "0.6838933", "0.6838543", "0.6830354", "0.6824385", "0.68223906", "0.6820539", "0.6819913", "0.6819469", "0.68096685", "0.68077546", "0.67930466", "0.67930466", "0.67856735", "0.6782447", "0.67820615", "0.67757976", "0.6775031", "0.67585194", "0.6757713", "0.6756394", "0.6751098", "0.67510366", "0.6732315", "0.6686559", "0.66848546", "0.66811377", "0.66795206", "0.667092", "0.66596967", "0.6657009", "0.6656654", "0.66517866", "0.6640526", "0.6638595", "0.6638212", "0.66303647", "0.66281486", "0.6611571", "0.6579905", "0.6576942", "0.6573857", "0.6563796", "0.6562643", "0.6558271", "0.65547264", "0.6541374", "0.6531994", "0.6520639", "0.65191907", "0.6516684", "0.65028304", "0.6495982", "0.64932203", "0.648586", "0.6485114", "0.648154", "0.6480432", "0.6466014", "0.6459003", "0.64564955", "0.64549893", "0.64420635", "0.6435984", "0.64328957", "0.64227724", "0.64097065", "0.6409571", "0.6404831", "0.64002573", "0.63979834", "0.63961124", "0.6391744", "0.63916975", "0.63899374", "0.6389877", "0.6386928" ]
0.6952761
20
echo 'Additional Settings Description.';
function print_additional_settings_section_info() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function myprefix_settings_section_content() {\n\techo '<p>';\n\t_e('Settings section description.');\n\techo '</p>';\n}", "function PrintSiteDescription()\n\t{\n\t\t$description = GetTitle('parameters/preferences', 3);\n\t\techo $description;\n\t}", "public function render_settings_section() {\n\t\tprintf( __( 'Insert your %s license information to enable future updates (including bug fixes and new features) and gain access to support.', $this->text_domain ), $this->product_name );\n\t}", "public function settings_section_text() {\r\n\t\t\t\t// Think of this as help text for the section.\r\n\t\t\t\techo '<h1>';\r\n\t\t\t\techo esc_html( 'These settings are for configuring Sift Ninja' );\r\n\t\t\t\techo '</h1>';\r\n\r\n\t\t\t\techo 'If you do not have a Sift ninja account, you can visit <a href=\"http://www.siftninja.com?platform=WordPressPlatform\" target=\"_blank\">Sift Ninja</a> to create your free account.';\r\n\t\t}", "public function custom_settings_section_info() {\n global $WCPc;\n _e('Enter your custom settings below', $WCPc->text_domain);\n }", "function ed_setting_section_callback(){\n\techo '<p>Settings for the Employee Display plugin</p>';\n}", "function getDescription()\n {\n $description = '\n\t\tThis is the template installation type. Change this text within the file for this installation type.';\n return $description;\n }", "function settings_callback_section() {\n\t ?>\n\t <p class=\"description\"><?php _e( 'Define the Utilities to use.', 'thaim-utilities' );?></p>\n\t <?php\n\t}", "public function print_section_info()\r\n {\r\n print 'Additional options of your sites are available in Tapatalk Admin CP.';\r\n }", "function show_excerpts() {\n\treturn 'excerpts';\n}", "function dblions_general_options() {\n\techo 'Edit general features';\n}", "public function print_settings_section_info()\n {\n }", "function section_ringy_dingy() {\n\techo 'This is a settings section.\n\tYou can put instructions here for users about this section.';\n\t// You could also just leave this function blank\n\t// if you didn't want to output anything.\n}", "function get_site_description() {\r\n\t?>\r\n\t\t<div id=\"title-description\" class=\"five3-font\">Meal Replacement<br/>Energy Drink Mix</div>\r\n\t<?php\r\n}", "public static function label()\n {\n return 'Settings';\n }", "function woo_menu_description() {\n\tif ( get_option('woo_menu_desc') == \"true\" ) {\n\t\t$GLOBALS[desc] = \"true\";\n\t\techo '<style type=\"text/css\">#secnav a { line-height:16px; padding:13px 15px; }</style>' . \"\\n\";\n\t}\n}", "public function print_section_info()\n {\n print 'Enter your settings below:';\n }", "public function print_section_info()\n {\n print 'Enter your settings below:';\n }", "public function print_section_info()\n {\n print 'Enter your settings below:';\n }", "function tb_longwave_header_options_callback() {\n\techo '<p>Settings for things visible in the Head of the theme.</p>';\n}", "function options_page() {\n\t\t$settings = __( 'AdControl Settings', 'adcontrol' );\n\t\t$notice = sprintf(\n\t\t\t__( 'AdControl requires %sJetpack%s to be installed and connected at this time. %sHelp getting started.%s', 'adcontrol' ),\n\t\t\t'<a href=\"https://jetpack.com/\" target=\"_blank\">', '</a>',\n\t\t\t'<a href=\"https://jetpack.com/support/getting-started-with-jetpack/\" target=\"_blank\">', '</a>'\n\t\t);\n\n\t\techo <<<HTML\n\t\t<div class=\"wrap\">\n\t\t\t<div id=\"icon-options-general\" class=\"icon32\"><br></div>\n\t\t\t<h2>$settings</h2>\n\t\t\t<p>$notice</p>\n\t\t</div>\nHTML;\n\t}", "function print_saved_message(){\n\t\techo '<div class=\"note_box\" id=\"saved_box\">'.$this->themename.' settings saved.</div>';\t\n\t}", "public function default_settings_section_info() {\n global $WCPc;\n _e('Enter your default settings below', $WCPc->text_domain);\n }", "function ms_settings_section() {\n?>\n<h3><?php _e( 'Post Revision Workflow', $this->text_domain ) ?></h3>\n<table class=\"form-table\">\n\t<tbody>\n \t<tr valign=\"top\">\n \t<th scope=\"row\">\n \t<label for=\"dpn_reviewers\"><?php _e( 'Default email address for post revision workflow notification:', $this->text_domain ) ?></label>\n </th>\n <td>\n \t<?php $this->settings_field() ?>\n </td>\n </tr>\n </tbody>\n</table>\n<?php\n\t\t}", "function bg_AddSettingsSectionHtml() { }", "public function getDescription(): string {\n return \"$this->description\";\n }", "public function print_general_section_info()\n {\n _e('This is the general settings for the site.', 'bk-fonts');\n }", "public function plugin_settings_description() {\n\t\t\n\t\t$description = '<p>';\n\t\t$description .= sprintf(\n\t\t\tesc_html__( 'iContact makes it easy to send email newsletters to your customers, manage your subscriber lists, and track campaign performance. Use Gravity Forms to collect customer information and automatically add it to your iContact list. If you don\\'t have an iContact account, you can %1$s sign up for one here.%2$s', 'gravityformsicontact' ),\n\t\t\t'<a href=\"http://www.icontact.com/\" target=\"_blank\">', '</a>'\n\t\t);\n\t\t$description .= '</p>';\n\t\t\n\t\tif ( ! $this->initialize_api() ) {\n\t\t\t\n\t\t\t$description .= '<p>';\n\t\t\t$description .= esc_html__( 'Gravity Forms iContact Add-On requires your Application ID, API username and API password. To obtain an application ID, follow the steps below:', 'gravityformsicontact' );\n\t\t\t$description .= '</p>';\n\t\t\t\n\t\t\t$description .= '<ol>';\n\t\t\t$description .= '<li>' . sprintf(\n\t\t\t\tesc_html__( 'Visit iContact\\'s %1$s application registration page.%2$s', 'gravityformsicontact' ),\n\t\t\t\t'<a href=\"https://app.icontact.com/icp/core/registerapp/\" target=\"_blank\">', '</a>'\n\t\t\t) . '</li>';\n\t\t\t$description .= '<li>' . esc_html__( 'Set an application name and description for your application.', 'gravityformsicontact' ) . '</li>';\n\t\t\t$description .= '<li>' . esc_html__( 'Choose to show information for API 2.0.', 'gravityformsicontact' ) . '</li>';\n\t\t\t$description .= '<li>' . esc_html__( 'Copy the provided API-AppId into the Application ID setting field below.', 'gravityformsicontact' ) . '</li>';\n\t\t\t$description .= '<li>' . esc_html__( 'Click \"Enable this AppId for your account\".', 'gravityformsicontact' ) . '</li>';\n\t\t\t$description .= '<li>' . esc_html__( 'Create a password for your application and click save.', 'gravityformsicontact' ) . '</li>';\n\t\t\t$description .= '<li>' . esc_html__( 'Enter your API password, along with your iContact account username, into the settings fields below.', 'gravityformsicontact' ) . '</li>';\n\t\t\t$description .= '</ol>';\n\t\t\t\n\t\t}\n\t\t\t\t\n\t\treturn $description;\n\t\t\n\t}", "public function customizer_help() {\n\t\techo '\n\t\t<li>\n\t\t\t<p>\n\t\t\t\t' . __( 'Example text:', 'hellish-simplicity' ) . ' <code>' . esc_html( $this->default_header_text ) . '</code>\n\t\t\t</p>\n\t\t</li>';\n\t}", "public function print_section_info() {\n // print 'Enter your settings below:';\n }", "public static function print_section_info()\n {\n print 'Enter your settings below:';\n }", "public function get_settings_html() {\n\t\treturn '';\n\t}", "function sh_custom_settings_options_callback(){\n echo 'Add your custom information';\n}", "function wpbs_echo_option()\n {\n include wpbs_advs_plugin_dir . 'admin/view/adminLayout.php';\n }", "function achilles_general_settings_callback() {\n echo 'Welcome to the Achilles Theme Settings. Here you will be able to set information for your property that will be used across the website.';\n}", "function pqrc_section_title_cal()\n {\n echo \"<h2>\" . __('Post QRC Settings Section', 'post-qurcode') . \"</h2>\";\n }", "function vdtestim_global_callback () {\n\t?>\n\t\t<p><?php esc_attr_e( 'Manage Global Options', 'vdtestim' ); ?></p>\n\t<?php\n}", "static function description(): string {\r\n return 'A website owned or used by The Medium'; \r\n }", "public function KemiSitemap_description()\n {\n echo '<p>Kemi Sitemap Description</p>';\n }", "function payment_fields(){\r\n if($this -> description) echo wpautop(wptexturize($this -> description));\r\n }", "function quadro_site_about() {\n\tglobal $quadro_options;\n\tif ( esc_attr($quadro_options['about_text']) != '' ) {\n\t\techo '<h2 class=\"site-description\">' . esc_attr($quadro_options['about_text']) . '</h2>';\n\t}\n}", "function display_analytics_section_html()\n\t\t{\n\t\t\techo '<p>';\n\t\t\techo 'Enter code block used for site analytics';\n\t\t\techo '</p>';\n\t\t}", "public function get_admin_description()\n\t{\n\t\treturn '';\n\t}", "public function getDescription() {\n return $this->config['general']['description'];\n }", "function cosmetro_site_description() {\n\t$show_desc = get_theme_mod( 'show_tagline', cosmetro_theme()->customizer->get_default( 'show_tagline' ) );\n\n\tif ( ! $show_desc ) {\n\t\treturn;\n\t}\n\n\t$description = get_bloginfo( 'description', 'display' );\n\n\tif ( ! ( $description || is_customize_preview() ) ) {\n\t\treturn;\n\t}\n\n\t$format = apply_filters( 'cosmetro_site_description_format', '<div class=\"site-description\">%s</div>' );\n\n\tprintf( $format, $description );\n}", "function my_menu_output(){\n\techo '<h1>The Hello Yoda Plugin by Alan</h1>\n\t<p>\"Pass on what you have learned.\" --Yoda </p>';\n}", "function settings_html() {\n $this->render_setting( 'label_any' );\n }", "function display_var_settings($settings)\n {\n return $this->_settings_ui($settings);\n }", "public function getDesciption();", "function tb_section_callback() {\n echo \"<p>Theme settings for Tickets Broadway</p>\";\n}", "public function property_overview_desc() {\n\n\t\t\t$short_description_1 = get_field( 'short_description_1' );\n\t\t\t$short_description_2 = get_field( 'short_description_2' );\n\n\t\t\t$out = '<h6>Overview Description:</h6>';\n\t\t\t$out .= '<p>';\n\t\t\t$out .= ( get_field( 'advertisement_package' ) == '165' )\n\t\t\t\t? $short_description_1\n\t\t\t\t: $short_description_2;\n\t\t\t$out .= '</p>';\n\t\t\t$out .= '<div class=\"hr hr-default\"><span class=\"hr-inner \"><span class=\"hr-inner-style\"></span></span></div>';\n\n\t\t\tif ( $this->add_package == 3 ) {\n\t\t\t$out .= '<h3>Practice Details:</h3>';\n\t\t\t}\n\n\t\t\treturn $out;\n\t\t}", "public function admin_section_code_settings() {\n\t\t\techo '<p>' . esc_html( 'Insert Drip API Token & Account ID bellow' ) . '</p>';\n\t\t}", "function field_details() \n { ?>\n <div class=\"field-details\">\n <?php if($this->setting['type'] != 'radio' && $this->setting['type'] != 'checkbox') : ?><label <?php $this->for_tag(\"inferno-concrete-setting-\"); ?>><?php endif; ?>\n <?php echo $this->setting['desc']; ?>\n <?php if($this->setting['type'] != 'radio' && $this->setting['type'] != 'checkbox') : ?></label><?php endif; ?>\n\n <?php if(isset($this->setting['more']) && $this->setting['more'] != '') : ?>\n <span class=\"more\"><?php echo $this->setting['more']; ?></span>\n <?php endif; ?>\n\n <?php if($this->setting['type'] == 'font') : ?>\n <div class=\"googlefont-desc\">\n <label <?php $this->for_tag(\"inferno-concrete-setting-\", \"-googlefont\"); ?>>\n <?php _e('Enter the Name of the Google Webfont You want to use, for example \"Droid Serif\" (without quotes). Leave blank to use a Font from the selector above.', 'inferno'); ?>\n </label>\n <span class=\"more\">\n <?php _e('You can view all Google fonts <a href=\"http://www.google.com/webfonts\">here</a>. Consider, that You have to respect case-sensitivity. If the font has been successfully recognized, the demo text will change to the entered font.', 'inferno'); ?>\n </span>\n </div>\n <?php endif; ?>\n </div>\n <?php\n }", "function custom_setting_section_callback() {\n\techo '<p>Custom Section</p>';\n}", "public function display_description() {\n\t\t\n\t\treturn str_replace(\"\\r\\n\", \"<br />\", $this->description);\n\t\n\t}", "function artisan_admin_info_page() { \n return 'Manage artisan profiles page. This does nothing for now.';\n}", "public function welcomInformations() {\n echo \"\\t\\t####################################\\t\\t\\n\";\n echo \"\\t\\t#\\n\";\n echo \"\\t\\t# \" . Utils::red(\"This is a Enterprise Backup Tool!\") . \"\\n\";\n echo \"\\t\\t#\\n\";\n echo \"\\t\\t####################################\\t\\t\\n\\n\";\n }", "public function toString()\n {\n return 'On the Setting General Page. We could not update staff information when all fields are blank.';\n }", "function getDescription() {\n\t\treturn __('plugins.generic.thesisfeed.description');\n\t}", "public function description()\n {\n\n return static::$description;\n\n }", "function print_reset_message(){\n\t\techo '<div><p>'.$this->themename.' settings reset.</p></div>';\t\n\t}", "public function _settings_section_dropbox() {\n _e( 'The Zendesk Dropbox places a convenient tab on your pages that allow your visitors to contact you via a pop-up form.', 'zendesk' );\n }", "public function settings_page() {\n\t\tinclude_once( dirname( __FILE__ ) . '/class-vendor-admin-settings.php' );\n\t\tVendor_Admin_Settings::output();\n\t}", "function ui_description() {\n if (isset($this->plugin['ui_description'])) {\n return check_plain($this->plugin['ui_description']);\n }\n }", "function settings_section_article_before() {\n\techo '<p>' . __( 'These settings may be overridden for individual articles.' ) . '</p>';\n}", "public function getDescription(): string\n {\n return 'Se crea el campo anexos del sistema';\n }", "function pqurc_display_extra()\n {\n $extra_fi = get_option('pqurcode_extra');\n printf(\"<input type='text' id='%s' name='%s' value='%s' />\", 'pqurcode_extra', 'pqurcode_extra', $extra_fi);\n }", "public function usage()\n\t{\n\t\treturn 'For usage visit: http://www.devdemon.com/';\n\t}", "function defineDescription() {\n return 'List all available commands with a short description';\n }", "function admin_options() {\r\n ?>\r\n <h3><?php _e('Bitcoin Payment','Bitcoin_Payment'); ?></h3>\r\n <table class=\"form-table\">\r\n <?php $this->generate_settings_html(); ?>\r\n </table> <?php\r\n }", "function site_description() {\n\treturn site_meta('description');\n}", "function admin_section_builder($data,$args) {echo '<div class=\"options-description\" style=\"padding:10px; line-height: 1.6;\">' . $args['args']['description'] . '</div><table class=\"form-table\">'; do_settings_fields( $this->page, $args['args']['section'] ); echo '</table>';}", "function settings_html() {\n $this->render_setting( 'label_any' );\n $this->render_setting( 'modifiers' );\n $this->render_setting( 'orderby' );\n $this->render_setting( 'count' );\n }", "function bimber_render_logs_description() {\n\t?>\n\t<p><?php esc_html_e( 'If something suspicious happens, in this section you will find all information that helps you find and solve that problem. It can be also helpful for our support staff.', 'bimber' ); ?></p>\n\t<?php\n}", "static public function getDescription(): string\n {\n return static::$description;\n }", "function GetAdminDescription()\n {\n return $this->Lang('moddescription');\n }", "function settings_section() {\n\t\t}", "function __tinypass_section_head_alt( $text = '' ) {\n\t?>\n\n\t<div class=\"tp-section-header\">\n\t\t<?php echo $text ?>\n\t</div>\n\n<?php }", "Public function displayInfo(){ \r\n\t\t\techo \"The info about the dress.\"; \r\n\t\t\techo $this->color; \r\n\t\t\techo $this->fabric ; \r\n\t\t\techo $this->design;\r\n\t\t\techo self::MEDIUM;\r\n\t\t}", "public static function getDescription(): string\n {\n return static::$description;\n }", "function payment_fields()\n {\n if ($this->description) {\n echo wpautop(wptexturize($this->description));\n }\n }", "function write_setting($data) {\n return '';\n }", "public function getDescription()\n {\n return 'Developer at Afrihost. Design Patterns acolyte. Dangerous sysadmin using \\'DevOps\\' as an excuse. I like '.\n 'long walks on the beach and craft beer.';\n }", "public function get_description()\n {\n if ( isset($this->description) )\n return $this->description;\n\n return \"Defines the {$this->name}\";\n }", "public static function settings_page() {\r\n\t\treturn '';\r\n\t}", "public function it_shows_defined_settings_section_with_title_description()\n {\n // configure\n config(['app_settings.sections' => [\n 'app' => [\n 'title' => 'General Settings',\n 'descriptions' => 'Application general settings.',\n 'icon' => 'fa fa-cog'\n ]\n ]\n ]);\n\n // assert\n $this->get('/settings')\n ->assertStatus(200)\n ->assertSee('General Settings')\n ->assertSee('Application general settings.')\n ->assertSee('fa fa-cog');\n }", "function sailthru_scout_options_callback() {\n\techo '<p>Scout is an on-site tool that displays relevant content to users when viewing a particular page.</p>';\n}", "function globalvariable($name, $tooltiptext, $first = false){\n if(!$first){ echo \", \";}\n $tooltiptext = str_replace(\"*\", \" (for debugging purposes)\", $tooltiptext);\n echo '<SPAN TITLE=\"' . $tooltiptext . '\">%' . $name . \"%</SPAN>\";\n}", "function payment_fields() {\n\t\t\tif ($this->description) echo wpautop(wptexturize($this->description));\n\t\t}", "function payment_fields() {\n\t\t\tif ($this->description) echo wpautop(wptexturize($this->description));\n\t\t}", "function payment_fields() {\r\n if ($this->description) {\r\n echo wpautop(wptexturize($this->description));\r\n }\r\n }", "function wpcron_display_settings_page() {\n\n\t// check if user is allowed access\n\tif ( ! current_user_can( 'manage_options' ) ) return;\n\n\t?>\n\n\t<div class=\"wrap\">\n\n\t\t<h1><?php echo esc_html( get_admin_page_title() ); ?></h1>\n\n\t\t<?php echo wpcron_log(); ?>\n\n\t</div>\n\n<?php\n\n}", "function showSettings() {\n global $objTemplate,$_ARRAYLANG;\n $template = new \\Cx\\Core\\Html\\Sigma();\n $objTemplate->addBlockfile('ADMIN_CONTENT', 'settings_system', 'settings.html');\n $templateObj = new \\Cx\\Core\\Html\\Sigma(ASCMS_CORE_PATH . '/Config/View/Template/Backend');\n $templateObj->loadTemplateFile('development_tools.html');\n $templateObj->setVariable(array(\n 'TXT_TITLE_SET5' => $_ARRAYLANG['TXT_SETTINGS_TITLE_DEVELOPMENT'],\n 'TXT_DEBUGGING_STATUS' => $_ARRAYLANG['TXT_DEBUGGING_STATUS'],\n 'TXT_DEBUGGING_FLAGS' => $_ARRAYLANG['TXT_DEBUGGING_FLAGS'],\n 'TXT_SETTINGS_DEBUGGING_FLAG_LOG' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_LOG'],\n 'TXT_SETTINGS_DEBUGGING_FLAG_PHP' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_PHP'],\n 'TXT_SETTINGS_DEBUGGING_FLAG_DB' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_DB'],\n 'TXT_SETTINGS_DEBUGGING_FLAG_DB_TRACE' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_DB_TRACE'],\n 'TXT_SETTINGS_DEBUGGING_FLAG_DB_CHANGE' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_DB_CHANGE'],\n 'TXT_SETTINGS_DEBUGGING_FLAG_DB_ERROR' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_DB_ERROR'],\n 'TXT_SETTINGS_DEBUGGING_FLAG_LOG_FILE' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_LOG_FILE'],\n 'TXT_SETTINGS_DEBUGGING_FLAG_LOG_FIREPHP' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_LOG_FIREPHP'],\n 'TXT_DEBUGGING_EXPLANATION' => $_ARRAYLANG['TXT_DEBUGGING_EXPLANATION'],\n 'TXT_SAVE_CHANGES' => $_ARRAYLANG['TXT_SAVE'],\n 'TXT_RADIO_ON' => $_ARRAYLANG['TXT_ACTIVATED'],\n 'TXT_RADIO_OFF' => $_ARRAYLANG['TXT_DEACTIVATED']\n ));\n if (in_array('SystemInfo', \\Env::get('cx')->getLicense()->getLegalComponentsList())) {\n if (isset($_POST['debugging'])) {\n $this->updateDebugSettings($_POST['debugging']);\n }\n $this->setDebuggingVariables($templateObj);\n }\n \\Cx\\Core\\Setting\\Controller\\Setting::init('Config', null, 'Yaml', null, \\Cx\\Core\\Setting\\Controller\\Setting::REPOPULATE);\n \\Cx\\Core\\Setting\\Controller\\Setting::storeFromPost();\n \n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'site');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n $_ARRAYLANG['TXT_CORE_CONFIG_SITE'],\n $_ARRAYLANG['TXT_CORE_CONFIG_SITE'],\n 'TXT_CORE_CONFIG_',\n !$this->isWritable()\n );\n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'contactInformation');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n $_ARRAYLANG['TXT_CORE_CONFIG_CONTACTINFORMATION'],\n $_ARRAYLANG['TXT_CORE_CONFIG_CONTACTINFORMATION'],\n 'TXT_CORE_CONFIG_',\n !$this->isWritable()\n );\n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'administrationArea');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n $_ARRAYLANG['TXT_CORE_CONFIG_ADMINISTRATIONAREA'], \n $_ARRAYLANG['TXT_CORE_CONFIG_ADMINISTRATIONAREA'], \n 'TXT_CORE_CONFIG_',\n !$this->isWritable()\n );\n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'security');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n $_ARRAYLANG['TXT_CORE_CONFIG_SECURITY'],\n $_ARRAYLANG['TXT_CORE_CONFIG_SECURITY'],\n 'TXT_CORE_CONFIG_',\n !$this->isWritable()\n );\n if (in_array('SystemInfo', \\Env::get('cx')->getLicense()->getLegalComponentsList())) {\n \\Cx\\Core\\Setting\\Controller\\Setting::show_external(\n $template,\n $_ARRAYLANG['TXT_SETTINGS_TITLE_DEVELOPMENT'],\n $templateObj->get()\n );\n }\n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'otherConfigurations');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n $_ARRAYLANG['TXT_CORE_CONFIG_OTHERCONFIGURATIONS'],\n $_ARRAYLANG['TXT_CORE_CONFIG_OTHERCONFIGURATIONS'],\n 'TXT_CORE_CONFIG_',\n !$this->isWritable()\n );\n\n\n // show also hidden settins\n if ( in_array('SystemInfo', \\Env::get('cx')->getLicense()->getLegalComponentsList())\n && \\Permission::hasAllAccess()\n && isset($_GET['all'])\n ) {\n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'core');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n 'CORE',\n 'CORE', \n 'TXT_CORE_CONFIG_',\n true\n );\n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'release');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n 'RELEASE',\n 'RELEASE',\n 'TXT_CORE_CONFIG_',\n true\n );\n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'component');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n 'COMPONENT',\n 'COMPONENT',\n 'TXT_CORE_CONFIG_',\n !$this->isWritable()\n );\n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'license');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n 'LICENSE', \n 'LICENSE', \n 'TXT_CORE_CONFIG_',\n true\n );\n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'cache');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n 'CACHE', \n 'CACHE', \n 'TXT_CORE_CONFIG_',\n true\n );\n }\n $this->checkFtpAccess();\n $objTemplate->setVariable('SETTINGS_TABLE', $template->get());\n $objTemplate->parse('settings_system');\n }", "function theme_tvchat_admin_page($flags, $default_flags) \n{\n $output = '<p>' . t('TV Chat 프로그램에 대한 각종 설정을 관리합니다.').'</p>';\n\n $output .= drupal_get_form( 'tvchat_config_form');\n return $output;\n}", "public function getDescription(): string\n {\n return (string)($this->config['description'] ?? '');\n }", "function saju_jukebox_echo_section_top() {\n\n\t_e( 'Configure the general settings for the Jukebox', SAJU_LANGUAGE_DOMAIN );\n\n}", "function description($element)\n\t\t{\n\t\t\t$output = '<div class=\"ace_description\">';\n\t\t\t$output .= $element['desc'];\n\t\t\t$output .= '</div>'; // <!--end ace_description-->\n\t\t\t$output .= '<div class=\"ace_control\">';\n\t\t\treturn $output;\t\t\n\t\t}", "function get_description() \t{\n \t\treturn $this->description;\n \t}", "public function get_default_additional_content()\n {\n\n return __('Thanks for reading.', 'subscriptio');\n }", "public function payment_fields(){\r\n if($this->description) echo wpautop(wptexturize($this->description));\r\n }" ]
[ "0.7822036", "0.7110753", "0.70156485", "0.7004875", "0.6932806", "0.68559355", "0.68168366", "0.676708", "0.6725137", "0.66631156", "0.6641322", "0.6608141", "0.6587587", "0.6520855", "0.6489685", "0.6480666", "0.64625883", "0.64625883", "0.64625883", "0.64509535", "0.6445081", "0.6429613", "0.6415172", "0.6395204", "0.63902694", "0.63834625", "0.6369809", "0.63696355", "0.6359621", "0.63583094", "0.63508934", "0.63473594", "0.6340214", "0.63201714", "0.63071126", "0.6266359", "0.62296903", "0.62245035", "0.6217209", "0.6212662", "0.6208219", "0.62067235", "0.6201588", "0.6200309", "0.6170441", "0.6169514", "0.6165873", "0.6163935", "0.6162608", "0.6162361", "0.6159797", "0.6156977", "0.61532813", "0.6146129", "0.6141548", "0.61277103", "0.61214805", "0.6117938", "0.6116366", "0.6095345", "0.6093833", "0.6086988", "0.6085443", "0.60828197", "0.6075417", "0.60752785", "0.60730046", "0.60689545", "0.60671145", "0.60609764", "0.60495526", "0.60465807", "0.60458356", "0.60414284", "0.6022377", "0.60205203", "0.6015309", "0.6009071", "0.60061485", "0.600254", "0.599327", "0.59910595", "0.59897995", "0.59863555", "0.59852654", "0.59759957", "0.597532", "0.59603846", "0.5958687", "0.5958687", "0.59524316", "0.59504616", "0.59451663", "0.5944964", "0.5942104", "0.59405524", "0.59378725", "0.59354264", "0.5935163", "0.5933433" ]
0.6914259
5
config pour le site
public function details_entrepot_site($id) { $entrepot = Entrepot::findOrFail($id); $entrepot_similaire = Entrepot::where('id', '!=', $id) ->where('status', 1) ->take(8) ->get(); $nb_entr = $entrepot_similaire->count(); return view('site.entrepot.details', ['entrepot' => $entrepot]) ->with(['nb_entr' => $nb_entr]) ->with(['entrepot_similaire' => $entrepot_similaire]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function config();", "public function config()\n {\n }", "private function getConfig() {\n // call the GetConfig API\n $args = array('hostname' => $this->hostname);\n $api = new \\xmlAPI('GetConfig', $this->_default_key, 'xml', $args);\n $api->server_url = $this->_default_server;\n $api->send();\n\n // change hostname if found by custom_name\n $this->hostname = $api->hostname;\n \n // save fields in metadata\n $this->key = $api->api_key ? $api->api_key : $this->_default_key;\n $this->server = $api->api_server ? $api->api_server : $this->_default_server;\n $this->controller_path = $api->controller_path;\n $this->controller = $api->controller;\n $this->error_page = $api->error_page ? $api->error_page : '404';\n $this->mode = $api->mode ? $api->mode : 'test';\n $this->site_path = $api->site_path ? $api->site_path : $this->hostname;\n $this->default_site_path = $api->default_site_path;\n $this->secure_domain = $api->secure_domain;\n \n // set the list of controllers this site can use\n $this->setRights($api->row);\n }", "function site_url(){\n\treturn config( 'site.url' );\n}", "public static function config() {\n require_once( 'includes/widget-config.php' );\n }", "abstract public function getConfig();", "public function configuracion()\n {\n $usuarioDato = new UsuarioDatoEntity();\n $usuarioDato->buscarPorPk($this->_userdata->idUser());\n\n $tarifa = new TarifasModel();\n\n $this->_view->_tarifas = $tarifa->getAll();\n\n $this->_view->_social = $usuarioDato;\n $this->_view->paneltitle = \"Configura tu cuenta\";\n $this->_view->titulo = $this->_view->getConfigure()->title;\n $this->_view->meta_descripcion = \"Sistema Perreras\";\n $this->_view->titulo_page = \"Panel principal\";\n $this->_view->renderizar(\"configuracion\", 'index');\n }", "public function frontend_configuration()\n {\n if ($this->session->userdata('logged_in') == 1 && $this->session->userdata('user_type') != 'Admin') {\n redirect('home/login_page', 'location');\n }\n \n $data['body'] = \"admin/config/frontend_config\";\n $data['time_zone'] = $this->_time_zone_list(); \n $data['language_info'] = $this->_language_list();\n $data['page_title'] = $this->lang->line('front-end settings');\n $this->_viewcontroller($data);\n }", "public function config_page() {\n\t\trequire HS_DOCS_API_DIR_PATH . 'admin/views/admin-page.php';\n\t}", "public function configuration()\n {\n if ($this->session->userdata('logged_in') == 1 && $this->session->userdata('user_type') != 'Admin') {\n redirect('home/login_page', 'location');\n }\n \n $data['body'] = \"admin/config/edit_config\";\n $data['time_zone'] = $this->_time_zone_list(); \n $data['language_info'] = $this->_language_list();\n $data[\"themes\"] = $this->_theme_list();\n $data['page_title'] = $this->lang->line('general settings');\n $this->_viewcontroller($data);\n }", "abstract protected function getConfig();", "function DBConfiguraion()\n\t{\n\t\tglobal $dbhost,$dbmain,$dbuser,$dbpwd;//these variables comes from \"mainconfig.php\" which is in www folder\n\t\t//print\"$dbmain,$dbuser,$dbpwd\";\n\t\t//initialize the database_server\n\t\t$this->database_server = $dbhost;\n\t\t//initialize the database_password \n\t\t$this->database_password = $dbpwd;\n\t\t//initialize the database_user \n\t\t$this->database_user = $dbuser;\n\t\t//initialize the database_name \n\t\t$this->database_name = $dbmain;\n\t}", "public function index() {\n\t\t$this->config->load('config');\n\t}", "private function init_config() {\n set_config('siteadmins', '');\n set_config('siteguest', '');\n set_config('defaultuserroleid', '');\n set_config('defaultfrontpageroleid', '');\n }", "static function set_config() {\n\t\tif ( file_exists( self::childpath() . 'config/wpgrade-config' . EXT ) ) {\n\t\t\tself::$configuration = include self::childpath() . 'config/wpgrade-config' . EXT;\n\t\t} elseif ( file_exists( self::themepath() . 'config/wpgrade-config' . EXT ) ) {\n\t\t\tself::$configuration = include self::themepath() . 'config/wpgrade-config' . EXT;\n\t\t} elseif ( file_exists( self::childpath() . 'wpgrade-config' . EXT ) ) {\n\t\t\tself::$configuration = include self::childpath() . 'wpgrade-config' . EXT;\n\t\t} elseif ( file_exists( self::themepath() . 'wpgrade-config' . EXT ) ) {\n\t\t\tself::$configuration = include self::themepath() . 'wpgrade-config' . EXT;\n\t\t}\n\t}", "public function config()\n\t{\n\t\tparent::config();\n\n\t\t// change inpu\n\t\tif(self::done_step('username'))\n\t\t{\n\t\t\t// if user go to this page from username page\n\t\t\t$this->data->mobile_username = 'eusername';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// if user go to this page from mobile page\n\t\t\t$this->data->mobile_username = 'emobile';\n\t\t}\n\n\t\t// load temp username in username field\n\t\tif(self::get_session('username', 'temp_username'))\n\t\t{\n\t\t\t$this->data->get_username = self::get_session('username', 'temp_username');\n\t\t}\n\n\t\t$this->data->page['title'] = T_('Password');\n\t\t$this->data->page['desc'] = T_('Please enter password to enter');\n\n\t\tswitch (\\lib\\router::get_url(1))\n\t\t{\n\t\t\tcase 'recovery':\n\t\t\t\t$this->data->page['title'] = T_('Recovery Password');\n\t\t\t\t$this->data->page['desc'] = T_('If forget your password, Please enter new password. after pass verification your new password is usable.');\n\t\t\t\tbreak;\n\n\t\t\tcase 'signup':\n\t\t\tcase 'set':\n\t\t\t\t$this->data->page['title'] = T_('Set Password');\n\t\t\t\t$this->data->page['desc'] = T_('Please set your password to secure signup.'). ' '. T_('Next time we only need your mobile and this password to enter');\n\t\t\t\tbreak;\n\n\t\t\tcase 'change':\n\t\t\t\t$this->data->page['title'] = T_('Change to new Password');\n\t\t\t\t$this->data->page['desc'] = T_('Please set your old and new password to change it');\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function localConfig();", "public static function config() {\n //require_once( 'widget-config.php' );\n require_once get_stylesheet_directory() . '/inc/templates/statistics_widget_config.php';\n }", "public function getConfig() {\r\n\r\n\t}", "public function configs() {\n\n\t\t// Recommend plugins\n\t\trequire_once( WPEX_FRAMEWORK_DIR .'config/tgm-plugin-activation-config.php' );\n\n\t\t// Post Series\n\t\tif ( get_theme_mod( 'post_series_enable', true ) ) {\n\t\t\trequire_once( WPEX_FRAMEWORK_DIR .'post-series/post-series-config.php' );\n\t\t}\n\n\t\t// Portfolio config\n\t\tif ( WPEX_PORTFOLIO_IS_ACTIVE ) {\n\t\t\trequire_once( WPEX_FRAMEWORK_DIR .'portfolio/portfolio-config.php' );\n\t\t}\n\n\t\t// Staff config\n\t\tif ( WPEX_STAFF_IS_ACTIVE ) {\n\t\t\trequire_once( WPEX_FRAMEWORK_DIR .'staff/staff-config.php' );\n\t\t}\n\n\t\t// Testimonials config\n\t\tif ( WPEX_TESTIMONIALS_IS_ACTIVE ) {\n\t\t\trequire_once( WPEX_FRAMEWORK_DIR .'testimonials/testimonials-config.php' );\n\t\t}\n\n\t\t// WooCommerce config\n\t\tif ( WPEX_WOOCOMMERCE_ACTIVE ) {\n\n\t\t\t// WooCommerce core tweaks\n\t\t\trequire_once( WPEX_FRAMEWORK_DIR .'woocommerce/woocommerce-config.php' );\n\n\t\t}\n\n\t\t// Visual composer config\n\t\tif ( WPEX_VC_ACTIVE ) {\n\t\t\trequire_once( WPEX_FRAMEWORK_DIR .'visual-composer/visual-composer-config.php' );\n\t\t}\n\n\t\t// Tribe events config\n\t\tif ( WPEX_TRIBE_EVENTS_CALENDAR_ACTIVE ) {\n\t\t\trequire_once( WPEX_FRAMEWORK_DIR .'config/tribe-events-config.php' );\n\t\t}\n\n\t\t// Revolution slider config\n\t\tif ( WPEX_REV_SLIDER_ACTIVE ) {\n\t\t\trequire_once( WPEX_FRAMEWORK_DIR .'config/revslider-config.php' );\n\t\t}\n\n\t\t// WPML Config\n\t\tif ( WPEX_WPML_ACTIVE ) {\n\t\t\trequire_once( WPEX_FRAMEWORK_DIR .'config/wpml-config.php' );\n\t\t}\n\n\t\t// Polylang Config\n\t\tif ( class_exists( 'Polylang' ) ) {\n\t\t\trequire_once( WPEX_FRAMEWORK_DIR .'config/polylang-config.php' );\n\t\t}\n\n\t}", "function configure() {\n // * You can add a layout, a layout is just a .phtml file that represents\n // the site template.\n Yasc_App::config()->setLayoutScript(dirname(__FILE__) . \"/layouts/default.phtml\");\n \n // * If you want to use a stream wrapper to convert markup of mostly-PHP \n // templates into PHP prior to include(), seems like is a little bit slow,\n // so by default is off.\n // ->setViewStream(true);\n // \n // * You can add more than one folder to store views, each view script\n // is a .phtml file.\n // ->addViewsPath(dirname(__FILE__) . \"/extra_views\");\n // \n // * You can add more than one path of view helpers and set a\n // class prefix for the path added.\n // ->addViewHelpersPath(dirname(__FILE__) . \"/../library/My/View/Helper\", \"My_View_Helper\");\n // \n // or if you don't want a class prefix just leave it blank.\n // ->addViewHelpersPath(dirname(__FILE__) . \"/extra_views/helpers\");\n //\n // * Function helpers, second argument is a prefix class.\n // ->addFunctionHelpersPath(dirname(__FILE__) . \"/extra_function_helpers\");\n // \n // * Add models folder, second argument is a prefix class.\n // ->addModelsPath(dirname(__FILE__) . \"/models\");\n // ->addModelsPath(dirname(__FILE__) . \"/extra_models/My/Model\", \"My_Model\");\n // \n // * Add extra options to the configuration object, like some $mysql connection \n // resource or a global flag, etc.\n // ->addOption(\"db\", $mysql);\n}", "function smartrecruiters_config(){\r\n\t\t\r\n\t\t$is_connected = get_option('sr_connected');\r\n\t\t\r\n\t\tif($is_connected){\r\n\t\t\t//aplikacja juz polaczona, trzeba pokazac mozliwosc odlaczenia\r\n\t\t\t\r\n\t\t\t//jesli kliknieto disconnect\r\n\t\t\tif(isset($_POST['sr_disconnect']) && $_POST['sr_disconnect']){\r\n\t\t\t\t\t//rozlaczyc i odswiezyc strone zeby pokazac formularz logowania\r\n\t\t\t\t\tupdate_option('sr_connected', 0);\r\n\t\t\t\t\tupdate_option('sr_company', null);\r\n\t\t\t\t\t$location = 'http://'.$_SERVER[\"SERVER_NAME\"].$_SERVER[\"REQUEST_URI\"];\r\n\t\t\t\t\techo '<script>window.location = \"'.$location.'\";</script>';\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//pobieramy joby zeby meic departmenty i lokacje\r\n\t\t\t$company_name = get_option('srcompany');\r\n\t\t\t$url = 'https://www.smartrecruiters.com/cgi-bin/WebObjects/share.woa/wa/careersite?wpp_company='.$company_name;\r\n\t\t\r\n\t\t\t//pobieramy joby\r\n\t\t\t$get_jobs = @file_get_contents($url);\r\n\t\t\t$xml = @simplexml_load_string($get_jobs, 'SimpleXMLElement', LIBXML_NOCDATA);\r\n\t\t\t$jobs = json_decode(json_encode($xml), true);\r\n\r\n if( isset($_POST['template']) ){\r\n update_option('sr_jobDetailsPageTemplate', esc_attr($_POST['template']) );\r\n }\r\n $available_templates = get_page_templates();\r\n $active_template = get_option('sr_jobDetailsPageTemplate');\r\n\r\n\t\t\t//widok konfigurancji i odlaczania\r\n\t\t\tinclude('configure.php');\r\n\t\t\r\n\t\t}else{\r\n\t\t\t\r\n\t\t\tif(!empty($_GET['srcompany']) && $_GET['srcompany']){\r\n\t\t\t\tupdate_option('sr_connected', 1);\r\n\t\t\t\tupdate_option('srcompany', $_GET['srcompany']);\r\n\t\t\t\t$location = 'http://'.$_SERVER[\"SERVER_NAME\"].$_SERVER[\"REQUEST_URI\"];\r\n\t\t\t\techo '<script>window.location = \"'.$location.'\";</script>';\r\n\t\t\t}\r\n\r\n\t\t\t//widok laczenia/logowania\r\n\t\t\tinclude('connect.php');\r\n\t\t}\r\n\t}", "public function SiteConfig() {\n\t\treturn SiteConfig::current_site_config();\t\n\t}", "public function run()\n {\n\n $options = [\n [\n 'name' => 'title',\n 'value' => 'shcms',\n 'title' => '网站标题',\n ],\n [\n 'name' => 'author',\n 'value' => 'shellus',\n 'title' => '作者',\n ],\n [\n 'name' => 'Copyright',\n 'value' => 'Copyright',\n 'title' => '版权文字',\n ],\n [\n 'name' => 'keywords',\n 'value' => '黄色网站,无毒的黄色网站,免费的黄色网站,最有情怀的黄色网站',\n 'title' => '网站关键词',\n ],\n [\n 'name' => 'description',\n 'value' => '很明显,这是一个黄色网站无疑。。',\n 'title' => '网站介绍',\n ],\n ];\n foreach($options as $option){\n \\App\\Model\\Config::create($option);\n }\n }", "public function network_config_page() {\n\t\trequire_once WPSEO_PATH . 'admin/pages/network.php';\n\t}", "public function __construct()\n\t{\n\t\t//GSMS::$config =& get_config();\n\t\tGSMS::$class['system_log']->log('debug', \"Config Class Initialized\");\n\n\t\t// Set the base_url automatically if none was provided\n\t\tif (GSMS::$config['base_url'] == '')\n\t\t{\n\t\t\tif (isset($_SERVER['HTTP_HOST']))\n\t\t\t{\n\t\t\t\t$base_url = isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off' ? 'https' : 'http';\n\t\t\t\t$base_url .= '://'. $_SERVER['HTTP_HOST'];\n\t\t\t\t$base_url .= str_replace(basename($_SERVER['SCRIPT_NAME']), '', $_SERVER['SCRIPT_NAME']);\n\t\t\t}\n\n\t\t\telse\n\t\t\t{\n\t\t\t\t$base_url = 'http://localhost/';\n\t\t\t}\n\t\t\tGSMS::$siteURL=$base_url;\n\t\t\t$this->set_item('base_url', $base_url);\n\t\t\t\n\t\t}\n\t}", "public function menuConfig() {}", "public function menuConfig() {}", "public function menuConfig() {}", "public function menuConfig() {}", "public function menuConfig() {}", "public function menuConfig() {}", "protected function loadConfig() {\n $json = new JSON();\n $viewConfig = $json->readFile(__SITE_PATH . \"\\\\config\\\\view.json\");\n $this->meta_info = $viewConfig['meta'];\n $this->js_files = $viewConfig['javascript'];\n $this->css_files = $viewConfig['css'];\n }", "function LoadConfiguration()\r\n\t{\r\n\t\t$cinfFilePath = Site::GetConfigFilePath ();\r\n\t\t$config = simplexml_load_file ( $cinfFilePath );\r\n\t\t\r\n\t\t// load languages\r\n\t\tif (isset ( $config->languages ))\r\n\t\t{\r\n\t\t\t$langs = ( array ) $config->languages;\r\n\t\t\t$langsA = $langs ['language'];\r\n\t\t\t\r\n\t\t\tif (! is_array ( $langsA ))\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\t$linkID = ( string ) $langsA->linkID;\r\n\t\t\t\t$linkName = ( string ) $langsA->linkName;\r\n\t\t\t\t$this->m_languages [$linkID] = $linkName;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tforeach ( $langsA as $lang )\r\n\t\t\t\t{\r\n\t\t\t\t\t$linkID = ( string ) $lang->linkID;\r\n\t\t\t\t\t$linkName = ( string ) $lang->linkName;\r\n\t\t\t\t\t\r\n\t\t\t\t\t$this->m_languages [$linkID] = $linkName;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$langKes = array_keys ( $this->m_languages );\r\n\t\t\t$this->m_languageDefault = $langKes [0];\r\n\t\t}\r\n\t\t\r\n\t\t// load templates\r\n\t\tif (isset ( $config->templates ))\r\n\t\t{\r\n\t\t\t$templates = ( array ) $config->templates;\r\n\t\t\t$langsA = $templates ['template'];\r\n\t\t\t\r\n\t\t\tif (! is_array ( $langsA ))\r\n\t\t\t{\r\n\t\t\t\t$this->m_templates = null;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$this->m_templates = array ();\r\n\t\t\t\t\r\n\t\t\t\tforeach ( $langsA as $lang )\r\n\t\t\t\t{\r\n\t\t\t\t\t$fileName = ( string ) $lang;\r\n\t\t\t\t\tarray_push ( $this->m_templates, $fileName );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// load siteURL\r\n\t\tif (isset ( $config->url ))\r\n\t\t{\r\n\t\t\t$this->m_URL = ( string ) $config->url;\r\n\t\t\t$this->m_URL = trim ( $this->m_URL );\r\n\t\t}\r\n\t\t\r\n\t\t// load siteURL\r\n\t\tif (isset ( $config->maxImageWidth ))\r\n\t\t{\r\n\t\t\t$this->m_maxImageWidth = ( int ) $config->maxImageWidth;\r\n\t\t}\r\n\t\t\r\n\t\t// secuirity-file root\r\n\t\tif (isset ( $config->securFolder ))\r\n\t\t{\r\n\t\t\t$this->m_sfRoot = ( string ) $config->securFolder;\r\n\t\t\t$this->m_sfRoot = trim ( $this->m_sfRoot );\r\n\t\t}\r\n\t\t\r\n\t\t// boxes\r\n\t\tif (isset ( $config->boxes ))\r\n\t\t{\r\n\t\t\t$boxes = ( array ) $config->boxes;\r\n\t\t\t$boxes = $boxes ['box'];\r\n\t\t\tif (! is_array ( $boxes ))\r\n\t\t\t{\r\n\t\t\t\t$this->m_boxes = array ($boxes );\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$this->m_boxes = $boxes;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// product image root\r\n\t\tif (isset ( $config->productImageRoot ))\r\n\t\t{\r\n\t\t\t$str = ( string ) $config->productImageRoot;\r\n\t\t\t$this->m_prodImagRoot = trim ( $str );\r\n\t\t}\r\n\t\t\r\n\t\t// product image root\r\n\t\tif (isset ( $config->galleryRoot ))\r\n\t\t{\r\n\t\t\t$str = ( string ) $config->galleryRoot;\r\n\t\t\t$this->m_galleryImageRoot = trim ( $str );\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}", "private function _retrievePagSeguroConfiguration(){\n \n // retrieving configurated default charset\n PagSeguroConfig::setApplicationCharset(Configuration::get('PAGSEGURO_CHARSET'));\n \n // retrieving configurated default log info\n $log_active = Configuration::get('PAGSEGURO_LOG_ACTIVE');\n if ($log_active)\n PagSeguroConfig::activeLog(_PS_ROOT_DIR_.Configuration::get('PAGSEGURO_LOG_FILELOCATION'));\n\n }", "function getConfiguration() ;", "private function configure_site() {\n\n\t\t$site_conf_dir = $this->site_root . '/config';\n\t\t$site_docker_yml = $this->site_root . '/docker-compose.yml';\n\t\t$site_conf_env = $this->site_root . '/.env';\n\t\t$site_nginx_default_conf = $site_conf_dir . '/nginx/default.conf';\n\t\t$site_php_ini = $site_conf_dir . '/php-fpm/php.ini';\n\t\t$server_name = ( 'wpsubdom' === $this->site_type ) ? \"$this->site_name *.$this->site_name\" : $this->site_name;\n\t\t$process_user = posix_getpwuid( posix_geteuid() );\n\n\t\tEE::log( \"Creating WordPress site $this->site_name.\" );\n\t\tEE::log( 'Copying configuration files.' );\n\n\t\t$filter = array();\n\t\t$filter[] = $this->site_type;\n\t\t$filter[] = $this->cache_type;\n\t\t$filter[] = $this->le;\n\t\t$filter[] = $this->db_host;\n\t\t$site_docker = new Site_Docker();\n\t\t$docker_compose_content = $site_docker->generate_docker_compose_yml( $filter );\n\t\t$default_conf_content = $this->generate_default_conf( $this->site_type, $this->cache_type, $server_name );\n\t\t$local = ( 'db' === $this->db_host ) ? true : false;\n\t\t$env_data = [\n\t\t\t'local' => $local,\n\t\t\t'virtual_host' => $this->site_name,\n\t\t\t'root_password' => $this->db_root_pass,\n\t\t\t'database_name' => $this->db_name,\n\t\t\t'database_user' => $this->db_user,\n\t\t\t'user_password' => $this->db_pass,\n\t\t\t'wp_db_host' => \"$this->db_host:$this->db_port\",\n\t\t\t'wp_db_user' => $this->db_user,\n\t\t\t'wp_db_name' => $this->db_name,\n\t\t\t'wp_db_pass' => $this->db_pass,\n\t\t\t'user_id' => $process_user['uid'],\n\t\t\t'group_id' => $process_user['gid'],\n\t\t];\n\t\t$env_content = \\EE\\Utils\\mustache_render( SITE_TEMPLATE_ROOT . '/config/.env.mustache', $env_data );\n\t\t$php_ini_content = \\EE\\Utils\\mustache_render( SITE_TEMPLATE_ROOT . '/config/php-fpm/php.ini.mustache', [] );\n\n\t\ttry {\n\t\t\tif ( ! ( file_put_contents( $site_docker_yml, $docker_compose_content )\n\t\t\t\t&& file_put_contents( $site_conf_env, $env_content )\n\t\t\t\t&& mkdir( $site_conf_dir )\n\t\t\t\t&& mkdir( $site_conf_dir . '/nginx' )\n\t\t\t\t&& file_put_contents( $site_nginx_default_conf, $default_conf_content )\n\t\t\t\t&& mkdir( $site_conf_dir . '/php-fpm' )\n\t\t\t\t&& file_put_contents( $site_php_ini, $php_ini_content ) ) ) {\n\t\t\t\tthrow new Exception( 'Could not copy configuration files.' );\n\t\t\t}\n\t\t\tEE::success( 'Configuration files copied.' );\n\t\t}\n\t\tcatch ( Exception $e ) {\n\t\t\t$this->catch_clean( $e );\n\t\t}\n\t}", "protected function setBase()\n {\n $this->addData([\n \"site\" => [\n \"header\" => $this->header(),\n \"footer\" => $this->footer(),\n \"menus\" => $this->menus(),\n\n \"page_title\" => config(\"site_name\"),\n\n \"url\" => config(\"base_uri\"),\n \"name\" => config(\"site_name\"),\n \"language\" => \"fr-FR\",\n \"charset\" => \"UTF-8\",\n \"body_class\" => [],\n ],\n ]);\n }", "private function setPagSeguroConfig()\n {\n $activeLog = $this->getConfigData('log');\n $charset = $this->getConfigData('charset');\n\n //Module version\n PagSeguroLibrary::setModuleVersion('magento' . ':' . Mage::helper('pagseguro')->getVersion());\n\n //CMS version\n PagSeguroLibrary::setCMSVersion('magento' . ':' . Mage::getVersion());\n\n //Setup Charset\n if ($charset != null and !empty($charset)) {\n PagSeguroConfig::setApplicationCharset($charset);\n }\n\n //Setup Log\n if ($activeLog == 1) {\n $logFile = $this->getConfigData('log_file');\n\n if (self::checkFile(Mage::getBaseDir() . '/' . $logFile)) {\n PagSeguroConfig::activeLog(Mage::getBaseDir() . '/' . $logFile);\n } else {\n PagSeguroConfig::activeLog(); //Default Log\n }\n }\n }", "public static function getConfig()\n {\n }", "protected function initConfiguration(){\n $settings = array(\n 'user' => 'bitshok',\n 'widget_id' => '355763562850942976',\n 'tweets_limit' => 3,\n 'follow_btn' => 'on'\n );\n Configuration::updateValue($this->name.'_settings', serialize($settings));\n }", "protected function _config(){\n parent::_config();\n Raxan::loadLangFile(\"info-module\");\n $this->mnuItem = \"RQHIST\";\n }", "public function getConfig() {}", "public function initConfig() {\r\n\t$config = array();\r\n\tinclude($this->name . '/config.php');\r\n\t\\app::$config = array_merge(\\app::$config, $config);\r\n }", "protected function setupConfig()\n\t{\n\t\t$this->config = OLPBlackbox_Config::getInstance();\n\t\t$site_config = SiteConfig::getInstance()->asObject();\n\n\t\t//Add site config data to the OLPBlackbox_Config\n\t\tforeach ($site_config as $key => $value)\n\t\t{\n\t\t\t$this->config->$key = $value;\n\t\t}\n\n\t\t$this->config->blackbox_mode = $this->mode;\n\t\t$this->config->debug = new OLPBlackbox_DebugConf();\n\t\t$this->config->title_loan = $this->config_data->title_loan;\n\t\t$this->config->olp_db = $this->config_data->sql;\n\t\t$this->config->event_log = $this->config_data->log;\n\t\t$this->config->session = $this->config_data->session;\n\t\t$this->config->allowSnapshot = TRUE;\n\t\t$this->config->allow_datax_rework = $this->config_data->config->enable_rework;\n\t\t$this->config->do_datax_rework = !empty($_SESSION['do_datax_rework']);\n\t\t$this->config->return_visitor = !empty($_SESSION['return_visitor']);\n\t\t$this->config->track_key = $_SESSION['statpro']['track_key'];\n\t\t$this->config->space_key = $_SESSION['statpro']['space_key'];\n\t\t$this->config->hit_stats_bb = defined('STAT_SYSTEM_2') ? STAT_SYSTEM_2 : FALSE;\n\t\t$this->config->hit_stats_site = TRUE;\n\n\t\t// whether we're on the enterprise site; the actual\n\t\t// enterprise company is available via bb_force_winner?\n\t\t$this->config->is_enterprise = $this->config_data->is_enterprise;\n\t\t$this->config->react_company = $this->getReactCompany();\n\n\t\t$this->config->applog = OLP_Applog_Singleton::Get_Instance(\n\t\t\t'blackbox',\n\t\t\t1000000000,\n\t\t\t20,\n\t\t\tNULL,\n\t\t\tFALSE,\n\t\t\t002\n\t\t);\n\t}", "public function defaultConfig();", "function SM_config($file, $tryCache=true) {\n\n // configure\n $this->_smoConfigure();\n\n // load the config file\n $this->loadSite($file, $tryCache);\n \n }", "function admin_configuration()\n{\n global $app;\n\n $app->render('admin_configuration.html', [\n 'page' => mkPage(getMessageString('admin'), 0, 2),\n 'mailers' => mkMailers(),\n 'ttss' => mkTitleTimeSortOptions(),\n 'isadmin' => is_admin()]);\n}", "public function cfg_setup()\n\t{\n\t\t$this->cfg = AppConfig::get()[\"app\"];\n\t\t$this->cfg[\"app_name\"] = $this->cfg[\"name\"];\n\n\t}", "private function configure() {\n\t\t$statement = $this -> database -> query(\"SELECT * FROM worlds\");\n\t\twhile ($worldData = $statement -> fetch(PDO::FETCH_ASSOC)) {\n\t\t\t$this -> worlds[$worldData['world']] = new World($worldData);\n\t\t}\n\t\t$statement = $this -> database -> query(\"SELECT * FROM server.configs\");\n\t\twhile ($configData = $statement -> fetch(PDO::FETCH_ASSOC)) {\n\t\t\t$this -> configs[$configData['key_']] = new Config($configData['key_'], $configData['value'], $configData['dataType']);\n\t\t}\n\t}", "public function config()\n {\n $data = [\n \"fromname\" => config('mail.from.name'),\n \"from\" => config('mail.from.address'),\n \"host\" => config('mail.host'),\n \"username\" => config('mail.username'),\n \"password\" => config('mail.password'),\n \"corpid\" => config('weixin.corpid'),\n \"corpsecret\" => config('weixin.corpsecret'),\n \"agentid\" => config('weixin.agentid'),\n ];\n return view('admin.config', compact('data'))->with([\n 'title' => \"配置\",\n 'email' => \"active\"\n ]);\n \n }", "public function config_set()\n {\n require_code('input_filter_2');\n rescue_shortened_post_request();\n\n require_code('caches3');\n\n global $CONFIG_OPTIONS_CACHE;\n\n $category = get_param_string('id', 'MAIN');\n\n if (cms_srv('REQUEST_METHOD') != 'POST') {\n warn_exit(do_lang_tempcode('INTERNAL_ERROR'));\n }\n\n // Make sure we haven't locked ourselves out due to URL Scheme support\n if (\n (post_param_string('url_scheme', 'RAW') != 'RAW') &&\n (substr(cms_srv('SERVER_SOFTWARE'), 0, 6) == 'Apache') &&\n (\n (!file_exists(get_file_base() . '/.htaccess')) ||\n (stripos(file_get_contents(get_file_base() . '/.htaccess'), 'RewriteEngine on') === false) ||\n ((function_exists('apache_get_modules')) && (!in_array('mod_rewrite', apache_get_modules()))) ||\n (http_download_file(get_base_url() . '/pg/keymap', null, false, true) != '') && ($GLOBALS['HTTP_MESSAGE'] == '404')\n )\n ) {\n warn_exit(do_lang_tempcode('BEFORE_MOD_REWRITE'));\n }\n\n // Make sure we haven't just locked staff out\n if (addon_installed('staff')) {\n $new_site_name = substr(post_param_string('site_name', ''), 0, 200);\n if (($new_site_name != '') && (get_option('is_on_sync_staff') === '1')) {\n $admin_groups = array_merge($GLOBALS['FORUM_DRIVER']->get_super_admin_groups(), $GLOBALS['FORUM_DRIVER']->get_moderator_groups());\n $staff = $GLOBALS['FORUM_DRIVER']->member_group_query($admin_groups, 100);\n if (count($staff) < 100) {\n foreach ($staff as $row_staff) {\n $member = $GLOBALS['FORUM_DRIVER']->mrow_id($row_staff);\n if ($GLOBALS['FORUM_DRIVER']->is_staff($member)) {\n $sites = get_cms_cpf('sites');\n $sites = str_replace(', ' . get_site_name(), '', $sites);\n $sites = str_replace(',' . get_site_name(), '', $sites);\n $sites = str_replace(get_site_name() . ', ', '', $sites);\n $sites = str_replace(get_site_name() . ',', '', $sites);\n $sites = str_replace(get_site_name(), '', $sites);\n if ($sites != '') {\n $sites .= ', ';\n }\n $sites .= $new_site_name;\n $GLOBALS['FORUM_DRIVER']->set_custom_field($member, 'sites', $sites);\n }\n }\n }\n }\n }\n\n // Empty thumbnail cache if needed\n if (function_exists('imagetypes')) {\n if ((!is_null(post_param_string('thumb_width', null))) && (post_param_string('thumb_width') != get_option('thumb_width'))) {\n erase_thumb_cache();\n }\n }\n\n // Empty language cache if needed\n if ((!is_null(post_param_string('yeehaw', null))) && (post_param_string('yeehaw') != get_option('yeehaw'))) {\n erase_cached_language();\n }\n\n // Find all options in category\n $hooks = find_all_hooks('systems', 'config');\n $options = array();\n foreach (array_keys($hooks) as $hook) {\n require_code('hooks/systems/config/' . filter_naughty_harsh($hook));\n $ob = object_factory('Hook_config_' . filter_naughty_harsh($hook));\n $option = $ob->get_details();\n if ($category == $option['category']) {\n if ((is_null($GLOBALS['CURRENT_SHARE_USER'])) || ($option['shared_hosting_restricted'] == 0)) {\n if (!is_null($ob->get_default())) {\n $option['ob'] = $ob;\n $options[$hook] = $option;\n }\n }\n }\n }\n\n // Add in special ones\n if ($category == 'SITE') {\n $options['timezone'] = array('shared_hosting_restricted' => 0, 'type' => 'special');\n }\n\n // Go through all options on the page, saving\n foreach ($options as $name => $option) {\n // Save\n if ($option['type'] == 'float') {\n $_value = post_param_string($name, '');\n $value = ($_value == '') ? '' : float_unformat($_value);\n } elseif ($option['type'] == 'tick') {\n $value = strval(post_param_integer($name, 0));\n } elseif ($option['type'] == 'date') {\n $date_value = post_param_date($name);\n $value = is_null($date_value) ? '' : strval($date_value);\n } elseif ((($option['type'] == 'forum') || ($option['type'] == '?forum')) && (get_forum_type() == 'cns')) {\n $value = post_param_string($name);\n if (is_numeric($value)) {\n $value = $GLOBALS['FORUM_DB']->query_select_value_if_there('f_forums', 'f_name', array('id' => post_param_integer($name)));\n }\n if (is_null($value)) {\n $value = '';\n }\n } elseif (($option['type'] == 'forum_grouping') && (get_forum_type() == 'cns')) {\n $value = post_param_string($name);\n if (is_numeric($value)) {\n $value = $GLOBALS['FORUM_DB']->query_select_value_if_there('f_forum_groupings', 'c_title', array('id' => post_param_integer($name)));\n }\n if (is_null($value)) {\n $value = '';\n }\n } elseif ((($option['type'] == 'usergroup') || ($option['type'] == 'usergroup_not_guest')) && (get_forum_type() == 'cns')) {\n $_value = $GLOBALS['FORUM_DB']->query_select_value_if_there('f_groups', 'g_name', array('id' => post_param_integer($name)));\n if (is_null($_value)) {\n $value = '';\n } else {\n $value = get_translated_text($_value);\n }\n } else {\n $value = post_param_string($name, '');\n }\n\n // Hard-coded special options\n if ($name == 'timezone') {\n set_value('timezone', $value);\n } else {\n // If the option was changed\n $old_value = get_option($name);\n if (($old_value != $value) || (!isset($CONFIG_OPTIONS_CACHE[$name]['c_set'])) || ($CONFIG_OPTIONS_CACHE[$name]['c_set'] == 0)) {\n set_option($name, $value);\n }\n }\n }\n\n // Clear some caching\n erase_comcode_page_cache();\n erase_block_cache();\n //persistent_cache_delete('OPTIONS'); Done by set_option / erase_persistent_cache\n erase_persistent_cache();\n erase_cached_templates(false, null, TEMPLATE_DECACHE_WITH_CONFIG);\n\n // Show it worked / Refresh\n $redirect = get_param_string('redirect', null);\n if ($redirect === null) {\n $url = build_url(array('page' => '_SELF', 'type' => 'browse'), '_SELF'); // , 'type' => 'category', 'id' => $category\n } else {\n $url = make_string_tempcode($redirect);\n }\n return redirect_screen($this->title, $url, do_lang_tempcode('SUCCESS'));\n }", "function loadSettings() {\n\tsetupSiteURLs();\n}", "function site_url() {\n echo config('site_url');\n}", "function site_url()\n{\n echo config('site_url');\n}", "function ieconfig_autoriser(){}", "private function write_config_data()\n\t{\n\t\t$captcha_url = '{base_url}images/captchas/';\n\n\t\tforeach (array('avatar_path', 'photo_path', 'signature_img_path', 'pm_path', 'captcha_path', 'theme_folder_path') as $path)\n\t\t{\n\t\t\t$prefix = ($path != 'theme_folder_path') ? $this->root_theme_path : '';\n\t\t\t$this->userdata[$path] = rtrim(realpath($prefix.$this->userdata[$path]), DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR;\n\t\t\t$this->userdata[$path] = str_replace($this->base_path, '{base_path}', $this->userdata[$path]);\n\t\t}\n\n\t\t$config = array(\n\t\t\t'db_port' => $this->userdata['db_port'],\n\t\t\t'db_hostname' => $this->userdata['db_hostname'],\n\t\t\t'db_username' => $this->userdata['db_username'],\n\t\t\t'db_password' => $this->userdata['db_password'],\n\t\t\t'db_database' => $this->userdata['db_name'],\n\t\t\t'db_dbprefix' => $this->getDbPrefix(),\n\t\t\t'db_char_set' => $this->userdata['db_char_set'],\n\t\t\t'db_collat' => $this->userdata['db_collat'],\n\t\t\t'app_version' => $this->userdata['app_version'],\n\t\t\t'debug' => '1',\n\t\t\t'site_index' => $this->userdata['site_index'],\n\t\t\t'site_label' => $this->userdata['site_label'],\n\t\t\t'base_path' => $this->base_path,\n\t\t\t'base_url' => $this->userdata['site_url'],\n\t\t\t'cp_url' => str_replace($this->userdata['site_url'], '{base_url}', $this->userdata['cp_url']),\n\t\t\t'site_url' => '{base_url}',\n\t\t\t'theme_folder_url' => '{base_url}themes/',\n\t\t\t'webmaster_email' => $this->userdata['email_address'],\n\t\t\t'webmaster_name' => '',\n\t\t\t'channel_nomenclature' => 'channel',\n\t\t\t'max_caches' => '150',\n\t\t\t'cache_driver' => 'file',\n\t\t\t'captcha_url' => $captcha_url,\n\t\t\t'captcha_path' => $this->userdata['captcha_path'],\n\t\t\t'captcha_font' => 'y',\n\t\t\t'captcha_rand' => 'y',\n\t\t\t'captcha_require_members' => 'n',\n\t\t\t'require_captcha' => 'n',\n\t\t\t'enable_sql_caching' => 'n',\n\t\t\t'force_query_string' => 'n',\n\t\t\t'show_profiler' => 'n',\n\t\t\t'include_seconds' => 'n',\n\t\t\t'cookie_domain' => '',\n\t\t\t'cookie_path' => '/',\n\t\t\t'cookie_prefix' => '',\n\t\t\t'website_session_type' => 'c',\n\t\t\t'cp_session_type' => 'c',\n\t\t\t'cookie_httponly' => 'y',\n\t\t\t'allow_username_change' => 'y',\n\t\t\t'allow_multi_logins' => 'y',\n\t\t\t'password_lockout' => 'y',\n\t\t\t'password_lockout_interval' => '1',\n\t\t\t'require_ip_for_login' => 'y',\n\t\t\t'require_ip_for_posting' => 'y',\n\t\t\t'require_secure_passwords' => 'n',\n\t\t\t'allow_dictionary_pw' => 'y',\n\t\t\t'name_of_dictionary_file' => '',\n\t\t\t'xss_clean_uploads' => 'y',\n\t\t\t'redirect_method' => $this->userdata['redirect_method'],\n\t\t\t'deft_lang' => $this->userdata['deft_lang'],\n\t\t\t'xml_lang' => 'en',\n\t\t\t'send_headers' => 'y',\n\t\t\t'gzip_output' => 'n',\n\t\t\t'is_system_on' => 'y',\n\t\t\t'allow_extensions' => 'y',\n\t\t\t'date_format' => '%n/%j/%Y',\n\t\t\t'time_format' => '12',\n\t\t\t'include_seconds' => 'n',\n\t\t\t'server_offset' => '',\n\t\t\t'default_site_timezone' => date_default_timezone_get(),\n\t\t\t'mail_protocol' => 'mail',\n\t\t\t'email_newline' => '\\n', // single-quoted for portability\n\t\t\t'smtp_server' => '',\n\t\t\t'smtp_username' => '',\n\t\t\t'smtp_password' => '',\n\t\t\t'email_smtp_crypto' => 'ssl',\n\t\t\t'email_debug' => 'n',\n\t\t\t'email_charset' => 'utf-8',\n\t\t\t'email_batchmode' => 'n',\n\t\t\t'email_batch_size' => '',\n\t\t\t'mail_format' => 'plain',\n\t\t\t'word_wrap' => 'y',\n\t\t\t'email_console_timelock' => '5',\n\t\t\t'log_email_console_msgs' => 'y',\n\t\t\t'log_search_terms' => 'y',\n\t\t\t'un_min_len' => '4',\n\t\t\t'pw_min_len' => '5',\n\t\t\t'allow_member_registration' => 'n',\n\t\t\t'allow_member_localization' => 'y',\n\t\t\t'req_mbr_activation' => 'email',\n\t\t\t'new_member_notification' => 'n',\n\t\t\t'mbr_notification_emails' => '',\n\t\t\t'require_terms_of_service' => 'y',\n\t\t\t'default_member_group' => '5',\n\t\t\t'profile_trigger' => 'member',\n\t\t\t'member_theme' => 'default',\n\t\t\t'enable_avatars' => 'y',\n\t\t\t'allow_avatar_uploads' => 'n',\n\t\t\t'avatar_url' => '{base_url}'.$this->userdata['avatar_url'],\n\t\t\t'avatar_path' => $this->userdata['avatar_path'],\n\t\t\t'avatar_max_width' => '100',\n\t\t\t'avatar_max_height' => '100',\n\t\t\t'avatar_max_kb' => '50',\n\t\t\t'enable_photos' => 'n',\n\t\t\t'photo_url' => '{base_url}'.$this->userdata['photo_url'],\n\t\t\t'photo_path' => $this->userdata['photo_path'],\n\t\t\t'photo_max_width' => '100',\n\t\t\t'photo_max_height' => '100',\n\t\t\t'photo_max_kb' => '50',\n\t\t\t'allow_signatures' => 'y',\n\t\t\t'sig_maxlength' => '500',\n\t\t\t'sig_allow_img_hotlink' => 'n',\n\t\t\t'sig_allow_img_upload' => 'n',\n\t\t\t'sig_img_url' => '{base_url}'.$this->userdata['signature_img_url'],\n\t\t\t'sig_img_path' => $this->userdata['signature_img_path'],\n\t\t\t'sig_img_max_width' => '480',\n\t\t\t'sig_img_max_height' => '80',\n\t\t\t'sig_img_max_kb' => '30',\n\t\t\t'prv_msg_enabled' => 'y',\n\t\t\t'prv_msg_allow_attachments' => 'y',\n\t\t\t'prv_msg_upload_path' => $this->userdata['pm_path'],\n\t\t\t'prv_msg_max_attachments' => '3',\n\t\t\t'prv_msg_attach_maxsize' => '250',\n\t\t\t'prv_msg_attach_total' => '100',\n\t\t\t'prv_msg_html_format' => 'safe',\n\t\t\t'prv_msg_auto_links' => 'y',\n\t\t\t'prv_msg_max_chars' => '6000',\n\t\t\t'enable_template_routes' => 'y',\n\t\t\t'strict_urls' => 'y',\n\t\t\t'site_404' => '',\n\t\t\t'save_tmpl_revisions' => 'n',\n\t\t\t'max_tmpl_revisions' => '5',\n\t\t\t'save_tmpl_files' => 'y',\n\t\t\t'deny_duplicate_data' => 'y',\n\t\t\t'redirect_submitted_links' => 'n',\n\t\t\t'enable_censoring' => 'n',\n\t\t\t'censored_words' => '',\n\t\t\t'censor_replacement' => '',\n\t\t\t'banned_ips' => '',\n\t\t\t'banned_emails' => '',\n\t\t\t'banned_usernames' => '',\n\t\t\t'banned_screen_names' => '',\n\t\t\t'ban_action' => 'restrict',\n\t\t\t'ban_message' => 'This site is currently unavailable',\n\t\t\t'ban_destination' => 'http://www.yahoo.com/',\n\t\t\t'enable_emoticons' => 'y',\n\t\t\t'emoticon_url' => '{base_url}'.'images/smileys/',\n\t\t\t'recount_batch_total' => '1000',\n\t\t\t'image_resize_protocol' => 'gd2',\n\t\t\t'image_library_path' => '',\n\t\t\t'thumbnail_prefix' => 'thumb',\n\t\t\t'word_separator' => 'dash',\n\t\t\t'use_category_name' => 'n',\n\t\t\t'reserved_category_word' => 'category',\n\t\t\t'auto_convert_high_ascii' => 'n',\n\t\t\t'new_posts_clear_caches' => 'y',\n\t\t\t'auto_assign_cat_parents' => 'y',\n\t\t\t'new_version_check' => 'y',\n\t\t\t'enable_throttling' => 'n',\n\t\t\t'banish_masked_ips' => 'y',\n\t\t\t'max_page_loads' => '10',\n\t\t\t'time_interval' => '8',\n\t\t\t'lockout_time' => '30',\n\t\t\t'banishment_type' => 'message',\n\t\t\t'banishment_url' => '',\n\t\t\t'banishment_message' => 'You have exceeded the allowed page load frequency.',\n\t\t\t'enable_search_log' => 'y',\n\t\t\t'max_logged_searches' => '500',\n\t\t\t'memberlist_order_by' => \"member_id\",\n\t\t\t'memberlist_sort_order' => \"desc\",\n\t\t\t'memberlist_row_limit' => \"20\",\n\t\t\t'is_site_on' => 'y',\n\t\t\t'theme_folder_path' => $this->userdata['theme_folder_path'],\n\t\t);\n\n\t\t// Default Administration Prefs\n\t\t$admin_default = array(\n\t\t\t'site_index',\n\t\t\t'base_url',\n\t\t\t'base_path',\n\t\t\t'cp_url',\n\t\t\t'site_url',\n\t\t\t'theme_folder_url',\n\t\t\t'webmaster_email',\n\t\t\t'webmaster_name',\n\t\t\t'channel_nomenclature',\n\t\t\t'max_caches',\n\t\t\t'captcha_url',\n\t\t\t'captcha_path',\n\t\t\t'captcha_font',\n\t\t\t'captcha_rand',\n\t\t\t'captcha_require_members',\n\t\t\t'require_captcha',\n\t\t\t'enable_sql_caching',\n\t\t\t'force_query_string',\n\t\t\t'show_profiler',\n\t\t\t'include_seconds',\n\t\t\t'cookie_domain',\n\t\t\t'cookie_path',\n\t\t\t'website_session_type',\n\t\t\t'cp_session_type',\n\t\t\t'allow_username_change',\n\t\t\t'allow_multi_logins',\n\t\t\t'password_lockout',\n\t\t\t'password_lockout_interval',\n\t\t\t'require_ip_for_login',\n\t\t\t'require_ip_for_posting',\n\t\t\t'require_secure_passwords',\n\t\t\t'allow_dictionary_pw',\n\t\t\t'name_of_dictionary_file',\n\t\t\t'xss_clean_uploads',\n\t\t\t'redirect_method',\n\t\t\t'deft_lang',\n\t\t\t'xml_lang',\n\t\t\t'send_headers',\n\t\t\t'gzip_output',\n\t\t\t'date_format',\n\t\t\t'time_format',\n\t\t\t'include_seconds',\n\t\t\t'server_offset',\n\t\t\t'default_site_timezone',\n\t\t\t'mail_protocol',\n\t\t\t'email_newline',\n\t\t\t'smtp_server',\n\t\t\t'smtp_username',\n\t\t\t'smtp_password',\n\t\t\t'email_smtp_crypto',\n\t\t\t'email_debug',\n\t\t\t'email_charset',\n\t\t\t'email_batchmode',\n\t\t\t'email_batch_size',\n\t\t\t'mail_format',\n\t\t\t'word_wrap',\n\t\t\t'email_console_timelock',\n\t\t\t'log_email_console_msgs',\n\t\t\t'log_search_terms',\n\t\t\t'deny_duplicate_data',\n\t\t\t'redirect_submitted_links',\n\t\t\t'enable_censoring',\n\t\t\t'censored_words',\n\t\t\t'censor_replacement',\n\t\t\t'banned_ips',\n\t\t\t'banned_emails',\n\t\t\t'banned_usernames',\n\t\t\t'banned_screen_names',\n\t\t\t'ban_action',\n\t\t\t'ban_message',\n\t\t\t'ban_destination',\n\t\t\t'enable_emoticons',\n\t\t\t'emoticon_url',\n\t\t\t'recount_batch_total',\n\t\t\t'new_version_check',\n\t\t\t'enable_throttling',\n\t\t\t'banish_masked_ips',\n\t\t\t'max_page_loads',\n\t\t\t'time_interval',\n\t\t\t'lockout_time',\n\t\t\t'banishment_type',\n\t\t\t'banishment_url',\n\t\t\t'banishment_message',\n\t\t\t'enable_search_log',\n\t\t\t'max_logged_searches',\n\t\t\t'theme_folder_path',\n\t\t\t'is_site_on'\n\t\t);\n\n\t\t$site_prefs = array();\n\n\t\tforeach($admin_default as $value)\n\t\t{\n\t\t\t$site_prefs[$value] = $config[$value];\n\t\t}\n\n\t\tee()->db->where('site_id', 1);\n\t\tee()->db->update('sites', array('site_system_preferences' => base64_encode(serialize($site_prefs))));\n\n\t\t// Default Members Prefs\n\t\t$member_default = array(\n\t\t\t'un_min_len',\n\t\t\t'pw_min_len',\n\t\t\t'allow_member_registration',\n\t\t\t'allow_member_localization',\n\t\t\t'req_mbr_activation',\n\t\t\t'new_member_notification',\n\t\t\t'mbr_notification_emails',\n\t\t\t'require_terms_of_service',\n\t\t\t'default_member_group',\n\t\t\t'profile_trigger',\n\t\t\t'member_theme',\n\t\t\t'enable_avatars',\n\t\t\t'allow_avatar_uploads',\n\t\t\t'avatar_url',\n\t\t\t'avatar_path',\n\t\t\t'avatar_max_width',\n\t\t\t'avatar_max_height',\n\t\t\t'avatar_max_kb',\n\t\t\t'enable_photos',\n\t\t\t'photo_url',\n\t\t\t'photo_path',\n\t\t\t'photo_max_width',\n\t\t\t'photo_max_height',\n\t\t\t'photo_max_kb',\n\t\t\t'allow_signatures',\n\t\t\t'sig_maxlength',\n\t\t\t'sig_allow_img_hotlink',\n\t\t\t'sig_allow_img_upload',\n\t\t\t'sig_img_url',\n\t\t\t'sig_img_path',\n\t\t\t'sig_img_max_width',\n\t\t\t'sig_img_max_height',\n\t\t\t'sig_img_max_kb',\n\t\t\t'prv_msg_enabled',\n\t\t\t'prv_msg_allow_attachments',\n\t\t\t'prv_msg_upload_path',\n\t\t\t'prv_msg_max_attachments',\n\t\t\t'prv_msg_attach_maxsize',\n\t\t\t'prv_msg_attach_total',\n\t\t\t'prv_msg_html_format',\n\t\t\t'prv_msg_auto_links',\n\t\t\t'prv_msg_max_chars',\n\t\t\t'memberlist_order_by',\n\t\t\t'memberlist_sort_order',\n\t\t\t'memberlist_row_limit'\n\t\t);\n\n\t\t$site_prefs = array();\n\n\t\tforeach($member_default as $value)\n\t\t{\n\t\t\t$site_prefs[$value] = $config[$value];\n\t\t}\n\n\t\tee()->db->where('site_id', 1);\n\t\tee()->db->update('sites', array('site_member_preferences' => base64_encode(serialize($site_prefs))));\n\n\t\t// Default Templates Prefs\n\t\t$template_default = array(\n\t\t\t'enable_template_routes',\n\t\t\t'strict_urls',\n\t\t\t'site_404',\n\t\t\t'save_tmpl_revisions',\n\t\t\t'max_tmpl_revisions',\n\t\t);\n\t\t$site_prefs = array();\n\n\t\tforeach($template_default as $value)\n\t\t{\n\t\t\t$site_prefs[$value] = $config[$value];\n\t\t}\n\n\t\tee()->db->where('site_id', 1);\n\t\tee()->db->update('sites', array('site_template_preferences' => base64_encode(serialize($site_prefs))));\n\n\t\t// Default Channels Prefs\n\t\t$channel_default = array(\n\t\t\t'image_resize_protocol',\n\t\t\t'image_library_path',\n\t\t\t'thumbnail_prefix',\n\t\t\t'word_separator',\n\t\t\t'use_category_name',\n\t\t\t'reserved_category_word',\n\t\t\t'auto_convert_high_ascii',\n\t\t\t'new_posts_clear_caches',\n\t\t\t'auto_assign_cat_parents',\n\t\t\t'enable_comments',\n\t\t\t'comment_word_censoring',\n\t\t\t'comment_moderation_override',\n\t\t\t'comment_edit_time_limit'\n\t\t);\n\n\t\t$site_prefs = array();\n\n\t\tforeach($channel_default as $value)\n\t\t{\n\t\t\tif (isset($config[$value]))\n\t\t\t{\n\t\t\t\t$site_prefs[$value] = $config[$value];\n\t\t\t}\n\t\t}\n\n\t\tee()->db->where('site_id', 1);\n\t\tee()->db->update('sites', array('site_channel_preferences' => base64_encode(serialize($site_prefs))));\n\n\t\t// Remove Site Prefs from Config\n\t\tforeach(array_merge($admin_default, $member_default, $template_default, $channel_default) as $value)\n\t\t{\n\t\t\tunset($config[$value]);\n\t\t}\n\n\t\t// Write the config file data\n\t\t$this->write_config_from_template($config);\n\n\t\treturn TRUE;\n\t}", "function setConfig() {\n\n\t\t\t// Mapping array for PI flexform\n\t\t\t$flex2conf = array(\n\t\t\t\t'news' => 'sDEF:news',\n\t\t\t\t'days' => 'sDEF:days',\n\t\t\t\t'darkdesign' => 'sDEF:dark',\n\t\t\t\t'show_last' => 'sDEF:show_last',\n\t\t\t\t'order_by' => 'sDEF:listOrderBy',\n\t\t\t\t'asc_desc' => 'sDEF:ascDesc',\n\t\t\t\t'category_mode' => 'sDEF:categoryMode',\n\t\t\t\t'category' => 'sDEF:categorySelection',\n\t\t\t\t'sideTop' => 'sSIDE:blog',\n\t\t\t\t'sideTopTitle' => 'sSIDE:blogTitle',\n\t\t\t\t'sideTopText' => 'sSIDE:blogText',\n\t\t\t\t'sideTopImage' => 'sSIDE:blogImage',\n\t\t\t\t'sideMiddle' => 'sSIDE:reader',\n\t\t\t\t'sideMiddleTitle' => 'sSIDE:readerTitle',\n\t\t\t\t'sideMiddleText' => 'sSIDE:readerText',\n\t\t\t\t'sideMiddleImage' => 'sSIDE:readerImage',\n\t\t\t\t'sideBottom' => 'sSIDE:bottom',\n\t\t\t\t'sideBottomTitle' => 'sSIDE:bottomTitle',\n\t\t\t\t'swfParams.' => array(\n\t\t\t\t\t'loop' => 'sFLASH:loop',\n\t\t\t\t\t'menu' => 'sFLASH:menu',\n\t\t\t\t\t'quality' => 'sFLASH:quality',\n\t\t\t\t\t'scale' => 'sFLASH:scale',\n\t\t\t\t\t'bgcolor' => 'sFLASH:bgcolor',\n\t\t\t\t\t'swliveconnect' => 'sFLASH:swliveconnect',\n\t\t\t\t),\n\t\t\t\t'playerParams.' => array(\n\t\t\t\t\t'timer' => 'sPLAYER:timer',\n\t\t\t\t\t'transition' => 'sPLAYER:transition',\n\t\t\t\t\t'random' => 'sPLAYER:random',\n\t\t\t\t\t'navigation' => 'sPLAYER:navigation',\n\t\t\t\t),\n\t\t\t\t'width' => 'sFLASH:width',\n\t\t\t\t'height' => 'sFLASH:height',\n\t\t\t\t'version' => 'sFLASH:version',\n\t\t\t);\n\n\t\t\t// Ovverride TS setup with flexform\n\t\t\t$this->conf = $this->api->fe_mergeTSconfFlex($flex2conf,$this->conf,$this->piFlexForm);\n\n\t\t\t$this->conf['swfParams.']['width'] = $this->conf['width'];\n\t\t\t$this->conf['swfParams.']['height'] = $this->conf['height'];\n\t\t\t$this->conf['swfParams.']['wmode'] = $this->conf['wmode'];\n \t\t//$this->conf['width'] = 512;\n\t\t\t//$this->conf['height'] = 265;\n\t\t\t//$this->conf['wmode'] = 'opaque';\n\t\t\t// DEBUG ONLY - Output configuration array\n\t\t\t#$this->api->debug($this->conf,'MP3 Player: configuration array');\n\t\t}", "private function loadConfig()\n {\n $this->category->config = [];\n $this->loadMeta('admins', 'array');\n $this->loadMeta('members', 'array');\n $this->loadMeta('template');\n $this->loadMeta('category', 'array');\n //$this->loadMetaCategory();\n $this->loadInitScript();\n }", "public function configure();", "function configure() {\n\t\t\n\t\tif (!file_exists(APP . 'config/database.php')) {\n\t\t\t$this->redirect('/install/');\n\t\t}\n\t\t\n\t\tif (!empty($this->data)) {\t\t\t\n\t\t\t\n\t\t\t$this->Area = ClassRegistry::init('Area');\n\t\t\t$this->Content = ClassRegistry::init('Content');\n\t\t\t$this->User = ClassRegistry::init('User');\n\t\t\t\n\t\t\tif ($this->Area->saveAll($this->data, array('validate' => 'first'))) {\t\t\n\t\t\t\t// mark as installed\n\t\t\t\t$this->Session->setFlash(__('Successfully configured system', true));\n\t\t\t\t$file = new File(APP . 'config/INSTALLED');\n\t\t\t\t$file->write(time());\n\t\t\t\t\n\t\t\t\t// create initital user\n\t\t\t\t$this->data['User']['area_id'] = $this->Area->id;\n\t\t\t\t// @TODO validate data\n\t\t\t\t$this->User->save($this->data['User'], false);\n\t\t\t\t$this->User->saveField('user_id', $this->User->id);\n\t\t\t\t\n\t\t\t\t// update area\n\t\t\t\t$this->Area->saveField('user_id', $this->User->id);\n\t\t\t\t$this->Area->Url->saveField('user_id', $this->User->id);\n\t\t\t\t\n\t\t\t\t$this->redirect('/');\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__('Failed to configure system', true));\n\t\t\t}\n\t\t} else {\n\t\t\t$this->data['Url'][0]['url'] = Router::url('/', true);\n\t\t}\n\t}", "public function index()\n {\n $this->configuration();\n }", "public function index()\n\t{\n\t\tvalidar_session_admin($this);\n\t\t$this->load->model('admin/Config_model');\n\t\t$this->load->helper('template_admin_helper');\n\t\t$rows = $this->Config_model->get_data();\n\t\t$nombre_empresa = $rows->nombre_empresa;\n\t\t$direccion_empresa = $rows->direccion_empresa;\n\t\t$telefono_empresa = $rows->telefono_empresa;\n\t\t$correo_empresa = $rows->correo_empresa;\n\t\t$web_empresa = $rows->web_empresa;\n\t\t$logo_empresa = $rows->logo_empresa;\n\t\t$data = array(\n\t\t\t'titulo' => \"Configuración General\",\n\t\t\t'urljs' => 'funciones_general.js',\n\t\t\t'nombre_empresa' => $nombre_empresa,\n\t\t\t'direccion_empresa' => $direccion_empresa,\n\t\t\t'telefono_empresa' => $telefono_empresa,\n\t\t\t'correo_empresa' => $correo_empresa,\n\t\t\t'web_empresa' => $web_empresa,\n\t\t\t'logo_empresa' => $logo_empresa,\n\t\t);\n\t\t$extras = array(\n\t\t\t'css' => array(\n\t\t\t\t0 => 'admin/libs/dropify/dropify.min.css'\n\t\t\t),\n\t\t\t'js' => array(\n\t\t\t\t0 => 'admin/libs/dropify/dropify.min.js'\n\t\t\t),\n\t\t);\n\t\tlayout(\"admin/config/config\",$data,$extras);\n\t\t//layout('admin/config/config',$data);\n\t}", "private function load_conf() {\n\t\t$this->_crawler_conf[ 'base' ] = home_url();\n\n\t\t$current_crawler = $this->_crawlers[ $this->_summary[ 'curr_crawler' ] ];\n\n\t\t/**\n\t\t * Set role simulation\n\t\t * @since 1.9.1\n\t\t */\n\t\tif ( ! empty( $current_crawler[ 'uid' ] ) ) {\n\t\t\t// Get role simulation vary name\n\t\t\t$vary_name = $this->cls( 'Vary' )->get_vary_name();\n\t\t\t$vary_val = $this->cls( 'Vary' )->finalize_default_vary( $current_crawler[ 'uid' ] );\n\t\t\t$this->_crawler_conf[ 'cookies' ][ $vary_name ] = $vary_val;\n\t\t\t$this->_crawler_conf[ 'cookies' ][ 'litespeed_role' ] = $current_crawler[ 'uid' ];\n\t\t}\n\n\t\t/**\n\t\t * Check cookie crawler\n\t\t * @since 2.8\n\t\t */\n\t\tforeach ( $current_crawler as $k => $v ) {\n\t\t\tif ( strpos( $k, 'cookie:') !== 0 ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( $v == '_null' ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$this->_crawler_conf[ 'cookies' ][ substr( $k, 7 ) ] = $v;\n\t\t}\n\n\t\t/**\n\t\t * Set WebP simulation\n\t\t * @since 1.9.1\n\t\t */\n\t\tif ( ! empty( $current_crawler[ 'webp' ] ) ) {\n\t\t\t$this->_crawler_conf[ 'headers' ][] = 'Accept: image/webp,*/*';\n\t\t}\n\n\t\t/**\n\t\t * Set mobile crawler\n\t\t * @since 2.8\n\t\t */\n\t\tif ( ! empty( $current_crawler[ 'mobile' ] ) ) {\n\t\t\t$this->_crawler_conf[ 'ua' ] = 'Mobile iPhone';\n\t\t}\n\n\t\t/**\n\t\t * Limit delay to use server setting\n\t\t * @since 1.8.3\n\t\t */\n\t\t$this->_crawler_conf[ 'run_delay' ] = $this->conf( Base::O_CRAWLER_USLEEP ); // microseconds\n\t\tif ( ! empty( $_SERVER[ Base::ENV_CRAWLER_USLEEP ] ) && $_SERVER[ Base::ENV_CRAWLER_USLEEP ] > $this->_crawler_conf[ 'run_delay' ] ) {\n\t\t\t$this->_crawler_conf[ 'run_delay' ] = $_SERVER[ Base::ENV_CRAWLER_USLEEP ];\n\t\t}\n\n\t\t$this->_crawler_conf[ 'run_duration' ] = $this->conf( Base::O_CRAWLER_RUN_DURATION );\n\n\t\t$this->_crawler_conf[ 'load_limit' ] = $this->conf( Base::O_CRAWLER_LOAD_LIMIT );\n\t\tif ( ! empty( $_SERVER[ Base::ENV_CRAWLER_LOAD_LIMIT_ENFORCE ] ) ) {\n\t\t\t$this->_crawler_conf[ 'load_limit' ] = $_SERVER[ Base::ENV_CRAWLER_LOAD_LIMIT_ENFORCE ];\n\t\t}\n\t\telseif ( ! empty( $_SERVER[ Base::ENV_CRAWLER_LOAD_LIMIT ] ) && $_SERVER[ Base::ENV_CRAWLER_LOAD_LIMIT ] < $this->_crawler_conf[ 'load_limit' ] ) {\n\t\t\t$this->_crawler_conf[ 'load_limit' ] = $_SERVER[ Base::ENV_CRAWLER_LOAD_LIMIT ];\n\t\t}\n\n\t}", "public function configure() {\r\n\t\r\n\t}", "public function __construct() {\n\t\tparent::__construct();\n\t\t$data=$this->Home_model->getRow('*','setting');\n\t\t$this->config->set_item('home',$data);\n\t\t\n\t}", "public function loadConfig(){\n\t\t\n\t\t$opt[] = [\n\t\t\t'method' => 'setFormParams',\n\t\t\t'value'=>$this->paramsLoad(3, \\sevian\\s::getReq('command_idx'), \\sevian\\s::getReq('unit_idx'))\n\t\t\t\n\t\t];\n\t\t$this->info = $opt;//$form->getInfo();\n\t}", "function realstate_admin_configuration() {\n osc_plugin_configure_view(osc_plugin_path(__FILE__));\n}", "public function index()\n {\n $data = DB::table('config')->first();\n // dd($data);\n //加载网站配置首页\n return view('admin/config/index',['data'=>$data]);\n }", "public function run()\n {\n $cfg = array(\n array('name' => 'pagina principal titulo','content' => '¿DÓNDE QUIERES TRABAJAR?','is_active' => 1),\n array('name' => 'pagina principal seccion oferta titulo','content' => 'Oferta Académica','is_active' => 1),\n array('name' => 'pagina principal seccion oferta texto1','content' => 'Llevamos más de 25 años formando a los mejores profesionales del sector, en el Centro de Formación San Juan lo tenemos todo preparado para que solo tengas que decidir la carrera de tu vida profesional.\nTú decides.','is_active' => 1),\n array('name' => 'pagina principal seccion oferta texto2','content' => 'Impartimos cursos de formación con preferencia a desempleados de la Comunidad de Madrid orientados a la obtención de la certificación de los principales fabricantes del sector TIC, además de certificados de profesionalidad y cursos de idiomas.','is_active' => 1),\n array('name' => 'pagina principal seccion oferta texto3','content' => 'a calidad se mide en confianza. Por ello nos sentimos más que orgullosos de contar con más de 731 empresas en nuestra bolsa de trabajo, profesionales que confían en la preparación con que nuestros alumnos comienzan sus carreras.','is_active' => 1),\n array('name' => 'pagina principal seccion informacion titulo','content' => 'Información del Centro Académico','is_active' => 1),\n array('name' => 'pagina principal seccion informacion texto','content' => 'Desde que en 1950 ocuparon sus aulas el primer centenar de alumnos, ha ido creciendo hasta su configuración actual, con el paso del tiempo se ha ido reconstruyendo y ampliando sus instalaciones, reabriendo sus puertas a la actividad docente. Desde entonces ha sido un centro educativo que ha pretendido dar respuesta a las diversas necesidades de los jovenes que buscan obtener una formación, la cual será base y clave para poder labrarse un camino en un futuro laboral.','is_active' => 1),\n array('name' => 'pagina principal seccion noticias titulo','content' => 'Ultimas Noticias','is_active' => 1),\n array('name' => 'pagina principal seccion colaboradores titulo','content' => 'Colaboradores','is_active' => 1),\n array('name' => 'footer texto','content' => 'Pide mas información a través del formulario','is_active' => 1),\n array('name' => 'footer boton','content' => 'Contacta','is_active' => 1),\n array('name' => 'footer direccion','content' => 'ContactaDirección: C/San Juan de la Cruz S/N, 28223 Pozuelo de Alarcón, Madrid ','is_active' => 1),\n array('name' => 'footer telefono','content' => 'Tfno: +(34)91 342 23 89 Fax: +(34)91 322 11 23 ','is_active' => 1),\n array('name' => 'rrss email','content' => 'mailto:centrodeformacion.com','is_active' => 1),\n array('name' => 'rrss twitter','content' => 'http://www.twitter.com','is_active' => 1),\n array('name' => 'rrss facebook','content' => 'http://www.facebook.com','is_active' => 1),\n array('name' => 'pagina nuestro centro titulo','content' => 'Nuestro Centro','is_active' => 1),\n array('name' => 'pagina nuestro centro texto1','content' => 'Desde que en 1950 ocuparon sus aulas el primer centenar de alumnos, ha ido creciendo hasta su configuración actual, con el paso del tiempo se ha ido reconstruyendo y ampliando sus instalaciones, reabriendo sus puertas a la actividad docente.','is_active' => 1),\n array('name' => 'pagina nuestro centro texto2','content' => 'Desde entonces ha sido un centro educativo que ha pretendido dar respuesta a las diversas necesidades de los jovenes que buscan obtener una formación, la cual será base y clave para poder labrarse un camino en un futuro laboral.','is_active' => 1),\n array('name' => 'pagina nuestro centro texto3','content' => 'Contamos con diversas instalaciones las cuales cubren las diferentes necesidades de la formación correspondiente, renovadas año tras año para poder ofrecer el mayor servicio junto al personal cuailificado.','is_active' => 1),\n array('name' => 'pagina secretaria titulo','content' => 'Secretaría','is_active' => 1),\n array('name' => 'pagina secretaria subtitulo','content' => 'Información General','is_active' => 1),\n array('name' => 'pagina secretaria texto1','content' => 'Horario de Secretaría: de octubre a junio en días lectivos. Únicamente en horario de mañana','is_active' => 1),\n array('name' => 'pagina secretaria texto2','content' => 'de Lunes a Viernes de 10:00 a 13:00','is_active' => 1),\n array('name' => 'pagina secretaria texto3','content' => 'Los certificados de estudios se solicitarán en Secretaría y se entregarán en un plazo de 72 horas lectivas.','is_active' => 1),\n array('name' => 'pagina noticias titulo','content' => 'Noticias','is_active' => 1),\n array('name' => 'pagina contacto titulo','content' => 'Contacto','is_active' => 1),\n array('name' => 'pagina formacion informatica titulo','content' => 'Formación en Informática','is_active' => 1),\n array('name' => 'pagina formacion sanidad titulo','content' => 'Formación en Sanidad','is_active' => 1),\n array('name' => 'pagina formacion administracion titulo','content' => 'Formación en Administración','is_active' => 1),\n array('name' => 'pagina grado medio informatica titulo','content' => 'Grado Medio de Informática','is_active' => 1),\n array('name' => 'pagina grado medio informatica texto1','content' => 'En esta formación aprenderás a instalar, configurar y mantener sistemas microinformáticos, aislados o en red, así como redes locales en pequeños entornos. Además, estos estudios incluyen los conocimientos necesarios para llevar a cabo las actividades de nivel básico de prevención de riesgos laborales.','is_active' => 1),\n array('name' => 'pagina grado medio informatica texto2','content' => 'Por eso, al finalizar estos estudios, se puede trabajar en empresas del sector servicios que se dediquen a la comercialización, montaje y reparación de equipos, redes y servicios microinformáticos en general, como parte del soporte informático de la organización o en entidades de cualquier tamaño y sector productivo que utilizan sistemas microinformáticos y redes de datos para su gestión o seguir estudiando','is_active' => 1),\n array('name' => 'pagina grado medio informatica texto3','content' => 'Cabe señalar que este Ciclo Formativo Grado Medio en Sistemas Microinformáticos y Redes es uno de los perfiles profesionales más demandados por las empresas: según los datos del Observatorio de las Ocupaciones del Servicio Público de Empleo Estatal (SEPE), esta rama de FP fue una de las tres que registró un mayor número de contrataciones en el 2014, con un total de 25.955 contratos.','is_active' => 1),\n array('name' => 'galeria titulo general','content' => 'Galería de imágenes','is_active' => 1),\n array('name' => 'pagina grado superior informatica titulo','content' => 'Grado Superior de Informática','is_active' => 1),\n array('name' => 'pagina grado superior informatica texto1','content' => 'El mundo del desarrollo web está viviendo su mejor momento. Con una inserción laboral como ningún otro sector profesional, con una oferta de empleo incesante, cada vez son más quienes deciden formarse en esta materia. Por eso, en nuestro centro de formación hemos preparado los programas académicos más avanzados en desarrollo web, para que comiences tu carrera nada más acabar tu formación.','is_active' => 1),\n array('name' => 'pagina grado superior informatica texto2','content' => 'Vas a una entrevista de trabajo, te preguntan qué sabes dominar del diseño web y les dices que tanto el Back como el Front-End. Se quedan boquiabiertos. Y, por supuesto, te fichan. Porque ese es nuestro objetivo: formarte en el perfil más demandado actualmente por las empresas, agencias y estudios, el de Web Developer Full Stack.','is_active' => 1),\n array('name' => 'pagina grado superior informatica texto3','content' => 'En nuestro centro de formación te formarás con un programa especialmente orientado a tu preparación como experto en los lenguajes front-end HTML5 y CSS3, así como en el dominio del lenguaje de programación Javascript y sus dos principales frameworks: jQuery y Angular.','is_active' => 1),\n array('name' => 'pagina grado superior informatica texto4','content' => 'Además, completarás tu preparación con un conocimiento profesional de los lenguajes de programación Back-End PHP y XML, así como de gestores de bases de datos profesionales como MySQL, adentrándote en técnicas de desarrollo web imprescindibles en tu currículum, tales como Ajax.','is_active' => 1),\n array('name' => 'pagina grado medio administracion titulo','content' => 'Grado Medio de Administración','is_active' => 1),\n array('name' => 'pagina grado medio administracion texto1','content' => 'Con esta titulación oficial y homologada podrás trabajar como auxiliar administrativo en cualquier empresa o institución pública.','is_active' => 1),\n array('name' => 'pagina grado medio administracion texto2','content' => 'En el Grado Medio de Gestión Administrativa adquirirás los conocimientos básicos de gestión empresarial, de contabilidad y de confección de los principales modelos oficiales. Fórmate como auxiliar administrativo y elabora, gestiona y tramita documentos y comunicaciones. Y trabajarás también la atención al cliente y el apoyo a distintas áreas de la empresa.','is_active' => 1),\n array('name' => 'pagina grado medio administracion texto3','content' => 'Realizar actividades de apoyo administrativo en el ámbito laboral, contable, comercial, financiero y fiscal, así como de atención al cliente/usuario, tanto en empresas públicas como privadas, aplicando la normativa vigente y protocolos de calidad, asegurando la satisfacción del cliente y actuando según normas de prevención de riesgos laborales y protección ambiental.','is_active' => 1),\n array('name' => 'pagina grado superior administracion titulo','content' => 'Grado Superior de Administración','is_active' => 1),\n array('name' => 'pagina grado superior administracion texto1','content' => 'Obtén directamente y sin pruebas libres la titulación oficial y homologada de Administración y Finanzas y prepárate para trabajar como administrativo en cualquier empresa.','is_active' => 1),\n array('name' => 'pagina grado superior administracion texto2','content' => 'Este Grado Superior te preparará incluso para emprender y trabajar por tu cuenta. Aprende a crear y desarrollar un “business plan” y a interpretar sus proyecciones financieras y todo lo que se necesita para empezar a levantar cualquier negocio.','is_active' => 1),\n array('name' => 'pagina grado superior administracion texto3','content' => 'Este profesional ejerce su actividad tanto en grandes como en medianas y pequeñas empresas, en cualquier sector de actividad, y particularmente en el sector servicios, así como en las administraciones públicas, desempeñando las tareas administrativas en la gestión y el asesoramiento en las áreas laboral, comercial, contable y fiscal de dichas empresas e instituciones, ofreciendo un servicio y atención a los clientes y ciudadanos, realizando trámites administrativos con las administraciones públicas y gestionando el archivo y las comunicaciones de la empresa.','is_active' => 1),\n array('name' => 'pagina grado superior administracion texto4','content' => 'Podría ser trabajador por cuenta propia, efectuando la gestión de su propia empresa, o a través del ejercicio libre de una actividad económica, como en una asesoría financiera, laboral, estudio de proyectos, entre otros.','is_active' => 1),\n array('name' => 'pagina grado medio sanidad titulo','content' => 'Grado Medio de Sanidad','is_active' => 1),\n array('name' => 'pagina grado medio sanidad texto1','content' => 'El principal objetivo de esta formación es que nuestros alumnos puedan prestar atención básica sanitaria y psicológica en el entorno pre-hospitalario, trasladar al paciente al centro sanitario, llevar a cabo actividades de tele-operación y tele-asistencia sanitaria, colaborar en la organización y desarrollo de los planes de emergencia de los dispositivos de riesgo previsibles y de la logística sanitaria ante una emergencia individual, colectiva o catástrofe.','is_active' => 1),\n array('name' => 'pagina grado medio sanidad texto2','content' => 'Con esta profesión serás capaz de evacuar al paciente o víctima utilizando las técnicas de movilización e inmovilización y adecuando la conducción a las condiciones del mismo, para realizar un traslado seguro al centro sanitario de referencia. Aplicar técnicas de soporte vital básico ventilatorio y circulatorio en situación de compromiso y de atención básica inicial en otras situaciones de emergencia, entre otras cosas.','is_active' => 1),\n array('name' => 'pagina grado medio sanidad texto3','content' => 'Podrás trabajar en el sector sanitario relacionado con el traslado de pacientes o víctimas y la prestación de atención sanitaria y psicológica inicial, colaborando en la preparación y desarrollo de la logística sanitaria ante emergencias colectivas o catástrofes, así como participando en la preparación de planes de emergencia y dispositivos de riesgo previsible del ámbito de la protección civil.','is_active' => 1),\n array('name' => 'pagina grado superior sanidad titulo','content' => 'Grado Superior de Sanidad','is_active' => 1),\n array('name' => 'pagina grado superior sanidad texto1','content' => 'El objetivo principal de esta formación superior es la de poder elaborar y tramitar documentos y comunicaciones propias de los servicios sanitarios a partir de las necesidades detectadas y en el ámbito de su responsabilidad, respetando los criterios deontológicos de la profesión.','is_active' => 1),\n array('name' => 'pagina grado superior sanidad texto2','content' => 'El plan de estudio se basará en Realizar la gestión de ingresos, altas, asignación de camas y prestación de otros servicios sanitarios a pacientes/usuarios, asegurando el cumplimiento de los procesos y los niveles de calidad. Reconocer la terminología clínica de los documentos sanitarios en relación con los procesos patológicos y su atención en los servicios sanitarios, entre otras cosas.','is_active' => 1),\n array('name' => 'pagina grado superior sanidad texto3','content' => 'Con este formación se podrá trabajar de Trabajar en el sector sanitario, en organismos e instituciones del ámbito público y en empresas privadas, tanto en atención primaria como en especializada, así como en centros hospitalarios y de investigación. Realizan su trabajo bajo la supervisión del facultativo correspondiente o gerente administrativo en su caso.','is_active' => 1),\n array('name' => 'titulo del centro','content' => 'Centro de Formación San Juan','is_active' => 1),\n );\n\n foreach($cfg as $cf){ Configuration::create($cf); }\n\n }", "private function __construct() {\n $this->config = array(\n // These will all need to be changed to point at your mysql server.\n \"Database\" => array(\n \"Host\" => \"localhost\",\n \"Name\" => \"daeman\",\n \"Username\" => \"daeman\",\n \"Password\" => \"<password>\",\n ),\n );\n }", "function index()\n {\n redirect(URL_SITE_SETTINGS);\n }", "function loadConfig(){\n $file = file_get_contents($this->config_dir, FILE_USE_INCLUDE_PATH);\n $urls = json_decode($file,TRUE);\n //not the best way but error handling\n if ($file == NULL || $urls == NUll ){\n print(\"Error reading the config file or it it is empty\");\n }\n else{\n $this->config_data = $urls;\n\n }\n }", "function buddyexpressdesk_settings(){\n $settings = new stdClass;\n\t$GET = new BDESK_DB;\n $GET->statement('SELECT * FROM bdesk_site LIMIT 1');\n $GET->execute();\n\t$defaults = $GET->fetch();\n\tforeach ($defaults as $name => $value) {\n\t\tif (empty($paths->$name)) {\n\t\t\t$settings->$name = $value;\n\t\t}\n\t}\n\treturn $settings;\n}", "function Cofiguration()\n\t{\n\t\t//$this->objConMgr = new ConnectionMgr();\n\t}", "abstract public function configure();", "public static function loadSiteConfig($event) {\n\t\t$site = Yii::app()->urlManager->currentSite;\n\t\t\n\t\t$sitesParams = self::includeArray('sites-params.php', Yii::getPathOfAlias('approot.config'));\n\t\tif (isset($sitesParams[$site]))\n\t\t\tYii::app()->params->mergeWith($sitesParams[$site]);\n\t\t\n\t\t$localSiteParams = self::findLocalFile($site.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'params.php');\n\t\tif ($localSiteParams)\n\t\t\tYii::app()->params->mergeWith(include($localSiteParams));\n\t\t\n\t\t$siteConfig = self::findLocalFile($site.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'main.php');\n\t\tif ($siteConfig)\n\t\t\tYii::app()->configure(include($siteConfig));\n\t}", "function __construct()\r\n\t{\r\n\t\trequire './configs/configs.php';\r\n\t}", "function config($key = \"\") {\n $config = array(\n // SITE DETAILS\n \"name\" => \"Music MD\",\n \"url\" => \"http://localhost/Music-Streaming-Web-App\",\n \"version\" => \"v0.0\",\n\n // PATHS FOR FOLDERS FROM index.php\n // STRUCTURE STORES THE HTML OVERLAY OF THE APP\n \"structure_path\" => \"structure\",\n // COMPONENT STORES THE COMPONENT SPECIFIC DATA\n \"components_path\" => \"components\",\n // RESOURCE PATH\n \"resource_path\" => \"components/res\",\n );\n\n // isset CHECKS IT THE VALUES REQUEST IS NOT EMPTY OR FALSE TO AVOID ERROR\n return isset($config[$key]) ? $config[$key] : null;\n }", "static public function configure(SiteInterface $site) {\n $site['server.webroot'] = '/var/www/html';\n $site['server.user'] = 'apache';\n $site['server.vhost_enabled_folder'] = '/etc/httpd/conf.d';\n $site['server.vhost_available_folder'] = '/etc/httpd/conf.d';\n $site['server.restart_command'] = 'sudo service httpd reload';\n $site['server.disable_site_command'] = function($c) {\n return sprintf('rm %s', $c['server.host_conf_path']);\n };\n // TODO: Make this lie less\n $site['server.enable_site_command'] = 'echo \"not functional on centos\"';\n\n }", "public function settings()\n {\n }", "public function init() {\n\t\tparent::init();\n\t\t//Yii::app()->request->setHostInfo('http://love.allwomenstalk.com');\n\t\t/*echo 'BaseUrl'; var_dump(Yii::app()->request->getBaseUrl());\n\t\techo 'HostInfo'; var_dump(Yii::app()->request->getHostInfo());\n\t\techo 'PathInfo'; var_dump(Yii::app()->request->getPathInfo());\n\t\techo 'QueryString'; var_dump(Yii::app()->request->getQueryString());\n\t\techo 'RequestUri'; var_dump(Yii::app()->request->getRequestUri());\n\t\techo 'ScriptFile'; var_dump(Yii::app()->request->getScriptFile());\n\t\techo 'ScriptUrl'; var_dump(Yii::app()->request->getScriptUrl());\n\t\techo 'ServerName'; var_dump(Yii::app()->request->getServerName());*/\n\t\t\n\t\tYii::app()->params['site'] = $this->_currentSite = $this->detectSite();\n\t}", "public function configure()\n {\n if ($_SERVER['SERVER_NAME'] == 'mazemod.org')\n {\n header('Location: http://www.mazemod.org');\n exit;\n }\n }", "function grab(){\n\n\t\t$domains = explode(\",\",$this->conf->startUp[\"APPS.DOMAIN\"]);\n\t\tif(in_array(\"\".$_SERVER[\"HTTP_HOST\"],$domains)){\n\t\t\t$domain = $_SERVER[\"HTTP_HOST\"];\n\t\t}else{\n\t\t\t$domain = \"localhost\";\n\t\t}\t\n\n\t\t$bruto_url = $_SERVER[\"REQUEST_SCHEME\"].\"://\".\n\t\t\t$domain.$_SERVER[\"REQUEST_URI\"];\n\n\t\t$net_url = isset($bruto_url) ? $bruto_url : false;\n\n\t\tif($net_url)\n\t\t{\n\t\t\t//format HMVC [modules][controller ++model++views]\n\t\t\t//format MVC controler ++model++views\n\t\t\t$modeHMVC = self::$confStatic->startUp[\"APPS.MODULAR\"];\n\t\t\t$net_url \t= parse_url($net_url);\n\t\t\t$array_path = explode('/',ltrim($net_url['path'],'/'));\n\n\t\t\t$pageComponent=[];\n\t\t\tif($modeHMVC == \"true\"){ \n\t\t\t\t//jika dijalankan pada mode lokal atau online\n\t\t\t\tif($domain == \"localhost\" || $domain == \"127.0.0.1\"){\n\t\t\t\t\t$pageComponent['modul']\t\t= ucfirst($array_path[1]);\n\t\t\t\t\t$pageComponent['class'] \t= isset($array_path[2]) ? $array_path[2] : $this->conf->startUp[\"APPS.BASEPAGE\"];\n\t\t\t\t\t$pageComponent['func'] \t\t= isset($array_path[3]) ? $array_path[3] : $this->conf->startUp[\"APPS.FUNC\"];\n\t\t\t\t\t$pageComponent['params'] \t= isset($array_path[3]) ? array_slice($array_path,4) : null;\t\t\t\n\n\t\t\t\t}\n\t\t\t\t//jika tidak mode local\n\t\t\t\telse{\n\t\t\t\t\t$pageComponent['modul'] \t\t= ucfirst($array_path[0]);\n\t\t\t\t\t$pageComponent['class'] \t\t= isset($array_path[1]) ? $array_path[1] : $this->conf->startUp[\"APPS.BASEPAGE\"];\n\t\t\t\t\t$pageComponent['func'] \t\t\t= isset($array_path[2]) ? $array_path[2] : $this->conf->startUp[\"APPS.FUNC\"];\n\t\t\t\t\t$pageComponent['params']\t\t= isset($array_path[2]) ? array_slice($array_path,3) : null;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\t//jika mode local\n\t\t\t\tif($domain == \"localhost\" || $domain == \"127.0.0.1\"){\n\t\t\t\t\t$pageComponent['modul'] \t\t= \"\";\n\t\t\t\t\t$pageComponent['class'] \t\t= $array_path[1];\n\t\t\t\t\t$pageComponent['func'] \t\t\t= isset($array_path[2]) ? $array_path[2] : $this->conf->startUp[\"APPS.FUNC\"];\n\t\t\t\t\t$pageComponent['params']\t\t= isset($array_path[2]) ? array_slice($array_path,3) : null;\n\t\t\t\t}\n\t\t\t\t//jika tidak mode lokal\n\t\t\t\telse{\n\t\t\t\t\t$pageComponent['modul'] \t\t= \"\";\n\t\t\t\t\t$pageComponent['class'] \t\t= $array_path[0];\n\t\t\t\t\t$pageComponent['func'] \t\t\t= isset($array_path[1]) ? $array_path[1] : $this->conf->startUp[\"APPS.FUNC\"];\n\t\t\t\t\t$pageComponent['params'] \t\t= isset($array_path[1]) ? array_slice($array_path,2) : null;\n\t\t\t\t}\n\t\t\t}\t\t\n\t\t\t$pageComponent = (object) $pageComponent;\n\n\n\t\t\tif(isset($net_url['query'])){\n\n\t\t\t\tparse_str($net_url['query'],$array_query_string);\n\t\t\t\treq::setQueryGET($array_query_string);\t\n\t\t\t\t//var_dump($array_query_string);\n\t\t\t}else{\n\t\t\t\t$array_query_string = [];\n\t\t\t\t//var_dump($array_query_string);\n\t\t\t}\n\n\t\t\tif($pageComponent->class==\"\"){$pageComponent->class = self::$confStatic->startUp[\"APPS.BASEPAGE\"];}\n\t\t\treq::setParamsFunc((array)$pageComponent->params);\n\t\t\tself::setupPage(self::$rutes,$pageComponent);\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo \"whoopppsss something went wrong\";\n\t\t\t//error whoopsss plugin\n\t\t}\n\t}", "public function _config_para_view() {\n $this->controller->set('ControleAcessoConfig', $this->config);\n }", "protected function configure()\n {\n // load config\n $config = new \\Phalcon\\Config(array(\n 'base_url' => '/',\n 'static_base_url' => '/',\n ));\n\n if (file_exists(APPPATH.'config/static.php')) {\n $static = include APPPATH.'config/static.php';\n $config->merge($static);\n }\n\n if (file_exists(APPPATH.'config/setup.php')) {\n $setup = include APPPATH.'config/setup.php';\n $config->merge($setup);\n }\n\n return $config;\n }", "static function config() {\n\t\t//\t\tif (self::$configuration === null) {\n\t\t//\t\t\tself::$configuration = include self::themepath().'wpgrade-config'.EXT;\n\t\t//\t\t}\n\t\t//\n\t\t//\t\treturn self::$configuration;\n\t\treturn self::get_config();\n\t}", "private function configure()\n {\n\n $QryStr = \"SELECT SENDER, PORT,HOST, USER_ID,PASSWRD, EMAIL FROM SYSSETTINGS\";\n try {\n $stmt = $this->dbh->dbConn->prepare($QryStr);\n $stmt->execute();\n\n $result = $stmt->fetch(\\PDO::FETCH_OBJ);\n\n $this->sender = $result->sender;\n $this->port = $result->port;\n $this->host = $result->host;\n $this->user_id = $result->user_id;\n $this->password = $result->password;\n $this->sender_mail = $result->email;\n } catch (\\PDOException $ex) {\n $ex->getMessage();\n }\n }", "private function load_site_settings() {\n\t\t\n\t\t$this->helper->load_editor_settings();\n\t\t$this->settings = array_merge($this->settings,$this->EE->session->cache['eeck']['eeck_settings']);\n\t}", "public function __construct()\n {\n $this->params['config'] = config('app');\n }", "public function index(){\n $data = array();\n\n if($this->u->isLogged() && $this->u->havePermission('homePage')){\n $data['title'] = 'ADM - Configs Tela Inicial';\n $data['link'] = 'homePageCMS/index';\n $data['userData'] = $this->u->getData(1, $_SESSION['adminLogin']);\n $data['configData'] = $this->c->getConfigs(array(\"tutorial_advertisement\", \"banner_text\", \"banner_array\", \"banner_image\"));\n $this->loadTemplateCMS('cms/homePage/index', $data);\n }else{\n header(\"Location: \".BASE_URL);\n exit;\n }\n }", "function xanthia_admin_config()\n{\n\n\t/** Security check - important to do this as early as possible to avoid\n\t * potential security holes or just too much wasted processing. For the\n\t * main function we want to check that the user has at least edit privilege\n\t * for some item within this component, or else they won't be able to do\n\t * anything and so we refuse access altogether. The lowest level of access\n\t * for administration depends on the particular module, but it is generally\n\t * either 'edit' or 'delete'\n\t */\n\tif (!pnSecAuthAction(0, 'Xanthia::', '::', ACCESS_EDIT)) {\n return pnVarPrepHTMLDisplay(_MODULENOAUTH);\n \t}\n\n\t// Load user API\n\tif (!pnModAPILoad('Xanthia','user')) {\n pnSessionSetVar('errormsg', pnVarPrepHTMLDisplay(_XA_APILOADFAILED));\n pnRedirect(pnModURL('Xanthia', 'admin', 'view'));\n return true;\n\t}\n\n // Load admin API\n\tif (!pnModAPILoad('Xanthia', 'admin')) {\n pnSessionSetVar('errormsg', pnVarPrepHTMLDisplay(_XA_APILOADFAILED));\n pnRedirect(pnModURL('Xanthia', 'admin', 'view'));\n return true;\n\t}\n\n\t// Create output object - this object will store all of our output so that\n\t// we can return it easily when required\n\t$pnRender =& new pnRender('Xanthia');\n\n\t// As Admin output changes often, we do not want caching.\n\t$pnRender->caching = false;\n\n // Visual Block Editor\n $pnRender->assign('vba', pnModGetVar('Xanthia', 'vba'));\n \n if (file_exists(\".htaccess\")){ \n\t $pnRender->assign('htaccess', 1); \n } else {\n \t$pnRender->assign('htaccess', 0); \n } \n\n\t// Short urls\n $pnRender->assign('shorturls', pnModGetVar('Xanthia', 'shorturls'));\n\n\t// Short urls\n $pnRender->assign('shorturlsextension', pnModGetVar('Xanthia', 'shorturlsextension'));\n\n // Enable Cache\n $pnRender->assign('enablecache', pnModGetVar('Xanthia', 'enablecache'));\n\n\t// modules not to cache for\n\t$pnRender->assign('modulesnocache', pnModGetVar('Xanthia', 'modulesnocache'));\n\n // Cache templates to Database\n $pnRender->assign('db_cache', pnModGetVar('Xanthia', 'db_cache'));\n \n // Compile Templates to Database (not active yet)\n $pnRender->assign('db_compile', pnModGetVar('Xanthia', 'db_compile'));\n\n // Check for new version of template\n $pnRender->assign('compile_check', pnModGetVar('Xanthia', 'compile_check'));\n\n // Force Check for new version of template\n $pnRender->assign('force_compile', pnModGetVar('Xanthia', 'force_compile'));\n \n // Cache Time\n $pnRender->assign('cache_lifetime', pnModGetVar('Xanthia', 'cache_lifetime'));\n\n // Base Caching on Database Updates\n $pnRender->assign('use_db', pnModGetVar('Xanthia', 'use_db'));\n\n // Use Database for Templates\n $pnRender->assign('db_templates', pnModGetVar('Xanthia', 'db_templates'));\n\n // use of whitespace output filter\n\t$pnRender->assign('trimwhitespace', pnModGetVar('Xanthia', 'trimwhitespace'));\n\n // Return the output that has been generated by this function\n if (ereg('0.8', _PN_VERSION_NUM)) {\n return $pnRender->fetch('xanthiaadminconfig.htm');\n\t} else {\n return $pnRender->fetch('xanthiaadmin726config.htm');\n\t}\n}", "public function MenuConfig(){\n\t\t\tparent::view('Home/Menu4');\n\t\t}" ]
[ "0.7474454", "0.7119541", "0.68543947", "0.68486845", "0.6821353", "0.6787991", "0.67344356", "0.67252624", "0.66885465", "0.66758955", "0.6674771", "0.6672598", "0.66627926", "0.66409606", "0.6633463", "0.6625057", "0.6583522", "0.6583522", "0.6583522", "0.6583522", "0.6583522", "0.6583522", "0.6583522", "0.6583522", "0.65801173", "0.6556714", "0.65451944", "0.65208364", "0.6516633", "0.65028334", "0.6477834", "0.6466799", "0.64262015", "0.6414842", "0.640501", "0.640501", "0.6403125", "0.6403125", "0.6403125", "0.64024824", "0.6386706", "0.63807106", "0.6378072", "0.637198", "0.6369341", "0.6358303", "0.6352352", "0.63466656", "0.63387954", "0.6337369", "0.6330293", "0.63264203", "0.6320589", "0.63085645", "0.6307847", "0.63077503", "0.6303102", "0.629735", "0.6292417", "0.62824816", "0.62819755", "0.6281631", "0.6281458", "0.62658244", "0.6260838", "0.62465537", "0.6240767", "0.6236298", "0.6215615", "0.6211075", "0.6210364", "0.6201979", "0.62012523", "0.6195314", "0.61840606", "0.6177861", "0.61731124", "0.61722803", "0.61614686", "0.61600095", "0.61574286", "0.6156731", "0.61532074", "0.6151423", "0.6148532", "0.61458397", "0.61453056", "0.61395943", "0.61336744", "0.61204207", "0.6120058", "0.61170846", "0.61163163", "0.6110402", "0.6102101", "0.61007", "0.6098872", "0.6091878", "0.6086099", "0.60836804", "0.6083471" ]
0.0
-1
method generate generate random token
public static function generate(){ return Session::put(Config::get('session/token_name'), md5(uniqid())); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function generateRandomToken():string;", "public function generateToken();", "function generateToken()\n {\n return md5(uniqid(rand().time(),true));\n }", "function generate_token()\n\t{\n\t return sha1(base64_encode(openssl_random_pseudo_bytes(30)));\n\t}", "private function generateToken(): string\n {\n return Random::alphanum(self::TOKEN_LENGTH);\n }", "public static function generateRandomToken() {\n return Security::chlogHashStatic(md5(rand())); \n }", "function generate_token()\n {\n $this->load->helper('security');\n $res = do_hash(time().mt_rand());\n $new_key = substr($res,0,config_item('rest_key_length'));\n return $new_key;\n }", "public static function generateToken() {\n $token = md5(rand());\n return $token;\n }", "public function generateToken(): string\n {\n $token = bin2hex(random_bytes(16));\n $this->setTokens($this->limitTokens(\n array_merge($this->getTokens(), [$token])\n ));\n return $token;\n }", "protected function generateRandomToken(): string\n {\n return Str::random(32);\n }", "protected function generate_tok()\r\n {\r\n return $_SESSION['token'] = base64_encode(openssl_random_pseudo_bytes(32));\r\n }", "public function generateToken(){\n //if(empty($_SESSION['token']) && (empty($_SESSION['tokenAge']) || (time() - (int)$_SESSION['tokenAge']) > (int)$this->maxAge)){\n if(function_exists('random_bytes')){\n $_SESSION['token'] = bin2hex(random_bytes(32));\n }elseif(function_exists('mcrypt_create_iv')){\n $_SESSION['token'] = bin2hex(mcrypt_create_iv(32, MCRYPT_DEV_URANDOM));\n }else{\n $_SESSION['token'] = bin2hex(openssl_random_pseudo_bytes(32));\n }\n $_SESSION['tokenAge'] = time();\n //} \n }", "public static function randToken(): string\n {\n return base64_encode(openssl_random_pseudo_bytes(random_int(32, 256)));\n }", "function generateToken() {\n\t$token = openssl_random_pseudo_bytes(10);\n \n\t//Convert the binary data into hexadecimal representation.\n\t$token = bin2hex($token);\n\t\n\treturn $token;\n}", "function gen_token()\n\t{\n\t\t$ci = get_instance()->load->helper('myencrypt');\n\t\treturn create_token();\n\t}", "function createRandomToken(){\n\t\t\t$chars = \"abcdefghijkmnopqrstuvwxyz023456789\";\n\t\t\tsrand((double)microtime()*1000000);\n\t\t\t$i = 0;\n\t\t\t$pass = '' ;\n\t\t\twhile ($i <= 7){\n\t\t\t\t$num = rand() % 33;\n\n\t\t\t\t\t\t\t$tmp = substr($chars, $num, 1);\n\n\t\t\t\t\t\t\t$pass = $pass . $tmp;\n\n\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn $pass;\n\t\t\t\t\t\t}", "private function generateToken()\n {\n return hash('SHA256', uniqid((double) microtime() * 1000000, true));\n }", "public function generateToken()\n {\n $token = openssl_random_pseudo_bytes(16);\n \n $token = bin2hex($token);\n \n return $token;\n }", "function createtoken()\n {\n $token = \"token-\" . mt_rand();\n // put in the token, created time\n $_SESSION[$token] = time();\n return $token;\n }", "function sloodle_random_security_token()\n {\n // Define the characters we can use in our token, and get the length of it\n $str = \"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n $strlen = strlen($str) - 1;\n // Prepare the token variable\n $token = '';\n // Loop once for each output character\n for($length = 0; $length < 16; $length++) {\n // Shuffle the string, then pick and store a random character\n $str = str_shuffle($str);\n $char = mt_rand(0, $strlen);\n $token .= $str[$char];\n }\n \n return $token;\n }", "public function generateToken() : string\n {\n if (@file_exists('/dev/urandom')) { // Get 100 bytes of random data\n $randomData = file_get_contents('/dev/urandom', false, null, 0, 100);\n } elseif (function_exists('openssl_random_pseudo_bytes')) { // Get 100 bytes of pseudo-random data\n $bytes = openssl_random_pseudo_bytes(100, $strong);\n if (true === $strong && false !== $bytes) {\n $randomData = $bytes;\n }\n }\n\n // Last resort: mt_rand\n if (empty($randomData)) { // Get 108 bytes of (pseudo-random, insecure) data\n $randomData = mt_rand() . mt_rand() . mt_rand() . uniqid(mt_rand(), true) . microtime(true) . uniqid(\n mt_rand(),\n true\n );\n }\n\n return rtrim(strtr(base64_encode(hash('sha256', $randomData)), '+/', '-_'), '=');\n }", "function GenerateToken()\n{\n $TokenRequest = '';\n $caracteres = ''; \n $lmai = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $num = '1234567890'; \n $caracteres .= $lmai;\n $caracteres .= $num;\n \n $len = strlen($caracteres); \n for ($i=0; $i < 15; $i++) \n { \n $rand = mt_rand(1, $len); \n $TokenRequest .= $caracteres[$rand-1];\n }\n \n $TokenRequest .= 'C';\n\n for ($i=0; $i < 15; $i++) \n { \n $rand = mt_rand(1, $len); \n $TokenRequest .= $caracteres[$rand-1];\n }\n\n $TokenRequest .= 'C';\n\n for ($i=0; $i < 10; $i++) \n { \n $rand = mt_rand(1, $len); \n $TokenRequest .= $caracteres[$rand-1];\n }\n\n $TokenRequest .= date('h');\n $TokenRequest .= 'B';\n\n for ($i=0; $i < 7; $i++) \n { \n $rand = mt_rand(1, $len); \n $TokenRequest .= $caracteres[$rand-1];\n }\n\n $TokenRequest .= date('i');\n\n for ($i=0; $i < 5; $i++) \n { \n $rand = mt_rand(1, $len); \n $TokenRequest .= $caracteres[$rand-1];\n }\n\n $TokenRequest .= date('s');\n\n for ($i=0; $i < 2; $i++) \n { \n $rand = mt_rand(1, $len); \n $TokenRequest .= $caracteres[$rand-1];\n }\n \n return $TokenRequest;\n }", "static function generateToken() {\n $token = Cache::get(\"token\", false);\n if ($token) {\n return $token;\n } else {\n $time = floor(time() / 1000);\n $token = md5(bin2hex($time));\n new Cache(\"token\", $token);\n return $token;\n }\n }", "public function generate_token($method = 1) \n {\n $token = '';\n if($method == 2) {\n $token = mt_rand(100000, 999999);\n\n } else {\n $token = str_random(10);\n }\n return $token;\n }", "public static function generate_token() {\t\r\n\t\t$size = mcrypt_get_iv_size(MCRYPT_CAST_256, MCRYPT_MODE_CFB);\r\n\t\t$new_token = bin2hex(mcrypt_create_iv($size, MCRYPT_DEV_RANDOM));\r\n\t\treturn $new_token;\r\n\t}", "function create_token(): string\n {\n $strs = \"QWERTYUIOPASDFGHJKLZXCVBNM1234567890qwertyuiopasdfghjklzxcvbnm\";\n $str = substr(str_shuffle($strs),mt_rand(0,strlen($strs)-11),12);\n return md5($str);\n }", "public function getToken()\n {\n return bin2hex(random_bytes(20));\n }", "public function generateToken(): string\n {\n $token = bin2hex(random_bytes(16));\n $tokens = $_SESSION[$this->sessionKey] ?? [];\n $tokens[] = $token;\n $_SESSION[$this->sessionKey] = $this->limitTokens($tokens);\n return $token;\n }", "public static function generateToken()\r\n {\r\n $_SESSION['CSRF_TOKEN'] = bin2hex(openssl_random_pseudo_bytes(32));\r\n }", "protected function getNewToken()\n {\n return Str::random(60);\n }", "public function generateToken()\n\t{\n\t\treturn Token::make();\n\t}", "function gen_token(){\n\t\t$secretKey = \"BismILLAHirrohmaanirrohiim\";\n\n\t\t// Generates a random string of ten digits\n\t\t$salt = mt_rand();\n\n\t\t// Computes the signature by hashing the salt with the secret key as the key\n\t\t$signature = hash_hmac('sha256', $salt, $secretKey, true);\n\n\t\t// base64 encode...\n\t\t$encodedSignature = base64_encode($signature);\n\n\t\t// urlencode...\n\t\t$encodedSignature = urlencode($encodedSignature);\n\n\t\treturn $encodedSignature;\n\t}", "public static function generarVerificationToken(){\n return str_random(40);\n }", "function token_generator() {\n $token = $_SESSION['token'] = md5(uniqid(mt_rand(),true));\n\n return $token;\n}", "function createToken() {\n\treturn bin2hex(openssl_random_pseudo_bytes(32));\n}", "protected static function generateToken(): string\n {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyz';\n $token = 'V_'; // methods can't start with numbers\n\n for ($i = 0; $i < 12; $i++) {\n $index = rand(0, strlen($characters) - 1);\n $token .= $characters[$index];\n }\n\n return $token;\n }", "public function generateToken() {\n\t\t$appConfig = $this->config;\n\t\t$token = $this->secureRandom->generate(32);\n\t\t$appConfig->setAppValue('owncollab_ganttchart', 'sharetoken', $token);\n\t\treturn $token;\n\t}", "public static function nextToken() {\n return bin2hex(openssl_random_pseudo_bytes(10));\n }", "public function generateNewToken()\n {\n $this->token = uniqid(null, true);\n return ($this->token);\n }", "public function generateToken()\n {\n do {\n $token = sha1(microtime());\n } while ($this->newQuery()->where(['token' => $token])->count() > 0);\n\n return $token;\n }", "function create_token()\n {\n $secretKey = \"B1sm1LLAH1rrohmaan1rroh11m\";\n\n // Generates a random string of ten digits\n $salt = mt_rand();\n\n // Computes the signature by hashing the salt with the secret key as the key\n $signature = hash_hmac('sha256', $salt, $secretKey, false);\n // $signature = hash('md5', $salt.$secretKey);\n\n // return $signature;\n return urlsafeB64Encode($signature);\n }", "private static function generate_token($token_length) {\n\t\t\t// Initialise a variable used to store the token\n\t\t\t$token = null;\n\t\t\t// Create a salt of accepted characters\n\t\t\t$salt = \"abcdefghjkmnpqrstuvxyzABCDEFGHIJKLMNOPQRSTUVXYZ0123456789\";\n\t\t\t\n\t\t\tsrand((double)microtime()*1000000);\n\t\t\t$i = 0;\n\t\t\twhile ($i < $token_length) {\n\t\t\t\t$num = rand() % strlen($salt);\n\t\t\t\t$tmp = substr($salt, $num, 1);\n\t\t\t\t$token = $token . $tmp;\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t// Return the token\n\t\t\treturn $token;\n\t\t}", "protected function create_token()\n {\n do {\n $token = sha1(uniqid(\\Phalcon\\Text::random(\\Phalcon\\Text::RANDOM_ALNUM, 32), true));\n } while (Tokens::findFirst(array('token=:token:', 'bind' => array(':token' => $token))));\n\n return $token;\n }", "function generate_token($length){\n $token = \"\";\n $codeAlphabet = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n $codeAlphabet.= \"abcdefghijklmnopqrstuvwxyz\";\n $codeAlphabet.= \"0123456789\";\n $max = strlen($codeAlphabet) - 1;\n for ($i=0; $i < $length; $i++) {\n $token .= $codeAlphabet[crypto_rand_secure(0, $max)];\n }\n return $token;\n}", "function _generate_token($data) {\n\n //generate 32 digit random string\n $random_string = $this->_generate_rand_str();\n\n //build data array variables (required for table insert)\n if (!isset($data['expiry_date'])) {\n $data['expiry_date'] = time() + $this->default_token_lifespan;\n }\n \n $data['token'] = $random_string;\n $params = $data;\n\n if (isset($params['set_cookie'])) {\n unset($params['set_cookie']);\n }\n\n $this->model->insert($params, 'trongate_tokens');\n\n if (isset($data['set_cookie'])) {\n setcookie('trongatetoken', $random_string, $data['expiry_date'], '/');\n } else {\n $_SESSION['trongatetoken'] = $random_string;\n }\n\n return $random_string;\n }", "public static function init_token() {\n return bin2hex(random_bytes((self::TOKEN_SIZE / 2)));\n }", "function get_Rand_Token($num_bytes=16) {\n \n return bin2hex(openssl_random_pseudo_bytes($num_bytes));\n}", "public function createToken() {\r\n\t\t$characters = array('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',\r\n\t\t\t'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9');\r\n\t\t$counter = 0;\r\n\t\t$resultString = \"\";\r\n\t\t\r\n\t\twhile ($counter < Page::TOKEN_LENGTH) {\r\n\t\t\t$nextRand = mt_rand(0, (count($characters) - 1));\r\n\t\t\t\r\n\t\t\tif (!Strings::contains($resultString, sprintf('%1$s', $characters[$nextRand]))) {\r\n\t\t\t\t$resultString .= $characters[$nextRand];\r\n\t\t\t\t\r\n\t\t\t\t$counter++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $resultString;\r\n\t}", "public function generateToken()\n {\n $this->api_token = str_random(60);\n while (User::where('api_token', $this->api_token)->first()) {\n $this->api_token = str_random(60);\n }\n $this->save();\n return $this->api_token;\n }", "public function generateAuthKey()\n {\n $this->token = Yii::$app->security->generateRandomString(32);\n }", "function randomToken($length = 32){\r\n\t\twrite_log(\"Function fired.\");\r\n\t if(!isset($length) || intval($length) <= 8 ){\r\n\t $length = 32;\r\n\t }\r\n\t if (function_exists('mcrypt_create_iv')) {\r\n\t\t\twrite_log(\"Generating using mcrypt_create.\");\r\n\t return bin2hex(mcrypt_create_iv($length, MCRYPT_DEV_URANDOM));\r\n\t } \r\n\t\tif (function_exists('openssl_random_pseudo_bytes')) {\r\n\t\t\twrite_log(\"Generating using pseudo_random.\");\r\n\t return bin2hex(openssl_random_pseudo_bytes($length));\r\n\t }\r\n\t\t// Keep this last, as there appear to be issues with random_bytes and Docker.\r\n\t\tif (function_exists('random_bytes')) {\r\n\t\t\twrite_log(\"Generating using random_bytes.\");\r\n\t return bin2hex(random_bytes($length));\r\n\t }\r\n\t return false;\r\n\t}", "public static function generate(): string\n {\n $token = base64_encode(random_bytes(36));\n Session::set(self::SESSION_KEY, $token);\n return $token;\n }", "function createToken($length = 10) {\n\t\t$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\t\t$charactersLength = strlen($characters);\n\t\t$randomString = '';\n\t\tfor ($i = 0; $i < $length; $i++) {\n\t\t\t$randomString .= $characters[rand(0, $charactersLength - 1)];\n\t\t}\n\t\treturn $randomString;\n\t}", "function generateActivationToken()\r\n{\r\n\t$gen;\r\n\r\n\tdo\r\n\t{\r\n\t\t$gen = md5(uniqid(mt_rand(), false));\r\n\t}\r\n\twhile(validateActivationToken($gen));\r\n\r\n\treturn $gen;\r\n}", "private function getToken()\n {\n return uniqid();\n }", "function cng_pwd_token() {\n $token = bin2hex(random_bytes(32));\n $_SESSION['cng_pwd_token'] = $token;\n return $token;\n }", "function genAuthToken(){\n $timestamp = time();\n $username = $_SESSION['userid'];\n $random = rand(0, 50);\n \n return md5( \"YANS\" . $timestamp . $username . $random );\n }", "public function regenerateToken();", "public static function token($length = 32, $max = FALSE) {\n\t\tif (is_int ( $max ) && $max > $length) {\n\t\t\t$length = mt_rand ( $length, $max );\n\t\t}\n\t\t$output = '';\n\t\t\n\t\tfor($i = 0; $i < $length; $i ++) {\n\t\t\t$which = mt_rand ( 0, 2 );\n\t\t\t\n\t\t\tif ($which === 0) {\n\t\t\t\t$output .= mt_rand ( 0, 9 );\n\t\t\t} elseif ($which === 1) {\n\t\t\t\t$output .= chr ( mt_rand ( 65, 90 ) );\n\t\t\t} else {\n\t\t\t\t$output .= chr ( mt_rand ( 97, 122 ) );\n\t\t\t}\n\t\t}\n\t\treturn $output;\n\t}", "function getToken($length) {\n \t\t $key = '';\n \t\t $keys = array_merge(range(0, 9), range('a', 'z'));\n \t\t for ($i = 0; $i < $length; $i++) {\n \t\t $key .= $keys[array_rand($keys)];\n \t\t }\n\n \t\t return $key;\n \t\t}", "function _cr_hs_generate_token() {\n $load_avg = sys_getloadavg();\n $time = time();\n $hash = hash_init('sha256');\n hash_update($hash, implode('', $load_avg));\n hash_update($hash, time());\n return hash_final($hash);\n}", "function user_token() {\n $token = bin2hex(random_bytes(32));\n $_SESSION['user_verify_token'] = $token;\n return $token;\n }", "function generateToken($length){\r\n $token = \"\";\r\n $possible = \"0123456789bcdfghjkmnpqrstvwxyz\";\r\n $i = 0;\r\n while ($i < $length) {\r\n $char = substr($possible, mt_rand(0, strlen($possible)-1), 1);\r\n if (!strstr($token, $char)) {\r\n $token .= $char;\r\n $i++;\r\n }\r\n }\r\n return $token;\r\n }", "private static function generateToken()\n {\n Session::set('csrf', bin2hex(random_bytes(32)));\n }", "function generateToken($varname){\n\t\t$token = bin2hex(random_bytes(16));\n\t\tcreateSession($varname,$token);\n\t\treturn $token;\n\t}", "function new_pwd_token() {\n $token = bin2hex(random_bytes(32));\n $_SESSION['new_pwd_token'] = $token;\n return $token;\n }", "public static function generate(): string\n {\n do {\n $api_token = str_random(60);\n } while (User::where('api_token', $api_token)->exists());\n\n return $api_token;\n }", "function generate() {\n\n if ($_SERVER[\"REQUEST_METHOD\"] !== 'POST') {\n http_response_code(403);\n echo 'Forbidden';\n die();\n } else {\n //fetch posted data\n $posted_data = file_get_contents('php://input');\n $input = (array) json_decode($posted_data);\n $data = $this->_pre_token_validation($input);\n }\n\n $token = $this->_generate_token($data);\n http_response_code(200);\n echo $token;\n }", "function generateActivationToken($gen = null)\r\n{\r\n\tdo\r\n\t{\r\n\t\t$gen = md5(uniqid(mt_rand(), false));\r\n\t}\r\n\twhile(validateActivationToken($gen));\r\n\treturn $gen;\r\n}", "public function generatePasswordResetToken() {\n\t\t$this->txt_password_reset_token = Yii::$app->security->generateRandomString () . '_' . time ();\n\t}", "public function generateToken($length = 10) {\n\t\t$possible = '0123456789abcdefghijklmnopqrstuvwxyz';\n\t\t$token = \"\";\n\t\t$i = 0;\n\n\t\twhile ($i < $length) {\n\t\t\t$char = substr($possible, mt_rand(0, strlen($possible) - 1), 1);\n\t\t\tif (!stristr($token, $char)) {\n\t\t\t\t$token .= $char;\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}\n\t\treturn $token;\n\t}", "public static function generate()\n {\n return substr(md5(uniqid('nonce_', true)), 0, 16);\n }", "function signup_token() {\n $token = bin2hex(random_bytes(32));\n $_SESSION['signup_token'] = $token;\n return $token;\n }", "public function generate_token() {\n\t\t$current_offset = $this->get_offset();\n\t\treturn dechex($current_offset) . '-' . $this->calculate_tokenvalue($current_offset);\n\t}", "public static function generate(): Token\n {\n $token = bin2hex(random_bytes(256));\n return new Token($token);\n }", "function login_token() {\n $token = bin2hex(random_bytes(32));\n $_SESSION['login_token'] = $token;\n return $token;\n }", "private static function generateUniqueApiToken()\n {\n $token = Str::limit(Str::random(150) . sha1(Carbon::now()->getTimestamp()), 190);\n\n return $token;\n }", "protected function create_token()\n {\n while (true) {\n // Create a random token\n $token = text::random('alnum', 32);\n\n // Make sure the token does not already exist\n if ($this->db->select('id')->where('token', $token)->get($this->table_name)->count() === 0) {\n // A unique token has been found\n return $token;\n }\n }\n }", "public static function generateToken($length = 32)\n {\n $security = new \\yii\\base\\Security();\n $token = $security->generateRandomString($length);\n return $token;\n }", "public function generatePasswordResetToken(){\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "function generateActivationToken($gen = null) {\n do {\n $gen = md5(uniqid(mt_rand(), false));\n } while (validateActivationToken($gen));\n return $gen;\n}", "protected function create_token() {\n\t\twhile(true) {\n\t\t\t// Create a random token\n\t\t\t$token = str::random('alnum', 32);\n\n\t\t\t// Make sure the token does not already exist\n\t\t\tself::db()->use_master(YES);\n\t\t\tif (self::db()->select('user_token_id')->where('user_token_token', $token)->get($this->table_name)->count() === 0) {\n\t\t\t\t// A unique token has been found\n\t\t\t\treturn $token;\n\t\t\t}\n\t\t}\n\t}", "public function generateAccessToken()\n {\n return Yii::$app->security->generateRandomString();\n }", "public function createNewToken()\n {\n return $this->getBandrek()->generateToken();\n }", "public function createToken();", "public function generatePasswordResetToken()\n {\n $this->pwd_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generateAccessToken()\n {\n $this->verification_token = Yii::$app->security->generateRandomString($length = 16);\n }", "public static function generate() \n{\n // set the `$tokenKey variable` by calling `get method` on `Config object`\n $tokenKey = Config::get('session.tokenKey');\n \n\n /* uniqid() - generates a unique ID based on the microtime (the current time in microseconds).\n Returns the unique identifier, as a string.\n Parametrs: 2 Optional parametrs.\n https://www.w3schools.com/php/func_misc_uniqid.asp */\n $random_string = uniqid();\n\n /* md5 — Calculate the md5 hash of a string\n Returns the calculated MD5 hash on success, or FALSE on failure\n Parametrs:\n 1) string\tRequired. The string to be calculated\n 2) raw\tOptional. Specifies hex or binary output format:\n TRUE - Raw 16 character binary format\n FALSE - Default. 32 character hex number\n https://www.w3schools.com/php/func_string_md5.asp */\n $token = md5($random_string);\n\n // add new element in the $_SESSION[] array\n return Session::put($tokenKey, $token);\n}", "private function setToken()\n {\n if (!$this->token) {\n if (is_callable('openssl_random_pseudo_bytes')) {\n $this->token = bin2hex(openssl_random_pseudo_bytes(16));\n } else {\n $this->token = md5(uniqid('', true));\n }\n }\n\n return $this->token;\n }", "function generate_otp_code(){\n return rand(1000,9999);\n}", "static public function generate()\n {\n return base64_encode(microtime().uniqid().rand());\n }", "function _generate()\n\t{\n\t\t$username = $this->CI->session->userdata('username');\n\t\t\n\t\t$token_source = fopen(\"http://random.org/strings/?num=1&len=20&digits=on&upperalpha=on&loweralpha=on&unique=on&format=plain&rnd=new\", \"r\");\n\t\t$token = fread($token_source, 20);\n\t\t\n\t\t$identifier = $username . $token;\n\t\t$identifier = $this->_salt($identifier);\n\t\t\n\t\t$this->CI->db->query(\"UPDATE `users` SET `identifier` = '$identifier', `token` = '$token' WHERE `username` = '$username'\");\n\t\t\n\t\tsetcookie(\"logged_in\", $identifier, time()+3600, '/');\n\t}", "public function generatePasswordResetToken()\r\n {\r\n $this->password_reset_token = Yii::$app->getSecurity()->generateRandomString() . '_' . time();\r\n }", "function createToken($name)\n{\n\t$token=NULL;\n\t$token=uniqid(rand(), true);\n\t$_SESSION[$name.'Token']=$token;\n\t$_SESSION[$name.'Token_time']=time();\n\treturn $token;\n}", "private function generateRandomKey()\n {\n return substr(base_convert(sha1(uniqid(mt_rand(), true)), 16, 36), 0, 8);\n }", "public function generate_token($length = 8) {\n $characters = '23456789BbCcDdFfGgHhJjKkMmNnPpQqRrSsTtVvWwXxYyZz';\n $count = mb_strlen($characters);\n\n for ($i = 0, $token = ''; $i < $length; $i++)\n {\n $index = rand(0, $count - 1);\n $token .= mb_substr($characters, $index, 1);\n }\n return $token;\n }", "public function randomKey();", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->getSecurity()->generateRandomString() . '_' . time();\n }", "function generate_otp()\n {\n return substr(hexdec(bin2hex(openssl_random_pseudo_bytes(3))), 0, 4);\n }", "public function generatePasswordResetToken()\n\t{\n\t\t$this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n\t}", "private function createToken()\n {\n $this->token = md5(time().uniqid());\n return true;\n }" ]
[ "0.9080293", "0.88415873", "0.8770622", "0.8700579", "0.8596843", "0.85623574", "0.84416276", "0.8421873", "0.84049183", "0.838822", "0.83117235", "0.82696766", "0.8236965", "0.8236089", "0.82347596", "0.82326114", "0.8198594", "0.8161439", "0.8145096", "0.8133805", "0.8128183", "0.8117534", "0.80855787", "0.80539644", "0.80409974", "0.80283", "0.80224025", "0.8004296", "0.7985367", "0.79791635", "0.7961434", "0.7955825", "0.7953583", "0.79447305", "0.79295707", "0.7908176", "0.7895559", "0.7883016", "0.7880955", "0.7847332", "0.78326315", "0.78309596", "0.78250855", "0.7803757", "0.7784832", "0.77784866", "0.7769279", "0.77264863", "0.7663965", "0.76558924", "0.7652652", "0.76445067", "0.7644411", "0.76262796", "0.76001847", "0.7587606", "0.75468624", "0.7545789", "0.753953", "0.7514709", "0.7504372", "0.74956554", "0.74902534", "0.7435735", "0.7432779", "0.74198705", "0.74162614", "0.740282", "0.7365924", "0.7351465", "0.7351183", "0.7350611", "0.73470175", "0.73245454", "0.73121375", "0.7306591", "0.7306418", "0.72979647", "0.7290526", "0.72795594", "0.72752637", "0.7273541", "0.72720337", "0.72675145", "0.7257461", "0.7253635", "0.7237232", "0.72353023", "0.72288805", "0.7221906", "0.72031075", "0.7200276", "0.7199442", "0.71990365", "0.7195499", "0.717577", "0.7173875", "0.71724665", "0.71699965", "0.7142617", "0.7139556" ]
0.0
-1
method check checking or token exists and in session have the same token if token exists delete them and return true.
public static function check($token){ $tokenName = Config::get('session/token_name'); if (Session::exists($tokenName) && $token === Session::get($tokenName)) { Session::delete($tokenName); return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function check($token) {\r\n\t\t$tokenName = Config::get('session/token_name');\r\n\r\n\t\tif (Session::exists($tokenName) && $token === Session::get($tokenName)) {\r\n\t\t\tSession::delete($tokenName);//dont need it any more\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}", "public static function check($token) \n{\n // set the `$tokenKey variable` by calling `get method` on `Config object`\n $tokenKey = Config::get('session.tokenKey'); // returns string\n\n /* checks whether `token` KEY exists in the `$_SESSION[] array` AND\n `form's token value` is equal to `token VALUE` in the `$_SESSION[] array` */\n if(Session::exists($tokenKey) && $token == Session::get($tokenKey)) {\n Session::delete($tokenKey);\n return true;\n }\n\n return false;\n}", "public static function check($token){\n\t\t$tokenName = Config::get('session/token_name');\t\t\t\t\t\t\t\t\n\n\t\tif(Session::exists($tokenName) && $token === Session::get($tokenName)){\t\t// Checkif the token supplied by the form is equal to the session token.\n\t\t\tSession::delete($tokenName);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Return false if none of the above is true.\n\t}", "protected function check_tok($token)\r\n {\r\n if (isset($_SESSION['token']) && $token === $_SESSION['token'])\r\n {\r\n unset($_SESSION['token']);\r\n return true;\r\n }\r\n return false;\r\n }", "function isTokenValid($token){\n if(!empty($_SESSION['tokens'][$token])){\n unset($_SESSION['tokens'][$token]);\n return true;\n }\n return false;\n}", "protected function checkSessionToken() {}", "function checkToken($token){\n\t\tif(checkTimeout($token)){\n\t\t\treturn false;\n\t\t}else{\n\t\t\tif(isset($_SESSION[$token])){\n\t\t\t\tif($_SESSION[$token] == $_GET['token']){\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "function token_exist($token): bool\r\n{\r\n\tglobal $DATABASE;\r\n\t\r\n\ttoken_invalidate();\r\n\t\r\n\tif($token == NULL) return false;\r\n\t\r\n\tforeach($DATABASE->execute_query(\"SELECT token FROM `logged_in`\") as $value)\r\n\t\tif(strcmp($value[0], $token) == 0)\r\n\t\t\treturn true;\r\n\t\r\n\treturn false;\r\n}", "static function tokenGatekeeper() {\n $token = getInput(\"token\");\n $session_token = Cache::get(\"token\", \"session\");\n if ($token == $session_token) {\n return true;\n }\n return false;\n }", "public static function check_token($token)\r\n {\r\n if ($token == $_SESSION['token'])\r\n return true;\r\n\r\n return false;\r\n }", "public function checkToken() {\n if (!isset($this->requestToken)) {\n trigger_error(tr('Request token missing. Is the session module missing?'), E_USER_WARNING);\n return false;\n }\n if (!isset($this->data['access_token'])) {\n return false;\n }\n return $this->requestToken->getToken() === $this->data['access_token'];\n }", "public function ssoTokenExists() {\n if ($this->httpSession != null && array_key_exists('maestrano', $this->httpSession)) {\n return true;\n }\n\n return false;\n }", "public function regenerateSessionAuthToken(): bool;", "public function isValidSession(string $token):bool;", "function checkAuthToken() {\n if ( !isset( $_POST['authToken'] ) || $_POST['authToken'] != $_SESSION['authToken'] ) {\n logout();\n return false;\n } else {\n return true;\n }\n}", "protected function _isNewToken()\n {\n $info = $this->_quote->getPayment();\n Mage::helper('ewayrapid')->unserializeInfoInstace($info);\n if ($token = Mage::getSingleton('core/session')->getData('newToken')) {\n Mage::getSingleton('core/session')->unsetData('newToken');\n return true;\n }\n return false;\n }", "function Check() {\n\t\t// Check if the token has been sent.\n\t\tif(isset($_REQUEST['spack_token'])) {\n\t\t\t// Check if the token exists\n\t\t\tif(isset($_SESSION[\"spackt_\".$_REQUEST['spack_token']])) {\n\t\t\t\t// Check if the token isn't empty\n\t\t\t\tif(isset($_SESSION[\"spackt_\".$_REQUEST['spack_token']])) {\n\t\t\t\t\t$age = time()-$_SESSION[\"spackt_\".$_REQUEST['spack_token']];\n\t\t\t\t\t// Check if the token did not timeout\n\t\t\t\t\tif($age > $this->timeout*60) $this->error = 4;\n\t\t\t\t}\n\t\t\t\telse $this->error = 3;\n\t\t\t}\n\t\t\telse $this->error = 2;\n\t\t}\n\t\telse $this->error = 1;\n\t\t// Anyway, destroys the old token.\n\t\t$this->tokenDelAll();\n\t\tif($this->error==0) return true;\n\t\telse return false;\n\t}", "public function checkToken(string $token)\n {\n if ($token = Token::select()->where('token', $token)->first()) {\n if (new DateTime($token->getAttribute('expire')) < $this->timeService->getDate()) {\n $this->deleteToken($token);\n return false;\n } else {\n $this->renewToken($token);\n $token->save();\n return true;\n }\n }\n return false;\n }", "public function isTokenValid() {\n if (!isset($_SESSION['token']) || $this->_token != $_SESSION['token'])\n \n\t\t\t$this->_errors[] = 'invalid submission';\n\n // return true or false \n return count($this->_errors) ? 0 : 1;\n }", "public function ssoInvalidateToken($token)\n {\n $apiEndpoint = '/1/session/'.$token;\n $apiReturn = $this->runCrowdAPI($apiEndpoint, \"DELETE\", array());\n if ($apiReturn['status'] == '204') {\n return true;\n }\n return false;\n }", "function checkToken() {\n\t\t\t// Split the token up again to make sure the first 40 chars are the same (TOKEN)\n\t\t\t$splitToken = substr($this->tokenFromCookie, 0, 40);\n\t\t\t\n\t\t\t// Split the token up again to make sure the second 40 chars are the same (ZIPPED)\n\t\t\t$splitZipped = substr($this->tokenFromCookie, 40, 40);\n\t\t\t\n\t\t\t// Unzip the second 40 chars\n\t\t\t$result = $this->unzip($splitZipped);\n\n\t\t\t// Check if the sha of the zipped portion matches the token.\n\t\t\t// If so, no one has messed with the token\n\t\t\tif(strcmp($splitToken, sha1($splitZipped) == 0)) {\n\t\t\t\t// Grab all data from unzip\n\t\t\t\t$ip = base_convert($result[0], IP_ADDRESS, 10);\n\t\t\t\t$time = base_convert($result[1], REQUEST_TIME, 10);\n\t\t\t\t$user = $result[2];\n\t\t\t\t$random = $result[3];\n\t\t\t\t$expires = substr($this->tokenFromCookie, 80, strlen($this->tokenFromCookie));\n\n\t\t\t\t// Check if token is expired after one hour\n\t\t\t\tif(time() - $expires <= 3600) {\n\t\t\t\t\tif(strpos($_SERVER['REMOTE_ADDR'], \":\") !== false) {\n\t\t\t\t\t\t$userIpAddImp = implode(explode(\":\", $_SERVER['REMOTE_ADDR']));\n\t\t\t\t\t}\n\t\t\t\t\telseif(strpos($_SERVER['REMOTE_ADDR'], \".\") !== false) {\n\t\t\t\t\t\t$userIpAddImp = implode(explode(\".\", $_SERVER['REMOTE_ADDR']));\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Check if userIp is the same as when s/he originally logged in\n\t\t\t\t\t$validity = (strcmp($ip, $userIpAddImp) == 0) ? true : false;\t\t\t\t\t\n\t\t\t\t} \n\t\t\t\telse {\n\t\t\t\t\t$validity = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$validity = false;\n\t\t\t}\n\t\t\t\n\t\t\treturn $validity;\n\t\t}", "public function hasSessionToken()\n\t{\n\t\treturn \\Session::has('google.access_token');\n\t}", "function checkDeviceToken()\n {\n $sql = $this->db->select('id')->where('deviceToken', $deviceToken)->get('users');\n if($sql->num_rows())\n {\n $id = array();\n foreach($sql->result() as $result)\n {\n $id[] = $result->id;\n }\n $this->db->where_in('id', $id);\n $this->db->update('users',array('deviceToken'=>''));\n\n if($this->db->affected_rows() > 0)\n {\n return true;\n }\n else\n {\n return false;\n }\n }\n return true;\n }", "public function checkToken( )\n {\n\n $this->getTokenPost();\n if ( $this->token_post && $this->is_active() ) {\n if (empty($this->project_id) || $this->project_id != $this->token_post['meta_data']['pr-projekt'][0]) {\n $this->set_result_error('notfound');\n return false;\n }\n return $this->result;\n } else {\n return false;\n }\n\n }", "public function hasToken();", "public static function validToken()\r\n {\r\n $header = apache_request_headers();\r\n if(!isset($_SESSION['CSRF_TOKEN']) || !isset($header['CSRF_TOKEN']) || $header['CSRF_TOKEN'] != $_SESSION['CSRF_TOKEN']){\r\n return false;\r\n }\r\n\r\n return true;\r\n }", "private function validateTokens()\n {\n $whoami = $this->getJson('/ping/whoami');\n if (isset($whoami['authenticated']) && $whoami['authenticated'])\n {\n syslog(LOG_DEBUG, \"Monzo: Token is still valid\");\n return true;\n }\n else\n {\n return false;\n }\n }", "public function validateToken($token, $maxAge = 300){\n $this->maxAge = $maxAge;\n if($token != $_SESSION['token'] || ((time() - (int)$_SESSION['tokenAge']) > (int)$this->maxAge)){\n return false;\n }else{\n unset($_SESSION['token'], $_SESSION['tokenAge']);\n return true;\n }\n }", "function csrf_token_is_valid() {\n\tif(isset($_POST['csrf_token'])) {\n\t\t$user_token = $_POST['csrf_token'];\n\t\t$stored_token = $_SESSION['csrf_token'];\n\t\treturn $user_token === $stored_token;\n\t} else {\n\t\treturn false;\n\t}\n}", "static function isValid($user, $token){\n\n\t\t$verificationToken = self::get(\"user = $user->id AND token = '$token'\");\n\t\tif($verificationToken && time() - strtotime($verificationToken->createdOn) + $verificationToken->lifespan > 0){\n\n\t\t\t$result = true;\n\t\t\t$verificationToken->delete();\n\t\t}\n\t\telse{\n\n\t\t\t$result = false;\n\t\t}\n\t\treturn $result;\n\t}", "function logout($token){\n\t\tglobal $db;\n\t\t$userid = $this->GetUserIdByToken($token);\n\t\tif(isset($userid)){\n\t\t\t$result = $db->smartQuery(array(\n\t\t\t\t\t'sql' => \"DELETE FROM `user_session` WHERE token=:token;\",\n\t\t\t\t\t'par' => array('token' => $token),\n\t\t\t\t\t'ret' => 'result'\n\t\t\t));\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn (object)array(\"error\" => \"token \".$userid.\" not found\");\n\t\t}\n\t}", "public static function _CheckToken( $_CSRFToken = '' )\r\n\t\t{\r\n\t\t\t\r\n\t\t\tif ( Session::has( 'CSRFToken' ) && Session::get( 'CSRFToken' ) === Params::get( 'post' )->CSRFToken\r\n\t\t\t || Session::has( 'CSRFToken' ) && Session::get( 'CSRFToken' ) === $_CSRFToken )\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\tSession::clear( 'CSRFToken' );\r\n\t\t\t\t\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn false;\r\n\t\t}", "protected function _checkAuthToken($token)\n {\n $session = new Session();\n if ($session->get('token') === $token) {\n return true;\n }\n return false;\n }", "public function checkToken(): void\n {\n $fromSession = BackendModel::getSession()->get('csrf_token', '');\n $fromGet = $this->getRequest()->query->get('token');\n\n if ($fromSession !== '' && $fromGet !== '' && $fromSession === $fromGet) {\n return;\n }\n\n // clear the token\n BackendModel::getSession()->set('csrf_token', '');\n\n $this->redirect(\n BackendModel::createUrlForAction(\n $this->url->getDefaultActionForCurrentModule(),\n null,\n null,\n [\n 'error' => 'csrf',\n ]\n )\n );\n }", "public function validateToken(string $token): bool {\n $findToken = (new UserTokenModel())->findByToken($token);\n if (!$findToken) {\n return false;\n }\n\n $expirationDate = $findToken->expires_at;\n $dateNow = (new DateTime(\"Now\"))->format(\"Y-m-d H:i:s\");\n\n //checks if token is expired:\n if ($dateNow > $expirationDate) {\n //remove expired token from table:\n $findToken->destroy();\n return false;\n }\n\n return true;\n }", "public function checkToken(): void\n {\n $fromSession = BackendModel::getSession()->get('csrf_token', '');\n $fromGet = $this->getRequest()->query->get('token');\n\n if ($fromSession !== '' && $fromGet !== '' && $fromSession === $fromGet) {\n return;\n }\n\n // clear the token\n BackendModel::getSession()->set('csrf_token', '');\n\n $this->redirect(\n BackendModel::createUrlForAction(\n $this->getContainer()->get('url')->getDefaultActionForCurrentModule(),\n null,\n null,\n [\n 'error' => 'csrf',\n ]\n )\n );\n }", "function validate_token() {\n\n global $token;\n\n // If the user passed a username and password in this request\n // and did not login via a session, then token validation is not\n // necessary, so return true.\n if (defined('API_USERNAME')) {\n return true;\n }\n\n // If the token does not exist in the session,\n // or the passed token does not match the token from the session,\n // then this might be a CSRF attack so respond with an error.\n if (\n ($_SESSION['software']['token'] == '')\n || ($token != $_SESSION['software']['token'])\n ) {\n respond(array(\n 'status' => 'error',\n 'message' => 'Invalid token.'));\n }\n}", "public function hasToken(){\n return $this->_has(2);\n }", "public function hasToken(){\n return $this->_has(2);\n }", "public function checkToken($BearedToken){\n //$authenticatedToken = $this->user_model->checkToken($BearedToken);\n if($authenticatedToken){\n return true;\n }\n return false;\n }", "private function tokenExist() {\n if (!$this->webhook->token) {\n // throw an exception\n $this->missingEx('token');\n }\n }", "private static function validateAction($token){\n if( !isset($token) ) return false;\n //break down the csrf token into parts\n $parts = explode('-', $token);\n if( count($parts) != 3 ) return false;\n list($callback, $token, $hash) = $parts;\n \n $result = (sha1(config::$csrf_form_secret.'-'.$callback.'-'.$token) == $hash);\n if( $result ) $result = $callback;\n return $result;\n }", "function verifyFormToken($form) {\n\n\t\t// check if a session is started and a token is transmitted, if not return an error\n\tif(!isset($_SESSION[$form.'_token'])) {\n\t\treturn false;\n\t\t}\n\n\t// check if the form is sent with token in it\n\tif(!isset($_POST['token'])) {\n\t\treturn false;\n\t\t}\n\n\t// compare the tokens against each other if they are still the same\n\tif ($_SESSION[$form.'_token'] !== $_POST['token']) {\n\t\treturn false;\n\t\t}\n\n\treturn true;\n}", "public static function removeByToken($token)\n {\n try {\n self::where('token', $token)->delete();\n\n return true;\n } catch (\\Exception $e) {\n return false;\n }\n }", "public function checkApiToken($token, $delete = false)\n\t{\n\t\t$max = config('auth.api_tokens.max');\n\n\t\tif ($max > 1) // if max tokens is greater than 1, use relationship (otherwise just use \"api_token\" column)\n\t\t{\n\t\t\t$apiTokens = $this->apiTokens()->onlyActive()->get();\n\n\t\t\tforeach ($apiTokens as $apiToken)\n\t\t\t{\n\t\t\t\tif ($apiToken->check($token))\n\t\t\t\t{\n\t\t\t\t\tif ($delete)\n\t\t\t\t\t{\n\t\t\t\t\t\t$apiToken->delete();\n\t\t\t\t\t}\n\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$expired = !is_null($this->api_token_expired_at) && strtotime($this->api_token_expired_at) <= time();\n\n\t\t\tif (Hash::check($token, $this->api_token) && !$expired)\n\t\t\t{\n\t\t\t\tif ($delete)\n\t\t\t\t{\n\t\t\t\t\t$this->update([\n\t\t\t\t\t\t'api_token' => null,\n\t\t\t\t\t\t'api_token_expired_at' => null,\n\t\t\t\t\t]);\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "function is_valid_token($request)\n\t{\n\t\tif (!isset($request->token) || empty($request->token))\n\t\t\treturn [FALSE, ['message' => F::lang('err_token_invalid')]];\n\t\t// else\n\t\t\t// $request->token = urldecode($request->token);\n\t\t\n\t\tif ($request->agent == 'android') {\n\t\t\t$token = ['android_token' => $request->token];\n\t\t}\n\t\tif ($request->agent == 'ios') {\n\t\t\t$token = ['ios_token' => $request->token];\n\t\t}\n\t\tif ($request->agent == 'web') {\n\t\t\t$token = ['web_token' => $request->token];\n\t\t}\n\t\t\n\t\t$ci = &get_instance();\n\t\t$ci->load->model('auth_model');\n\t\t$row = $ci->auth_model->get_token($token);\n\t\tif (!$row)\n\t\t\treturn [FALSE, ['message' => F::lang('err_token_invalid')]];\n\n\t\tif ($request->agent == 'android') {\n\t\t\t$token = $row->android_token;\n\t\t\t$token_exp = $row->android_token_expired;\n\t\t}\n\t\tif ($request->agent == 'ios') {\n\t\t\t$token = $row->ios_token;\n\t\t\t$token_exp = $row->ios_token_expired;\n\t\t}\n\t\tif ($request->agent == 'web') {\n\t\t\t$token = $row->web_token;\n\t\t\t$token_exp = $row->web_token_expired;\n\t\t}\n\t\t\n\t\tif ($request->token != $token)\n\t\t\treturn [FALSE, ['result' => NULL, 'message' => F::lang('err_token_invalid')]];\n\t\t\n\t\tif ($token_exp < date('Y-m-d H:i:s'))\n\t\t\treturn [FALSE, ['result' => NULL, 'message' => F::lang('err_token_expired')]];\n\t\t\n\t\treturn [TRUE, ['result' => $row, 'message' => NULL]];\n\t}", "public function token_is_valid() {\n $token = $this->ci->input->post(\"token\");\n\n $this->ci->load->helper(\"access\");\n return check_token($token);\n }", "function verifyFormToken($form) {\r\n\t\t\r\n\t\t// check if a session is started and a token is transmitted, if not return an error\r\n\t\tif(!isset($_SESSION[$form.'_token'])) { \r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t// check if the form is sent with token in it\r\n\t\tif(!isset($_POST['token'])) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t// compare the tokens against each other if they are still the same\r\n\t\tif ($_SESSION[$form.'_token'] !== $_POST['token']) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}", "function token_ctrl($token) {\r\n\t$session=Zend_Auth::getInstance()->getStorage();\r\n\t$log=Zend_Registry::get(\"log\");\r\n\t$reply=array('or'=>false,'and'=>true);\r\n\tforeach ($token as $key => $value) {\r\n\t\tif (preg_match(\"#^token#\", $key)) {\r\n\t\t\t$t=$session->get($key);\r\n\t\t\t$reply[$key]=($value==$t);\r\n\t\t\t$reply['or']=$reply['or']||$reply[$key];\r\n\t\t\t$reply['and']=$reply['and']&&$reply[$key];\r\n\t\t\t$session->delete($key);\r\n\t\t\tif (!$reply[$key]) $log->log(\"errore $key, valore ricevuto $value, valore memorizzato $t\",Zend_Log::WARN);\r\n\t\t}\r\n\t}\r\n\treturn $reply;\r\n}", "function media_theplatform_mpx_check_token() {\n if (!media_theplatform_mpx_variable_get('token')) {\n return FALSE;\n }\n // If idleTimeout date has passed, signIn again.\n if (media_theplatform_mpx_variable_get('date_idletimeout') < time()) {\n // Expire the current token.\n media_theplatform_mpx_expire_token();\n // Retrieve and return new token.\n return media_theplatform_mpx_signin();\n }\n else {\n return TRUE;\n }\n}", "public function processToken()\n {\n if (!$this->_token) {\n return false;\n }\n\n if ($this->_isPasswordRecoveryToken) {\n $this->_processPasswordRecoveryToken();\n } else {\n $this->_processAuthToken();\n }\n\n /**\n * just for case. e.g. some chosen page not exist anymore etc.\n * Lead should not stay on page with token, so move lead to 404\n */\n if (!$this->_redirectUrl) {\n $this->_redirectUrl = '/404';\n }\n\n return true;\n }", "function csrf_token_is_valid()\r\n{\r\n if (isset($_POST['csrf_token'])) {\r\n $user_token = $_POST['csrf_token'];\r\n $stored_token = $_SESSION['csrf_token'];\r\n return $user_token === $stored_token;\r\n }\r\n\r\n return false;\r\n}", "function checkLoggedIn(){\n\tif(isset($_SESSION['access_token']))return true;\n\telse return false;\n}", "protected function verify_csrf_token($token=null) {\n if(!$token and isset($this->POST['csrf_token'])) {\n $token = $this->POST['csrf_token'];\n }\n\n if(isset($_SESSION['rpf_csrf_tokens'])) {\n $key = array_search(\n $this->POST['csrf_token'],\n $_SESSION['rpf_csrf_tokens']\n );\n if($key !== false) {\n unset($_SESSION['rpf_csrf_tokens'][$key]);\n return true;\n }\n }\n return false;\n }", "function verifyFormToken($form) {\n\t\tif (!isset($_SESSION[$form . '_token'])) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// check if the form is sent with token in it\n\t\tif (!isset($_POST['token'])) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// compare the tokens against each other if they are still the same\n\t\tif ($_SESSION[$form . '_token'] !== $_POST['token']) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "function validarToken($token)\n{\n\trequire_once \"api_conf.php\";\n\tif($token == $api_token)\n\t{\n\t\treturn true;\n\t}\n\n\t//cambiar a False en producción\n\treturn true;\n}", "public function logout($token) {\n try {\n $this->userProvider->unsetToken($token);\n return true;\n } catch (\\Wetcat\\Neo\\Users\\InvalidTokenException $e) {\n return false;\n } \n }", "public function deleteToken($dev_id) {\n \t$result = mysql_query(\"DELETE FROM $this->tokenTable WHERE token='$dev_id'\");\n \treturn TRUE;\n \t\n }", "function verify_form_token($form) {\n\t// Check if a session is started and a token is transmitted,\n\t// if not return an error\n\tif(!isset($_SESSION[$form.'_token'])) {\n\t\treturn false;\n\t}\n\n\t// Check if the form is sent with token in it\n\tif(!isset($_POST['token'])) {\n\t\treturn false;\n\t}\n\n\t// Compare the tokens against each other if they are still the same\n\tif ($_SESSION[$form . '_token'] !== $_POST['token']) {\n\t\treturn false;\n\t}\n\n\treturn true;\n}", "public static function isExist($token)\n {\n return self::find()->andWhere(['token_hash' => md5($token)])->exists();\n }", "function checkSystemSession() {\r\n\tglobal $Mysql;\r\n\tif(isset($_SESSION['BAGS_currentSystemToken'])) {\r\n\t\treturn \"fine\";\r\n\t}\r\n\telse {\r\n\t\t$newToken = substr(str_shuffle(\"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0011123434656787890\"),0,15);\r\n\t\t$_SESSION['BAGS_currentSystemToken']=$newToken;\r\n\t\t$addToken = $Mysql->query(\"INSERT INTO system_tokens (TokenString) VALUES ('$newToken')\");\r\n\t}\r\n}", "function verify($token)\n {\n $this->purge();\n $exists = $this->exists($token);\n if (is_a($exists, 'PEAR_Error')) {\n return $exists;\n } elseif ($exists) {\n return false;\n } else {\n return $this->add($token);\n }\n }", "public function verifySession() {\n\t\t$this->reload();\n\t\tif ($this->getSession() == session_id())\n\t\t\treturn true;\n\t\telse {\n\t\t\tif($_SESSION[\"loginUser\"])\n\t\t\t\tunset($_SESSION[\"loginUser\"]);\n\t\t\treturn false;\n\t\t}\n\t}", "public function verify($token):bool;", "public function validateToken($token)\n {\n if (isset($_SESSION['MFW_csrf-token']) && $_SESSION['MFW_csrf-token'] == $token) {\n return true;\n }\n\n return false;\n }", "public function verifyFormToken($form)\n\t{\n\t\tif (!isset($_SESSION[$form.'_token'])) {\n\t\t\treturn false;\n\t\t}\n \n\t\t// check if the form is sent with token in it\n\t\tif (!isset($_POST['token'])) {\n\t\t\treturn false;\n\t\t}\n \n\t\t// compare the tokens against each other if they are still the same\n\t\tif ($_SESSION[$form.'_token'] !== $_POST['token']) {\n\t\t\treturn false;\n\t\t}\n \n\t\treturn true;\n\t}", "function check_login()\r\n {\r\n if ($this->user != null) {\r\n return true;\r\n }\r\n if (!isset($_COOKIE[$this->manifest['session_token']])) {\r\n return false;\r\n }\r\n $session = $this->load_controller('Session');\r\n $this->user = $session->recover_session_by_token($_COOKIE[$this->manifest['session_token']]);\r\n if ($this->user == false) {\r\n $session->remove_session_recover_cookie();\r\n return false;\r\n }\r\n return true;\r\n }", "public function deleteApiToken($token)\n\t{\n\t\treturn $this->checkApiToken($token, true);\n\t}", "public function oauthRequestTokenVerify($token)\n {\n\t $sql = 'SELECT request_token FROM oauth_request_tokens\n WHERE request_token = ' . $this->db->escape($token) . '\n AND authorised_user_id IS NULL';\n $query = $this->db->query($sql);\n\n $result = $query->result();\n if(count($result) > 0) {\n return true;\n }\n return false;\n }", "protected function _checkToken(KCommandContext $context)\n {\n //Check the token\n if($context->caller->isDispatched())\n { \n $method = KRequest::method();\n \n //Only check the token for PUT, DELETE and POST requests (AND if the view is not 'ipn')\n if(($method != KHttpRequest::GET) && ($method != KHttpRequest::OPTIONS) && (KRequest::get('get.view', 'string') != 'ipn')) \n { \n if( KRequest::token() !== JUtility::getToken()) { \n return false;\n }\n }\n }\n \n return true;\n }", "function checkToken($params = array()){\n\t\textract($params);\n\t\t$r = false;\n\t\t//generally does not need sleep as it's the first API call \n\t\t$response = $this->getSellerCount();\n\t\t//print_r($response);die();\n\t\t\n\t\tif( (isset($response['error']) AND $response['error'] != '') OR (isset($response['errors']) AND $response['errors'] != '')){\n\t\t\t// !new token\n\t\t\t$r = $this->newToken(); \n\n// \t\tprint_r($response); \n// \t\tdie('p');\n\n\t\t\t\n\t\t\t//if($r == '' OR $r === true OR $r === false) $r = $this->newToken();\n\t\t\t\n\t\t\t//if($r !== '' AND $r !== true AND $r !== false){\n\t\t\t\t// new access token\n\t\t\t\t//echo 'Notice: NEW access token was generated ' . $r;\n\t\t\t\t//die();\n\t\t\t//}\n\t\t\t\n\t\t}elseif(isset($response['total_sellers'])){\n\t\t\t// !existing access token\n\t\t\t$r = true;\n\t\t}\n\t\t\n\t\t\n\t\treturn $r;\n\t}", "function validToken($name, $referer, $time)\n{\n\tif(isset($_SESSION[$name.'Token']) && isset($_SESSION[$name.'Token_time']) && isset($_POST['token']))\n\t\tif($_SESSION[$name.'Token']===$_POST['token'])\n\t\t\tif($_SESSION[$name.'Token_time']>=(time()-$time))\n\t\t\t\tif($_SERVER['HTTP_REFERER']==$referer)\n\t\t\t\t\treturn true;\n\treturn false;\n}", "function token_delete( $p_token_id ) {\r\n\t\t$c_token_id = db_prepare_int( $p_token_id );\r\n\r\n\t\t$t_tokens_table\t= config_get( 'mantis_tokens_table' );\r\n\t\t# Remove\r\n\t\t$query = \"DELETE FROM $t_tokens_table\r\n\t\t \tWHERE id='$c_token_id'\";\r\n\t\tdb_query( $query, 1 );\r\n\t\treturn true;\r\n\t}", "private function checkTokenExpire()\n {\n if (new DateTime() > $this->tokenExpire) {\n $this->refreshToken();\n $this->getAuthorization();\n }\n }", "public function hasToken(){\n return ( $this->token and $this->token->isValid() );\n }", "function csrf_token_is_recent() {\n\t$max_elapsed = 60 * 60 * 24; // 1 day\n\tif(isset($_SESSION['csrf_token_time'])) {\n\t\t$stored_time = $_SESSION['csrf_token_time'];\n\t\treturn ($stored_time + $max_elapsed) >= time();\n\t} else {\n\t\t// Remove expired token\n\t\tdestroy_csrf_token();\n\t\treturn false;\n\t}\n}", "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}", "static function validateToken($tokenString) {\n\t\t$token = \\App::model('user/token');\n\t\t$token->load(['token = ?', $tokenString]);\n\t\tif($token->get('id')) {\n\t\t\tif(strtotime($token->get('expires_at')) > time()) {\n\t\t\t\treturn $token->get('user_id');\n\t\t\t} else {\n\t\t\t\t$token->delete();\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "function isLoggedIn($token){\n\t\tglobal $db;\n\t\tglobal $Student;\n\t\t$session = $this->GetUserIdByToken($token);\n\t\tif($session!=null)\n\t\t{\n\t\t\t$Student->UpdateActiveDate($session);\n\t\t\treturn true;\n\t\t}\n\t\telse return (object)array(\"error\" => \"token not found\");\n\t}", "public static function hasToken(Request $request);", "public function is_valid($token) {\n\t\treturn ! empty($token) &&\n\t\t\t ! empty($_COOKIE[self::$csrf_cookie]) && \n\t\t\t hash_equals($_COOKIE[self::$csrf_cookie], $token);\n\t}", "public static function check_token($submitted_token) {\n\t\t\t// Check if a token was submitted\n\t\t\tif($submitted_token) {\n\t\t\t\t// Token was submitted\n\t\t\t\t// Bring in the session variable\n\t\t\t\tglobal $session;\n\t\t\t\t\n\t\t\t\t// Check if the submitted token matches the one in the database\n\t\t\t\tif($submitted_token == $session->get('csrf_token')) {\n\t\t\t\t\t// Token is the same\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\t// Token is not the same\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Token wasn't submitted\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "function checkSession()\n {\n if(isset($_COOKIE['sessionId']))\n {\n $response = callApi('GET', 'session', ['sessionid' => $_COOKIE['sessionId']]);\n if($response['code'] == '200')\n return true;\n else\n return false;\n }\n }", "public static function checkToken(string $api_token = null) : bool\n {\n $token = DB::table('api_tokens')\n ->where('token', $api_token)\n ->where('expires_at', '>', now()->toDateTimeString())\n ->first();\n if ($token) {\n return true;\n }\n return false;\n }", "private function checkShopToken() \n\t{\t\n\t\t$shop_token = Shopware()->Front()->Request()->getParam('shop_token');\n\t\t\n if(isset($shop_token) && !empty($shop_token)) \n\t\t{\n $config = EasymarketingConfig::getInstance();\n\n if($shop_token != $config->getShopToken()) \n\t\t\t{\n header('HTTP/1.0 400 Bad Request');\n echo 'Wrong Shop Token!';\n die;\n }\n } else {\n header('HTTP/1.0 400 Bad Request');\n echo 'Shop Token Missing!';\n die;\n }\n \n return true;\n }", "public function validateTokenOwnership($token, $timestamp, $session_token = '') {\n\t\t$required_token = $this->generateActionToken($timestamp, $session_token);\n\n\t\treturn _elgg_services()->crypto->areEqual($token, $required_token);\n\t}", "public function existe() {\r\n\t\treturn $__sesion->get('__token');\r\n }", "public function verifyMobileToken($mobile_token){\n\n $row = DB::table(self::CONFIRMATION_TOKENS_TABLE)\n\n ->where('identification_code', $this->identification_code)\n ->where('mobile_confirmation_token',$mobile_token);\n\n if ($row->exists()){\n\n $this->update(['mobile_confirmed' => 1]);\n\n $this->email_confirmed == 1 ? $row->delete() : $row->update(['mobile_confirmation_token' => null]);\n\n return true;\n }\n }", "private function validate_token( $token ) {\n\t\t$order_id = $this->model->get_order_id_from_token( $token );\n\t\tif ( $order_id && md5( $order_id ) === $token ) {\n\t\t\treturn $order_id;\n\t\t}\n\t\treturn false;\n\t}", "public function requireValidToken($msg = 'Cross site request forgery detected. Request aborted!', $token = null) {\n\t\tif (is_null($token))\n\t\t\t$token = $this->createToken();\n\n\t\t$tokenName = is_array($token) ? $token['name'] : $token;\n\n\t\tif (Flight::request()->data[$tokenName] != $_SESSION[$tokenName])\n\t\t\tFlight::halt(403, $msg);\n\n\t\treturn true;\n\t}", "function valida_token($token) {\n global $mdb2;\n global $log;\n global $type;\n\n $sql = \"SELECT token_id FROM public.token \" .\n \"WHERE token ='\" . $token . \"' AND extract(epoch from age(now(),fecha))<60\";\n $res = & $mdb2->query($sql);\n if (MDB2::isError($res)) {\n return false;\n }\n\n //SI ENCUENTRA EL TOKEN LO ELIMINA Y PROCEDE\n if ($row = $res->fetchRow()) {\n if ($type->content != 'pdf' or isset($_REQUEST[\"acceso_pdftohtml\"])) {\n $token_id = $row[\"token_id\"];\n $sql2 = \"DELETE FROM public.token WHERE token_id = \" . $token_id;\n $res2 = & $mdb2->query($sql2);\n if (MDB2::isError($res2)) {\n return false;\n }\n }\n return true;\n } else {\n return false;\n }\n}", "private function token_validate($user, $token)\n\t\t{\n\t\t\t// Token hash the user should have from the IP the cookie was given to\n\t\t\t$tok1 = $this->ip_lock($this->getAuthToken($user), $token[2]);\n\n\t\t\t// Token hash the user should have now\n\t\t\t$tok2 = $this->ip_lock($this->getAuthToken($user));\n\n\t\t\t// Token hash the user sent\n\t\t\t$tok3 = $token[1];\n\n\t\t\tif ($tok1 != $tok3)\n\t\t\t\treturn -1; // Invalid token, user session key changed, or cookie was edited\n\n\t\t\treturn $tok2 == $tok3 ? 1 : 0;\n\t\t}", "public function checkTokenAndAdmin($token)\n {\n return (!empty($token) && !empty($this->state['webToken'])\n && $token == $this->state['webToken'] && !empty($this->state['admin']));\n }", "function check_if_token_exist($token)\n{\n global $DB_connect;\n\n $statement = $DB_connect->prepare(\"SELECT\n token\n FROM \n db.user\n WHERE\n token = :token;\");\n $statement->execute(['token' => $token]);\n if ($statement->fetch())\n return (true);\n return (false);\n}", "public function refresh_token()\n {\n if ($result = $this->request('refresh_token')) {\n if (isset($result->token)) {\n $this->token_update($result->token);\n return true;\n }\n }\n return false;\n }", "public function checkCsrfPostToken($strToken){\n\t\t$strExpectedToken = $this->data['session_key'];\n\t\tif ($strToken === $strExpectedToken) return true;\n\t\treturn false;\n\t}", "public function checkSession() {\n if ($this->session->userdata('ohadmin')) {\n return TRUE;\n }\n else {\n return FALSE;\n }\n }", "function authenticated()\n{\n if (isset($_SESSION['sessionToken'])) {\n return true;\n }\n}", "function adminSessionExists() {\n\t\tif ((isset($_SESSION['valid_admin'])) && (($_SESSION['valid_admin']) != null)) {\n\t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\t}", "public function validate ( $token ) { return $this->server->token2uid( $token ) > 0; }" ]
[ "0.8104914", "0.8099782", "0.8097319", "0.800509", "0.7889978", "0.7459198", "0.74321926", "0.72856367", "0.7197678", "0.71761227", "0.7157418", "0.70978606", "0.7001567", "0.6988043", "0.6958434", "0.6947647", "0.69197774", "0.6891097", "0.6850057", "0.6777711", "0.67703754", "0.67551863", "0.6742724", "0.6739903", "0.67373514", "0.6700945", "0.66755587", "0.6653728", "0.66477543", "0.66407084", "0.66334856", "0.6616599", "0.6611456", "0.66035306", "0.6574517", "0.65704185", "0.6559507", "0.65223885", "0.65223885", "0.6516386", "0.65148365", "0.6514586", "0.65062475", "0.6489672", "0.6482073", "0.64528596", "0.6449431", "0.6447315", "0.64450324", "0.64329123", "0.64280325", "0.6422866", "0.6418636", "0.641164", "0.64090514", "0.6390708", "0.6388948", "0.63737905", "0.6365712", "0.63650733", "0.63515437", "0.6335854", "0.632741", "0.63059264", "0.62882423", "0.6256757", "0.6238574", "0.62195015", "0.6214987", "0.6211228", "0.62080705", "0.62005675", "0.6195516", "0.61885387", "0.6185704", "0.6179299", "0.61783236", "0.61715096", "0.6168929", "0.61678195", "0.61605084", "0.61581814", "0.6157327", "0.6153068", "0.6152882", "0.613408", "0.61229414", "0.6117376", "0.6110955", "0.6102106", "0.60937715", "0.609034", "0.6079188", "0.605722", "0.6046963", "0.60285157", "0.60276353", "0.60261524", "0.60153294", "0.60031813" ]
0.8151756
0
Index Page for this controller. Maps to the following URL or or Since this controller is set as the default controller in config/routes.php, it's displayed at So any other public methods not prefixed with an underscore will map to /index.php/welcome/
public function generate_currencies() { $this->load->model('Currency_model'); $json = file_get_contents('https://free.currencyconverterapi.com/api/v6/currencies'); $currencies = json_decode($json); foreach ($currencies->results as $currency) { echo json_encode($currency); $this->Currency_model->id_currency = $currency->id; $this->Currency_model->name = $currency->currencyName; if (property_exists($currency, "currencySymbol")) { $this->Currency_model->symbol = $currency->currencySymbol; } else { $this->Currency_model->symbol = null; } $this->Currency_model->insert(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index () {\n $view = new WelcomeIndex();\n $view->display();\n }", "public function index()\n\t{\n\t\treturn view(\"welcome\");\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome');\n\t}", "public function action_index()\r\n\t{\r\n\t\t$this->title = 'Welcome';\r\n\t\t$this->template->content = View::factory('index');\r\n\t}", "public function index()\n\t{\n\t\treturn view('welcome');\n\t}", "public function index()\n\t{\n\t\treturn view('welcome');\n\t}", "public function indexAction()\n\t{\n\t\t//echo 'Hello from the index action in the Home controller!';\n\t\t\n\t\t/*View::render('Home' . DS . 'index.php', [\n\t\t\t\"name\" => \"Laura\",\n\t\t\t\"colours\" => [\"red\", \"green\", \"blue\"]\n\t\t]);*/\n\t\t\n\t\t// View::renderTemplate('Home' . DS . 'index.html', [\n\t\t// \t\"name\" => \"Laura\",\n\t\t// \t\"colours\" => [\"red\", \"green\", \"blue\"]\n // ]);\n \n\t\t$this->showRouteParams();\n\t\t// echo \"Hello, World!\";\n }", "public function index()\n\t{\n\t\t//Default view\n\t\t$this->load->view('index.html');\n\t}", "function index() {\n\n // This page cannot be accessed without providing a page\n // the routes.php file will not allow the page to be accessed\n // $route['pages/(:any)'] = 'pages/view/$';\n redirect('/', 'refresh');\n\n }", "public function Index()\n\t{\n\t\t$this->views->SetTitle('Index Controller');\n\t\t$this->views->AddView('index/index.tpl.php', array(),'primary');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('default/index');\n\t}", "public function index() {\n\t\t$this->display('index');\n\t}", "public function index()\n\t{\t\n\n\t\t$this->load->view('welcome_message');\n\t}", "public function indexAction()\n {\n $arr = [\n 'title' => 'Welcome',\n 'data' => [\n 'name' => 'PHP FRAMEWORK',\n ]\n ];\n View::renderTemplate('Welcome/index.html', $arr);\n }", "public function index()\n\t{\n\t\t$this->load->view('index');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('index');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('index');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('index');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('index');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('index');\n }", "public function show_index()\n {\n return view('welcome');\n }", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function Index()\n {\n $this->standardView('Index');\n }", "public function index()\n {\n return view('main.welcome');\n }", "public function index()\n {\n // return view('welcome');\n }", "public function index()\n {\n $this->load->view('index');\n }", "public function index()\n {\n // return view('welcome');\n \n }", "public function index()\n\t{\n\t\t$this->load->view('home');\n\t}", "public function index()\n\t{\n\t\techo \"Nothing !\";\n\t}", "public function index() {\n \n return view('welcome');\n }", "public function index()\n {\n return view('pages.welcome');\n }", "public function index()\n {\n $this->load->view('welcome_message');\n }", "public function index()\n {\n $this->load->view('welcome_message');\n }", "public function Index()\n {\n \treturn view(\"index\");\n\t}", "public function index()\n {\n\t\t/*$this->layout->setTitle('Welcome to our Blog');\n\t\t$this->layout->showView('welcome/about.php');*/\n\t\techo 'hello I\\'m using codeigniter';\n }", "public function index() {\n\n\t\tif(!empty($_GET['page'])) {\n\t\t\tif($_GET['page'] == 'home') {\n\t\t\t\t(new HomeController)->home();\n\t\t\t} elseif($_GET['page'] == 'about-me') {\n\t\t\t\t(new HomeController)->aboutMe();\n\t\t\t}\n\t\t} else {\n\t\t\t(new HomeController)->home();\n\t\t}\n\t}", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n\t{\n\t\treturn view('pages/home');\n\t}", "public function index()\n {\n return \"INDEX PAGE\";\n }", "public function index()\n\t{\n\t\treturn view('home');\n\t}", "public function index()\n\t{\n\t\treturn view('home');\n\t}", "function index() {\n \n parent::index();\n\n\t\t$data['user_id'] = $this->tank_auth->get_user_id();\n\t\t$data['username'] = $this->tank_auth->get_username();\n\t\t$data['main_content_view'] = $this->load->view('welcome', $data, true);\n $this->render_template($data);\n\t}", "public function index()\n {\n SEOMeta::setTitle('Trusted Mortgage & Remortgage Solutions In UK - SmartMortgages UK');\n SEOMeta::setDescription('Home Page Description: For competitive mortgage and remortgage quotes around the UK at affordable rates, speak to one of our expert credit consultants and get a mortgage. For more visit us today.');\n\n return view('welcome');\n }", "public function index()\n\t{\n\t\t$this->title = 'My Index Action';\n\n\t\treturn new View('basic/index');\n\t}", "public function index()\n\t{\n\t\t$data['title'] = 'Home | Welcome to AEY';\n\t\t$data ['view_page'] = 'homepage';\n\n\t\t$this->load->view('site', $data);\n\t}", "public function index()\n {\n\n return view('welcome');\n\n }", "public function actionIndex(){ \n $this->view(\"index.php\");\n }", "public function index() {\n $this->registry->template->module = 'welcome';\n \n /*** load the index template ***/\n $this->registry->template->show('index');\n }", "public function actionIndex()\n\t{\n\t $this->pageTitle = 'Get Started';\n\t\t$this->render('index');\n\t}", "public function index()\n {\n return view('front.welcome');\n }", "public function index()\n\t{\n\t\treturn $this->traces();\n\t\treturn view('welcome');\n\t}", "public function index()\n\t{\n\t\t$this->loadViews(\"index\");\n\t}", "public function index() {\n\t\t$this->title = 'Home';\n\t\t$this->pageData['pages'] = Page::getAll();\n\t\t$this->render('index');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('home/home');\n\t}", "public function index() \n\t{\n\t\t$this->_render_hod_view('home');\n\t}", "public function index()\r\n\t{\r\n\t\techo \"index\";\r\n\t}", "public function index()\n\t{\n\t\t$this->twig->display('welcome/index.html', []);\n\t}", "public function Index() {\n $this->Display();\n }", "public function index()\r\n {\r\n View::render('home');\r\n }", "public function index()\n {\n $title = 'Welcome Page';\n return view($this->view . '.home', compact('title'));\n }", "public function index()\n\t{\n\t\t//\n\t\techo'index';\n\t}", "public function index() {\n $this->getView('navigation', array('pagename' => 'Welcome'));\n $this->getView('welcome');\n $this->getView('footer');\n }", "public function index()\n {\n return view(\"home\");\n }", "public function home()\n\t{\n\t\t$this->load->view('index_view');\n\t}", "function index() {\n $this->renderView(\"index\");\n }", "function index()\r\n\t{\r\n\t\t$this->view(); \r\n\t}", "public function index()\n\t{\n\t\treturn view('index');\n\t}", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n\n\n\n return view('welcome');\n }", "public function index() {\n\t\t$page = Page::getInstance();\n\t\t$session = Session::getInstance();\n\t\t$page->setPageTitle('Method index notfound');\n\t\t$session->setFlash('Chaque controller doit avoir une m&eacute;thode index', 'error');\n\t}", "public function index()\r\n\t{\r\n\t\t//\r\n\t}", "public function index() {\n\t\t// render the view (/view/main/index.php)\n\t\t$this->view->render(\"main\", \"index\");\n\t}", "public function index()\n {\n return View(\"pages.home\");\n }", "public function index()\n {\n // Nothing to do\n }", "public function index(){\n return view('welcome');\n }", "public function index()\n\t{\n\t\t//\n\t}", "public function index()\n\t{\n\t\t//\n\t}", "public function index()\n\t{\n\t\t//\n\t}", "public function index()\n\t{\n\t\t//\n\t}" ]
[ "0.7654909", "0.7412712", "0.73954225", "0.73159236", "0.72264016", "0.72264016", "0.7188618", "0.7164213", "0.7150304", "0.7143225", "0.7106181", "0.7075943", "0.7074692", "0.7039509", "0.7028076", "0.7028076", "0.7028076", "0.7028076", "0.7028076", "0.69718754", "0.69670206", "0.6947087", "0.6947087", "0.6947087", "0.6947087", "0.6947087", "0.6947087", "0.6947087", "0.6947087", "0.6947087", "0.6947087", "0.6947087", "0.6947087", "0.6947087", "0.6929708", "0.6924577", "0.69105154", "0.6899434", "0.6893072", "0.6873729", "0.6856493", "0.6855149", "0.6837898", "0.68024063", "0.68024063", "0.6801295", "0.6794864", "0.6788573", "0.6766246", "0.6766246", "0.6766246", "0.6766246", "0.6766246", "0.6766246", "0.6766246", "0.6766246", "0.6766246", "0.6766246", "0.6766246", "0.6763474", "0.6762501", "0.6758637", "0.6758637", "0.6750621", "0.67491746", "0.67462116", "0.6740811", "0.6737234", "0.6727614", "0.671619", "0.6712095", "0.67097425", "0.6702618", "0.6698302", "0.6690376", "0.6673562", "0.6660729", "0.66596836", "0.6649866", "0.6629911", "0.6619569", "0.66115814", "0.66031855", "0.65971345", "0.659193", "0.65914005", "0.6583719", "0.6574647", "0.65734357", "0.65726984", "0.6553062", "0.65455437", "0.654379", "0.6541781", "0.6540988", "0.65402174", "0.6516171", "0.65141875", "0.65141875", "0.65141875", "0.65141875" ]
0.0
-1
Default "to string" handler Allows pages to _p()/echo()/print() this object, and to define the default way this object would be outputted. Can also be called directly via $objGroupParticipation>__toString().
public function __toString() { return sprintf('GroupParticipation Object %s', $this->intId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __toString()\n {\n return Text::format(self::DEFAULT_TO_STRING, get_class($this));\n }", "public function __toString()\n\t{\n\t\tswitch ($this->last_called) {\n\t\t\tcase \"Get_Documents_By_Name\":\n\t\t\tcase \"Get_Documents\":\n\t\t\tcase \"Get_Document_List\":\n\t\t\t\treturn $this->formatDocumentList();\n\t\t\t\t\n\t\t\tcase \"Get_Document_Log\":\n\t\t\tcase \"Log_Document\":\n\t\t\tcase \"Send_Document\":\n\t\t\tcase \"Get_Document_Id\":\n\t\t\tcase \"Get_Application_Data\":\n\t\t\tcase \"Get_Application_History\":\n\t\t\tdefault:\n\t\t\t\treturn $this->obj->__toString();\n\t\t}\n\t}", "public function __toString()\n {\n return (string) $this->exportTo(SekolahPaudPeer::DEFAULT_STRING_FORMAT);\n }", "public function __toString()\n {\n return (string) $this->exportTo(SanitasiPeer::DEFAULT_STRING_FORMAT);\n }", "public function __toString () {\r\n\t\treturn '';\r\n\t}", "public function __tostring();", "public function __toString()\n\t{\n\t\treturn \n\t\t\t'$id\t\t\t\t: ' . $this->id .\t\t\t\t'<br/>' .\n\t\t\t'$id_person\t\t\t: ' . $this->id_person .\t\t\t'<br/>' .\n\t\t\t'$aanvraag\t\t\t: ' . $this->aanvraag .\t\t\t'<br/>' .\n\t\t\t'$invitation\t\t: ' . $this->invitation\t . '<br/>' .\n\t\t\t'$invitationSent\t: ' . $this->invitationSent . '<br/>' .\n\t\t\t'$reaction\t: ' . $this->reaction . '<br/>';\n\t\t\t'$emailadres\t: ' . $this->emailadres . '<br/>';\n\t}", "public function __toString()\n {\n return (string) $this->exportTo(JadwalPeer::DEFAULT_STRING_FORMAT);\n }", "public function __toString() {\r\n\t\treturn $this->getPrint();\r\n\t}", "public function __toString() {\r\n\t\treturn $this->getPrint();\r\n\t}", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString() {\n\t\treturn $this->getPrint();\n\t}", "public abstract function __toString();", "public function __toString(): string\n {\n return (string) $this->call('__toString');\n }", "public function __toString()\n {\n return (string) $this->exportTo(BangunanPeer::DEFAULT_STRING_FORMAT);\n }", "public function __toString()\n\t{\n\t\treturn '';\n\t}", "public function __toString() {\n //(string)var_export($this);\n }", "public function __toString()\n {\n return (string) $this->exportTo(MontacargasPeer::DEFAULT_STRING_FORMAT);\n }", "public function __toString() {\n return get_class($this).\"-\".spl_object_hash($this).\"=( \".\n \"module=\".$this->module.\", \".\n \"fname=\".$this->fname.\", \".\n \"groupid=\".$this->groupid.\", \".\n \"name=\".$this->name.\", \".\n \"title=\".$this->title.\", \".\n \"text=\".$this->text.\", \".\n \"show=\".$this->show.\", \".\n \"disabled=\".$this->disabled.\", \".\n \"required=\".$this->required.\", \".\n \"type=\".$this->type.\", \".\n \"btype=\".$this->btype.\", \".\n \"regex=\".$this->regex.\", \".\n \"length=\".$this->length.\", \".\n \"size=\".$this->length.\", \".\n \"min=\".$this->min.\", \".\n \"max=\".$this->max.\", \".\n \"cols=\".$this->cols.\", \".\n \"rows=\".$this->rows.\", \".\n \"selected=\".$this->selected.\", \".\n \"checked=\".$this->checked.\", \".\n \"value=\".$this->value.\", \".\n \"source=\".$this->source.\n \"tclasses=\".$this->tclasses.\", \".\n \"iclasses=\".$this->iclasses.\", \".\n \"filters=\".$this->filters.\", \".\n \"roles=\".$this->roles.\n \" )\";\n }", "public function __toString() {\n if ($this->type == \"individu\") {\n return \"[\" . $this->login . \"] est un individu. Contactez le/la par mail: \" . $this->email;\n } else {\n return \"[\" . $this->login . \"] est une association. Contactez la par mail: \" . $this->email;\n }\n }", "public function __toString()\n {\n try {\n return $this->toString();\n } catch (\\Exception $e) {\n return '';\n }\n }", "function __toString() {\n return $this->string();\n }", "public function __toString()\n {\n notice('Object: \"'.get_class($this).'\" is used as string');\n\n return 'Object('.get_class($this).')';\n }", "function __toString();", "function __toString();", "function __toString();", "public function __toString()\n {\n return \"\";\n }", "public function __toString()\n {\n return \"\";\n }", "public function __toString(): string\n {\n return (string) $this->format();\n }", "public function __toString() {\n\t\treturn $this->recipient;\n\t}", "function __toString(){\n\t\treturn $this->toString();\n\t}", "public function toString() {}", "public function toString() {}", "public function toString() {}", "public function toString() {}", "public function toString() {}", "public function toString() {}", "public function __toString()\n {\n return (string) $this->exportTo(ActionTypePeer::DEFAULT_STRING_FORMAT);\n }", "abstract public function __toString() ;", "public function __toString() : string\n {\n return $this->toString();\n }", "public /*string*/ function __toString()\n\t{\n\t\treturn \"\";\n\t}", "abstract public function __toString();", "abstract public function __toString();", "abstract public function __toString();", "abstract public function __toString();", "abstract public function __toString();", "abstract public function __toString();", "final public function __toString(): string {}", "public function __toString(): string\n\t{\n\t\ttry {\n\t\t\treturn $this->toString();\n\t\t} catch (Throwable) {\n\t\t\treturn '';\n\t\t}\n\t}", "public function __toString() {}", "public function __toString() {}", "public function __toString() {}", "public function __toString() {}", "public function __toString() {}", "public function __toString() {}", "public function __toString() {}", "public function __toString() {}", "public function __toString() {}", "public function __toString() {}", "public function __toString() {}", "public function __toString() {}", "public function __toString() {}", "public function __toString() {}", "public function __toString() {}" ]
[ "0.6584186", "0.64531374", "0.6373067", "0.63469106", "0.6318043", "0.63144076", "0.6307043", "0.62735796", "0.6257036", "0.6257036", "0.62569803", "0.62569803", "0.62569803", "0.62569803", "0.62569803", "0.62569803", "0.62569803", "0.62569803", "0.62569803", "0.62569803", "0.62569803", "0.62569803", "0.62569803", "0.62569803", "0.62569803", "0.62569803", "0.62569803", "0.62569803", "0.62569803", "0.62569803", "0.62569803", "0.62569803", "0.62569803", "0.62569803", "0.62569803", "0.62569803", "0.62569803", "0.62569803", "0.62569803", "0.62569803", "0.62569803", "0.62569803", "0.62569803", "0.62569803", "0.62569803", "0.62569803", "0.62569803", "0.6249945", "0.6248852", "0.6248093", "0.62452024", "0.62381506", "0.622951", "0.62291074", "0.6227959", "0.6183168", "0.61731344", "0.61666816", "0.6162516", "0.61530477", "0.61530477", "0.61530477", "0.6152781", "0.6152781", "0.6147304", "0.61466306", "0.61346805", "0.6129888", "0.6129888", "0.6129888", "0.6129758", "0.6129758", "0.6129586", "0.6121588", "0.61204696", "0.61189234", "0.6108147", "0.61081046", "0.61081046", "0.61081046", "0.61081046", "0.61081046", "0.61081046", "0.6107326", "0.6101774", "0.6095237", "0.6095237", "0.6095237", "0.6095237", "0.6095237", "0.60949904", "0.60949904", "0.6094758", "0.6094259", "0.6094259", "0.6094259", "0.6094259", "0.6094259", "0.6094259", "0.6094259" ]
0.7102918
0
Given an array of start and end dates (ordered by start date) Parameter is an array of array of dates: array( array(StartDateForFirstParticipation1, EndDateForParticipation1), array(StartDateForFirstParticipation2, EndDateForParticipation2), array(StartDateForFirstParticipation3, EndDateForParticipation3), array(StartDateForFirstParticipationN, EndDateForParticipationN) );
public static function IsValidDates($dttDateArray) { for ($intIndex = 0; $intIndex < count($dttDateArray); $intIndex++) { // Start Date must be later than previous's Start Date and End Date if ($intIndex > 0) { if ($dttDateArray[$intIndex][0]->IsEarlierThan($dttDateArray[$intIndex-1][0])) return false; if (!$dttDateArray[$intIndex-1][1]) return false; if ($dttDateArray[$intIndex][0]->IsEarlierThan($dttDateArray[$intIndex-1][1])) return false; } // End Date must be later than start date (if applicable) if ($dttDateArray[$intIndex][1]) { if ($dttDateArray[$intIndex][0]->IsLaterThan($dttDateArray[$intIndex][1])) return false; } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function leadsInDates($start, $end, $data = []);", "function datePeriod_start_end($begin, $end)\n{\n $begin = new DateTime($begin);\n\n $end = new DateTime($end.' +1 day');\n\n $daterange = new DatePeriod($begin, new DateInterval('P1D'), $end);\n\n foreach ($daterange as $date) {\n $dates[] = $date->format(\"Y-m-d\");\n }\n return $dates;\n}", "function createDateRange($startDate, $endDate, $format = \"Y-m-d\")\r\n{\r\n $begin = new DateTime($startDate);\r\n $end = new DateTime($endDate);\r\n \r\n $interval = new DateInterval('P1D'); \r\n $dateRange = new DatePeriod($begin, $interval, $end);\r\n \r\n $range = [];\r\n \r\n for($i=$begin;$i<=$end;$i->modify('+1 day')) {\r\n $range[] = $i->format($format);\r\n \r\n }\r\n return $range; \r\n}", "function createDateArray($start_dt, $end_dt)\n\t{\n\t\t$arr_dates = array();\n\t\t$arr_dates[] = $start_dt = strtotime($start_dt);\n\t\twhile(1)\n\t\t{ \n\t\t\t$start_dt = strtotime(\"+1 day\", $start_dt);\n\t\t\tif($start_dt <= strtotime($end_dt))\n\t\t\t{\n\t\t\t\t$arr_dates[] = $start_dt;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn $arr_dates;\n\t}", "function DatesBetween($startDate, $endDate){\r\n\t$days = (strtotime($endDate) - strtotime($startDate)) / 86400 + 1;\r\n\t$startMonth = date(\"m\", strtotime($startDate));\r\n\t$startDay = date(\"d\", strtotime($startDate));\r\n\t$startYear = date(\"Y\", strtotime($startDate));\r\n\t$dates;//the array of dates to be passed back\r\n\tfor($i=0; $i<$days; $i++){\r\n\t\t$dates[$i] = date(\"m/d/Y\", mktime(0, 0, 0, $startMonth , ($startDay+$i), $startYear));\r\n\t}\r\n\treturn $dates;\r\n}", "function getDatesFromRange($start, $end, $format = 'Y-m-d') { \n \n // Declare an empty array \n $array = array(); \n \n // Variable that store the date interval \n // of period 1 day \n $interval = new DateInterval('P1D'); \n \n $realEnd = new DateTime($end); \n $realEnd->add($interval); \n \n $period = new DatePeriod(new DateTime($start), $interval, $realEnd); \n \n // Use loop to store date into array \n foreach($period as $date) { \n $array[] = $date->format($format); \n } \n \n // Return the array elements \n return $array; \n}", "public function createFromDatePeriodProvider()\n {\n $start[0] = new DateObject('2021-05-01');\n $end[0] = new DateObject('2021-11-01');\n $interval[0] = new DateIntervalObject('P1M');\n $option[0] = 0;\n\n //end is DateObject option EXCLUDE_START_DATE\n $start[1] = new DateObject('2021-05-01');\n $end[1] = new DateObject('2021-11-01');\n $interval[1] = new DateIntervalObject('P1M');\n $option[1] = DatePeriod::EXCLUDE_START_DATE;\n\n //end is recurrence option 0\n $start[2] = new DateObject('2021-05-01');\n $end[2] = 9;\n $interval[2] = new DateIntervalObject('P1M');\n $option[2] = 0;\n\n //end is recurrence option EXCLUDE_START_DATE\n $start[1] = new DateObject('2021-05-01');\n $end[1] = 9;\n $interval[1] = new DateIntervalObject('P1M');\n $option[1] = DatePeriod::EXCLUDE_START_DATE;\n\n return array_map(\n function (\n $start,\n $interval,\n $end,\n $option,\n ) {\n return [\n new DatePeriod(\n $start->toDateTimeImmutable(),\n $interval->toDateInterval(),\n is_int($end) ?\n $end :\n $end->toDateTimeImmutable(),\n $option,\n ),\n $option,\n new DatePeriod(\n $start->toDateTimeImmutable(),\n $interval->toDateInterval(),\n is_int($end) ?\n $end :\n $end->toDateTimeImmutable(),\n $option,\n ),\n ];\n },\n $start,\n $interval,\n $end,\n $option,\n );\n }", "private function createDateRangeArray($strDateFrom,$strDateTo)\n{\n // inclusive array of the dates between the from and to dates.\n\n // could test validity of dates here but I'm already doing\n // that in the main script\n\n $aryRange=array();\n\n $iDateFrom=mktime(1,0,0,substr($strDateFrom,5,2), substr($strDateFrom,8,2),substr($strDateFrom,0,4));\n $iDateTo=mktime(1,0,0,substr($strDateTo,5,2), substr($strDateTo,8,2),substr($strDateTo,0,4));\n\n if ($iDateTo>=$iDateFrom)\n {\n array_push($aryRange,date('Y-m-d',$iDateFrom)); // first entry\n while ($iDateFrom<$iDateTo)\n {\n $iDateFrom+=86400; // add 24 hours\n array_push($aryRange,date('Y-m-d',$iDateFrom));\n }\n }\n return $aryRange;\n}", "private function GetBetweenArray()\n {\n for(reset($this->dataArray); (list($key,$val)=each($this->dataArray)) !== false;)\n {\n if (($this->Date2MoreDate1($this->startPoint['Arrival']['Date'] . ' ' . $this->startPoint['Arrival']['Time'], $val['Arrival']['Date'] .' '. $val['Arrival']['Time']))\n && ($this->Date2MoreDate1($val['Arrival']['Date'] .' '. $val['Arrival']['Time'], $this->endPoint['Arrival']['Date'] . ' ' . $this->endPoint['Arrival']['Time'])))\n $this->BetweenStartEnd[] = $val;\n }\n }", "function findDatesFromDateRange($dateStart, $dateEnd){\r\n $foundDates = array($dateStart);\r\n while(end($foundDates) < $dateEnd){\r\n $foundDates[] = date('Y-m-d', strtotime(end($foundDates).' +1 day'));\r\n }\r\n// Array of foundDates\r\nreturn $foundDates;\r\n}", "function fechas($start, $end) {\n\t\t$range = array();\n\t\n\t\tif (is_string($start) === true) $start = strtotime($start);\n\t\tif (is_string($end) === true ) $end = strtotime($end);\n\t\n\t\tif ($start > $end) return createDateRangeArray($end, $start);\n\t\n\t\tdo {\n\t\t\t$range[] = date('Y-m-d', $start);\n\t\t\t$start = strtotime(\"+ 1 day\", $start);\n\t\t} while($start <= $end);\n\t\n\t\treturn $range;\n\t}", "function getDatesFromRange($start, $end, $format = 'Y-m-d') {\r\n $array = array();\r\n // Variable that store the date interval\r\n // of period 1 day\r\n $interval = new DateInterval('P1D');\r\n $realEnd = new DateTime($end);\r\n $realEnd->add($interval);\r\n $period = new DatePeriod(new DateTime($start), $interval, $realEnd);\r\n // Use loop to store date into array\r\n foreach($period as $date) {\r\n $array[] = $date->format($format);\r\n }\r\n // Return the array elements\r\n return $array;\r\n}", "private function _calendar_array_one($start_d, $end_d)\n\t{\n\t $days_array = array();\n $days_url_array = array();\n for($i = $start_d; $i <= $end_d; $i++):\n array_push($days_array, $i);\n endfor;\n \n foreach($days_array as $day):\n $stampeddate = strtotime($this->year.\"-\".$this->month.\"-\".$day);\n array_push($days_url_array, URL::base(TRUE, TRUE).\"calendar_day/\".date(\"j\", $stampeddate).\"/\".date(\"n\", $stampeddate).\"/\".date(\"Y\", $stampeddate));\n endforeach;\n \n array_push($this->callinks, array_combine($days_array, $days_url_array));\n\t}", "private function interviewDates()\n {\n $interview_options = json_decode(Config::valueOr('interview options', '[]'), true);\n $opts = [];\n foreach ($interview_options as $option) {\n $start = Carbon::parse($option['date'].' '.$option['start'].':00');\n $end = Carbon::parse($option['date'].' '.$option['end'].':00');\n $time = $start->copy();\n while ($time < $end) {\n $opts[] = $time->copy();\n $time->addMinutes(15);\n }\n }\n\n return $opts;\n }", "function getDatesFromRange($start, $end, $format = 'Y-m-d')\n {\n $array = array();\n $interval = new \\DateInterval('P1D');\n $realEnd = new \\DateTime($end);\n $realEnd->add($interval);\n $period = new \\DatePeriod(new \\DateTime($start), $interval, $realEnd);\n foreach ($period as $date) {\n $array[] = $date->format($format);\n }\n\n return $array;\n }", "function dateRange($first, $last, $format = 'm/d/Y' ) { \n\t$dates = array();\n\t$current = strtotime($first);\n\t$last = strtotime($last);\n\n\twhile( $current <= $last ) { \n\t\t$dates[] = date($format, $current);\n\t\t$current = strtotime('+1 day', $current);\n\t}\n\t\n\treturn $dates;\n}", "function createDateRangeArray($strDateFrom,$strDateTo)\n{\n // inclusive array of the dates between the from and to dates.\n\n // could test validity of dates here but I'm already doing\n // that in the main script\n $i=0;\n $aryRange=array();\n\n//$aryRange[] = array(\"DATA\"=>\"\");\n\n $iDateFrom=mktime(1,0,0,substr($strDateFrom,5,2), substr($strDateFrom,8,2),substr($strDateFrom,0,4));\n $iDateTo=mktime(1,0,0,substr($strDateTo,5,2), substr($strDateTo,8,2),substr($strDateTo,0,4));\n\n if ($iDateTo>=$iDateFrom)\n {\n// array_push($aryRange,date('Y-m-d',$iDateFrom)); // first entry\n// array_push($aryRange[\"DATA\"],date('Y-m-d',$iDateFrom)); // first entry\n$aryRange[] = array(\"DATE\"=>date('Y-m-d',$iDateFrom), 'KEY=>'.$i);\n$i=$i+1;\n\n//$array[] = $var;\n\n while ($iDateFrom<$iDateTo)\n {\n $iDateFrom+=86400; // add 24 hours\n// array_push($aryRange,date('Y-m-d',$iDateFrom));\n// array_push($aryRange[\"DATA\"],date('Y-m-d',$iDateFrom));\n//$aryRange[] = array(\"DATE\"=>date('Y-m-d',$iDateFrom));\n$aryRange[] = array(\"DATE\"=>date('Y-m-d',$iDateFrom), 'KEY=>'.$i);\n$i=$i+1;\n\n }\n }\n$aryRange=array_reverse($aryRange);\n\n return $aryRange;\n}", "private function _calendar_array_two($start_d)\n\t{\n\t $days_array = array();\n $days_url_array = array();\n $days_in_month = days_in_month($this->month, $this->year) + 1;\n \n for($i = $start_d; $i < $days_in_month; $i++):\n array_push($days_array, $i);\n endfor;\n \n foreach($days_array as $day):\n $stampeddate = strtotime($this->year.\"-\".$this->month.\"-\".$day);\n array_push($days_url_array, URL::base(TRUE, TRUE).\"calendar_day/\".date(\"j\", $stampeddate).\"/\".date(\"n\", $stampeddate).\"/\".date(\"Y\", $stampeddate));\n endforeach;\n \n array_push($this->callinks, array_combine($days_array, $days_url_array));\n\t}", "public function it_splits_the_elements_by_date_timerange_service()\n {\n $hours = $this->vacancyParser->hours('830-1130,14-20,2215-2330,2330-2345');\n\n $array = [\n ['startAt' => '8:30', 'finishAt' => '11:30'],\n ['startAt' => '14:00', 'finishAt' => '20:00'],\n ['startAt' => '22:15', 'finishAt' => '23:30'],\n ['startAt' => '23:30', 'finishAt' => '23:45'],\n ];\n\n $this->assertEquals($hours, $array);\n }", "public function getParticipationsByRangeDate($startDate='', $endDate='')\r\n\t{\r\n\t\t$em = $this->getServiceManager()->get('doctrine.entitymanager.orm_default');\r\n\r\n\t\t$startDateTime = \\DateTime::createFromFormat('d/m/Y', $startDate);\r\n\t\t$endDateTime = \\DateTime::createFromFormat('d/m/Y', $endDate);\r\n\r\n\t\tif ($startDate != '' && $endDate != '') {\r\n\t\t\t$dateRange = \"(e.created_at >='\" . $startDateTime->format('Y-m-d') . \" 0:0:0' AND e.created_at <= '\" . $endDateTime->format('Y-m-d') . \" 0:0:0')\";\r\n\t\t} elseif ($startDate == '' && $endDate != '') {\r\n\t\t\t$dateRange = \"e.created_at <= '\" . $endDateTime->format('Y-m-d') . \" 0:0:0'\";\r\n\t\t} elseif ($startDate != '' && $endDate == '') {\r\n\t\t\t$dateRange = \"e.created_at >='\" . $startDateTime->format('Y-m-d') . \" 0:0:0'\";\r\n\t\t} else {\r\n\t\t\t$dateRange = \"e.created_at IS NOT NULL\";\r\n\t\t}\r\n\r\n\t\t$query = $em->createQuery('\r\n\t\t\tSELECT COUNT(e.id) FROM PlaygroundGame\\Entity\\Entry e\r\n\t\t\tWHERE ' . $dateRange . '\r\n\t\t\tAND e.active=0\r\n\t\t');\r\n\t\t$count = $query->getSingleScalarResult();\r\n\t\treturn $count;\r\n\t}", "function createDateRangeArray($strDateFrom,$strDateTo)\n{\n // inclusive array of the dates between the from and to dates.\n\n // could test validity of dates here but I'm already doing\n // that in the main script\n\n $aryRange=array();\n\n $iDateFrom=mktime(1,0,0,substr($strDateFrom,5,2), substr($strDateFrom,8,2),substr($strDateFrom,0,4));\n $iDateTo=mktime(1,0,0,substr($strDateTo,5,2), substr($strDateTo,8,2),substr($strDateTo,0,4));\n\n if ($iDateTo>=$iDateFrom)\n {\n array_push($aryRange,date('Y-m-d',$iDateFrom)); // first entry\n while ($iDateFrom<$iDateTo)\n {\n $iDateFrom+=86400; // add 24 hours\n array_push($aryRange,date('Y-m-d',$iDateFrom));\n }\n }\n return $aryRange;\n}", "function erp_get_dates_in_range($first, $last, $step = '+1 day', $output_format = 'Y-m-d' ) {\n\n $dates = array();\n $current = strtotime($first);\n $last = strtotime($last);\n\n while( $current <= $last ) {\n\n $dates[] = date($output_format, $current);\n $current = strtotime($step, $current);\n }\n\n return $dates;\n}", "function GetDates(DateRange $startingDates);", "public function get_dates($start_date,$end_date){\r\n\t $date1 = date_format(date_create($start_date), 'Y-m-d');\r\n\t $date2 = date_format(date_create($end_date), 'Y-m-d');\r\n\t\t$dates = $this->date_manager->getAllDatesBetweenTwoDates($date1,$date2);\r\n\t\t$dates2 = $this->date_manager->exclude_weekends($dates);\r\n\t\tforeach($dates2 as $dat){\r\n\t\t\t$dates3[] = date_format(date_create($dat), 'm/d/Y');\r\n\t\t\t}\r\n\t return $dates3;\r\n\t }", "function get_days($startdate,$enddate){\r\n\t$begin = new DateTime(date(\"Y-m-d\", strtotime($startdate)));\r\n$end = new DateTime(date(\"Y-m-d\", strtotime($enddate)));\r\n\r\n$daterange = new DatePeriod($begin, new DateInterval('P1D'), $end);\r\n\r\nforeach($daterange as $date){\r\n $adays[] =$date->format(\"Y-m-d\");\r\n}\r\n$adays[] =date(\"Y-m-d\", strtotime($enddate)) ;\r\nreturn $adays; \r\n}", "function dateRange($begin, $end, $interval = null){\n $begin = new DateTime($begin);\n $end = new DateTime($end);\n // Because DatePeriod does not include the last date specified.\n $end = $end->modify('+1 day');\n $interval = new DateInterval($interval ? $interval : 'P1D');\n\n return iterator_to_array(new DatePeriod($begin, $interval, $end));\n}", "private static function fillWithEmptyValues($arrays, $start_date, $end_date, $frequency = QueryResultPeer::FREQUENCY_DAY)\n {\n $min_date = strtotime($start_date);\n $max_date = strtotime($end_date);\n\n $rtn = array();\n\n if($frequency == QueryResultPeer::FREQUENCY_WEEK)\n {\n $counter = 0;\n foreach($arrays as $array)\n {\n $min_custom = strtotime(Utils::get_date_of_first_day_in_a_week(date('W', $min_date), date('o', $min_date)));\n $max_custom = strtotime(Utils::get_date_of_first_day_in_a_week(date('W', $max_date), date('o', $max_date)));\n $weeks = ceil((($max_date - $min_date) / 24 / 60 / 60 / 7));\n\n $rtn[] = array();\n// for($i = 0; $i < $weeks; $i++)\n// {\n while($min_custom <= $max_custom) {\n if(array_key_exists(date('Y-m-d', $min_custom), $array))\n {\n //$rtn[$counter][date('Y-m-d', $min_custom)] = $array[date('Y-m-d', $min_custom)];\n $rtn[$counter][date('o', $min_custom) . '-' . date('W', $min_custom)] = $array[date('Y-m-d', $min_custom)];\n } else\n {\n //$rtn[$counter][date('Y-m-d', $min_custom)] = -1;\n $rtn[$counter][date('o', $min_custom) . '-' . date('W', $min_custom)] = -1;\n }\n $min_custom = strtotime(date('Y-m-d', $min_custom) .' +1 weeks');\n }\n $counter++;\n }\n } else if($frequency == QueryResultPeer::FREQUENCY_MONTH)\n {\n $min_custom = strtotime(date('Y', $min_date) . date('m', $min_date) . '01');\n $months = (date('Y', $max_date) - date('Y', $min_date)) * 12 + date('m', $max_date) - date('m', $min_date);\n $counter = 0;\n foreach($arrays as $array)\n {\n $rtn[] = array();\n for($i = 0; $i < $months + 1; $i++)\n {\n $date_temp = strtotime(date('Y-m-d', $min_custom) . ' +' .$i. ' months');\n if(array_key_exists(date('Y-m-d', $date_temp), $array))\n {\n $rtn[$counter][date('Y-m-d', $date_temp)] = $array[date('Y-m-d', $date_temp)];\n } else\n {\n $rtn[$counter][date('Y-m-d', $date_temp)] = -1;\n }\n }\n $counter++;\n }\n } else\n {\n $days = ceil((($max_date - $min_date) / 24 / 60 / 60)) + 1;\n\n $counter = 0;\n foreach($arrays as $array)\n {\n $rtn[] = array();\n// for($i = 0; $i < $days; $i++)\n $date_temp = $min_date;\n while($date_temp <= $max_date)\n {\n if(array_key_exists(date('Y-m-d', $date_temp), $array))\n {\n $rtn[$counter][date('Y-m-d', $date_temp)] = $array[date('Y-m-d', $date_temp)];\n } else\n {\n $rtn[$counter][date('Y-m-d', $date_temp)] = -1;\n }\n $date_temp = strtotime('+1 day', $date_temp);\n }\n $counter++;\n }\n }\n\n return $rtn;\n }", "function createDateRangeArray( $strDateFrom,$strDateTo,$format ) {\n \n $aryRange=array();\n if ( $format == \"european\" ) {\n\t\t$iDateFrom=mktime(1,0,0,substr($strDateFrom,3,2),substr($strDateFrom,0,2),substr($strDateFrom,6,4));\n\t\t$iDateTo=mktime(1,0,0,substr($strDateTo,3,2),substr($strDateTo,0,2),substr($strDateTo,6,4));\n\t} else if ( $format == \"american\" ) {\n\t\t$iDateFrom=mktime(1,0,0,substr($strDateFrom,0,2),substr($strDateFrom,3,2),substr($strDateFrom,6,4));\n\t\t$iDateTo=mktime(1,0,0,substr($strDateTo,0,2),substr($strDateTo,3,2),substr($strDateTo,6,4));\n\t}\n\n\t\n if ($iDateTo>=$iDateFrom) {\n if ( $format == \"european\" ) {\n\t\t\tarray_push($aryRange, date('d-m-Y',$iDateFrom)); \n\t\t} else if ( $format == \"american\" ) {\n\t\t\tarray_push($aryRange,date('m/d/Y',$iDateFrom)); \n\t\t}\n while ($iDateFrom<$iDateTo) {\n $iDateFrom+=86400; // add 24 hours\n if ( $format == \"european\" ) {\n\t\t\t\tarray_push($aryRange,date('d-m-Y',$iDateFrom)); \n\t\t\t} else if ( $format == \"american\" ) {\n\t\t\t\tarray_push($aryRange,date('m/d/Y',$iDateFrom)); \n\t\t\t}\n }\n }\n\t\n return $aryRange;\n}", "function createDateRange($startDate, $endDate, $format = \"Y-m-d\")\n {\n $begin = new DateTime($startDate);\n $end = new DateTime($endDate);\n\n $interval = new DateInterval('P1D'); // 1 Day\n $dateRange = new DatePeriod($begin, $interval, $end);\n\n $range = [];\n foreach ($dateRange as $date) {\n $range[] = $date->format($format);\n }\n array_push($range, $endDate);\n return $range;\n }", "function createDateRangeArray($strDateFrom, $strDateTo) {\n // inclusive array of the dates between the from and to dates.\n // could test validity of dates here but I'm already doing\n // that in the main script\n\n $aryRange = array();\n\n $iDateFrom = mktime(1, 0, 0, substr($strDateFrom, 5, 2), substr($strDateFrom, 8, 2), substr($strDateFrom, 0, 4));\n $iDateTo = mktime(1, 0, 0, substr($strDateTo, 5, 2), substr($strDateTo, 8, 2), substr($strDateTo, 0, 4));\n\n if ($iDateTo >= $iDateFrom) {\n array_push($aryRange, date('Y-m-d', $iDateFrom)); // first entry\n\n while ($iDateFrom < $iDateTo) {\n $iDateFrom+=86400; // add 24 hours\n array_push($aryRange, date('Y-m-d', $iDateFrom));\n }\n }\n return $aryRange;\n}", "protected function findCourseDates($arrProperties)\n\t{\n\t\t$this->import('Database');\n\n\t\t// create and set variables from properties array\n\t\textract($arrProperties);\n\n\t\t$time = time();\n\t\t$arrDates = array();\n\n\t\t$objDates = $this->Database->prepare(\"SELECT\n\t\t\ttc.*, td.*, tcat.name as category_name,\n\t\t\t(SELECT count(*) FROM tl_training_participant WHERE pid IN (SELECT id FROM tl_training_registration WHERE pid=td.id) ) as participantCount\n\t\t\tFROM tl_training_date td\n\t\t\tLEFT JOIN\n\t\t\ttl_training_course tc ON td.pid=tc.id\n\n\t\t\tLEFT JOIN\n\t\t\ttl_training_category tcat ON tc.pid=tcat.id\n\n\t\t\tWHERE\n\t\t\ttd.startDate >= $time AND\n\t\t\ttd.timeForApplication >= $time\n\t\t\t\" . (BE_USER_LOGGED_IN ? '' : \" AND published='1'\") . \"\n\t\t\t\" . ($intCourse !== null ? \" AND tc.id=$intCourse \" : '') . \"\n\t\t\t\" . ($intCourseDate !== null ? \" AND td.id=$intCourseDate \" : '') . \"\n\n\t\t\t\" . ($blnAvailable ? \"HAVING participantCount<tc.maxParticipants\" : \"\") .\"\n\n\t\t\tORDER BY $strOrderBy td.startDate\n\n\t\t\t\" . ($intMaxDates !== null ? \" LIMIT 0, $intMaxDates \" : ' '))\n\t\t->execute();\n\n\t\twhile ($objDates->next())\n\t\t{\n\t\t\t$intAvailable = $objDates->maxParticipants - $objDates->participantCount;\n\n\t\t\t$arrDates[] = array_merge($objDates->row(), array\n\t\t\t(\n\t\t\t\t'available'\t\t\t\t=> $intAvailable,\n\t\t\t\t'availableLabel'\t\t=> sprintf($GLOBALS['TL_LANG']['MSC'][($intAvailable == 1 ? 'training_available1' : 'training_available')], $intAvailable),\n\t\t\t\t'formattedStartDate'\t=> $this->parseDate($GLOBALS['TL_CONFIG']['dateFormat'], $objDates->startDate),\n\t\t\t\t'formattedEndDate'\t\t=> $this->parseDate($GLOBALS['TL_CONFIG']['dateFormat'], $objDates->endDate),\n\t\t\t\t'dateRange'\t\t\t\t=> TrainingManager::formatStartAndEndDate($objDates->startDate, $objDates->endDate),\n\t\t\t));\n\t\t}\n\n\t\treturn $arrDates;\n\t}", "function createDateRangeArray($strDateFrom, $strDateTo) {\n // inclusive array of the dates between the from and to dates.\n // could test validity of dates here but I'm already doing\n // that in the main script\n\n $aryRange = array();\n\n $iDateFrom = mktime(1, 0, 0, substr($strDateFrom, 5, 2), substr($strDateFrom, 8, 2), substr($strDateFrom, 0, 4));\n $iDateTo = mktime(1, 0, 0, substr($strDateTo, 5, 2), substr($strDateTo, 8, 2), substr($strDateTo, 0, 4));\n\n if ($iDateTo >= $iDateFrom) {\n array_push($aryRange, date('Y-m-d', $iDateFrom)); // first entry\n while ($iDateFrom < $iDateTo) {\n $iDateFrom+=86400; // add 24 hours\n array_push($aryRange, date('Y-m-d', $iDateFrom));\n }\n }\n return $aryRange;\n}", "function createDateRangeArray($strDateFrom,$strDateTo)\n {\n // inclusive array of the dates between the from and to dates.\n // could test validity of dates here but I'm already doing that in the main script\n \n $aryRange=array();\n $iDateFrom=mktime(1,0,0,substr($strDateFrom,5,2), substr($strDateFrom,8,2),substr($strDateFrom,0,4));\n $iDateTo=mktime(1,0,0,substr($strDateTo,5,2), substr($strDateTo,8,2),substr($strDateTo,0,4));\n if ($iDateTo>=$iDateFrom)\n {\n array_push($aryRange,date(DATE_FORMAT,$iDateFrom)); // first entry\n while ($iDateFrom<$iDateTo)\n {\n $iDateFrom+=86400; // add 24 hours\n array_push($aryRange,date(DATE_FORMAT,$iDateFrom));\n }\n }\n \n return $aryRange;\n }", "private function generateDateRange(Carbon $start_date, DateInterval $interval, int $recurrences, int $exclusive = 1): array\n {\n $period = new DatePeriod($start_date, $interval, $recurrences, $exclusive);\n $dates = collect();\n\n foreach ($period as $date) {\n $dates->push($date->format('Y-m-d'));\n }\n\n return $dates->toArray();\n }", "function get_days($startdate,$enddate){\r\n $begin = new DateTime(date(\"Y-m-d\", strtotime($startdate)));\r\n $end = new DateTime(date(\"Y-m-d\", strtotime($enddate)));\r\n\r\n $daterange = new DatePeriod($begin, new DateInterval('P1D'), $end);\r\n\r\n foreach($daterange as $date){\r\n $adays[] =$date->format(\"Y-m-d\");\r\n }\r\n $adays[] =date(\"Y-m-d\", strtotime($enddate)) ;\r\n return $adays; \r\n }", "static function splitDates($first_date, $second_date, $max_difference = 0)\n\t{\n\t\tdate_default_timezone_set('UTC');\n\t\tif( !self::checkDate($first_date) || !self::checkDate($second_date)){\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!self::isInt($max_difference, 0)){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$date1 = new DateTime($first_date);\n\t\t$date2 = new DateTime($second_date);\n\t\t$interval = $date1->diff($date2, false);\n\t\t\n\t\tif((int)$interval->format('%R%a') < 0){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif($max_difference != 0){\n\t\t\tif((int)$interval->format('%R%a') > $max_difference){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\tlist($year,$month,$day) = array_pad(explode(\"-\",$first_date), 3, 0);\n\t\t\t\n\t\t$i = 0;\n\t\t$new_date = $first_date;\n $dates = array();\n\t\t\n\t\twhile($new_date <= $second_date)\n\t\t{\n\t\t\t$dates[] = $new_date;\n\t\t\t$i++;\n\t\t\t$new_date = date(\"Y-m-d\",mktime(0,0,0,$month,$day+$i,$year));\n\t\t}\n\t\t\n\t\treturn $dates;\n\t}", "function getDates($startdate, $enddate, $days_of_week){\n \n $enddate = new DateTime($enddate);\n $enddate = $enddate->modify(\"+1 day\");\n \n $dates = array();\n $daterange = new DatePeriod(new DateTime($startdate),new DateInterval('P1D'),$enddate);\n \n foreach($daterange as $key=>$value){\n foreach($days_of_week as $day){\n if($value->format('l') == $day){\n $dates[] = $value->format(\"Y-m-d\");\n }\n }\n }\n \n return $dates;\n }", "public function SelectArrayStartingToday()\n {\n\t\t$ListOfDates;\n\t\t\n\t\t\n\t\t$TodayDay = $this->GetThisDay();\n\t\t$ThisMonth = date('m');\n\t\t$ThisYear = $this->GetThisYear();\n\t\t$NextYear = $ThisYear+1;\n\t\t$ListOfDates = [ $ThisYear, $NextYear ];\n\t\t\n\t\t$rangeMonths = array();\n\t\tfor ($i = $ThisMonth; $i <= 12; $i++ )\n\t\t{\n\t\t\tarray_push( $rangeMonths, $i);\n\t\t}\n\t\t$ListOfDates[$ThisYear] = $rangeMonths;\n\t\t\n\t\t$rangeMonths = array();\n\t\tfor ($i = 1; $i <= 12; $i++ )\n\t\t{\n\t\t\tarray_push($rangeMonths, $i );\n\t\t}\n\t\t$ListOfDates[$NextYear] = $rangeMonths;\n\t\t\n\t\t//Get the number of days in this month\n\t\t$NumberofDays = cal_days_in_month(CAL_GREGORIAN, $ThisMonth, $ThisYear);\n\t\t\n\t\t//Subtract NumberofDays by $TodayDay to get days left. 31 - 14 = 17days left 15, 16 , 17 to 31 \n\t\t$Daysleft = $NumberofDays - $TodayDay;\n\t\t$rangeofdaysleft = array(); // will hold the array of days left in the month, including today.\n\t\t\n\t\tfor( $i = $TodayDay; $i <= $NumberofDays; $i++ )\n\t\t{\n\t\t\tarray_push($rangeofdaysleft, $i);\n\t\t}\n\t\n\t\t//$ListOfDates[$ThisYear];\n\t\tfor( $i = $ThisMonth; $i <= 12 ; $i++)\n\t\t{\n\t\t\tif($i == $ThisMonth)\n\t\t\t{\n\t\t\t\t$ListOfDates[$ThisYear][$i] = $rangeofdaysleft;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$range = array();\n\t\t\t\t$MaxDays = cal_days_in_month(CAL_GREGORIAN, $i, $ThisYear);\n\t\t\t\tfor($d = 1; $d <= $MaxDays; $d++)\n\t\t\t\t{\n\t\t\t\t\tarray_push($range, $d);\n\t\t\t\t}\n\t\t\t\t$ListOfDates[$ThisYear][$i] = $range;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t//array_push($ListOfDates, $arrCurrentYear);\n\t\t\n\t\n\t\tfor( $i = 1 ; $i <= 12; $i++\t)\n\t\t{\n\t\t\t$range = array();\n\t\t\t$MaxDays = cal_days_in_month(CAL_GREGORIAN, $i, $NextYear);\n\t\t\tfor($d = 1; $d <= $MaxDays; $d++)\n\t\t\t{\n\t\t\t\tarray_push($range, $d);\n\t\t\t}\n\t\t\t$ListOfDates[$NextYear][$i] = $range;\n\t\t\t\n\t\t}\n\t\t//array_push($ListOfDates, $arrNextYear);\n\t\t\n\t\t\n\t\t\n\t\treturn json_encode($ListOfDates);\n\t\n\t}", "protected function prepareDates(array $data): array\n {\n return $this->formatDateFields(['start_date', 'due_date'], $data);\n }", "function date_range($first, $last, $step = '+1 day', $output_format = 'd/m/Y' ) {\n\n $dates = array();\n $current = strtotime($first);\n $last = strtotime($last);\n\n while( $current <= $last ) {\n\n $dates[] = date($output_format, $current);\n $current = strtotime($step, $current);\n }\n\n return $dates;\n }", "function createRangeStat($start, $end, $format = 'Y-m-d') {\n \t\tdate_default_timezone_set(\"Europe/London\");\n\t\t$start = new DateTime($start);\n\t\t$end = new DateTime($end);\n\t\t$invert = $start > $end;\n\n\t\t$dates = array();\n\t\t$dates[] = $start->format($format);\n\t\twhile ($start != $end) {\n\t\t\t$start->modify(($invert ? '-' : '+') . '1 day');\n\t\t\t$dates[] = $start->format($format);\n\t\t}\n\t\treturn $dates;\n\t}", "public function datesProvider(): array\n {\n return [\n // Time Dates Match?\n ['January 1st 2018', ['2018-01-01'], true],\n ['January 1st 2018', ['2018-01-02'], false],\n ['January 1st 2018', ['2018-02-01'], false],\n ['January 1st 2018', ['2019-01-01'], false],\n ['January 2nd 2018', ['2018-01-01'], false],\n ['February 1st 2018', ['2018-02-01'], true],\n ['January 1st 2019', ['2019-01-01'], true],\n ['January 1st 2018', ['2018-01-01', '2018-05-23'], true],\n ['January 1st 2018', ['2018-01-02', '2018-01-01'], true],\n ['January 1st 2018', ['2018-02-01', '2018-01-01'], true],\n ['January 1st 2018', ['2019-01-01', '2018-01-01'], true],\n ['January 2nd 2018', ['2018-01-01', '2018-01-02'], true],\n ['February 1st 2018', ['2018-02-01', '2019-02-01'], true],\n ['January 1st 2019', ['2019-01-01', '2019-02-01'], true],\n ['February 29th 2020', ['2020-02-29'], true],\n ['February 29th 2020', ['2020-03-01'], false],\n ];\n }", "public static function listDatesOfPeriod($strDate1, $strDate2, $arrReturn = array())\n {\n if ((!isset($strDate1)) || (!isset($strDate2)))\n return array();\n if (self::isDateTemplate($strDate1)) {\n $intTimestamp1 = self::convertDateTemplateToTimestamp($strDate1);\n $strFormat1 = 'd/m/Y';\n } elseif (self::isDateBase($strDate1)) {\n $intTimestamp1 = self::convertDateBaseToTimestamp($strDate1);\n $strFormat1 = 'Y-m-d';\n } elseif (self::isDateWs($strDate1)) {\n $intTimestamp1 = self::convertDateWsToTimestamp($strDate1);\n $strFormat1 = 'Ymd';\n } else\n return array();\n if (self::isDateTemplate($strDate2)) {\n $intTimestamp2 = self::convertDateTemplateToTimestamp($strDate2);\n $strFormat2 = 'd/m/Y';\n } elseif (self::isDateBase($strDate2)) {\n $intTimestamp2 = self::convertDateBaseToTimestamp($strDate2);\n $strFormat2 = 'Y-m-d';\n } elseif (self::isDateWs($strDate2)) {\n $intTimestamp2 = self::convertDateWsToTimestamp($strDate2);\n $strFormat2 = 'Ymd';\n } else\n return array();\n if ($intTimestamp2 < $intTimestamp1) {\n $intTimestampInicial = $intTimestamp2;\n $intTimestampFinal = $intTimestamp1;\n $strFormatInicial = $strFormat2;\n $strFormatFinal = $strFormat1;\n } else {\n $intTimestampInicial = $intTimestamp1;\n $intTimestampFinal = $intTimestamp2;\n $strFormatInicial = $strFormat1;\n $strFormatFinal = $strFormat2;\n }\n $intTimestampInicialAcrescido = ($intTimestampInicial + (60 * 60 * 24));\n if (!in_array($intTimestampInicial, $arrReturn))\n $arrReturn[] = date($strFormatInicial, $intTimestampInicial);\n if ($intTimestampFinal > $intTimestampInicialAcrescido)\n return self::listDatesOfPeriod(date($strFormatInicial, $intTimestampInicialAcrescido), date($strFormatFinal, $intTimestampFinal), $arrReturn);\n $arrReturn[] = date($strFormatFinal, $intTimestampFinal);\n return $arrReturn;\n }", "public function _constructProvider()\n {\n $start[0] = new DateObject('2021-05-01');\n $end[0] = new DateObject('2021-11-01');\n $interval[0] = new DateIntervalObject('P1M');\n $option[0] = 0;\n\n //end is DateObject option EXCLUDE_START_DATE\n $start[1] = new DateObject('2021-05-01');\n $end[1] = new DateObject('2021-11-01');\n $interval[1] = new DateIntervalObject('P1M');\n $option[1] = DatePeriod::EXCLUDE_START_DATE;\n\n //end is recurrence option 0\n $start[2] = new DateObject('2021-05-01');\n $end[2] = 9;\n $interval[2] = new DateIntervalObject('P1M');\n $option[2] = 0;\n\n //end is recurrence option EXCLUDE_START_DATE\n $start[1] = new DateObject('2021-05-01');\n $end[1] = 9;\n $interval[1] = new DateIntervalObject('P1M');\n $option[1] = DatePeriod::EXCLUDE_START_DATE;\n\n return array_map(\n function (\n $start,\n $interval,\n $end,\n $option,\n ) {\n return [\n $start,\n $interval,\n $end,\n $option,\n new DatePeriod(\n $start->toDateTimeImmutable(),\n $interval->toDateInterval(),\n is_int($end) ?\n $end :\n $end->toDateTimeImmutable(),\n $option,\n ),\n ];\n },\n $start,\n $interval,\n $end,\n $option,\n );\n }", "private function createDateRangeArray($strDateFrom, $strDateTo) {\n\t\t// takes two dates formatted as YYYY-MM-DD and creates an\n\t\t// inclusive array of the dates between the from and to dates.\n\t\t\n\t\t// could test validity of dates here but I'm already doing\n\t\t// that in the main script\n\t\t$aryRange = array ();\n\t\t\n\t\t$iDateFrom = mktime ( 1, 0, 0, substr ( $strDateFrom, 5, 2 ), substr ( $strDateFrom, 8, 2 ), substr ( $strDateFrom, 0, 4 ) );\n\t\t$iDateTo = mktime ( 1, 0, 0, substr ( $strDateTo, 5, 2 ), substr ( $strDateTo, 8, 2 ), substr ( $strDateTo, 0, 4 ) );\n\t\t\n\t\tif ($iDateTo >= $iDateFrom) {\n\t\t\tarray_push ( $aryRange, date ( 'Y-m-d', $iDateFrom ) ); // first entry\n\t\t\twhile ( $iDateFrom < $iDateTo ) {\n\t\t\t\t$iDateFrom += 86400; // add 24 hours\n\t\t\t\tarray_push ( $aryRange, date ( 'Y-m-d', $iDateFrom ) );\n\t\t\t}\n\t\t}\n\t\treturn $aryRange;\n\t}", "function createDateRangeArray($strDateFrom,$strDateTo,$id_tamu)\n\t{\n\t\t// inclusive array of the dates between the from and to dates.\n\n\t\t// could test validity of dates here but I'm already doing\n\t\t// that in the main script\n\n\t\t$aryRange=array();\n\n\t\t$iDateFrom=mktime(1,0,0,substr($strDateFrom,5,2), substr($strDateFrom,8,2),substr($strDateFrom,0,4));\n\t\t$iDateTo=mktime(1,0,0,substr($strDateTo,5,2), substr($strDateTo,8,2),substr($strDateTo,0,4));\n\n\t\tif ($iDateTo>=$iDateFrom)\n\t\t{\n\t\t\tarray_push($aryRange,date('Y-m-d',$iDateFrom).\"_\".$id_tamu); // first entry\n\t\t\twhile ($iDateFrom<$iDateTo)\n\t\t\t{\n\t\t\t\t$iDateFrom+=86400; // add 24 hours\n\t\t\t\tarray_push($aryRange,date('Y-m-d',$iDateFrom).\"_\".$id_tamu);\n\t\t\t}\n\t\t}\n\t\treturn $aryRange;\n\t}", "public function get_first_rate_list_between_date($start_date = '', $end_date = '')\n {\n if ('' == strval($start_date)\n || '' == strval($end_date))\n {\n return FALSE;\n }\n\n // check date format\n $format = 'Ymd';\n $start_date = date($format, strtotime($start_date));\n $end_date = date($format, strtotime($end_date));\n if (empty($start_date)\n || empty($end_date))\n {\n return FALSE;\n }\n\n $i = 1;\n $rs = array();\n do\n {\n $date_rs = $this->get_rate_change_list($start_date);\n if (!is_array($date_rs))\n {\n //set log?\n $rs[$start_date] = $this->field_list;\n }\n else\n {\n $rs[$start_date] = array_shift($date_rs);\n }\n\n $start_date = date($format, strtotime($start_date . ' +1 days'));\n }while ($start_date <= $end_date);\n\n return $rs;\n }", "function createDateInterval($dateStart,$dateStop){\n $ONE_DAY=3600*24;\n $start=strtotime($dateStart);\n $stop=strtotime($dateStop);\n $giorni=array();\n for ($giorno=$start; $giorno<=$stop; $giorno+=$ONE_DAY){\n $giorni[]=date(\"Y-m-d\",$giorno);\n }\n return $giorni;\n }", "private static function splitDates($startDate, $endDate)\r\n {\r\n $startDate = new DateTime($startDate);//convert to date time object\r\n $endDate = new DateTime($endDate);//convert to date time object\r\n $dates = [];//this will hold all mondays of the week in format Y-m-d\r\n\r\n if($startDate>$endDate)//if provided bad values\r\n {\r\n return $dates;\r\n }\r\n if(1 !=$startDate->format('N'))//if start date is not a monday grab previous monday\r\n {\r\n $startDate->modify('next monday');\r\n }\r\n while($startDate<=$endDate)//while start date is not past end of form date\r\n {\r\n $dates[]=$startDate->format(\"Y-m-d\"); //add monday date found to list\r\n $startDate->modify(\"+1 week\");//increment date by a week to the next monday\r\n }\r\n return $dates;\r\n }", "public function provideDate()\n {\n return array(\n array(array(\"date\\before{date:'2013-04-04'}\"), true),\n array(array(\"date\\before{date:'1998-04-04'}\"), false),\n array(array(\"date\\after{date:'2013-04-04'}\"), false),\n array(array(\"date\\after{date:'1998-04-04'}\"), true),\n );\n }", "public function getDaysFromRanges($arr){\n \t$days = array();\n \t$days[] = $arr[0];\n \t$days[] = $arr[count($arr) - 1];\n \t\n \treturn $days;\n }", "public function __invoke($array)\n {\n // calculate EndDate - StartDate = X Years.\n // eg. 4.2 Years\n \n $days=0;\n foreach ($array as $obj) {\n $date1 = new \\DateTime($obj->getEndDate());\n $date2 = new \\DateTime($obj->getStartDate());\n $interval = $date1->diff($date2);\n $days+=abs($interval->format('%R%a'));\n }\n return round($days/365, 1);\n }", "public function createDateRangeArray($strDateFrom,$strDateTo)\n {\n // inclusive array of the dates between the from and to dates.\n\n // could test validity of dates here but I'm already doing\n // that in the main script\n\n $aryRange=array();\n\n $iDateFrom=mktime(1,0,0,substr($strDateFrom,5,2), substr($strDateFrom,8,2),substr($strDateFrom,0,4));\n $iDateTo=mktime(1,0,0,substr($strDateTo,5,2), substr($strDateTo,8,2),substr($strDateTo,0,4));\n\n if ($iDateTo>=$iDateFrom)\n {\n array_push($aryRange,date('d-m-Y',$iDateFrom)); // first entry\n while ($iDateFrom<$iDateTo)\n {\n $iDateFrom+=86400; // add 24 hours\n array_push($aryRange,date('d-m-Y',$iDateFrom));\n }\n }\n return $aryRange;\n }", "function the_date_range($start_dt,$end_dt, $one_day = false){\r\n\t\r\n\t$duration = $start_dt->diff($end_dt);\r\n\t$start = explode(\" \",$start_dt->format('l F j Y g i a'));\r\n\t$end = explode(\" \",$end_dt->format('l F j Y g i a'));\r\n\t\r\n\t//happening at the same time\r\n\tif($start == $end){\r\n\t\treturn array(\r\n\t\t\t\"date\"\t=>\tsprintf(\r\n\t\t\t\t\"%s, %s %s\",\r\n\t\t\t\t$start[0], //day of week\r\n\t\t\t\t$start[1], //month\r\n\t\t\t\t$start[2] //day of month\r\n\t\t\t\t),\r\n\t\t\t\"duration\"\t=>\t$duration,\r\n\t\t\t\"time\"\t=>\teo_is_all_day() ? 'all day' : time_compact_ap_format($start[4],$start[5],$start[6])\r\n\t\t);\r\n\t}\t\r\n\t//happening on the same day\r\n\telseif($start[2] == $end[2] || ($duration->days < 1 && $duration->h < 24)){\r\n\t\t//Monday, March 4; 9:00 p.m.\r\n\t\treturn array(\r\n\t\t\t\"date\"\t=>\tsprintf(\r\n\t\t\t\t\"%s, %s %s\",\r\n\t\t\t\t$start[0], //day of week\r\n\t\t\t\t$start[1], //month\r\n\t\t\t\t$start[2] //day of month\r\n\t\t\t\t),\r\n\t\t\t\"duration\"\t=>\t$duration,\r\n\t\t\t\"time\"\t=>\teo_is_all_day() ? 'all day' : sprintf(\r\n\t\t\t\t\"%s&ndash;%s\",\r\n\t\t\t\ttime_compact_ap_format($start[4],$start[5],$start[6]),\r\n\t\t\t\ttime_compact_ap_format($end[4],$end[5],$end[6])\t //formatted date\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t}\r\n\t//happening in the same month\r\n\t//check if happening all day; if not, return eo_all_day ? : \r\n\telseif($start[1] == $end[1]){\r\n\t\treturn (eo_is_all_day() || $one_day) ? \r\n\t\tsprintf(\r\n\t\t\t\"%s %s&ndash;%s\",\r\n\t\t\t$start[1], //month\r\n\t\t\t$start[2], //day of month\r\n\t\t\t$end[2]\r\n\t\t)\r\n\t\t: \r\n\t\tarray(\r\n\t\t\t\"date\" => sprintf(\r\n\t\t\t\t\"%s %s&ndash;%s\",\r\n\t\t\t\t$start[1],\r\n\t\t\t\t$start[2],\r\n\t\t\t\t$end[2]\t\t\t\t\t\r\n\t\t\t\t),\r\n\t\t\t\"datetime\" => sprintf(\r\n\t\t\t\t\"%s, %s %s&ndash;%s, %s %s\",\r\n\t\t\t\ttime_compact_ap_format($start[4],$start[5],$start[6]),\r\n\t\t\t\t$start[1],\r\n\t\t\t\t$start[2],\r\n\t\t\t\ttime_compact_ap_format($end[4],$end[5],$end[6]),\r\n\t\t\t\t$end[1],\r\n\t\t\t\t$end[2]\t\t\t\t\t\r\n\t\t\t\t),\r\n\t\t\t\"duration\"\t=>\t$duration,\r\n\t\t\t\"time\"\t=>\tsprintf(\r\n\t\t\t\t\"%s&ndash;%s\",\r\n\t\t\t\ttime_compact_ap_format($start[4],$start[5],$start[6]),\r\n\t\t\t\ttime_compact_ap_format($end[4],$end[5],$end[6])\r\n\t\t\t)\r\n\t\t);\r\n\t}\r\n\t//happening in the same year\r\n\telseif($start[3] == $end[3]){\r\n\t\treturn (eo_is_all_day() || $one_day) ?\r\n\t\t\tsprintf(\r\n\t\t\t\t\"%s, %s %s&ndash;%s, %s %s\",\r\n\t\t\t\t$start[0], //day of week\r\n\t\t\t\t$start[1], //month\r\n\t\t\t\t$start[2], //day of month\r\n\t\t\t\t$end[0],\r\n\t\t\t\t$end[1],\r\n\t\t\t\t$end[2]\r\n\t\t\t)\r\n\t\t\t:\r\n\t\t\tarray(\r\n\t\t\t\t\"date\"\t=>\tsprintf(\r\n\t\t\t\t\t\"%s %s&ndash;%s %s\",\r\n\t\t\t\t\t$start[1],\r\n\t\t\t\t\t$start[2],\r\n\t\t\t\t\t$end[1],\r\n\t\t\t\t\t$end[2]\r\n\t\t\t\t),\r\n\t\t\t\t\"datetime\"\t=>\tsprintf(\r\n\t\t\t\t\t\"%s, %s, %s %s&ndash;%s, %s, %s %s\",\r\n\t\t\t\t\ttime_compact_ap_format($start[4],$start[5],$start[6]),\r\n\t\t\t\t\t$start[0],\r\n\t\t\t\t\t$start[1],\r\n\t\t\t\t\t$start[2],\r\n\t\t\t\t\ttime_compact_ap_format($end[4],$end[5],$end[6]),\r\n\t\t\t\t\t$end[0],\r\n\t\t\t\t\t$end[1],\r\n\t\t\t\t\t$end[2]\r\n\t\t\t\t),\r\n\t\t\t\t\"duration\"\t=>\t$duration,\r\n\t\t\t\t\"time\"\t=>\tsprintf(\"%s&ndash;%s\",\r\n\t\t\t\t\ttime_compact_ap_format($start[4],$start[5],$start[6]),\r\n\t\t\t\t\ttime_compact_ap_format($end[4],$end[5],$end[6])\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t}\r\n\t//just plain happening\r\n\r\n\telse{\r\n\t\treturn (eo_is_all_day() || $one_day) ? \r\n\t\t\tsprintf(\r\n\t\t\t\t\"%s, %s %s&ndash;%s, %s %s\",\r\n\t\t\t\t$start[0], //day of week\r\n\t\t\t\t$start[1], //month\r\n\t\t\t\t$start[2], //day of month\r\n\t\t\t\t$end[0],\r\n\t\t\t\t$end[1],\r\n\t\t\t\t$end[2]\r\n\t\t\t)\r\n\t\t\t:\r\n\t\t\tarray(\r\n\t\t\t\t\"date\"\t=>\tsprintf(\r\n\t\t\t\t\t\"%s, %s %s&ndash;%s, %s %s\",\r\n\t\t\t\t\t$start[0],\r\n\t\t\t\t\t$start[1],\r\n\t\t\t\t\t$start[2],\r\n\t\t\t\t\t$end[0],\r\n\t\t\t\t\t$end[1],\r\n\t\t\t\t\t$end[2]\r\n\t\t\t\t),\r\n\t\t\t\t\"datetime\"\t=>\tsprintf(\r\n\t\t\t\t\t\"%s, %s, %s %s&ndash;%s, %s, %s %s\",\r\n\t\t\t\t\ttime_compact_ap_format($start[4],$start[5],$start[6]),\r\n\t\t\t\t\t$start[0],\r\n\t\t\t\t\t$start[1],\r\n\t\t\t\t\t$start[2],\r\n\t\t\t\t\ttime_compact_ap_format($end[4],$end[5],$end[6]),\r\n\t\t\t\t\t$end[0],\r\n\t\t\t\t\t$end[1],\r\n\t\t\t\t\t$end[2]\r\n\t\t\t\t),\r\n\t\t\t\t\"duration\"\t=>\t$duration,\r\n\t\t\t\t\"time\"\t=>\tsprintf(\"%s&ndash;%s\",\r\n\t\t\t\t\ttime_compact_ap_format($start[4],$start[5],$start[6]),\r\n\t\t\t\t\ttime_compact_ap_format($end[4],$end[5],$end[6])\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t}\r\n}", "function monthPeriod_start_end($begin, $end)\n{\n $begin = (new DateTime($begin.'-01-01'))->modify('first day of this month');\n $end = (new DateTime($end.'-12-01 +1 month'))->modify('first day of this month');\n $daterange = new DatePeriod($begin, new DateInterval('P1M'), $end);\n\n foreach ($daterange as $date) {\n $dates[] = $date->format(\"m\");\n }\n return $dates;\n}", "public function it_splits_dates()\n {\n $dates = $this->vacancyParser->splitDates('mon,tue,wed,thu,fri,sat,sun');\n\n $array = ['mon', 'tue', 'wed', 'thu', 'fri', 'sat', 'sun'];\n\n $this->assertEquals($dates, $array);\n }", "function getDatesFromRange($start, $end, $format = 'Y-m-d') { \n $GLOBALS['labelDates'] = array();\n // Declare an empty array \n $dates = array(); \n \n // Variable that store the date interval \n // of period 1 day \n $interval = new DateInterval('P1D'); \n \n $realEnd = new DateTime($end); \n $realEnd->add($interval); \n \n $period = new DatePeriod(new DateTime($start), $interval, $realEnd); \n // Use loop to store date into array \n foreach($period as $date) { \n $dates[] = $date->format($format); \n if($date->format($format) == date('Y-m-d'))\n $GLOBALS['labelDates'][] = \"Today\";\n else\n $GLOBALS['labelDates'][] = $date->format('M-d');\n } \n $dates = array_reverse($dates) ;\n $GLOBALS['labelDates'] = array_reverse( $GLOBALS['labelDates']) ;\n\n \n \n // Return the array elements \n return $dates; \n }", "function get_days($sStartDate, $sEndDate){ \n\t\t // Firstly, format the provided dates. \n\t\t // This function works best with YYYY-MM-DD \n\t\t // but other date formats will work thanks \n\t\t // to strtotime(). \n\t\t $sStartDate = gmdate(\"Y-m-d\", strtotime($sStartDate)); \n\t\t $sEndDate = gmdate(\"Y-m-d\", strtotime($sEndDate)); \n\n\t\t // Start the variable off with the start date \n\t\t $aDays[] = $sStartDate; \n\n\t\t // Set a 'temp' variable, sCurrentDate, with \n\t\t // the start date - before beginning the loop \n\t\t $sCurrentDate = $sStartDate; \n\n\t\t // While the current date is less than the end date \n\t\t while($sCurrentDate < $sEndDate){ \n\t\t // Add a day to the current date \n\t\t $sCurrentDate = gmdate(\"Y-m-d\", strtotime(\"+1 day\", strtotime($sCurrentDate))); \n\n\t\t // Add this new day to the aDays array \n\t\t $aDays[] = $sCurrentDate; \n\t\t } \n\n\t\t // Once the loop has finished, return the \n\t\t // array of days. \n\t\t return $aDays; \n\t }", "static public function getRange($initialDate, $finalDate){\n\t\tif(!is_object($initialDate)){\n\t\t\t$initialDate = new Date($initialDate);\n\t\t}\n\t\tif(is_object($finalDate)){\n\t\t\t$finalDate = (string) $finalDate;\n\t\t}\n\t\t$initialTime = $initialDate->getTimestamp();\n\t\t$date = (string) $initialDate;\n\t\t$range = array($date);\n\t\twhile($date!=$finalDate){\n\t\t\t$initialTime+=86400;\n\t\t\t$date = date('Y-m-d', $initialTime);\n\t\t\t$range[] = $date;\n\t\t}\n\t\treturn $range;\n\t}", "function ScheduleDates()\n {\n $dateids=$this->CGI2Dates();\n\n $dates=array();\n foreach ($this->Dates() as $did => $date)\n {\n if (preg_grep('/^'.$date[ \"ID\" ].'$/',$dateids))\n {\n array_push($dates,$date);\n }\n }\n\n return $dates;\n }", "public function dateRanges(): DateRangeCollection;", "public function prepare_data_for_chart_by_days_acumulated($start, $end) {\n\t\t// sort and order the array here.\n\t\tglobal $wpdb;\n\t\t\n\t\t$sql = \"SELECT * FROM `\" . $wpdb->prefix . \"tr_characters`;\";\n\t\t\n\t\t$characters = $wpdb->get_results ( \"$sql\", ARRAY_A );\n\t\t\n\t\tif ($characters != null) {\n\t\t\t\n\t\t\t$chars_by_days = null;\n\t\t\t\n\t\t\tforeach ( $characters as $char ) {\n\t\t\t\t// run trough each char and create this array of date->amount for selected time period FOR EACH DAY WITHIN\n\t\t\t\t$character_data = $this->prepare_character_data_by_days_for_chart_acumulating ( $start, $end, $char ['owner_id'] );\n\t\t\t\tif ($character_data != null) {\n\t\t\t\t\t$chars_by_days [$char ['ownerName2']] = $character_data;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ($chars_by_days == false) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\t * data should be sorted by main chars here.\n\t\t\t */\n\t\t\t$chars_by_days = $this->calculate_chart_data_by_mains ( $chars_by_days );\n\t\t\t\n\t\t\t$prepared_array = null;\n\t\t\t// add first row of the array\n\t\t\t$prepared_array [0] [0] = 'Date';\n\t\t\tforeach ( $chars_by_days as $key => $value ) {\n\t\t\t\t// echo $key;\n\t\t\t\t$prepared_array [0] [] = $key;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t$start2 = new DateTime ( $start );\n\t\t\t$end2 = date ( \"Y-m-d H:i:s\", strtotime ( $end . \" +1 day\" ) );\n\t\t\t$end3 = new DateTime ( $end2 );\n\t\t\t\n\t\t\t$interval = DateInterval::createFromDateString ( '1 day' );\n\t\t\t\n\t\t\t$period = new DatePeriod ( $start2, $interval, $end3 );\n\t\t\t\n\t\t\t$a = 1;\n\t\t\t// run trough all dates\n\t\t\tforeach ( $period as $dt ) {\n\t\t\t\t$date = $dt->format ( \"Y-m-d\" );\n\t\t\t\t// add a date in begining\n\t\t\t\t$prepared_array [$a] [] = $date;\n\t\t\t\t// run trough each char and add a value from current day\n\t\t\t\tforeach ( $chars_by_days as $char ) {\n\t\t\t\t\t$prepared_array [$a] [] = $char [$date];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$a ++;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $prepared_array;\n\t}", "function erp_extract_dates( $start_date, $end_date ) {\n // if start date has no time set, then add 00:00:00 or 12:00 AM\n if ( ! preg_match( '/\\d{2}:\\d{2}:\\d{2}$/', $start_date ) ) {\n $start_date = $start_date . ' 00:00:00';\n }\n\n // if end date has no time set, then add 23:59:59 or 11:59 PM\n if ( ! preg_match( '/\\d{2}:\\d{2}:\\d{2}$/', $end_date ) ) {\n $end_date = $end_date . ' 23:59:59';\n }\n\n if ( $start_date > $end_date ) {\n $temp = $start_date;\n $start_date = $end_date;\n $end_date = $temp;\n }\n\n $start_date = new DateTime( $start_date );\n $end_date = new DateTime( $end_date );\n $diff = $start_date->diff( $end_date );\n\n // we got a negative date\n if ( $diff->invert ) {\n return new WP_Error( 'invalid-date', __( 'Invalid date provided', 'erp' ) );\n }\n\n $interval = DateInterval::createFromDateString( '1 day' );\n $period = new DatePeriod( $start_date, $interval, $end_date );\n\n // prepare the periods\n $dates = array();\n foreach ( $period as $dt ) {\n $dates[] = $dt->format( 'Y-m-d' );\n }\n\n return $dates;\n}", "private function _getStartDateRanges($months, $start_year)\n\t{\n\t\t$pairs = array();\n\t\tfor ($j = 0; $j < count($months); $j++){\n\t\t\t$start_date = date('Y-m-d', strtotime('20' . $start_year . '-' . $months[$j] . '-01'));\n\t\t\t$end_date = date('Y-m-d', strtotime('+1 month', strtotime($start_date)));\n\t\t\t$end_date = date('Y-m-d', strtotime('-1 day', strtotime($end_date)));\n\t\t\t$new_pair = array(\n\t\t\t\t'start_date_min' => $start_date,\n\t\t\t\t'start_date_max' => $end_date\n\t\t\t);\n\t\t\tarray_push($pairs, $new_pair);\n\t\t}\n\n\t\treturn $pairs;\n\t}", "public function validateDates(&$start, &$end) {\n $sixMonthsAgo = strtotime(\"-6 months\");\n $day = 86400;\n $end = time();\n \n if (!$start) {\n $start = strtotime(\"-7 days\");\n }\n \n $gap = $end - $start; \n \n //Don't mess the dates!\n switch ($gap) {\n case $gap < ($day * 31) :\n $gap = $day * 7;\n break;\n\n case $gap < ($day * 180) ://6 months\n $gap = $day * 31;\n break;\n \n case $gap >= ($day * 180) : \n default : \n $gap = $day * 180; \n break;\n }\n \n $end = time();\n $start = $end - $gap;\n }", "function getInterimReport( $startdate, $enddate ){\r\n $userid = $_SESSION['userid'];\r\n\r\n $query = \"select `ID` as interimid, `StudentID` as studentid, `DateProcessed` as dateprocessed, `CourseNumberTitle` as course from `interims`\";\r\n\r\n if($startdate && $enddate) $query .= \" where `DateProcessed` >= '\".getMySqlDate( $startdate ).\"' and `DateProcessed` <= '\".getMySqlDate( $enddate ).\"'\";\r\n else if( $startdate ) $query .= \" where `DateProcessed` >= '\".getMySqlDate( $startdate ).\"'\";\r\n else if( $enddate ) $query .= \" where `DateProcessed` <= '\".getMySqlDate( $enddate ).\"'\";\r\n\r\n $query .= \" order by `DateProcessed`\";\r\n\r\n $result = mysql_query($query);\r\n $interims = array();\r\n while( $row = mysql_fetch_assoc( $result ) ) {\r\n\t\t\tarray_push( $interims, $row );\r\n\t }\r\n return($interims); \r\n }", "public function getEvents(DateTime $dateStart = null, DateTime $dateEnd = null)\n {\n $events = array();\n\n if ($dateStart === null) {\n $dateStart = new DateTime();\n }\n\n if ($dateEnd === null) {\n $dateEnd = clone $dateStart;\n $dateEnd->add(new DateInterval('P1Y'));\n }\n\n if (($this->repeatEndDate !== null) && ($this->repeatEndDate < $dateEnd)) {\n $dateEnd = $this->repeatEndDate;\n }\n\n $repeatDates = $this->getRepeatDates();\n\n for ($count = 0; true; ++$count) {\n if ($this->repeatCount > 0 && $count >= $this->repeatCount) {\n break;\n }\n /** @var DateTime[] $repeatDate */\n foreach ($repeatDates as $repeatDate) {\n if ($repeatDate['start'] <= $dateEnd && $repeatDate['end'] >= $dateStart && !$this->isRepeatException($repeatDate['start'])) {\n $events[] = $this->createEvent(clone $repeatDate['start'], clone $repeatDate['end']);\n }\n if (!$this->repeatInterval || $repeatDate['start'] > $dateEnd) {\n break 2;\n }\n $repeatDate['start']->add($this->repeatInterval);\n $repeatDate['end']->add($this->repeatInterval);\n }\n }\n\n return $events;\n }", "public function getPlayDates($beginDate, $endDate)\n {\n $startDate = new \\DateTime($beginDate);\n $endDate = new \\DateTime($endDate);\n $arrayDates = array();\n\n while ($startDate <= $endDate) {\n $arrayDates[]['date'] = $startDate->format(\"Y-m-d\");\n $startDate->add(new \\DateInterval('P7D'));\n }\n return $arrayDates;\n }", "public static function fillLowerLevelDates($arrays)\n {\n // 1. Find earliest and latest dates in all the arrays.\n foreach ($arrays as $key => $array) {\n $potentialFirsts[] = array_key_first($array);\n $potentialLasts[] = array_key_last($array);\n\n $keys[] = $key;\n }\n sort($potentialFirsts);\n sort($potentialLasts);\n $start = reset($potentialFirsts);\n $end = end($potentialLasts);\n\n $i = 0;\n $newArray = [];\n foreach ($arrays as $array) {\n // 2. Plug first and last if not already set.\n if (!array_key_exists($start, $array)) {\n $array = [$start => 0] + $array;\n }\n if (!array_key_exists($end, $array)) {\n $array[$end] = 0;\n }\n\n // 3. Fill in the gaps.\n $array = self::fillMissingDateArrayKeys($array);\n\n $newArray[$keys[$i]] = $array;\n\n $i++;\n }\n\n return $newArray;\n }", "public function getReccuringMeetingDates($date, $reccurParams = [])\n {\n $meet_dates = [];\n\n $pNum = (int)($reccurParams['period_number']);\n $meet_dates[] = $date->format(\"Y-m-d\");\n switch ($reccurParams['period']) {\n case '1': //weekly, add 7 days\n for ($i = 1; $i < $pNum; $i++) {\n $date->add(new DateInterval(\"P7D\"));\n $meet_dates[] = $date->format(\"Y-m-d\");\n }\n\n break;\n case '2': //bi-weekly, add 14 days\n $pNum = ($pNum % 2 == 0) ? $pNum / 2 : ($pNum - 1) / 2;\n for ($i = 1; $i < $pNum; $i++) {\n $date->add(new DateInterval(\"P14D\"));\n $meet_dates[] = $date->format(\"Y-m-d\");\n }\n break;\n case '3': //monthly, add 1 months\n for ($i = 1; $i < $pNum; $i++) {\n $m = $date->format('m');\n $y = $date->format('Y');\n\n $countMonthsDays = date('t', mktime(0, 0, 0, $m, 1, $y));\n $date->add(new DateInterval(\"P\" . $countMonthsDays . \"D\"));\n $meet_dates[] = $date->format(\"Y-m-d\");\n }\n break;\n default:\n break;\n }\n\n return $meet_dates;\n }", "function make_date($dates_request){\n\n\t$date_array = array();\n\t$cur_month = date('n');\t\t\n\t$cur_day = date('j');\n\t$cur_year = date('Y');\n\t$leap_true = date('L');\n\t$num_days = 0;\n\t\n\t//Loop that determines next $num_days upcoming dates\n\twhile ($num_days < $dates_request) {\t\n\n\t\t$format_date = $cur_month.\"/\".$cur_day.\"/\".$cur_year;\t\t\t\n\t\t$date_array[] = $format_date;\t\t\n\n\t\t//months with 30 days\n\t\tif ($cur_month == 9 || $cur_month == 4 || $cur_month == 6) {\n\t\t\tif ($cur_day == 30) {\n\t\t\t\t$cur_day = 1;\n\t\t\t\t$cur_month = $cur_month+1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$cur_day = $cur_day+1;\n\t\t\t}\n\t\t}\n\t\t//december\n\t\telse if ($cur_month == 12) {\n\t\t\tif ($cur_day == 31) {\n\t\t\t\t$cur_day = 1;\n\t\t\t\t$cur_month = 1;\n\t\t\t\t$cur_year = $cur_year+1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$cur_day = $cur_day+1;\n\t\t\t}\n\t\t}\n\t\t//february\t\t\n\t\telse if ($cur_month == 2) {\n\t\t\tif ($leap_true == true) {\n\t\t\t\tif ($cur_day == 29) {\n\t\t\t\t\t$cur_day=1;\n\t\t\t\t\t$cur_month=$cur_month+1;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$cur_day = $cur_day+1;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif ($cur_day == 28) {\n\t\t\t\t\t$cur_day = 1;\n\t\t\t\t\t$cur_month=$cur_month+1;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$cur_day = $cur_day+1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//other months\t\t\n\t\telse {\n\t\t\tif ($cur_day == 31) {\n\t\t\t\t$cur_day = 1;\n\t\t\t\t$cur_month=$cur_month+1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$cur_day = $cur_day+1;\n\t\t\t}\n\t\t}\n\t$num_days = $num_days+1;\n\t}\n\treturn $date_array;\n}", "public static function getDatesFromRange(DateTime $start, DateTime $end): array\n {\n $array = [];\n\n // Variable that store the date interval\n // of period 1 day\n $interval = new DateInterval('P1D');\n\n $end->add($interval);\n\n $period = new DatePeriod($start, $interval, $end);\n\n // Use loop to store date into array\n foreach ($period as $date) {\n $array[] = $date;\n }\n\n // Return the array elements\n return $array;\n }", "function GetDays($sStartDate, $sEndDate){\n\n // This function works best with YYYY-MM-DD \n\n // but other date formats will work thanks \n\n // to strtotime(). \n\n $sStartDate = gmdate(\"Y-m-d\", strtotime($sStartDate)); \n\n $sEndDate = gmdate(\"Y-m-d\", strtotime($sEndDate)); \n\n\n\n // Start the variable off with the start date \n\n $aDays[] = $sStartDate; \n\n\n\n // Set a 'temp' variable, sCurrentDate, with \n\n // the start date - before beginning the loop \n\n $sCurrentDate = $sStartDate; \n\n\n\n // While the current date is less than the end date \n\n while($sCurrentDate < $sEndDate){ \n\n // Add a day to the current date \n\n $sCurrentDate = gmdate(\"Y-m-d\", strtotime(\"+1 day\", strtotime($sCurrentDate))); \n\n\n\n // Add this new day to the aDays array \n\n $aDays[] = $sCurrentDate; \n\n } \n\n\n\n // Once the loop has finished, return the \n\n // array of days. \n\n return $aDays; \n\n }", "private function getTimeExtent($dates)\n {\n if (count($dates) === 0 || !isset($dates[0])) {\n return array(\n 'startDate' => null,\n 'completionDate' => null\n );\n }\n\n $startDate = $dates[0];\n $competionDate = $dates[0];\n for ($i = 1, $ii = count($dates); $i < $ii; $i++) {\n if (isset($dates[$i])) {\n if ($startDate > $dates[$i]) {\n $startDate = $dates[$i];\n }\n if ($competionDate < $dates[$i]) {\n $competionDate = $dates[$i];\n }\n }\n }\n\n return array(\n 'startDate' => $startDate,\n 'completionDate' => $competionDate\n );\n }", "public static function arrayFill($firstDay, $array, $lastDay)\n {\n //taking count variable to fill the array\n $count = 1;\n for ($i = $firstDay; $i < 7; $i++) \n {\n //filling first line\n $array[0][$i] = $count++;\n }\n for ($i = 1; $i < 6; $i++) \n {\n //filling remaining lines\n for ($j = 0; $j < 7 && $count <= $lastDay; $j++) \n {\n $array[$i][$j] = $count++;\n }\n }\n return $array;\n }", "public function findByDate(int $start, int $end) : ?array\n {\n $resp = DB::table($this->TABLE)->where(\n [self::DATE, \">=\", $start],\n [self::DATE, \"<=\", $end]\n )->get();\n return $this->loadMany($resp);\n }", "function AddSelectedDates($arrDateData){\n $intLastDay = 0;\n $intTotalDays = 0;\n foreach($arrDateData as $intCalendarId=>$arrDates){\n if(sizeof($arrDates) < 2){\n $this->strResults .= 'Cannot add less than two dates!';\n continue 1;\n }\n $this->strResults .= '<h3>Calendar ID ['.$intCalendarId.']</h3>';\n $this->strResults .= '<h4>There are ['.sizeof($arrDates).'] dates selected</h4>';\n foreach($arrDates as $intIndex=>$intDate){\n if($intIndex == 0){\n $intLastDay = $intDate;\n $intTotalDays += $intDate;\n continue 1;\n }\n $this->strResults .= 'Day '.($intIndex).' '.$this->MakeDateFromMembers($intLastDay).' plus day '.($intIndex + 1).' '.$this->MakeDateFromMembers($intDate).' is '.((int)$intDate + (int)$intLastDay).'.<br />';\n $intLastDay = $intDate;\n $intTotalDays += $intDate;\n }\n $this->strResults .= 'The aggregate value is '.$intTotalDays.'.';\n }\n return TRUE;\n }", "function date_list( $from_date, $to_date )\n {\n $from_time = strtotime(\"midnight\", is_numeric($from_date) ? $from_date : strtotime($from_date));\n $to_time = strtotime(\"midnight\", is_numeric($to_date ) ? $to_date : strtotime($to_date ));\n\n $dates = array();\n while( $from_time <= $to_time )\n {\n $dates[] = date(\"Y-m-d\", $from_time);\n $from_time = strtotime(\"+1 day\", $from_time);\n }\n\n return $dates;\n }", "public static function bulktsquery($slotList,$dayList,$startdate,$enddate){\n\t\t$outp=array();\n\t\tfor($i=$startdate;$i<=$enddate;$i+=3600*24){\n\t\t\tif(in_array(0+date(\"N\",$i),$dayList)){\n\t\t\t\tfor($j=0;$j<count($slotList);$j++){\n\t\t\t\t\t$class_starttime=$i+1800*($slotList[$j]-1);\n\t\t\t\t\t$outp[]=$class_starttime;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $outp;\n\t}", "function findWeekStartEndFromDateRange($dateStart,$dateEnd,$weekStartOn = 6) {\r\n\t$arrayWeekStart = array();\r\n\t$arrayWeekEnd = array();\r\n\t$foundWeeksRough = array();\r\n\t$foundWeeks = array();\r\n\tfor ($i = strtotime($dateStart); $i <= strtotime($dateEnd); $i = strtotime('+1 day', $i)) {\r\n\t if (date('N', $i) == $weekStartOn){ //Default is Saturday == 6\r\n\t\t$arrayWeekStart[] = date('Y-m-d', $i); // if it's a Saturday\r\n\t }\r\n\t}\r\n\tforeach($arrayWeekStart as $valweekStartOn){\r\n\t\t$valWeekEnd = strtotime(\"+6 day\".$valweekStartOn);\r\n\t\tif($valWeekEnd <= strtotime($dateEnd)){\r\n\t\t\t$arrayWeekEnd[] = date('Y-m-d', strtotime(\"+6 day\".$valweekStartOn));\r\n\t\t}\r\n\t}\r\n\t$foundWeeksRough = array_map(function ($arrayWeekStart, $arrayWeekEnd) {\r\n\t\t\t\t\treturn ['Start' => $arrayWeekStart, 'End' => $arrayWeekEnd];\r\n\t\t\t\t\t}, $arrayWeekStart, $arrayWeekEnd);\t\r\n\t\r\n\tforeach($foundWeeksRough as $foundWeekRough){\t\r\n\t\tif(empty($foundWeekRough['End']))continue;\r\n\t\t$foundWeeks[] = $foundWeekRough['Start'].\",\".$foundWeekRough['End'];\r\n\t}\r\n// Array of WeekStartDate and WeekEndDate\r\nreturn $foundWeeks;\r\n}", "public function getResAppAcademicYearStartEndDates( $currentYear=null, $formatStr=\"Y-m-d\", $asDateTimeObject=false ) {\n //$userServiceUtil = $this->container->get('user_service_utility');\n\n //$startEndDates = $userServiceUtil->getAcademicYearStartEndDates($currentYear,true); //return dates as Date object\n $startEndDates = $this->getAcademicYearStartEndDates($currentYear,true); //return dates as Date object\n\n $startDateObject = $startEndDates['startDate'];\n $endDateObject = $startEndDates['endDate'];\n\n if( $asDateTimeObject ) {\n $resArr['Season Start Date'] = $startDateObject;\n $resArr['Season End Date'] = $endDateObject;\n\n //duplicate with legacy key from getAcademicYearStartEndDates 'startDate'\n $resArr['startDate'] = $startDateObject;\n $resArr['endDate'] = $endDateObject;\n } else {\n $startDate = $startDateObject->format($formatStr);\n $endDate = $endDateObject->format($formatStr);\n //echo \"startDate=\".$startDate.\"<br>\";\n //echo \"endDate=\".$endDate.\"<br>\";\n //exit('111');\n\n $resArr['Season Start Date'] = $startDate;\n $resArr['Season End Date'] = $endDate;\n\n //duplicate with legacy key from getAcademicYearStartEndDates 'startDate'\n $resArr['startDate'] = $startDate;\n $resArr['endDate'] = $endDate;\n }\n\n $startDateObject->add(new \\DateInterval('P1Y')); //P1Y = +1 year\n $endDateObject->add(new \\DateInterval('P1Y'));\n\n if( $asDateTimeObject ) {\n $resArr['Residency Start Date'] = $startDateObject; //Application Season Start Year + 1 year\n $resArr['Residency End Date'] = $endDateObject;\n } else {\n $residencyStartDate = $startDateObject->format($formatStr);\n $residencyEndDate = $endDateObject->format($formatStr);\n\n $resArr['Residency Start Date'] = $residencyStartDate; //Application Season Start Year + 1 year\n $resArr['Residency End Date'] = $residencyEndDate;\n }\n\n return $resArr;\n }", "public function getCompetitionResultByDate($competition_date_start, $competition_date_end = null)\n {\n $competition_date_end = ($competition_date_end === null) ? $competition_date_start : $competition_date_end;\n\n $sql = $this->rpsdb->prepare(\"SELECT\n c.Competition_Date,\n c.Medium,\n c.Classification,\n c.Special_Event,\n if(c.Classification = 'Beginner', 0,\n if(c.Classification = 'Advanced', 1, 2)) AS 'Class_Code',\n e.Score,\n e.Award,\n e.Member_ID\nFROM competitions AS c, entries AS e\nWHERE c.ID = e.Competition_ID AND\n Competition_Date >= %s AND\n Competition_Date < %s AND\n Special_Event = 'N' AND\n c.Scored = 'Y'\nORDER BY c.Medium DESC, Class_Code, c.Competition_Date\",\n $competition_date_start,\n $competition_date_end);\n\n $records = $this->rpsdb->get_results($sql, ARRAY_A);\n $return = [];\n foreach ($records as $rec) {\n $user_info = get_userdata($rec['Member_ID']);\n $rec['FirstName'] = $user_info->user_firstname;\n $rec['LastName'] = $user_info->user_lastname;\n $rec['Username'] = $user_info->user_login;\n $return[] = $rec;\n }\n\n return $return;\n }", "public function rangesToDates(){\n //Rangos::\n }", "public function getfullavailability($nonavailable_dates=array(), \\DateTime $startDate, \\DateTime $endDate) {\n\n // Add one to the end\n // $endDate->add(new \\DateInterval('P1D'));\n\n $available_dates = array();\n\n $periodInterval = new \\DateInterval('P1D');\n $period = new \\DatePeriod( $startDate, $periodInterval, $endDate );\n\n foreach ($period as $date ) {\n $available_dates[] = array(\n 'date' => $date->format('Y-m-d'),\n 'available' => 1,\n 'property_id' => $this->property_id,\n );\n }\n\n foreach ($available_dates as $k => $availabledate) {\n\n if ( count ( $nonavailable_dates ) > 0 ) {\n foreach ($nonavailable_dates as $nonavailabledate) {\n if ( $nonavailabledate['date'] == $availabledate['date'] ) {\n // unset non available days\n unset($available_dates[$k]);\n }\n }\n }\n }\n\n\n $available_dates = array_merge( $available_dates, $nonavailable_dates);\n\n // Sort by date\n uasort( $available_dates, function ($a, $b) {\n if ($a['date'] == $b['date']) {\n return 0;\n }\n return ($a['date'] < $b['date']) ? -1 : 1;\n });\n\n return $available_dates;\n }", "function add_event_to_array($dates, $page_data, &$datePaths) {\n foreach ($page_data['dates'] as $date) {\n $start_date = (int)($date['start-date']) / 1000;\n $end_date = (int)($date['end-date']) / 1000;\n $specific_start = date(\"Y-m-d\", $start_date );\n $specific_end = date(\"Y-m-d\", $end_date );\n\n $page_data['time_string'] = $date['time-string'];\n $page_data['specific_start'] = $date['start-date'];\n $page_data['specific_end'] = $date['end-date'];\n $page_data['specific_all_day'] = $date['all-day'];\n $page_data['specific_need_time_zone'] = $date['outside-of-minnesota'];\n if($page_data['specific_need_time_zone'] == true) {\n $time_zone = $date['time-zone'];\n if ($time_zone == \"Hawaii-Aleutian Time\") {\n $page_data['specific_time_zone'] = \"HT\";\n } elseif ($time_zone == \"Alaska Time\") {\n $page_data['specific_time_zone'] = \"AT\";\n } elseif ($time_zone == \"Pacific Time\") {\n $page_data['specific_time_zone'] = \"PT\";\n } elseif ($time_zone == \"Mountain Time\") {\n $page_data['specific_time_zone'] = \"MT\";\n } elseif ($time_zone == \"Eastern Time\") {\n $page_data['specific_time_zone'] = \"ET\";\n } else {\n $page_data['specific_time_zone'] = \"CT\";\n }\n } else {\n $page_data['specific_time_zone'] = \"\";\n }\n\n if($specific_start == $specific_end){\n //Don't need a date range.\n $key = date(\"Y-m-d\", $start_date);\n add_page_to_day($dates[$key], $page_data, $datePaths[$key]);\n }\n // range of dates\n else{\n $page_data['specific_all_day'] = true;\n $start = date(\"Y-n-j\", $start_date);\n // Add 1 day to $end so that the DatePeriod includes the last day in 'end-date'\n $end = date(\"Y-n-j\", strtotime('+1 day', $end_date));\n // Create a date period for each of the dates this event-date spans.\n // This will put it on the calendar each day.\n $period = new DatePeriod(\n new DateTime($start),\n new DateInterval('P1D'),\n new DateTime($end)\n );\n // Add a listng to the array for each event / event date\n $foreach_start_time = microtime(true);\n foreach ($period as $inner_date) {\n $key = $inner_date->format('Y-m-d');\n add_page_to_day($dates[$key], $page_data, $datePaths[$key]);\n }\n\n }\n\n }\n return $dates;\n}", "function getAllDates($from,$to)\n{\n $dates = array();\n $fromdate = new DateTime($from);\n $todate = new DateTime($to);\n $datePeriod = new \\DatePeriod(\n $fromdate,\n new \\DateInterval('P1D'),\n $todate->modify('+1 day')\n );\n \n \n foreach($datePeriod as $date) {\n $dates[] = $date->format('Y-m-d');\n } \n \n return $dates;\n}", "function calculateDates()\n\t\t\t{\n\t\t\t\t$dates = [ 'mailshot_1_date'=>'+7 day', 'mailshot_2_date' => '+14 day',\n\t\t\t\t\t'employer_engagement_start'=>' +14 day', 'employer_engagement_end'=>'-9 week', 'self_place_deadline'=>'-7 week',\n\t\t\t\t\t 'matching_end'=>'-7 week'];\n\n\t\t\t\t$placement = ['employer_engagement_end'=>'-9 week', 'self_place_deadline' =>'-7 week','matching_end' =>'-7 week'];\n\t\t\t\tif (!empty($_POST)) {\n\t\t\t\t\tif ($this->input->post('campaign_place_start_date')) {\n\t\t\t\t\t\t$start = new DateTime();\n\t\t\t\t\t\t$start->setTimestamp( strtotime($this->input->post('campaign_start_date')));\n\t\t\t\t\t\t$place_start = new DateTime();\n\t\t\t\t\t\t$place_start->setTimestamp( strtotime($this->input->post('campaign_place_start_date')));\n\t\t\t\t\t\t$place_end = new DateTime();\n\t\t\t\t\t\t$place_end->setTimestamp(strtotime($this->input->post('campaign_place_end_date')));\n\t\t\t\t\t\t$array = [];\n\t\t\t\t\t\t\tforeach ($dates as $k => $day){\n\t\t\t\t\t\t\t\tif(in_array($k,(array_keys($placement)))){\n\t\t\t\t\t\t\t\t\t$array[$k] = date ('d/m/Y',strtotime( $day));\n\t\t\t\t\t\t\t\t}\n else {\n $array[$k] = date('d/m/Y', strtotime( $day));\n }\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\techo json_encode($array, true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "protected function prepareSectorStartDates($startDate, $endDate, $deliveryDates)\n {\n $startDates[] = (clone $startDate)->format('Y-m-d');\n\n foreach ($deliveryDates as $deliveryDate) {\n $newDeliveryDate = Carbon::parse($deliveryDate)->addDay();\n if ($newDeliveryDate->lte($endDate)) {\n $startDates[] = $newDeliveryDate->format('Y-m-d');\n }\n }\n\n return $startDates;\n }", "public static function answerDate($array){\n $tmp_array = [];\n foreach($array as $a){\n $tmp_array[] = $a->getAnswer();\n }\n return $tmp_array;\n }", "public static function createDateRange($startDate, $endDate, $format = \"Y-m-d\")\n {\n $begin = new \\DateTime($startDate);\n\n $_end = self::dateAdd($endDate, UnitDay::DAY, 1);\n\n $end = new \\DateTime($_end);\n\n $interval = new \\DateInterval('P1D'); // 1 Day\n $dateRange = new \\DatePeriod($begin, $interval, $end);\n\n $range = [];\n foreach ($dateRange as $date) {\n if ($format == null) {\n $range[] = $date;\n } else {\n $range[] = $date->format($format);\n }\n\n }\n\n\n return $range;\n }", "public function getAvailableDates($blockedDates,$scheduleDays) {\n\n $d1= date('Y-m-d');\n $d2= strtotime(date(\"Y-m-d\").' +2 Months');\n $d2= date('Y-m-d', $d2);\n $begin = new \\DateTime($d1);\n $end = new \\DateTime($d2);\n $daterange = new \\DatePeriod($begin, new \\DateInterval('P1D'), $end);\n\n $dates = array();\n $arrAvailableDates = array();\n foreach($daterange as $date){\n $dates[] = $date->format(\"Y-m-d\");\n }\n\n foreach ($blockedDates as $key => $value) {\n\n if(!empty($value) && $value[0] != \"\"){\n foreach($value as $blockDate){\n $checkBlockDate = array_search($blockDate, $dates);\n\n if($checkBlockDate!==false)\n unset($dates[$checkBlockDate]);\n }\n\n\n $arrAvailableDates[$key] = $this->sortByDays($dates,$scheduleDays[$key]);\n }else{\n if(isset($scheduleDays[$key])){\n $arrAvailableDates[$key] = $this->sortByDays($dates,$scheduleDays[$key]);\n }\n\n }\n\n }\n //echo \"<pre>\"; print_r($arrAvailableDates); die;\n return $arrAvailableDates;\n }", "private function _get_calendar_array()\n\t{\n\t $this->all_events = $this->result->xpath(\".//event\");\n\t \n\t foreach($this->all_events as $an_event):\n\t $start_at = $an_event->xpath(\"./start-at\");\n \t $start_at = $start_at[0];\n \t $end_at = $an_event->xpath(\"./end-at\");\n \t $end_at = $end_at[0];\n \t \n \t $start_at = new DateTime($start_at);\n \t $start_at->setTimezone(new DateTimeZone('America/Chicago'));\n \t $start_at->setTime(0, 0, 0);\n \t $end_at = new DateTime($end_at);\n \t $end_at->setTimezone(new DateTimeZone('America/Chicago'));\n \t $end_at->setTime(0, 0, 0);\n \t \n \t $start_timestamp = strtotime($start_at->format('Y-m-d'));\n $end_timestamp = strtotime($end_at->format('Y-m-d'));\n \n $start_year = date(\"Y\", $start_timestamp);\n $end_year = date(\"Y\", $end_timestamp);\n $start_month = date(\"m\", $start_timestamp);\n $end_month = date(\"m\", $end_timestamp);\n $start_day = date(\"d\", $start_timestamp);\n $start_day = $start_day + 1;\n $end_day = date(\"d\", $end_timestamp);\n $end_day = $end_day + 1;\n \n if(($start_year == $this->year && $start_month == $this->month) || ($end_year == $this->year && $end_month == $this->month)):\n if($start_year == $end_year):\n if($start_month == $end_month):\n $this->_calendar_array_one($start_day, $end_day);\n else:\n if($end_month != $this->month):\n $this->_calendar_array_two($start_day);\n else:\n $this->_calendar_array_three($end_day);\n endif;\n endif;\n endif;\n endif;\n endforeach;\n \n\t foreach($this->callinks as $callinks):\n\t foreach($callinks as $key => $value):\n\t $this->combined_callinks[\"$key\"] = $value;\n\t endforeach;\n\t endforeach;\n\t}", "protected function splitPeriod($rangePeriod){\n $resultPeriod = [];\n $period = generatePeriod($rangePeriod);\n $startDate = $period['startDate'];\n $endOfMonthStartDate = Carbon::parse($startDate)->endOfMonth()->format('Y-m-d');\n $endDate = $period['endDate'];\n\n if($endDate > $endOfMonthStartDate){\n $resultPeriod[] = ['start_period' => $startDate, 'end_period' => $endOfMonthStartDate];\n $resultPeriod[] = ['start_period' => substr($endDate, 0, 7).'-01' , 'end_period' => $endDate];\n }else{\n $resultPeriod[] = ['start_period' => $startDate, 'end_period' => $endDate];\n }\n return $resultPeriod;\n }", "function CompareDates($arrDateData){\n $intLastDay = 0;\n foreach($arrDateData as $intCalendarId=>$arrDates){\n if(sizeof($arrDates) < 2){\n $this->strResults .= 'Cannot compare less than two dates!';\n continue 1;\n }\n $this->strResults .= '<h3>Calendar ID ['.$intCalendarId.']</h3>';\n $this->strResults .= '<h4>There are ['.sizeof($arrDates).'] dates selected</h4>';\n foreach($arrDates as $intIndex=>$intDate){\n if($intIndex == 0){\n $intLastDay = $intDate;\n continue 1;\n }\n $this->strResults .= 'Day '.($intIndex).' '.$this->MakeDateFromMembers($intLastDay).' is '.($intDate - $intLastDay).' days apart from day '.($intIndex + 1).' '.$this->MakeDateFromMembers($intDate).'.<br />';\n $intLastDay = $intDate;\n }\n }\n return TRUE;\n }", "public function processData()\n {\n \n $dateTimeStart = new DateTime($this->start);\n \n $dateEnd = $this->end;\n \n if (!$dateEnd) {\n $dateEnd = date('Y-m-d');\n }\n \n $dateTimeEnd = new DateTime($dateEnd);\n $this->yearEnd = $dateTimeEnd->format('Y');\n \n $beginYear = $dateTimeStart->format('Y');\n $this->yearStart = $beginYear;\n \n\n \n $numYears = $this->yearEnd - $this->yearStart;\n \n\n Log::debug( \"Start: {$this->yearStart} End: {$this->yearEnd} Num: {$numYears}\" );\n \n \n if (!$numYears) {\n $numYears = 1;\n }\n \n $this->allYears = [];\n \n for ($num = 0; $num <= $numYears; ++$num) {\n $this->allYears[] = $beginYear;\n ++$beginYear;\n }\n \n if (!$this->active) {\n $this->active = $this->yearEnd;\n }\n \n $active = $this->active;\n \n $this->yearBefore = $active-1;\n $this->yearAfter = $active+1;\n \n // ok ganz simple\n if (count($this->allYears) > 5) {\n\n \n if ($active + 2 >= $this->yearEnd) {\n $active = $this->yearEnd - 2;\n }\n \n if ( ($active - 2) <= $this->yearStart) {\n $active = $this->yearStart + 2;\n }\n \n $this->showYears[] = $active-2;\n $this->showYears[] = $active-1;\n $this->showYears[] = $active;\n $this->showYears[] = $active+1;\n $this->showYears[] = $active+2;\n \n } else {\n \n $this->showYears = $this->allYears;\n }\n \n $this->allYears = array_reverse($this->allYears);\n\n }", "public function getListBeforeDate($endDate);", "private function createDateRangeArray($dateFrom, $dateTo)\n {\n $dateRange = array();\n $tsFrom = strtotime($dateFrom);\n $tsTo = strtotime($dateTo);\n\n if ($tsTo >= $tsFrom)\n {\n $dateRange[] = date('Y-m-d', $tsFrom);\n while ($tsFrom < $tsTo)\n {\n $tsFrom += 60 * 60 * 24;\n $dateRange[] = date('Y-m-d', $tsFrom);\n }\n }\n\n return $dateRange;\n }", "function form_date_multi($variable, $start='', $end='') {\n\n\tglobal $request;\n\n\t// timestamps get converted to dates (treat as in GMT)\n\tif (is_numeric($start)) {\n\t\t$start = array(\n\t\t\t'day' => fetch_day($start),\n\t\t\t'month' => fetch_month($start),\n\t\t\t'year' => fetch_year($start)\n\t\t);\n\t}\n\n\t// timestamps get converted to dates (treat as in GMT)\n\tif (is_numeric($end)) {\n\t\t$end = array(\n\t\t\t'day' => fetch_day($end),\n\t\t\t'month' => fetch_month($end),\n\t\t\t'year' => fetch_year($end)\n\t\t);\n\t}\n\n\tif (!is_array($start)) {\n\t\t$start = array();\n\t}\n\n\tif (!is_array($end)) {\n\t\t$end = array();\n\t}\n\n\tif ($start['year'] AND !$start['day']) $start['day'] = 1;\n\tif ($start['year'] AND !$start['month']) $start['month'] = 1;\n\n\tif ($end['year'] AND !$end['day']) $end['day'] = 1;\n\tif ($end['year'] AND !$end['month']) $end['month'] = 1;\n\n\tif ($start['day'] AND $end['day']) {\n\t\t$visno = \"showCalendar('$variable', 1);\";\n\t} elseif ($start['day']) {\n\t\t$visno = \"showCalendar('$variable');\";\n\t} elseif ($start['number'] AND $end['number']) {\n\t\t$visno = \"showTime('$variable', 1);\";\n\t} elseif ($start['number']) {\n\t\t$visno = \"showTime('$variable');\";\n\t} else {\n\t\t$visno = \"showCalendar('$variable');\";\n\t}\n\n\t$time = \"\n\t\t<table id=\\\"\" . $variable . \"_time\\\" cellspacing=\\\"0\\\" cellpadding=\\\"0\\\"><tr>\n\t\t\t<td style=\\\"padding-right:5px\\\">\" . html_image('icons/todays_tasks.gif', '', \"onclick=\\\"showCalendar('$variable');\\\"\") . \"</td>\n\n\t\t\t<td>From \" . form_time_options($variable . '_start', $start['number'], $start['datetype']) . \" ago until\n\t\t\t\t<span id=\\\"\" . $variable . \"_time_closed\\\"><a onclick=\\\"showTime('$variable', 1);\\\">now</a>.</span>\n\t\t\t</td>\n\n\t\t\t<td>\n\t\t\t\t<span id=\\\"\" . $variable . \"_time_open\\\">&nbsp;\" . form_time_options($variable . '_end', $end['number'], $end['datetype']) . \" ago [<a onclick=\\\"showTime('$variable');\\\">X</a>]</span>\n\t\t\t</td>\n\n\t\t</tr></table>\n\t\";\n\n\t$calendar = \"\n\t\t<table id=\\\"\" . $variable . \"_date\\\" cellspacing=\\\"0\\\" cellpadding=\\\"0\\\"><tr>\n\n\t\t\t<td style=\\\"padding-right:5px\\\">\" . html_image('icons/view_calendar.gif', '', \"onclick=\\\"showTime('$variable');\\\"\") . \"</td>\n\t\t\t<td>From&nbsp;</td>\n\t\t\t<td style=\\\"padding-right:4px\\\">\" . form_date($variable . '_start', $start) . \"</td>\n\t\t\t<td> ago until\n\t\t\t\t<span id=\\\"\" . $variable . \"_date_closed\\\"><a onclick=\\\"showCalendar('$variable', 1, document.form);\\\">now</a>.</span></td>\n\t\t\t<td>&nbsp;</td>\n\t\t\t<td>\n\t\t\t\t<span id=\\\"\" . $variable . \"_date_open\\\">\" . form_date($variable . '_end', $end) . \"</span></td>\n\t\t\t<td>\n\t\t\t\t<span id=\\\"\" . $variable . \"_date_open2\\\">&nbsp; ago [<a onclick=\\\"showCalendar('$variable');\\\">X</a>]</td></span>\n\t\t\t</td>\n\n\t\t</tr></table>\n\t\";\n\n\treturn \"<div style=\\\"width:545px\\\">\" . $time . $calendar . \"<script>$visno</script></div>\";\n\n}", "public function getByStartDateAndEndDate(\n DateTime $start_date,\n DateTime $end_date\n );", "protected function dates_filter(){\n \t//+Constraint Isgi: only one year data\n \t$temporal = $this->get_temporal();\n \tif( strtolower($temporal->end) == \"now\"){\n \t\t$now = new \\DateTime();\n \t\t$temporal->end = $now->format(\"Y-m-d\");\n \t}\n \t\n \t\n \t//change start and end\n \tif( $this->start < $temporal->start){\n \t\t$this->start = $temporal->start;\n \t}\n \tif( $this->end > $temporal->end){\n \t\t$this->end = $temporal->end;\n \t}\n \t$update = $this->get_update();\n \tif( !empty( $update) && $update < $this->end){\n \t\t$this->end = $update;\n \t}\n \t// diff between start and end\n \t$start = new \\DateTime( $this->start);\n \t$end = new \\DateTime( $this->end);\n \t$interval = $start->diff( $end);\n \tif( $interval->invert){\n \t\t//end < start\n \t\t$this->error = \"NO_DATA\";\n \t}else{\n\t \tif( $interval->days > 365){\n\t \t\t$start = clone $end;\n\t \t\t$start->sub( new \\DateInterval(\"P364D\"));\n\t \t\t$this->start = $start->format(\"Y-m-d\");\n\t \t}\n \t}\n }" ]
[ "0.645774", "0.62865955", "0.6130205", "0.60760057", "0.6015916", "0.5997147", "0.5994429", "0.59929216", "0.59664273", "0.5950139", "0.59144026", "0.5910931", "0.58751", "0.58517", "0.5842366", "0.58401734", "0.5824187", "0.5802125", "0.57976973", "0.5790367", "0.5786731", "0.57825166", "0.5780119", "0.5736424", "0.5734908", "0.57303625", "0.5707515", "0.5684883", "0.5683905", "0.56297636", "0.56270087", "0.56266767", "0.5613312", "0.5604616", "0.56041086", "0.5594047", "0.55857086", "0.55849427", "0.55705035", "0.55677086", "0.55344844", "0.5532621", "0.55075336", "0.5503228", "0.54905504", "0.54826325", "0.5482241", "0.5455271", "0.54460686", "0.5435713", "0.54194754", "0.54102623", "0.53976715", "0.53897345", "0.53604543", "0.5336672", "0.5326168", "0.5318172", "0.531418", "0.5310566", "0.5310161", "0.52985686", "0.52933365", "0.52900076", "0.5280554", "0.52766067", "0.5265251", "0.5264962", "0.5248898", "0.5247752", "0.5241554", "0.5231118", "0.52227604", "0.5212485", "0.52095604", "0.5209089", "0.5199673", "0.51750875", "0.51453096", "0.51386267", "0.51355976", "0.51312506", "0.5129672", "0.51245975", "0.51242256", "0.5123184", "0.5116893", "0.5116446", "0.5106173", "0.5100293", "0.50899714", "0.50643325", "0.5046804", "0.504524", "0.5035333", "0.5018821", "0.50165015", "0.50115645", "0.50096184", "0.49949214" ]
0.5208887
76
Retrieves an array of array of dates (which can be used for IsValidDates for a given Person, Group and GroupRole
public static function GetParticipationDatesArrayForPersonIdGroupIdGroupRoleId($intPersonId, $intGroupId, $intGroupRoleId) { $objParticipationArray = GroupParticipation::QueryArray(QQ::AndCondition( QQ::Equal(QQN::GroupParticipation()->PersonId, $intPersonId), QQ::Equal(QQN::GroupParticipation()->GroupId, $intGroupId), QQ::Equal(QQN::GroupParticipation()->GroupRoleId, $intGroupRoleId) ), QQ::OrderBy(QQN::GroupParticipation()->DateStart)); $dttArrayToReturn = array(); foreach ($objParticipationArray as $objParticipation) { $dttArrayToReturn[] = array($objParticipation->DateStart, $objParticipation->DateEnd); } return $dttArrayToReturn; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _getDateRange()\n {\n if (is_null($this->_dateRange)) {\n $this->_dateRange = array();\n $rules = $this->getAttributeObject()->getValidateRules();\n if (isset($rules[self::MIN_DATE_RANGE_KEY])) {\n $this->_dateRange[self::MIN_DATE_RANGE_KEY] = $rules[self::MIN_DATE_RANGE_KEY];\n }\n if (isset($rules[self::MAX_DATE_RANGE_KEY])) {\n $this->_dateRange[self::MAX_DATE_RANGE_KEY] = $rules[self::MAX_DATE_RANGE_KEY];\n }\n }\n return $this->_dateRange;\n }", "public function Dates() {\r\n $dates = [];\r\n for ($i = 1; $i <= 31; $i++) {\r\n $dates[$i] = $i;\r\n }\r\n return $dates;\r\n }", "public function getdates() {\n\n $dates = array();\n\n // This can be multiple reservations per property\n foreach ($this->data as $changelog) {\n\n $status_flag = strtolower($changelog['strStatusFlag']);\n\n $rows = $this->createDateRows($changelog, $status_flag);\n\n foreach ($rows as $row ) {\n $dates[] = $row;\n }\n\n }\n\n return $dates;\n }", "public function getLimitsConsumptionDates(): array\n {\n if ($this->isLogged === false) {\n $this->login();\n }\n\n $response = $this->client->get(self::URI_LIMITS_CONSUMPTION_DATES);\n if ($response->getStatusCode() !== 200) {\n $this->isLogged = false;\n return false;\n }\n\n $data = json_decode($response->getBody()->getContents());\n $result = [\n 'min' => \\DateTime::createFromFormat('d-m-YH:i:s', $data->fechaMinima),\n 'max' => \\DateTime::createFromFormat('d-m-YH:i:s', $data->fechaMaxima),\n ];\n\n return $result;\n }", "public function provideDate()\n {\n return array(\n array(array(\"date\\before{date:'2013-04-04'}\"), true),\n array(array(\"date\\before{date:'1998-04-04'}\"), false),\n array(array(\"date\\after{date:'2013-04-04'}\"), false),\n array(array(\"date\\after{date:'1998-04-04'}\"), true),\n );\n }", "public function datesProvider(): array\n {\n return [\n // Time Dates Match?\n ['January 1st 2018', ['2018-01-01'], true],\n ['January 1st 2018', ['2018-01-02'], false],\n ['January 1st 2018', ['2018-02-01'], false],\n ['January 1st 2018', ['2019-01-01'], false],\n ['January 2nd 2018', ['2018-01-01'], false],\n ['February 1st 2018', ['2018-02-01'], true],\n ['January 1st 2019', ['2019-01-01'], true],\n ['January 1st 2018', ['2018-01-01', '2018-05-23'], true],\n ['January 1st 2018', ['2018-01-02', '2018-01-01'], true],\n ['January 1st 2018', ['2018-02-01', '2018-01-01'], true],\n ['January 1st 2018', ['2019-01-01', '2018-01-01'], true],\n ['January 2nd 2018', ['2018-01-01', '2018-01-02'], true],\n ['February 1st 2018', ['2018-02-01', '2019-02-01'], true],\n ['January 1st 2019', ['2019-01-01', '2019-02-01'], true],\n ['February 29th 2020', ['2020-02-29'], true],\n ['February 29th 2020', ['2020-03-01'], false],\n ];\n }", "protected function get_dates(): array {\n global $CFG;\n\n require_once($CFG->dirroot . '/mod/assign/locallib.php');\n\n $course = get_course($this->cm->course);\n $context = \\context_module::instance($this->cm->id);\n $assign = new \\assign($context, $this->cm, $course);\n\n $timeopen = $this->cm->customdata['allowsubmissionsfromdate'] ?? null;\n $timedue = $this->cm->customdata['duedate'] ?? null;\n\n $activitygroup = groups_get_activity_group($this->cm, true);\n if ($activitygroup) {\n if ($assign->can_view_grades()) {\n $groupoverride = \\cache::make('mod_assign', 'overrides')->get(\"{$this->cm->instance}_g_{$activitygroup}\");\n if (!empty($groupoverride->allowsubmissionsfromdate)) {\n $timeopen = $groupoverride->allowsubmissionsfromdate;\n }\n if (!empty($groupoverride->duedate)) {\n $timedue = $groupoverride->duedate;\n }\n }\n }\n\n $now = time();\n $dates = [];\n\n if ($timeopen) {\n $openlabelid = $timeopen > $now ? 'activitydate:submissionsopen' : 'activitydate:submissionsopened';\n $date = [\n 'label' => get_string($openlabelid, 'mod_readaloud'),\n 'timestamp' => (int) $timeopen,\n ];\n if ($course->relativedatesmode && $assign->can_view_grades()) {\n $date['relativeto'] = $course->startdate;\n }\n $dates[] = $date;\n }\n\n if ($timedue) {\n $date = [\n 'label' => get_string('activitydate:submissionsdue', 'mod_readaloud'),\n 'timestamp' => (int) $timedue,\n ];\n if ($course->relativedatesmode && $assign->can_view_grades()) {\n $date['relativeto'] = $course->startdate;\n }\n $dates[] = $date;\n }\n\n return $dates;\n }", "public static function getValidatorDates($season) {\n $sql =\n \"SELECT min(game_date) as min, max(game_date) as max\n FROM sim_input\n WHERE season = $season\n and stats_year = 'previous'\";\n $data = reset(exe_sql(DATABASE, $sql));\n $min = $data['min'];\n $max = $data['max'];\n $rand = rand(60,120);\n $test_days = array(\n $min,\n ds_modify($min, '+1 day'),\n ds_modify($min, \"+$rand day\"),\n ds_modify($max, '-1 day'),\n $max\n );\n $final_days = array();\n foreach ($test_days as $days) {\n $final_days[] = \"'$days'\";\n }\n return $final_days;\n }", "public function invalidDateValues(): array\n {\n return [\n [1],\n ['rolf'],\n [new class {\n //\n }],\n [null],\n [''],\n ];\n }", "public function age_range()\r\n {\r\n if (empty($this->date_range)){\r\n return array(NULL, NULL);\r\n }\r\n if(empty($this->date_range->start) || empty($this->date_range->end)){\r\n return array($this->age(), $this->age());\r\n }\r\n\r\n $start_date = new PiplApi_DateRange($this->date_range->start, $this->date_range->start);\r\n $end_date = new PiplApi_DateRange($this->date_range->end, $this->date_range->end);\r\n $start_age = new PiplApi_DOB(array('date_range' => $start_date));\r\n $start_age = $start_age->age();\r\n $end_age = new PiplApi_DOB(array('date_range' => $end_date));\r\n $end_age = $end_age->age();\r\n\r\n return (array($end_age, $start_age));\r\n }", "public function getDates()\n\t{\n\t\treturn array('date');\n\t}", "public function getAllReservationsFormDates(DatesPeriod $datesPeriod): array {\n $reservations = $this->getAllReservationsForm($datesPeriod);\n if (!$reservations) {\n return [];\n }\n $reservationsDates = [];\n /** @var ReservationForm $reservation */\n foreach ($reservations as $reservation) {\n $datesPeriod = new DatesPeriod($reservation->getDateFrom(), $reservation->getDateTo());\n $reservationsDates[] = [\n 'dates' => $datesPeriod->getStayDays(),\n 'reservation_id' => $reservation->getId()\n ];\n }\n return $reservationsDates;\n }", "protected function all_unavailable_dates($room_for_check){\r\n $all_unavailable_dates = array();\r\n \r\n foreach (self::$db_table_months as $month){\r\n foreach (self::$db_table_years as $year){\r\n $unav_dates = $this->unav_days_to_dates($month, $year, $room_for_check);\r\n// var_dump($unav_dates);\r\n if (!$unav_dates) continue; //otarasim se onih koji su null\r\n// var_dump($unav_dates);\r\n foreach ($unav_dates as $unav_date){ \r\n if (is_bool($unav_date)) continue;\r\n $all_unavailable_dates[] = $unav_date;\r\n }\r\n }\r\n \r\n }\r\n return $all_unavailable_dates;\r\n }", "public function getDateList()\n {\n $return = array();\n \n for (\n $i = strtotime($this->from_date); \n $i <= strtotime($this->to_date); \n $i = strtotime('+ 1 day', $i)\n )\n {\n $date = date('Y-m-d', $i);\n $weekday = date('w', $i);\n $weekend = (in_array($weekday, array(0,6))) ? true : false;\n $calendarWeek = (int) date('W', $i); //cast to integer to remove leading 0\n \n $return[$date] = array('date' => $date, 'weekend' => $weekend, 'calendarWeek' => $calendarWeek);\n }\n \n return $return;\n }", "function getDates($startdate, $enddate, $days_of_week){\n \n $enddate = new DateTime($enddate);\n $enddate = $enddate->modify(\"+1 day\");\n \n $dates = array();\n $daterange = new DatePeriod(new DateTime($startdate),new DateInterval('P1D'),$enddate);\n \n foreach($daterange as $key=>$value){\n foreach($days_of_week as $day){\n if($value->format('l') == $day){\n $dates[] = $value->format(\"Y-m-d\");\n }\n }\n }\n \n return $dates;\n }", "function getAllDates($from,$to)\n{\n $dates = array();\n $fromdate = new DateTime($from);\n $todate = new DateTime($to);\n $datePeriod = new \\DatePeriod(\n $fromdate,\n new \\DateInterval('P1D'),\n $todate->modify('+1 day')\n );\n \n \n foreach($datePeriod as $date) {\n $dates[] = $date->format('Y-m-d');\n } \n \n return $dates;\n}", "public function getDates()\n {\n $defaults = [static::CREATED_AT, static::UPDATED_AT];\n\n return array_merge($this->dates, $defaults);\n }", "public function getDates()\n {\n $this->getFields()->each(function ($field) {\n if ($field instanceof FieldTypeDateInterface) {\n $this->dates[] = $field->getDBKey();\n }\n });\n\n if ($this->hasField(static::CREATED_AT) and $this->hasField(static::UPDATED_AT)) {\n $this->timestamps = true;\n }\n\n return parent::getDates();\n }", "public function provideValidDate() {\n $now = time();\n $lastYear = $now - 365 * 24 * 60 * 60;\n return [\n [$now],\n [$lastYear],\n [1420095661]\n ];\n }", "public function dateRanges(): DateRangeCollection;", "function createDateArray($start_dt, $end_dt)\n\t{\n\t\t$arr_dates = array();\n\t\t$arr_dates[] = $start_dt = strtotime($start_dt);\n\t\twhile(1)\n\t\t{ \n\t\t\t$start_dt = strtotime(\"+1 day\", $start_dt);\n\t\t\tif($start_dt <= strtotime($end_dt))\n\t\t\t{\n\t\t\t\t$arr_dates[] = $start_dt;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn $arr_dates;\n\t}", "public static function getDatesArray(string $preset = \"M\") : array\n {\n //==============================================================================\n // Check If Preset Dates Mode Exists\n if (!self::isPreset($preset)) {\n return array();\n }\n //==============================================================================\n // Prepare Dates\n $presets = static::$presets;\n $dateStart = new DateTime($presets[$preset][\"DateStart\"]);\n $dateStart->setTime(0, 0, 0);\n $dateEnd = new DateTime($presets[$preset][\"DateEnd\"]);\n $dateEnd->setTime(23, 59, 59);\n $dateFormat = $presets[$preset][\"DateFormat\"];\n $groupBy = $presets[$preset][\"GroupBy\"];\n\n //==============================================================================\n // Return Dates Array\n return array(\n \"DateStart\" => $dateStart,\n \"DateEnd\" => $dateEnd,\n \"DateFormat\" => $dateFormat,\n \"GroupBy\" => $groupBy,\n );\n }", "public function getnonavailabledates() {\n\n if ( self::isEmptyResult() ) {\n return array();\n }\n\n $dates = array();\n\n $non_available = $this->data[self::resultinnernode];\n\n $non_available = $this->normalize($non_available);\n\n foreach ($non_available as $dateObj ) {\n $startDate = new \\DateTime($dateObj['dtFromDate']);\n $endDate = new \\DateTime($dateObj['dtToDate']);\n\n $periodInterval = new \\DateInterval('P1D');\n $period = new \\DatePeriod( $startDate, $periodInterval, $endDate );\n\n foreach ($period as $date ) {\n $dates[] = array(\n 'date' => $date->format('Y-m-d'),\n 'available' => 0,\n 'staytype' => $dateObj['strStayType'],\n 'property_id' => $this->property_id,\n\n // Confirmation number\n 'quotenum' => $dateObj['intQuoteNum'],\n );\n }\n\n }\n\n return $dates;\n }", "function ScheduleDates()\n {\n $dateids=$this->CGI2Dates();\n\n $dates=array();\n foreach ($this->Dates() as $did => $date)\n {\n if (preg_grep('/^'.$date[ \"ID\" ].'$/',$dateids))\n {\n array_push($dates,$date);\n }\n }\n\n return $dates;\n }", "public function getDates()\r\n\t{\r\n\t\treturn array(\r\n\t\t\t'producedAt' => $this->producedAt,\r\n\t\t\t'thisUpdate' => $this->getThisUpdate(),\r\n\t\t\t'nextUpdate' => $this->getNextUpdate()\r\n\t\t);\r\n\t}", "public function getDaysAsArray()\n {\n $days = [];\n $startCurrent = $this->weekdayIndexes[$this->currentMonth[\"weekday\"]];\n $startPrevious = $this->noOfDaysPrevious - ($startCurrent - 1);\n // Add days of previous month\n for ($i = $startPrevious; $i <= $this->noOfDaysPrevious; $i++) {\n $days[] = $i;\n }\n // Add days of current month\n for ($j = 1; $j <= $this->noOfDays; $j++) {\n $days[] = $j;\n }\n // Add days of next month\n for ($k = 1; count($days) % 7 !== 0; $k++) {\n $days[] = $k;\n }\n return $days;\n }", "public function getDates()\n {\n return $this->dates;\n }", "public function getDates()\n\t{\n\t\treturn $this->dates;\n\t}", "public function getDates()\n\t{\n\t\treturn [\n\t\t\t'created_at',\n\t\t\t'updated_at',\n\t\t\t'deleted_at',\n\t\t\t'published_at',\n\t\t\t'registered_at',\n\t\t\t'confirmed_at',\n\t\t\t'blocked_at',\n\t\t];\n\t}", "private function generateDateRange(Carbon $start_date, DateInterval $interval, int $recurrences, int $exclusive = 1): array\n {\n $period = new DatePeriod($start_date, $interval, $recurrences, $exclusive);\n $dates = collect();\n\n foreach ($period as $date) {\n $dates->push($date->format('Y-m-d'));\n }\n\n return $dates->toArray();\n }", "public function getDates()\n {\n return $this->timestamps\n ? array_merge($this->dates, ['created_at', 'updated_at'])\n : $this->dates;\n }", "public function getDates()\n {\n // Apply the default filters\n foreach(self::$registered_default_filters as $filter_alias => $filter_class) {\n $filter = new $filter_class($this->dates);\n $this->applyFilter($filter, null);\n }\n\n // Apply the user defined filters\n foreach($this->filters_to_apply as $filter_alias => $parameters) {\n $filter = new self::$registered_filters[$filter_alias]($this->dates);\n $this->applyFilter($filter, $parameters);\n }\n\n return $this->dates;\n }", "public function get_days() {\n\t\t\treturn iterator_to_array( $this->days );\n\t\t}", "public function get_exception_dates();", "protected function getUserAbsenceDays($groupUserId, $seasonId)\n {\n $absences = $this->absence->getUserAbsence($seasonId, $groupUserId);\n $absenceArray = array();\n foreach ($absences as $absence) {\n $absenceArray[$absence->date] = $absence->date;\n }\n return $absenceArray;\n }", "function getDateFilterSelectedRange() {\n $from = $this->getAdditionalProperty('date_filter_from');\n $to = $this->getAdditionalProperty('date_filter_to');\n \n return $from && $to ? array(new DateValue($from), new DateValue($to)) : array(null, null);\n }", "public static function getDatesFromRange(DateTime $start, DateTime $end): array\n {\n $array = [];\n\n // Variable that store the date interval\n // of period 1 day\n $interval = new DateInterval('P1D');\n\n $end->add($interval);\n\n $period = new DatePeriod($start, $interval, $end);\n\n // Use loop to store date into array\n foreach ($period as $date) {\n $array[] = $date;\n }\n\n // Return the array elements\n return $array;\n }", "function getAllRegistrationDate()\n {\n $this->db->select('registrationdateID, registrationID, registration_date, registration_timein, registration_timeout, registration_active');\n $this->db->from(' pt_registration_dates');\n //$this->db->where('roleId !=', 0);\n $query = $this->db->get();\n \n return $query->result_array();\n }", "public static function getDateArray($baseDate) {\n\t\t$ra = array();\n\t\t$month = substr($baseDate,5,2);\n\t\t$day = substr($baseDate,8,2);\n\t\t$year = substr($baseDate,0,4);\n\t\t$ra = getDate(mktime(9,0,0,$month,$day,$year));\n\t\treturn $ra;\n\t}", "function getDatesFromRange($start, $end, $format = 'Y-m-d') { \n \n // Declare an empty array \n $array = array(); \n \n // Variable that store the date interval \n // of period 1 day \n $interval = new DateInterval('P1D'); \n \n $realEnd = new DateTime($end); \n $realEnd->add($interval); \n \n $period = new DatePeriod(new DateTime($start), $interval, $realEnd); \n \n // Use loop to store date into array \n foreach($period as $date) { \n $array[] = $date->format($format); \n } \n \n // Return the array elements \n return $array; \n}", "public function dates()\n {\n if ($this->isRange()) {\n return $this->range;\n }\n\n return $this->date;\n }", "public function convertDateProvider()\n {\n return [\n [\n 'fieldValue' => '@1534505233',\n 'expected' => 'Aug 17, 2018 11:27:13 AM',\n ],\n [\n 'fieldValue' => '@1534530000',\n 'expected' => 'Aug 17, 2018 06:20:00 PM',\n ],\n ];\n }", "public function get_dates()\r\n {\r\n $sql=\"SELECT clearance_dates.*, status.status FROM clearance_dates, status WHERE clearance_dates.status=status.status_id\";\r\n $query=$this->db->query($sql);\r\n return $query->result_array();\r\n }", "private function createDateRangeArray($dateFrom, $dateTo)\n {\n $dateRange = array();\n $tsFrom = strtotime($dateFrom);\n $tsTo = strtotime($dateTo);\n\n if ($tsTo >= $tsFrom)\n {\n $dateRange[] = date('Y-m-d', $tsFrom);\n while ($tsFrom < $tsTo)\n {\n $tsFrom += 60 * 60 * 24;\n $dateRange[] = date('Y-m-d', $tsFrom);\n }\n }\n\n return $dateRange;\n }", "public function findAllDates()\n {\n $workflowList = $this->entityManager\n ->getRepository('SiowebDummyBundle:Test')\n ->findBy(array(), array('date' => 'DESC'));\n #$workflowList = $this->entityManager->getRepository('SiowebDummyBundle:Test')->findAll();\n\n return $workflowList;\n }", "public function getRepeatDates()\n {\n $repeatDateStart = clone $this->getDateStart();\n $repeatDateEnd = clone $this->getDateEnd();\n $repeatDates = array(array('start' => clone $repeatDateStart, 'end' => clone $repeatDateEnd));\n $repeatDays = $this->getRepeatDays();\n\n $dayInterval = new DateInterval('P1D');\n for ($i = 0; $i < 6; ++$i) {\n $repeatDateStart->add($dayInterval);\n $repeatDateEnd->add($dayInterval);\n if (in_array($repeatDateStart->format('w'), $repeatDays)) {\n $repeatDates[] = array('start' => clone $repeatDateStart, 'end' => clone $repeatDateEnd);\n }\n }\n\n return $repeatDates;\n }", "public static function answerDate($array){\n $tmp_array = [];\n foreach($array as $a){\n $tmp_array[] = $a->getAnswer();\n }\n return $tmp_array;\n }", "public function findAllTimesArray()\n {\n\n $times = $this->entityManager\n ->createQueryBuilder()\n ->select('t, d.date')\n ->from('SiowebDummyBundle:Test', 'd')\n ->leftJoin('SiowebDummyBundle:Time', 't', 'WITH', 'd.id = t.dateid')\n ->where('d.id LIKE t.dateid')\n ->andWhere('t.count != 0')\n ->orderBy('t.time', 'ASC')\n ->getQuery()\n ->getResult();\n\n\n $avaibledates = array();\n\n $i = 0;\n foreach ($times as $time ) {\n $avaibledates[$i]['date'] = $time['date']->format('d.m.Y');\n $avaibledates[$i]['time'] = $time[0]->getTime();\n $avaibledates[$i]['id'] = $time[0]->getId();\n $avaibledates[$i]['description'] = $time[0]->getDescription();\n $i++;\n }\n\n #return $avaibledates;\n\n return $avaibledates;\n }", "function getDatesFromRange($start, $end, $format = 'Y-m-d') {\r\n $array = array();\r\n // Variable that store the date interval\r\n // of period 1 day\r\n $interval = new DateInterval('P1D');\r\n $realEnd = new DateTime($end);\r\n $realEnd->add($interval);\r\n $period = new DatePeriod(new DateTime($start), $interval, $realEnd);\r\n // Use loop to store date into array\r\n foreach($period as $date) {\r\n $array[] = $date->format($format);\r\n }\r\n // Return the array elements\r\n return $array;\r\n}", "protected function getDayRange($date = null)\n {\n $date = !is_object($date) ? new \\DateTime('TODAY') : $date;\n $startAt = \\DateTime::createFromFormat('Y-m-d H:i:s', date(\"Y-m-d H:i:s\", mktime(0, 0, 0, $date->format('m'), $date->format('d'), $date->format('Y'))));\n $endAt = clone $startAt;\n $endAt->modify('+1 day');\n\n return array($startAt, $endAt);\n }", "public function getDates()\n {\n return ['created_at', 'updated_at', 'openingbalancedate'];\n }", "public function get_filtered_dates() {\n\n\t\tif ( empty( $_REQUEST['date'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended\n\t\t\treturn false;\n\t\t}\n\n\t\t$dates = (array) explode( ' - ', sanitize_text_field( wp_unslash( $_REQUEST['date'] ) ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended\n\n\t\treturn array_map( 'sanitize_text_field', $dates );\n\t}", "public function rules()\n {\n return [\n \"date_start\" => ['date_format:\"d.m.Y\"', 'nullable'],\n \"date_end\" => ['date_format:\"d.m.Y\"', 'nullable'],\n ];\n }", "public function getDates()\n {\n $sql = $this->tableGateway->getSql();\n $select = $sql->select();\n\n $select->columns(array('date'));\n $select->group('date');\n $select->where('TIMESTAMP(`date`,`to`) > NOW()');\n //$select->order('date ASC');\n $select->limit(10);\n $statement = $sql->prepareStatementForSqlObject($select);\n\n return $statement->execute();\n }", "private function createDateRangeArray($strDateFrom,$strDateTo)\n{\n // inclusive array of the dates between the from and to dates.\n\n // could test validity of dates here but I'm already doing\n // that in the main script\n\n $aryRange=array();\n\n $iDateFrom=mktime(1,0,0,substr($strDateFrom,5,2), substr($strDateFrom,8,2),substr($strDateFrom,0,4));\n $iDateTo=mktime(1,0,0,substr($strDateTo,5,2), substr($strDateTo,8,2),substr($strDateTo,0,4));\n\n if ($iDateTo>=$iDateFrom)\n {\n array_push($aryRange,date('Y-m-d',$iDateFrom)); // first entry\n while ($iDateFrom<$iDateTo)\n {\n $iDateFrom+=86400; // add 24 hours\n array_push($aryRange,date('Y-m-d',$iDateFrom));\n }\n }\n return $aryRange;\n}", "public function daysOfMonthProvider(): array\n {\n return [\n // Time Days Match?\n ['1st January', [1], true],\n ['2nd January', [1], false],\n ['2nd January', [2], true],\n ['2nd January', [1, 2], true],\n ['31st January', [1, 8, 23, 31], true],\n ['29th February 2020', [29], true],\n ];\n }", "public function getReccuringMeetingDates($date, $reccurParams = [])\n {\n $meet_dates = [];\n\n $pNum = (int)($reccurParams['period_number']);\n $meet_dates[] = $date->format(\"Y-m-d\");\n switch ($reccurParams['period']) {\n case '1': //weekly, add 7 days\n for ($i = 1; $i < $pNum; $i++) {\n $date->add(new DateInterval(\"P7D\"));\n $meet_dates[] = $date->format(\"Y-m-d\");\n }\n\n break;\n case '2': //bi-weekly, add 14 days\n $pNum = ($pNum % 2 == 0) ? $pNum / 2 : ($pNum - 1) / 2;\n for ($i = 1; $i < $pNum; $i++) {\n $date->add(new DateInterval(\"P14D\"));\n $meet_dates[] = $date->format(\"Y-m-d\");\n }\n break;\n case '3': //monthly, add 1 months\n for ($i = 1; $i < $pNum; $i++) {\n $m = $date->format('m');\n $y = $date->format('Y');\n\n $countMonthsDays = date('t', mktime(0, 0, 0, $m, 1, $y));\n $date->add(new DateInterval(\"P\" . $countMonthsDays . \"D\"));\n $meet_dates[] = $date->format(\"Y-m-d\");\n }\n break;\n default:\n break;\n }\n\n return $meet_dates;\n }", "public function getDates()\n {\n return array_merge(parent::getDates(), [static::PUBLISHED_AT]);\n }", "function findDatesFromDateRange($dateStart, $dateEnd){\r\n $foundDates = array($dateStart);\r\n while(end($foundDates) < $dateEnd){\r\n $foundDates[] = date('Y-m-d', strtotime(end($foundDates).' +1 day'));\r\n }\r\n// Array of foundDates\r\nreturn $foundDates;\r\n}", "function date_list( $from_date, $to_date )\n {\n $from_time = strtotime(\"midnight\", is_numeric($from_date) ? $from_date : strtotime($from_date));\n $to_time = strtotime(\"midnight\", is_numeric($to_date ) ? $to_date : strtotime($to_date ));\n\n $dates = array();\n while( $from_time <= $to_time )\n {\n $dates[] = date(\"Y-m-d\", $from_time);\n $from_time = strtotime(\"+1 day\", $from_time);\n }\n\n return $dates;\n }", "public function validate () {\n\t\tlist($valid, $value) = parent::validate();\n\t\tif (!$valid) {\n\t\t\t$error_message = $this->get('error_invalid', 'Invalid date: %s');\n\t\t\t$this->error($value = sprintf($error_message, $this->getRawValue()));\n\t\t} else {\n\t\t\t$value = FString::date($value, $this->get('format', FString::DATE_MYSQL));\n\t\t}\n\t\treturn array($valid, $value);\n\t}", "public function checkDate(Request $request){\n // print_r($request->all());exit;\n $getSelected = $request->get('start_date');\n $getDate = $this->model->where('message_categories_id',$request->get('message_category_id'))->where('end_date', '!=', '')->where('start_date', '!=', '')->pluck('start_date','end_date');\n $dates = [];\n $getDate->filter(function($key,$value)use(&$dates){\n $begin = new \\DateTime($key);\n $end = new \\DateTime($value);\n $end->setTime(0,0,1);\n $daterange = new \\DatePeriod($begin, new \\DateInterval('P1D'), $end);\n foreach($daterange as $date){\n array_push($dates,$date->format('Y-m-d'));\n }\n });\n if($dates){\n return array_unique($dates);\n }\n return $getDate;\n }", "public function getDates()\n {\n return ['created_at', 'updated_at'];\n }", "private function return_dates($dados)\n {\n\n $var_month = $dados[0]->mes;\n $var_year = $dados[0]->ano;\n $var_dayOfWeek = $dados[0]->dia_encontro;\n $var_counting_days = cal_days_in_month(CAL_GREGORIAN, $var_month, $var_year); //days of month\n\n $dini = mktime(0,0,0,$var_month,1,$var_year);\n $dfim = mktime(0,0,0,$var_month,$var_counting_days,$var_year);\n\n $return_d = array();\n\n while($dini <= $dfim) //Enquanto uma data for inferior a outra\n {\n $dt = date(\"d/m/Y\",$dini); //Convertendo a data no formato dia/mes/ano\n $diasemana = date(\"w\", $dini);\n\n if($diasemana == $var_dayOfWeek)\n { // [0 Domingo] - [1 Segunda] - [2 Terca] - [3 Quarta] - [4 Quinta] - [5 Sexta] - [6 Sabado]\n array_push($return_d, $dt);\n }\n\n $dini += 86400; // Adicionando mais 1 dia (em segundos) na data inicial\n }\n\n //Segundo dia encontro\n $var_month = $dados[0]->mes;\n $var_year = $dados[0]->ano;\n $var_dayOfWeek = $dados[0]->segundo_dia_encontro;\n $var_counting_days = cal_days_in_month(CAL_GREGORIAN, $var_month, $var_year); //days of month\n\n $dini = mktime(0,0,0,$var_month,1,$var_year);\n $dfim = mktime(0,0,0,$var_month,$var_counting_days,$var_year);\n\n $bPrimeiro = false;\n\n while($dini <= $dfim) //Enquanto uma data for inferior a outra\n {\n $dt = date(\"d/m/Y\",$dini); //Convertendo a data no formato dia/mes/ano\n $diasemana = date(\"w\", $dini);\n\n if($diasemana == $var_dayOfWeek)\n { // [0 Domingo] - [1 Segunda] - [2 Terca] - [3 Quarta] - [4 Quinta] - [5 Sexta] - [6 Sabado]\n\n if ($bPrimeiro==false) {\n array_push($return_d, \"\");\n array_push($return_d, \" Segundo Dia Encontro \");\n }\n\n array_push($return_d, $dt);\n $bPrimeiro=true;\n }\n\n $dini += 86400; // Adicionando mais 1 dia (em segundos) na data inicial\n }\n\n array_push($return_d, \"\");\n array_push($return_d, \" Encontro Avulso (Criar Novo) \");\n\n //Verifica se houve encontro avulso para a celula / mes / ano\n $dt_encontro_avulso = $this->buscar_data_avulsa($dados[0]->celulas_id, $var_month, $var_year);\n\n if ($dt_encontro_avulso!=null) {\n array_push($return_d, \"\");\n array_push($return_d, \" Houve Encontro Avulso : \");\n\n foreach ($dt_encontro_avulso as $item) {\n array_push($return_d, date(\"d/m/Y\", strtotime($item->data_encontro)));\n }\n }\n\n return ($return_d);\n\n }", "public function getValidation() {\n\t\treturn array(\n\t\t\t'date' => true\n\t\t);\n\t}", "private function createDateRangeArray($strDateFrom, $strDateTo) {\n\t\t// takes two dates formatted as YYYY-MM-DD and creates an\n\t\t// inclusive array of the dates between the from and to dates.\n\t\t\n\t\t// could test validity of dates here but I'm already doing\n\t\t// that in the main script\n\t\t$aryRange = array ();\n\t\t\n\t\t$iDateFrom = mktime ( 1, 0, 0, substr ( $strDateFrom, 5, 2 ), substr ( $strDateFrom, 8, 2 ), substr ( $strDateFrom, 0, 4 ) );\n\t\t$iDateTo = mktime ( 1, 0, 0, substr ( $strDateTo, 5, 2 ), substr ( $strDateTo, 8, 2 ), substr ( $strDateTo, 0, 4 ) );\n\t\t\n\t\tif ($iDateTo >= $iDateFrom) {\n\t\t\tarray_push ( $aryRange, date ( 'Y-m-d', $iDateFrom ) ); // first entry\n\t\t\twhile ( $iDateFrom < $iDateTo ) {\n\t\t\t\t$iDateFrom += 86400; // add 24 hours\n\t\t\t\tarray_push ( $aryRange, date ( 'Y-m-d', $iDateFrom ) );\n\t\t\t}\n\t\t}\n\t\treturn $aryRange;\n\t}", "public function get_dates($start_date,$end_date){\r\n\t $date1 = date_format(date_create($start_date), 'Y-m-d');\r\n\t $date2 = date_format(date_create($end_date), 'Y-m-d');\r\n\t\t$dates = $this->date_manager->getAllDatesBetweenTwoDates($date1,$date2);\r\n\t\t$dates2 = $this->date_manager->exclude_weekends($dates);\r\n\t\tforeach($dates2 as $dat){\r\n\t\t\t$dates3[] = date_format(date_create($dat), 'm/d/Y');\r\n\t\t\t}\r\n\t return $dates3;\r\n\t }", "public function getCollectedDays()\n {\n $days = array();\n $this->addFutureDaysFromEventRecord($days);\n\n // event->getDays already contains all Exceptions of type \"Add\"\n // above we have added all exceptions of type \"Time\"\n // while generating the day array we have added all exceptions of type \"Info\"\n // so only exceptions of type \"Remove\" are missing\n $this->addFutureDaysFromRemovedEventExceptions($days);\n\n return $days;\n }", "public function ranges(): array\n {\n return [\n 30 => '30 Days',\n 60 => '60 Days',\n 90 => '90 Days',\n 180 => '180 Days',\n 365 => '365 Days',\n ];\n }", "public function getDaysFromRanges($arr){\n \t$days = array();\n \t$days[] = $arr[0];\n \t$days[] = $arr[count($arr) - 1];\n \t\n \treturn $days;\n }", "function getDatesPeriod($startDate, $endDate, $format = null)\n {\n $allowedDateFormats = [\n 'Y-m-d',\n 'Y-m-d H:i:s',\n 'Y-m-d\\TH:i:s',\n 'd/m/Y',\n 'd/m/Y H:i:s',\n 'd.m.Y',\n 'd.m.Y H:i:s',\n ];\n\n $startDate = !is_object($startDate) ? new \\DateTime($startDate) : $startDate;\n $endDate = !is_object($endDate) ? new \\DateTime($endDate) : $endDate;\n\n $period = new \\DatePeriod(\n $startDate,\n new \\DateInterval('P1D'),\n $endDate\n );\n\n $dates = [];\n foreach ($period as $key => $value) {\n $dates[$key] = isset($format) && in_array((string)$format, $allowedDateFormats) ? $value->format($format) : $value;\n }\n\n return $dates;\n }", "public static function getDates($startDate, $endDate, $format = 'Y-m-d', $string = false) {\n $dates = array();\n $startDate = \\DateTime::createFromFormat($format, $startDate);\n $endDate = \\DateTime::createFromFormat($format, $endDate);\n $datePeriod = new \\DatePeriod($startDate, new \\DateInterval('P1D'), $endDate->modify('+1 day'));\n foreach ($datePeriod as $date) {\n $dates[] = $string ? '\"' . $date->format($format) . '\"' : $date->format($format);\n }\n return $dates;\n }", "function getDatesFromRange($start, $end, $format = 'Y-m-d')\n {\n $array = array();\n $interval = new \\DateInterval('P1D');\n $realEnd = new \\DateTime($end);\n $realEnd->add($interval);\n $period = new \\DatePeriod(new \\DateTime($start), $interval, $realEnd);\n foreach ($period as $date) {\n $array[] = $date->format($format);\n }\n\n return $array;\n }", "public function to_array()\r\n {\r\n $d = array();\r\n if($this->start) {\r\n $d['start'] = PiplApi_Utils::piplapi_date_to_str($this->start);\r\n }\r\n if($this->end){\r\n $d['end'] = PiplApi_Utils::piplapi_date_to_str($this->end);\r\n }\r\n return $d;\r\n }", "public function getDateIndexList() {\n\n static $dateIndexes = null;\n if (null === $dateIndexes) {\n $dateIndexes = array();\n foreach ($this->getIndexList() as $indexName=>$indexInfos) {\n if ($indexInfos['kind'] === 'date') {\n $dateIndexes[] = $indexName;\n }\n }\n }\n return $dateIndexes;\n }", "public function createDateRangeArray($strDateFrom,$strDateTo)\n {\n // inclusive array of the dates between the from and to dates.\n\n // could test validity of dates here but I'm already doing\n // that in the main script\n\n $aryRange=array();\n\n $iDateFrom=mktime(1,0,0,substr($strDateFrom,5,2), substr($strDateFrom,8,2),substr($strDateFrom,0,4));\n $iDateTo=mktime(1,0,0,substr($strDateTo,5,2), substr($strDateTo,8,2),substr($strDateTo,0,4));\n\n if ($iDateTo>=$iDateFrom)\n {\n array_push($aryRange,date('d-m-Y',$iDateFrom)); // first entry\n while ($iDateFrom<$iDateTo)\n {\n $iDateFrom+=86400; // add 24 hours\n array_push($aryRange,date('d-m-Y',$iDateFrom));\n }\n }\n return $aryRange;\n }", "public function getDateRangeAllowableValues()\n {\n return [\n self::DATE_RANGE__7_DAYS,\n self::DATE_RANGE__14_DAYS,\n self::DATE_RANGE__30_DAYS,\n ];\n }", "public function getDateTimes() {\n\n if ($this->dateTimes)\n return $this->dateTimes;\n\n $dts = array();\n\n if (!$this->value) {\n $this->dateTimes = null;\n $this->dateType = null;\n return null;\n }\n\n foreach(explode(',',$this->value) as $val) {\n list(\n $type,\n $dt\n ) = DateTime::parseData($val, $this);\n $dts[] = $dt;\n $this->dateType = $type;\n }\n $this->dateTimes = $dts;\n return $this->dateTimes;\n\n }", "function createDateRangeArray($strDateFrom,$strDateTo)\n {\n // inclusive array of the dates between the from and to dates.\n // could test validity of dates here but I'm already doing that in the main script\n \n $aryRange=array();\n $iDateFrom=mktime(1,0,0,substr($strDateFrom,5,2), substr($strDateFrom,8,2),substr($strDateFrom,0,4));\n $iDateTo=mktime(1,0,0,substr($strDateTo,5,2), substr($strDateTo,8,2),substr($strDateTo,0,4));\n if ($iDateTo>=$iDateFrom)\n {\n array_push($aryRange,date(DATE_FORMAT,$iDateFrom)); // first entry\n while ($iDateFrom<$iDateTo)\n {\n $iDateFrom+=86400; // add 24 hours\n array_push($aryRange,date(DATE_FORMAT,$iDateFrom));\n }\n }\n \n return $aryRange;\n }", "public static function listDatesOfPeriod($strDate1, $strDate2, $arrReturn = array())\n {\n if ((!isset($strDate1)) || (!isset($strDate2)))\n return array();\n if (self::isDateTemplate($strDate1)) {\n $intTimestamp1 = self::convertDateTemplateToTimestamp($strDate1);\n $strFormat1 = 'd/m/Y';\n } elseif (self::isDateBase($strDate1)) {\n $intTimestamp1 = self::convertDateBaseToTimestamp($strDate1);\n $strFormat1 = 'Y-m-d';\n } elseif (self::isDateWs($strDate1)) {\n $intTimestamp1 = self::convertDateWsToTimestamp($strDate1);\n $strFormat1 = 'Ymd';\n } else\n return array();\n if (self::isDateTemplate($strDate2)) {\n $intTimestamp2 = self::convertDateTemplateToTimestamp($strDate2);\n $strFormat2 = 'd/m/Y';\n } elseif (self::isDateBase($strDate2)) {\n $intTimestamp2 = self::convertDateBaseToTimestamp($strDate2);\n $strFormat2 = 'Y-m-d';\n } elseif (self::isDateWs($strDate2)) {\n $intTimestamp2 = self::convertDateWsToTimestamp($strDate2);\n $strFormat2 = 'Ymd';\n } else\n return array();\n if ($intTimestamp2 < $intTimestamp1) {\n $intTimestampInicial = $intTimestamp2;\n $intTimestampFinal = $intTimestamp1;\n $strFormatInicial = $strFormat2;\n $strFormatFinal = $strFormat1;\n } else {\n $intTimestampInicial = $intTimestamp1;\n $intTimestampFinal = $intTimestamp2;\n $strFormatInicial = $strFormat1;\n $strFormatFinal = $strFormat2;\n }\n $intTimestampInicialAcrescido = ($intTimestampInicial + (60 * 60 * 24));\n if (!in_array($intTimestampInicial, $arrReturn))\n $arrReturn[] = date($strFormatInicial, $intTimestampInicial);\n if ($intTimestampFinal > $intTimestampInicialAcrescido)\n return self::listDatesOfPeriod(date($strFormatInicial, $intTimestampInicialAcrescido), date($strFormatFinal, $intTimestampFinal), $arrReturn);\n $arrReturn[] = date($strFormatFinal, $intTimestampFinal);\n return $arrReturn;\n }", "public function getDatesAtAttributes(){\n\t\t$this->_connect();\n\t\treturn $this->_getDatesAtAttributes();\n\t}", "public function getDailyRegistrations()\n\t{\n\t\t$db = UserConfig::getDB();\n\n\t\t$dailyregs = array();\n\n\t\tif ($stmt = $db->prepare('SELECT regdate, count(*) AS reqs FROM (SELECT CAST(regtime AS DATE) AS regdate, id AS regs FROM '.UserConfig::$mysql_prefix.'users u LEFT JOIN '.UserConfig::$mysql_prefix.'googlefriendconnect g ON u.id = g.user_id WHERE g.google_id IS NOT NULL GROUP BY id) agg group by agg.regdate'))\n\t\t{\n\t\t\tif (!$stmt->execute())\n\t\t\t{\n\t\t\t\tthrow new Exception(\"Can't execute statement: \".$stmt->error);\n\t\t\t}\n\t\t\tif (!$stmt->bind_result($regdate, $regs))\n\t\t\t{\n\t\t\t\tthrow new Exception(\"Can't bind result: \".$stmt->error);\n\t\t\t}\n\n\t\t\twhile($stmt->fetch() === TRUE)\n\t\t\t{\n\t\t\t\t$dailyregs[] = array('regdate' => $regdate, 'regs' => $regs);\n\t\t\t}\n\n\t\t\t$stmt->close();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new Exception(\"Can't prepare statement: \".$db->error);\n\t\t}\n\n\t\treturn $dailyregs;\n\t}", "function DatesBetween($startDate, $endDate){\r\n\t$days = (strtotime($endDate) - strtotime($startDate)) / 86400 + 1;\r\n\t$startMonth = date(\"m\", strtotime($startDate));\r\n\t$startDay = date(\"d\", strtotime($startDate));\r\n\t$startYear = date(\"Y\", strtotime($startDate));\r\n\t$dates;//the array of dates to be passed back\r\n\tfor($i=0; $i<$days; $i++){\r\n\t\t$dates[$i] = date(\"m/d/Y\", mktime(0, 0, 0, $startMonth , ($startDay+$i), $startYear));\r\n\t}\r\n\treturn $dates;\r\n}", "public function dateProvider()\n {\n return array(\n array('2017-03-21', null, null),\n array('2017-01-01', null, array('name' => 'Jour de l\\'an')),\n array('2017-04-17', null, array('name' => 'Lundi de Pâques')),\n array('2017-05-01', null, array('name' => 'Premier Mai')),\n array('2017-05-09', null, null),\n array('2019-05-09', null, array('name' => 'Journée de l\\'Europe')),\n array('2017-05-25', null, array('name' => 'Ascension')),\n array('2017-06-05', null, array('name' => 'Lundi de Pentecôte')),\n array('2017-06-23', null, array('name' => 'Jour de la célébration de l\\'anniversaire du Grand-Duc')),\n array('2017-08-15', null, array('name' => 'Assomption')),\n array('2017-11-01', null, array('name' => 'Toussaint')),\n array('2017-12-25', null, array('name' => 'Premier jour de Noël')),\n );\n }", "public function getPlayDates($beginDate, $endDate)\n {\n $startDate = new \\DateTime($beginDate);\n $endDate = new \\DateTime($endDate);\n $arrayDates = array();\n\n while ($startDate <= $endDate) {\n $arrayDates[]['date'] = $startDate->format(\"Y-m-d\");\n $startDate->add(new \\DateInterval('P7D'));\n }\n return $arrayDates;\n }", "function GetDays($sStartDate, $sEndDate){\n\n // This function works best with YYYY-MM-DD \n\n // but other date formats will work thanks \n\n // to strtotime(). \n\n $sStartDate = gmdate(\"Y-m-d\", strtotime($sStartDate)); \n\n $sEndDate = gmdate(\"Y-m-d\", strtotime($sEndDate)); \n\n\n\n // Start the variable off with the start date \n\n $aDays[] = $sStartDate; \n\n\n\n // Set a 'temp' variable, sCurrentDate, with \n\n // the start date - before beginning the loop \n\n $sCurrentDate = $sStartDate; \n\n\n\n // While the current date is less than the end date \n\n while($sCurrentDate < $sEndDate){ \n\n // Add a day to the current date \n\n $sCurrentDate = gmdate(\"Y-m-d\", strtotime(\"+1 day\", strtotime($sCurrentDate))); \n\n\n\n // Add this new day to the aDays array \n\n $aDays[] = $sCurrentDate; \n\n } \n\n\n\n // Once the loop has finished, return the \n\n // array of days. \n\n return $aDays; \n\n }", "public function getTransitionDates()\n {\n $transitionDates = array();\n foreach($this->_transitionDates as $date) {\n $transitionDates[] = clone $date;\n }\n \n return $transitionDates;\n }", "public function getAvailableDates($blockedDates,$scheduleDays) {\n\n $d1= date('Y-m-d');\n $d2= strtotime(date(\"Y-m-d\").' +2 Months');\n $d2= date('Y-m-d', $d2);\n $begin = new \\DateTime($d1);\n $end = new \\DateTime($d2);\n $daterange = new \\DatePeriod($begin, new \\DateInterval('P1D'), $end);\n\n $dates = array();\n $arrAvailableDates = array();\n foreach($daterange as $date){\n $dates[] = $date->format(\"Y-m-d\");\n }\n\n foreach ($blockedDates as $key => $value) {\n\n if(!empty($value) && $value[0] != \"\"){\n foreach($value as $blockDate){\n $checkBlockDate = array_search($blockDate, $dates);\n\n if($checkBlockDate!==false)\n unset($dates[$checkBlockDate]);\n }\n\n\n $arrAvailableDates[$key] = $this->sortByDays($dates,$scheduleDays[$key]);\n }else{\n if(isset($scheduleDays[$key])){\n $arrAvailableDates[$key] = $this->sortByDays($dates,$scheduleDays[$key]);\n }\n\n }\n\n }\n //echo \"<pre>\"; print_r($arrAvailableDates); die;\n return $arrAvailableDates;\n }", "public function getNotAvialableDays()\n {\n $notAvalableDays = [];\n foreach ($this->reservers as $reserver) {\n $resultat = range(\n $reserver->getDateDebut()->getTimestamp(),\n $reserver->getDateFin()->getTimestamp(),\n 24 * 60 * 60\n );\n\n $days = array_map(function ($daysTimestamp) {\n return new \\DateTime(date('Y-m-d', $daysTimestamp));\n }, $resultat);\n $notAvalableDays = array_merge($notAvalableDays, $days);\n }\n return $notAvalableDays;\n }", "public function findByDate(int $start, int $end) : ?array\n {\n $resp = DB::table($this->TABLE)->where(\n [self::DATE, \">=\", $start],\n [self::DATE, \"<=\", $end]\n )->get();\n return $this->loadMany($resp);\n }", "function createDateRangeArray($strDateFrom,$strDateTo)\n{\n // inclusive array of the dates between the from and to dates.\n\n // could test validity of dates here but I'm already doing\n // that in the main script\n\n $aryRange=array();\n\n $iDateFrom=mktime(1,0,0,substr($strDateFrom,5,2), substr($strDateFrom,8,2),substr($strDateFrom,0,4));\n $iDateTo=mktime(1,0,0,substr($strDateTo,5,2), substr($strDateTo,8,2),substr($strDateTo,0,4));\n\n if ($iDateTo>=$iDateFrom)\n {\n array_push($aryRange,date('Y-m-d',$iDateFrom)); // first entry\n while ($iDateFrom<$iDateTo)\n {\n $iDateFrom+=86400; // add 24 hours\n array_push($aryRange,date('Y-m-d',$iDateFrom));\n }\n }\n return $aryRange;\n}", "public function getCalendarColumns() {\n $dates = array();\n $date = new DateTime();\n\n $dates[] = $date->format(\"Y-m\");\n\n for ($i = 1; $i < 12; $i++) {\n $date->modify('+1 month');\n $dates[] = $date->format(\"Y-m\");\n }\n return $dates;\n }", "function createDateRange($startDate, $endDate, $format = \"Y-m-d\")\r\n{\r\n $begin = new DateTime($startDate);\r\n $end = new DateTime($endDate);\r\n \r\n $interval = new DateInterval('P1D'); \r\n $dateRange = new DatePeriod($begin, $interval, $end);\r\n \r\n $range = [];\r\n \r\n for($i=$begin;$i<=$end;$i->modify('+1 day')) {\r\n $range[] = $i->format($format);\r\n \r\n }\r\n return $range; \r\n}", "public static function date_sets()\n {\n $array = self::date_keys();\n\n return self::unique_sets($array);\n }", "public function getBirthdayEvents() {\n\n\t\t$events = array();\n\t\tforeach($this->getChildren() as $contact) {\n\t\t\tif($event = $contact->getBirthdayEvent()) {\n\t\t\t\t$events[] = $event;\n\t\t\t}\n\t\t}\n\t\treturn $events;\n\t}", "function createDateRangeArray($strDateFrom,$strDateTo,$id_tamu)\n\t{\n\t\t// inclusive array of the dates between the from and to dates.\n\n\t\t// could test validity of dates here but I'm already doing\n\t\t// that in the main script\n\n\t\t$aryRange=array();\n\n\t\t$iDateFrom=mktime(1,0,0,substr($strDateFrom,5,2), substr($strDateFrom,8,2),substr($strDateFrom,0,4));\n\t\t$iDateTo=mktime(1,0,0,substr($strDateTo,5,2), substr($strDateTo,8,2),substr($strDateTo,0,4));\n\n\t\tif ($iDateTo>=$iDateFrom)\n\t\t{\n\t\t\tarray_push($aryRange,date('Y-m-d',$iDateFrom).\"_\".$id_tamu); // first entry\n\t\t\twhile ($iDateFrom<$iDateTo)\n\t\t\t{\n\t\t\t\t$iDateFrom+=86400; // add 24 hours\n\t\t\t\tarray_push($aryRange,date('Y-m-d',$iDateFrom).\"_\".$id_tamu);\n\t\t\t}\n\t\t}\n\t\treturn $aryRange;\n\t}", "public static function validationArray():array {\n $validation = array (\n \"likedDate\" => 'required',\n );\n\n return $validation;\n }", "function Dates()\n {\n if (empty($this->Dates))\n {\n $this->Dates=\n $this->DatesObj()->Sql_Select_Hashes\n (\n array\n (\n \"Unit\" => $this->Unit(\"ID\"),\n \"Event\" => $this->Event(\"ID\"),\n )\n );\n\n foreach (array_keys($this->Dates) as $did)\n {\n $this->Dates[ $did ][ \"Text\" ]=$this->MyTime_Sort2Date($this->Dates[ $did ][ \"Name\" ]);\n }\n }\n\n return $this->Dates;\n }", "public function years_range()\r\n {\r\n // end date.\r\n if(!($this->start && $this->end)){\r\n return NULL;\r\n }\r\n return array($this->start->format('Y'), $this->end->format('Y'));\r\n }", "public static function validationArray():array {\n $validation = array (\n \"likedDate\" => 'required',\n\n );\n\n return $validation;\n }" ]
[ "0.67303383", "0.6722656", "0.67053896", "0.6628759", "0.6536443", "0.65139085", "0.6488055", "0.6434299", "0.6316501", "0.62503844", "0.6237216", "0.61478084", "0.61466473", "0.6119529", "0.60866725", "0.607003", "0.6068347", "0.6063355", "0.6029745", "0.60255253", "0.6016791", "0.60114145", "0.5992847", "0.59725404", "0.59657973", "0.5943697", "0.59423643", "0.5939988", "0.5930891", "0.58761716", "0.58711976", "0.587074", "0.5850089", "0.58424264", "0.5789968", "0.57792395", "0.5777684", "0.5768246", "0.5751499", "0.5744613", "0.5730695", "0.57224476", "0.57008386", "0.56800395", "0.5679869", "0.5675188", "0.5665957", "0.5644355", "0.5636124", "0.56331253", "0.5628109", "0.56257397", "0.5619846", "0.56079465", "0.5599609", "0.5598256", "0.55900186", "0.5567578", "0.55613184", "0.554843", "0.55450267", "0.55445856", "0.5544304", "0.5538727", "0.55332667", "0.5522221", "0.55112845", "0.5504744", "0.5501861", "0.549027", "0.54897845", "0.54843044", "0.5475049", "0.5458221", "0.5457336", "0.54522824", "0.54487777", "0.5443912", "0.544353", "0.54414684", "0.54380244", "0.54372644", "0.542911", "0.5425147", "0.5417743", "0.54103583", "0.54058456", "0.54009664", "0.5393386", "0.53876144", "0.53873235", "0.53773534", "0.537076", "0.536877", "0.53672177", "0.5365879", "0.5361307", "0.53591865", "0.5358778", "0.5355258" ]
0.58764875
29
Returns true if the user requested to serialize the output data (&serialize=1 in the request)
private function shouldSerialize() { $serialize = Common::getRequestVar('serialize', 0, 'int', $this->request); return !empty($serialize); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isOutputting() {}", "public static function serialized(string $name): bool\n {\n return static::$serialize;\n }", "public function isSerialized()\n {\n if (!isset($this->str[0])) {\n return false;\n }\n\n /** @noinspection PhpUsageOfSilenceOperatorInspection */\n if (\n $this->str === 'b:0;'\n ||\n @unserialize($this->str) !== false\n ) {\n return true;\n } else {\n return false;\n }\n }", "public function serialize($value) : bool\n {\n }", "protected function caseRendererPHPSerialize($defaultSerializeValue = 1)\n\t{\n\t\t$serialize = Piwik_Common::getRequestVar('serialize', $defaultSerializeValue, 'int', $this->request);\n\t\tif($serialize)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "private function isOutputSet ()\n\t{\n\t\tif (!$this->outputFile)\n\t\t{\n\t\t\treturn $this->stop('no output file is set');\n\t\t}\n\n\t\tif (!is_file($this->outputFile))\n\t\t{\n\t\t\treturn $this->stop('requested file doesn\\'t exist or cannot be read');\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "abstract public function getIsSerializedAttribute() : bool;", "public static function bufferOutputEnabled(): bool\n {\n $configuration = DynamicalWeb::getWebConfiguration();\n\n if(isset($configuration[\"configuration\"][\"buffer_output\"]))\n {\n return (bool)$configuration[\"configuration\"][\"buffer_output\"];\n }\n\n return true;\n }", "function allowserialize($propname)\r\n {\r\n return(true);\r\n }", "public static function hasOutput()\n {\n $session = self::getSession();\n return isset($session->content);\n }", "public static function isSerialized($data) {\n return (@unserialize($data) !== false);\n }", "public function isSavable(): bool\n {\n return true;\n }", "public function hasOutput()\n {\n return count($this->_otherOutput) + count($this->_formsOutput) > 0;\n }", "function _outputTree () {\r\n if ($this->_noOutput) {\r\n return true;\r\n }\r\n $output = $this->_outputNode ($this->_root);\r\n if (is_string ($output)) {\r\n $this->_output = $this->_applyPostfilters ($output);\r\n unset ($output);\r\n return true;\r\n }\r\n \r\n return false;\r\n }", "private function isSerialized($value)\n {\n $data = @unserialize($value);\n if ($value === 'b:0;' || $data !== false) {\n return true;\n } else {\n return false;\n }\n }", "function _outputTree () {\r\n // this could e.g. call _applyPostfilters\r\n return true;\r\n }", "function generateOutput () {\n $this->outputMode = 0;\n if (!$this->generateOutputPage()) return false;\n return true; }", "public function isSerializable($data = null)\n {\n if (is_object($data) || is_array($data)) {\n return true;\n }\n\n return false;\n }", "public static function isSerialized($str) {}", "public function isReturnAdditionalDataOnResponse(): bool\n {\n return $this->returnAdditionalDataOnResponse;\n }", "public function serialize()\n\t{\n\t\t// Load all of the inputs.\n\t\t$this->loadAllInputs();\n\n\t\t// Remove $_ENV and $_SERVER from the inputs.\n\t\t$inputs = $this->inputs;\n\t\tunset($inputs['env']);\n\t\tunset($inputs['server']);\n\n\t\t// Serialize the executable, args, options, data, and inputs.\n\t\treturn serialize(array($this->calledScript, $this->args, $this->filter, $this->data, $inputs));\n\t}", "public function isSerializerEnabled()\n {\n $this->initialize();\n return $this->serializerEnabled;\n }", "function maybe_serialize($data)\n {\n }", "public function isOutputDecorated();", "public function serialize();", "public function serialize();", "public function serialize();", "public abstract function serialize();", "private function __isExportFieldSpecified(){\r\n if(empty($this->data)){\r\n return false;\r\n }\r\n /* Define an empty query object */\r\n $specified = array(\r\n 'fields' => array(),\r\n 'order' => null,\r\n 'conditions' => array()\r\n );\r\n /* Handle posted fields */\r\n $data = $this->data['Student']['export'];\r\n $fields = $data['fields'];\r\n foreach($fields as $field=>$value){\r\n if($value){\r\n $specified['fields'][] = $field;\r\n }\r\n }\r\n /* Set sort orders */\r\n $specified['order'] = 'Student.'.$data['order']['by'];\r\n $specified['order'] .= $data['order']['order'] ? ' ASC' : ' DESC';\r\n return $specified;\r\n }", "abstract public function serialize();", "abstract public function serialize();", "function is_output($arg)\n{\n\tif (mb_substr ($arg, 0, 9) === \"--output=\")\n\t\treturn true;\n\treturn false;\n}", "public function IsHtmlRequested(){\r\n\t\treturn $this->ForceOutputHtml||(strlen(file_get_contents('php://input'))<1&&!$this->ForceNotOutputHtml);\r\n\t}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function testRenderWithSerializeTrue(): void\n {\n $Request = new ServerRequest();\n $Controller = new Controller($Request);\n $data = ['users' => ['user' => ['user1', 'user2']]];\n $Controller->set(['users' => $data]);\n $Controller->viewBuilder()\n ->setClassName('Xml')\n ->setOption('serialize', true);\n $View = $Controller->createView();\n $output = $View->render();\n\n $this->assertSame(Xml::build($data)->asXML(), $output);\n $this->assertSame('application/xml', $View->getResponse()->getType());\n\n $data = ['no' => 'nope', 'user' => 'fake', 'list' => ['item1', 'item2']];\n $Controller = new Controller($Request);\n $Controller->viewBuilder()\n ->setClassName('Xml')\n ->setOption('serialize', true);\n $Controller->set($data);\n $View = $Controller->createView();\n $output = $View->render();\n $expected = [\n 'response' => $data,\n ];\n $this->assertSame(Xml::build($expected)->asXML(), $output);\n }", "public function defaultOutputType() {\n return FALSE;\n }", "public function hasOtherOutput()\n {\n return count($this->_otherOutput) > 0;\n }", "abstract protected function serializeData();", "public function IsWsdlRequested(){\r\n\t\treturn $this->ForceOutputWsdl||((isset($_GET['wsdl'])||isset($_GET['WSDL']))&&!$this->ForceNotOutputWsdl);\r\n\t}", "public function hasRecordsToExport()\n\t{\n\t\t$record_collection = $this->getUnexportedRecords();\n\t\tif (count($record_collection)) {\n\t\t\treturn TRUE;\n\t\t}\n\n\t\treturn FALSE;\n\t}", "public function can_process() {\n\t\treturn $this->can_export();\n\t}", "function is_valid() {\n\t\treturn $this->_request_data($this->_existance_action, null, 'xml', true);\n\n\t}", "public function includedInExport(): bool\n {\n return $this->includeInExport === true;\n }", "function isOutputMulti_() {\n return $this->__outIsMultiRow;\n }", "public function isDumped(){\n\t\treturn $this->_dumped;\n\t}", "abstract public function serialize($data);", "protected function isRawData() {\n return $this->rawData;\n }", "public function serialize($data);", "public function serialize()\n {\n }", "public function serialize()\n {\n }", "public function isPrettyPrint()\n\t{\n\t\t$prettyPrint = $this->getQuery($this->prettyPrintKey);\n\t\tif ($prettyPrint === 'false') {\n\t\t\treturn FALSE;\n\t\t}\n\t\treturn $prettyPrint === NULL ? TRUE : (bool)$prettyPrint;\n\t}", "public function isVerbose()\n {\n return $this->decoratedOutput->isVerbose();\n }", "function isVerbose()\n {\n $this->methodExpectsRequest(__METHOD__);\n return $this->getRequest()->isVerbose();\n }", "public function isExportOnly(): bool\n {\n return $this->exportOnly === true;\n }", "private function isSerialized($string)\n {\n if ($string === 'b:0;' or @unserialize($string) !== false)\n {\n return true;\n }\n\n return false;\n }", "private function can_export() {\n return isset( $_POST[ self::NAME ] ) &&\n $_POST[ self::NAME ] === 'export' &&\n current_user_can( 'manage_options' );\n }", "protected static function is_current_output_buffer() : bool {\n if (empty(self::$taskloginfo)) {\n return false;\n }\n\n if ($ob = ob_get_status()) {\n return 'core\\\\task\\\\logmanager::add_line' == $ob['name'];\n }\n\n return false;\n }", "public final function hasData()\n {\n return $this->data == false ? false : true;\n }", "public function serialize(){ }", "static public function GetGETSaveInSent() {\n if (isset(self::$saveInSent))\n return self::$saveInSent;\n else\n return true;\n }", "protected function out()\n {\n if (!$this->connection->isTableExists($this->resource->getTableName('mageworx_option_dependency'))) {\n return true;\n }\n\n return false;\n }", "function is_serialized_string($data)\n {\n }", "public function serialize($data)\n {\n }", "function is_serialized($data, $strict = \\true)\n {\n }", "public function produced(): bool;", "private function shouldInfoTableBeExported()\n {\n return $this->shouldInfoTableBeExported;\n }", "public function serialize()\n {\n // TODO: Implement serialize() method.\n }", "public function processes_user_data() {\n return true;\n }", "public function getIsExportable()\n {\n return $this->isExportable;\n }", "public function onGetRawData()\n {\n //TODO: may be a good idea\n return true;\n }", "public function hasNetworkResultDto() {\n return $this->_has(4);\n }", "public function is_archive()\n {\n }", "public function hasData() {\n try {\n $res = TRUE;\n }\n catch (\\Exception $e) {\n $res = FALSE;\n }\n\n return $res;\n }", "public function hasExportFormat(): bool\n {\n return is_callable($this->exportFormatCallback);\n }", "function serializeSessionCookies($serialize)\n {\n $this->_serializeSessionCookies = (bool)$serialize;\n }", "public function hasData() : bool;", "public function isStreamable()\n {\n return ((int)$this->streamable === 1);\n }", "public function captureData() {\n if(isset($_GET[$this->relnObj->Tablename().\"_submit\"])) {\n $formData = $_GET;\n }\n else if(isset($_POST[$this->relnObj->Tablename().\"_submit\"])) {\n $formData = $_POST;\n }\n else\n return false;\n $vals = array();\n foreach($this->relnObj->Attribs() as $col=>$val) {\n if(!isset($this->relnObj->AttribFlags()[$col]['isfunc'])) {\n $vals[$col] = $formData[$col];\n }\n }\n $this->relnObj->setData($vals);\n return true;\n }", "public function _process_output_cache()\n {\n $this->_check_if_need_to_cache();\n if ( ! $this->OUTPUT_CACHING || $_SERVER['REQUEST_METHOD'] != 'GET' || MAIN_TYPE_ADMIN || $this->NO_NEED_TO_CACHE) {\n return false;\n }\n if (DEBUG_MODE) {\n $time_start = microtime(true);\n }\n $cache_key = $this->CACHE_NS . $this->_get_page_cache_name();\n /*\n if ($this->USE_MEMCACHED) {\n // Remove old page from cache (force)\n if (conf('refresh_output_cache')) {\n $this->_memcache->del($cache_key);\n return false;\n }\n } else {\n // Prepare path to the current page cache\n $this->CACHE_FILE_PATH = $this->_prepare_cache_path();\n // Try to process output cache file\n if (!file_exists($this->CACHE_FILE_PATH)) {\n // Do create empty file to lock current page creation from being used\n file_put_contents($this->CACHE_FILE_PATH, '');\n return false;\n }\n // Get cache last modification time\n $cache_last_modified_time = filemtime($this->CACHE_FILE_PATH);\n // Check if file is locked for generation (prevent parallel creation)\n if (filesize($this->CACHE_FILE_PATH) < 5) {\n // Remove old lock\n $lock_ttl = 600;\n if ($cache_last_modified_time < (time() - $lock_ttl)) {\n unlink($this->CACHE_FILE_PATH);\n }\n return false;\n }\n // Remove old page from cache\n if (($this->OUTPUT_CACHE_TTL != 0 && $cache_last_modified_time < (time() - $this->OUTPUT_CACHE_TTL)) || conf('refresh_output_cache')) {\n unlink($this->CACHE_FILE_PATH);\n return false;\n }\n }\n */\n/*\n main()->_IN_OUTPUT_CACHE = true;\n\n $this->_post_filter();\n*/\n/*\n if ($this->USE_MEMCACHED) {\n $mc_result = $this->_memcache->get($this->CACHE_NS. $cache_key);\n if (DEBUG_MODE) {\n debug('output_cache::size', strlen($mc_result));\n }\n if (empty($mc_result)) {\n return false;\n }\n if ($this->OUTPUT_CACHE_INCLUDE) {\n eval('?>'.$mc_result.'<?php ');\n } else {\n echo $mc_result;\n }\n } else {\n if (DEBUG_MODE) {\n debug('output_cache::size', filesize($this->CACHE_FILE_PATH));\n }\n if ($this->OUTPUT_CACHE_INCLUDE) {\n include ($this->CACHE_FILE_PATH);\n } else {\n echo file_get_contents($this->CACHE_FILE_PATH);\n }\n }\n*/\n/*\n $output = ob_get_clean();\n if (DEBUG_MODE) {\n debug('output_cache::exec_time', microtime(true) - $time_start);\n }\n if (DEBUG_MODE || conf('exec_time')) {\n echo common()->_show_execution_time();\n }\n if (DEBUG_MODE) {\n echo common()->show_debug_info();\n }\n $this->_send_http_headers($cache_last_modified_time);\n ob_end_flush();\n main()->NO_GRAPHICS = true;\n\n exit();\n*/\n }", "public function getSaveAsFlag()\n {\n return $this->getRequest()->getParam('_save_as_flag') ? '1' : '';\n }", "public function hasOutputsCount()\n {\n return $this->outputs_count !== null;\n }", "protected function _ensureSerialize() {\n\t\t$controller = $this->_controller();\n\n\t\tif (isset($controller->viewVars['_serialize'])) {\n\t\t\treturn;\n\t\t}\n\n\t\t$action = $this->_action();\n\n\t\t$serialize = array();\n\t\t$serialize[] = 'success';\n\n\t\tif (method_exists($action, 'viewVar')) {\n\t\t\t$serialize['data'] = $action->viewVar();\n\t\t} else {\n\t\t\t$serialize[] = 'data';\n\t\t}\n\n\t\t$serialize = array_merge($serialize, (array)$action->config('serialize'));\n\t\t$controller->set('_serialize', $serialize);\n\t}", "static public function GetOutputStream() {\n if (isset(self::$output))\n return self::$output;\n else\n return false;\n }", "function _write_cache($output){\n return false;\n\n return parent::_write_cache($output);\n }", "public function isStorable()\n {\n return ((int)$this->storable === 1);\n }", "public function testBoolean()\r\n {\r\n $s = new XML_Serializer();\r\n $s->serialize(true);\r\n $this->assertEquals('<boolean>1</boolean>', $s->getSerializedData());\r\n $s->serialize(false);\r\n $this->assertEquals('<boolean />', $s->getSerializedData());\r\n }", "public function getAutoSerialization()\r\n {\r\n return $this->_autoSerialization;\r\n }", "public function isProcessed(): bool;", "public function isResponse(): bool {\n return $this->options['response'] ?? false;\n }", "public function outputCompressed() {\n\t\treturn strpos(env('HTTP_ACCEPT_ENCODING'), 'gzip') !== false\n\t\t\t&& (ini_get(\"zlib.output_compression\") === '1' || in_array('ob_gzhandler', ob_list_handlers()));\n\t}", "public function isProcessed() {}", "function storeHTTPInput( &$process )\n {\n return true;\n }", "public function hasHtmlOutput()\n {\n if ($this->currentUser->getUserId() == \\Gems_User_UserLoader::SYSTEM_USER_ID) {\n $this->addMessage($this->getNotAllowedMessage());\n return false;\n }\n\n return parent::hasHtmlOutput();\n }" ]
[ "0.6654072", "0.6415039", "0.63699776", "0.6330348", "0.63162905", "0.6225804", "0.6064652", "0.6011371", "0.59884924", "0.594241", "0.5907368", "0.59025705", "0.587237", "0.5847748", "0.5745106", "0.5695224", "0.5662562", "0.56160754", "0.5597635", "0.5592475", "0.5576934", "0.55740833", "0.55683994", "0.5563934", "0.5560726", "0.5560726", "0.5560726", "0.5545815", "0.5535231", "0.550162", "0.550162", "0.54931664", "0.5483128", "0.54665416", "0.54665416", "0.5465645", "0.5465645", "0.5465645", "0.5465645", "0.5465645", "0.5465645", "0.5455699", "0.5452985", "0.5441142", "0.5440716", "0.5423933", "0.54092866", "0.5407113", "0.5369485", "0.53647214", "0.5355287", "0.5351968", "0.533896", "0.5338828", "0.5337399", "0.5331343", "0.5331343", "0.53213215", "0.5312667", "0.53089964", "0.5289851", "0.5281362", "0.52476305", "0.52310354", "0.5221761", "0.52196354", "0.5207686", "0.5200227", "0.519166", "0.51859146", "0.51644003", "0.51585764", "0.51487213", "0.51373214", "0.51186776", "0.5117711", "0.5104773", "0.51042813", "0.5083847", "0.508296", "0.5082366", "0.5081493", "0.507993", "0.5071321", "0.50697935", "0.5068794", "0.5067965", "0.5061802", "0.5054535", "0.50507396", "0.5050591", "0.50486904", "0.50426453", "0.50416744", "0.5034454", "0.50242305", "0.5024196", "0.50061417", "0.50046504", "0.4997525" ]
0.76032305
0
Generate a random hash to be used in file names
protected function hash($value) { return md5($value . "_" . rand() . "_" . time()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function generateHash()\n {\n do {\n $hash = Security::randomString(8);\n } while ($this->exists(['hash' => $hash]));\n\n return $hash;\n }", "private static function create_hash() {\n $hash = md5( rand(0,1000) );\n return $hash;\n }", "private function generateUniqueHash()\n {\n $rand = mt_rand(0, 10000);\n $string = $this->generateRandomString();\n $hash = md5($rand . $string);\n return $hash;\n }", "private function generateUniqueFileName()\n {\n return md5(base64_encode(pack('N6', mt_rand(), mt_rand(), mt_rand(), mt_rand(), mt_rand(), uniqid())));\n }", "public static function generateHash()\n {\n $result = '';\n $charPool = '0123456789abcdefghijklmnopqrstuvwxyz';\n for ($p = 0; $p < 15; $p++) {\n $result .= $charPool[mt_rand(0, strlen($charPool) - 1)];\n }\n\n return sha1(md5(sha1($result)));\n }", "protected function getHash(): string\n {\n return hash('crc32', md5((string) mt_rand()));\n }", "public static function getRandomFileName()\r\n\t{\r\n\t\treturn uniqid(rand(), true);\r\n\t}", "private function generateUniqueFileName() {\r\n \r\n return md5(uniqid());\r\n }", "private function generateRandomKey()\n {\n return substr(base_convert(sha1(uniqid(mt_rand(), true)), 16, 36), 0, 8);\n }", "protected function _getSharingRandomCode()\n {\n return Mage::helper('core')->uniqHash();\n }", "private function generateUniqueFileName()\n {\n // uniqid(), which is based on timestamps\n return md5(uniqid());\n }", "private function generateUniqueFileName()\n {\n // uniqid(), which is based on timestamps\n return md5(uniqid());\n }", "private function generateUniqueFileName()\n {\n // uniqid(), which is based on timestamps\n return md5(uniqid());\n }", "private function generateUniqueFileName()\n {\n // uniqid(), which is based on timestamps\n return md5(uniqid());\n }", "private function generateUniqueFileName()\n {\n // uniqid(), which is based on timestamps\n return md5(uniqid());\n }", "private function generateUniqueFileName()\n {\n // uniqid(), which is based on timestamps\n return md5(uniqid());\n }", "private function generateUniqueFileName()\n {\n // uniqid(), which is based on timestamps\n return md5(uniqid());\n }", "function generateRandID(){\r\n \t\treturn md5(generateRandStr(16));\r\n \t\t}", "protected function generate()\n\t{\n\t\t$hash = bin2hex( random_bytes( 16 ) );\n\n\t\t$timeHi = hexdec( substr( $hash, 12, 4 ) ) & 0x0fff;\n\t\t$timeHi &= ~( 0xf000 );\n\t\t$timeHi |= 4 << 12;\n\n\t\t$clockSeqHi = hexdec( substr( $hash, 16, 2 ) ) & 0x3f;\n\t\t$clockSeqHi &= ~( 0xc0 );\n\t\t$clockSeqHi |= 0x80;\n\n\t\t$params = [\n\t\t\tsubstr( $hash, 0, 8 ),\n\t\t\tsubstr( $hash, 8, 4 ),\n\t\t\tsprintf( '%04x', $timeHi ),\n\t\t\tsprintf( '%02x', $clockSeqHi ),\n\t\t\tsubstr( $hash, 18, 2 ),\n\t\t\tsubstr( $hash, 20, 12 )\n\t\t];\n\n\t\treturn vsprintf( '%08s-%04s-%04s-%02s%02s-%012s', $params );\n\t}", "public static function unique_salt() {\r\n\t\treturn substr(sha1(mt_rand()),0,22);\r\n\t}", "public static function generateRandomToken() {\n return Security::chlogHashStatic(md5(rand())); \n }", "private function generateUniqueFileName() :string\n {\n // md5() reduces the similarity of the file names generated by\n // uniqid(), which is based on timestamps\n return md5(uniqid());\n }", "function generateRandID(){\n \t\treturn md5(generateRandStr(16));\n \t\t}", "public static function uniqueSalt() {\n return substr(sha1(mt_rand()), 0, 22);\n }", "public static function create_hash($prefix='')\n\t{\n\t\t$hash = $prefix.md5(microtime(true).rand(0,100000));\n\t\treturn $hash;\n\t}", "protected static function _generateSaltMd5() {\n\t\treturn '$1$' . Random::generate(6, ['encode' => Random::ENCODE_BASE_64]);\n\t}", "public function encrypt_name(){\n $filename = md5(uniqid(mt_rand()));\n return $filename;\n }", "public static function generateResetString(){\n return base_convert(md5(mt_rand()), 16, 36);\n }", "private function generateUniqueFileName()\n {\n // md5() reduces the similarity of the file names generated by\n // uniqid(), which is based on timestamps\n return md5(uniqid());\n }", "private static function generateShareLink()\n {\n $strong = true;\n $appearance = 'sha256';\n return hash($appearance, openssl_random_pseudo_bytes(128, $strong), false);\n }", "static public function generate()\n {\n return base64_encode(microtime().uniqid().rand());\n }", "function rand_md5($length=11) {\n\t\t$max = ceil($length / 32);\n\t\t$random = '';\n\t\tfor ($i = 0; $i < $max; $i++) {\n\t\t\t$random .= md5(microtime(true) . mt_rand(10000, 90000));\n\t\t}\n\t\treturn substr($random, 0, $length);\n\t}", "function tf_md5rand() {\r\n return md5( time() .'-'. uniqid(rand(), true) .'-'. mt_rand(1, 1000) );\r\n }", "function xss_hash()\n\t{\n\t\tif ($this->xss_hash == '')\n\t\t{\n\t\t\tif (phpversion() >= 4.2)\n\t\t\t\tmt_srand();\n\t\t\telse\n\t\t\t\tmt_srand(hexdec(substr(md5(microtime()), -8)) & 0x7fffffff);\n\n\t\t\t$this->xss_hash = md5(time() + mt_rand(0, 1999999999));\n\t\t}\n\n\t\treturn $this->xss_hash;\n\t}", "function generateRandID(){\n\t\t$userid = $this->getPasswordSalt();\n\t\treturn hash('sha256',$userid);\n\t}", "public static function generateRandomString()\n {\n if (PHP_VERSION_ID >= 70000) {\n // phpcs:ignore\n $bytes = random_bytes(16);\n $result = bin2hex($bytes);\n } elseif (function_exists('openssl_random_pseudo_bytes')) {\n $bytes = openssl_random_pseudo_bytes(16, $cstrong);\n $result = bin2hex($bytes);\n } else {\n $generated = array();\n for ($i = 0; $i < 100; $i++) {\n $generated[] = mt_rand();\n }\n shuffle($generated);\n\n $result = md5(serialize($generated));\n }\n\n return $result;\n }", "function rand_md5($length) {\n $max = ceil($length / 32);\n $random = \"\";\n for ($i = 0; $i < $max; $i ++) {\n $random .= md5(microtime(true).mt_rand(10000,90000));\n }\n return substr($random, 0, $length);\n }", "public function generate_unique_id() {\n\n\t\t\trequire_once ABSPATH . 'wp-includes/class-phpass.php';\n\t\t\t$hasher = new PasswordHash( 8, false );\n\t\t\treturn md5( $hasher->get_random_bytes( 32 ) );\n\n\t\t}", "public static function makeRandomHash($cut = 0){\n\t\t$hash = md5(uniqid(rand()));\n\t\tif ($cut > 0) {\n\t\t\t$hash = substr($hash, 0, $cut);\n\t\t}\n\t\treturn $hash;\n\t}", "public function xss_hash()\n {\n if ($this->_xss_hash == '')\n {\n mt_srand();\n $this->_xss_hash = md5(strval(time() + mt_rand(0, 1999999999)));\n }\n\n return $this->_xss_hash;\n }", "private function generateUID(){\n if(function_exists(\"random_bytes\")){\n return md5(bin2hex(random_bytes(16)) . time());\n } else if(function_exists(\"openssl_random_pseudo_bytes\")){\n return md5(bin2hex(openssl_random_pseudo_bytes(16)) . time());\n }\n return md5(uniqid() . time());\n }", "private function generateSalt()\n {\n return str_random(16);\n }", "public function hash(): string;", "function createFileName()\n\t{\n\t $sid = 'abcdefghiklmnopqstvxuyz0123456789ABCDEFGHIKLMNOPQSTVXUYZ';\n\t $max = strlen($sid) - 1;\n\t $res = \"\";\n\t for($i = 0; $i<16; ++$i)\n\t {\n\t $res .= $sid[mt_rand(0, $max)];\n\t } \n\t return $res;\n\t}", "public function salt() {\r\n return substr(md5(uniqid(rand(), true)), 0, 10);\r\n }", "final public static function uniqueIDGenerator(){\n $letters = range('A', 'Z');\n shuffle($letters);\n return( md5(time() . implode('', $letters) . rand()));\n }", "public static function randomFilename() {\n $name = self::randomString();\n return substr($name, 0, 2) . '/' . substr($name, 2, 2)\n . '/' . substr($name, 4, 2) . '/' . substr($name, 6);\n }", "public function generateKey()\n\t{\n\t\treturn substr(md5(uniqid(mt_rand(), true)), 0, 3) . substr(md5(uniqid(mt_rand(), true)), 0, 2);\n\t}", "private function generateKey(): string\n\t{\n\t\t// `+` and `/` are replaced by `-` and `_`, resp.\n\t\t// The other characters (a-z, A-Z, 0-9) are legal within an URL.\n\t\t// As the number of bytes is divisible by 3, no trailing `=` occurs.\n\t\treturn strtr(base64_encode(random_bytes(3 * self::RANDOM_ID_LENGTH / 4)), '+/', '-_');\n\t}", "public function getRandomFileName($fileType) \n {\n return md5($fileType . Auth::id()) . md5(uniqid('', true));\n }", "function key_gen($str=''){\n\treturn str_replace('=','',base64_encode(md5($str)));\n}", "public static function generate()\n {\n return substr(md5(uniqid('nonce_', true)), 0, 16);\n }", "private function genRandomKey()\n {\n return strtoupper(str_random(32));\n }", "private function genSalt()\n {\n \treturn md5(time() + rand());\n }", "function createSalt()\n{\n $text = uniqid(Rand(), TRUE);\n return substr($text, 0, 5);\n\n}", "private function generateToken()\n {\n return hash('SHA256', uniqid((double) microtime() * 1000000, true));\n }", "function create_token(): string\n {\n $strs = \"QWERTYUIOPASDFGHJKLZXCVBNM1234567890qwertyuiopasdfghjklzxcvbnm\";\n $str = substr(str_shuffle($strs),mt_rand(0,strlen($strs)-11),12);\n return md5($str);\n }", "private function getUniqueSalt() {\n /* To generate the salt, first generate enough random bytes. Because\n * base64 returns one character for each 6 bits, so we should generate\n * at least 22*6/8 = 16.5 bytes, so we generate 17 bytes. Then we get the first\n * 22 base64 characters\n */\n\n /* As blowfish takes a salt with the alphabet ./A-Za-z0-9 we have to\n * replace any '+', '=' in the base64 string with '..'.\n */\n $random = base64_encode(openssl_random_pseudo_bytes(17));\n //take only the first 22 caracters\n $random = substr($random, 0, 22);\n\n //replace +,= by .\n return strtr($random, '+=', '..');\n }", "function encFileName($fileName){\n\t\treturn @rand(0, 9999999) . @uniqid(NUll,true) . @rand(0, 8888888) . $fileName;\n\t}", "public function xss_hash()\n\t{\n\t\tif ($this->_xss_hash === NULL)\n\t\t{\n\t\t\t$rand = $this->get_random_bytes(16);\n\t\t\t$this->_xss_hash = ($rand === FALSE)\n\t\t\t\t? md5(uniqid(mt_rand(), TRUE))\n\t\t\t\t: bin2hex($rand);\n\t\t}\n\n\t\treturn $this->_xss_hash;\n\t}", "public function geraNomeArquivo()\n {\n return sha1(uniqid(mt_rand(), true));\n }", "function generate_link_hash($link_name)\n{\n\tglobal $user;\n\n\tif (!isset($user->data[\"hash_$link_name\"]))\n\t{\n\t\t$user->data[\"hash_$link_name\"] = substr(sha1($user->data['user_form_salt'] . $link_name), 0, 8);\n\t}\n\n\treturn $user->data[\"hash_$link_name\"];\n}", "function generate_token()\n {\n $this->load->helper('security');\n $res = do_hash(time().mt_rand());\n $new_key = substr($res,0,config_item('rest_key_length'));\n return $new_key;\n }", "public function generate()\n{\n\n//generate a unique id//\n\n$unique=uniqid();\n\n$mesadig=crypt($unique,rand());\n//encrypt with the salt//\n\n//FILETER FOR THE /\n\n$mesadig=str_replace('/', 'ssd', $mesadig);\n\nreturn $mesadig;\n\n}", "public function xss_hash() {\n\t\tif ($this->xss_hash == '') {\n\t\t\tif (phpversion() >= 4.2) mt_srand(); else\n\t\t\t\tmt_srand(hexdec(substr(md5(microtime()), -8)) & 0x7fffffff);\n\n\t\t\t$this->xss_hash = md5(time() + mt_rand(0, 1999999999));\n\t\t}\n\n\t\treturn $this->xss_hash;\n\t}", "public function generate_config_ftp_key()\n\t{\n\t\treturn random_str(32);\n\t}", "function GnuCash_get_guid() {\n\t\n\t$guid = '';\n\tfor( $i=0; $i<32; $i++ ) {\n\t\t$guid .= dechex( rand( 0, 15 ) );\n\t}\n\treturn $guid;\n}", "public static function makeSalt()\n\t\t{\n\n\t\t\treturn uniqid(mt_rand(), true);\n\t\t}", "public function generateRandomProfilePictureFilename() {\n $count = 0;\n do {\n $generator = new SecureRandom();\n $random = $generator->nextBytes(16);\n $randomString = bin2hex($random);\n $count++;\n } while (file_exists($this->getUploadRootDir() . '/' . $randomString . '.' . $this->getFile()->guessExtension()) && $count < 50);\n\n return $randomString;\n }", "function generate_token()\n\t{\n\t return sha1(base64_encode(openssl_random_pseudo_bytes(30)));\n\t}", "function createSalt(){\r\n \t\t\t$string = md5(uniqid(rand(), true));\r\n \t\treturn substr($string, 0, 3);\r\n\t\t}", "protected function _create_salt()\n\t{\n\t\t$this->CI->load->helper('string');\n\t\treturn sha1(random_string('alnum', 32));\n\t}", "function hash_generator($str, $key)\n{\n $nonce = random_bytes(SODIUM_CRYPTO_SECRETBOX_NONCEBYTES);\n $ciphertext = sodium_crypto_secretbox($str, $nonce, $key);\n\n return $nonce . $ciphertext;\n}", "public function hash() {\n if(isset($this->cache['hash'])) return $this->cache['hash'];\n\n // add a unique hash\n $checksum = sprintf('%u', crc32($this->uri()));\n return $this->cache['hash'] = base_convert($checksum, 10, 36);\n }", "function random_file_name($keyname = '')\n{\n // config generate auto uniq\n /* A uniqid, like: 4b3403665fea6 */\n\n // nama file\n $getNama = $keyname;\n\n // delete space\n $removeSpace = preg_replace('/\\s+/', '', $getNama);\n\n // pisahkan dgn extentionnya\n $explodeFile = explode('.', $removeSpace);\n\n $namaFiles = $explodeFile[0];\n $extFiles = end($explodeFile);\n\n // buat nama baru \n $file = md5(uniqid($namaFiles));\n\n // gabung kembali menjadi file baru\n $new_file = $file . '.' . $extFiles;\n return $new_file;\n}", "public function hashGenerator($length = 128){\r\n\t\t$characters = $this->setCharacters();\r\n\t\t$hashArray = array();\r\n\t\tfor($i = 0; $i < $length; $i++){\r\n\t\t\t$hashArray[$i] = $characters[rand(0, count($characters)-1)];\r\n\t\t}\r\n\t\treturn implode('', $hashArray);\r\n\t}", "private function generateSalt(){\n return substr(md5(rand(0, 999)), 0, 5);\n }", "function _cr_hs_generate_token() {\n $load_avg = sys_getloadavg();\n $time = time();\n $hash = hash_init('sha256');\n hash_update($hash, implode('', $load_avg));\n hash_update($hash, time());\n return hash_final($hash);\n}", "function generate_unique_file_name($dir, $filename)\n{\n if (!$filename)\n return;\n \n $extension = pathinfo($filename, PATHINFO_EXTENSION);\n\n $new_filename = '';\n for (;;)\n {\n $new_filename = get_random_string(8, 8) . '.' . $extension;\n if (!file_exists($dir . '/' . $new_filename))\n break;\n }\n\n return $new_filename;\n}", "protected function generateSalt()\n\t{\n\t\treturn uniqid('',true);\n\t}", "protected function generateRandomId(){\n return Keygen::numeric(7)->prefix(mt_rand(1, 9))->generate(true);\n}", "protected function generateSalt() {\n return uniqid('', true);\n }", "private static function getRandomNumber()\n {\n if (defined('PHP_WINDOWS_VERSION_BUILD') && version_compare(PHP_VERSION, '5.3.4', '<')) {\n $useOpenSsl = false;\n } elseif (!function_exists('openssl_random_pseudo_bytes')) {\n $useOpenSsl = false;\n } else {\n $useOpenSsl = true;\n }\n\n $nbBytes = 32;\n\n if ($useOpenSsl) {\n $bytes = openssl_random_pseudo_bytes($nbBytes, $strong);\n\n if (false !== $bytes && true === $strong) {\n return $bytes;\n }\n }\n\n return hash('sha256', uniqid(mt_rand(), true), true);\n }", "function generateHash($plainText, $salt = null) // used in confirm-password.php, class.newuser.php, class.user.php, user-login.php, user-update-account.php\r\n\r\n{\r\n\r\n\tif ($salt === null)\r\n\r\n\t{\r\n\r\n\t\t$salt = substr(md5(uniqid(rand(), true)), 0, 25);\r\n\r\n\t}\r\n\r\n\telse\r\n\r\n\t{\r\n\r\n\t\t$salt = substr($salt, 0, 25);\r\n\r\n\t}\r\n\r\n\t\r\n\r\n\treturn $salt . sha1($salt . $plainText);\r\n\r\n}", "public static function generateSalt() {\r\n\t\treturn uniqid('', true);\r\n\t}", "public function generateRandID() {\n return md5($this->generateRandStr(16));\n }", "public function hash()\n\t\t{\n\t\t\tif (!$this->hash) {\n\t\t\t\t$this->hash = md5($this->name.'-'.$this->size);\n\t\t\t}\n\n\t\t\treturn $this->hash;\n\t\t}", "public function hash() {\r\n\t\t$filename = pathinfo($this->filepath, PATHINFO_BASENAME );\r\n\t\treturn sha1($filename);\r\n\t}", "function id_gen($str=''){\n\t$pats = array('/','+');\n\t$subs = array('_','-');\n\treturn str_replace($pats,$subs,substr(base64_encode(md5($str,true)),0,22));\n}", "function generate_mailkey(){\r\n $rseed=date(\"U\")%1000000;\r\n srand($rseed);\r\n $mailkey=md5(rand(10000,10000000));\r\n return $mailkey;\r\n}", "public function getUniquePublicId() {\r\n\r\n\t\t\t//Seed the random generator\r\n\t\t\tmt_srand($this->makeSeed());\r\n\r\n\t\t\t//Alphanumeric upper/lower array\r\n\t\t\t$alfa = \"1234567890qwrtypsdfghjklzxcvbnm\";\r\n\t\t\t$id = \"\";\r\n\r\n\t\t\t//Loop through and generate the random public id\r\n\t\t\tfor($i = 0; $i < 32; $i ++) {\r\n\t\t\t $id .= $alfa[mt_rand(0, strlen($alfa)-1)];\r\n\t\t\t}\r\n\r\n\t\t\t//If there is a duplicate, run this function recursively\r\n\t\t\tif(!$this->isPublicIdUnique($id)) {\r\n\t\t\t\t$id = $this->getUniquePublicId();\r\n\t\t\t}\r\n\r\n\t\t\t//Return the hash\r\n\t\t\treturn $id;\r\n\t\t}", "function randomFileNameGenerator($prefix){\n\t$r=substr(str_replace(\".\",\"\",uniqid($prefix,true)),0,20);\n\tif(file_exists(\"../uploads/$r\")) randomFileNameGenerator($prefix);\n\telse return $r;\n}", "function randomFileNameGenerator($prefix){\n\t$r=substr(str_replace(\".\",\"\",uniqid($prefix,true)),0,20);\n\tif(file_exists(\"../uploads/$r\")) randomFileNameGenerator($prefix);\n\telse return $r;\n}", "function generateFileName(){\n\t$assembledname = \"\";\n\t$chars = \"abcdefghijklmnopqrstuvwxyz1234567890\";\n\t\n\tfor($i=0;$i<20;$i++){\n\t\t$randomChar = rand(0,strlen($chars)-1);\n\t\t$assembledname .= substr($chars,$randomChar,1);\n\t}\n\n\treturn $assembledname;\n}", "function createSalt()\n {\n $string = md5(uniqid(rand(), true));\n return substr($string, 0, 3);\n }", "private function newHash()\n {\n $salt = hash('sha256', uniqid(mt_rand(), true) . 't33nh4sh' . strtolower($this->email));\n\n // Prefix the password with the salt\n $hash = $salt . $this->password;\n \n // Hash the salted password a bunch of times\n for ( $i = 0; $i < 100000; $i ++ ) {\n $hash = hash('sha256', $hash);\n }\n \n // Prefix the hash with the salt so we can find it back later\n $hash = $salt . $hash;\n \n return $hash;\n }", "private function hashing() {\n\t\t$data = md5($this->name.$this->date);\n\t\t$data = md5($data);\n\t\t$data = strrev($data);\n\t\t//$data = md5($data);\n\t\t$data = strtoupper($data);\n\t\t//$data = strrev($data);\n\n\t\t$datatemp = NULL;\n\t\tfor($i=0; $i<=strlen($data); $i++) {\n\t\t\t$arr = substr($data, $i, 1);\n\t\t\tif($i == '4' || $i == '8' || $i == '12' || $i == '16' || $i == '20' || $i == '24' || $i == '28' || $i == '32') {\n\t\t\t\t$datatemp .= substr($this->strfinger, ($i/4)-1, 1);\t\n\t\t\t}\n\t\t\t$datatemp .= \"/%\".$this->combine[$arr];\n\t\t}\n\n\t\t$this->resulthashcode = substr($datatemp, 1, strlen($datatemp)-6);\n\t\t$this->result = true;\n\t}", "protected function getRandomKey()\n {\n return Str::random(32);\n }", "function uniqidReal($barangayPsgc,$lenght = 6) {\n if (function_exists(\"random_bytes\")) {\n $bytes = random_bytes(ceil($lenght / 2));\n } elseif (function_exists(\"openssl_random_pseudo_bytes\")) {\n $bytes = openssl_random_pseudo_bytes(ceil($lenght / 2));\n } else {\n throw new Exception(\"no cryptographically secure random function available\");\n }\n return $barangayPsgc.\"-1-\".substr(bin2hex($bytes), 0, $lenght);\n}", "private function createGuid()\n {\n // section 127-0-1-1--751a8510:1443b2e74af:-8000:0000000000000C14 begin\n static $guid = '';\n $uid = uniqid(\"\", true);\n $data = mt_rand();\n $data .= isset($_SERVER['REQUEST_TIME']) ? $_SERVER['REQUEST_TIME'] : mt_rand();\n $data .= isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : mt_rand();\n $data .= isset($_SERVER['LOCAL_ADDR']) ? $_SERVER['LOCAL_ADDR'] : mt_rand();\n $data .= isset($_SERVER['LOCAL_PORT']) ? $_SERVER['LOCAL_PORT'] : mt_rand();\n $data .= isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : mt_rand();\n $data .= isset($_SERVER['REMOTE_PORT']) ? $_SERVER['REMOTE_PORT'] : mt_rand();\n $hash = strtoupper(hash('ripemd128', $uid . $guid . md5($data)));\n $guid = mt_rand(1,10) . \n substr($hash, 0, 8) . \n mt_rand(1,10) .\n substr($hash, 8, 4) .\n mt_rand(1,10) .\n substr($hash, 12, 4) .\n mt_rand(1,10) .\n substr($hash, 16, 4) .\n mt_rand(1,10) .\n substr($hash, 20, 12) .\n mt_rand(1,10);\n return $guid; \n // section 127-0-1-1--751a8510:1443b2e74af:-8000:0000000000000C14 end\n }", "private function randomString() {\r\n\t\t\t$rand=md5(microtime(true));\r\n\t\t\treturn $rand;\r\n\t\t}" ]
[ "0.8153327", "0.7946584", "0.77458376", "0.76753867", "0.7549161", "0.7540734", "0.753428", "0.7513523", "0.72944635", "0.72496337", "0.7192353", "0.7188072", "0.7188072", "0.7188072", "0.7188072", "0.7188072", "0.7188072", "0.70657784", "0.70547825", "0.70305675", "0.7020737", "0.6984863", "0.69791615", "0.6950876", "0.6925493", "0.6925374", "0.6923738", "0.6907613", "0.6904216", "0.6892397", "0.6866109", "0.68605196", "0.68540937", "0.684036", "0.6828016", "0.6822349", "0.6822166", "0.6798514", "0.6796851", "0.6796694", "0.67853737", "0.6784771", "0.6783276", "0.6772054", "0.6763922", "0.6747868", "0.6746779", "0.67461777", "0.67430305", "0.67378724", "0.6735378", "0.67263657", "0.67088", "0.6700323", "0.66978395", "0.66885823", "0.6684543", "0.6682293", "0.66822916", "0.6668846", "0.66687065", "0.6666671", "0.6661003", "0.66594946", "0.6649042", "0.6633686", "0.6624549", "0.66097033", "0.6605794", "0.6605032", "0.660136", "0.65975285", "0.65932125", "0.65887934", "0.65887487", "0.65795845", "0.6576884", "0.6549739", "0.65391797", "0.6537151", "0.653444", "0.6530817", "0.6529475", "0.6527447", "0.6515877", "0.6513352", "0.6503685", "0.65025413", "0.6502019", "0.6497621", "0.6493484", "0.6491966", "0.6491966", "0.64849037", "0.6478048", "0.64751303", "0.6469038", "0.64675254", "0.6457754", "0.6457291", "0.64556426" ]
0.0
-1
Check if a filename has a certain extensions Returns an integer but 0 is also 'false'
protected function checkExtension($filename, $extension) { return strpos($filename, "." . $extension); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _has_extension($filename) {\n\t\t$exploded = explode(\".\", $filename);\n\t\tif(sizeof($exploded) > 1)\n\t\t\treturn $exploded;\n\t\telse\n\t\t\treturn false;\n\t}", "function extension($ext){\r\n\t\tif ($ext == \"jpg\" || $ext == \"jpeg\" || $ext == \"png\") {\r\n\t\t\t$ret = 1;\r\n\t\t} else{\r\n\t\t\t$ret = 0;\r\n\t\t}\r\n\r\n\t\treturn $ret;\r\n\t}", "public function extens(){\n $this->typefl = pathinfo($this->filename, PATHINFO_EXTENSION);\n\n if(!in_array($this->typefl, $this->type)){\n echo \"Wrong extension!!!\";\n return false;\n }\n else{\n return true;\n }\n }", "function checkFileExtension($filename) {\r\n\t\tif ( ($pos = strrpos($filename, '.')) === false ) {\r\n\t\t\treturn $this->getMode();\r\n\t\t} else {\r\n\t\t\t$ext = substr($filename, $pos + 1);\r\n\t\t}\r\n\t\t\r\n\t\tif ( isset($this->_file_extensions[$ext]) ) {\r\n\t\t\treturn $this->_file_extensions[$ext];\r\n\t\t}\r\n\t\t\r\n\t\treturn $this->getMode();\r\n\t}", "function fileExtension($nameFile) {\n\t$format = substr($nameFile, -4);\n\treturn ($format == \".pat\");\n}", "static function chkFileExtension($str='') {\n $match= preg_match('/.swf/i', $str);\n if($match>0){\n return \"yes\";\n }else{\n return \"no\";\n }\n }", "public function extension_validation($file_ext,$extensions){\n\t\tif(in_array($file_ext,$extensions) == false){\n\t\t\treturn true;\n\t\t}\n\t}", "public function extension_validation($file_ext,$extensions){\n\t\tif(in_array($file_ext,$extensions) == false){\n\t\t\treturn true;\n\t\t}\n\t}", "public function checkExtension($fileName){\n \t\t$extName = explode(\".\", $fileName);\n \t\t$extension = end($extName);\n \t\tif ($extension == \"java\"){\n \t\t\treturn true;\n \t\t}else{\n \t\t\treturn false;\n \t\t}\n \t}", "public function checkExtensions()\r\n\t{\r\n\t\treturn (strcasecmp(pathinfo($this->targetFile, PATHINFO_EXTENSION), pathinfo($this->referenceFile, PATHINFO_EXTENSION)) === 0);\r\n\t}", "function isFileType($files) {\n $allowedExts = array(\"jpg\", \"jpeg\", \"gif\", \"png\", \"doc\", \"docx\", \"txt\", \"rtf\", \"pdf\", \"xls\", \"xlsx\", \"ppt\", \"pptx\");\n $temp = explode(\".\", $files);\n $extension = end($temp);\n if (in_array($extension, $allowedExts))\n return true;\n else\n return false;\n}", "public function getFileExtension($filename){\n\n if (!$filename)\n return false;\n\n $arr = explode('.', $filename);\n\n if ($arr[count($arr)-1])\n return $arr[count($arr)-1];\n else\n return false;\n }", "function CheckImageExtension($filename)\n{\n\tif(strlen($filename)<4)\n\t\treturn false;\n\t$ext=strtoupper(substr($filename,strlen($filename)-4));\n\tif($ext==\".GIF\" || $ext==\".JPG\" || $ext==\"JPEG\" || $ext==\".PNG\" || $ext==\".BMP\")\n\t\treturn $ext;\n\treturn false;\n}", "public function hasExtension($name);", "function is_valid_file_extension($value, $set){\n if (in_array($value, $set)) {\n return true;\n }\n}", "public function isAllowedExtension()\n {\n if (!empty($this->allowed_upload_file_ext)) {\n if (!is_array($this->allowed_upload_file_ext)) {\n NUCLEUS_Exceptions::catcher(FILE_TYPE_LIST_ERROR);\n return false;\n }\n else {\n if (!in_array($this->_file_info['ext'], $this->allowed_upload_file_ext)) {\n NUCLEUS_Exceptions::catcher(UPLOAD_FILE_TYPE_DENIED);\n return false;\n }\n }\n }\n\n return true;\n }", "public function extension($filePath);", "public function extIsAllowed( $ext )\n {\n if ( !mb_strlen($ext) )\n {\n return false;\n }\n\n return in_array($ext, self::$ext);\n }", "public function validExtension() {\t\n\t\tif(in_array($this->extension, $this->extensions)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function checkExt($f) {\r\n $ext = pathinfo($f, PATHINFO_EXTENSION);\r\n return $ext;\r\n }", "function getFileType ( $ext ) {\n\t\t\tforeach ( self::$TYPES_TO_EXTENSIONS as $type => $extensions ) {\n\t\t\t\tif ( in_array( $ext, $extensions ) ) {\n\t\t\t\t\treturn $type;\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\treturn false;\n\t\t\t\n\t\t}", "public function validateExtensionplan(){\n $allowed = array('jpeg', 'jpg', 'png');\n $filename = $this->getplanFloor('name');\n $ext = pathinfo($filename, PATHINFO_EXTENSION);\n if(!in_array($ext,$allowed)) {\n return false;\n } else {\n return true;\n }\n }", "function check_file_extension($ext, $allowed) {\nif (in_array($ext, $allowed)) {\nreturn true;\n}else {\necho \"Only .txt file allow to be uploaded\";\n}\n}", "protected function checkExtension() {\n\t\t\n\t\t//If no extensions set, all are valid\n\t\tif(empty($this->valid_extensions)) {\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t$extension = $this->getExtension();\n\t\t\n\t\treturn in_array($extension, $this->valid_extensions) ? true : false;\n\t\t\n\t}", "function is_valid_image_extension ($ext) {\n switch ($ext = strtolower($ext)) {\n //Pictures\n case 'jpg':\n case 'gif':\n case 'png':\n case 'bmp':\n case 'xbm':\n return true;\n\n //Denied extension\n default:\n return false;\n }\n }", "function is_valid_extension ($ext) {\n $ext = strtolower($ext);\n return (is_valid_image_extension($ext) || is_valid_audio_extension($ext)\n || is_valid_video_extension($ext));\n }", "public static function hasExtension($path)\r\n\t{\r\n\t\t$file=self::getFilename($path);\r\n\t\t$posDot=strrpos($file, \".\");\r\n\t\tif ($posDot===false) return false;\r\n\t\telse return true;\r\n\t}", "public function hasExtension()\n {\n \treturn ( $this->_extension !== '' );\n }", "function getExtension($filePath){\n\t\t$lastDot = strrpos($filePath, '.');\n\t\tif($lastDot === false)\n\t\t\treturn false;\n\t\treturn substr($filePath, $lastDot+1);\n\t}", "public static function extension($file) {\n\t\tif(strpos($file,\".\")) {\n\t\t $array = explode(\".\",$file);\n\t\t\treturn end($array);\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public static function hasExtension($filename, $extensions = [])\n {\n $extensions = array_map('strtolower', $extensions);\n $extension = strtolower(pathinfo($filename, PATHINFO_EXTENSION));\n return in_array($extension, $extensions);\n }", "public static function isHaveExtension($path)\n {\n if (!is_string($path)) {\n return false;\n }\n $parts = pathinfo($path);\n return array_key_exists('extension', $parts);\n }", "public function getFileExtension();", "public function checkFile($filename){\n $ext = substr($filename, strrpos($filename, '.') + 1);\n if($ext==\"jpg\"||$ext==\"png\"||$ext==\"svg\"||$ext==\"jpeg\"){\n return true;\n }else{\n return false;\n }\n }", "public static function file_extension($filename)\r\r\n\t{\r\r\n\t $path_info = pathinfo($filename);\r\r\n\t return $path_info['extension'];\r\r\n\t}", "public function is_file_valid($ext){\r\n\t\t$rslt = false;\r\n\r\n\t\tif($ext == '.doc' || $ext == '.DOC' || $ext == '.docx' || $ext == '.DOCX' || $ext == '.xls' || $ext == '.XLS' || $ext == '.xlsx' || $ext == '.XLSX' || $ext == '.ppt' || $ext == '.PPT' || $ext == '.pptx' || $ext == '.PPTX' || $ext == '.pdf' || $ext == '.PDF' || $ext == '.jpg' || $ext == '.JPG' || $ext == '.png' || $ext == '.PNG' || $ext == '.csv' || $ext == '.CSV' || $ext == '.gif' || $ext == '.GIF' || $ext == '.zip' || $ext == '.ZIP') {\r\n\r\n\t\t\t$rslt = true;\r\n\t\t}\r\n\r\n\t\treturn $rslt;\r\n\r\n\t}", "public function isValidType( $ext=null ){\n global $VALID_FILES;\n if (!$ext)\n $ext = $this->ext; \n return (in_array( $ext, $VALID_FILES )); \n }", "function checkExtension($params = array(), $options = array()) {\n\t\t$val = array_shift($params);\n\t\tif (!empty($val['name'])) {\n\t\t\t$pathinfo = pathinfo($val['name'], PATHINFO_EXTENSION);\n\t\t\tif (in_array($pathinfo, $options)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public static function guess_fileextension( $filename = null, $filecontent = null ) {\r\n\t\t\tif ( $filename ) {\r\n\t\t\t\t$filecontent = $this->getFileContents( $filename );\r\n\t\t\t\tif ( !$filecontent ) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t} else if ( !$filecontent ) {\r\n\t\t\t\tthrow new Exception( 'This function needs atleast one argument!' );\r\n\t\t\t}\r\n\t\t\t$signature = self::getFileSignature( $filecontent );\r\n\t\t\tswitch( $signature[0] ) {\r\n\t\t\t\tcase 'FF': { return ( self::is_jpg( null, $signature ) ) ? 'jpg' : (( self::is_mp3( null, $signature ) ) ? 'mp3' : false ); } break;\r\n\t\t\t\tcase '47': { return ( self::is_gif( null, $signature ) ) ? 'gif' : false; } break;\r\n\t\t\t\tcase '89': { return ( self::is_png( null, $signature ) ) ? 'png' : false; } break;\r\n\t\t\t\tcase '42': { return ( self::is_bmp( null, $signature ) ) ? 'bmp' : false; } break;\r\n\t\t\t\tcase '52': { return ( self::is_webp( null, $signature ) ) ? 'webp' : (( self::is_rar( null, $signature ) ) ? 'rar' : false ); } break;\r\n\t\t\t\tcase '1F': { return ( self::is_gzip( null, $signature ) ) ? 'gz' : false; } break;\r\n\t\t\t\tcase '37': { return ( self::is_7zip( null, $signature ) ) ? '7z' : false; } break;\r\n\t\t\t\tcase '4D': { return ( self::is_exe( null, $signature ) ) ? 'exe' : (( self::is_tiff( null, $signature ) ) ? 'tiff' : false ); } break;\r\n\t\t\t\tcase '49': { return ( self::is_tif( null, $signature ) ) ? 'tif' : (( self::is_mp3( null, $signature ) ) ? 'mp3' : false ); } break;\r\n\t\t\t\tcase '25': { return ( self::is_pdf( null, $signature ) ) ? 'pdf' : false; } break;\r\n\t\t\t\tcase '30': { return ( self::is_wmv( null, $signature ) ) ? 'wmv' : false; } break;\r\n\t\t\t\tcase '75': { return ( self::is_tar( null, $signature ) ) ? 'tar' : false; } break;\r\n\t\t\t\tcase '3C': { return ( self::is_xml( null, $signature ) ) ? 'xml' : false; } break;\r\n\t\t\t\tdefault: {\r\n\t\t\t\t\t$signature = self::getFileSignature( $filecontent, 4 );\r\n\t\t\t\t\tswitch( $signature[0] ) {\r\n\t\t\t\t\t\tcase '66': { return ( self::is_mp4( null, $signature ) ) ? 'mp4' : false; } break;\r\n\t\t\t\t\t\tcase '1A': { return ( self::is_webm( null, $signature ) ) ? 'webm' : false; } break;\r\n\t\t\t\t\t\tdefault: {\r\n\t\t\t\t\t\t\t$signature = self::getFileSignature( $filecontent, 8 );\r\n\t\t\t\t\t\t\tswitch( $signature[0] ) {\r\n\t\t\t\t\t\t\t\tcase '57': { return ( self::is_wav( null, $signature ) ) ? 'wav' : false; } break;\r\n\t\t\t\t\t\t\t\tcase '41': { return ( self::is_avi( null, $signature ) ) ? 'avi' : false; } break;\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\treturn false;\r\n\t\t}", "public function ext()\n {\n if (!$this->info) {\n $this->info();\n }\n if (isset($this->info['extension'])) {\n return $this->info['extension'];\n }\n\n return false;\n }", "function file_is_image($filename) {\n return in_array(get_file_extension($filename), get_image_file_types());\n }", "public static function GetFileExtension($filename)\n\t{\n\t\t$ext = false;\n\t\t\n\t\t$arr = explode('.', basename($filename));\n\t\tif (is_array($arr) && count($arr) >= 2)\n\t\t{\n\t\t\t$ext = $arr[ count($arr)-1 ];\n\t\t}\n\t\t\n\t\treturn $ext;\n\t}", "function get_file_extension($file_name) {\n if(empty($file_name) OR !is_string($file_name)) {\n return false;\n }\n return strtolower(substr(strrchr($file_name,'.'), 1));\n}", "private function has_valid_extension( $file ) {\n\t\tforeach ( $this->extensions as $extension ) {\n\t\t\tif ( stristr( $file, $extension ) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "function file_extension($filename)\n\t\t{\n\t\t\t$fileparts = explode(\".\", $filename);\n\t\t\t$more_check = strpos(strtolower(end($fileparts)), '?');\n\t\t\tif ($more_check != false) {\n\t\t\t\t\n\t\t\t\treturn substr(strtolower(end($fileparts)),0, $more_check );\n\t\t}\n\t\telse {\n\t\t\t\n\t\t\treturn strtolower(end($fileparts));\n\t\t}\n\t\t}", "private function checkIfExtFileExists($file){\n\t\t\t$b = @fopen($file, \"r\");\n\t\t\t@fclose($b);\n\t\t\treturn $b==true;\n\t\t}", "public function getExistsImageExt($pic){\n\n $exts = array('png', 'gif', 'gif', 'jpg', 'jpeg', 'swf', 'psd', 'bmp', 'tif', 'jpc', 'jp2', 'jpx', 'jb2', 'swc', 'iff', 'jpg', 'wbmp', 'xbm');\n\n foreach ($exts as $ext){\n if (file_exists($pic.\".\".$ext))\n return \".\".$ext;\n }\n\n return false;\n\n }", "abstract protected function getFileExtension();", "function knowsExtension ($anExtension)\n\t{\n\t\t$result = in_array ($anExtension, $this->extensions);\n\t\treturn $result;\n\t}", "function getfileextension($filename){\n return pathinfo($filename, PATHINFO_EXTENSION);\n }", "public function testHasExtensionFalse($filename)\n {\n $file = new File($filename);\n $this->assertFalse(\n $file->hasExtension(),\n sprintf(\"File %s should not have an extension\", $filename)\n );\n }", "public function getFileExtension() {\n\t\t$pathInfo = pathinfo($this->filename);\n\t\tif (!isset($pathInfo['extension'])) {\n\t\t\treturn '???';\n\t\t} else {\n\t\t\treturn $pathInfo['extension'];\n\t\t}\n\t}", "public static function hasExtension( $ext )\n {\n if( !empty( $ext ) && is_string( $ext ) )\n {\n $ext = strtolower( trim( $ext ) );\n return array_key_exists( $ext, self::loadedExtensions() );\n }\n return false;\n }", "function filenameCheck($str) {\n return (strpos($str, \".csv\") !== FALSE);\n }", "public function getSupportedFileExtensions() {}", "public function extensionValid() \n\t{\n\t\tif (!in_array($this->extension_of_file, $this->file_types)) //{\n\t\t\tthrow new Exception(\"Invalid file Extension\",5);\n\t\t//}\n\t}", "function getExtension($filename)\n{\n\t$info = pathinfo($filename);\n\treturn $info['extension'];\n}", "protected function validateExtension($ext,$addional_ext = [])\n\t{\n\t\t$ext = strtolower($ext);\n $valid_extensions = array_merge(['png', 'jpg', 'jpeg', 'gif', 'webp'],$addional_ext);\n\t\treturn in_array($ext,$valid_extensions);\n\t}", "public function mimetypeExists($ext)\n\t{\n\t\treturn isset($this->mimeTypes[$ext])?true:false;\n\t}", "private function isFileValid(): bool\n {\n return FileHelper::isExpectedExtensions($this->getPath(), $this->getFileExtensions());\n }", "public function getFileExtension($format);", "public function exists($filename);", "function is_valid_audio_extension ($ext) {\n switch ($ext = strtolower($ext)) {\n //Sounds (HTML5 <audio> formats)\n case 'mp3':\n case 'ogg':\n case 'aac':\n case 'wav':\n case 'wave':\n return true;\n\n //Denied extension\n default:\n return false;\n }\n }", "protected function fileMatchExtensions($path, $extensions)\n {\n foreach ($extensions as $extension) {\n if (mb_substr($path, -mb_strlen($extension)) === $extension) {\n return true;\n }\n }\n\n return false;\n }", "private function getFileExtension($fileName) {\r\n return pathinfo($fileName, PATHINFO_EXTENSION);\r\n }", "public function extension()\n {\n return pathinfo($this->path_filename, PATHINFO_EXTENSION);\n }", "private function detectExtension()\n {\n $arr = explode('.', $this->file['name']);\n $this->file['extension'] = end($arr);\n }", "public static function extension($_path)\r\n {\r\n return pathinfo($_path, PATHINFO_EXTENSION);\r\n }", "public static function isNeedConvertExtension($extension)\n\t{\n\t\tstatic $convertFormat = array(\n\t\t\t'doc' => 'docx',\n\t\t\t'.doc' => '.docx',\n\t\t\t'xls' => 'xlsx',\n\t\t\t'.xls' => '.xlsx',\n\t\t\t'ppt' => 'pptx',\n\t\t\t'.ppt' => '.pptx',\n\t\t);\n\n\t\treturn isset($convertFormat[$extension]) || isset($convertFormat[mb_strtolower($extension)]);\n\t}", "public function hasFileName() {\n return $this->_has(2);\n }", "public function isExtensionLoaded($ext='gd') { \n return extension_loaded($ext); \n }", "public function hasFileName(){\n return $this->_has(3);\n }", "function file_get_extension($filename)\r\n\t{\r\n\t\treturn substr($filename, strrpos($filename, \".\") + 1, strlen($filename));\r\n\t}", "function get_file_extension($filename){\n if(strpos($filename, \"jpeg\")){\n $ext = \"jpeg\";\n }\n else if(strpos($filename, \"png\")){\n $ext = \"png\";\n }\n else if(strpos($filename, \"gif\")){\n $ext = \"gif\";\n }\n else{\n $ext = \"jpg\";\n }\n return $ext;\n }", "function validateFileExtension(&$model, $fieldData, $fieldName, $allowedExts = array()) {\n if (empty($fieldData[$fieldName]['tmp_name'])) return true;\n \n $extension = strtolower(pathinfo($fieldData[$fieldName]['name'], PATHINFO_EXTENSION));\n \n if (!is_array($allowedExts) || (!in_array('*', $allowedExts) && !in_array($extension, $allowedExts))) return false;\n \n return true;\n }", "function get_file_extension($LoSFileName) {\n\t$LoSFileExtensions = substr($LoSFileName, strrpos($LoSFileName, '.') + 1);\n\treturn $LoSFileExtensions;\n}", "function getExtensionsFile($filename) {\r\n\t\tif ( !file_exists($filename) ) {\r\n\t\t\tthrow new ftpException(\"Extensions-file '$filename' does not exist\");\r\n\t\t}\r\n\t\tif ( !is_readable($filename) ) {\r\n\t\t\tthrow new ftpException(\"Extensions-file '$filename' is not readable\");\r\n\t\t}\r\n\t\t\r\n\t\t$exts = @parse_ini_file($filename, true);\r\n\t\tif ( !is_array($exts) ) {\r\n\t\t\tthrow new ftpException(\"Extensions-file '$filename' could not be loaded\");\r\n\t\t}\r\n\t\t\r\n\t\t$this->_file_extensions = array();\r\n\t\t\r\n\t\tif ( isset($exts['ASCII']) ) {\r\n\t\t\tforeach ( $exts['ASCII'] as $ext => $bogus ) {\r\n\t\t\t\t$this->_file_extensions[$ext] = FTP_ASCII;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ( isset($exts['BINARY']) ) {\r\n\t\t\tforeach ( $exts['BINARY'] as $ext => $bogus ) {\r\n\t\t\t\t$this->_file_extensions[$ext] = FTP_BINARY;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public function isValidFilename()\n {\n $fileName = $this->fileName;\n if(substr($fileName, 0,1) == '-') {\n return false;\n }\n return true;\n }", "static function isKnownExtension($strExtension)\n {\n if (empty(self::$arrExtensions2Mimetypes)) self::init();\n return isset(self::$arrExtensions2Mimetypes[$strExtension]);\n }", "function file_ext($filename) {\n\t if( !preg_match('/./', $filename) ) return '';\n\t return preg_replace('/^.*./', '', $filename);\n\t}", "public function checkFileType($fileType){\n \t\tif ($fileType == \"application/octet-stream\"){\n \t\t\treturn true;\n \t\t}else{\n \t\t\treturn false;\n \t\t}\n \t}", "function isImage(string $filename) : bool {\n return (bool) preg_match(\"/(png|gif|jpg|jpeg)/\", pathinfo($filename, PATHINFO_EXTENSION));\n}", "private function matchExtensions(array $extensions): bool\n {\n $mimeTypes = array_map(\n static fn (string $extension): string => MimeType::fromExtension($extension),\n $extensions\n );\n return in_array($this->mimeType, $mimeTypes, true);\n }", "public static function mime_by_ext($extension)\r\n {\r\n $mimes = Core::config('mimes');\r\n\r\n return isset($mimes[$extension])?$mimes[$extension][0]:false;\r\n }", "function checkFileType( $file_types, $currentFileType )\n{\n $aFiles = explode( ',', $file_types ) ; # create aFiles file type array:\n for ( $x=0; $x<count($aFiles); $x++ )\n {\n if ( $aFiles[$x] == $currentFileType ) { return TRUE ; }\n }\n return FALSE ; # no match found, return false!\n}", "function isPhoto($path) \n {\n $exploded = explode('.', $path);\n $ext = strtolower(end($exploded));\n // Define the photos extensions\n $photoExtensions = ['png', 'jpg', 'jpeg', 'gif', 'jfif', 'tif', 'webp'];\n // Check if this extension belongs to the extensions we defined\n if (in_array($ext, $photoExtensions)) {\n return true;\n }\n return false;\n }", "function checkType($type){\n\n $allowed = array('jpg', 'jpeg', 'png');\n $fileExt = explode('/', $type);\n $fileExt = strtolower(end($fileExt));\n return in_array($fileExt, $allowed) ? true : false ;\n\n }", "function extension2fileType( $extension )\n{\n $file_types = '' ; # initialize\n switch ( strtolower( $extension ) )\n {\n case '.jpg':\n case '.jpeg':\n $file_types = 'image/pjpeg,image/jpeg' ;\n break ;\n case '.gif':\n $file_types = 'image/gif' ;\n break ;\n case '.png':\n $file_types = 'image/x-png' ;\n break ;\n case '.doc':\n $file_types = 'application/msword' ;\n break ;\n case '.zip':\n $file_types = 'application/x-zip-compressed' ;\n break ;\n case '.pdf':\n $file_types = 'application/pdf' ;\n break ;\n case '.xls':\n $file_types = 'application/vnd.ms-excel' ;\n break ;\n case '.mp3':\n $file_types = 'audio/mpeg' ;\n break ;\n case '.txt':\n $file_types = 'text/plain' ;\n break ;\n case '.htm':\n case '.html':\n $file_types = 'text/html' ;\n break ;\n case '.wma':\n $file_types = 'audio/x-ms-wma' ;\n break ;\n default:\n $file_types = 'image/pjpeg,image/jpeg' ; # default to .jpg\n }\n return $file_types ; # return matching file type!\n}", "final public static function fext($file){\n\t\treturn pathinfo($file, PATHINFO_EXTENSION);\n\t}", "function _findExtensionFiles() {\r\n\t\r\n\t\t\tif (empty($this->_extensionsPath)) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\r\n\t\t\t//make sure we only get the package files in that directory\r\n\t\t\t$zipFiles = JFolder::files($this->_extensionsPath, '\\.zip$', false, false);\r\n\t\t\t$gzFiles = JFolder::files($this->_extensionsPath, '\\.gz$', false, false);\r\n\t\t\t$bz2Fies = JFolder::files($this->_extensionsPath, '\\.bz2$', false, false);\r\n\t\t\t$files = array_merge($zipFiles, $gzFiles, $bz2Fies);\r\n\t\r\n\t\t\tif (count($files) > 0) {\r\n\t\t\t\t$this->_packageFiles = $files;\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}", "private function hasJPGExtension(string $path): bool\n {\n $extensionIndex = strrpos($path, '.');\n if (false === $extensionIndex) {\n return false;\n }\n $extension = strtolower(substr($path, $extensionIndex));\n return '.jpg' === $extension || '.jpeg' === $extension;\n }", "function getExtension($filename) {\n\treturn substr(strrchr($filename,'.'),1);\n}", "public static function extension($path)\n\t{\n\t\treturn pathinfo($path, PATHINFO_EXTENSION);\n\t}", "public static function extension($path)\n\t{\n\t\treturn pathinfo($path, PATHINFO_EXTENSION);\n\t}", "public static function extension($path)\n\t{\n\t\treturn pathinfo($path, PATHINFO_EXTENSION);\n\t}", "protected function getFileExtension($fileName)\n {\n return pathinfo($fileName, PATHINFO_EXTENSION);\n }", "public static function getMimeByExtension(string $filename)\n {\n static $mimes;\n\n if (!is_array($mimes)) {\n $mimes = self::getMimes();\n\n if (empty($mimes)) {\n return false;\n }\n }\n\n $extension = strtolower(substr(strrchr($filename, '.'), 1));\n\n if (isset($mimes[$extension])) {\n return is_array($mimes[$extension])\n ? current($mimes[$extension]) // Multiple mime types, just give the first one\n : $mimes[$extension];\n }\n\n return false;\n }", "public function getExtension()\r\n {\r\n return pathinfo($this->filename, PATHINFO_EXTENSION);\r\n }", "public function checkExtensions()\n {\n $extensions = array(\n 'fileinfo',\n 'pdo',\n 'mbstring',\n 'tokenizer',\n 'openssl',\n 'json',\n 'curl',\n 'xml'\n );\n\n $results = array();\n\n foreach ($extensions as $extension) {\n $results[$extension] = extension_loaded($extension);\n }\n\n return $results;\n }", "function findexts ($filename) \n{ \n\t$filename = strtolower($filename) ; \n\t$exts = split(\"[/\\\\.]\", $filename) ; \n\t$n = count($exts)-1; \n\n\t// Write any scripts that check for unwanted extensions here!\n\tif ($n > 1) // Check for evil double-barreled extensions like \"yourfile.php.jpg\" or \"yourfile.exe.jpg\" and eliminate extensions you don't allow.\n\t{\n\t\techo \"Double-Barreled file extension(s) are not allowed.<br>\";\n\t\t$ok=0;\n\t}\n\t$exts = $exts[$n]; \n\treturn $exts; \n}" ]
[ "0.7608403", "0.7498947", "0.7459561", "0.74049926", "0.72833854", "0.7187359", "0.71502775", "0.71502775", "0.71412355", "0.7132933", "0.71243244", "0.71040756", "0.70507586", "0.69953483", "0.69520056", "0.693726", "0.68297595", "0.68096477", "0.68059677", "0.67763776", "0.6710518", "0.66559297", "0.66551244", "0.6654618", "0.66467905", "0.66206664", "0.66193426", "0.66156447", "0.66019017", "0.6599309", "0.658476", "0.6583873", "0.6575466", "0.65271276", "0.6501819", "0.6446861", "0.64073145", "0.63976943", "0.6397547", "0.63727146", "0.6365633", "0.6353017", "0.6350512", "0.63410354", "0.6317537", "0.6300468", "0.6289157", "0.6287995", "0.6267578", "0.6259179", "0.6248504", "0.6246429", "0.6239113", "0.62332284", "0.62326425", "0.6203595", "0.619623", "0.61958045", "0.61678576", "0.61678326", "0.6151585", "0.6140399", "0.6135155", "0.6132", "0.6130926", "0.61290455", "0.6129038", "0.6121227", "0.6120644", "0.61203456", "0.6118486", "0.61145514", "0.61130315", "0.6107044", "0.6097171", "0.6095521", "0.60880333", "0.60875267", "0.6084259", "0.6083925", "0.6083475", "0.60774684", "0.6072981", "0.60699844", "0.606455", "0.60636795", "0.605039", "0.6025784", "0.6009639", "0.59897053", "0.59840167", "0.59837574", "0.5983376", "0.5983376", "0.5983376", "0.59727955", "0.59709716", "0.59679466", "0.5964991", "0.5963704" ]
0.69335985
16
View details of an existing user
function actionViewUser($templateVars) { $currentUser = usersGetCurrent(); $currentUser['accessLevelDescription'] = accessLevelsGetDescription($currentUser['accesslevels_id']); $templateVars['currentUser'] = $currentUser; $currentProperty = propertiesGetCurrent(); $templateVars['currentProperty'] = $currentProperty; $currentDivision = divisionsGetCurrent(); if($currentDivision == false) $templateVars['currentDivision'] = false; else $templateVars['currentDivision'] = $currentDivision; $currentDepartment = departmentsGetCurrent(); if($currentDepartment == false) $templateVars['currentDepartment'] = false; else $templateVars['currentDepartment'] = $currentDepartment; return $templateVars; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show()\n {\n $id = Auth::user()->id;\n $user = User::find($id);\n return view('user.detail', compact('user'));\n }", "public function viewUserAction()\n {\n \tif($this->getRequest()->getParam('id')){\n \t\t$db = new RsvAcl_Model_DbTable_DbUser();\n \t\t$user_id = $this->getRequest()->getParam('id');\n \t\t$rs=$db->getUser($user_id);\n \t\t//print_r($rs); exit;\n \t\t$this->view->rs=$rs;\n \t} \t \n \t\n }", "public function viewAction()\n {\n $repo = $this->entityManager\n ->getRepository(Entity\\User::class);\n $id = $this->params()->fromRoute('id');\n $entity = $this->params()->fromRoute('entity', 'user');\n $user = $repo->getUser($id, $entity);\n return ['entity' => $user,'id' => $id ];\n }", "public function user_get()\n\t{\n\t\t$id = $this->get('id');\n\t\tif ($id == null) {\n\t\t\t$data = $this->User->showUser();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data = $this->User->showUser($id);\n\t\t}\n\n\t\tif ($data) {\n\t\t\t$this->response($data,200);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->response([\n\t\t\t\t'error'=>true,\n\t\t\t\t'message'=>'Id tidak ada'\n\t\t\t],200);\n\t\t}\n\n\t}", "public function view_user($id)\n {\n\n\n }", "public function userDetail()\n {\n return view('admin.show_users')->with('users',User::all());\n \n }", "public function show()\n {\n $user_identifier = $this->session->userdata('identifier');\n $user_details = $this->user_m->read($user_identifier);\n $this->data['user_details'] = $user_details;\n $this->load_view('Profil Akun', 'user/profil');\n }", "public function show(User $user)\n {\n \n }", "public function getUserDetail($uId){ \n\t\n\t $data = $this->User_model->getUser($uId);\n\t\tif(!empty($data)) {\n\t\t $this->load->view('admin/user_mgt/view_user', $data);\n\t\t return;\n\t\t}\n\t\techo '<h3 class=\"text-danger\">Record not found!</h3>';\n\t\t\n\t}", "public function show(User $user)\n {\n\n }", "public function show(User $user)\n {\n //\n\n }", "public function show(User $user)\n {\n //\n\n }", "public function actionInfo()\n {\n $uid = getParam('id', null);\n if (!$uid) {\n $uid = getMyId();\n }\n if (!empty($uid)) {\n\n $useModel = User::find()->active()->where(['id' => $uid])->one();\n if ($useModel) {\n $this->msg = 'User Info';\n $this->data = User::getDetail($uid);\n } else {\n $this->code = 404;\n $this->msg = 'User Not found';\n }\n } else {\n $this->code = 422;\n $this->msg = 'Id is require';\n }\n\n }", "public function getUser(){\n \t\n \treturn view('user/info/info_user');\n }", "function show() {\n // Process request with using of models\n $user = Service::get_authorized_user();\n // Make Response Data\n if ($user !== NULL) {\n $data = [\n 'profile' => $user,\n ];\n $view = 'user/show';\n return $this->render($view, $data);\n } else {\n return Application::error403();\n }\n}", "public function profile()\n {\n $user = User::find(Auth::id());\n return view('layouts.showuser_details')->with(['user' => $user]);\n }", "public function showAction()\n {\n\t\tif (!$this->get('security.context')->isGranted('ROLE_SUBCRIBERUSER')) {\n throw new AccessDeniedException();\n }\n\n // get loged in user Id\t\n\t\t$userId = $this->get('security.context')->getToken()->getUser()->getId();\n \n $em = $this->getDoctrine()->getManager();\n $entity = $em->getRepository('WebsolutioDemoBundle:UserProfile')->findOneByUser($userId);\n\n if (!$entity) {\n\t\t\treturn $this->redirect($this->generateUrl('userprofile_create_profile'));\n\t\t} else {\n\t\t\treturn $this->redirect($this->generateUrl('userprofile_show', array('id' => $userId)));\n \t\n\t\t}\n\n return $this->render('WebsolutioDemoBundle:UserProfile:index.html.twig', array(\n 'entity' => $entity \n ));\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n //\n }", "public function show(User $user)\n {\n }", "public function show(User $user)\n {\n }", "public function show()\n {\n return UserTransformer::resource(Auth::user());\n }", "public function showAction(){\n $user = $this->getDoctrine()\n ->getRepository('AcmeDemoBundle:User')\n ->find(2); // SELECT * FROM USER WHERE ID =\n\n if (!$user) {\n throw $this->createNotFoundException(\n 'Aucun produit trouvé pour cet id : '.$user->getId()\n );\n }\n\n return new Response('Utilisateur trouvé avec id ' .$user->getId());\n }", "public function userAccount()\n {\n $recipes= $this->getDoctrine()\n ->getRepository(Recipe::class)\n ->findAll();\n $user = $this->getUser();\n $reviews= $this->getDoctrine()\n ->getRepository(Review::class)\n ->findAll();\n $user = $this->getUser();\n return $this->render('user/show.html.twig', [\n 'user' => $user,\n 'recipes' => $recipes,\n 'reviews' => $reviews,\n ]);\n\n }", "public function actionViewuser($id)\n {\n $userone = \\common\\models\\User::findOne(['id'=>$id]);\n\n return $this->render('viewuser', [\n 'user' => $userone,\n ]);\n }", "public function viewuser() {\n $response = $this->Allusers_model->viewuser();\n return $response;\n }", "public function show(\\App\\User $user)\n {\n //\n }", "public function profile()\n {\n $user_id = auth()->user()->id;\n $user = User::find($user_id);\n if (auth()->user()->id !== $user->id){\n return back ('user.edit')->with('error', 'Unauthorized Access');\n }\n return view ('user.edit')->with('user', $user);\n }", "public function show(User $user)\n { \n return $user;\n }", "function view($id){\n\t\t\t$this->loadModel('User');\n\t\t\t$users = $this->User->findFirst(array(\n\t\t\t\t'conditions'\t=> array('idUser'=>$id)\n\t\t\t));\n\t\t\tif(empty($users)){\n\t\t\t\t$this->e404('User introuvable');\n\t\t\t}\n\t\t\t$this->set('users', $users);\n\n\t\t\n\t\t}", "public function show( $id )\n {\n $user = User::findOrFail( $id );\n $user->role = $user->roles[0]->id;\n $user->role_name = $user->roles[0]->role_name;\n // dd( $user->roles );\n $detail = view('layouts.templates.forms.form_fields_readonly', [ 'formFields' => User::getFormData( FALSE ), 'data'=> $user ] );\n\n $linkEdit['url'] = url('users').'/'. $user->id.'/edit';\n $linkEdit['linkName'] = 'Edit';\n $linkEdit = view('layouts.templates.tables.actions.link', $linkEdit);\n\n \n $this->data[ 'contents' ] = $detail.'<br>'.$linkEdit;\n\n $this->data[ 'message_alert' ] = Session::get('message');\n $this->data[ 'page_title' ] = 'User management';\n $this->data[ 'header' ] = $user->name;\n $this->data[ 'sub_header' ] = '';\n return $this->render( );\n }", "public function show($id)\n {\n return user::find($id);\n }", "public function show($id)\n {\n $user=User::find($id);\n return view('Backend.users.details',compact('user'));\n }", "public function show()\n {\n return new UserResource(Auth::user());\n }", "function user_get()\n {\n $id = $this->get('id');\n if ($id == '') {\n $user = $this->db->get('auth_user')->result();\n } else {\n $this->db->where('id', $id);\n $user = $this->db->get('auth_user')->result();\n }\n $this->response($user, 200);\n }", "public function getUserdetailAction(string $id)\n {\n $result = $this->userService->getUserDetail($id);\n\n if (!$result['success']) {\n //process error\n return $this->responseError($result['message'], '/users/'.$id);\n }\n\n //return data\n $encoder = $this->createEncoder($this->modelName, $this->schemaName);\n\n return $this->response($encoder, $result['data']);\n\n \n }", "public function show($id)\n {\n // Dapatkan rekod user\n $user = User::find($id);\n\n return view('users/detail_user', compact('user') );\n }", "public function show($id){\n //$user = User::whereid($id)->first();\n $user = Auth::user();\n \n if($user){\n //User exist \n //return view('pages/profile')->withUser($user);\n return view('pages/profile', compact('user',$user));\n }\n else{\n //User doesn't exist \n dd($user);\n }\n }" ]
[ "0.7448395", "0.74117154", "0.73897153", "0.7251069", "0.7230593", "0.7218003", "0.72036934", "0.71603906", "0.7132444", "0.7097707", "0.70766294", "0.70766294", "0.70734143", "0.7056146", "0.7044638", "0.7035038", "0.70256144", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.7014415", "0.69718784", "0.69718784", "0.6970351", "0.6943026", "0.6929436", "0.69002134", "0.6896044", "0.6894424", "0.68797433", "0.6878872", "0.68734044", "0.68729675", "0.6868975", "0.68675077", "0.686396", "0.68586314", "0.6856901", "0.68537885", "0.68496794" ]
0.0
-1
Add a new user
function actionAddUser($templateVars) { $property = propertiesNewModel(); if(!empty($_POST) && isset($_POST['newPropertyForm'])) { $validForm = true; $property['name'] = $_POST['name']; if(empty($property['name'])) { $templateVars['nameError'] = 'Please enter a name for this property'; $validForm = false; } if(empty($_FILES['logo']['name'])) { $templateVars['logoError'] = 'Please include a logo for for this property'; $validForm = false; } else { $newLogo = $_FILES['logo']['name']; $newLogoTemp = $_FILES['logo']['tmp_name']; $newLogoType = $_FILES['logo']['type']; if(!in_array($newLogoType, $siteConfig['validLogoTypes'])) { $templateVars['logoError'] = 'Supported logo types are JPEG, GIF or PNG'; $validForm = false; } } if($validForm == true) { propertiesAddRecord($property); $property['id'] = dbLastId(); $property['logo'] = generateLogoFilename($property['id'], $newLogo); //move_uploaded_file($newLogoTemp, APPLICATION_DIR.'/images/logos/'.$property['logo']); propertiesUpdateRecord($property); redirectToPage('settings/properties/listing'); } } $templateVars['property'] = $property; return $templateVars; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addUser(){}", "public function addUser(){\n\t}", "public function addUser() {\n $db = new ClassDB();\n $db->connect();\n\n $result = $db->getConnection()->prepare('INSERT INTO users (user_email,\n user_password,\n user_first_name,\n user_last_name) \n VALUES (:email,\n :pass,\n :firstName,\n :lastName)');\n\n $result->bindParam(':email', $this->user_email); \n $result->bindParam(':pass', $this->user_password); \n $result->bindParam(':firstName', $this->user_first_name);\n $result->bindParam(':lastName', $this->user_last_name);\n \n $result->execute();\n $db->disconnect();\n }", "public static function addUser()\n {\n // ADD NEW DATA TO A TABLE\n // MAKE SURE TO SEND USERS TO THE /users page when a user is added\n }", "public function add() {\n\t\t$user = $this->User->read(null, $this->Auth->user('id'));\n\t\tif ($this->request->is('post')) {\n\t\t\t$this->User->create();\n\t\t\t$this->request->data['User']['password'] = AuthComponent::password($this->request->data['User']['password']);\n\t\t\tif ($this->User->save($this->request->data)) {\n\t\t\t\t$this->Session->setFlash(__('The user has been saved'));\n\t\t\t\t$this->redirect(array('action' => 'index'));\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__('The user could not be saved. Please, try again.'));\n\t\t\t}\n\t\t} else {\n\t\t\t$mintURL = $this->Configuration->findByName('Mint URL');\r\n\t\t\t$queryURL = $mintURL['Configuration']['value'];\r\n\t\t\t$lookupSupported = isset($queryURL) && \"\" <> $queryURL;\r\n\t\t\t$this->set('lookupSupported', $lookupSupported);\n\t\t\t$this->set('userType', $user['User']['type']);\n\t\t}\n\t}", "public function add()\n {\n $storedPassword = password_hash($_POST['password'], PASSWORD_DEFAULT);\n\n $data = [];\n $data['username'] = $_POST[\"username\"];\n $data['password'] = $storedPassword;\n $data['email'] = $_POST['email'];\n $data['profile_picture'] = $_FILES['profile']['tmp_name'];\n $data['mime'] = $_FILES['profile']['type'];\n $data['phone_num'] = $_POST['phone-number'];\n\n if ($this->model('User')->addNewUser($data) > 0) {\n $this->redirect(BASE_URL . \"/home/index/{$data['username']}\");\n }\n }", "public function add() {\n $user = $this->Users->newEntity();\n if ($this->request->is('post')) {\n $user = $this->Users->patchEntity($user, $this->request->data);\n if ($this->Users->save($user)) {\n $this->Flash->success(__('The user has been saved.'));\n \n return $this->redirect(['action' => 'login']);\n } else {\n $this->Flash->error(__('The user could not be saved. Please, try again.'));\n }\n }\n \n $this->set(compact('user'));\n $this->set('_serialize', ['user']);\n }", "public function action_add()\r\n\t{\r\n\t\tif ( Request::current()->method() == Request::POST )\r\n\t\t{\r\n\t\t\treturn $this->_add();\r\n\t\t}\r\n\t\t\r\n\t\t$this->template->title = __('Add user');\r\n\t\t$this->breadcrumbs\r\n\t\t\t->add($this->template->title);\r\n\r\n\t\t// check if user have already enter something\r\n\t\t$data = Flash::get( 'post_data', array() );\r\n\r\n\t\t$user = new User( $data );\r\n\r\n\t\t$this->template->content = View::factory( 'user/edit', array(\r\n\t\t\t'action' => 'add',\r\n\t\t\t'user' => $user,\r\n\t\t\t'permissions' => Model_Permission::get_all()\r\n\t\t) );\r\n\t}", "public function addUser(UserAddForm $form);", "public function createUser();", "public function createUser();", "public function createUser();", "public function createUser();", "public function addUser($data)\n{\n\t$this->insert($data);\n}", "private function addUser()\n {\n $this->online->addUser($this->user, $this->place, $this->loginTime);\n }", "public function addUserAction()\n {\n $form = new Application_Form_UserEdit();\n $this->view->form = $form;\n\n if ($this->getRequest()->isPost())\n {\n $formData = $this->getRequest()->getPost();\n if ($form->isValid($formData))\n {\n $username = $form->getValue('username');\n $password = $form->getValue('password');\n $role = $form->getValue('role');\n $first_name = $form->getValue('first_name');\n $last_name = $form->getValue('last_name');\n $email = $form->getValue('email'); \n $user = new Application_Model_DbTable_Users();\n $user->addUser($username, $password, $first_name,\n $last_name, $email, $role);\n $this->_helper->redirector('index', 'index');\n }\n else\n {\n $form->populate($formData);\n }\n }\n }", "public function addUser($name, UserConfig $user);", "public function addAction() {\n $form = new Admin_Form_CreateAdminUser();\n if ($this->getRequest()->isPost()) {\n if ($form->isValid($this->_request->getPost())) {\n $values = $form->getValues();\n $adminMapper = new Application_Model_Table_AdminUsers();\n $userFound = $adminMapper->fetchByUsername($values['username']);\n if(!$userFound){\n $values['is_active'] = 1;\n $values['is_admin'] = 1;\n $adminUser = $adminMapper->createRow($values);\n $adminUser->hashPassword($values['new_password']);\n $adminUser->save();\n $this->_helper->FlashMessenger->addMessage('The user has been created' , 'successful');\n $this->_helper->redirector->goToRouteAndExit(array(), 'admin-users', true);\n } else {\n $this->view->messages['error'] = \"This username already exists\";\n }\n }\n }\n $this->view->form = $form;\n }", "public function add(){\n\t\t// if we got a post information, do add else do nothing\n\t\tif($this->request->is('post')){\n\t\t\t$this->User->create();\n\t\t\tif($this->User->save($this->request->data)){\n\t\t\t\t// if the information is successfully saved\n\t\t\t\t$this->Session->setFlash(__('Congratulation, the user has been created.'));\n\t\t\t\t$this->redirect(array('controller'=>'jobs', 'action'=>'index'));\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__('Sorry, the user can not be created.'));\n\t\t\t}\n\t\t}\n\t}", "public function addUser($name, $email, $password)\n {\n\n //\n }", "function add_user(MJKMH_User $user): void {\r\n\t\t$this->users[$user->id()] = $user;\r\n\t}", "public function add(){\n\t\tif($this->request->is('post'))\n\t\t{\n\t\t\t$this->User->create();\n\t\t\t$this->request->data['User']['role'] = 'user';\n\t\t\tif($this->User->save($this->request->data))\n\t\t\t{\n\t\t\t\t$this->Session->setFlash('Usuario creado');\n\t\t\t\treturn $this-redirect(array('action' =>'index'));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->Session->setFlash('Usuario no creado');\n\t\t\t}\n\t\t}\n\n\t}", "public function actionAdd() {\n\t\treturn $this->txSave ( \"app\\models\\User\" );\n\t}", "public function add($user){\n\n $this->builder->insert($user);\n\n }", "public function addUser($user_data) {\n\n Yii::$app->db->createCommand()->insert('users', [\n 'username' => $user_data['username'],\n 'password' => $user_data['password'],\n 'authKey' => $user_data['authKey'],\n 'accessToken' => $user_data['accessToken'],\n ])->execute();\n }", "function addUser ($user) {\n\n $conn = \\Database\\Connection::connect();\n\n try {\n $sql = \"INSERT INTO user (_user_FirstName, _user_Email, _user_Password) VALUES (?, ?, ?)\";\n $query = $conn->prepare($sql);\n $query->execute(array($user->_user_FirstName, $user->_user_Email, $user->_user_Password));\n }\n catch(\\PDOException $e)\n {\n echo $sql . \"<br>\" . $e->getMessage();\n }\n\n \\Database\\Connection::disconnect();\n }", "public static function addUser()\n {\n if(empty($_POST))\n {\n require_once(__DIR__.'/../views/form.php');\n exit;\n }\n\n // add user to database\n $user = UserModel::addUser();\n\n if (!$user)\n {\n session_start();\n $_SESSION['message'] = 'Error occurred while saving user. Please try again later.';\n header('Location: /form');\n exit;\n }\n\n // update text file\n if (!self::updateTextFile($_SERVER['DOCUMENT_ROOT'] . $user['about'], $user['euro2016']))\n {\n header('Location: /form');\n exit;\n }\n\n session_start();\n $_SESSION['message'] = 'Successfully saved user';\n\n require_once(__DIR__.'/../views/form.php');\n }", "public function addUser(){\n\n\t\ttry {\n\n\t\t\t$username = filter_input(INPUT_POST, 'username', FILTER_SANITIZE_STRING);\n\t\t\t$password = $_POST['password'];\n\n\t\t\t$password = hash('sha256', $password);\n\n\n\t\t\trequire CONTROLLER_DIR . '/dbConnecterController.php';\n\n\t\t\t$result = $db->query('SELECT * FROM users WHERE username=\"'.$username.'\"');\n\n\t\t\tif ($username && $password) {\n\n\t\t\t\t$row = $result->fetchColumn();\n\t\t\t\tif($row == 0){\n\t\t\t\t\t$statement = $db->query(\"INSERT INTO users (username,password) VALUES ('$username', '$password')\" );\n\t\t\t\t\t$db = null;\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\tdie(\"Username already taken, pick something else! <br><a href='/userlist'> Go back to user list\");\n\t\t\t\t}\t\n\t\t\t}\n\n\t\t} catch (PDOException $e) {\n\t\t\tprint \"Error!: \" . $e->getMessage() . \"<br/>\";\n\t\t\tdie();\n\t\t}\n\t}", "public function addUserAction()\n\t{\n\t\t$user = new User();\n\n\t\t$form = $this->createForm(new UserType, $user);\n\t\t\n\t\t$request = $this->get('request');\n\n\t\tif ($request->getMethod() == 'POST') {\n\t\t\t$form->bind($request);\n\n // Checking the validity of the submission\n\t\t\tif ($form->isValid()) {\n\t\t\t\t$em = $this->getDoctrine()->getManager();\n\t\t\t\t$em->persist($user);\n\t\t\t\t$em->flush();\n\n // Redirection to the homepage of Bundle\n\t\t\t\treturn $this->redirect($this->generateUrl('valentin_films_manager_index'));\n\t\t\t}\n\t\t}\n\t\treturn $this->render('ValentinFilmsManagerBundle:Manager:addUser.html.twig', array(\n\t\t\t'form' => $form->createView(),\n\t\t\t));\n\t\t\n\t}", "public function addNewUser($user)\n {\n $conn = $this->MySQL->getConn();\n $sql = \"INSERT INTO `\".DB::TBL_USERS.\"` \".\n \"SET `fio`=?,`login`=?,`loginHash`=?,`phone`=?,\n `email`=?, `emailHash`=?,`pass`=?,`photo`=?\";\n $st = $conn->prepare($sql);\n $st->execute([\n $user->fio, $user->login, $user->loginHash, $user->phone,\n $user->email, $user->emailHash, $user->pass, $user->photo\n ]);\n $user->id = $conn->lastInsertId();\n }", "public function addUser()\n {\n $categoryList = $this->itemModel->getCategories();\n\n //Check that register button exists and was clicked\n if (isset($_POST[\"user_submit\"])) { \n\n //Insert new row in Account and setting the User's name in database using values inputted in the HTML form\n $username = $_POST['username']; \n\n $newly_registered_account_id = $this->accountModel->registerAccount($username,$_POST[\"password\"],$_POST[\"sfsu_id\"]);\n\n $this->userModel->setUser($newly_registered_account_id,$_POST[\"firstname\"], \n $_POST[\"lastname\"],$_POST[\"country\"],$_POST[\"state\"],\n $_POST[\"address\"],$_POST[\"city\"],$_POST[\"zipcode\"],$_POST[\"phoneNumber\"]);\n\n } else {\n echo '<script language=\"javascript\">';\n echo 'alert(\"accounts.php registerUser bad.\")';\n echo '</script>';\n }\n\n header('location: ' . URL . 'home/index');\n }", "public function addUser(UserInterface $user);", "public function addUser(UserInterface $user);", "public function add_user($id) {\n UserToPres::create_entry($id,$this->id);\n }", "public function createUserAction() {\n $this->authService->createUser();\n die();\n }", "function addnewuser() {\n \t\t\t$this->set('GetUserQ', $this->Users->GetUsers(0));\n \t\t\t$this->set('GetLevelsQ', $this->AccessLevels->index());\n \t\t}", "static function addUser(){\n\n $controller = new UserController();\n $validation = $controller->signupValid();\n\n if($validation === \"OK\"){\n $base = new ConnexionDb;\n\n $base->query(\"INSERT INTO user(username, firstname, email, pass, valid)\n VALUES (:username, :firstname, :email, :pass, 1)\",\n array(\n array('username',$_POST['username'],\\PDO::PARAM_STR),\n array('firstname',$_POST['firstname'],\\PDO::PARAM_STR),\n array('email',$_POST['email'],\\PDO::PARAM_STR),\n array('pass',$_POST['pass'],\\PDO::PARAM_STR)\n )\n );\n // $userM = new User($_POST);\n\n }else{\n echo 'erreur d\\'inscription';\n }\n }", "public static function create($user){\n\t\tApp::get('database')->add('users',$user);\n\t}", "public function addUserToDatabase($user) {\n $name = $user->getName();\n $password = $user->getHashedPassword();\n $sql = \"INSERT INTO users (name, password) VALUES (:name, :password)\";\n $insertToDb = $this->connection->prepare($sql);\n $insertToDb->bindParam(':name', $name);\n $insertToDb->bindParam(':password', $password);\n $insertToDb->execute();\n $this->registerStatus = true;\n }", "public function add()\n\t{\n\t\t// TODO\n\t\t// if(user has permissions){}\n\t\t$this -> loadModel('User');\n\t\tif($this -> request -> is('post') && !$this -> User -> exists($this -> request -> data['SgaPerson']['user_id']))\n\t\t{\n\t\t\t$this -> Session -> setFlash(\"Please select a valid JacketPages user to add.\");\n\t\t\t$this -> redirect(array('action' => 'index',$id));\n\t\t}\n\t\t$this -> loadModel('User');\n\t\tif ($this -> request -> is('post'))\n\t\t{\n\t\t\t$this -> SgaPerson -> create();\n\t\t\tif ($this -> SgaPerson -> save($this -> data))\n\t\t\t{\n\t\t\t\t$user = $this -> User -> read(null, $this -> data['SgaPerson']['user_id']);\n\t\t\t\t$this -> User -> set('level', 'sga_user');\n\t\t\t\t$this -> User -> set('sga_id', $this -> SgaPerson -> getInsertID());\n\t\t\t\t$this -> User -> save();\n\t\t\t\t$this -> Session -> setFlash(__('The user has been added to SGA.', true));\n\t\t\t\t$this -> redirect(array('action' => 'index'));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this -> Session -> setFlash(__('Invalid user. User may already be assigned a role in SGA. Please try again.', true));\n\t\t\t}\n\t\t}\n\t}", "public function add_user() {\n try {\n //Retrieve user details.\n if (filter_has_var(INPUT_POST, 'username') && filter_has_var(INPUT_POST, 'password') && filter_has_var(INPUT_POST, 'firstname') && filter_has_var(INPUT_POST, 'lastname')) {\n $firstname = trim(filter_input(INPUT_POST, 'firstname', FILTER_SANITIZE_STRING));\n $lastname = trim(filter_input(INPUT_POST, 'lastname', FILTER_SANITIZE_STRING));\n $username = trim(filter_input(INPUT_POST, 'username', FILTER_SANITIZE_STRING));\n $password = trim(filter_input(INPUT_POST, 'password', FILTER_SANITIZE_STRING));\n }\n\n if ($firstname == \"\" || $lastname == \"\" || $username == \"\" || $password == \"\") {\n throw new DataMissingException(\"Please fill in all fields.\");\n }\n //Hash password.\n $hashed_password = password_hash($password, PASSWORD_DEFAULT);\n\n //Add user details to database.\n $sql = \"INSERT INTO \" . $this->tblUser . \" VALUES (NULL, 2, '$firstname', '$lastname', '$username', '$hashed_password')\";\n\n\n //Execute the insert query.\n $query = $this->dbConnection->query($sql);\n\n //If the query failed, return false. \n if (!$query) {\n throw new DatabaseException(\"There was an error adding the user.\");\n }\n //Return true if successful.\n return true;\n } catch (DataMissingException $e) {\n return $e->getMessage();\n } catch (DatabaseException $e) {\n return $e->getMessage();\n } catch (Exception $e) {\n return $e->getMessage();\n }\n }", "public function addAction() {\r\n\t\tif ($this->request->isPost ()) {\r\n\t\t\t$user = new Users ();\r\n\t\t\t$user->firstname = $this->request->get ( \"first_name\" );\r\n\t\t\t$user->lastname = $this->request->get ( \"last_name\" );\r\n\t\t\t$user->bithday = $this->request->get ( \"date\" );\r\n\t\t\t$user->save ();\r\n\t\t}\r\n\t}", "function addUser(){\n $name = $_REQUEST['name'];\n $pword = $_REQUEST['pword'];\n $num = $_REQUEST['number'];\n include(\"../model/user.php\");\n $obj=new user();\n\n if($obj->addUser($name, $pword, $num)) {\n echo '{\"result\":1}';\n }else {\n echo '{\"result\":0}';\n }\n }", "public function add() {\n if ($this->User->isLoggedIn() && $this->User->isAdmin()) {\n $flash = null;\n if (isset($_POST['email'])&&isset($_POST['password'])) {\n if ($this->User->insert(\n $_POST['email'],\n $_POST['password']\n )) {\n $flash = \"User {$_POST['email']} added.\";\n }\n }\n return array(\n 'flash' => $flash,\n 'title' => 'Add user'\n );\n } else {\n header(\"Location: \".app::site_url(array('users','login')));\n exit(0);\n }\n }", "public function createUser()\n {\n }", "function register_user($new) {\n \n $this->db->insert('users', $new);\n }", "public function add_user($data){\n return $this->db->insert('user', $data);\n }", "function addUser( $user, $password, $email = '', $realname = '' ) {\n return false;\n }", "public function addUser(\\Models\\User $user) {\n $this->users[] = $user;\n }", "function add_user ($User_name, $User_password, $User_email, $user_type)\n\t{\n\t\tglobal $conn;\n\n $sql_i = \"INSERT INTO login_db(user_name, user_password, user_email, user_type) VALUES \" .\n \"('$User_name', '$User_password', '$User_email', '$user_type')\";\n\n run_update($sql_i);\n\t}", "public function addUser($request)\n {\n $this->name = $request[\"name\"];\n $this->email = trim($request[\"email\"]);\n $this->enabled = $request[\"enabled\"];\n $this->access_level = $request[\"access_level\"];\n\n if (array_key_exists(\"password\", $request)) {\n $this->password = $this->passwordHash($request[\"password\"]);\n } else {\n $this->password = $this->passwordHash($this->generatePassword(12));\n }\n\n if (Auth::user()->isModerator()) {\n $this->group_id = Auth::user()->group_id;\n }\n\n if (Auth::user()->isAdministrator()) {\n $this->group_id = $request[\"group_id\"];\n }\n\n $this->save();\n }", "function addUser($user,$password) {\r\n\t\twp_create_user($user->mName,$password,$user->mEmail);\r\n\t\treturn true;\r\n\t}", "function addUser($user)\n {\n $connection = Doctrine_Manager::connection();\n $query = \"INSERT INTO constant_contact (username, access_token, created_at) VALUES ('\".$user['username'].\"', '\".$user['access_token'].\"', '\".date('Y-m-d H:i:s').\"')\";\n $statement = $connection->execute($query);\n }", "public function add($params) {\n try {\n \t$baseType = (int)1;\n // Create a new user and attempt to save it to the database:\n $user = new User();\n $res = $user->setUsername(strtolower($_POST['username']))\n ->setPassword($_POST['password'])\n ->setEmail($_POST['email'])\n ->setType($baseType)\n ->setFirstname($_POST['firstname'])\n ->setLastname($_POST['lastname'])\n ->setPrivacy($_POST['privacy2'])\n ->commit($this->getDBConn());\n\n error_log(\"Added user \". $user->getUserId());\n\n require \"config.php\";\n if ($res) {\n // display success message and redirect to new user's page\n $this->addFlashMessage('Created new user: ' . $user->getUsername(), self::FLASH_LEVEL_SUCCESS);\n $this->redirect(\"/users/login\");\n } else {\n $this->addFlashMessage('Unknown error adding user. Please try again: ', self::FLASH_LEVEL_SERVER_ERR);\n }\n } catch (\\PDOException $dbErr) {\n $this->addFlashMessage('Database error on adding user:<br>'.$dbErr->getMessage(), self::FLASH_LEVEL_SERVER_ERR);\n }\n\n // Some sort of error on adding user; return to form\n $this->redirect(\"/users/new\");\n }", "function add() {\n $this->layout = \"no_header\";\n if (!empty($this->data)) {\n if ($this->User->save($this->data)) {\n $this->Session->setFlash(\"Your account has been created successfully\");\n $this->go_back(\"login\");\n }\n }\n }", "public function add_post()\n {\n $response = $this->UserM->add_user(\n $this->post('email'),\n $this->post('nama'),\n $this->post('nohp'),\n $this->post('pekerjaan')\n );\n $this->response($response);\n }", "public function add($user){\n if (!isset($user['name'])) throw new Exception(\"Name is missing\");\n if (!isset($user['mail'])) throw new Exception(\"Mail is missing\");\n if (!isset($user['password'])) throw new Exception(\"Password is missing\");\n $user['created_at'] = date(Config::DATE_FORMAT);\n $user['token'] = md5(random_bytes(16));\n return parent::add($user);\n}", "public function newUser() {\n $this->checkValidUser();\n\n $this->db->sql = 'INSERT INTO '.$this->db->dbTbl['users'].' (username, salt, hash) VALUES (:username, :salt, :hash)';\n\n $salt = $this->getNewSalt();\n\n $res = $this->db->execute(array(\n ':username' => $this->getData('username'),\n ':salt' => $salt,\n ':hash' => md5($salt . $this->getData('password'))\n ));\n\n if($res === false) {\n $this->output = array(\n 'success' => false,\n 'key' => 'xxT5r'\n );\n } else {\n $this->output = array(\n 'success' => true,\n 'key' => 'dU4r5'\n );\n }\n\n $this->renderOutput();\n }", "function _add_user()\n {\n if (!$this->has_arg('PROJECTID'))\n $this->_error('No project id specified');\n if (!$this->has_arg('PERSONID'))\n $this->_error('No user specified');\n\n $proj = $this->db->pq(\"SELECT p.projectid FROM project p WHERE p.personid LIKE :1 AND p.projectid=:2\", array($this->user->personId, $this->arg('PROJECTID')));\n\n if (!sizeof($proj))\n $this->_error('No such project');\n $proj = $proj[0];\n\n $person = $this->db->pq(\"SELECT CONCAT(CONCAT(givenname, ' '), familyname) as fullname FROM person WHERE personid=:1\", array($this->arg('PERSONID')));\n if (!sizeof($person))\n $this->_error('No such person');\n $person = $person[0];\n\n $this->db->pq(\"INSERT INTO project_has_person (projectid, personid) VALUES (:1, :2)\", array($this->arg('PROJECTID'), $this->arg('PERSONID')));\n\n $this->_output(array('FULLNAME' => $person['FULLNAME']));\n }", "protected function _createUser()\n {\n $data = [\n 'email' => '[email protected]',\n 'password' => 'test',\n ];\n\n $user = $this->Users->newEntity($data);\n\n $user->set('active', true);\n $user->set('role_id', 1);\n\n $this->Users->save($user);\n }", "protected function add()\n {\n $userModel = config('admin.database.users_model');\n $roleModel = config('admin.database.roles_model');\n\n $username = null;\n\n while ($username === null) {\n $answer_username = $this->ask('Please enter a username to login');\n\n if ($userModel::where('username', '=', $answer_username)->exists()) {\n\n $this->line(\"<error>Username is exists: </error> $answer_username\");\n } else {\n $username = $answer_username;\n }\n }\n\n $password = null;\n\n while ($password === null) {\n $answer_password = $this->secret('Please enter a password to login');\n\n $answer_password_again = $this->secret('Please enter the password again');\n\n if ($answer_password != $answer_password_again) {\n $this->line(\"<error>Password do not match</error>\");\n } else {\n $password = bcrypt($answer_password);\n }\n }\n\n $name = $this->ask('Please enter a name to display');\n\n if ($this->confirm('Add role for user?', true)) {\n $roles = $roleModel::all();\n\n if (!$this->confirm('All role?', true)) {\n /** @var array $selected */\n $selectedOption = $roles->pluck('name')->toArray();\n\n $selected = $this->choice('Please choose a role for the user, or you can use \",\" to make multiple', $selectedOption, null, null, true);\n\n $selected = Arr::wrap($selected);\n\n $roles = $roles->filter(function ($role) use ($selected) {\n return in_array($role->name, $selected);\n });\n }\n }\n\n $user = new $userModel(compact('username', 'password', 'name'));\n\n $user->save();\n\n if (isset($roles)) {\n $user->roles()->attach($roles);\n }\n\n $this->line('<info>User created successfully: </info> ' . $name);\n }", "private function _addUser($inputs)\n\t{\n\t\tCraft::log('Creating user.');\n\n\t\t$this->_user = new UserModel();\n\n\t\t$this->_user->username = $inputs['username'];\n\t\t$this->_user->newPassword = $inputs['password'];\n\t\t$this->_user->email = $inputs['email'];\n\t\t$this->_user->admin = true;\n\n\t\tif (craft()->users->saveUser($this->_user))\n\t\t{\n\t\t\tCraft::log('User created successfully.');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tCraft::log('Could not create the user.', LogLevel::Error);\n\t\t\tthrow new Exception(Craft::t('There was a problem creating the user:').$this->_getFlattenedErrors($this->_user->getErrors()));\n\t\t}\n\t}", "public function add_user_get(){\r\n if (!$this->pronet_model->add_user('Fname Lname', '7711223344553', '[email protected]', '31111225', '1990-01-01','134091830-2')) {\r\n $response = $this->pronet_model->get_response();\r\n $this->response([\r\n 'status' => FALSE,\r\n 'message' => $response['ResponseMessage'],\r\n 'response_code' => $response['ResponseCode']\r\n ], REST_Controller::HTTP_BAD_REQUEST);\r\n } else {\r\n $response = $this->pronet_model->get_response();\r\n $this->response([\r\n 'status' => TRUE,\r\n 'message' => $response['ResponseMessage'],\r\n 'response_code' => $response['ResponseCode']\r\n ], REST_Controller::HTTP_OK);\r\n }\r\n }", "public function test_it_creates_a_new_user()\n {\n $user = ['email' => '[email protected]', 'given_name' => 'Andrew', 'family_name' => 'Hook'];\n\n $this->json('POST', '/users', $user)\n ->seeJson($user);\n }", "public function newAppUser()\n {\n $email = filter_input(INPUT_POST, 'email', FILTER_SANITIZE_STRING);\n $name = filter_input(INPUT_POST, 'name', FILTER_SANITIZE_STRING);\n $password = filter_input(INPUT_POST, 'password', FILTER_SANITIZE_STRING);\n $role = filter_input(INPUT_POST, 'role', FILTER_SANITIZE_STRING);\n $status = filter_input(INPUT_POST, 'status', FILTER_SANITIZE_NUMBER_INT);\n\n $errorList = [];\n if (empty($email)) {\n $errorList[] = 'Vous devez saisir un email';\n }\n if (empty($name)) {\n $errorList[] = 'Vous devez saisir un nom';\n }\n if (empty($password)) {\n $errorList[] = 'Vous devez saisir un mot de passe';\n }\n if (empty($role)) {\n $errorList[] = 'Vous devez saisir un rôle';\n }\n\n if (empty($errorList)) {\n $user = new AppUser();\n $user->setEmail($email);\n $user->setName($name);\n $user->setPassword($password);\n $user->setRole($role);\n $user->setStatus($status);\n\n $inserted = $user->create();\n\n if ($inserted) {\n global $router;\n header('Location: ' . $router->generate('appusers-list'));\n return;\n } else {\n $errorList[] = 'L\\'insertion des données s\\'est mal passée';\n }\n }\n\n if (!empty($errorList)) {\n $user = new AppUser();\n $user->setEmail($email);\n $user->setName($name);\n $user->setPassword($password);\n $user->setRole($role);\n $user->setStatus($status);\n\n $this->show('users/add', [\n 'errorList' => $errorList,\n 'user' => $user\n ]);\n }\n }", "public function createUser () {\n syslog( LOG_INFO, 'Create a Lineberty User \\n' );\n\n $url = '/users';\n\n return $this->runRequest($url, 'POST', null);\n }", "public function add_new_user($user_name,$name,$password)\n\t{\n\t\t///TODO\n\t\t//DB::insert('insert into users (name,password,device_id) values (?, ?,?)', [$user_name, $password,1]);\n\t\t$query=DB::insert('insert into users (name,password,device_id) values (?, ?,?)', [$user_name, $password,1]);\n\n\n\t}", "public function create()\n\t{\n\t\tif (!isset($_POST) || empty($_POST))\n\t\t{\n\t\t\theader(\"Location: /myrecipe/users/registry\");\n\t\t\texit;\n\t\t}\n\t\t// TODO need to validate data\n\t\t$data = array('username' => $_POST['username'], 'password' => $_POST['password'], 'cpassword' => $_POST['cpassword'], 'email' => $_POST['email']);\n\t\t// validate the input data\n\t\t$errorArray = User::validates($data);\n\t\tif (count($errorArray))\n\t\t{\n\t\t\t// store errors in session and redirect\n\t\t\t$_SESSION['user'] = $data;\n\t\t\t$_SESSION['user']['errors'] = $errorArray;\n\t\t\theader(\"Location: /myrecipe/users/registry\");\n\t\t\texit;\n\t\t}\n\t\t// create a new user, assume all new users are not staff\n\t\t$values = array('username'=>$_POST['username'],'password'=>$_POST['password'],'email'=>$_POST['email'],'user_type'=>'1');\n\t\t$id = User::createUser($values);\n\t\t// log the user in\n\t\t$_SESSION['user']['id'] = $id;\n\t\t$_SESSION['user']['name'] = $_POST['username'];\n\t\t$_SESSION['user']['type'] = '1';\n\t\techo \"id = \" . $id;\n\t\theader(\"Location: /myrecipe/users/\" . $id);\n\t\texit;\n\t}", "function add_user ($username,$password)\n {\n\t\t$insert_query = \"insert into users set username='$username',password = '$password'\";\n return $this->query ($insert_query);\n }", "public function add_user($user)\n {\n if(empty($user->email))\n {\n $this->res->SetObject(RCD::EC_EMPTY, RCD::ED_EMPTY, FALSE, NULL);\n }\n if($this->db->insert(self::user, $user))\n {\n $this->res->SetObject(RCD::SC, RCD::SD,FALSE, NULL);\n }\n else\n {\n $this->res->SetObject(RCD::EC_INSERT, RCD::ED_INSERT,TRUE, NULL);\n }\n }", "public function useradd(){\n $arr=Input::get();\n unset($arr['_token']);\n unset($arr['checkbox']);\n\n $arr['password'] = password_hash($arr['pwd'],PASSWORD_DEFAULT);\n unset($arr['pwd']);\n $students = DB::select('select * from DS_User where account = '.$arr[\"account\"]);\n if (!empty($students)){\n alert('该用户已存在!','/account',2);\n }\n $ls = DB::table('User')->insert($arr);\n if($ls === false){\n alert('注册失败!','/account',2);\n }\n alert('注册成功!','/login',1);\n }", "public static function addUser($data)\n\t{\n\t\t$first_name = $data['first_name'];\n\t\t$last_name = $data['last_name'];\n\t\t$emailaddress = $data['emailaddress'];\n\n\t\t$user_name = sanitize_user(sprintf(\"%s %s\", $first_name, $last_name), true);\n\t\t$base_name = $user_name;\n\t\t$i = 0;\n\t\twhile(username_exists( $user_name )) {\n\t\t\t$user_name = $base_name . (++$i);\n\t\t}\n\t\t$password = wp_generate_password();\n\t\t$user_args = [\n\t\t\t'user_login' => $user_name,\n\t\t\t'first_name' => sanitize_text_field( $first_name ),\n\t\t\t'last_name' => sanitize_text_field( $last_name ),\n\t\t\t'nickname' => sanitize_text_field( $user_name ),\n\t\t\t'user_email' => sanitize_text_field( $emailaddress ),\n\t\t\t'user_pass' => $password,\n\t\t];\n\t\t$user_id = wp_insert_user($user_args);\n\t\treturn ['user_id' => $user_id, 'user_name' => $user_name, 'emailaddress' => $emailaddress, 'password' => $password];\n\t}", "public function addUser($username, $password_hash, $first_name, $last_name, $email){\n $color = \"#\".dechex(rand(128,255)) . dechex(rand(128,255)) . dechex(rand(128,255)); //generates a random color for them\n $query = \"INSERT INTO user VALUES (DEFAULT, '$first_name', '$last_name', '$username', '$password_hash', '$email', 0, DEFAULT, DEFAULT, DEFAULT, '$color')\";\n $db = Db::instance();\n $db->execute($query);\n }", "public function add()\n {\n $this->request->allowMethod(['post']);\n\n $user = $this->Users->newEmptyEntity();\n\n if ($this->request->is('post')) {\n $user = $this->Users->patchEntity($user, $this->request->getData());\n\n if (!$this->Users->save($user)) {\n throw new ValidationErrorException($user);\n }\n }\n\n $this->set('data', $user);\n }", "public function addUser(User $user) {\n\t\t\n\t\t$userData = array(\n\t\t\t'email' \t=> $user->getEmail(),\n\t\t\t'login' \t=> $user->getUsername(),\n\t\t\t'password' \t=> $user->getPassword(),\n\t\t\t'salt'\t\t=> $user->getSalt(),\n\t\t\t'role'\t\t=> $user->getRole()\n\t\t);\n\t\tif ($user->getId()) {\n\t\t\t// If the user already exists: upadate it\n\t\t\t$this->getDb()->update('users', $userData, array('id_user' => $user->getId()));\n\t\t}else {\n\t\t\t// Add new user\n\t\t\t$this->getDb()->insert('users', $userData);\n\t\t\t\n\t\t\t// Get id of newly created user and set it \n\t\t\t$id = $this->getDb()->lastInsertId();\n\t\t\t$user->setId($id);\n\t\t}\n\t}", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }" ]
[ "0.86650443", "0.8087462", "0.7969738", "0.7914542", "0.788763", "0.7750234", "0.76779085", "0.7672384", "0.76217324", "0.75666213", "0.75666213", "0.75666213", "0.75666213", "0.7555714", "0.75064635", "0.74990875", "0.74563944", "0.74525595", "0.74431837", "0.74252856", "0.7417708", "0.74153054", "0.7407753", "0.73830545", "0.736295", "0.7326627", "0.72900367", "0.7277497", "0.72756207", "0.7274425", "0.7274424", "0.7272614", "0.7272614", "0.7271266", "0.72528934", "0.7245192", "0.7223443", "0.72168756", "0.72106177", "0.7209364", "0.7209058", "0.7186115", "0.7184856", "0.7160226", "0.71541613", "0.7148868", "0.71461993", "0.71410143", "0.7137779", "0.71315336", "0.71183455", "0.7114446", "0.71043706", "0.70970166", "0.7089995", "0.7087219", "0.7075341", "0.7075332", "0.7073016", "0.7039705", "0.7037041", "0.7015224", "0.7014393", "0.70121574", "0.6998658", "0.6993333", "0.69914794", "0.69860387", "0.6978512", "0.6975594", "0.6970216", "0.6966083", "0.6964799", "0.69575465", "0.6957537", "0.69497305", "0.69497305", "0.69497305", "0.69497305", "0.69497305", "0.69497305", "0.69497305", "0.69497305", "0.69497305", "0.69497305", "0.69497305", "0.69497305", "0.69497305", "0.69497305", "0.69497305", "0.69497305", "0.69497305", "0.69497305", "0.69497305", "0.69497305", "0.69497305", "0.69497305", "0.69497305", "0.69497305", "0.69497305", "0.69497305" ]
0.0
-1
Edit details of an existing user
function actionEditUser($templateVars) { $currentProperty = propertiesGetCurrent(); $currentDivision = divisionsGetCurrent(); $currentDepartment = departmentsGetCurrent(); $currentUser = usersGetCurrent(); if(!empty($_POST) && isset($_POST['editPropertyForm'])) { $validForm = true; $currentUser['firstname'] = $_POST['firstname']; if(empty($currentUser['firstname'])) { $templateVars['userFirstnameError'] = 'Please enter a first name for this user'; $validForm = false; } $currentUser['lastname'] = $_POST['lastname']; if(empty($currentUser['lastname'])) { $templateVars['userLastnameError'] = 'Please enter a last name for this user'; $validForm = false; } $currentUser['email'] = $_POST['emailname']; if(empty($currentUser['email'])) { $templateVars['userEmailError'] = 'Please enter an email for this user'; $validForm = false; } if($validForm == true) { $property['name'] = $newPropertyName; propertiesUpdateRecord($property); redirectToPage('settings/properties/listing'); } } $templateVars['accessLevels'] = accessLevelsGetAll(); $templateVars['currentProperty'] = $currentProperty; $templateVars['currentDivision'] = $currentDivision; $templateVars['currentDepartment'] = $currentDepartment; $templateVars['currentUser'] = $currentUser; return $templateVars; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function user_edit($user_info)\n {\n }", "function edit()\n\t{\n\t\t// Find the logged-in client details\n\t\t$userId = $this->Auth->user('id');\n\t\t$user = $this->User->findById($userId);\n\n\t\t// Save the POSTed data\n\t\tif (!empty($this->data)) {\n\t\t\t$this->data['User']['id'] = $userId;\n\t\t\tif ($this->User->save($this->data)) {\n\t\t\t\t$this->Session->setFlash(__('Profile has been updated', true));\n\t\t\t\t$this->redirect(array('action' => 'index'));\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__('Profile could not be saved. Please, try again.', true));\n\t\t\t}\n\t\t} else {\n\t\t\t// Set the form data (display prefilled data) \n\t\t\t$this->data = $user;\n\t\t}\n\n\t\t// Set the view variable\n\t\t$this->set(compact('user'));\n\t}", "public function editUser(UserEditForm $form, User $user);", "public function actionEdit() {\n\n\t\t$userId = User::checkLogged();\n\t\t$user = User::getUserById($userId);\n\t\t$first_name = $user['first_name'];\n\t\t$last_name = $user['last_name'];\n\t\t$result = false;\n\n\t\tif (isset($_POST['submit'])) {\n\t\t\t$first_name = $_POST['first_name'];\n\t\t\t$last_name = $_POST['last_name'];\n\n\t\t\t$errors = array();\n\n\t\t\tif ($error = Validator::checkName($first_name)) $errors['first_name'] = $error;\n\t\t\tif ($error = Validator::checkName($last_name)) $errors['last_name'] = $error;\n\n\t\t\tif (empty($errors)) {\n\t\t\t\t$result = User::edit($userId, $first_name, $last_name);\n\t\t\t}\n\t\t}\n\t\t$pageTitle = \"Edit Details\";\n\t\trequire_once(ROOT . '/views/account/edit.php');\n\n\t\treturn true;\n\t}", "public function edit() \n\t{\n UserModel::authentication();\n\n //get the user's information \n $user = UserModel::user();\n\n\t\t$this->View->Render('user/edit', ['user' => $user]);\n }", "protected function edit() {\n\t\t// Make sure a user exists.\n\t\tif (empty($this->user)) {\n\t\t\t$_SESSION['title'] = 'Error';\n\t\t\t$_SESSION['data'] = array(\n\t\t\t\t'error' => 'The selected user was invalid.',\n\t\t\t\t'link' => 'management/users'\n\t\t\t);\n\t\t\tredirect(ABSURL . 'error');\n\t\t}\n\n\t\t// Prepare data for contents.\n\t\tnonce_generate();\n\t\t$data = array(\n\t\t\t'user' =>& $this->user\n\t\t);\n\t\t$this->title = 'Edit User: ' . $this->user['username'];\n\t\t$this->content = $this->View->getHtml('content-users-edit', $data, $this->title);\n\t}", "public function edit() {\n $token = $this->require_authentication();\n $user = $token->getUser();\n require \"app/views/user/user_edit.phtml\";\n }", "public function editinformation() \n {\n UserModel::authentication();\n \n //get the session user\n $user = UserModel::user();\n\n UserModel::update_profile();\n }", "public function edit()\n {\n $userId = Helper::getIdFromUrl('user');\n\n Helper::checkUrlIdAgainstLoginId($userId);\n\n View::render('users/edit.view', [\n 'method' => 'POST',\n 'action' => '/user/' . $userId . '/update',\n 'user' => UserModel::load()->get($userId),\n 'roles' => RoleModel::load()->all(),\n ]);\n }", "public function edit($id)\n {\n // show form edit user info\n }", "function edit(){\n if (!empty($this->data)){\n if ($this->User->save($this->data)){\n $this->Session->setFlash(\"Your account has been updated successfully\");\n $this->go_back();\n } \n }else{\n $this->User->id = $this->Session->read(\"Auth.User.id\");\n $this->data = $this->User->read();\n }\n }", "public function edit(User $user)\n {\n \n }", "public function edit(User $user)\n {\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function editUser()\n {\n\n $this->displayAllEmployees();\n $new_data = [];\n $id = readline(\"Unesite broj ispred zaposlenika čije podatke želite izmjeniti: \");\n\n $this->displayOneEmployees( $id);\n\n foreach ( $this->employeeStorage->getEmployeeScheme() as $key => $singleUser) { //input is same as addUser method\n\n $userInput = readline(\"$singleUser : \");\n $validate = $this->validateInput($userInput, $key);\n\n while (!$validate)\n {\n $userInput = readline(\"Unesite ispravan format : \");\n $validate = $this->validateInput($userInput, $key);\n\n }\n if ($key === 'income'){\n $userInput = number_format((float)$userInput, 2, '.', '');\n }\n\n $new_data[$key] = $userInput;\n\n }\n $this->employeeStorage->updateEmployee($id, $new_data); //sends both id and data to updateEmployee so the chosen employee can be updated with new data\n\n echo \"\\033[32m\". \"## Izmjene za \". $new_data['name'].\" \". $new_data['lastname'].\" su upisane! \\n\\n\".\"\\033[0m\";\n\n }", "public function actionEdit()\r\n {\r\n $userId = User::checkLogged();\r\n\r\n $user = User::getUserById($userId);\r\n\r\n // new user info valiables\r\n $name = $user['name'];\r\n $password = $user['password'];\r\n\r\n $result = false;\r\n\r\n // form processing\r\n if (isset($_POST['submit'])) {\r\n $name = $_POST['name'];\r\n $password = $_POST['password'];\r\n\r\n $errors = false;\r\n\r\n // validate fields\r\n if (!User::checkName($name))\r\n $errors[] = 'Имя должно быть длиннее 3-х символов';\r\n\r\n if (!User::checkPassword($password))\r\n $errors[] = 'Пароль должен быть длиннее 5-ти символов';\r\n\r\n // save new data \r\n if ($errors == false)\r\n\r\n $result = User::edit($userId, $name, $password);\r\n }\r\n\r\n // attach specified view\r\n require_once(ROOT . '/app/views/cabinet/edit.php');\r\n return true;\r\n }", "public function p_editProfile() {\n\t$_POST['modified'] = Time::now();\n \n $w = \"WHERE user_id = \".$this->user->user_id;\n\t\t\n\t# Insert\n\tDB::instance(DB_NAME)->update(\"users\", $_POST, $w);\n \n Router::redirect(\"/users/profile\");\n\n }", "public function edit(){\n\t\t\tif(isset($_POST['submit'])){\n\t\t\t\t//MAP DATA\n\t\t\t\t$user = $this->_map_posted_data();\n\t\t\t\t$user->set_user_id($_POST['id']);\n\t\t\t\t$this->userrepository->update($user);\n\t\t\t\theader(\"Location: index.php/admin/index/edit\");\n\t\t\t}else{\n\t\t\t\t$view_page = \"adminusersview/edit\";\n\t\t\t\t$id = $_GET['id'];\n\t\t\t\t$user = $this->userrepository->get_by_id($id);\n\t\t\t\tif(is_null($user)){\n\t\t\t\t\theader(\"Location: index.php/admin/index\");\n\t\t\t\t}\n\t\t\t\tinclude_once(ROOT_PATH.\"admin/views/admin/container.php\");\n\t\t\t}\n\t\t}", "public function edituser(){\n\t\t$id = $this->uri->segment(3);\n\n\t\t$headerData = null;\n\t\t$sidebarData = null;\n\t\t$page = 'admin/edit_londontec_users';\n\t\t$mainData = array(\n\t\t\t'pagetitle' => 'Edit Londontec users',\n\t\t\t'londontec_users' => $this->setting_model->Get_Single('londontec_users','user_id',$id)\n\t\t);\n\t\t$footerData = null;\n\n\t\t$this->template($headerData, $sidebarData, $page, $mainData, $footerData);\n\t}", "public function edit(UserPersonalInfo $userPersonalInfo)\n {\n //\n }", "public function edit()\n\t{\n\t\t$user = $this->User->findById($this->Auth->user('id'));\n\n\t\tif ($this->request->is('post') || $this->request->is('put')) {\n\t\t // we set the id because we are not creating a user, just updating it.\n\t\t $this->User->id = $user['User']['id'];\n\t\t // we also set the current avatar, because if there is a new one,\n\t\t // we have to delete the existing one before. (cf Model/User);\n\t\t $this->User->avatar = $user['User']['avatar'];\n\n\t\t if ($this->User->save($this->request->data)) {\n\t\t return $this->redirect(array('action' => 'profile', 'username' => $user['User']['username']));\n\t\t }\n\t\t}\n\n\t\tif ( ! $this->request->data) {\n\t\t\t// will fill the form in the view (for GET requests)\n\t\t\t$this->request->data = $user;\n\t\t}\n\n\t\t$this->set('user', $user); // view vars\n\t}", "public function getPostEditUser()\n {\n // Render login page if not logged in.\n if (!$this->di->get(\"session\")->has(\"account\")) {\n $this->di->get(\"response\")->redirect(\"user/login\");\n }\n\n $title = \"Edit\";\n $view = $this->di->get(\"view\");\n $pageRender = $this->di->get(\"pageRender\");\n\n $user = new User();\n $username = $this->di->get(\"session\")->get(\"account\");\n $user->setDb($this->di->get(\"db\"));\n $user->find(\"username\", $username);\n\n $form = new EditUserForm($this->di, $user);\n\n $form->check();\n\n $data = [\n \"form\" => $form->getHTML(),\n ];\n\n $view->add(\"user/edit\", $data);\n\n $pageRender->renderPage([\"title\" => $title]);\n }", "public function editAction()\n {\n $identity = Zend_Auth::getInstance()->getIdentity();\n $users = new Users_Model_User_Table();\n $row = $users->getById($identity->id);\n\n $form = new Users_Form_Users_Profile();\n $form->setUser($row);\n\n if ($this->_request->isPost()\n && $form->isValid($this->_getAllParams())) {\n\n $row->setFromArray($form->getValues());\n $row->save();\n\n $row->login(false);\n\n $this->_helper->flashMessenger('Profile Updated');\n $this->_helper->redirector('index');\n }\n $this->view->form = $form;\n }", "public function postEdit()\n {\n // If we are not authentified, redirect to the login page.\n if(Auth::guest()) return Redirect::action('frontend\\UserController@getLogin');\n\n $loggedUser = Auth::user();\n\n $user = API::put('api/v1/user/' . $loggedUser->id, Input::all());\n\n // If the API throws a ValidationException $user will be a JSON string with our errors.\n if(is_string($user)) {\n $errors = json_decode($user, true);\n return Redirect::action('frontend\\UserController@getIndex')\n ->withErrors($errors);\n } else {\n return Redirect::action('frontend\\UserController@getIndex')\n ->with('success', 'Profile edited!');\n }\n }", "public function edit(user $user)\n {\n //\n }", "public function edit(user $user)\n {\n //\n }", "public function p_edit() { if(!$this->user) {\n Router::redirect('/');\n }\n \n $this->user->user_id = DB::instance(DB_NAME)->sanitize($this->user->user_id);\n $q = 'SELECT first_name, last_name, email\n FROM users\n WHERE user_id = \"'.$this->user->user_id.'\"';\n $user = DB::instance(DB_NAME)->select_row($q);\n \n $_POST = DB::instance(DB_NAME)->sanitize($_POST);\n \n $_POST['first_name'] = htmlspecialchars($_POST['first_name'], ENT_QUOTES, 'UTF-8');\n $_POST['last_name'] = htmlspecialchars($_POST['last_name'], ENT_QUOTES, 'UTF-8');\n \n $q = 'SELECT count(*)\n FROM users\n WHERE email = \"'.$_POST['email'].'\"'; \n $count = DB::instance(DB_NAME)->select_rows($q); \n //if the user enters an email which already exists in the data base kick them back\n if(intval($count[0]['count(*)']) >= 1) {\n Router::redirect('/users/edit/error');\n } else {\n \n if($_POST['first_name'] != NULL)\n {\n $user['first_name'] = $_POST['first_name'];\n }\n if($_POST['last_name'] != NULL )\n {\n $user['last_name'] = $_POST['last_name'];\n }\n if($_POST['email'] != NULL )\n {\n $user['email'] = $_POST['email'];\n }\n \n \n \n DB::instance(DB_NAME)->update(\"users\", $user, \"WHERE user_id =\".$this->user->user_id);\n Router::redirect('/users/profile/'.$this->user->user_id);\n }\n \n \n }", "public function edit()\n {\n $userId = Helper::getIdFromUrl('user');\n \n $user = UserModel::load()->get($userId);\n\n return View::render('users/edit.view', [\n 'method' => 'POST',\n 'action' => '/user/' . $userId . '/update',\n 'user' => $user,\n 'roles' => RoleModel::load()->all(),\n ]);\n }", "public function edit($id=0)\n\t{\t\n\t\tvalid_company('users','company_id',$id);\n\t\t$this->action_id = $id;\n\t\t$this->actionType = 'update';\n\t\t$this->viewData['user'] = $this->Users_model->getUserById($this->action_id);\n\t\t$this->viewData['title'] = 'Edit User';\n\t\t$this->add_user();\n\t}", "public function edit($user_id)\n\t{\n\t\t//\n\t}", "public function edit(User $user)\n {\n //\n // $user->email = '[email protected]';\n // $user->save();\n // dd($user);\n }", "public function editAction()\n {\n // Check logged\n $userId = UserModel::checkLogged();\n \n //We get user data\n $user = UserModel::getUserById($userId);\n \n \n $name = $user['name'];\n \n \n $result = false;\n \n // Form processing\n if (isset($_POST['submit'])) {\n \n // Getting data from the form\n $name = $_POST['name'];\n $password = $_POST['password'];\n \n \n // Form error flag\n $errors = false;\n \n // If necessary, you can validate the values as needed\n if (!UserModel::checkName($name)) {\n $errors[] = 'The name must not be shorter than 2 characters';\n }\n \n if (!UserModel::checkPassword($password)) {\n $errors[] = 'Password must not be shorter than 6 characters';\n }\n \n if ($errors == false) {\n $result = UserModel::edit($userId, $name, $password);\n }\n }\n \n // Connect the view\n $this->view('header.tpl');\n $this->view('view.tpl', ['user' => $user,\n 'result' => $result]\n );\n $this->view('footer.tpl');\n \n return true;\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\n {\n $id = $this->Auth->user('id');\n $user = $this->User->findByImpiId($id);\n\n if (empty($user)) {\n throw new NotFoundException(__('Invalid user'));\n }\n if ($this->request->is('post') || $this->request->is('put')) {\n if ($this->User->save($this->request->data)) {\n $this->Session->setFlash(__('The user has been saved'));\n $this->redirect(array('action' => 'index'));\n } else {\n $this->Session->setFlash(__('The user could not be saved. Please, try again.'));\n }\n } else {\n $this->request->data = $user;\n\n }\n $utilityFunctions = $this->User->UtilityFunction->find('list');\n $this->set(compact('utilityFunctions'));\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n\n $loggedUser = $this\n ->getEntityManager()\n ->getRepository('Core\\Entity\\User')\n ->find( $this->getIdentity()->getId() );\n\n $editedUser = $this\n ->getEntityManager()\n ->getRepository('Core\\Entity\\User')\n ->find( $id );\n\n $form = $this->createForm('\\Panel\\Form\\User\\User', array(\n 'loggedUserRole' => $loggedUser->getRole(),\n 'editedUserRole' => $editedUser->getRole(),\n ));\n\n if($id)\n {\n $form = $form->bindObjectById($id);\n }\n\n $request = $this->getRequest();\n if ($request->isPost())\n {\n $data = array(\n 'name' => $request->getPost()->name,\n 'email' => $request->getPost()->email,\n 'phone' => $request->getPost()->phone,\n 'birthDate' => $request->getPost()->birthDate,\n 'height' => $request->getPost()->height,\n 'tmrModifier' => $request->getPost()->tmrModifier,\n 'goalWeight' => $request->getPost()->goalWeight,\n 'personality' => $request->getPost()->personality,\n 'activityLevel' => $request->getPost()->activityLevel,\n 'isFemale' => $request->getPost()->isFemale,\n 'status' => $request->getPost()->status,\n 'role' => $request->getPost()->role,\n );\n\n if($request->getPost()->password!='')\n {\n $data['password'] = $request->getPost()->password;\n }\n\n $form->setData($data);\n\n if ($form->isValid())\n {\n $entityManager = $this->getEntityManager();\n\n $user = $form->getObject();\n\n if($request->getPost()->password!='')\n {\n $user->setPassword($request->getPost()->password);\n }\n\n $userFromEmail = $entityManager\n ->getRepository('Core\\Entity\\User')\n ->findOneBy(array('email' => $user->getEmail()));\n\n if($userFromEmail==null || $userFromEmail->getId()==$user->getId())\n {\n $entityManager->persist($user);\n $entityManager->flush();\n\n $this->flashMessenger()->addSuccessMessage(\n $this->getServiceLocator()->get('translator')\n ->translate(\"User has been modified.\")\n );\n\n if( $id)\n {\n return $this->redirect()->toRoute(\n 'panel/user/:id', array('id' => $id)\n );\n }\n else\n {\n return $this->redirect()->toRoute('panel/user');\n }\n }\n else\n {\n $form->setData($request->getPost());\n\n $this->flashMessenger()->addErrorMessage(\n $this->getServiceLocator()->get('translator')\n ->translate(\"User hasn't been modified. E-mail already exists.\")\n );\n }\n }\n }\n\n $view = new ViewModel();\n $view->setVariable('user', $form->getObject());\n $view->setVariable('form', $form);\n\n return $view;\n }", "public function actioneditProfile()\n\t{\t\n\t\t$data = array();\n\t\t$data['city'] = $_POST['city'];\n\t\t\n\t\t\n\t\t$userObj = new Users();\n\t\t$userObj->setData($data);\n\t\t$userObj->insertData($_POST['userId']);\n\t\tYii::app()->user->setFlash('success',\"Successfully updated\");\n\t\t$this->redirect('admin/users');\n\t\t//Yii::app()->user->setFlash('error',\"Please update your profile\");\n\t\t//$this->render('userProfile',$profileData);\n\t\n\t}", "public function user_info_edit($id) {\n if ($this->request->is('post')) {\n $data = $this->request->data;\n $id = $data['id'];\n $update = $this->User->updateUser($id, $data);\n\n $this->redirect(array(\n 'action' => 'user_dashboard?msg=succesmsg',\n ));\n }\n }", "public function edit($id)\n {\n //\n echo \"updating user\";\n die;\n }", "public function edit()\n {\n $user = Auth::user();\n // dd($user);\n return view('user.update', compact('user'));\n }", "public function edit()\n {\n $user = User::findOne(Yii::$app->user->id);\n $user->username = $this->username;\n $user->email = $this->email;\n try {\n $user->save();\n return true;\n } catch(IntegrityException $e) {\n return false;\n }\n }", "public function edit($user_id=null) {\n //getting the active companies \n $company_name = CompanyInformation::where('status',1)->pluck('company_name','company_id');\n \t$users = User::where('user_id',$user_id)->first();\n \t$user_details = UserDetails::where('user_id',$user_id)->first();\n \treturn view('admin.user.create',['users'=>$users,'user_details'=>$user_details,'company_name'=>$company_name]);\n }", "public function edit(User $User)\n {\n //\n }", "public function edit(User $User)\n {\n //\n }", "public function edit($username)\n {\n //\n }", "function edit($id_user)\n {\n // check if the user exists before trying to edit it\n $data['user'] = $this->User_model->get_user($id_user);\n\n if (isset($data['user']['id_user'])) {\n if (isset($_POST) && count($_POST) > 0) {\n $params = array(\n 'password' => md5($this->input->post('password')),\n 'nama' => $this->input->post('nama'),\n 'foto' => $this->input->post('foto'),\n 'username' => $this->input->post('username'),\n 'level' => $this->input->post('level'),\n 'foto' => $this->_uploadImage()\n );\n\n $this->User_model->update_user($id_user, $params);\n redirect('user/index');\n } else {\n $data['_view'] = 'user/edit';\n if ($this->session->userdata(\"level\") == 'admin') {\n $this->load->view('layouts/main', $data);\n } else {\n $this->load->view('layouts/main_user', $data);\n }\n }\n } else\n show_error('The user you are trying to edit does not exist.');\n }", "public function edit($id)\n {\n $user = User::find($id); //BUAT QUERY UTK PENGAMBILAN DATA\n //LALU ASSIGN KE DALAM MASING-MASING PROPERTI DATANYA\n $this->idz = $user->id;\n $this->name = $user->name;\n $this->username = $user->username;\n $this->email = $user->email;\n $this->password = $user->password;\n\n $this->openUser(); //LALU BUKA User\n }", "public function editUser($userID){\n $this->path = \"users/$userID\";\n return $this->put();\n }", "public function edit() {\r\n \tif (isset($_SESSION['userid'])) {\n \t $user=$this->model->getuser($_SESSION['userid']);\n \t $this->view->set('user', $user[0]);\n \t $this->view->edit();\r\n \t} else {\r\n \t $this->redirect('?v=index&a=show');\r\n \t}\r\n }", "function get_user_to_edit($user_id)\n {\n }", "public function edit(){\r\n\t\t$id = $this->uri->segment(2);\r\n\r\n\t\t$data = $this->admin_users_model->get_by(array('id'=>$id)); \r\n\t\tif($data){ \r\n\t\t\tforeach($data as $row){\r\n\t\t\t $data['id'] = $row->id;\r\n\t\t\t\t$data['name'] = $row->name;\t\r\n\t\t\t $data['userName'] = $row->LoginName;\r\n\t\t\t\t$data['email'] = $row->UserEmail;\r\n\t\t\t\t$data['mobile'] = $row->UserMobile;\r\n\t\t\t\t$data['avatar'] = $row->UserAvatar;\r\n\t\t\t $data['yahoo'] = $row->yahoo;\r\n\t\t\t\t$data['twitter'] = $row->twitter;\r\n\t\t\t\t$data['facebook'] = $row->facebook;\r\n\t\t\t\t$data['instagram'] = $row->instagram;\t\r\n\t\t\t\t$data['about'] = $row->about;\t\t\t\r\n\t\t\t\t}\r\n\t\t\t$this->out('adminUser','editUser',$data);\t\r\n\t\t\t} else{\r\n\t\t\t\tredirect('admin-users-list');\r\n\t\t\t\t}\r\n\t\t}", "public function edit($user_id)\n\t{\n\t\t$stmt = self::$_connection->prepare(\"UPDATE user_profile SET first_name = :first_name, last_name = :last_name, email=:email, country = :country, city = :city, street_address = :street_address, postal_code = :postal_code WHERE user_id = :user_id\");\n\t\t$stmt->execute(['first_name'=>$this->first_name, 'last_name'=>$this->last_name, 'email'=>$this->email, 'country'=>$this->country, 'city'=>$this->city, 'street_address'=>$this->street_address, 'postal_code'=>$this->postal_code, 'user_id'=>$user_id]);\n\t}", "public function testUpdateUser()\n {\n }", "public function edit()\n {\n $id = Auth::user()->id;\n \t$data = User::where('id',$id)->first();\n return view('admin.update-profile',compact('data'));\n }", "public function edit($id) {\n $data = User::find($id);\n if (!empty($data)) {\n $this->title = \"Edit user\";\n $arr = array('controller' => $this->controller, 'action' => $this->action, 'title' => $this->title, 'data' => $data);\n return view('user.add', $arr);\n } else {\n pagenotfound();\n }\n }", "public function edit(){\r\n\t\t//$this->auth->set_access('edit');\r\n\t\t//$this->auth->validate();\r\n\r\n\t\t//call save method\r\n\t\t$this->save();\r\n\t}", "public function edit()\n {\n //$user =User::find($id);\n $user =\\Auth::user();\n return view('users.edit',[\n 'title' =>'プロフィール編集',\n 'user'=>$user,\n ]);\n }", "public function edit()\n {\n $id = Auth::user()->id;\n $user = User::find($id);\n return view('user.edit', compact('user'));\n }", "public function edit($id)\n {\n $user = User::findOrFail( $id );\n $user->role = $user->roles[0]->id;\n $user->role_name = $user->roles[0]->role_name;\n \n $form[ 'formUrl' ] = url('users').'/'. $user->id;\n $form[ 'formMethod' ] = 'post';\n $form[ 'blank' ] = 'blank';\n $formFields = User::getFormData( );\n $formFields[\"_method\"] = [\n 'type' => 'hidden',\n 'value' => \"PUT\"\n ];\n $form[ 'content' ] = view('layouts.templates.forms.form_fields', [ 'formFields' => $formFields , 'data'=> $user ] );\n $form = view('layouts.templates.forms.form', $form );\n \n $this->data[ 'contents' ] = $form ;\n \n $this->data[ 'message_alert' ] = Session::get('message');\n $this->data[ 'page_title' ] = 'User management';\n $this->data[ 'header' ] = 'edit '.$user->name;\n $this->data[ 'sub_header' ] = '';\n return $this->render( );\n }", "public function edit()\n {\n return view(config('const.template.user.edit'), ['user' => User::find($this->guard()->id())]);\n }" ]
[ "0.79039866", "0.7870004", "0.78649145", "0.78646636", "0.7843102", "0.78171915", "0.7789055", "0.7749386", "0.77455825", "0.7713012", "0.768158", "0.7653916", "0.76265407", "0.7615163", "0.7615163", "0.7615163", "0.7615163", "0.7615163", "0.7615163", "0.7615163", "0.7615163", "0.7615163", "0.7615163", "0.7615163", "0.7615163", "0.7615163", "0.7615163", "0.7615163", "0.7615163", "0.7615163", "0.7615163", "0.7615163", "0.7615163", "0.7615163", "0.7615163", "0.7615163", "0.7615163", "0.7615163", "0.7615163", "0.7615163", "0.7615163", "0.7615163", "0.7615163", "0.7615163", "0.7615163", "0.7615163", "0.7615163", "0.7615163", "0.7615163", "0.7615163", "0.7615163", "0.7615163", "0.7615163", "0.7615163", "0.7615163", "0.7615163", "0.75781083", "0.7567494", "0.7537623", "0.7510765", "0.7503097", "0.74936646", "0.7481606", "0.7474324", "0.74594325", "0.7459048", "0.743007", "0.743007", "0.7422445", "0.7417386", "0.7412194", "0.7383942", "0.7379892", "0.7375583", "0.73680365", "0.7354416", "0.73538685", "0.733386", "0.73320144", "0.7323", "0.7312955", "0.7307286", "0.7306528", "0.7304944", "0.7304944", "0.72964245", "0.72918326", "0.72894263", "0.7283916", "0.724951", "0.724604", "0.72434247", "0.7241889", "0.7238607", "0.7227114", "0.72240984", "0.7217027", "0.7216226", "0.72065544", "0.7205217", "0.7193898" ]
0.0
-1
Soft delete an existing user
function actionDeleteUser($templateVars) { $currentUser = usersGetCurrent(); $currentUser['accessLevelDescription'] = accessLevelsGetDescription($currentUser['accesslevels_id']); $templateVars['currentUser'] = $currentUser; $currentProperty = propertiesGetCurrent(); $templateVars['currentProperty'] = $currentProperty; $currentDivision = divisionsGetCurrent(); if($currentDivision == false) $templateVars['currentDivision'] = false; else $templateVars['currentDivision'] = $currentDivision; $currentDepartment = departmentsGetCurrent(); if($currentDepartment == false) $templateVars['currentDepartment'] = false; else $templateVars['currentDepartment'] = $currentDepartment; if($currentUser['id'] == sessionGetVar('loggedIn')) $templateVars['formError'] = 'Cannot delete the currently logged in user.'; else { if(!empty($_POST) && isset($_POST['deleteUserForm'])) { usersSoftDelete($currentUser['id']); redirectToPage('settings/users/view'); } } return $templateVars; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteUser()\n {\n $this->delete();\n }", "public function softdelete()\n {\n\n $user = User::findOrFail(request()->id);\n\n $user->first_name = NULL;\n $user->middle_name = NULL;\n $user->last_name = NULL;\n $user->email = NULL;\n $user->address = NULL;\n $user->postal = NULL;\n $user->city = NULL;\n $user->phone = NULL;\n\n $user->save();\n $user->delete();\n // Session::flash('success', 'Gebruiker verwijderd');\n return redirect('/users');\n\n }", "public function delete_user($user);", "public function delete() {\n\t\t$query = \"DELETE FROM Users WHERE userId = :id\";\n\t\t$query_params = array(':id' => $this->userData['userId']);\n\t\texecuteSQL($query, $query_params);\n\t}", "public function delete(): void\n {\n $id = $this->id;\n $this->fetch(\n 'DELETE FROM user WHERE id = ?;',\n [$id]\n );\n }", "public function userDeleted();", "public function delete() {\n\t\t$db = Database::getInstance();\n\t\t$stmt = $db->prepare(\"UPDATE users SET state='DELETED' WHERE id = ?\");\n\t\t$stmt->execute(array($this->id));\n\t}", "public function delete()\n { if (is_null($this->id))\n 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_USER, DB_PASS);\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 \n $conn = null;\n }", "public function forceDeleted(User $user)\n {\n\n }", "public function userDeleted()\n\t{\n\t\tself::authenticate();\n\n\t\t$userId = FormUtil::getPassedValue('user', null, 'GETPOST');\n\t\tif(!is_string($userId)) {\n\t\t\treturn self::ret(false);\n\t\t}\n\n\t\t$user = $this->entityManager->getRepository('Owncloud_Entity_DeleteUser')->findOneBy(array('uname' => $userId));\n\t\tif(!($user instanceof Owncloud_Entity_DeleteUser)) {\n\t\t\treturn self::ret(false);\n\t\t}\n\t\t$this->entityManager->remove($user);\n\t\t$this->entityManager->flush();\n\n\t\treturn self::ret(true);\n\t}", "public function delete($user)\n {\n $user->deleteProfilePhoto();\n $user->tokens->each->delete();\n\n // $user->delete(); csak logikai törlés a megngedett\n $user->update([\"name\" => \"deleted\".$user->id,\n \"email\" => \"deleted\".$user->id.\"@deleted.com\",\n \"password\" => \"psw\".rand(100000,999999)]);\n\n \\DB::table('members')\n ->where('user_id','=',$user->id)\n ->delete();\n\n }", "public function deleteUser()\n {\t\t\n\t\t$user = $this->checkToken();\n\t\tif ($user) {\t\n\t\t\t$userModel = UserModel::find($user->id);\n\t\t\t$userModel->destroy();\n\t\t\t$this->expireToken($userModel);\n\t\t\treturn $this->sendResponse('Your account has been deleted');\n\t\t}\n\t\treturn $this->sendResponse('You are not authorised to delete this account');\n }", "Public Function PermanentDelete()\n\t{\n\t\t$this->_db->delete('bevomedia_user', 'ID = ' . $this->id);\n\t\t$this->_db->delete('bevomedia_user_info', 'ID = ' . $this->id);\n\t}", "public function deleteUser($userId);", "public function forceDeleted(User $user)\n {\n //\n }", "public function forceDeleted(User $user)\n {\n //\n }", "public function forceDeleted(User $user)\n {\n //\n }", "public function forceDeleted(User $user)\n {\n //\n }", "public function forceDeleted(User $user)\n {\n //\n }", "public function forceDeleted(User $user)\n {\n //\n }", "public function forceDeleted(User $user)\n {\n //\n }", "public function forceDeleted(User $user)\n {\n //\n }", "public function forceDeleted(User $user)\n {\n //\n }", "public function forceDeleted(User $user)\n {\n //\n }", "public function forceDeleted(User $user)\n {\n //\n }", "public function forceDeleted(User $user)\n {\n //\n }", "public function forceDeleted(User $user)\n {\n //\n }", "public function forceDeleted(User $user)\n {\n //\n }", "public function destroy($id)\n {\n // delete user\n }", "public function delete_delete()\n {\n $response = $this->UserM->delete_user(\n $this->delete('id')\n );\n $this->response($response);\n }", "public function delete($user){\n }", "public function delete($user)\n {\n\n }", "public function deleting(User $user)\n {\n //\n }", "public function deleting(User $user)\n {\n //\n }", "public function deleting(User $user)\n {\n //\n }", "public function destroy()\n {\n $userId = Helper::getIdFromUrl('user');\n \n if ((Helper::checkUrlIdAgainstLoginId($userId)) !== 'super-admin') {\n Usermodel::load()->destroy($userId);\n } else { \n View::render('errors/403.view', [\n 'message' => 'You cannot delete yourself!',\n ]);\n }\n }", "public function delete(User $user)\n {\n //\n }", "public function deleteUserById($user_id){\n $this->dao->deleteUserByid($user_id);\n }", "public function delete() {\n try {\n $db = Database::getInstance();\n $sql = \"DELETE FROM `User` WHERE username = :username\";\n $stmt = $db->prepare($sql);\n $stmt->execute([\"username\" => $this->username]);\n } catch (PDOException $e) {\n exitError(500, \"Internal error.\");\n }\n }", "public function forceDelete(User $user, User $user1)\n {\n //\n }", "public function deleteAction(){\n \n $req=$this->getRequest();\n $user=Doctrine::getTable('Users')->find($req->getParam('id')); \n\n // Gli utenti developer non possono essere eliminati \n if ($user->Role->developer){\n $this->errors->addError(\"L'utente Developer non pu&ograve; essere cancellato.\");\n $this->emitSaveData();\n return;\n }\n \n $q=Doctrine_Query::create()\n ->delete()\n ->from('Users')\n ->addWhere('ID = ?',$this->getRequest()->getParam('id'))\n ->execute();\n \n $this->emitJson(array(\"success\"=>true));\n }", "public function deleting(User $user)\n {\n if($user->isForceDeleting()) \n {\n $this->forceDeleting($user);\n }\n }", "public function deleteUserToken($user)\n {\n $user->token = NULL;\n $user->update();\n }", "function deleteuser(){\n\n\t\t$id = $this->input->post('id');\n\n\t\t$this->setting_model->delete('londontec_users','user_id',$id);\n\t\n\t}", "function delete_user()\n {\n\n //return true if successful\n }", "public function deleteUser(request $request){\n \n $afi = User::find($request->id);\n $afi->delete();\n \n }", "public function deleted(User $user)\n {\n //\n }", "public function deleted(User $user)\n {\n //\n }", "public function deleted(User $user)\n {\n //\n }", "public function deleted(User $user)\n {\n //\n }", "public function deleted(User $user)\n {\n //\n }", "public function deleted(User $user)\n {\n //\n }", "public function deleted(User $user)\n {\n //\n }", "public function deleted(User $user)\n {\n //\n }", "public function deleted(User $user)\n {\n //\n }", "public function deleted(User $user)\n {\n //\n }", "public function deleted(User $user)\n {\n //\n }", "public function deleted(User $user)\n {\n //\n }", "public function deleted(User $user)\n {\n //\n }", "public function delete()\n {\n\n $update['id'] = $this->session->userdata('user_id');\n $update['data']['enabled'] = 0;\n $update['data']['active'] = 0;\n $update['table'] = 'users';\n $this->Application_model->update($update);\n\n redirect('/logout','refresh');\n\n }", "public function Delete(){\n $query = \"DELETE FROM user where id=\".$this->id;\n\n $result = $this->dbh->exec($query);\n if ($result) {\n Message::setMessage(\"<div class='yes'>Removed Permanently</div>\");\n } else {\n\n Message::setMessage(\"<div class='no'>Failed to Remove</div>\");\n }\n Utility::redirect(\"volunteers.php\");\n }", "function delete() {\n db_begin_work();\n $delete = parent::delete();\n if($delete && !is_error($delete)) {\n unlink($this->getAvatarPath());\n \tunlink($this->getAvatarPath(true));\n\n ProjectUsers::deleteByUser($this);\n Assignments::deleteByUser($this);\n Subscriptions::deleteByUser($this);\n StarredObjects::deleteByUser($this);\n PinnedProjects::deleteByUser($this);\n UserConfigOptions::deleteByUser($this);\n Reminders::deleteByUser($this);\n\n search_index_remove($this->getId(), 'User');\n\n $cleanup = array();\n event_trigger('on_user_cleanup', array(&$cleanup));\n\n if(is_foreachable($cleanup)) {\n foreach($cleanup as $table_name => $fields) {\n foreach($fields as $field) {\n $condition = '';\n if(is_array($field)) {\n $id_field = array_var($field, 'id');\n $name_field = array_var($field, 'name');\n $email_field = array_var($field, 'email');\n $condition = array_var($field, 'condition');\n } else {\n $id_field = $field . '_id';\n $name_field = $field . '_name';\n $email_field = $field . '_email';\n } // if\n\n if($condition) {\n db_execute('UPDATE ' . TABLE_PREFIX . \"$table_name SET $id_field = 0, $name_field = ?, $email_field = ? WHERE $id_field = ? AND $condition\", $this->getName(), $this->getEmail(), $this->getId());\n } else {\n db_execute('UPDATE ' . TABLE_PREFIX . \"$table_name SET $id_field = 0, $name_field = ?, $email_field = ? WHERE $id_field = ?\", $this->getName(), $this->getEmail(), $this->getId());\n } // if\n } // foreach\n } // foreach\n } // if\n\n db_commit();\n return true;\n } else {\n db_rollback();\n return $delete;\n } // if\n }", "public function deleted(User $user)\n {\n $user->softDeleteUserRelationships();\n }", "function deleteUser(){\n\t\t\tif($this->rest->getRequestMethod() != \"DELETE\"){\n\t\t\t\t$this->rest->response('',406);\n\t\t\t}\n\t\t\t//Validate the user\n\t\t\t$validUser = $this->validateUser(\"admin\", \"basic\");\n\t\t\tif ($validUser) {\n\t\t\t\tif (isset($_POST['_id'])){\n\t\t\t\t\t$where = \"_id='\".$_POST['_id'].\"'\";\n\t\t\t\t\t$delete = $this->model->getUser('*',$where);\n\t\t\t\t\t$result = $this->model->deleteUser($where);\n\t\t\t\t\tif($result) {\n\t\t\t\t\t\t$response_array['status']='success';\n\t\t\t\t\t\t$response_array['message']='One record deleted.';\n\t\t\t\t\t\t$response_array['data']=$delete;\n\t\t\t\t\t\t$this->rest->response($response_array, 200);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$response_array['status']='fail';\n\t\t\t\t\t\t$response_array['message']='The record does not exist';\n\t\t\t\t\t\t$data['user_id'] = $_POST['_id'];\n\t\t\t\t\t\t$response_array['data']=$data;\n\t\t\t\t\t\t$this->rest->response($response_array, 404);\n\t\t\t\t\t}\n\n\t\t\t\t}else{\n\t\t\t\t\t$this->rest->response('No parameters given',204);\t// If no records \"No Content\" status\n\t\t\t\t}\n\n\t\t\t}else{\n\t\t\t\t$this->rest->response('Unauthorized Access ',401);\n\t\t\t}\n\t\t\t\n\t\t}", "public function delete(){\t\t\tif( 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 );\r\n\t\t\t\r\n\t\t\t//Delete the object\r\n\t\t\t$conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\r\n\t\t\t$st = $conn->prepare ( \"DELETE FROM \".TABLENAME_GROUPS.\" WHERE id = :id LIMIT 1\" );\r\n\t\t\t$st->bindValue( \":id\", $this->id, PDO::PARAM_INT );\r\n\t\t\t$st->execute();\r\n\t\t\t$conn = null;\t\t\r\n\t\t}", "public function delete(){\n\t\t$this->_getDAO(false);\n\t\treturn $this->dao->delete($this->user->getID(), $this->ident);\n\t}", "function deleteUser()\n {\n $validateF = new ValidateFunctions();\n if ($_SESSION['id'] == $_GET['']) {\n logUserOut();\n }\n $id = $validateF->sanitize($_GET['id']);\n $userRp = new UserRepository();;\n $hasUser = $userRp->getOneFromDB($id);\n if ($hasUser != 0) {\n $this->deleteUserImage($id);\n $this->removeUser($id);\n $_SESSION['success'] = ['User deleted successfully'];\n } else {\n $_SESSION['error'] = ['No user found.'];\n }\n header('Location:index.php?action=adminUsers');\n }", "public function forceDelete(User $user, InterventionRequest $interventionRequest)\n {\n //\n }", "public function delete($id) {\n\t\t// Delete the user\n\t\t$this->getDb()->delete('t_user', array('idUser' => $id));\n\t}", "public function deleted(User $user)\n {\n debug('User deleted');\n }", "public function destroy($id)\n {\n User::find($id)->delete();\n return true;\n}", "public function delete()\n {\n foreach ($this->users as $user) {\n $uid = $user->id;\n // delete whole website info for this user\n if ((bool)$this->delete) {\n $model = new FormUserClear($user);\n $model->comments = true;\n $model->content = true;\n $model->feedback = true;\n $model->wall = true;\n $model->make();\n }\n\n // delete avatars\n File::remove('/upload/user/avatar/big/' . $uid . '.jpg');\n File::remove('/upload/user/avatar/medium/' . $uid . '.jpg');\n File::remove('/upload/user/avatar/small/' . $uid . '.jpg');\n File::remove('/upload/user/avatar/original/' . $uid . '.jpg');\n // delete user profile and auth data\n $user->profile()->delete();\n // delete user provider data\n $user->provider()->delete();\n // delete user object\n $user->delete();\n }\n }", "public function delete( UserEntityInterface $user ): bool;", "function delete_user($user_id = 0)\n\t{\n\t\t//delete user\n\t\t$this->db->where('user_id', $user_id);\n\t\t$this->db->delete('ci_users');\n\t}", "public function deletforeverUser($id)\n {\n $deletforeverUser =User::onlyTrashed()->find($id);\n $deletforeverUser->forceDelete();\n return redirect()->back();\n\n\n }", "public function delete(){\n $this->update(['deleted_by', Auth::user()->id]);\n return parent::delete();\n }", "public function deleting(User $user)\n {\n\n $user->user_eraser_id = \\Auth::id();\n $user->timestamps = false;\n $user->save();\n }", "function wp_delete_signup_on_user_delete($id, $reassign, $user)\n {\n }", "public function forceDelete();", "public function delete() {\n $this->isdeleted = 1;\n $this->deleteduser = \\Yii::$app->user->getId();\n $this->deletedtime = date(\"Y-m-d H:i:s\");\n \n return parent::update(FALSE, ['isdeleted', 'deletedtime', 'deleteduser']);\n }", "function delete(){\n $user_id = $this->uri->rsegment('3');\n $this->_del($user_id);\n redirect(admin_url('user'));\n\n }", "public function forceDelete(User $user, Flashcard $flashcard)\n {\n //\n }", "public function deleteIdentity ()\n\t{\n\t\tif ($this->session->has('user')) {\n\n\t\t\t$this->session->remove('user');\n\t\t}\n\n\t}", "public function permanentlyDeleteById(int $UserId): bool;", "private function hardDeleteUser($id){\n\t\t$query = Queries::removesalt($id);\n\t\t$this->query($query,true);\n\t\t$query = Queries::harddeleteuser($id);\n\t\treturn $this->query($query);\n\t}", "public function forceDelete(User $user, TweetTag $tweetTag)\n {\n //\n }", "public function testCannotDeleteAnotherUser()\n {\n $user = factory(User::class)->create();\n $user->activate();\n $user2 = factory(User::class)->create();\n $user2->activate();\n Auth::login($user2);\n \n $this->delete('/api/v1/user/'.$user->id, ['HTTP_X-Requested-With' => 'XMLHttpRequest'])\n ->assertStatus(403);\n $this->assertDatabaseHas('users', [\n 'name' => $user->name,\n 'email' => $user->email,\n 'activated' => true\n ]);\n }", "public function deleteUser()\n {\n \n $headers = getallheaders();\n $token = $headers['Authorization'];\n $key = $this->key;\n $userData = JWT::decode($token, $key, array('HS256'));\n $id_user = Users::where('email', $userData->email)->first()->id;\n $id_users = $_POST['idUser'];\n $id = $id_users;\n\n $user = Users::find($id);\n\n $rolUser = Users::where('email', $userData->email)->first();\n \n\n if ($rolUser->rol_id == 1){\n\n $user_name = Users::where('id', $id_users)->first()->name;\n Users::destroy($id);\n\n return $this->success('Acabas de borrar a', $user_name);\n\n }else{\n return $this->error(403, 'No tienes permisos');\n }\n \n\n if (is_null($user)) \n {\n return $this->error(400, 'El lugar no existe');\n }\n // }else{\n\n // $user_name = Users::where('id', $id_users)->first()->name;\n // Users::destroy($id);\n\n // return $this->success('Carlos he borrado el usuario', $user_name);\n // }\n }", "public function delete() {\n $stmt = $this->pro->prepare('delete from user where id = :id');\n $stmt->bindValue(':id', $this->id);\n return $stmt->execute() == 1;\n }", "private function deleteUser()\r\n {\r\n if (isset($_GET['id'])) {\r\n\r\n $id_user = $_GET['id'];\r\n UserDAO::deleteUser($id_user);\r\n $_SESSION['deleteUser'] = '';\r\n header('Location:' . BASE_URL . \"users\");\r\n exit();\r\n }\r\n }", "public function delete(){\n\t\t$kiwi_class = Model_Kiwi::get_classname( get_class($this) ); //returns User for Model_User\n\t\t$pcol = $this->kiwi_primary_key();\n\t\t$pk = $this->$pcol;\n\t\t$mc_key = static::kiwi_mc_key($kiwi_class, $pk);\n\t\tif (empty($pk))\n\t\tthrow new ActiveRecordException(\"Cannot delete, no primary key defined for: \" . $kiwi_class);\n\t\t//FIRST delete the key from memcache\n\t\tstatic::delete_from_memcache($mc_key, $kiwi_class);\n\t\t$return_status = false;\n\t\t//DO NOT DELETE - just soft delete\n\t\tif( Kohana::$config->load('gameconfig.mysql_hard_delete_disabled') &&\n\t\t\t\tin_array( Model_Kiwi::get_table_name($kiwi_class), ActiveRecord\\Model::$soft_delete_enabled_tables)\t){\n\t\t\tKohana::$log->add(Log::DEBUG, \"Mysql Deletes are disabled - using soft delete\");\n\t\t\t$return_status = $this->update_attribute(ActiveRecord\\Model::$soft_deleted_column, 1);\n\t\t}else{\n\t\t\t$return_status = static::table()->delete(array($pcol => $pk));\n\t\t}\n\t\treturn $return_status ;\n\t}", "public function delete($id) {\n // Delete the user\n $this->getDb()->delete('user', array('user_email' => $id));\n }", "public function delete(){\n\t\t\t$id = $_GET['id'];\n\t\t\t$result = $this->userrepository->delete($id);\n\t\t\tif($result = true){\n\t\t\t\theader(\"Location: index.php/admin/index/delete\");\n\t\t\t}\n\t\t}", "protected function deleteUser()\n {\n $userId = $this->request->variable('user_id',0);\n\n if($userId === 0)\n {\n $this->sendResponse([\n 'status' => 'failed',\n 'message' => 'Invalid data supplied',\n 'error' => ['User ID was not supplied']\n ]);\n }\n\n // Determine if this user is an administrator\n $arrUserData = $this->auth->obtain_user_data($userId);\n $this->auth->acl($arrUserData);\n $isAdmin = $this->auth->acl_get('a_');\n\n if($isAdmin)\n {\n $this->sendResponse([\n 'status' => 'failed',\n 'message' => 'User was not deleted because they are an admin',\n 'error' => ['phpBB admin accounts cannot be automatically deleted. Please delete via ACP.']\n ]);\n }\n\n user_delete('remove', $userId);\n\n // Send success response\n $this->sendResponse([\n 'status' => 'success',\n 'message' => 'phpBB user was deleted',\n 'data' => [\n 'user_id' => $userId\n ]\n ]);\n }", "function deleteUser($username)\r\n {\r\n $this->querySimpleExecute('delete from t_user where useUsername = ' . $username);\r\n }", "public function forceDelete(User $user, Pensamiento $pensamiento)\n {\n //\n }", "public function delete()\n\t{\n\t\t$this->hard_delete();\n\t}", "public function destroy($id)\n {\n $user = User::withTrashed()->where('id', $id)->firstOrFail();\n\n if($user) {\n\n if($user->trashed()) {\n\n $user->forceDelete();\n\n } else {\n $user->delete();\n }\n } \n return redirect(route('home'));\n }", "public function deleteAction() {\n $uid = $this->getInput('uid');\n $info = Admin_Service_User::getUser($uid);\n if ($info && $info['groupid'] == 0) $this->output(-1, '此用户无法删除');\n if ($uid < 1) $this->output(-1, '参数错误');\n $result = Admin_Service_User::deleteUser($uid);\n if (!$result) $this->output(-1, '操作失败');\n $this->output(0, '操作成功');\n }", "public function destroy(){\n $query = 'delete from Usuario where\n user_id = \"'.$this->getUser_id().'\"';\n $this->driver->exec($query);\n }", "public function deleteUser($id)\n {\n $user = User::find($id);\n $user->delete();\n }" ]
[ "0.78779006", "0.78747535", "0.72980356", "0.72886956", "0.717335", "0.7161724", "0.7156462", "0.71501535", "0.71449876", "0.7041127", "0.7030999", "0.7013233", "0.70014244", "0.697262", "0.69690937", "0.69690937", "0.69690937", "0.69690937", "0.69690937", "0.69690937", "0.69690937", "0.69690937", "0.69690937", "0.69690937", "0.69690937", "0.69690937", "0.69690937", "0.69690937", "0.69456905", "0.692556", "0.69178516", "0.6885844", "0.688352", "0.688352", "0.688352", "0.6873126", "0.6840459", "0.6822128", "0.6799388", "0.6785961", "0.6757939", "0.67548776", "0.67438614", "0.6715118", "0.67116094", "0.6710746", "0.67033434", "0.67033434", "0.67033434", "0.67033434", "0.67033434", "0.67033434", "0.67033434", "0.67033434", "0.67033434", "0.67033434", "0.67033434", "0.67033434", "0.67033434", "0.66966325", "0.66769505", "0.6674686", "0.66670495", "0.665695", "0.66567683", "0.6630387", "0.6629088", "0.66222125", "0.66107553", "0.6608883", "0.660101", "0.66003805", "0.65988564", "0.6586292", "0.65782", "0.65781444", "0.6572956", "0.6568145", "0.65576744", "0.65572464", "0.6553632", "0.65468246", "0.6539034", "0.6519361", "0.651809", "0.6515949", "0.6515074", "0.6512643", "0.65110344", "0.65049297", "0.65029323", "0.64996505", "0.6499613", "0.64852774", "0.6484392", "0.6481139", "0.64801425", "0.64696103", "0.6463569", "0.64471215", "0.6444666" ]
0.0
-1
Run the database seeds.
public function run() { DB::table('results')->insert([ 'finish_time' => Carbon\Carbon::now(), 'score' => '8', 'user_id' => '1', 'test_id' => '1', ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n factory(App\\Editeur::class, 40) ->create();\n factory(App\\Auteur::class, 40) ->create();\n factory(App\\Livre::class, 80) ->create();\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('auteur_livre')->insert([\n 'livre_id' => rand(1, 40),\n 'auteur_id' => $i\n ]);\n }\n }\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('post')->insert(\n [\n 'title' => 'Test Post1',\n 'desc' => str_random(100).\" post1\",\n 'alias' => 'test1',\n 'keywords' => 'test1',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post2',\n 'desc' => str_random(100).\" post2\",\n 'alias' => 'test2',\n 'keywords' => 'test2',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post3',\n 'desc' => str_random(100).\" post3\",\n 'alias' => 'test3',\n 'keywords' => 'test3',\n ]\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n factory('App\\User', 10 )->create();\n\n $users= \\App\\User::all();\n $users->each(function($user){ factory('App\\Category', 1)->create(['user_id'=>$user->id]); });\n $users->each(function($user){ factory('App\\Tag', 3)->create(['user_id'=>$user->id]); });\n\n\n $users->each(function($user){\n factory('App\\Post', 10)->create([\n 'user_id'=>$user->id,\n 'category_id'=>rand(1,20)\n ]\n );\n });\n\n $posts= \\App\\Post::all();\n $posts->each(function ($post){\n\n $post->tags()->attach(array_unique([rand(1,20),rand(1,20),rand(1,20)]));\n });\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }", "public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => '[email protected]', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"[email protected]\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }", "public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }", "public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }", "public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // MyList::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n MyList::create([\n 'title' => 'List-'.($i+1),\n 'color' => $faker->sentence,\n 'icon' => $faker->randomDigitNotNull,\n 'index' => $faker->randomDigitNotNull,\n 'user_id' => 1,\n ]);\n }\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->create();\n }", "public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }", "public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => '[email protected]',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => '[email protected]',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }", "public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> '[email protected]',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }", "public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }", "public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }", "public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }", "public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }", "public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }", "public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }", "public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }", "public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n }", "public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}", "public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }", "public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}", "public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }", "public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }", "public function run()\n {\n $this->call([\n CountryTableSeeder::class,\n ProvinceTableSeeder::class,\n TagTableSeeder::class\n ]);\n\n User::factory()->count(10)->create();\n Category::factory()->count(5)->create();\n Product::factory()->count(20)->create();\n Section::factory()->count(5)->create();\n Bundle::factory()->count(20)->create();\n\n $bundles = Bundle::all();\n // populate bundle-product table (morph many-to-many)\n Product::all()->each(function ($product) use ($bundles) {\n $product->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray(),\n ['default_quantity' => rand(1, 10)]\n );\n });\n // populate bundle-tags table (morph many-to-many)\n Tag::all()->each(function ($tag) use ($bundles) {\n $tag->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray()\n );\n });\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker=Faker\\Factory::create();\n\n for($i=0;$i<100;$i++){\n \tApp\\Blog::create([\n \t\t'title' => $faker->catchPhrase,\n 'description' => $faker->text,\n 'showns' =>true\n \t\t]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(BusinessTableSeeder::class);\n $this->call(PrinterTableSeeder::class);\n factory(App\\Tag::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Subcategory::class,50)->create();\n factory(App\\Provider::class,10)->create();\n factory(App\\Product::class,24)->create()->each(function($product){\n\n $product->images()->saveMany(factory(App\\Image::class, 4)->make());\n\n });\n\n\n factory(App\\Client::class,10)->create();\n }", "public function run()\n {\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->sentence,\n 'sku' => $faker->paragraph,\n 'price' => $faker->number,\n ]);\n }\n }", "public function run()\n {\n Storage::deleteDirectory('public/products');\n Storage::makeDirectory('public/products');\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n $this->call(ProductSeeder::class);\n Order::factory(4)->create();\n Order_Detail::factory(4)->create();\n Size::factory(100)->create();\n }", "public function run()\n {\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Doctor::factory(25)->create();\n Patient::factory(50)->create();\n Status::factory(3)->create();\n Appointment::factory(100)->create();\n }", "public function run()\n\t{\n\t\t\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tTodolist::truncate();\n\n\t\tforeach(range(1, 50) as $index)\n\t\t{\n\n\t\t\t$user = User::create([\n\t\t\t\t'name' => $faker->name,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 'password',\n\t\t\t\t'confirmation_code' => mt_rand(0, 9),\n\t\t\t\t'confirmation' => rand(0,1) == 1\n\t\t\t]);\n\n\t\t\t$list = Todolist::create([\n\t\t\t\t'name' => $faker->sentence(2),\n\t\t\t\t'description' => $faker->sentence(4),\n\t\t\t]);\n\n\t\t\t// BUILD SOME TASKS FOR EACH LIST ITEM\n\t\t\tforeach(range(1, 10) as $index) \n\t\t\t{\n\t\t\t\t$task = new Task;\n\t\t\t\t$task->name = $faker->sentence(2);\n\t\t\t\t$task->description = $faker->sentence(4);\n\t\t\t\t$list->tasks()->save($task);\n\t\t\t}\n\n\t\t}\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n\n\t}", "public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }", "public function run()\n {\n //\n DB::table('foods')->delete();\n\n Foods::create(array(\n 'name' => 'Chicken Wing',\n 'author' => 'Bambang',\n 'overview' => 'a deep-fried chicken wing, not in spicy sauce'\n ));\n\n Foods::create(array(\n 'name' => 'Beef ribs',\n 'author' => 'Frank',\n 'overview' => 'Slow baked beef ribs rubbed in spices'\n ));\n\n Foods::create(array(\n 'name' => 'Ice cream',\n 'author' => 'Lou',\n 'overview' => ' A sweetened frozen food typically eaten as a snack or dessert.'\n ));\n\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Models\\Category::class, 3)\n ->create()\n ->each(function ($u) {\n $u->courses()->saveMany(factory(App\\Models\\Course::class,3)->make())->each(function ($c){\n $c->exams()->saveMany(factory(\\App\\Models\\Exam::class,3)->make())->each(function ($e){\n $e->questions()->saveMany(factory(\\App\\Models\\Question::class,4)->make())->each(function ($q){\n $q->answers()->saveMany(factory(\\App\\Models\\Answer::class,4)->make())->each(function ($a){\n $a->correctAnswer()->save(factory(\\App\\Models\\Correct_answer::class)->make());\n });\n });\n });\n });\n\n });\n\n }", "public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }", "public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }", "public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => '[email protected]']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }", "public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'[email protected]',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','[email protected]')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => '[email protected]']);\n\n factory(Category::class, 5)->create();\n }", "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }", "public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }", "public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }", "public function run()\n {\n $this->call([\n LanguagesTableSeeder::class,\n ListingAvailabilitiesTableSeeder::class,\n ListingTypesTableSeeder::class,\n RoomTypesTableSeeder::class,\n AmenitiesTableSeeder::class,\n UsersTableSeeder::class,\n UserLanguagesTableSeeder::class,\n ListingsTableSeeder::class,\n WishlistsTableSeeder::class,\n StaysTableSeeder::class,\n GuestsTableSeeder::class,\n TripsTableSeeder::class,\n ReviewsTableSeeder::class,\n RatingsTableSeeder::class,\n PopularDestinationsTableSeeder::class,\n ImagesTableSeeder::class,\n ]);\n\n // factory(App\\User::class, 5)->states('host')->create();\n // factory(App\\User::class, 10)->states('hostee')->create();\n\n // factory(App\\User::class, 10)->create();\n // factory(App\\Models\\Listing::class, 30)->create();\n }", "public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }", "public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => '[email protected]',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Paul'\n ]);\n }", "public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }", "public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }", "public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}", "public function run()\n {\n /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1,200) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'phone' => $faker->randomDigitNotNull,\n 'address'=> $faker->streetAddress,\n 'password' => bcrypt('secret'),\n ]);\n }\n }", "public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }", "public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }", "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Runner::create([\n 'external_id' => $faker->uuid,\n 'name' => $faker->name,\n 'race_id' =>rand(1,5),\n 'age' => rand(30, 45),\n 'sex' => $faker->randomElement(['male', 'female']),\n 'color' => $faker->randomElement(['#ecbcb4', '#d1a3a4']),\n ]);\n }\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }", "public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }", "public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'sab',\n\n ]\n );\n }", "public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }", "public function run()\n {\n //Acá se define lo que el seeder va a hacer.\n //insert() para insertar datos.\n //Array asociativo. La llave es el nombre de la columna.\n// DB::table('users')->insert([\n// //Para un solo usuario.\n// 'name' => 'Pedrito Perez',\n// 'email' => '[email protected]',\n// 'password' => bcrypt('123456')\n// ]);//Se indica el nombre de la tabla.\n\n //Crea 50 usuarios (sin probar)\n// factory(App\\User::class, 50)->create()->each(function($u) {\n// $u->posts()->save(factory(App\\Post::class)->make());\n// });\n\n factory(App\\User::class, 10)->create(); //Así se ejecuta el model factory creado en ModelFactory.php\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'[email protected]', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'[email protected]', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }", "public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }" ]
[ "0.8013876", "0.79804534", "0.7976992", "0.79542726", "0.79511505", "0.7949612", "0.794459", "0.7942486", "0.7938189", "0.79368967", "0.79337025", "0.78924936", "0.78811055", "0.78790957", "0.78787595", "0.787547", "0.7871811", "0.78701615", "0.7851422", "0.7850352", "0.7841468", "0.7834583", "0.7827792", "0.7819104", "0.78088796", "0.7802872", "0.7802348", "0.78006834", "0.77989215", "0.7795819", "0.77903426", "0.77884805", "0.77862066", "0.7778816", "0.7777486", "0.7765202", "0.7762492", "0.77623445", "0.77621746", "0.7761383", "0.77606887", "0.77596676", "0.7757001", "0.7753607", "0.7749522", "0.7749292", "0.77466977", "0.7729947", "0.77289546", "0.772796", "0.77167094", "0.7714503", "0.77140456", "0.77132195", "0.771243", "0.77122366", "0.7711113", "0.77109736", "0.7710777", "0.7710086", "0.7705484", "0.770464", "0.7704354", "0.7704061", "0.77027386", "0.77020216", "0.77008796", "0.7698617", "0.76985973", "0.76973504", "0.7696405", "0.7694293", "0.7692694", "0.7691264", "0.7690576", "0.76882726", "0.7687433", "0.7686844", "0.7686498", "0.7685065", "0.7683827", "0.7679184", "0.7678287", "0.76776296", "0.76767945", "0.76726556", "0.76708084", "0.76690495", "0.766872", "0.76686716", "0.7666299", "0.76625943", "0.7662227", "0.76613766", "0.7659881", "0.7656644", "0.76539344", "0.76535016", "0.7652375", "0.7652313", "0.7652022" ]
0.0
-1
Change the subscribsion for an contact. Add new subscribers to an automation.
public function handleNewsletterSubscriberSave(Varien_Event_Observer $observer) { $helper = Mage::helper('connector'); $subscriber = $observer->getEvent()->getSubscriber(); $storeId = $subscriber->getStoreId(); $email = $subscriber->getEmail(); $subscriberStatus = $subscriber->getSubscriberStatus(); $websiteId = Mage::app()->getStore($subscriber->getStoreId())->getWebsiteId(); $contactEmail = Mage::getModel('email_connector/contact')->loadByCustomerEmail($email, $websiteId); try{ // send new subscriber to an automation if (! Mage::getModel('newsletter/subscriber')->loadByEmail($email)->getId()) { $this->_postSubscriberToAutomation($email, $websiteId); } // only for subsribers if ($subscriberStatus == Mage_Newsletter_Model_Subscriber::STATUS_SUBSCRIBED) { $client = Mage::helper('connector')->getWebsiteApiClient($websiteId); //check for website client if ($client) { //set contact as subscribed $contactEmail->setSubscriberStatus( $subscriberStatus ) ->setIsSubscriber('1'); $apiContact = $client->postContacts( $email ); //resubscribe suppressed contacts if ( isset( $apiContact->status ) && $apiContact->status == 'Suppressed' ) { $client->postContactsResubscribe( $apiContact ); } } // reset the subscriber as suppressed $contactEmail->setSuppressed(null); //not subscribed } else { //skip if contact is suppressed if ($contactEmail->getSuppressed()) return $this; //update contact id for the subscriber $client = Mage::helper('connector')->getWebsiteApiClient($websiteId); //check for website client if ($client) { $contactId = $contactEmail->getContactId(); //get the contact id if ( !$contactId ) { //if contact id is not set get the contact_id $result = $client->postContacts( $email ); if ( isset( $result->id ) ) { $contactId = $result->id; } else { //no contact id skip $contactEmail->setSuppressed( '1' ) ->save(); return $this; } } //remove contact from address book $client->deleteAddressBookContact( $helper->getSubscriberAddressBook( $websiteId ), $contactId ); } $contactEmail->setIsSubscriber(null) ->setSubscriberStatus(Mage_Newsletter_Model_Subscriber::STATUS_UNSUBSCRIBED); } //update the contact $contactEmail->setStoreId($storeId); if (isset($contactId)) $contactEmail->setContactId($contactId); //update contact $contactEmail->save(); }catch(Exception $e){ Mage::logException($e); Mage::helper('connector')->getRaygunClient()->SendException($e, array(Mage::getBaseUrl('web'))); } return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function add_contact_to_list($cat_id, $email, $name) {\n require_once 'createsend-php-5.1.2/csrest_subscribers.php';\n $auth = array('api_key' => CM_API_KEY);\n\n $wrap = new CS_REST_Subscribers(get_term_meta($cat_id, 'list_id', true), $auth);\n $result = $wrap->add(array(\n 'EmailAddress' => $email,\n 'Name' => $name,\n 'Resubscribe' => true\n ));\n}", "public function mailing_list_subscribe()\n\t{\n\t\t// get parameters for first name, last name and email\n\t\t$first_name = ee()->TMPL->fetch_param('first_name');\n\t\t$last_name = ee()->TMPL->fetch_param('last_name');\n\t\t$email = ee()->TMPL->fetch_param('email');\n\n\t\tif(empty($email))\n\t\t{\n\t\t\treturn;\n\t\t}\t\n\n\t\t$this->update_constant_contact('create', $email, $first_name, $last_name);\n\n\t}", "public function subscribes();", "private function subscribe()\n {\n $this->botman->hears('subscribe', function (BotMan $bot) {\n $userId = $bot->getUser()->getId();\n $user = Subscriber::where('telegram_user_id', $userId)->first();\n $userMsg = 'You are already subscribed';\n\n if(is_null($user))\n {\n Subscriber::create(['telegram_user_id' => $userId]);\n $userMsg = 'You have just subscribed to our updates!';\n }\n\n $bot->reply($userMsg);\n });\n }", "function wpcf7_knews_subscription ($WPCF7_ContactForm) {\n\t\n\t$submission = WPCF7_Submission::get_instance();\n\t$posted_data =& $submission->get_posted_data();\t \n\n\tif(isset($posted_data['knews-subscription'])) {\n\n\t\t$email = $posted_data['email'];\n\t\t\n\t\t$id_list_news = $posted_data['knews-subscription'];\n\t\t$lang = ICL_LANGUAGE_CODE;\n\t\t$lang_locale = get_locale();\n\t\t\n\t\t$extra_fields = $posted_data;\n\t\t$custom_fields = array();\n\t\t\tforeach ($extra_fields as $field) {\n\t\t\t\t$custom_fields[1]=$posted_data['name'];\n\t\t\t\t$custom_fields[2]=$posted_data['surname'];\n\t\t\t}\n\t\n\t\t$bypass_confirmation = true;\n\t\t\n\t\tapply_filters('knews_add_user_db', 0, $email, $id_list_news, $lang, $lang_locale, $custom_fields, $bypass_confirmation);\n\t\t\t\n\t}\t\n}", "public function activateRecipient($strEmail, $arrAdd, $arrCids)\n {\n global $objPage;\n\n if (!empty($arrAdd) && is_array($arrAdd) && !empty($arrCids) && is_array($arrCids))\n {\n foreach ($arrCids as $channelId)\n {\n $subscriberId = null;\n\n if (($objChannel = NewsletterChannelModel::findByPk($channelId)) !== null)\n {\n if ($objChannel->notifyOnSubscriptionActivation)\n {\n if (($objNotification = Notification::findByPk($objChannel->onSubscriptionActivationNotification)) !== null)\n {\n $subscriberId = null;\n\n // Fill newsletter channel token from tl_newsletter_channel\n $arrTokens = array();\n $arrRow = $objChannel->row();\n foreach ($arrRow as $k => $v)\n {\n $arrTokens['newsletter_' . $k] = html_entity_decode($v);\n }\n // Convert timestamp to date\n $arrTokens['newsletter_tstamp'] = Date::parse(Config::get('datimFormat'), $objChannel->tstamp);\n\n // Fill recipient token from tl_newsletter_recipients\n foreach ($arrAdd as $id)\n {\n if (($objSubscriber = NewsletterRecipientsModel::findByPk($id)) !== null)\n {\n if ($objSubscriber->pid === $objChannel->id)\n {\n $subscriberId = $objSubscriber->id;\n foreach ($objSubscriber->row() as $k => $v)\n {\n $arrTokens['recipient_' . $k] = html_entity_decode($v);\n }\n // Convert timestamps to date\n $arrTimestamps = array('tstamp', 'addedOn');\n foreach ($arrTimestamps as $k)\n {\n if ($arrTokens['recipient_' . $k] != '')\n {\n $arrTokens['recipient_' . $k] = Date::parse(Config::get('datimFormat'), $objSubscriber->{$k});\n }\n }\n }\n }\n }\n\n $blnSend = true;\n if ($objNotification !== null && ($objSubscriber = NewsletterRecipientsModel::findByPk($subscriberId) !== null))\n {\n // HOOK: add custom tokens\n if (isset($GLOBALS['TL_HOOKS']['beforeNotifyOnSubscriptionActivation']) && \\is_array($GLOBALS['TL_HOOKS']['beforeNotifyOnSubscriptionActivation']))\n {\n foreach ($GLOBALS['TL_HOOKS']['beforeNotifyOnSubscriptionActivation'] as $callback)\n {\n if ($blnSend)\n {\n $objHook = Controller::importStatic($callback[0]);\n // Pass $arrTokens by reference!\n $blnSend = $objHook->{$callback[1]}($arrTokens, $objSubscriber, $objChannel, $objNotification);\n }\n }\n }\n if ($blnSend)\n {\n $objNotification->send($arrTokens, $objPage->language);\n }\n }\n }\n }\n }\n }\n }\n }", "public function set_subscriber($email, $data = NULL);", "public function importSubscribers() \n\t{\n\t\tif (!$this->_isImportSubscribersEnabled()) \n\t\t{\n\t\t\treturn;\n\t\t}\n Mage::getModel(\"contactlab_hub/importer_subscribers\")->import();\n\t}", "public function send_subscriptions(){\r\n //send email to all those who have subscribed to posts from this author\r\n\r\n }", "public function subscribeCustomer($customer)\n {\n //prüfen ob Magento Plugin aktiviert ist.\n if (!$this->helper->isMailingworkEnabled()) {\n return parent::subscribeCustomer($customer);\n }\n $this->loadByCustomer($customer);\n\n if ($customer->getImportMode()) {\n $this->setImportMode(true);\n }\n\n if (!$customer->getIsSubscribed() && !$this->getId()) {\n // If subscription flag not set or customer is not a subscriber\n // and no subscribe below\n return $this;\n }\n\n if(!$this->getId()) {\n $this->setSubscriberConfirmCode($this->randomSequence());\n }\n\n /*\n * Logical mismatch between customer registration confirmation code and customer password confirmation\n */\n $confirmation = null;\n if ($customer->isConfirmationRequired() && ($customer->getConfirmation() != $customer->getPassword())) {\n $confirmation = $customer->getConfirmation();\n }\n\n $sendInformationEmail = false;\n if ($customer->hasIsSubscribed()) {\n $status = $customer->getIsSubscribed()\n ? (!is_null($confirmation) ? self::STATUS_UNCONFIRMED : self::STATUS_SUBSCRIBED)\n : self::STATUS_UNSUBSCRIBED;\n /**\n * If subscription status has been changed then send email to the customer\n */\n if ($status != self::STATUS_UNCONFIRMED && $status != $this->getStatus()) {\n $sendInformationEmail = true;\n }\n } elseif (($this->getStatus() == self::STATUS_UNCONFIRMED) && (is_null($confirmation))) {\n $status = self::STATUS_SUBSCRIBED;\n $sendInformationEmail = true;\n } else {\n $status = ($this->getStatus() == self::STATUS_NOT_ACTIVE ? self::STATUS_UNSUBSCRIBED : $this->getStatus());\n }\n\n if($status != $this->getStatus()) {\n $this->setIsStatusChanged(true);\n }\n\n $this->setStatus($status);\n\n if(!$this->getId()) {\n $storeId = $customer->getStoreId();\n if ($customer->getStoreId() == 0) {\n $storeId = Mage::app()->getWebsite($customer->getWebsiteId())->getDefaultStore()->getId();\n }\n $this->setStoreId($storeId)\n ->setCustomerId($customer->getId())\n ->setEmail($customer->getEmail());\n } else {\n $this->setStoreId($customer->getStoreId())\n ->setEmail($customer->getEmail());\n }\n\n $sendSubscription = $customer->getData('sendSubscription') || $sendInformationEmail;\n if (is_null($sendSubscription) xor $sendSubscription) {\n if ($this->getIsStatusChanged() && $status == self::STATUS_UNSUBSCRIBED) {\n $result = $this->mwOptoutRecipient(true);\n } elseif ($this->getIsStatusChanged() && $status == self::STATUS_SUBSCRIBED) {\n $result = $this->mwOptinRecipient(true);\n }\n }\n\n $this->save();\n return $this;\n }", "public function incscribe($subscribe_to) {\n\t\t$user_id=$this->Auth->user('id');\n\t\t$userstatrow=$this->Userstat->find('first',array('conditions'=>array('Userstat.user_id'=>$user_id),'contain'=>false,'fields'=>array('Userstat.id')));\n\t\tif($userstatrow!=NULL)\n\t\t{\n\t\t$this->Userstat->id=$userstatrow['Userstat']['id'];\n\t }else{\n\t\t$this->Userstat->id=NULL;\n\t\t}\n\t\t$subscribe=$this->Subscription->find('count',array('conditions'=>array('Subscription.subscriber_id'=>$user_id)));\n\t\t$this->request->data['Userstat']['user_id']=$user_id;\n\t\t$this->request->data['Userstat']['subscribe']=$subscribe;\n\t\tif($this->Userstat->save($this->request->data)){$this->potential($user_id);}\n\t\t//recoded ends\t\n\t\t//recoded begins for subscribeto of channel\n\t\t$userstatrow=$this->Userstat->find('first',array('conditions'=>array('Userstat.user_id'=>$subscribe_to),'contain'=>false,'fields'=>array('Userstat.id')));\n\t\tif($userstatrow!=NULL)\n\t\t{\n\t\t$this->Userstat->id=$userstatrow['Userstat']['id'];\n\t }else{\n\t\t$this->Userstat->id=NULL;\n\t\t}\n\t\t$this->request->data=NULL;\n\t\t$subscribeto=$this->Subscription->find('count',array('conditions'=>array('Subscription.subscriber_to_id'=>$subscribe_to)));\n\t\t$this->request->data['Userstat']['user_id']=$subscribe_to;\n\t\t$this->request->data['Userstat']['subscribeto']=$subscribeto;\n\t\tif($this->Userstat->save($this->request->data)){$this->potential($subscribe_to);}\n\t\t//recoded ends\t\n\t}", "function pgm_add_subscription( $subscriber_id, $list_id ) {\n\n // setup default return value\n $subscription_saved = false;\n\n // IF the subscriber does NOT have the current list subscription\n if( !pgm_subscriber_has_subscription( $subscriber_id, $list_id ) ){\n\n // get subscriptions and append new $list_id\n $subscriptions = pgm_get_subscriptions( $subscriber_id );\n $subscriptions[]=$list_id;\n\n // update pgm_subscriptions\n update_field( pgm_get_acf_key('pgm_subscriptions'), $subscriptions, $subscriber_id );\n\n // subscriptions updated!\n $subscription_saved = true;\n\n }\n\n // return result\n return $subscription_saved;\n\n}", "public function subscribe(Identity $identity, $events, $notification_url, AccountInterface $subscriber = NULL);", "public function addActivatedBpContactsToGr()\n\t{\n\t\t$emails = get_option($this->GrOptionDbPrefix . 'bp_registered_emails');\n\t\tif ( ! empty($emails))\n\t\t{\n\t\t\t$emails_array = unserialize($emails);\n\t\t\tif (is_array($emails_array))\n\t\t\t{\n\t\t\t\tforeach ($emails_array as $k => $v)\n\t\t\t\t{\n\t\t\t\t\t$unset = false;\n\t\t\t\t\t$user = $this->getUserDetailsByEmail($v);\n\n\t\t\t\t\tif ( ! empty($user))\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($user->activation_key == null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($this->grApiInstance)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$campaign = get_option($this->GrOptionDbPrefix . 'bp_registration_campaign');\n\t\t\t\t\t\t\t\t$this->addContact($campaign, $user->display_name, $user->user_email, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$unset = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if ((bool) ($this->getDateDiffWithCurrentDate($user->user_registered) >= $this->max_bp_unconfirmed_days) == true)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$unset = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ($unset == true)\n\t\t\t\t\t{\n\t\t\t\t\t\tunset($emails_array[$k]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tupdate_option($this->GrOptionDbPrefix . 'bp_registered_emails', serialize($emails_array));\n\t\t}\n\t}", "public function add_subscription( $contact, $feed, $entry, $form ) {\n\n\t\t/* Subscribe the contact to the list. */\n\t\t$subscription = $this->api->add_contact_to_list( $contact['id'], $feed['meta']['list'] );\n\n\t\t/* Log whether or not contact was subscribed to list. */\n\t\tif ( empty ( $subscription ) ) {\n\n\t\t\t$this->log_debug( __METHOD__ . \"(): {$contact['email']} was already subscribed to list.\" );\n\n\t\t} else {\n\n\t\t\tif ( is_wp_error( $subscription ) ) {\n\t\t\t\t$this->add_feed_error( sprintf(\n\t\t\t\t\tesc_html__( 'Contact could not be subscribed to list. %s', 'gravityformsicontact' ),\n\t\t\t\t\t$subscription->get_error_message()\n\t\t\t\t), $feed, $entry, $form );\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$this->log_debug( __METHOD__ . \"(): {$contact['email']} has been subscribed to list; subscription ID: {$subscription[0]['subscriptionId']}.\" );\n\n\t\t}\n\t\t\n\t}", "function addCC( $newRecipient ) {\n\t\t\t\t\n\t}", "function subscribeUser()\n\t\t{\n\t\t\techo $this->email.\"add to the database !!\";\n\t\t}", "function og_simplenews_save_subscriptions($tid, $emails) {\n // First, delete all subscriptions.\n db_query('DELETE FROM {simplenews_snid_tid} WHERE tid = %d', $tid);\n\n // And now add new. Simplenews sucks.\n require_once drupal_get_path('module', 'simplenews') . '/includes/simplenews.admin.inc';\n $form_state['values'] = array(\n 'emails' => $emails,\n 'newsletters' => array(\n $tid => $tid,\n ),\n );\n drupal_execute('simplenews_subscription_list_add', $form_state);\n}", "public function subscribe($subscriber);", "public function collectSubscribers();", "public function subscribes()\r\n\r\n {\r\n\r\n return new Engine_ProxyObject($this, Engine_Api::_()->getDbtable('subscribes', 'core'));\r\n\r\n }", "abstract public function subscribe($email, $listId, $variables);", "public function subscribe()\n {\n $payload = request()->validate([\n 'topics' => 'required|array',\n 'callback' => 'required|url',\n ]);\n\n $topics = array_map(function ($topic) {\n return $this->topics->findOrCreate($topic);\n }, $payload['topics']);\n\n abort_unless(! empty($topics), 404);\n\n $subscriber = $this->subscribers->create($topics, $payload);\n\n }", "public function setsubscribableAction()\n {\n \n }", "private function subscribe(Twitch $twitch, Channel $channel, string $activity): void\n {\n if ($this->options[self::OPTIONS_ONLY] && !in_array($activity, $this->options[self::OPTIONS_ONLY], true)) {\n return;\n }\n\n $requiresUserAccessToken = in_array($activity, self::AFFILIATE_AND_PARTNER_ONLY_WEBHOOKS, true);\n\n $subscriber = new Subscriber();\n $callbackUrl = $this->getCallbackUrl($channel->getKey(), $activity);\n $feedUrl = Subscriber::getFeedUrl($twitch, $channel->getKey(), $activity);\n\n if ($requiresUserAccessToken) {\n // prevent subscribe of affiliate & partner-only webhooks for normal broadcasters\n if (empty($channel->broadcaster_type)) {\n $this->skip($subscriber, $feedUrl, 'The broadcaster type is empty.');\n return;\n }\n\n if (empty($channel->oauth_access_token)) {\n $this->skip($subscriber, $feedUrl, 'The oauth access token is empty.');\n return;\n }\n\n $twitch->setToken($channel->oauth_access_token);\n }\n\n $subscriber->subscribe($callbackUrl, $feedUrl, $channel->getKey());\n }", "public function subscribers() {\n\n $output['subscribers'] = $this->Admin_model->get_subscriber();\n\n //If you have to display grocery crud in the content panel:\n\n $crud = new grocery_CRUD();\n $crud->set_table('subscribers');\n $crud->set_theme('bootstrap');\n $crud->set_subject('Feliratkozók');\n $crud->display_as(array(\n 'name' => 'Név',\n 'email' => 'E-mail',\n 'date' => 'Dátum',\n 'active' => 'Aktív',\n )\n );\n $output = $crud->render();\n $this->load->viewadmin('index', $output, FALSE, 1);\n\n }", "public function subscribe($subscriber): void;", "public function customerRegisterSuccess($observer)\n{\n\n $settings = Mage::helper('smsnotifications/data')->getSettings();\n $customer = $observer->getEvent()->getCustomer();\n $fname=$customer->getFirstname();\n $lname=$customer->getLastname();\n $email= $customer->getEmail();\n\n $telephone= $customer->getAddressesCollection()->getFirstitem()->getTelephone();\n\n if ($telephone) {\n $text =$settings['customer_notification_message'];\n $text = str_replace('{{firstname}}', $fname, $text);\n $text = str_replace('{{lastname}}', $lname, $text);\n $text = str_replace('{{emailid}}', $email, $text);\n }\n \n array_push($settings['order_noficication_recipients'], $telephone);\n $result = Mage::helper('smsnotifications/data')->sendSms($text, $settings['order_noficication_recipients']);\n return;\n}", "public function subscribeCustomer($customer) {\n if (Mage::helper('contactlab_subscribers')->skipSubscribeCustomer()) {\n return;\n }\n return parent::subscribeCustomer($customer);\n }", "public function subscribe(SubscriberInterface $subscriber);", "function confirmar_subscripcion($id_subscriptor) {\n\n\t\t$UpdateRecords = \"UPDATE newsletter_subscribers \n\t\tSET activo=1\n\t\tWHERE id_subscriptor='$id_subscriptor'\";\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($UpdateRecords); \n\t\tmysql_close($connection);\n\n}", "public function subscribe();", "public function subscribe_subscriber( $params ) {\n\t\tif ( empty( $params['account_id'] ) ) {\n\t\t\tthrow new Exception( 'Account ID not specified' );\n\t\t}\n\n\t\t$account_id = $params['account_id'];\n\t\tunset( $params['account_id'] ); // clear it from the params\n\n\t\tif ( empty( $params['campaign_id'] ) ) {\n\t\t\tthrow new Exception( 'Campaign ID not specified' );\n\t\t}\n\n\t\t$campaign_id = $params['campaign_id'];\n\t\tunset( $params['campaign_id'] ); // clear it from the params\n\n\t\tif ( empty( $params['email'] ) ) {\n\t\t\tthrow new Exception( 'Email not specified' );\n\t\t}\n\n\t\tif ( ! isset( $params['double_optin'] ) ) {\n\t\t\t$params['double_optin'] = true;\n\t\t}\n\n\t\tif ( ! isset( $params['reactivate_if_removed'] ) ) {\n\t\t\t$params['reactivate_if_removed'] = true;\n\t\t}\n\n\t\t$api_action = \"$account_id/campaigns/$campaign_id/subscribers\";\n\t\t$url = $this->api_end_point . $api_action;\n\n\t\t// The API wants the params to be JSON encoded\n\t\t$req_params = array( 'subscribers' => array( $params ) );\n\n\t\t$res = $this->make_request( $url, $req_params, static::POST );\n\n\t\treturn empty( $res ) ? false : $res;\n\t}", "public function subscribeAction()\n {\n $orgId = urldecode($this->getRequest()->getParam('org'));\n\n if ($orgId && ($orgId != $this->currentUser->getCurrentOrganizationId())) {\n $allowedOrganizations = $this->currentUser->getAllowedOrganizations();\n if ((! $this->currentUser->isActive()) || isset($allowedOrganizations[$orgId])) {\n $this->currentUser->setCurrentOrganization($orgId);\n }\n }\n\n $this->html->h1($this->_('Subscribe'));\n\n $screen = $this->currentUser->getCurrentOrganization()->getSubscribeScreen();\n\n if ($screen instanceof SubscribeScreenInterface) {\n $params = $screen->getSubscribeParameters();\n $snippets = $screen->getSubscribeSnippets();\n } else {\n $list = $this->_getScreenOrgs('gor_respondent_subscribe');\n if ($list) {\n $params = [\n 'action' => 'subscribe',\n 'info' => $this->_('Select an organization to subscribe to:'),\n 'orgs' => $list,\n ];\n $snippets = ['Organization\\\\ChooseListedOrganizationSnippet'];\n } else {\n $params = [];\n $snippets = ['Subscribe\\\\NoSubscriptionsSnippet'];\n }\n }\n\n $this->addSnippets($snippets, $params);\n }", "function it_exchange_paypal_pro_addon_update_subscriber_id( $paypal_pro_id, $subscriber_id ) {\n\t$transactions = it_exchange_paypal_pro_addon_get_transaction_id( $paypal_pro_id );\n\tforeach( $transactions as $transaction ) { //really only one\n\t\tdo_action( 'it_exchange_update_transaction_subscription_id', $transaction, $subscriber_id );\n\t}\n}", "public function subscription();", "public function setContactNumber($contact,$dataCustomerArray,$smsEnabled,$collection){\n if (isset ( $contact )) {\n if(isset($smsEnabled)){\n $collection->setContactNumber ( $dataCustomerArray );\n }else{\n $collection->setContactNumber ( $contact );\n }\n }\n return $collection;\n }", "public function createSubscriber();", "public function subscribe()\n {\n $this->layout = \"ajax\";\n $this->autoRender = false; \n if(!$this->NewsletterSubscribe->hasAny(array('NewsletterSubscribe.subscribe_email_id'=>$this->request->data['NewsletterSubscribe']['subscribe_email_id']))){ \n if ($this->NewsletterSubscribe->save($this->request->data)) {\n echo \"success\";\n } else {\n echo \"failed\";\n }\n }\n else {\n echo 'already_exists'; \n }\n }", "function subscribe($entity){\n\t\tif($entity instanceof ElggUser){\n\t\t\treturn $entity->setMetaData('isSubscribedNewsletter',true);\n\t\t}else{\n\t\t\tregister_error(elgg_echo('vazco_newsletter:notanuser'));\n\t\t\treturn false;\n\t\t}\n\t}", "public function subscribesCounter();", "public function subscribe($events)\n {\n\n foreach($this->actions as $action){\n $events->listen(\n 'RoiUp\\Zoom\\Events\\Meeting\\\\MeetingRegistrant' . $action,\n self::class . '@onRegistrant' . $action\n );\n }\n\n }", "function ical_subscribe() {\n \t$this->wireframe->print_button = false;\n\n $ical_url = assemble_url('ical', array(\n 'token' => $this->logged_user->getToken(true),\n ));\n\n $ical_subscribe_url = str_replace(array('http://', 'https://'), array('webcal://', 'webcal://'), $ical_url);\n\n $this->smarty->assign(array(\n 'ical_url' => $ical_url . '&subscribe=no',\n 'ical_subscribe_url' => $ical_subscribe_url\n ));\n }", "function ab_subscribe(){\r\n //debugbreak();\r\n $email = strip_tags($_POST['email']);\r\n if(!is_email($email)){\r\n _e('Email address is not valid',$this->plugin_domain);\r\n exit;\r\n }\r\n $list = $this->aweber_list_name;\r\n $to = $list.'@aweber.com';\r\n $subject = 'subscribe'; \r\n $name = strip_tags(get_bloginfo('name'));\r\n remove_all_filters('wp_mail_from');\r\n $success = wp_mail($to,$subject,'subscribe','From: '.$name.'<'.$email.'>'.\"\\r\\n\"); \r\n if($success){\r\n printf(__('Email %s added to list. please check your inbox for the confirmation link',$this->plugin_domain),$email);\r\n } else {\r\n _e('oh dear! some error happened with sending the subscribe email, you may have to subscribe manually at ComLuv.com',$this->plugin_domain);\r\n } \r\n exit;\r\n }", "private function registerSubscribers()\n {\n $extensions = $this->dataGridFactory->getExtensions();\n\n foreach ($extensions as $extension) {\n $extension->registerSubscribers($this);\n }\n }", "function simplenews_subscription_activate($snids, $status) {\n foreach (simplenews_subscriber_load_multiple($snids) as $subscriber) {\n $subscriber->activated = $status;\n simplenews_subscriber_save($subscriber);\n }\n}", "public function setSubscription(array $data)\n {\n $returnValue = false;\n\n // check if subscription id exists\n if (!isset($data['id'])) {\n require_once 'Zend/Feed/Pubsubhubbub/Exception.php';\n throw new Zend_Feed_Pubsubhubbub_Exception(\n 'ID must be set before attempting a save'\n );\n }\n\n // generate uri with subscription id\n $subscriptionResourceUri = $this->_generateSubscriptionResourceUri(\n $this->_subscriptionConfig->get('classUri'),\n $data['id']\n );\n\n // get the subscription as OntoWiki resource\n $subscriptionResource = new OntoWiki_Model_Resource(\n $this->_selectedModelInstance->getStore(),\n $this->_selectedModelInstance,\n $subscriptionResourceUri\n );\n\n // get all properties of the subscription\n $subscriptionResourceProperties = $subscriptionResource->getValues();\n\n // if the subscription has properties update the changed one's\n if (0 < count($subscriptionResourceProperties)) {\n $modelIri = $this->_selectedModelInstance->getModelIri();\n $subscriptionResourceProperties = $subscriptionResourceProperties[$modelIri];\n $createdTimePropertyUri = $this->_subscriptionConfig->get($this->_propertyMatching['created_time']);\n $data['created_time'] = $subscriptionResourceProperties[$createdTimePropertyUri][0]['content'];\n\n // get the current time\n $now = new Zend_Date;\n\n // if lease seconds is set to the subscription, calculate a new expiration time\n if (isset($data['lease_seconds'])) {\n $data['expiration_time'] = $now\n ->add($data['lease_seconds'], Zend_Date::SECOND)\n ->get('yyyy-MM-dd HH:mms');\n }\n\n // generate new add and delete statements from subscriber data array\n $statements = $this->_generateStatements(\n $subscriptionResourceUri,\n $data,\n $subscriptionResourceProperties\n );\n\n // setup the versioning options\n $versioningActionSpec = array(\n 'type' => self::VERSIONING_SUBSCRIPTION_UPDATE_ACTION_TYPE,\n 'modeluri' => $this->_selectedModelInstance->getBaseUri(),\n 'resourceuri' => $subscriptionResourceUri\n );\n\n // start versioning\n $this->_versioning->startAction($versioningActionSpec);\n\n // add and delete the statements to the store\n $this->_selectedModelInstance->addMultipleStatements($statements['addStatements']);\n $this->_selectedModelInstance->deleteMultipleStatements($statements['deleteStatements']);\n\n $returnValue = false;\n // if the subscription has now proberties only add the properties\n } else {\n // generate the add statements\n $statements = $this->_generateStatements($subscriptionResourceUri, $data);\n\n // setup the versioning options\n $versioningActionSpec = array(\n 'type' => self::VERSIONING_SUBSCRIPTION_ADD_ACTION_TYPE,\n 'modeluri' => $this->_selectedModelInstance->getBaseUri(),\n 'resourceuri' => $subscriptionResourceUri\n );\n\n // start versioning\n $this->_versioning->startAction($versioningActionSpec);\n\n // add the statements to the store\n $this->_selectedModelInstance->addMultipleStatements($statements['addStatements']);\n\n $returnValue = true;\n }\n\n // end versioning\n $this->_versioning->endAction();\n\n return $returnValue;\n }", "public function addSubscriber(array $data)\n {\n return $this->ozioma->newsletter->addSubscriber($data);\n }", "function pdfbulletin_subscribers_form_submit($form, &$form_state) {\n $subscriptions = array();\n\n $emails = explode(\"\\n\", $form_state['values']['subscribers']);\n foreach ($emails as $email) {\n $email = trim($email);\n if (!empty($email) && valid_email_address($email)) {\n $subscriptions[$email] = $email;\n }\n }\n pdfbulletin_subscribers_save($form_state['values']['pdfbulletin']->nid, $subscriptions);\n drupal_set_message(t('Subscriptions saved'));\n}", "public function subAddUpdate($subscriberData) {\n\n\t\t//$wsdl = $this->getWsdl();\n\t\t//Set the MID client\n\t\t$this->setMid($subscriberData->mid);\n\t\t\n\t\t//Account Info\n\t\t$email = $subscriberData->email;\n\t\t$thankYouPage = $subscriberData->thankYouPage;\n\t\t$errorPage = $subscriberData->errorPage;\n\n\t\ttry {\n\t\t\t$sendWelcomeEmail = false;\n\t\t\t//Check if email exists. If not, add to master DE.\n\n\t\t\t$objects = array();\n foreach ($subscriberData->mid as $mid) {\n\n $communityDe = new ExactTarget_DataExtensionObject();\n $communityDeKey = $subscriberData->getCommunityDeKey($mid);\n $communityDe->CustomerKey = $communityDeKey; //external key/unique identifier for the data extension\n\n //Need to keep initiating a new object here as ET service doesn't like the same object instance used in other requests.\n $midClient = new ExactTarget_ClientID();\n $midClient->ID = $mid;\n $communityDe->Client = $midClient;\n\n $communityDe->Properties = array();\n /*% ExactTarget_APIProperty */\n $subscriberKeyProperty = new ExactTarget_APIProperty();\n $subscriberKeyProperty->Name = \"SubscriberKey\"; // name of DE field\n $subscriberKeyProperty->Value = $subscriberData->subscriberKey; // value for DE field\n\n /*% ExactTarget_APIProperty */\n $emailProperty = new ExactTarget_APIProperty();\n $emailProperty->Name = \"EmailAddress\"; // name of DE field\n $emailProperty->Value = $email; // value for DE field\n\n $customDataET2 = $subscriberData->customDataET2;\n\n\n if (is_array($customDataET2)) {\n foreach ($customDataET2 as $k => $v) {\n $property = new ExactTarget_APIProperty();\n $property->Name = stripslashes($k);\n $property->Value = stripslashes($v);\n $communityDe->Properties[] = $property;\n }\n }\n\n $communityDe->Properties[] = $emailProperty;\n $communityDe->Properties[] = $subscriberKeyProperty;\n\n $objects[] = new SoapVar($communityDe, SOAP_ENC_OBJECT, 'DataExtensionObject', \"http://exacttarget.com/wsdl/partnerAPI\");\n\n }\n\n\n /*% Create the ExactTarget_SaveOption Object */ \n $saveOption = new ExactTarget_SaveOption(); \n $saveOption->PropertyName=\"DataExtensionObject\";\n $saveOption->SaveAction=ExactTarget_SaveAction::UpdateAdd; // set the SaveAction to add/update\n\n // Apply options and object to request and perform update of data extension\n $updateOptions = new ExactTarget_UpdateOptions();\n $updateOptions->SaveOptions[] = new SoapVar($saveOption, SOAP_ENC_OBJECT, 'SaveOption', \"http://exacttarget.com/wsdl/partnerAPI\");\n\t\t\t$request = new stdClass();\n $request->Options = new SoapVar($updateOptions, SOAP_ENC_OBJECT, 'UpdateOptions', \"http://exacttarget.com/wsdl/partnerAPI\");\n $request = new ExactTarget_CreateRequest();\n $request->Options = $updateOptions;\n $request->Objects = $objects;\n \n $results = $this->client->Update($request);\n\n\t $ret = new SubscriberResponse();\n\n\t if($results->OverallStatus == \"OK\") {\n\t $ret->error = false;\n\t $ret->sendWelcomeEmail = $sendWelcomeEmail;\n\t $ret->errorString = \"\";\n\t $ret->redirectLocation = $thankYouPage;\n\t }\n\t\t\telse {\n\t\t\t\t$ret->error = true;\n\t\t\t\tif(is_array($results->Results)) {\n $result = $results->Results[0];\n\t\t\t\t\tif (property_exists($result, 'ValueErrors')) {\n\t\t\t\t\t\tif (is_array($result->ValueErrors->ValueError)) {\n\t\t\t\t\t\t\t$valueError = $result->ValueErrors->ValueError[0];\n\t\t\t\t\t\t\t$ret->errorCode = $valueError->ErrorCode;\n\t\t\t\t\t\t\t$ret->errorString = $valueError->ErrorMessage;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$ret->errorCode = $result->ValueErrors->ValueError->ErrorCode;\n\t\t\t\t\t\t\t$ret->errorString = $result->ValueErrors->ValueError->ErrorMessage;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (property_exists($result, 'KeyErrors')) {\n\t\t\t\t\t\t\t$ret->errorCode = $result->KeyErrors->KeyError->ErrorCode;\n\t\t\t\t\t\t\t$ret->errorString = $result->KeyErrors->KeyError->ErrorMessage;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$ret->errorCode = $result->ErrorCode;\n\t\t\t\t\t\t\t$ret->errorString = $result->ErrorMessage;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$result = $results->Results;\n\t\t\t\t\tif (property_exists($result, 'ValueErrors')) {\n\t\t\t\t\t\t$ret->errorCode = $result->ValueErrors->ValueError->ErrorCode;\n\t\t\t\t\t\t$ret->errorString = $result->ValueErrors->ValueError->ErrorMessage;\n\t\t\t\t\t} else if (property_exists($results->Results, 'ErrorCode')) {\n\t\t\t\t\t\t$ret->errorCode = $result->ErrorCode;\n\t\t\t\t\t\t$ret->errorString = $result->ErrorMessage;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$ret->errorCode = 0;\n\t\t\t\t\t\t$ret->errorString = $result->StatusMessage;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$ret->redirectLocation = $errorPage;\n //Check if error code is for invalid email\n if($ret->errorCode == 70006) {\n $ret->invalidEmail = true;\n }\n\t\t\t}\n\n return $ret;\n\n\t \n\t\t} catch (SoapFault $e) {\n $ret = new SubscriberResponse();\n $ret->error = true;\n $ret->errorString = \"SOAP Fault Exception: \" . $e->getMessage();\n $ret->redirectLocation = $errorPage;\n return $ret;\n\t\t} \t\t\n\t}", "public function Subscribe()\n\t\t{\n\t\t\tif(!isset($_POST['check'])) {\n\t\t\t\t$GLOBALS['SubscriptionHeading'] = GetLang('Oops');\n\t\t\t\t$GLOBALS['Class'] = \"ErrorMessage\";\n\t\t\t\t$GLOBALS['SubscriptionMessage'] = GetLang('NewsletterSpammerVerification');\n\t\t\t}\n\t\t\telse if(isset($_POST['nl_first_name']) && isset($_POST['nl_email'])) {\n\n\t\t\t\t$first_name = $_POST['nl_first_name'];\n\t\t\t\t$email = $_POST['nl_email'];\n\n\t\t\t\t$subscriberFlag = 0; // this variable is used for checking email marketer is checked or not.\n\t\t\t\t// Is Interspire Email Marketer integrated or should we just use the built-in list?\n\t\t\t\tif(GetConfig('MailXMLAPIValid') && GetConfig('UseMailerForNewsletter') && GetConfig('MailNewsletterList') > 0) {\n\t\t\t\t\t// Add them to the Interspire Email Marketer list\n\t\t\t\t\t$GLOBALS['ISC_CLASS_ADMIN_SENDSTUDIO'] = GetClass('ISC_ADMIN_SENDSTUDIO');\n\t\t\t\t\t$result = $GLOBALS['ISC_CLASS_ADMIN_SENDSTUDIO']->AddSubscriberToNewsletter($first_name, $email);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$subscriberFlag = 1;\n\t\t\t\t\t// commented this line as need to insert it into subscriober table everytime.\n\t\t\t\t\t// $result = $this->AddSubscriberToNewsletter($first_name, $email);\n\t\t\t\t}\n\n\t\t\t\t/*\n\t\t\t\t\tThis below condition is added to check if email marketer is not integrated, then need to pass the values back in \n\t\t\t\t\tvariable $result . Always need to insert it into subscriber table. - starts.\n\t\t\t\t*/\n\t\t\t\tif($subscriberFlag == 1) // if email marketer is not integrated\n\t\t\t\t{\n\t\t\t\t\t$result = $this->AddSubscriberToNewsletter($first_name, $email);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$result_new = $this->AddSubscriberToNewsletter($first_name, $email);\n\t\t\t\t}\n\t\t\t\t/* -- ends -- */\n\n\t\t\t\tif($result['status'] == \"success\") {\n\t\t\t\t\t$GLOBALS['SubscriptionHeading'] = GetLang('NewsletterThanksForSubscribing');\n\t\t\t\t\t$GLOBALS['Class'] = \"\";\n\t\t\t\t\t$GLOBALS['SubscriptionMessage'] = $result['message'] . sprintf(\" <a href='%s'>%s.</a>\", $GLOBALS['ShopPath'], GetLang('Continue'));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$GLOBALS['SubscriptionHeading'] = GetLang('Oops');\n\t\t\t\t\t$GLOBALS['Class'] = \"ErrorMessage\";\n\t\t\t\t\t$GLOBALS['SubscriptionMessage'] = $result['message'];\n\t\t\t\t}\n\t\t\t}\n\t\t\t$GLOBALS['ISC_CLASS_TEMPLATE']->SetPageTitle(sprintf(\"%s - %s\", GetConfig('StoreName'), GetLang('NewsletterSubscription')));\n\t\t\t$GLOBALS['ISC_CLASS_TEMPLATE']->SetTemplate(\"newsletter_subscribe\");\n\t\t\t$GLOBALS['ISC_CLASS_TEMPLATE']->ParseTemplate();\n\t\t}", "public function subscribeThanksAction()\n {\n if ($this->subscribeThanksSnippets) {\n $params = $this->_processParameters($this->subscribeThanksParameters);\n\n $this->addSnippets($this->subscribeThanksSnippets, $params);\n }\n }", "public function subscribe(): void;", "public function testSubscription() {\n // 1: Request to subscribe:\n $hookName = 'ContactsCreate';\n $hook = array(\n 'event' => 'RecordCreateTrigger',\n 'target_url' => TEST_WEBROOT_URL.'/api2HooksTest.php?name='.$hookName\n );\n $ch = $this->getCurlHandle('POST',array('{suffix}'=>''),'admin',$hook,array(CURLOPT_HEADER=>1));\n $response = curl_exec($ch);\n $this->assertResponseCodeIs(201, $ch,X2_TEST_DEBUG_LEVEL > 1?$response:'');\n $trigger = ApiHook::model()->findByAttributes($hook);\n\n // 2. Create a contact\n $contact = array(\n 'firstName' => 'Walter',\n 'lastName' => 'White',\n 'email' => '[email protected]',\n 'visibility' => 1\n );\n $ch = curl_init(TEST_BASE_URL.'api2/Contacts');\n $options = array(\n CURLOPT_POSTFIELDS => json_encode($contact),\n CURLOPT_HTTPHEADER => array('Content-Type: application/json'),\n CURLOPT_POST => true,\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_HEADER => true\n );\n foreach($this->authCurlOpts() as $opt=>$optVal)\n $options[$opt] = $optVal;\n curl_setopt_array($ch,$options);\n $response = curl_exec($ch);\n $c = Contacts::model()->findByAttributes($contact);\n $this->assertResponseCodeIs(201, $ch);\n $this->assertNotEmpty($c);\n\n // 3. Test that the receiving end got the payload\n $outputDir = implode(DIRECTORY_SEPARATOR, array(\n Yii::app()->basePath,\n 'tests',\n 'data',\n 'output'\n ));\n $this->assertFileExists($outputDir.DIRECTORY_SEPARATOR.\"hook_$hookName.json\");\n $contactPulled = json_decode(file_get_contents($outputDir.\n DIRECTORY_SEPARATOR.\"hook_pulled_$hookName.json\"),1);\n foreach($contact as $field=>$value) {\n $this->assertEquals($value,$contactPulled[$field]);\n }\n }", "public function api_entry_subscribeAPN() {\n parent::validateParams(array('user', 'udid', 'devicetoken'));\n\n $users = $this->Mdl_Users->get($_POST[\"user\"]);\n\n if (!$this->Mdl_Users->get($_POST[\"user\"])) parent::returnWithErr(\"User id is not valid.\");\n\n $user = $this->Mdl_Users->update(array(\n 'id' => $_POST[\"user\"],\n 'udid' => $_POST[\"udid\"],\n 'devicetoken' => $_POST[\"devicetoken\"]\n ));\n\n parent::returnWithoutErr(\"Subscription has been done successfully.\", $user);\n }", "public function subscribe($channels);", "function callSample(): void\n{\n $contactEmail = '[EMAIL]';\n $contactNotificationCategorySubscriptionsElement = NotificationCategory::NOTIFICATION_CATEGORY_UNSPECIFIED;\n $contactLanguageTag = '[LANGUAGE_TAG]';\n\n update_contact_sample(\n $contactEmail,\n $contactNotificationCategorySubscriptionsElement,\n $contactLanguageTag\n );\n}", "function hook_message_subscribe_get_subscribers_alter(&$uids, $values) {\n\n}", "protected function addSubscriber(User $user)\n {\n $this->addCc($user);\n }", "public function subscribe()\n\t{\n\n\t\t\t$this->data['user'] = $this->subscriber_m->get_new();\t\t\n\t\t//setup the form\n\t\t$rules=$this->subscriber_m->_rules_page;\n\t\t$this->form_validation->set_rules($rules);\n\t\t\n\t\t//process the form \n\t\tif($this->form_validation->run() == TRUE)\n\t\t{\n\t\t\t$data = $this->subscriber_m->array_from_post(array('semail'));\n\t\t\t$this->subscriber_m->save($data);\n//\t\t\tredirect('/');\n\t\t\t\n\t\t}\n\t\t//load SUBSCRIBER view\n\t\t$this->load->view('sidebar',$this->data);\n\t}", "public function subscribe($events)\n {\n $events->listen('Swapbot\\Events\\CustomerAddedToSwap', 'Swapbot\\Handlers\\Events\\CustomerEmailHandler@customerAddedToSwap');\n $events->listen('Swapbot\\Events\\SwapWasConfirmed', 'Swapbot\\Handlers\\Events\\CustomerEmailHandler@swapWasConfirmed');\n $events->listen('Swapbot\\Events\\SwapWasCompleted', 'Swapbot\\Handlers\\Events\\CustomerEmailHandler@swapWasCompleted');\n $events->listen('Swapbot\\Events\\SwapWasPermanentlyErrored', 'Swapbot\\Handlers\\Events\\CustomerEmailHandler@swapWasPermanentlyErrored');\n }", "public function processSubscriptions()\n {\n $subscriptions = new Calendar\\Subscriptions(array('calendar_id'=>$this->id));\n foreach ($subscriptions as $subscription) {\n $subscriptions->process();\n }\n }", "abstract public function add_subscription( Payment_Subscription $subscription );", "function subscribe_user_to_list($user, $api_key, $client_id, $list_id) {\n $cm = new CampaignMonitor($api_key, $client_id, null, $list_id);\n\n $cm or die(\"Unable to connect to CampaignMonitor API, error: \".$cm->errorMessage);\n\n $result = $cm->subscriberAddWithCustomFields($user['email'],\n $user['email'], $user['first_name'] . ' ' . $user['last_name']);\n\n ($result['Code'] == 0 or preg_match(\"/already subscribed/i\", $result['Message']) or preg_match(\"/Email Address exists/i\", $result['Message'])) or\n\t die(\"Unable to load call subscriberAddWithCustomFields()! \" .\n \"CampaignMonitor reported error:\\n\\tCode=\" . $result['Code'] .\n \"\\n\\tMsg=\" . $result['Message'] . \"\\n\");\n\n return true; // All's well.\n}", "public function addSubscriber($list_identifier, $arguments)\n {\n $sEmail = $arguments['email'];\n $sStatus = 'normal';\n $sPrefix = null;\n $sPhone = null;\n list($sFirstName, $sLastName) = $this->_getNameParts($arguments['name']);\n $sSuffix = null;\n $sStreet = null;\n $sStreet2 = null;\n $sCity = null;\n $sState = null;\n $sPostalCode = null;\n $sPhone = $arguments['phone'];\n\n try {\n\n /** @var Thrive_Api_iContact $api */\n $api = $this->getApi();\n\n $contact = $api->addContact($sEmail, $sStatus, $sPrefix, $sFirstName, $sLastName, $sSuffix, $sStreet, $sStreet2, $sCity, $sState, $sPostalCode, $sPhone);\n if (empty($contact) || !is_object($contact) || empty($contact->contactId)) {\n throw new Thrive_Api_iContact_Exception('Unable to save contact');\n }\n\n $api->subscribeContactToList($contact->contactId, $list_identifier);\n\n return true;\n\n } catch (Thrive_Api_iContact_Exception $e) {\n\n return $e->getMessage();\n\n } catch (Exception $e) {\n\n return $e->getMessage();\n }\n\n }", "public function add_subscriber( $email, $data = array() ){\n $first_name = $data['first_name'];\n $first_name['value'] = ! empty( $first_name['value'] ) ? $first_name['value'] : '';\n $first_name['name'] = ! empty( $first_name['name'] ) ? $first_name['name'] : 'first_name';\n\n $last_name = $data['last_name'];\n $last_name['value'] = ! empty( $last_name['value'] ) ? $last_name['value'] : '';\n $last_name['name'] = ! empty( $last_name['name'] ) ? $last_name['name'] : 'last_name';\n\n //Datos necesarios para la suscripción\n $params = array();\n $params['email'] = $email;\n $params['ip_address'] = $_SERVER['REMOTE_ADDR'];\n $params['custom_fields'] = array();\n\n $data['custom_fields'][$first_name['name']] = $first_name['value'];\n $data['custom_fields'][$last_name['name']] = $last_name['value'];\n\n if( ! empty( $data['custom_fields'] ) ){\n foreach( $data['custom_fields'] as $cf_name => $cf_value ){\n $new_name = Functions::string_to_underscore( $cf_name );//Sólo acepta nombre en underscore\n if( $new_name == 'eu_consent' && $cf_value ){\n $params['eu_consent'] = 'granted';//GDPR (granted, denied)\n } else {\n $params['custom_fields'][$new_name] = $cf_value;\n }\n }\n }\n\n //Suscribir nuevo usuario\n $this->ironman->set_option( 'encode_body', true );//La petición requiere datos en formato json\n $success = $this->new_request( \"POST\", \"$this->account_id/subscribers\", array( 'subscribers' => array( $params ) ) );\n\n return $success;\n }", "public function subscribe_contact( $email = '', $args = [], $list_id = '' ) {\n if ( ! $email ) {\n return false;\n }\n $email = sanitize_email( $email );\n $list_id = $this->sanitize_list_id( $list_id );\n if ( empty( $list_id ) ) {\n return false;\n }\n $member_hash = $this->get_email_hash( $email );\n $endpoint = \"/lists/$list_id/members/$member_hash\";\n $default_args = [\n 'email_address' => $email,\n 'email_type' => 'html',\n 'status' => 'subscribed',\n 'status_if_new' => 'subscribed',\n 'ip_signup' => $_SERVER['REMOTE_ADDR'],\n 'interests' => [],\n ];\n $args = wp_parse_args( $args, $default_args );\n return $this->put_request( $endpoint, $args );\n }", "function set_subscriber($data, $oldId){\n $query = updateRecord(TAB_SUBSCRIBERS, $data, \"id = $oldId\");\n return $query;\n}", "public function subscribe(SubscriptionRequestEntity $requestEntity);", "public function addContact(ContactInterface $contact);", "private function reassignUserSubscriptions($remembered_subscriptions, $to_user) {\n if($remembered_subscriptions) {\n $batch = new DBBatchInsert(TABLE_PREFIX . 'subscriptions', array('parent_type', 'parent_id', 'user_id', 'user_name', 'user_email'), 50, DBBatchInsert::REPLACE_RECORDS);\n\n $escaped_user_id = DB::escape($to_user->getId());\n $escaped_user_name = DB::escape($to_user->getDisplayName());\n $escaped_user_email = DB::escape($to_user->getEmail());\n\n foreach($remembered_subscriptions as $type => $ids) {\n $escaped_type = DB::escape($type);\n\n foreach($ids as $id) {\n $batch->insertEscapedArray(array($escaped_type, DB::escape($id), $escaped_user_id, $escaped_user_name, $escaped_user_email));\n } // foreach\n } // foreach\n\n $batch->done();\n } // if\n }", "public function subscribe($events)\n {\n $events->listen(\n 'App\\Events\\CreateCommsExecs',\n 'App\\Listeners\\CommsExecsEventSubscriber@onCreate'\n );\n\n $events->listen(\n 'App\\Events\\DeleteCommsExecs',\n 'App\\Listeners\\CommsExecsEventSubscriber@onDelete'\n );\n\n $events->listen(\n 'App\\Events\\UpdateCommsExecs',\n 'App\\Listeners\\CommsExecsEventSubscriber@onUpdate'\n );\n }", "public function edit(Subscribe $subscribe)\n {\n //\n }", "public function subscribe($force = FALSE);", "public function customerProductReview($observer)\n{ \n \n $settings = Mage::helper('smsnotifications/data')->getSettings();\n $customer = Mage::getSingleton('customer/session')->getCustomer();\n $fname=$customer->getFirstname();\n $lname=$customer->getLastname();\n $email= $customer->getEmail();\n\n $telephone= $customer->getAddressesCollection()->getFirstitem()->getTelephone();\n if ($telephone){\n $text = Mage::getStoreConfig('smsnotifications/customer_notification/customer_review');\n $text = str_replace('{{firstname}}', $fname, $text);\n $text = str_replace('{{lastname}}', $lname, $text);\n $text = str_replace('{{emailid}}', $email, $text);\n // $text = str_replace('{{name}}', $customer_name, $text);\n }\n array_push($settings['order_noficication_recipients'], $telephone);\n\n $result = Mage::helper('smsnotifications/data')->sendSms($text, $settings['order_noficication_recipients']);\n return($result);\n}", "public function subscribeBy($userId = null);", "public function addContact(\\aruba_telemetry\\Contact $value)\n {\n if ($this->contact === null) {\n $this->contact = new \\Protobuf\\MessageCollection();\n }\n\n $this->contact->add($value);\n }", "private function _add_subscriber($form_id, $data)\n\t{\n\t\t$this->EE->load->model('subscriber_forms_model');\n\t\t$this->EE->load->helper('email');\n\t\t\n\t\t$settings = $this->EE->subscriber_forms_model->get(array('id' => $form_id));\n\n\t\tif (\n\t\t\t\t(\n\t\t\t\t\t$settings->method == 'everyone'\n\t\t\t\t\tOR $this->EE->input->get_post($settings->switch_field) == $settings->switch_value \n\t\t\t\t)\n\t\t\t\tAND valid_email($data[$settings->email_field]) \n\t\t\t) \n\t\t{\n\t\t\tswitch ($settings->provider)\n\t\t\t{\n\t\t\t\tcase 'mailchimp':\n\t\t\t\t\t$this->_send_to_mailchimp($data, $settings);\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'campaign_monitor':\n\t\t\t\tdefault:\n\t\t\t\t\t$this->_send_to_campaign_monitor($data, $settings);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public function subscribe($subscriber, $startDateTime = null, $createInvoice = true, $user = null) {\n\t\tif ($this->isNewRecord) throw new \\Exception('Subscription package is not yet saved. ');\n\t\t\t\n\t\tif ($subscriber instanceof User) {\n\t\t\t$user = $subscriber;\n\t\t\tif (!$user->id) throw new \\Exception('User is not an valid user. ');\n\t\n\t\t\t$billTo = $user;\n\t\t} else if ($subscriber instanceof Organization || $subscriber instanceof OldOrganizationClass) {\n\t\t\t$organization = $subscriber;\n\t\t\tif (!$organization->id) throw new \\Exception('Organization is not an valid organization. ');\n\t\t\t$billTo = $organization;\n\t\t} else {\n\t\t\tthrow new \\Exception('Subscriber must be instance of either User or Organization. ');\n\t\t}\n\t\t\n\t\t$items = SubscriptionPackageItem::findAll(['package_id' => $this->id]);\n\t\t\n\t\t$transaction = Yii::$app->db->beginTransaction();\n\t\t\n\t\ttry {\n\t\t\tif ($createInvoice) {\n\t\t\t\tif (!isset($user->profile->contact)) throw new \\Exception('Cannot issue invoice to user (user ID: '.$user->id.') without default contact info. ');\n\n\t\t\t\t$invoice = Invoice::createFromBillableItem($this, $billTo);\n\t\t\t}\n\t\t\t\n\t\t\t$bundle = new SubscriptionBundle;\n\t\t\t$bundle->attributes = $this->attributes;\n\t\t\t$bundle->invoice_id = isset($invoice) ? $invoice->id : null;\n\t\t\t$bundle->package_id = $this->id;\n\t\t\t$bundle->organization_id = isset($organization) ? $organization->id : null;\n\t\t\tif (!$bundle->save()) throw new \\Exception('Failed to create bundle. '.print_r($bundle->errors, 1));\n\t\t\t\n\t\t\tforeach ($items as $item) {\n\t\t\t\t\n\t\t\t\t$subscription = new Subscription;\n\t\t\t\t$subscription->bundle_id = $bundle->id;\n\t\t\t\t\n\t\t\t\t$subscription->attributes = [\n\t\t\t\t\t'subscription_identity' => $item->subscription_identity,\n\t\t\t\t\t'price' => $this->price,\n\t\t\t\t\t'purchased_unit' => $item->unit,\n\t\t\t\t\t'used_unit' => 0,\n\t\t\t\t\t'content_valid_period' => $item->content_valid_period,\n\t\t\t\t\t'content_valid_period_type' => $item->content_valid_period_type,\n\t\t\t\t\t'invoice_id' => isset($invoice) ? $invoice->id : null,\n\t\t\t\t\t'priority' => $item->priority,\n\t\t\t\t];\n\t\t\t\tif (isset($user)) $subscription->owned_by = $user->id;\n\t\t\t\t\n\t\t\t\t$subscription->package_id = $this->id;\n\t\t\t\t$subscription->owned_by = isset($user) ? $user->id : null;\n\t\t\t\t$subscription->setExpireAt($item->valid_period, $item->valid_period_type, true, $startDateTime);\n\t\t\t\t\n\t\t\t\tif (!$subscription->save()) throw new \\Exception('Failed to create subscription. '.print_r($subscription->errors, 1));\n\t\t\t}\n\t\t\t\n\t\t\t$transaction->commit();\n\t\t\t\n\t\t\treturn $bundle;\n\t\t} catch (\\Exception $ex) {\n\t\t\t$transaction->rollback();\n\t\t\tthrow $ex;\n\t\t}\n\t}", "function sttv_mailinglist_subscribe( $email = '', $firstname = '', $lastname = '' ) {\n\tif ( empty( $email ) || empty( $firstname ) || empty( $lastname ) ) {\n\t\treturn new \\WP_Error( 'null_body', 'The request body cannot be empty for this endpoint.', 400 );\n\t}\n\t\n\treturn wp_remote_post( 'https://us7.api.mailchimp.com/3.0/lists/df497b5cbd/members/'.md5( strtolower( $email ) ),\n\t\t[\n\t\t\t'headers' => [\n\t\t\t\t'Authorization' => 'apikey '.MAILCHIMP_API_KEY,\n\t\t\t\t'Content-Type' => 'application/json',\n\t\t\t\t'X-HTTP-Method-Override' => 'PUT',\n\t\t\t\t'User Agent' => STTV_UA\n\t\t\t],\n\t\t\t'body' => json_encode([\n\t\t\t\t'email_address' => $email,\n\t\t\t\t'status' => 'subscribed',\n\t\t\t\t'status_if_new' => 'subscribed',\n\t\t\t\t'merge_fields' => [\n\t\t\t\t\t'FNAME' => $firstname,\n\t\t\t\t\t'LNAME' => $lastname\n\t\t\t\t],\n\t\t\t\t'ip_signup' => $_SERVER['REMOTE_ADDR']\n\t\t\t])\n\t\t]\n\t);\n\n}", "function evel_list_subscribe($scope, $tag, $address, $isadmin = null) {\n global $evel_client;\n $params = func_get_args();\n $result = $evel_client->call('EvEl.list_subscribe', $params);\n return $result;\n}", "public function addSubscription()\n {\n $custId = $this->request->id;\n $customerObj = $this->_customer->find($custId);\n if (! is_object($customerObj)) {\n return false;\n }\n $fromDate = $this->request->start_date;\n $planId = $this->request->subscription_plan;\n $orderId = $this->request->orderid;\n $getPlan = SubscriptionPlan::where('id', $planId)->first();\n $duration = $getPlan->duration;\n $planName = $getPlan->name;\n $date = Carbon::createFromFormat('d-m-Y', $fromDate);\n $fromDate = Carbon::createFromFormat('d-m-Y', $fromDate)->format('Y-m-d');\n $endDate = $date->addDays($duration);\n $customerObj->expires_at = $endDate;\n $customerObj->save();\n $subscriber = new Subscribers();\n $subscriber->subscription_plan_id = $planId;\n $subscriber->customer_id = $custId;\n $subscriber->start_date = $fromDate;\n $subscriber->end_date = $endDate;\n $subscriber->is_active = 1;\n $subscriber->save();\n $paymentTrans = new PaymentTransactions();\n $paymentTrans->payment_method_id = 2;\n $paymentTrans->customer_id = $custId;\n $paymentTrans->status = \"Success\";\n $paymentTrans->transaction_message = \"Success\";\n $paymentTrans->transaction_id = $orderId;\n $paymentTrans->response = \"Success\";\n $paymentTrans->plan_name = $planName;\n $paymentTrans->subscriber_id = $custId;\n $paymentTrans->subscription_plan_id = $planId;\n $paymentTrans->save();\n return true;\n }", "public function cronNotifyRecipients()\n\t{\n\t\t// Check if notifications should be send.\n\t\tif (!$GLOBALS['TL_CONFIG']['avisota_send_notification'])\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t$this->loadLanguageFile('avisota_subscription');\n\n\t\t$entityManager = EntityHelper::getEntityManager();\n\t\t$subscriptionRepository = $entityManager->getRepository('Avisota\\Contao:RecipientSubscription');\n\t\t$intCountSend = 0;\n\n\t\t$resendDate = $GLOBALS['TL_CONFIG']['avisota_notification_time'] * 24 * 60 * 60;\n\t\t$now = time();\n\n\t\t// Get all recipients.\n\t\t$queryBuilder = EntityHelper::getEntityManager()->createQueryBuilder();\n\t\t$queryBuilder\n\t\t\t\t->select('r')\n\t\t\t\t->from('Avisota\\Contao:Recipient', 'r')\n\t\t\t\t->innerJoin('Avisota\\Contao:RecipientSubscription', 's', 'WITH', 's.recipient=r.id')\n\t\t\t\t->where('s.confirmed=0')\n\t\t\t\t->andWhere('s.reminderCount < ?1')\n\t\t\t\t->setParameter(1, $GLOBALS['TL_CONFIG']['avisota_notification_count']);\n\t\t$queryBuilder->orderBy('r.email');\n\t\t\n\t\t// Execute Query.\n\t\t$query = $queryBuilder->getQuery();\n\t\t$integratedRecipients = $query->getResult();\n\t\t\n\t\t// Check each recipient with open subscription.\n\t\tforeach ($integratedRecipients as $integratedRecipient)\n\t\t{\n\t\t\t$subscriptions = $subscriptionRepository->findBy(array('recipient' => $integratedRecipient->id, 'confirmed' => 0), array('updatedAt' => 'asc'));\n\t\t\t$tokens = array();\n\t\t\t$blnNotify = false;\n\n\t\t\tforeach ($subscriptions as $subscription)\n\t\t\t{\n\t\t\t\t// Check if we are over the $resendDate date.\n\t\t\t\tif (($subscription->updatedAt->getTimestamp() + $resendDate) > $now)\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Set some data.\n\t\t\t\t$blnNotify = true;\n\t\t\t\t$tokens[] = $subscription->getToken();\n\n\t\t\t\t// Update the subscription.\n\t\t\t\t$subscription->updatedAt = new \\Datetime();\n\t\t\t\t$subscription->reminderSent = new \\Datetime();\n\t\t\t\t$subscription->reminderCount = $subscription->reminderCount + 1;\n\n\t\t\t\t// Save.\n\t\t\t\t$entityManager->persist($subscription);\n\t\t\t}\n\n\t\t\t// Check if we have to send a notify and if we have a subscription module.\n\t\t\tif ($blnNotify && $subscription->getSubscriptionModule())\n\t\t\t{\n\t\t\t\t$subscription = $subscriptions[0];\n\n\t\t\t\t$parameters = array(\n\t\t\t\t\t'email' => $integratedRecipient->email,\n\t\t\t\t\t'token' => implode(',', $tokens),\n\t\t\t\t);\n\n\t\t\t\t$arrPage = $this->Database\n\t\t\t\t\t\t->prepare('SELECT * FROM tl_page WHERE id = (SELECT avisota_form_target FROM tl_module WHERE id = ?)')\n\t\t\t\t\t\t->limit(1)\n\t\t\t\t\t\t->execute($subscription->getSubscriptionModule())\n\t\t\t\t\t\t->fetchAssoc();\n\n\t\t\t\t$objNextPage = $this->getPageDetails($arrPage['id']);\n\t\t\t\t$strUrl = $this->generateFrontendUrl($objNextPage->row(), null, $objNextPage->rootLanguage);\n\n\t\t\t\t$url = $this->generateFrontendUrl($arrPage);\n\t\t\t\t$url .= (strpos($url, '?') === false ? '?' : '&');\n\t\t\t\t$url .= http_build_query($parameters);\n\n\t\t\t\t$newsletterData = array();\n\t\t\t\t$newsletterData['link'] = (object) array(\n\t\t\t\t\t\t\t'url' => \\Environment::getInstance()->base . $url,\n\t\t\t\t\t\t\t'text' => $GLOBALS['TL_LANG']['avisota_subscription']['confirmSubscription'],\n\t\t\t\t);\n\n\t\t\t\t// Try to send the email.\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\t$this->sendMessage($integratedRecipient, $GLOBALS['TL_CONFIG']['avisota_notification_mail'], $GLOBALS['TL_CONFIG']['avisota_default_transport'], $newsletterData);\n\t\t\t\t}\n\t\t\t\tcatch (\\Exception $exc)\n\t\t\t\t{\n\t\t\t\t\t$this->log(sprintf('Unable to send reminder to \"%s\" with error message - %s', $integratedRecipient->email, $exc->getMessage()), __CLASS__ . ' | ' . __FUNCTION__, TL_ERROR);\n\t\t\t\t}\n\n\t\t\t\t// Update recipient;\n\t\t\t\t$integratedRecipient->updatedAt = new \\DateTime();\n\n\t\t\t\t// Set counter.\n\t\t\t\t$intCountSend++;\n\t\t\t}\n\n\t\t\t// Send only 5 mails per run.\n\t\t\tif ($intCountSend >= 5)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t$entityManager->flush();\n\t}", "public abstract function subscribe(Subject $subject);", "public function subscribe_user(){\n if( ! $this->is_valid_nonce( 'mpp_ajax_nonce' ) ){\n die();\n }\n $subscription = new Subscription( $this->plugin, $_POST );\n if( $subscription->has_fields() ){\n $subscription->execute();\n }\n wp_send_json( $subscription->result );\n }", "public function subscribe()\n {\n $url = 'https://api.instagram.com/v1/subscriptions/';\n $params = [\n 'client_id' => $this->getClientId(),\n 'client_secret' => $this->getClientSecret(),\n 'object' => 'user',\n 'aspect' => 'media',\n 'verify_token' => '592180',\n 'callback_url' => $this->_url->sessionUrlVar(\n $this->_url->getUrl($this->subscribe_redirect)\n )\n ];\n $this->_httpRequest($url, 'POST', $params);\n }", "function addSubscription() {\r\n if(isset($_REQUEST['corp_id'])) {\r\n $arrArg=array(\r\n \"id\"=>$_SESSION['id'],\r\n \"corp_id\"=>$_REQUEST['corp_id']\r\n );\r\n $result=loadModel(\"subscription\",\"addSubscription\",$arrArg);\r\n if ($result == true) {\r\n echo \"Subscribed\";\r\n } else {\r\n echo \"Error! Try later\";\r\n }\r\n }\r\n }", "public function removeSubscribes();", "public function Subscribe() {\n\t\t// Process pending messages if any\n\t\t$this->ProcessPendingMessages();\n\t\t// Subscribe\n\t\t$this->GetSubsConn()->subscribe(\n\t\t\t[$this->GetChannel()],\n\t\t\t[$this, 'SubscribeCallback']\n\t\t);\n\t}", "function update_contact_sample(\n string $contactEmail,\n int $contactNotificationCategorySubscriptionsElement,\n string $contactLanguageTag\n): void {\n // Create a client.\n $essentialContactsServiceClient = new EssentialContactsServiceClient();\n\n // Prepare the request message.\n $contactNotificationCategorySubscriptions = [$contactNotificationCategorySubscriptionsElement,];\n $contact = (new Contact())\n ->setEmail($contactEmail)\n ->setNotificationCategorySubscriptions($contactNotificationCategorySubscriptions)\n ->setLanguageTag($contactLanguageTag);\n $request = (new UpdateContactRequest())\n ->setContact($contact);\n\n // Call the API and handle any network failures.\n try {\n /** @var Contact $response */\n $response = $essentialContactsServiceClient->updateContact($request);\n printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());\n } catch (ApiException $ex) {\n printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());\n }\n}", "private function subscribeUser()\n {\n try\n {\n $request = $_POST;\n\n $uid = userid();\n\n if (!$uid)\n throw_error_msg( lang(\"you_not_logged_in\") ) ;\n\n if( !isset($request['subscribed_to']) || $request['subscribed_to']==\"\" )\n throw_error_msg(\"subscribed to not provided\");\n\n if( !is_numeric($request['subscribed_to']) )\n throw_error_msg(\"invalid subscribed to\");\n\n global $userquery;\n $userquery->subscribe_user($request['subscribed_to']);\n \n if( error() )\n {\n throw_error_msg(error('single')); \n }\n\n if( msg() )\n {\n $data = array('code' => \"200\", 'status' => \"success\", \"msg\" => 'subscribed successfully', \"data\" => array());\n $this->response($this->json($data));\n } \n\n }\n catch(Exception $e)\n {\n $this->getExceptionDelete($e->getMessage());\n }\n }", "public function assigncredits(Varien_Event_Observer $observer)\n{\n $customer = $observer->getCustomer();\n$arr = array();\n$arr1 = array();\n //Mage::log($customer->getEmail());\n //Mage::log($customer->getId().\"customer id\");\n$currentTimestamp = Mage::getModel('core/date')->timestamp(time()); \n$nowdate = date('Y-m-d H:m:s', $currentTimestamp); //current data\n$collection = Mage::getModel('kartparadigm_storecredit/sendcreditstofriend')->getCollection()->addFieldToFilter('receiver_email',$customer->getEmail())->addFieldToFilter('status',0); //retriving values from sendcreditstofriend\n//Mage::log(count($collection));\n$arr = array();\nif(count($collection) > 0){\nforeach($collection as $col){\n//Mage::log($col['s_id'].\"sender id\");\nif($col['status'] == 0){\n\n$arr1['c_id'] = $customer->getId();\n $arr1['website1'] = \"Main Website\";\n $arr1['action_credits'] = $col['credits'];\n $arr1['total_credits'] = $col['credits'];\n $arr1['action'] = \"Updated\";\n $arr1['state'] = 0;\n $arr1['store_view'] = Mage::app()->getStore()->getName();\n $arr1['action_date'] = $nowdate;\n $arr1['custom_msg'] = \"Send By : \" . $col['sname'].\" Message( \".$col['message'].\" )\";\n $arr1['customer_notification_status'] = 'No';\n\n$arr['status'] = 1;\n\n$id = $col['receiver_id'];\n\n $table1 = Mage::getModel('kartparadigm_storecredit/creditinfo');\n$table1->setData($arr1);\n\n$table2 = Mage::getModel('kartparadigm_storecredit/sendcreditstofriend')->load($id)->addData($arr);\n\n/*-------------------------------------------------------------------------------------*/\ntry{\n\n$table1->save();\n$table2->setId($id)->save();\n//$this->_redirect('*/*/');\n\n}catch(Exception $e){\nMage::log($e);\n}\n\n\n\n}//end if\n}//end foreach \n}//end if\n}", "public function add_cc(EmailContact $contact) {\n\t\t\t$this->cc[] = $contact;\n\t\t}", "public function subscribe(PlanPrice $price, Carbon $started_at, $settings) {\n $ended_at = Carbon::parse($started_at)->addDays(config()->get('subscription.billing_day'));\n\n switch (strtolower($price->recurring_opt)) {\n case 'day':\n $ended_at->addDays($price->recurring_val);\n break;\n case 'month':\n $ended_at->addMonthsNoOverflow($price->recurring_val);\n break;\n case 'year':\n $ended_at->addYearNoOverflow($price->recurring_val);\n break;\n default:\n break;\n }\n\n return Subscription::create([\n 'user_id' => $this->id,\n 'plan_price_id' => $price->id,\n 'started_at' => $started_at,\n 'ended_at' => $ended_at,\n 'settings' => $settings\n ]);\n }", "public function onAddCustomer($event)\n\t{\n\t\t$this->init();\n\n\t\t$objCustomer = $event->objCustomer;\n\n\t\tif($objCustomer->newsletter_subscribe)\n\t\t{\n\t\t\t$intListId = $this->getListId($this->objModule->getConfig('list'));\n\n\t\t\tif (!is_null($intListId))\n\t\t\t{\n\t\t\t\t$merge_vars = array(\n\t\t\t\t\t'FNAME'=>$objCustomer->first_name,\n\t\t\t\t\t'LNAME'=>$objCustomer->last_name,\n\t\t\t\t\t'OPTIN_IP'=>_xls_get_ip(),\n\t\t\t\t\t'OPTIN_TIME'=>date(\"Y-m-d H:i:s\"),\n\t\t\t\t\t'GROUPINGS'=>array(),\n\t\t\t\t\t'double_optin'=>false, //since we already have the opt-in checkbox on our form\n\t\t\t\t\t'update_existing'=>true,\n\t\t\t\t\t'send_welcome'=>true,\n\n\t\t\t\t);\n\n\t\t\t\t$this->api->listSubscribe($intListId, $objCustomer->email,$merge_vars);\n\n\t\t\t\tif ($this->api->errorCode)\n\t\t\t\t{\n\t\t\t\t\tYii::log(\"Unable to load listSubscribe() Code=\".$this->api->errorCode.\" Msg=\".$this->api->errorMessage, 'error', 'application.'.__CLASS__.\".\".__FUNCTION__);\n\t\t\t\t\treturn false;\n\t\t\t\t} else\n\t\t\t\t\treturn true;\n\n\t\t\t} else {\n\t\t\t\tYii::log(\"Mailchimp - can't find list \".$this->objModule->getConfig('list'), 'error', 'application.'.__CLASS__.\".\".__FUNCTION__);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else return true; //if the person doesn't want to subscribe, return true because it's not an error result, just do nothing\n\n\t}", "public function subscribeDuringCheckout($order)\n {\n // If subscription option chosen, then subscribe\n if (isset($_REQUEST['emailchef_subscribe2']) && $_REQUEST['emailchef_subscribe2']) {\n try {\n Mage::getModel('newsletter/subscriber')->subscribe($order->getCustomerEmail());\n } catch (Exception $e) {\n }\n }\n }", "public function subscribeOn(): array\n {\n }", "public function setAutoResponderCC($value) { $this->_autoResponderCC = $value; }", "function chch_popup_pro_agile_set_adapter() {\n if(!empty($_POST['_chch_pop_up_pro_newsletter_adapter'])) {\n $_POST['_chch_pop_up_pro_newsletter_adapter'] = 'AgileCRM';\n }\n}", "function registerNewSubscription($data, $aa_inst_id){\r\n\t\t//global $global;\r\n\t\t//$db = $global->db;\r\n $db=getDb();\r\n\t\t\r\n\t\t// Decode and assign data to variables\r\n\t\t$data = explode(';', base64_decode($data));\r\n\t\t$email = $data[0];\r\n\t\t$name = $data[1];\r\n\r\n\t\t// Update table app_participation, columns timestam, ip, newsletter_registration\r\n\t\t// Get fb_user_id from email-address\r\n\t\t$sql = \"SELECT `fb_user_id` FROM `user_data` WHERE `email`='\" . $email . \"'\";\r\n\t\t$fb_user_id = $db->fetchOne($sql);\r\n\t\t// Get client IP\r\n\t\tif ( isset($_SERVER[\"REMOTE_ADDR\"]))\r\n\t\t\t$client_ip = $_SERVER[\"REMOTE_ADDR\"];\r\n\t\telse if ( isset($_SERVER[\"HTTP_X_FORWARDED_FOR\"]))\r\n\t\t\t$client_ip = $_SERVER[\"HTTP_X_FORWARDED_FOR\"];\r\n\t\telse if ( isset($_SERVER[\"HTTP_CLIENT_IP\"]))\r\n\t\t\t$client_ip = $_SERVER[\"HTTP_CLIENT_IP\"];\r\n\t\t// Set newsletter subscription in DB\r\n\t\t$sql = \"UPDATE `app_participation` SET `ip`='\" . $client_ip . \"', `newsletter_registration`=1 \r\n\t\t\t\tWHERE `aa_inst_id`='$aa_inst_id' AND `fb_user_id`='$fb_user_id'\";\r\n\t\t$res = $db->query($sql);\r\n\t}" ]
[ "0.63231033", "0.6291855", "0.59830886", "0.5907746", "0.5660873", "0.56111187", "0.55985105", "0.5594071", "0.55372757", "0.5529192", "0.55182874", "0.5512006", "0.5487869", "0.5479334", "0.5414964", "0.538628", "0.53782666", "0.53731084", "0.5370639", "0.53357893", "0.53183967", "0.52983254", "0.5285508", "0.5271633", "0.52525616", "0.52314776", "0.5219466", "0.5202317", "0.5197237", "0.51872855", "0.5185567", "0.5180461", "0.5166197", "0.516216", "0.51615447", "0.5146752", "0.514614", "0.51422423", "0.5120967", "0.51139444", "0.5105807", "0.5103485", "0.5098692", "0.50929123", "0.5090548", "0.50873697", "0.50845724", "0.5081693", "0.50707793", "0.506426", "0.50606626", "0.505592", "0.5039687", "0.5027805", "0.50074905", "0.4996846", "0.49924284", "0.4988325", "0.498656", "0.49845582", "0.49765342", "0.49652725", "0.495101", "0.49481288", "0.4939146", "0.49233475", "0.49146566", "0.49033144", "0.4893721", "0.4891662", "0.48805648", "0.4864733", "0.48530316", "0.48498103", "0.48460975", "0.4841071", "0.48389933", "0.4838738", "0.48314857", "0.48289195", "0.4821215", "0.48172763", "0.48093706", "0.48041362", "0.48005491", "0.47998658", "0.47990578", "0.4798158", "0.4796902", "0.47914183", "0.4781378", "0.47771156", "0.47758052", "0.4765557", "0.47633487", "0.4757754", "0.47558665", "0.47556365", "0.47529227", "0.47425792" ]
0.5633172
5
this up() migration is autogenerated, please modify it to your needs
public function up(Schema $schema) : void { $this->addSql('CREATE TABLE user (id INT AUTO_INCREMENT NOT NULL, username VARCHAR(180) NOT NULL, roles JSON NOT NULL, password VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_8D93D649F85E0677 (username), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); $this->addSql('ALTER TABLE record MODIFY idrecord INT NOT NULL'); $this->addSql('ALTER TABLE record DROP PRIMARY KEY'); $this->addSql('ALTER TABLE record CHANGE name name VARCHAR(45) NOT NULL, CHANGE email email VARCHAR(45) NOT NULL, CHANGE content content VARCHAR(255) NOT NULL, CHANGE idrecord id INT AUTO_INCREMENT NOT NULL'); $this->addSql('ALTER TABLE record ADD PRIMARY KEY (id)'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function up();", "abstract public function up();", "abstract public function up();", "abstract public function up();", "public function up()\n {\n $this->execute(\"\n ALTER TABLE `tcmn_communication` \n CHANGE `tcmn_pprs_id` `tcmn_pprs_id` SMALLINT(5) UNSIGNED NULL COMMENT 'person',\n CHANGE `tcmn_tmed_id` `tcmn_tmed_id` TINYINT(4) UNSIGNED NULL COMMENT 'medijs';\n \");\n }", "public function up()\n {\n // This migration was removed, but fails when uninstalling plugin\n }", "public function up()\n {\n $this->execute(\"\n\n ALTER TABLE `cucp_user_company_position` \n ADD COLUMN `cucp_role` CHAR(20) NULL AFTER `cucp_name`;\n\n \");\n }", "public function up()\n\t{\n\t\t$this->dbforge->add_column($this->table, $this->field);\n\t}", "public function migrateUp()\n {\n //$this->migrate('up');\n $this->artisan('migrate');\n }", "public function up()\n {\n dbexec('ALTER TABLE #__subscriptions_coupons\n ADD `created_on` datetime DEFAULT NULL AFTER `usage`,\n ADD `created_by` bigint(11) unsigned DEFAULT NULL AFTER `created_on`,\n ADD INDEX `created_by` (`created_by`),\n ADD `modified_on` datetime DEFAULT NULL AFTER `created_by`,\n ADD `modified_by` bigint(11) unsigned DEFAULT NULL AFTER `modified_on`,\n ADD INDEX `modified_by` (`modified_by`) \n ');\n \n dbexec('ALTER TABLE #__subscriptions_vats\n ADD `created_on` datetime DEFAULT NULL AFTER `data`,\n ADD `created_by` bigint(11) unsigned DEFAULT NULL AFTER `created_on`,\n ADD INDEX `created_by` (`created_by`),\n ADD `modified_on` datetime DEFAULT NULL AFTER `created_by`,\n ADD `modified_by` bigint(11) unsigned DEFAULT NULL AFTER `modified_on`,\n ADD INDEX `modified_by` (`modified_by`) \n ');\n }", "public function up()\n\t{\n\t\t$this->dbforge->modify_column($this->table, $this->field);\n\t}", "public function safeUp()\n {\n $this->createTable(\n $this->tableName,\n [\n 'id' => $this->primaryKey(),\n 'user_id' => $this->integer(). ' UNSIGNED NOT NULL' ,\n 'source' => $this->string()->notNull(),\n 'source_id' => $this->string()->notNull(),\n ],\n 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'\n );\n\n $this->addForeignKey('fk_social_auth_user_id_to_user_id', $this->tableName, 'user_id', '{{%user}}', 'id', 'CASCADE', 'CASCADE');\n }", "public function up()\n {\n }", "public function up()\n {\n $user = $this->table('products', ['collation' => 'utf8mb4_persian_ci', 'engine' => 'InnoDB']);\n $user\n ->addColumn('name', STRING, [LIMIT => 20])\n ->addColumn('count', STRING, [LIMIT => 75])\n ->addColumn('code', STRING, [LIMIT => 100])\n ->addColumn('buy_price', STRING, [LIMIT => 30])\n ->addColumn('sell_price', STRING, [LIMIT => 30])\n ->addColumn('aed_price', STRING, [LIMIT => 50])\n ->addTimestamps()\n ->save();\n }", "public function up()\n {\n // Drop table 'table_name' if it exists\n $this->dbforge->drop_table('lecturer', true);\n\n // Table structure for table 'table_name'\n $this->dbforge->add_field(array(\n 'nip' => array(\n \t'type' => 'VARCHAR(16)',\n\t\t\t\t'null' => true,\n\t\t\t\t'unique' => true\n\t\t\t),\n 'nik' => array(\n \t'type' => 'VARCHAR(16)',\n\t\t\t\t'null' => false,\n\t\t\t\t'unique' => true\n\t\t\t),\n 'name' => array(\n 'type' => 'VARCHAR(24)',\n 'null' => false,\n ),\n\t\t\t'id_study_program' => array(\n\t\t\t\t'type' => 'VARCHAR(24)',\n\t\t\t\t'null' => false,\n\t\t\t)\n\n ));\n $this->dbforge->add_key('nik', true);\n $this->dbforge->create_table('lecturer');\n }", "public function up()\n\t{\n\t\t// are not setting the foreign key constraint, to allow the examination module to work without the intravitreal\n\t\t// injection module being installed\n\t\t$this->addColumn('et_ophciexamination_injectionmanagementcomplex', 'left_treatment_id', 'int(10) unsigned');\n\t\t$this->addColumn('et_ophciexamination_injectionmanagementcomplex', 'right_treatment_id', 'int(10) unsigned');\n\t}", "public function safeUp()\n {\n $this->createTable('tbl_hand_made_item',\n [\n \"id\" => \"int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY\",\n \"price\" => \"integer\",\n \"discount\" => \"integer\",\n \"preview_id\" => \"integer\",\n \"name\" => \"string\",\n \"description\" => \"text\",\n \"short_description\" => \"text\",\n \"slug\" => \"string\",\n ]\n );\n }", "public function preUp()\n {\n }", "public function up()\n\t{\n\t\t// create the purchase_order_details table\n\t\tSchema::create('purchase_order_details', function($table) {\n\t\t\t$table->engine = 'InnoDB';\n\t\t $table->increments('id');\t\t \n\t\t $table->integer('purchase_order_id')->unsigned();//->foreign()->references('id')->on('orders');\n\t\t $table->integer('product_id')->unsigned();//->foreign()->references('id')->on('products');\n\t\t $table->integer('quantity');\t\t \t \n\t\t $table->integer('created_by')->unsigned();//->foreign()->references('id')->on('users');\t\t \n\t\t $table->integer('updated_by')->unsigned();\n\t\t $table->timestamps();\t\t \n\t\t});\t\n\t}", "public function up()\n {\n if (!$this->isEdu()) {\n return;\n }\n \n $this->edu_up();\n }", "public function up()\n\t{\t\t\n\t\tDB::table('professor')->insert(array(\n\t\t\t'user_id'=>'2',\t\t\t\n\t\t\t'created_at'=>date('Y-m-d H:m:s'),\n\t\t\t'updated_at'=>date('Y-m-d H:m:s')\n\t\t));\t\t\n\n\t\tDB::table('professor')->insert(array(\n\t\t\t'user_id'=>'3',\t\t\t\n\t\t\t'created_at'=>date('Y-m-d H:m:s'),\n\t\t\t'updated_at'=>date('Y-m-d H:m:s')\n\t\t));\n\t\t//\n\t}", "public function up()\n {\n $table = $this->table('qobo_translations_translations');\n $table->renameColumn('object_foreign_key', 'foreign_key');\n $table->renameColumn('object_model', 'model');\n $table->renameColumn('object_field', 'field');\n $table->renameColumn('translation', 'content');\n\n if (!$table->hasColumn('locale')) {\n $table->addColumn('locale', 'char', [\n 'default' => null,\n 'limit' => 6,\n ]);\n }\n $table->update();\n\n $table = TableRegistry::getTableLocator()->get(\"Translations.Translations\");\n $entities = $table->find()->all();\n foreach($entities as $entity) {\n $entity->setDirty('locale', true);\n $table->save($entity);\n }\n }", "public function up()\n {\n $this->addForeignKey('tours_fk', 'tours', 'id', 'tour_to_hotel', 'tour_id');\n\n $this->addForeignKey('t2h_fkh', 'tour_to_hotel', 'hotel_id', 'hotels', 'id');\n $this->addForeignKey('t2h_fkt', 'tour_to_hotel', 'tour_id', 'tours', 'id');\n }", "public function safeUp()\r\n {\r\n $this->createTable('tbl_job_application', array(\r\n 'id' => 'pk',\r\n 'job_id' => 'integer NOT NULL',\r\n 'user_id' => 'integer NULL',\r\n 'name' => 'string NOT NULL',\r\n 'email' => 'text NOT NULL',\r\n 'phone' => 'text NOT NULL',\r\n 'resume_details' => 'text NOT NULL',\r\n 'create_date' => 'datetime NOT NULL',\r\n 'update_date' => 'datetime NULL',\r\n ));\r\n }", "public function safeUp() {\n\n $this->createTable('word', [\n 'word_id' => Schema::TYPE_PK,\n 'word_lang_id' => $this->integer(),\n 'word_name' => $this->string(500) . ' NOT NULL',\n 'word_detais' => $this->string(1000),\n ]);\n\n // Add foreign key\n $this->addForeignKey('fk_language_word_1', 'word',\n 'word_lang_id', 'language', 'lang_id', 'CASCADE', 'NO ACTION');\n \n // Create index of foreign key\n $this->createIndex('word_lang_id_idx', 'word', 'word_lang_id');\n }", "public function up()\n {\n $fields = array(\n 'first_login' => array('type' => 'char', 'constraint' => '1', 'default' => '1'),\n );\n $this->dbforge->add_column('user', $fields);\n }", "public function safeUp()\n {\n $this->alterColumn('item_keuangan', 'created_at', \"TIMESTAMP NOT NULL DEFAULT '2000-01-01 00:00:00'\");\n\n /* Tambah Field */\n $this->addColumn('item_keuangan', 'status', \"TINYINT(1) NOT NULL DEFAULT '1' COMMENT '0=tidak aktif; 1=aktif;' AFTER `jenis`\");\n }", "public function up()\n {\n $this->addForeignKey(\n 'fk_category_product_from_category',\n 'category_product',\n 'category_id',\n 'category',\n 'id',\n 'NO ACTION',\n 'NO ACTION'\n );\n\n $this->addForeignKey(\n 'fk_category_product_from_product',\n 'category_product',\n 'product_id',\n 'product',\n 'id',\n 'NO ACTION',\n 'NO ACTION'\n );\n }", "public function up()\n\t{\n\t\t$this->dropColumn('korzet','utca'); \n\t\t$this->addColumn('korzet','utca','string NOT NULL');\n\t}", "public function up()\n {\n // $this->fields()->create([]);\n // $this->streams()->create([]);\n // $this->assignments()->create([]);\n }", "public function up()\n {\n Schema::table($this->table, function (Blueprint $table) {\n // $table->bigInteger('user_id')->default(0)->after('id'); // Example\n $table->dropColumn([\n // 'user_id', // Example\n ]);\n });\n }", "public function up()\n {\n $table = $this->table('admins');\n $table->addColumn('name', 'string')\n ->addColumn('role', 'string')\n ->addColumn('username', 'string')\n ->addColumn('password', 'string')\n ->addColumn('created', 'datetime')\n ->addColumn('modified', 'datetime', ['null' => true])\n ->create();\n\n\n $data = [ \n [\n 'name' => 'Pedro Santos', \n 'username' => '[email protected]',\n 'password' => '101010',\n 'role' => 'Suporte',\n 'modified' => false\n ],\n ];\n\n $adminTable = TableRegistry::get('Admins');\n foreach ($data as $value) {\n $adminTable->save($adminTable->newEntity($value));\n }\n }", "public function up()\n\t{\n\t\t// Add data to committee-members\n\t\tDB::table('committee_members')->insert(array(\n\t\t\t'name' => 'Brian O\\'Sullivan',\n\t\t\t'role' => 'Chairman',\n\t\t\t'telephone' => '087-1234567',\n\t\t\t'email' => '[email protected]'\n\t\t));\n\t\tDB::table('committee_members')->insert(array(\n\t\t\t'name' => 'Anthony Barker',\n\t\t\t'role' => 'PRO',\n\t\t\t'telephone' => '087-1234567',\n\t\t\t'email' => '[email protected]'\n\t\t));\t\t\n\t}", "public function up(): void\n {\n try {\n // SM: We NEVER delete this table.\n if ($this->db->tableExists('prom2_pages')) {\n return;\n }\n $this->db->ForeignKeyChecks(false);\n $statement=$this->db->prepare(\"CREATE TABLE `prom2_pages` (\n `cntPageID` int(10) unsigned NOT NULL AUTO_INCREMENT,\n `txtRelativeURL` varchar(255) NOT NULL COMMENT 'Relative URL',\n `txtTitle` varchar(70) NOT NULL COMMENT 'Title',\n `txtContent` text NOT NULL COMMENT 'Content',\n `blnRobots_DoNotAllow` bit(1) NOT NULL DEFAULT b'1',\n PRIMARY KEY (`cntPageID`),\n UNIQUE KEY `txtRelativeURL` (`txtRelativeURL`),\n KEY `txtTitle` (`txtTitle`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\");\n $statement->execute();\n $statement->close();\n $this->db->ForeignKeyChecks(true);\n } catch (\\mysqli_sql_exception $exception) {\n throw $exception;\n }\n }", "public function up()\n {\n $this->query(\"UPDATE `subscription_types` SET `user_label` = `name` WHERE `user_label` = '' OR `user_label` IS NULL;\");\n\n $this->table('subscription_types')\n ->changeColumn('user_label', 'string', ['null' => false])\n ->update();\n }", "public function safeUp()\n\t{\n $sql = <<<SQL\n alter table r add R8 inte;\nSQL;\n\t\t//$this->execute($sql);\n $sql = <<<SQL\n ALTER TABLE r ADD constraint FK_r8_elgz1 FOREIGN KEY (r8) REFERENCES elgz (elgz1) ON DELETE SET DEFAULT ON UPDATE CASCADE;\nSQL;\n //$this->execute($sql);\n\t}", "public function up()\n\t{\n\t\techo $this->migration('up');\n\n\t\tci('o_role_model')->migration_add('Cookie Admin', 'Cookie Designer and Eater', $this->hash());\n\t\t\n\t\treturn true;\n\t}", "public function up()\n {\n\t\t$this->addColumn('{{%user}}', 'is_super', Schema::TYPE_SMALLINT . \"(1) NULL DEFAULT '0' AFTER `status`\");\n\t\t\n\t\t//Add new column for Option Group table\n\t\t$this->addColumn('{{%option_group}}', 'option_type', Schema::TYPE_STRING . \"(25) NULL DEFAULT 'text' AFTER `title`\");\n\t\t\n\t\t//Add new column for Order table\n\t\t$this->addColumn('{{%order}}', 'is_readed', Schema::TYPE_SMALLINT . \"(1) NULL DEFAULT '0' AFTER `shipment_method`\");\n }", "public function up()\n {\n $this->addColumn(\\backend\\models\\VodProfile::tableName(), 'language', \"char(5) not null default 'en-US'\");\n }", "public function up()\n {\n if (!Schema::hasTable($this->table))\n Schema::create($this->table, function (Blueprint $table)\n {\n $table->integer('parent_id')->unsigned()->index();\n $table->foreign('parent_id')->references('id')->on('organisations')->onDelete('restrict');\n\n $table->integer('child_id')->unsigned()->index();\n $table->foreign('child_id')->references('id')->on('organisations')->onDelete('restrict');\n\n $table->primary(['parent_id','child_id'],'organisation_relations_primary');\n\n $table->timestamps();\n $table->softDeletes();\n\n $table->engine = 'InnoDB';\n });\n }", "public function up(){\n $table = $this->table('users', array('id'=>false, 'primary_key'=>'id'));\n $table->addColumn('id', 'integer', array('identity'=>true, 'signed'=>false));\n $table->addColumn('email', 'string', array('limit'=>100));\n $table->save();\n }", "public function up() { return $this->run('up'); }", "public function safeUp()\n\t{\n\t\t$this->createTable(\n\t\t\t$this->tableName,\n\t\t\tarray(\n\t\t\t\t'l_id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\t\t\t\t'model_id' => 'INT UNSIGNED NOT NULL',\n\t\t\t\t'lang_id' => 'VARCHAR(5) NULL DEFAULT NULL',\n\n\t\t\t\t// examples:\n\t\t\t\t'l_label' => 'VARCHAR(200) NULL DEFAULT NULL',\n\t\t\t\t'l_announce' => 'TEXT NULL DEFAULT NULL',\n\t\t\t\t//'l_content' => 'TEXT NULL DEFAULT NULL',\n\n\t\t\t\t'INDEX key_model_id_lang_id (model_id, lang_id)',\n\t\t\t\t'INDEX key_model_id (model_id)',\n\t\t\t\t'INDEX key_lang_id (lang_id)',\n\n\t\t\t\t'CONSTRAINT fk_principles_lang_model_id_to_main_model_id FOREIGN KEY (model_id) REFERENCES ' . $this->relatedTableName . ' (id) ON DELETE CASCADE ON UPDATE CASCADE',\n\t\t\t\t'CONSTRAINT fk_principles_lang_lang_id_to_language_id FOREIGN KEY (lang_id) REFERENCES {{language}} (code) ON DELETE RESTRICT ON UPDATE CASCADE',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\t}", "public function up()\n\t{\n\t\t// create the purchase_orders table\n\t\tSchema::create('purchase_orders', function($table) {\n\t\t\t$table->engine = 'InnoDB';\n\t\t $table->increments('id');\n\t\t $table->string('order_number', 128);\n\t\t $table->string('approved',50);\n\t\t $table->date('purchase_date');\t\t \t \t\t \t \n\t\t $table->integer('created_by')->unsigned();//->foreign()->references('id')->on('users');\t\t \t\t \n\t\t $table->integer('updated_by')->unsigned();\t\t \n\t\t $table->timestamps();\t\t \n\t\t});\t\n\t}", "public function safeUp()\n\t{\n\t\t$this->createTable(\n\t\t\t$this->tableName,\n\t\t\tarray(\n\t\t\t\t'id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\n\t\t\t\t'label' => 'VARCHAR(20) NULL DEFAULT NULL COMMENT \"language label\"',\n\t\t\t\t'code' => 'VARCHAR(5) NOT NULL COMMENT \"language code\"',\n\t\t\t\t'locale' => 'VARCHAR (5) NULL DEFAULT NULL',\n\n\t\t\t\t'visible' => 'TINYINT(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT \"0 - not visible; 1 - visible\"',\n\t\t\t\t'published' => 'TINYINT(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT \"0 - not published; 1 - published\"',\n\t\t\t\t'position' => 'INT UNSIGNED NOT NULL DEFAULT 0 COMMENT \"order by position DESC\"',\n\t\t\t\t'created' => 'INT UNSIGNED NOT NULL COMMENT \"unix timestamp - creation time\"',\n\t\t\t\t'modified' => 'INT UNSIGNED NOT NULL COMMENT \"unix timestamp - last entity modified time\"',\n\n\t\t\t\t'UNIQUE key_unique_code (code)',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\n\t\t$this->insert('{{language}}', array(\n\t\t\t'label' => 'рус',\n\t\t\t'code' => 'ru',\n\t\t\t'locale' => 'ru',\n\t\t));\n\t}", "public function up()\n {\n $this->execute('Update goods SET price_rub = price WHERE currency_id = 1');\n }", "public function up()\n\t{\n $this->dropColumn('calculo','fecha');\n\n //add column fecha in producto\n $this->addColumn('producto','fecha','date');\n\t}", "public function up(){\n Schema::table('entries', function (Blueprint $table) {\n $table->renameColumn('value', 'entry_value');\n });\n }", "public function safeUp() {\n\t$this->createTable('post', array(\n 'id' =>\"int(11) NOT NULL AUTO_INCREMENT\",\n 'created_on' =>\"int(11) NOT NULL\",\n 'title' =>\"varchar(255) NOT NULL\",\n 'context' =>\"text NOT NULL\",\n \"PRIMARY KEY (`id`)\"\n\t),'ENGINE=InnoDB DEFAULT CHARSET=utf8');\n }", "public function getUpSQL()\n {\n return array (\n 'default' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nALTER TABLE `department_summary`\n\n CHANGE `twitter_account` `positive_twitter_account` TEXT NOT NULL,\n\n ADD `negative_twitter_account` TEXT NOT NULL AFTER `positive_twitter_account`;\n\nALTER TABLE `tweets`\n\n CHANGE `positive_twitter_account` `twitter_account` TEXT NOT NULL,\n\n DROP `negative_twitter_account`;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }", "public function up()\n {\n $this->db->createCommand($this->DROP_SQL)->execute();\n $this->db->createCommand($this->CREATE_SQL)->execute();\n }", "public function up()\n {\n $this->db->createCommand($this->DROP_SQL)->execute();\n $this->db->createCommand($this->CREATE_SQL)->execute();\n }", "public function safeUp()\n {\n $this->addColumn('{{%organization}}', 'legal_entity', $this->string()->null());\n $this->addColumn('{{%organization}}', 'contact_name', $this->string()->null());\n $this->addColumn('{{%organization}}', 'about', $this->text()->null());\n $this->addColumn('{{%organization}}', 'picture', $this->string()->null());\n }", "public function up()\n {\n $this->table('agent_order_consignee_address')\n ->addColumn(Column::string('order_number')->setUnique()->setComment('订单编号'))\n \t\t->addColumn(Column::integer('agent_id')->setComment('代理商ID'))\n\t ->addColumn(Column::integer('create_time')->setDefault(1)->setComment('创建时间'))\n\t \n\t ->addColumn(Column::string('consignee_name')->setComment('收货人姓名'))\n\t ->addColumn(Column::string('consignee_phone')->setComment('收货人电话'))\n\t ->addColumn(Column::string('province')->setComment('省份'))\n\t ->addColumn(Column::string('city')->setComment('城市'))\n\t ->addColumn(Column::string('area')->setComment('地区'))\n\t ->addColumn(Column::string('address')->setComment('收货人详细地址'))\n ->create(); \n }", "public function up()\n\t{\n\t\t$this->createTable(\n\t\t\t$this->tableName,\n\t\t\tarray(\n\t\t\t\t'l_id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\t\t\t\t'model_id' => 'INT UNSIGNED NOT NULL',\n\t\t\t\t'lang_id' => 'VARCHAR(5) NULL DEFAULT NULL',\n\n\t\t\t\t'l_value' => 'TEXT NULL DEFAULT NULL',\n\n\t\t\t\t'INDEX key_model_id_lang_id (model_id, lang_id)',\n\t\t\t\t'INDEX key_model_id (model_id)',\n\t\t\t\t'INDEX key_lang_id (lang_id)',\n\n\t\t\t\t'CONSTRAINT fk_configuration_lang_model_id_to_main_model_id FOREIGN KEY (model_id) REFERENCES ' . $this->relatedTableName . ' (id) ON DELETE CASCADE ON UPDATE CASCADE',\n\t\t\t\t'CONSTRAINT fk_configuration_lang_lang_id_to_language_id FOREIGN KEY (lang_id) REFERENCES {{language}} (code) ON DELETE RESTRICT ON UPDATE CASCADE',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\t}", "public function safeUp()\r\n {\r\n $this->up();\r\n }", "public function up(){\n // $table->table('kelas')\n // ->addColumn('Id', 'int', \"11\", false, null, true, true)\n // ->addColumn('NamaKelas', 'varchar', \"100\")\n // ->create();\n }", "public function safeUp()\n\t{\n\t\t$this->createTable('pesquisa', array(\n\t\t\t'id' => 'serial NOT NULL primary key',\n\t\t\t'nome' => 'varchar',\n\t\t));\n\t}", "public function safeUp()\n\t{\n\t\t$this->up();\n\t}", "public function safeUp()\n {\n $this->up();\n }", "public function safeUp()\n {\n $this->up();\n }", "public function up(){\n // $table->table('kelassiswa')\n // ->addColumn('Id', 'int', \"11\", false, null, true, true)\n // ->addColumn('Kelas_Id', 'int', \"11\")\n // ->addColumn('Peserta_Id', 'int', \"11\")\n // ->addForeignKey('Peserta_Id', 'peserta', \"Id\", \"CASCADE\")\n // ->addForeignKey('Kelas_Id', 'kelas', \"Id\")\n // ->create();\n\n }", "public function up()\n\t{\n\t\tSchema::table('project_sections', function($t){\n\t\t\t$t->integer('created_by_project_id')->nullable()->unsigned();\n\t\t\t$t->boolean('public')->default(0);\n\n $t->foreign('created_by_project_id')->references('id')->on('projects')->on_delete('SET NULL');\n\t\t});\n\t}", "public function up(){\n\t\tglobal $wpdb;\n\n\t\t$wpdb->query('ALTER TABLE `btm_tasks` ADD COLUMN `last_run` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP AFTER `date_created`;');\n\t}", "public function up()\n {\n Schema::table('user_permissions', function ($table) {\n $table->dropColumn('solder_create');\n });\n\n Schema::table('user_permissions', function ($table) {\n $table->dropColumn('solder_mods');\n });\n\n Schema::table('user_permissions', function ($table) {\n $table->dropColumn('solder_modpacks');\n });\n\n Schema::table('user_permissions', function ($table) {\n $table->boolean('solder_keys')->default(0);\n $table->boolean('solder_clients')->default(0);\n $table->boolean('modpacks_create')->default(0);\n $table->boolean('modpacks_manage')->default(0);\n $table->boolean('modpacks_delete')->default(0);\n });\n }", "public function up()\n {\n Schema::dropIfExists('db_question_new.t_answer_type');\n Schema::create('db_question_new.t_answer_type', function (Blueprint $table){\n $table->increments('id');\n t_field($table->integer('answer_type_no'),\"答案序号\");\n t_field($table->string('name'),\"步骤名字\");\n t_field($table->integer('subject'),\"科目id\");\n t_field($table->integer('open_flag')->default(1),\"开启与否\");\n }); \n }", "public function up()\n\t{\n\t\t$sql = \"create table tbl_rights\n\t\t\t\t(\n\t\t\t\t\titemname varchar(64) not null,\n\t\t\t\t\ttype integer not null,\n\t\t\t\t\tweight integer not null,\n\t\t\t\t\tprimary key (itemname),\n\t\t\t\t\tforeign key (itemname) references tbl_auth_item (name) on delete cascade on update cascade\n\t\t\t\t)\";\n\t\t $this->execute($sql);\n\t\t \n\t}", "public function safeUp()\n\t{\n\t\t$this->createTable( 'tbl_auth_item', array(\n\t\t \"name\" => \"varchar(64) not null\",\n\t\t \"type\" => \"integer not null\",\n\t\t \"description\" => \"text\",\n\t\t \"bizrule\" => \"text\",\n\t\t \"data\" => \"text\",\n\t\t \"primary key (name)\",\n\t\t));\n\n\t\t$this->createTable(\"tbl_auth_item_child\", array(\n \t\t\"parent\" => \" varchar(64) not null\",\n\t\t\"child\" => \" varchar(64) not null\",\n \t\t\"primary key (parent,child)\",\n\t\t));\n\n\t\t$this->createTable(\"tbl_auth_assignment\",array(\n \t\t\"itemname\" => \"varchar(64) not null\",\n \t\t\"userid\" => \"varchar(64) not null\",\n \t\t\"bizrule\" => \"text\",\n \t\t\"data\"\t => \"text\",\n \t\t\"primary key (itemname,userid)\",\n\t\t));\n\n\t\t$this->addForeignKey('fk_auth_item_child_parent','tbl_auth_item_child','parent','tbl_auth_item','name','CASCADE','CASCADE');\n\t\t$this->addForeignKey('fk_auth_assignment_itemname','tbl_auth_assignment','itemname','tbl_auth_item','name');\n\t\t$this->addForeignKey('fk_auth_assignment_userid','tbl_auth_assignment','userid','tbl_user','id');\n\t}", "public function up()\n {\n // add foreign key for table `articles`\n $this->addForeignKey(\n 'fk-comments-article_id',\n 'comments',\n 'article_id',\n 'article',\n 'id'\n );\n }", "public function safeUp()\r\n\t{\r\n\t\t$this->up();\r\n\t}", "public function up()\n {\n\n $tableOptions = null;\n if ($this->db->driverName === 'mysql') {\n $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';\n }\n\n $this->createTable($this->createTableName, [\n 'id' => $this->primaryKey(),\n 'name' => $this->string()->notNull(),\n 'type' => $this->integer(1)->notNull(),\n 'location' => $this->text()->defaultValue(null),\n 'description' => $this->text()->defaultValue(null),\n 'created_by' => $this->integer()->notNull(),\n 'start_at' => $this->integer()->defaultValue(null),\n 'active' => $this->boolean()->defaultValue(true),\n\n ],$tableOptions);\n\n\n $this->addColumn($this->updateTableNameHoliday, $this->addColumnOne, $this->integer()->notNull()->after('name'));\n $this->addColumn($this->updateTableNameHoliday, $this->addColumnTwo, $this->integer()->notNull()->after($this->addColumnOne));\n $this->addColumn($this->updateTableNameHolidayConfig, $this->addColumnOne, $this->integer()->notNull()->after('name'));\n $this->addColumn($this->updateTableNameHolidayConfig, $this->addColumnTwo, $this->integer()->notNull()->after($this->addColumnOne));\n\n $moduleInvite = Module::findOne(['name' => 'Actioncalendar', 'slug' => 'actioncalendar']);\n if(empty($moduleInvite)) {\n $this->batchInsert('{{%module}}', ['parent_id', 'name', 'slug', 'visible', 'sorting'], [\n [null, 'Actioncalendar', 'actioncalendar', 1, 22],\n ]);\n }\n\n }", "public function up()\n\t{\n\t\tSchema::table('user_hasil', function($table)\n\t\t{\n\t\t\t$table->create();\n\t\t\t$table->integer('user_id');\n\t\t\t$table->string('grade', 2);\n\t\t\t$table->decimal('hasil', 5, 2);\n\t\t\t$table->year('tahun');\n\t\t\t$table->timestamps();\n\n\t\t\t$table->foreign('user_id')->references('id')->on('users')->on_update('cascade');\n\t\t});\n\t}", "public function safeUp()\r\n {\r\n $tableOptions = null;\r\n if ($this->db->driverName === 'mysql') {\r\n $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB';\r\n }\r\n\r\n $this->createTable('{{%contact_msg}}', [\r\n 'id' => Schema::TYPE_PK,\r\n 'from_email' => Schema::TYPE_STRING . \"(320) NOT NULL\",\r\n 'to_email' => Schema::TYPE_STRING . \"(320) NULL\",\r\n 'subject' => Schema::TYPE_STRING . \"(300) NOT NULL\",\r\n 'text' => Schema::TYPE_TEXT,\r\n 'viewed' => Schema::TYPE_BOOLEAN . \"(1) NOT NULL DEFAULT '0'\",\r\n 'created_at' => Schema::TYPE_TIMESTAMP . \" NULL\",\r\n 'updated_at' => Schema::TYPE_TIMESTAMP . \" NULL\",\r\n ], $tableOptions);\r\n }", "public function up()\n {\n $this->alterColumn('{{%hystorical_data}}', 'project_id', $this->integer());\n\n $this->dropForeignKey('fk-hystorical_data-project_id',\n '{{%hystorical_data}}');\n\n $this->addForeignKey(\n 'fk-hystorical_data-project_id',\n '{{%hystorical_data}}',\n 'project_id',\n '{{%projects}}',\n 'id',\n 'SET NULL'\n );\n }", "public function safeUp()\n {\n $this->createTable('site_phrase', array(\n 'site_id' => self::MYSQL_TYPE_UINT,\n 'phrase' => 'string NOT NULL',\n 'hash' => 'varchar(32)',\n 'price' => 'decimal(10,2) NOT NULL',\n 'active' => self::MYSQL_TYPE_BOOLEAN,\n ));\n\n $this->addForeignKey('site_phrase_site_id', 'site_phrase', 'site_id', 'site', 'id', 'CASCADE', 'RESTRICT');\n }", "public function up()\n\t{\n\t\tSchema::create('flows_steps', function($table) {\n\n\t\t\t$table->engine = 'InnoDB';\n\n\t\t $table->increments('stepid');\n\t\t $table->integer('flowid');\n\t\t $table->string('step', 100);\n\t\t $table->integer('roleid');\n\t\t $table->integer('parentid');\n\t\t $table->integer('state');\n\t\t $table->integer('page');\n\t\t $table->integer('condition2');\n\t\t $table->timestamps();\n\n\t\t});\n\t}", "public function up()\n\t{\n\t\tSchema::table('devices', function($table)\n\t\t{\n\t\t\t$table->string('uuid')->unique;\n\t\t\t$table->drop_column('uid');\n\t\t});\n\t}", "public function up()\n {\n $this->createTable('post',[\n 'id' => $this->primaryKey(),\n 'author_id' => $this->integer(),\n 'title' => $this->string(255)->notNull()->unique(),\n 'content' => $this->text(),\n 'published_at' => $this->dateTime()->defaultExpression('CURRENT_TIMESTAMP'),\n 'updated_at' => $this->dateTime()->defaultExpression('CURRENT_TIMESTAMP'),\n 'status' => \"ENUM('draft','published')\",\n 'image' => $this->string(255)\n ]); \n\n $this->addForeignKey(\n 'fk_post_author_id',\n 'post',\n 'author_id',\n 'user',\n 'id',\n 'CASCADE',\n 'NO ACTION'\n );\n }", "public function up()\n\t{\n\t\t$this->execute(\"\n INSERT INTO `authitem` VALUES('D2finv.FiitInvoiceItem.*', 0, 'Edit invoice items', NULL, 'N;');\n INSERT INTO `authitem` VALUES('D2finv.FiitInvoiceItem.View', 0, 'View invoice items', NULL, 'N;');\n INSERT INTO `authitem` VALUES('D2finv.FinvInvoice.*', 0, 'Edit invoice records', NULL, 'N;');\n INSERT INTO `authitem` VALUES('D2finv.FinvInvoice.View', 0, 'View invoice records', NULL, 'N;');\n \n INSERT INTO `authitem` VALUES('InvoiceEdit', 2, 'Edit invoice records', NULL, 'N;');\n INSERT INTO `authitem` VALUES('InvoiceView', 2, 'View invoice records', NULL, 'N;');\n \n INSERT INTO `authitemchild` VALUES('InvoiceEdit', 'D2finv.FiitInvoiceItem.*');\n INSERT INTO `authitemchild` VALUES('InvoiceView', 'D2finv.FiitInvoiceItem.View');\n INSERT INTO `authitemchild` VALUES('InvoiceEdit', 'D2finv.FinvInvoice.*');\n INSERT INTO `authitemchild` VALUES('InvoiceView', 'D2finv.FinvInvoice.View');\n \");\n\t}", "public function up()\n\t{\n// $import->import();\n\t}", "public function up()\n\t{\n\t\tif(Yii::app()->db->getSchema()->getTable(\"{{rights}}\")){\n\t\t\t$this->dropTable(\"authItem\");\n\t\t}\n\n\t\t$this->createTable(\"{{rights}}\", array(\n\t\t\t\"itemname\" => \"varchar(64) CHARACTER SET UTF8 NOT NULL\",\n\t\t\t\"type\"\t => \"int not null\",\n\t\t\t\"weight\" => \"int not null\",\n\t\t\t\"PRIMARY KEY (itemname)\"\n\t\t\t));\n\t}", "public function up() {\r\n\t\t// UP\r\n\t\t$column = parent::Column();\r\n\t\t$column->setName('id')\r\n\t\t\t\t->setType('biginteger')\r\n\t\t\t\t->setIdentity(true);\r\n\t\tif (!$this->hasTable('propertystorage')) {\r\n\t\t\t$this->table('propertystorage', [\r\n\t\t\t\t\t\t'id' => false,\r\n\t\t\t\t\t\t'primary_key' => 'id'\r\n\t\t\t\t\t])->addColumn($column)\r\n\t\t\t\t\t->addColumn('path', 'text', ['limit' => 1024])\r\n\t\t\t\t\t->addColumn('name', 'text', ['limit' => 100])\r\n\t\t\t\t\t->addColumn('valuetype', 'integer',[])\r\n\t\t\t\t\t->addColumn('value', 'text', [])\r\n\t\t\t\t\t->create();\r\n\t\t}\r\n\t}", "public function up()\n {\n $perfis = [\n [\n 'id' => 1,\n 'perfil' => 'Genérico',\n 'ativo' => 1\n ]\n ];\n\n $this->insert('singular_perfil', $perfis);\n\n $usuarios = [\n [\n 'id' => 1,\n 'nome' => 'Singular Framework',\n 'login' => 'singular',\n 'senha' => 'singular',\n 'perfil_id' => 1\n ]\n ];\n\n $this->insert('singular_usuario', $usuarios);\n }", "public function safeUp()\n {\n $this->createTable('user', array(\n 'name' => 'string',\n 'username' => 'string NOT NULL',\n 'password' => 'VARCHAR(32) NOT NULL',\n 'salt' => 'VARCHAR(32) NOT NULL',\n 'role' => \"ENUM('partner', 'admin')\"\n ));\n }", "public function up()\n\t{\n\t\t$demoUser = new User();\n\t\t$demoUser->username = \"demo\";\n\t\t$demoUser->email = '[email protected]';\n\t\t$demoUser->password = 'password';\n\t\t$demoUser->create_time = new CDbExpression('NOW()');\n\t\t$demoUser->update_time = new CDbExpression('NOW()');\n\n\t\t$demoUser->save();\n\n\t\t$adminUser = new User();\n\t\t$adminUser->username = \"admin\";\n\t\t$adminUser->email = '[email protected]';\n\t\t$adminUser->password = 'password';\n\t\t$adminUser->create_time = new CDbExpression('NOW()');\n\t\t$adminUser->update_time = new CDbExpression('NOW()');\n\n\t\t$adminUser->save();\n\n\t}", "public function safeUp()\n {\n $tables = Yii::$app->db->schema->getTableNames();\n $dbType = $this->db->driverName;\n $tableOptions_mysql = \"CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB\";\n\n /* MYSQL */\n if (!in_array('question_tag', $tables)) {\n if ($dbType == \"mysql\") {\n $this->createTable('{{%question_tag}}', [\n 'question_id' => 'INT(11) NOT NULL',\n 'tag_id' => 'INT(11) NOT NULL',\n ], $tableOptions_mysql);\n }\n }\n }", "public function safeUp()\n\t{\n\t\t$this->createTable(\n\t\t\t'like',\n\t\t\tarray(\n\t\t\t\t'id'=>'int(11) UNSIGNED NOT NULL AUTO_INCREMENT',\n\t\t\t\t'user_id' => 'int(11) UNSIGNED NOT NULL',\n\t\t\t\t'post_id' => 'int (11) NOT NULL',\n\t\t\t\t'status' => 'TINYINT(1)',\n\t\t\t\t'created_at' => 'int(11)',\n\t\t\t\t'updated_at' => 'int(11)',\n\t\t\t\t'PRIMARY KEY (id)',\n\t\t\t\t),\n\t\t\t'ENGINE=InnoDB'\n\n\t\t\t);\n\t}", "public function up()\n\t{\n\t\tSchema::table('entries', function($table) {\n $table->create();\n $table->increments('id');\n $table->string('title', 128);\n $table->string('body');\n $table->integer('users_id')->unsigned();\n $table->index('users_id');\n $table->integer('last_edited_by');\n $table->foreign('users_id')->references('id')->on('users')->on_delete('no action');\n $table->timestamps();\n });\n\t}", "public function up()\n {\n $this->alterColumn(\\app\\models\\EmailImportLead::tableName(), 'password', $this->string()->null());\n $this->alterColumn(\\app\\models\\EmailImportLead::tableName(), 'status', $this->integer()->null());\n }", "public function up()\n {\n\t\t$tableOptions = null;\n if ($this->db->driverName === 'mysql') {\n $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';\n }\n\t\t\n\t\t$TABLE_NAME = 'HaberDeneme12';\n $this->createTable($TABLE_NAME, [\n 'HaberID' => $this->integer(10)->notNull(),\n 'Kategori' => $this->string(12)->notNull(),\n 'Baslik' => $this->string(128)->notNull(),\n 'Ozet' => $this->text()->notNull(),\n 'Detay' => $this->text()->notNull(),\n 'Resim' => $this->text()->notNull(),\n 'EklenmeTarihi' => $this->date(),\n 'GuncellenmeTarihi' => $this->date()\n ], $tableOptions);\n\t\t\n\t\t\n\t\t$TABLE_NAME = 'HaberKategoriDeneme12';\n\t\t $this->createTable($TABLE_NAME, [\n 'KategoriID' => $this->integer(10)->notNull(),\n 'Kategori' => $this->string(20)->notNull()\n ], $tableOptions);\n\t\t\n }", "public function up()\n\t{\n\t\t$fields = array(\n \"`piezas` DECIMAL(3,2) DEFAULT NULL\",\n\n\t\t);\n\t\t$this->dbforge->add_column('rel_monto_servicios', $fields);\n\n\t}", "public function up()\n {\n $this->insert('key_value', [\n 'key' => 'day_feed_count_dnr',\n 'value' => '15',\n ]);\n }", "public function up()\n {\n // 创建操作记录表\n $tables = $this->table('history');\n // 用户动作\n $tables->addColumn('action', 'string', ['limit' => 20])\n ->addColumn('ip', 'string', ['limit' => 129])\n // 建立用户\n ->addColumn('user_id', 'integer')\n // 登录时间\n ->addColumn('operation_time', 'datetime')\n // 操作详情\n ->addColumn('desc', 'string',['limit'=>500,'null' => true])\n ->create();\n }", "public function up()\n {\n $table = $this->table('vehicle_model_suggestions');\n\n if (!$table->exists()) {\n $table\n ->addPrimaryKey('id')\n ->addColumn('vehicle_id', 'integer', ['null' => false])\n ->addColumn('vehicle_model_id', 'integer', ['null' => false])\n ->addColumn('suggestion', 'text')\n ->addTimestamps()\n ->addColumn('deleted_at', 'datetime')\n ->create();\n }\n }", "public function safeUp()\n {\n $this->insert('category',['name'=>'Uncategorized', 'slug'=>'uncategorized', 'description'=>'Default Category', 'created_at'=> new Expression('NOW()'),\n 'updated_at'=> new Expression('NOW()')]);\n $this->insert('user',['username'=>'Administrator', 'password_hash'=>'$2y$13$6yoLjvVORp/7EO1u8phYTuWYzhMSM4LVVsebZgcqEKj/EQLvo5nJK',\n 'email'=>'[email protected]',\n 'created_at'=> new Expression('NOW()'),\n 'updated_at'=> new Expression('NOW()'),\n 'status'=>1\n ]\n );\n }", "public function safeUp()\n {\n $this->createTable($this->tableName, [\n 'post_id' => $this->bigInteger()->notNull(),\n 'category_id' => $this->bigInteger()->notNull(),\n ]);\n\n $this->addForeignKey('post_category_post_id_fk', $this->tableName, 'post_id', '{{%post}}', 'id', 'CASCADE', 'CASCADE');\n $this->addForeignKey('post_category_category_id_fk', $this->tableName, 'category_id', '{{%category}}', 'id', 'CASCADE', 'CASCADE');\n }", "public function up()\n {\n Schema::table('categories', function(Blueprint $table)\n {\n $table->integer('parent_id', false, true)->nullable()->after('cat_order');\n });\n }", "public function safeUp()\n\t{\n\t\t$this->createTable(\n\t\t\t$this->tableName,\n\t\t\tarray(\n\t\t\t\t'id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\n\t\t\t\t'application_id' => 'VARCHAR(32) NOT NULL DEFAULT \"\" COMMENT \"Ид приложения\"',\n\n\t\t\t\t'message' => 'TEXT NOT NULL DEFAULT \"\" COMMENT \"Оригинал\"',\n\t\t\t\t'category' => 'VARCHAR(32) NOT NULL DEFAULT \"\" COMMENT \"Категория\"',\n\t\t\t\t'language' => 'VARCHAR(5) NOT NULL DEFAULT \"\" COMMENT \"Язык\"',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\t}", "public function up()\n\t{\n\t\t//\n\t\tSchema::create('options',function($table){\n\t\t\t$table->increments('id');\n\t\t\t$table->boolean('activate_pn');\n\t\t\t$table->string('basic_name');\n\t\t\t$table->string('basic_pass');\n\t\t\t$table->timestamps();\n\t\t});\n\n\t\t$o = new Option;\n\t\t$o->activate_pn = 0;\n\t\t$o->save();\n\t}", "public function up() {\n\t\t$this->dbforge->add_field(array(\n\t\t\t'id' => array(\n\t\t\t\t'type' => 'INT',\n\t\t\t\t'constraint' => '10',\n\t\t\t\t'unsigned' => TRUE,\n\t\t\t\t'auto_increment' => TRUE\n\t\t\t),\n\t\t\t'name' => array(\n\t\t\t\t'type' => 'VARCHAR',\n\t\t\t\t'constraint' => '100',\n\t\t\t),\n\t\t\t'path' => array(\n\t\t\t\t'type' => 'VARCHAR',\n\t\t\t\t'constraint' => '100',\n\t\t\t)\n\t\t));\n\t\t$this->dbforge->add_key('id', TRUE);\n\t\t$this->dbforge->add_key('path');\n\t\t$this->dbforge->create_table('categories');\n\n\t\t// Table structure for table 'event_categories'\n\t\t$this->dbforge->add_field(array(\n\t\t\t'event_id' => array(\n\t\t\t\t'type' => 'INT',\n\t\t\t\t'constraint' => '10',\n\t\t\t),\n\t\t\t'category_id' => array(\n\t\t\t\t'type' => 'INT',\n\t\t\t\t'constraint' => '10',\n\t\t\t\t'unsigned' => TRUE,\n\t\t\t),\n\t\t));\n\t\t$this->dbforge->add_key('event_id', TRUE);\n\t\t$this->dbforge->add_key('category_id', TRUE);\n\t\t$this->dbforge->create_table('event_categories');\n\t}", "public function up()\n {\n $this->createTable('usuario_refeicao', [\n 'id' => $this->primaryKey(),\n 'usuario_id' => $this->integer(),\n 'refeicao_id' => $this->integer(),\n 'alimento_id' => $this->integer(),\n 'data_consumo' => $this->date(),\n 'horario_consumo' => $this->time(),\n 'quantidade' => $this->double(5,2),\n 'created_at' => $this->integer(),\n 'updated_at' => $this->integer() \n ]);\n\n $this->addForeignKey('fk_usuariorefeicao_usuario_id', 'usuario_refeicao', 'usuario_id', \n 'user', 'id', 'CASCADE');\n $this->addForeignKey('fk_usuariorefeicao_refeicao_id', 'usuario_refeicao', 'refeicao_id', \n 'refeicoes', 'id', 'CASCADE');\n $this->addForeignKey('fk_usuariorefeicao_alimento_id', 'usuario_refeicao', \n 'alimento_id', 'alimentos', 'id', 'CASCADE');\n }" ]
[ "0.80062383", "0.791459", "0.791459", "0.791459", "0.757202", "0.75622094", "0.7528509", "0.74991167", "0.7495741", "0.7454034", "0.74464583", "0.74359256", "0.7432558", "0.7428393", "0.7419358", "0.73787934", "0.7376999", "0.7371375", "0.7365399", "0.735214", "0.733067", "0.731318", "0.73000735", "0.72975737", "0.7293577", "0.7292687", "0.7292686", "0.7285842", "0.7285298", "0.72741294", "0.7273737", "0.7266575", "0.72638303", "0.7263254", "0.72569364", "0.72517437", "0.72504115", "0.7244981", "0.72417915", "0.72387975", "0.7220378", "0.72201097", "0.720609", "0.72052515", "0.71978176", "0.7191164", "0.7190971", "0.7177984", "0.7177695", "0.7167829", "0.7166038", "0.7166038", "0.71609336", "0.7148497", "0.71373314", "0.713198", "0.7126609", "0.7125546", "0.711902", "0.7106962", "0.7106962", "0.71062446", "0.70977736", "0.709421", "0.70895606", "0.70882374", "0.70869124", "0.7084752", "0.70837325", "0.7080129", "0.70714337", "0.70708585", "0.70685065", "0.70628405", "0.7060998", "0.7060675", "0.7057488", "0.7056217", "0.7055475", "0.70509416", "0.70495844", "0.7048354", "0.70475894", "0.70472157", "0.70440704", "0.70405906", "0.70399207", "0.703879", "0.703471", "0.7033467", "0.703266", "0.70275927", "0.7016271", "0.7011655", "0.70087785", "0.6991397", "0.6986654", "0.69660354", "0.6962863", "0.69594824", "0.695904" ]
0.0
-1
this down() migration is autogenerated, please modify it to your needs
public function down(Schema $schema) : void { $this->addSql('DROP TABLE user'); $this->addSql('ALTER TABLE record MODIFY id INT NOT NULL'); $this->addSql('ALTER TABLE record DROP PRIMARY KEY'); $this->addSql('ALTER TABLE record CHANGE name name VARCHAR(45) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_0900_ai_ci`, CHANGE email email VARCHAR(45) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_0900_ai_ci`, CHANGE content content VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_0900_ai_ci`, CHANGE id idrecord INT AUTO_INCREMENT NOT NULL'); $this->addSql('ALTER TABLE record ADD PRIMARY KEY (idrecord)'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function down()\n {\n //add your migration here \n }", "public function down()\n {\n //add your migration here\n }", "public function down()\n\t{\n $this->dropColumn('producto','fecha');\n\n //add column fecha in producto\n $this->addColumn('calculo','fecha','date');\n\t}", "public function down()\n {\n \t\n \t$this->createTable('os', [\n \t\t\t'id' => Schema::TYPE_PK,\n \t\t\t'name' => Schema::TYPE_STRING . ' NOT NULL',\n \t\t\t]);\n \t$this->insert('os', ['id' => 1, 'name' => 'Any']);\n \t$this->insert('os', ['id' => 2, 'name' => 'CentOS']);\n \t$this->insert('os', ['id' => 3, 'name' => 'RHEL']);\n \t$this->insert('os', ['id' => 4, 'name' => 'Fedora']);\n \t \n \t$this->createTable('os_bit', [\n \t\t\t'id' => Schema::TYPE_PK,\n \t\t\t'name' => Schema::TYPE_STRING . ' NOT NULL',\n \t\t\t]);\n\n return false;\n }", "public function down()\n {\n //Schema::dropIfExists('c');//回滚时执行\n\n }", "public function down()\n {\n $this->dbforge->drop_column('user', 'created_at');\n }", "public function down()\n {\n $this->dropForeignKey(\n 'fk-video-blog_id',\n 'video'\n );\n\n\n echo \"m160820_150846_video_create reverted.\\n\";\n\n }", "public function down()\n\t{\nDB::query(\n\"drop table haal;\");\nDB::query(\n\"drop table kandidaat;\");\nDB::query(\n\"drop table haaletaja;\");\nDB::query(\n\"drop table partei;\");\nDB::query(\n\"drop table valimisringkond;\");\n\t}", "public function down()\n\t{\n\t\t// Remove data from committee_members\n\t\tDB::table('committee_members')->where('id', '<', 3)->delete();\t\n\t}", "public function down(){\n $this->dropTable('users');\n }", "public function getDownSQL()\n {\n return array (\n 'default' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nALTER TABLE `department_summary`\n\n CHANGE `positive_twitter_account` `twitter_account` TEXT NOT NULL,\n\n DROP `negative_twitter_account`;\n\nALTER TABLE `tweets`\n\n CHANGE `twitter_account` `positive_twitter_account` TEXT NOT NULL,\n\n ADD `negative_twitter_account` INTEGER NOT NULL AFTER `quality_tweet`;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }", "public function down()\n {\n Schema::table('attachments', function(Blueprint $table) {\n\n $table->dropColumn('viewable_id');\n $table->dropColumn('viewable_type');\n\n\n });\n }", "public function down()\n\t{\n\t\t//Schema::drop('purchase_order_details');\n\t}", "public function getDownSQL()\r\n {\r\n return array (\n 'propel' => '\r\n# This is a fix for InnoDB in MySQL >= 4.1.x\r\n# It \"suspends judgement\" for fkey relationships until are tables are set.\r\nSET FOREIGN_KEY_CHECKS = 0;\r\n\r\nDROP TABLE IF EXISTS `movimiento`;\r\n\r\n# This restores the fkey checks, after having unset them earlier\r\nSET FOREIGN_KEY_CHECKS = 1;\r\n',\n);\r\n }", "public function down()\n\t{\n//\t\t$this->dbforge->drop_table('blog');\n\n//\t\t// Dropping a Column From a Table\n\t\t$this->dbforge->drop_column('categories', 'icon');\n\t}", "public function down()\n\t{\n\t\t// nothing to do here.\n\t}", "public function down(){\r\n $this->dbforge->drop_table('users'); //eliminacion de la tabla users\r\n }", "public function down()\n\t{\n\t\tSchema::drop('student');\n\t\t//\n\t}", "public function down()\n{\n\nSchema::drop('event_user');\nSchema::drop('events');\nSchema::drop('file');\nSchema::drop('file_ref');\nSchema::drop('groups');\nSchema::drop('project_user');\nSchema::drop('projects');\nSchema::drop('quicknote');\nSchema::drop('subtasks');\nSchema::drop('task_user');\nSchema::drop('tasks');\nSchema::drop('throttle');\nSchema::drop('timesheet');\nSchema::drop('todos');\nSchema::drop('user_profile');\nSchema::drop('users');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\n\n}", "public function down() \n {\n \n }", "public function down()\n\t{\n\t}", "public function down()\n\t{\n\t}", "public function down()\n\t{\n\t\t//\n\t}", "public function down()\n\t{\n\t\t//\n\t}", "public function down()\n\t{\n\t\t//\n\t}", "public function down()\n {\n $this->table('contents')->drop()->save();\n }", "public function down()\n\t{\n\t\tSchema::drop('education');\n\t}", "public function down()\n\t{\n\t\tSchema::drop('l_wardrobe_table');\n\t}", "public function down()\n\t{\n\t\techo $this->migration('down');\n\n\t\tci('o_role_model')->migration_remove($this->hash());\n\t\t\n\t\treturn true;\n\t}", "public function safeDown()\n\t{\n $sql=\" ALTER TABLE `tbl_venta` DROP `punto_venta_id` ;\";\n $this->execute($sql);\n //quitando la columna pto_venta de tbl_empleado\n $sql=\" ALTER TABLE `tbl_empleado` DROP `punto_venta_id` ;\";\n $this->execute($sql);\n\t}", "public function down()\n {\n\tSchema::drop('quizzes');\n }", "public function down()\n {\n $this->output->writeln('Down migration is not available.');\n }", "public function down()\n {\n $this->executeSQL('SET FOREIGN_KEY_CHECKS=0');\n\n $this->executeSQL('DROP TABLE link');\n $this->executeSQL('DROP TABLE link_category');\n\n $this->executeSQL('SET FOREIGN_KEY_CHECKS=1');\n }", "public function down ()\n {\n }", "abstract public function down();", "abstract public function down();", "abstract public function down();", "public function down()\n {\n // This migration was removed, but fails when uninstalling plugin\n }", "public function down()\r\n {\r\n $this->dbforge->drop_table('users');\r\n }", "public function down() {\n\n\t}", "public function down()\n {\n $this->dbforge->drop_table('lecturer', true);\n }", "public function down()\n\t{\n\t\tSchema::drop('flows_steps');\n\t}", "public function down(Schema $schema) : void\n {\n $this->addSql('CREATE TABLE galaxiee (id INT AUTO_INCREMENT NOT NULL, idu_id INT NOT NULL, nom VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, INDEX IDX_8576D2AF376A6230 (idu_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE trou_noir (id INT AUTO_INCREMENT NOT NULL, id_g_id INT DEFAULT NULL, nom VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, INDEX IDX_AB27242D95951086 (id_g_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('ALTER TABLE galaxiee ADD CONSTRAINT FK_8576D2AF376A6230 FOREIGN KEY (idu_id) REFERENCES univers (id)');\n $this->addSql('ALTER TABLE trou_noir ADD CONSTRAINT FK_AB27242D95951086 FOREIGN KEY (id_g_id) REFERENCES galaxie (id)');\n $this->addSql('DROP TABLE trounoir');\n $this->addSql('ALTER TABLE galaxie DROP FOREIGN KEY FK_1C880711376A6230');\n $this->addSql('DROP INDEX IDX_1C880711376A6230 ON galaxie');\n $this->addSql('ALTER TABLE galaxie CHANGE idu_id id_u_id INT NOT NULL');\n $this->addSql('ALTER TABLE galaxie ADD CONSTRAINT FK_1C8807116F858F92 FOREIGN KEY (id_u_id) REFERENCES univers (id)');\n $this->addSql('CREATE INDEX IDX_1C8807116F858F92 ON galaxie (id_u_id)');\n $this->addSql('ALTER TABLE planete DROP FOREIGN KEY FK_490E3E5712013DEC');\n $this->addSql('DROP INDEX IDX_490E3E5712013DEC ON planete');\n $this->addSql('ALTER TABLE planete ADD id_s_id INT NOT NULL, ADD nb_sattelite INT NOT NULL, DROP ids_id, DROP nb_satelite');\n $this->addSql('ALTER TABLE planete ADD CONSTRAINT FK_490E3E574AEED04E FOREIGN KEY (id_s_id) REFERENCES systeme (id)');\n $this->addSql('CREATE INDEX IDX_490E3E574AEED04E ON planete (id_s_id)');\n $this->addSql('ALTER TABLE systeme DROP FOREIGN KEY FK_95796DE3CD7AFD24');\n $this->addSql('DROP INDEX IDX_95796DE3CD7AFD24 ON systeme');\n $this->addSql('ALTER TABLE systeme CHANGE idg_id id_g_id INT NOT NULL');\n $this->addSql('ALTER TABLE systeme ADD CONSTRAINT FK_95796DE395951086 FOREIGN KEY (id_g_id) REFERENCES galaxie (id)');\n $this->addSql('CREATE INDEX IDX_95796DE395951086 ON systeme (id_g_id)');\n }", "public function down() {\n $this->dbforge->drop_column('timesheets_items', 'orgID', TRUE);\n $this->dbforge->drop_column('timesheets_items', 'brandID', TRUE);\n $this->dbforge->drop_column('timesheets_items', 'reason_desc', TRUE);\n $this->dbforge->drop_column('timesheets_expenses', 'orgID', TRUE);\n $this->dbforge->drop_column('timesheets_expenses', 'brandID', TRUE);\n $this->dbforge->drop_column('timesheets_expenses', 'reason_desc', TRUE);\n\n // change reason to note\n $fields = array(\n 'reason' => array(\n 'name' => 'note',\n 'type' => \"VARCHAR\",\n 'constraint' => 200,\n 'null' => TRUE\n )\n );\n $this->dbforge->modify_column('timesheets_items', $fields);\n $this->dbforge->modify_column('timesheets_expenses', $fields);\n }", "public function down(): void\n {\n // Remove your data\n }", "public function down()\n\t{\n\t\t//Schema::drop('purchase_orders');\n\t\t//Schema::drop('purchase_order_details');\n\t}", "public function down()\n {\n\tSchema::drop('activities');\n }", "public function down()\n {\n //return false;\n\t\t\n\t\t$TABLE_NAME = 'Haber';\n $this->dropTable($TABLE_NAME);\n\t\t\n\t\t$TABLE_NAME = 'HaberKategori';\n $this->dropTable($TABLE_NAME);\n }", "public function down(){\n $this->dbforge->drop_table('subcategories_news'); //eliminacion de la tabla subcategories_news\n }", "public function down()\n {\n }", "public function down()\n {\n }", "public function down()\n\t{\n\t\tDB::table('professor')->where('professor_id', '=', 1)->delete();\n\t\tDB::table('professor')->where('professor_id', '=', 2)->delete();\n\t\tDB::query('ALTER TABLE professor AUTO_INCREMENT = 1');\n\n\t\t//\n\t}", "public function down(): bool {\n\t\t// Remove & add logic to revert the migration here.\n\t\techo \"M230123030315BaseTables cannot be rolled back.\\n\";\n\t\treturn false;\n\t}", "public function getDownSQL()\r\n {\r\n return array (\n 'propel' => '\r\n# This is a fix for InnoDB in MySQL >= 4.1.x\r\n# It \"suspends judgement\" for fkey relationships until are tables are set.\r\nSET FOREIGN_KEY_CHECKS = 0;\r\n\r\nALTER TABLE `promocion` CHANGE `fecha_inicio` `fecha_inicio` DATE NOT NULL;\r\n\r\nALTER TABLE `promocion` CHANGE `fecha_fin` `fecha_fin` DATE NOT NULL;\r\n\r\nALTER TABLE `promocion` CHANGE `descuento` `descuento` DECIMAL;\r\n\r\nALTER TABLE `promocion`\r\n ADD `descripcion` VARCHAR(70) AFTER `id`,\r\n ADD `estado` VARCHAR(11) AFTER `fecha_fin`,\r\n ADD `promocion_global` TINYINT(1) NOT NULL AFTER `descuento`;\r\n\r\nALTER TABLE `promocion` DROP `activo`;\r\n\r\n# This restores the fkey checks, after having unset them earlier\r\nSET FOREIGN_KEY_CHECKS = 1;\r\n',\n);\r\n }", "public function down()\n\t{\n\t\t//return false;\n\t}", "public function down(): void\n {\n try {\n $this->db->ForeignKeyChecks(false);\n $statement=$this->db->prepare(\"DROP TABLE IF EXISTS prom2_pages\");\n $statement->execute();\n $statement->close();\n $this->db->ForeignKeyChecks(true);\n } catch (\\mysqli_sql_exception $exception) {\n throw $exception;\n }\n }", "public function down()\n\t{\n\t\t//\n\t\tSchema::drop('options');\n\t}", "public function change()\n {\n $this->schema->table('recurring_expenses',function($table){\n $table->date('end_repeat')->nullable();\n $table->boolean('ended')->default(false);\n $table->enum('repeat',['0','1','7','14','30','365'])->nullable();\n });\n\n $this->schema->table('expenses',function($table){\n $table->dropColumn('end_repeat');\n $table->dropColumn('repeat');\n $table->integer('parent_id')->nullable();\n $table->foreign('parent_id')->references('id')->on('expenses')->onDelete('cascade');\n });\n }", "public function down()\n {\n Schema::table('users', function (Blueprint $table) {\n $table->dropForeign('users_id_turma_foreign');\n });\n\n Schema::table('contato', function (Blueprint $table) {\n $table->dropForeign('contato_id_usuario_foreign');\n });\n\n Schema::table('monitores', function (Blueprint $table) {\n $table->dropForeign('monitores_id_turma_foreign');\n $table->dropForeign('monitores_id_usuario_foreign');\n });\n\n Schema::table('galeria_portifolio', function (Blueprint $table) {\n $table->dropForeign('galeria_portifolio_id_portifolio_foreign');\n });\n\n Schema::table('portifolio_alunos', function (Blueprint $table) {\n $table->dropForeign('portifolio_alunos_id_portifolio_foreign');\n $table->dropForeign('portifolio_alunos_id_usuario_foreign');\n });\n\n Schema::table('cobranca', function (Blueprint $table) {\n $table->dropForeign('cobranca_id_aluno_foreign');\n });\n\n Schema::table('lista_de_presenca', function (Blueprint $table) {\n $table->dropForeign('lista_de_presenca_id_usuario_foreign');\n });\n\n Schema::table('forum_da_turma', function (Blueprint $table) {\n $table->dropForeign('forum_da_turma_id_usuario_foreign');\n });\n\n Schema::table('posts_do_site', function (Blueprint $table) {\n $table->dropForeign('posts_do_site_id_usuario_foreign');\n });\n\n Schema::table('posts_do_forum', function (Blueprint $table) {\n $table->dropForeign('posts_do_forum_id_topico_foreign');\n $table->dropForeign('posts_do_forum_id_usuario_foreign');\n });\n }", "public function down()\n\t{\n\t\t$this->dropForeignKey('FK_task_creator','tbl_task');\n\n\t\t$this->dropTable('tbl_task');\n\t}", "public function down()\n {\n $this->table('articles')->drop()->save();\n $this->table('categories')->drop()->save();\n $this->table('football_ragistrations')->drop()->save();\n $this->table('friends')->drop()->save();\n $this->table('menus')->drop()->save();\n $this->table('picnic_ragistrations')->drop()->save();\n $this->table('products')->drop()->save();\n $this->table('profiles')->drop()->save();\n $this->table('skills')->drop()->save();\n $this->table('spouses')->drop()->save();\n $this->table('students')->drop()->save();\n $this->table('submenus')->drop()->save();\n $this->table('users')->drop()->save();\n }", "public function down(){\n\t\tSchema::dropIfExists('cargo');\n\t}", "public function down()\n {\n $this->table('users')\n ->dropForeignKey(\n 'role_id'\n )->save();\n\n $this->table('users')\n ->removeIndexByName('FK_users_roles')\n ->update();\n\n $this->table('users')\n ->addColumn('can_edit', 'boolean', [\n 'after' => 'enabled',\n 'default' => '0',\n 'length' => null,\n 'null' => false,\n ])\n ->removeColumn('role_id')\n ->update();\n\n $this->table('stundenplan')\n ->changeColumn('note', 'string', [\n 'default' => null,\n 'length' => 255,\n 'null' => true,\n ])\n ->removeColumn('loggedInNote')\n ->update();\n\n $this->table('roles')->drop()->save();\n }", "public function down()\n\t{\n\t\t//\n\t\tDB::query('TRUNCATE TABLE app_user_apps_publishes CASCADE');\n\t\tDB::query('TRUNCATE TABLE app_apps_fbapps CASCADE');\n\t\tDB::query('TRUNCATE TABLE app_apps_applications CASCADE');\n\t}", "protected abstract function do_down();", "public function down()\n\t{\n\t\t// Drop Table\n\t\tSchema::drop('activities_types');\n\t}", "public function down(Schema $schema) : void\n {\n $this->addSql('CREATE TABLE encherir_acheteur (encherir_id INT NOT NULL, acheteur_id INT NOT NULL, INDEX IDX_41ABAAFBB0BA17BB (encherir_id), INDEX IDX_41ABAAFB96A7BB5F (acheteur_id), PRIMARY KEY(encherir_id, acheteur_id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE encherir_lot (encherir_id INT NOT NULL, lot_id INT NOT NULL, INDEX IDX_3C56919BB0BA17BB (encherir_id), INDEX IDX_3C56919BA8CBA5F7 (lot_id), PRIMARY KEY(encherir_id, lot_id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('ALTER TABLE encherir_acheteur ADD CONSTRAINT FK_41ABAAFB96A7BB5F FOREIGN KEY (acheteur_id) REFERENCES acheteur (id) ON DELETE CASCADE');\n $this->addSql('ALTER TABLE encherir_acheteur ADD CONSTRAINT FK_41ABAAFBB0BA17BB FOREIGN KEY (encherir_id) REFERENCES encherir (id) ON DELETE CASCADE');\n $this->addSql('ALTER TABLE encherir_lot ADD CONSTRAINT FK_3C56919BA8CBA5F7 FOREIGN KEY (lot_id) REFERENCES lot (id) ON DELETE CASCADE');\n $this->addSql('ALTER TABLE encherir_lot ADD CONSTRAINT FK_3C56919BB0BA17BB FOREIGN KEY (encherir_id) REFERENCES encherir (id) ON DELETE CASCADE');\n $this->addSql('ALTER TABLE encherir DROP FOREIGN KEY FK_503B7C878EB576A8');\n $this->addSql('ALTER TABLE encherir DROP FOREIGN KEY FK_503B7C878EFC101A');\n $this->addSql('DROP INDEX IDX_503B7C878EB576A8 ON encherir');\n $this->addSql('DROP INDEX IDX_503B7C878EFC101A ON encherir');\n $this->addSql('ALTER TABLE encherir DROP id_acheteur_id, DROP id_lot_id');\n }", "public function down()\n {\n $this->table('accounting_entries')\n ->dropForeignKey(\n 'accounting_entry_type_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('associations_events')\n ->dropForeignKey(\n 'event_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('events')\n ->dropForeignKey(\n 'event_type_id'\n )->save();\n\n $this->table('members')\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('statistics')\n ->dropForeignKey(\n 'statistics_type_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('statistics_event')\n ->dropForeignKey(\n 'statistics_id'\n )\n ->dropForeignKey(\n 'event_id'\n )->save();\n\n $this->table('users')\n ->dropForeignKey(\n 'role_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('accounting_entries')->drop()->save();\n $this->table('accounting_entry_type')->drop()->save();\n $this->table('associations')->drop()->save();\n $this->table('associations_events')->drop()->save();\n $this->table('event_type')->drop()->save();\n $this->table('events')->drop()->save();\n $this->table('members')->drop()->save();\n $this->table('roles')->drop()->save();\n $this->table('statistics')->drop()->save();\n $this->table('statistics_event')->drop()->save();\n $this->table('statistics_type')->drop()->save();\n $this->table('users')->drop()->save();\n }", "public function down()\n\t{\n\t\tif(Yii::app()->db->getSchema()->getTable(\"{{user_block}}\")){\n\t\t\t$this->dropTable(\"{{user_block}}\");\n\t\t}\n\n\t}", "public function getDownSQL()\n {\n return array (\n 'default' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nDROP TABLE IF EXISTS `user_login`;\n\nALTER TABLE `user` DROP `user_mname`;\n\nALTER TABLE `user` DROP `user_user`;\n\nALTER TABLE `user` DROP `user_password`;\n\nALTER TABLE `user` DROP `user_date_lastlogin`;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }", "public function down()\n\t{\n\t\tSchema::table('officers', function($t){\n\t\t\t$t->drop_column('role');\n\t\t});\n\t}", "public function safeDown()\n {\n $this->down();\n }", "public function safeDown()\n {\n $this->down();\n }", "public function down()\n\t{\n\t\tSchema::drop('refs');\n\t}", "public function down () {\n\t\treturn $this->rename_column ('headline', 'title', 'string', array ('limit' => 72));\n\t}", "public function down()\n\t{\n\t\tSchema::drop('appeals');\n\t}", "public function safeDown()\r\n {\r\n $this->down();\r\n }", "public function down(Schema $schema) : void\n {\n $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \\'mysql\\'.');\n\n<<<<<<< HEAD\n $this->addSql('ALTER TABLE affaire_liste_affaire DROP FOREIGN KEY FK_80DBABFCF082E755');\n $this->addSql('ALTER TABLE affaire DROP FOREIGN KEY FK_9C3F18EFED813170');\n=======\n<<<<<<< HEAD:src/Migrations/Version20200418121015.php\n $this->addSql('ALTER TABLE affaire_liste_affaire DROP FOREIGN KEY FK_80DBABFCF082E755');\n $this->addSql('ALTER TABLE affaire DROP FOREIGN KEY FK_9C3F18EFED813170');\n=======\n $this->addSql('ALTER TABLE liste_affaire_affaire DROP FOREIGN KEY FK_CA81ADF3F082E755');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA2463CD7C3');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA25D493FF4');\n $this->addSql('ALTER TABLE correspondant_administratif DROP FOREIGN KEY FK_E1E7152EBF396750');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA246135043');\n>>>>>>> e1e13eb645b79ada7517f9d2be860dc1655c42db:src/Migrations/Version20200318150734.php\n>>>>>>> 0c1c04bb7c2bbee076bc5fdb1e2456d1af817866\n $this->addSql('ALTER TABLE enfant_sejour DROP FOREIGN KEY FK_159E7E65450D2529');\n $this->addSql('ALTER TABLE enfant_sejour DROP FOREIGN KEY FK_159E7E6584CF0CF');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA2463CD7C3');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA25D493FF4');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA2FF631228');\n $this->addSql('ALTER TABLE affaire_liste_affaire DROP FOREIGN KEY FK_80DBABFCE2687AC3');\n $this->addSql('ALTER TABLE sejour DROP FOREIGN KEY FK_96F52028E2687AC3');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA246135043');\n $this->addSql('ALTER TABLE correspondant_administratif DROP FOREIGN KEY FK_E1E7152E46135043');\n $this->addSql('DROP TABLE affaire');\n<<<<<<< HEAD\n $this->addSql('DROP TABLE affaire_liste_affaire');\n $this->addSql('DROP TABLE type_affaire');\n=======\n<<<<<<< HEAD:src/Migrations/Version20200418121015.php\n $this->addSql('DROP TABLE affaire_liste_affaire');\n $this->addSql('DROP TABLE type_affaire');\n=======\n $this->addSql('DROP TABLE centre');\n $this->addSql('DROP TABLE correspondant_administratif');\n $this->addSql('DROP TABLE responsable_legal');\n>>>>>>> e1e13eb645b79ada7517f9d2be860dc1655c42db:src/Migrations/Version20200318150734.php\n>>>>>>> 0c1c04bb7c2bbee076bc5fdb1e2456d1af817866\n $this->addSql('DROP TABLE enfant');\n $this->addSql('DROP TABLE enfant_sejour');\n $this->addSql('DROP TABLE sejour');\n $this->addSql('DROP TABLE centre');\n $this->addSql('DROP TABLE correspondant_administratif');\n $this->addSql('DROP TABLE etablissement');\n $this->addSql('DROP TABLE liste_affaire');\n $this->addSql('DROP TABLE responsable_legal');\n $this->addSql('DROP TABLE user');\n }", "public function getDownSQL()\n {\n return array (\n 'default' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nDROP TABLE IF EXISTS `user`;\n\nDROP TABLE IF EXISTS `question`;\n\nDROP TABLE IF EXISTS `answer`;\n\nDROP TABLE IF EXISTS `image`;\n\nDROP TABLE IF EXISTS `vote`;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }", "public function safeDown()\n\t{\n\t\t$this->dropTable($this->tableName);\n\t}", "public function safeDown()\n\t{\n\t\t$this->dropTable($this->tableName);\n\t}", "public function safeDown()\n\t{\n\t\t$this->dropTable($this->tableName);\n\t}", "public function down()\n {\n $this->table('mail_contents')->drop()->save();\n }", "public function down() {\n\t}", "public function down() {\n\t}", "public function down() {\n\t}", "public function down()\n {\n Schema::dropIfExists('reunion');\n }", "public function down(): void\n {\n $this->table('services')\n ->dropForeignKey(\n ['currency_id','billing_period_id']\n )->save();\n $this->execute('DELETE FROM currencies');\n $this->execute('DELETE FROM billing_periods');\n $this->table('services')->drop()->save();\n $this->table('currencies')->drop()->save();\n $this->table('billing_periods')->drop()->save();\n }", "public function down()\n\t{\n\t\tSchema::drop('article_category');\n\t}", "public function down()\n {\n Schema::table('users', function (Blueprint $table) {\n $table->renameColumn('first_name', 'name');\n $table->dropIndex('users_first_name_index');\n $table->dropIndex('users_created_at_index');\n $table->dropIndex('users_updated_at_index');\n $table->dropColumn(\"last_name\");\n $table->dropColumn(\"username\");\n $table->dropColumn(\"provider\");\n $table->dropColumn(\"provider_id\");\n $table->dropColumn(\"api_token\");\n $table->dropColumn(\"code\");\n $table->dropColumn(\"remember_token\");\n $table->dropColumn(\"role_id\");\n $table->dropColumn(\"last_login\");\n $table->dropColumn(\"status\");\n $table->dropColumn(\"root\");\n $table->dropColumn('backend');\n $table->dropColumn(\"photo_id\");\n $table->dropColumn(\"lang\");\n $table->dropColumn(\"color\");\n $table->dropColumn(\"about\");\n $table->dropColumn(\"facebook\");\n $table->dropColumn(\"twitter\");\n $table->dropColumn(\"linked_in\");\n $table->dropColumn(\"google_plus\");\n });\n }", "public function down()\n\t{\n\t\tSchema::drop('entries');\n\t}", "public function down()\n\t{\n\t\tSchema::table('precios_aterrizajes_despegues', function(Blueprint $table)\n\t\t{\n\t\t\t//\n\t\t});\n\t}", "public function down()\n{\nSchema::drop('statustype');\nSchema::drop('area');\nSchema::drop('region');\nSchema::drop('territory');\nSchema::drop('trackedevent');\nSchema::drop('zip_territory');\nSchema::drop('messagetype');\nSchema::drop('optintype');\nSchema::drop('representative');\nSchema::drop('pediatrician');\nSchema::drop('application_messagestatus');\nSchema::drop('application_optin');\nSchema::drop('application_trackedevent');\nSchema::drop('application');\n}", "public function down()\n\t{\n\t\tSchema::drop(Config::get('sentry::sentry.table.users_metadata'));\n\t}", "protected function tearDown(): void {\n $migration = include __DIR__.'/../database/migrations/create_all_visitors_tables.php.stub';\n $migration->down();\n\n $migrationTest = include __DIR__.'/Support/migrations/2023_01_12_000000_create_test_models_table.php';\n $migrationTest->down();\n }", "public function down(Schema $schema) : void\n {\n $this->addSql('ALTER TABLE classe_personne DROP FOREIGN KEY FK_350001418F5EA509');\n $this->addSql('ALTER TABLE matiere_classe DROP FOREIGN KEY FK_AF649A8B8F5EA509');\n $this->addSql('ALTER TABLE note DROP FOREIGN KEY FK_CFBDFA148F5EA509');\n $this->addSql('ALTER TABLE seance DROP FOREIGN KEY FK_DF7DFD0E8F5EA509');\n $this->addSql('ALTER TABLE cours DROP FOREIGN KEY FK_FDCA8C9CF46CD258');\n $this->addSql('ALTER TABLE matiere_classe DROP FOREIGN KEY FK_AF649A8BF46CD258');\n $this->addSql('ALTER TABLE note DROP FOREIGN KEY FK_CFBDFA14F46CD258');\n $this->addSql('ALTER TABLE personne_matiere DROP FOREIGN KEY FK_4E9BB3B7F46CD258');\n $this->addSql('ALTER TABLE absence DROP FOREIGN KEY FK_765AE0C9A21BD112');\n $this->addSql('ALTER TABLE classe_personne DROP FOREIGN KEY FK_35000141A21BD112');\n $this->addSql('ALTER TABLE contacte DROP FOREIGN KEY FK_C794A022A21BD112');\n $this->addSql('ALTER TABLE demande DROP FOREIGN KEY FK_2694D7A5A21BD112');\n $this->addSql('ALTER TABLE note DROP FOREIGN KEY FK_CFBDFA14A6CC7B2');\n $this->addSql('ALTER TABLE personne_matiere DROP FOREIGN KEY FK_4E9BB3B7A21BD112');\n $this->addSql('ALTER TABLE seance DROP FOREIGN KEY FK_DF7DFD0EE455FCC0');\n $this->addSql('ALTER TABLE seance DROP FOREIGN KEY FK_DF7DFD0EBDDFA3C9');\n $this->addSql('ALTER TABLE seance DROP FOREIGN KEY FK_DF7DFD0EDC304035');\n $this->addSql('ALTER TABLE absence DROP FOREIGN KEY FK_765AE0C9E3797A94');\n $this->addSql('ALTER TABLE personne DROP FOREIGN KEY FK_FCEC9EFA76ED395');\n $this->addSql('ALTER TABLE reset_password_request DROP FOREIGN KEY FK_7CE748AA76ED395');\n $this->addSql('DROP TABLE absence');\n $this->addSql('DROP TABLE classe');\n $this->addSql('DROP TABLE classe_personne');\n $this->addSql('DROP TABLE contacte');\n $this->addSql('DROP TABLE cours');\n $this->addSql('DROP TABLE demande');\n $this->addSql('DROP TABLE matiere');\n $this->addSql('DROP TABLE matiere_classe');\n $this->addSql('DROP TABLE news');\n $this->addSql('DROP TABLE note');\n $this->addSql('DROP TABLE personne');\n $this->addSql('DROP TABLE personne_matiere');\n $this->addSql('DROP TABLE reset_password_request');\n $this->addSql('DROP TABLE salle');\n $this->addSql('DROP TABLE seance');\n $this->addSql('DROP TABLE user');\n }", "public function down()\n\t{\n\t\tSchema::drop('stor_mem');\n\t}", "public function down(Schema $schema) : void\n {\n $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \\'mysql\\'.');\n\n $this->addSql('ALTER TABLE booking DROP FOREIGN KEY FK_E00CEDDEA76ED395');\n $this->addSql('ALTER TABLE booking DROP FOREIGN KEY FK_E00CEDDE19FCD424');\n $this->addSql('DROP TABLE booking');\n $this->addSql('DROP TABLE product_image');\n $this->addSql('DROP TABLE family_page_container');\n $this->addSql('DROP TABLE user');\n $this->addSql('DROP TABLE time_line');\n $this->addSql('ALTER TABLE family DROP FOREIGN KEY FK_A5E6215B727ACA70');\n $this->addSql('DROP INDEX IDX_A5E6215B727ACA70 ON family');\n $this->addSql('ALTER TABLE family ADD page_content_id INT NOT NULL, DROP parent_id, DROP has_uniques_prices, DROP has_seasonal_products');\n $this->addSql('ALTER TABLE family ADD CONSTRAINT FK_A5E6215B8F409273 FOREIGN KEY (page_content_id) REFERENCES page_content (id)');\n $this->addSql('CREATE INDEX IDX_A5E6215B8F409273 ON family (page_content_id)');\n $this->addSql('ALTER TABLE link ADD page_container_id INT DEFAULT NULL, DROP url');\n $this->addSql('ALTER TABLE link ADD CONSTRAINT FK_36AC99F123D5B0C FOREIGN KEY (page_container_id) REFERENCES page_container (id)');\n $this->addSql('CREATE INDEX IDX_36AC99F123D5B0C ON link (page_container_id)');\n $this->addSql('ALTER TABLE product DROP content, DROP order_by, DROP is_generic, DROP type, CHANGE title label VARCHAR(50) NOT NULL COLLATE utf8mb4_unicode_ci');\n $this->addSql('ALTER TABLE unit DROP duration');\n }", "public function down(Schema $schema) : void\n {\n $this->addSql('ALTER TABLE `order` DROP FOREIGN KEY FK_F5299398F5B7AF75');\n $this->addSql('ALTER TABLE suppliers DROP FOREIGN KEY FK_AC28B95C8486F9AC');\n $this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D6498486F9AC');\n $this->addSql('ALTER TABLE stock DROP FOREIGN KEY FK_4B365660D629F605');\n $this->addSql('ALTER TABLE stock DROP FOREIGN KEY FK_4B365660E308AC6F');\n $this->addSql('ALTER TABLE order_detail DROP FOREIGN KEY FK_ED896F46CFFE9AD6');\n $this->addSql('ALTER TABLE product DROP FOREIGN KEY FK_D34A04ADEE45BDBF');\n $this->addSql('ALTER TABLE suppliers DROP FOREIGN KEY FK_AC28B95CEE45BDBF');\n $this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D649EE45BDBF');\n $this->addSql('ALTER TABLE order_detail DROP FOREIGN KEY FK_ED896F464584665A');\n $this->addSql('ALTER TABLE product_theme DROP FOREIGN KEY FK_36299C544584665A');\n $this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D649D60322AC');\n $this->addSql('ALTER TABLE order_detail DROP FOREIGN KEY FK_ED896F46DCD6110');\n $this->addSql('ALTER TABLE order_detail DROP FOREIGN KEY FK_ED896F462ADD6D8C');\n $this->addSql('ALTER TABLE product_theme DROP FOREIGN KEY FK_36299C5459027487');\n $this->addSql('ALTER TABLE `order` DROP FOREIGN KEY FK_F5299398A76ED395');\n $this->addSql('DROP TABLE address');\n $this->addSql('DROP TABLE format');\n $this->addSql('DROP TABLE material');\n $this->addSql('DROP TABLE `order`');\n $this->addSql('DROP TABLE order_detail');\n $this->addSql('DROP TABLE picture');\n $this->addSql('DROP TABLE product');\n $this->addSql('DROP TABLE product_theme');\n $this->addSql('DROP TABLE role');\n $this->addSql('DROP TABLE stock');\n $this->addSql('DROP TABLE suppliers');\n $this->addSql('DROP TABLE theme');\n $this->addSql('DROP TABLE user');\n }", "public function down()\n {\n Schema::dropIfExists('data');\n }", "public function down()\n\t{\n\t\tSchema::create('jobs',function($table){$table->increments('id');});\n\t\tSchema::create('job_location',function($table){$table->increments('id');});\n\t\tSchema::create('job_skill',function($table){$table->increments('id');});\n\t\tSchema::create('locations',function($table){$table->increments('id');});\n\t\tSchema::create('location_program',function($table){$table->increments('id');});\n\t\tSchema::create('location_scholarship',function($table){$table->increments('id');});\n\t\tSchema::create('positions',function($table){$table->increments('id');});\n\t\tSchema::create('programs',function($table){$table->increments('id');});\n\t\tSchema::create('program_subject',function($table){$table->increments('id');});\n\t\tSchema::create('scholarships',function($table){$table->increments('id');});\n\t\tSchema::create('scholarship_subject',function($table){$table->increments('id');});\n\t\tSchema::create('skills',function($table){$table->increments('id');});\n\t\tSchema::create('subjects',function($table){$table->increments('id');});\n\t}" ]
[ "0.7950277", "0.78636813", "0.76065636", "0.7493955", "0.7320625", "0.7245268", "0.7187498", "0.71543235", "0.715298", "0.7141911", "0.7135835", "0.71214414", "0.71154845", "0.71057886", "0.7098064", "0.70800334", "0.7078775", "0.70729095", "0.7068331", "0.7066272", "0.7053364", "0.7053364", "0.7042174", "0.7042174", "0.7042174", "0.7041765", "0.7040102", "0.7028846", "0.70253754", "0.7021679", "0.6988633", "0.6986877", "0.6978061", "0.6971848", "0.6944203", "0.6944203", "0.6944203", "0.6942135", "0.6941429", "0.6939214", "0.6935277", "0.69334567", "0.6928689", "0.6924838", "0.6924794", "0.6913486", "0.6902361", "0.6897891", "0.6897845", "0.6897824", "0.6897824", "0.68886673", "0.688262", "0.6874051", "0.6869844", "0.6863713", "0.6858435", "0.68545175", "0.68440175", "0.6842142", "0.6836981", "0.6836124", "0.6834763", "0.68303466", "0.68297166", "0.68282366", "0.6826686", "0.6824025", "0.68185335", "0.6811099", "0.68078107", "0.68056506", "0.68056506", "0.6789167", "0.67755204", "0.67742497", "0.6765081", "0.67597127", "0.67596203", "0.67564446", "0.67564446", "0.67564446", "0.6753443", "0.6753351", "0.6753351", "0.6753351", "0.6752681", "0.674581", "0.6743746", "0.67387754", "0.6733766", "0.67331296", "0.6731279", "0.67302275", "0.6727377", "0.67273724", "0.672722", "0.672607", "0.67173517", "0.67139125", "0.671303" ]
0.0
-1
get sensor accuracy from metadata
public function calculateAccuracy(){ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAccuracy()\n {\n return $this->accuracy;\n }", "function accuracyMeasure() {\r\n\r\n\t\tif ($this->expectsPost(array('measureId', 'referenceTimestamp', 'userTimestamp'))) {\r\n\r\n\t\t\t$result['success'] = false;\r\n\r\n\t\t\t$watch = $this->watch->getWatchByMeasureId($this->measureId);\r\n\r\n\t\t\tif ($watch && \r\n\t\t\t\t$watch->userId == $this->session->userdata('userId')){\r\n\r\n\t\t\t\t//Add the watch measure\r\n\t\t\t\t$watchMeasure = $this->measure->addAccuracyMesure(\r\n\t\t\t\t\t$this->measureId,\r\n\t\t\t\t\t$this->referenceTimestamp/1000,\r\n\t\t\t\t\t$this->userTimestamp/1000\r\n\t\t\t\t);\r\n\r\n\r\n\t\t\t\t// If the computed accuracy makes sense, we return success\r\n\t\t\t\tif (is_numeric($watchMeasure->accuracy)) {\r\n\t\t\t\t\t$result['success'] = true;\r\n\t\t\t\t\t//We store the computed accuracy & percentile\r\n\t\t\t\t\t$result['accuracy'] = $watchMeasure->accuracy;\r\n\t\t\t\t\t$result['percentile'] = $watchMeasure->percentile;\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\techo json_encode($result);\r\n\t\t}\r\n\t}", "public function getAccuracy()\n {\n if (!isset($this->accuracy)) {\n $this->accuracy = (($nodeList = $this->getDomXPath($this->getDomDocument())->query($this->getAccuracyQuery())) && $nodeList->length)\n ? $nodeList->item(0)->value\n : null;\n }\n return $this->accuracy;\n }", "public function getAccuracyMeters()\n {\n return $this->accuracy_meters;\n }", "public function getIntensity() {}", "public function get_accuracy() {\r\n\r\n\t\tif($this->expectsPost(array('measureId', 'watchId'))){\r\n\r\n\t\t\t$this->event->add(ACCURACY_LOAD);\r\n\r\n\r\n\t\t\t$this->_headerData['headerClass'] = 'blue';\r\n\t\t\tarray_push($this->_headerData['javaScripts'], \"input.time.logic\", \"time.api\",\r\n\t\t\t\"watch.animation\");\r\n\r\n\t\t\t$this->load->view('header', $this->_headerData);\r\n\r\n\t\t\t$this->_bodyData['selectedWatch'] = $this->watch->getWatch($this->input->post('watchId'));\r\n\t\t\t$this->_bodyData['measureId'] = $this->input->post('measureId');\r\n\r\n\t\t\t$this->load->view('measure/get-accuracy', $this->_bodyData);\r\n\r\n\t\t\t$this->load->view('footer');\r\n\r\n\t\t} else {\r\n\t\t\tredirect('/measures/');\r\n\t\t}\r\n\t}", "public function luminance(): float;", "public function getAccuracyType()\n {\n $value = $this->get(self::ACCURACYTYPE);\n return $value === null ? (integer)$value : $value;\n }", "public function humidityScore();", "public function getAverageConfidence(): float\n {\n return RoadDamageReport::where('roaddamage_id', $this->id)\n ->avg('confidence');\n }", "function amap_ma_get_unit_of_measurement() {\n $unitmeas = trim(elgg_get_plugin_setting('unitmeas', AMAP_MA_PLUGIN_ID));\n if ($unitmeas === 'meters') {\n return 1;\n } else if ($unitmeas === 'km') {\n return 1000;\n } else if ($unitmeas === 'miles') {\n return 1609.344;\n }\n\n return 1; // default value is for meters\n}", "public function get_magneticHeading(): float\n {\n // $res is a double;\n if ($this->_cacheExpiration <= YAPI::GetTickCount()) {\n if ($this->load(YAPI::$_yapiContext->GetCacheValidity()) != YAPI::SUCCESS) {\n return self::MAGNETICHEADING_INVALID;\n }\n }\n $res = $this->_magneticHeading;\n return $res;\n }", "public function getAccuracyLabel() {\n\t\treturn $this->accuracyLabels[ $this->accuracy ];\n\t}", "protected function getAccuracyQuery()\n {\n return $this->accuracyQuery;\n }", "public function getMediaPesata(): float\n {\n return array_reduce($this->esami, function ($acc, $esame) {\n return $acc + $esame->voto * $esame->cfu * $esame->in_avg;\n }, 0) / $this->getCFUInAVG();\n }", "private function determineQuality($accuracy = 0, $quality_calibration = 0){\n\n if ($quality_calibration == 0)\n return 'unknown';\n\n if ($accuracy <= $quality_calibration * 0.5)\n return 'excellent';\n else if ($accuracy <= $quality_calibration * 1.5)\n return 'good';\n else if ($accuracy <= $quality_calibration * 4)\n return 'mediocre';\n else\n return 'total crap';\n\n }", "public function sensorReadingMapValue($sensor)\n {\n $reading = 0;\n //echo $reading;\n $sensormap = SensorMap::where('sensorID', '=', $sensor->sensorID)->first();\n\n if(!$sensormap){\n $sensormap = DatasetMap::where('sensorID', '=', $sensor->sensorID)->first();\n }\n $point = $sensormap->point;\n //var_dump($sensordata);\n switch($point){\n case \"temp1\":\n $reading = $sensor->temp1;\n break;\n case \"temp2\":\n $reading = $sensor->temp2;\n break;\n case \"temp3\":\n $reading = $sensor->temp3;\n break;\n case \"temp4\":\n $reading = $sensor->temp4;\n break;\n case \"temp5\":\n $reading = $sensor->temp5;\n break;\n }\n\n\n return $reading;\n }", "public function tempHumScore();", "private function _getNumberOfMetrics() {}", "public function get_rainmeters() {\n\t\t//Returns true or false. Values are set in $rainmeters.\n\t\treturn $this->_get_rainmeters();\n\t}", "public function hasSensor()\n {\n return $this->sensor;\n }", "public function get_calibration_scores();", "public function get_luminance()\n {\n return (int) ($this->_hsl['luminance'] * self::LUMINANCE_MAX);\n }", "public function getHumidity();", "public function getMeasurement()\n {\n return $this->measurement;\n }", "public function getMetrics(): array;", "public function get_luminosity(): int\n {\n // $res is a int;\n if ($this->_cacheExpiration <= YAPI::GetTickCount()) {\n if ($this->load(YAPI::$_yapiContext->GetCacheValidity()) != YAPI::SUCCESS) {\n return self::LUMINOSITY_INVALID;\n }\n }\n $res = $this->_luminosity;\n return $res;\n }", "public function getAltitude()\n {\n $value = $this->get(self::ALTITUDE);\n return $value === null ? (integer)$value : $value;\n }", "public function accuracy($test_data,$label='label')\n\t{\n\t\t$first_label = array_keys($test_data)[0];\n\t\t$correct = 0;\n\t\t$total = count($test_data[$first_label]);\n\t\t$current_data_set = [];\n\t\tforeach (range(0, $total-1) as $index => $value) {\n\t\t\tforeach ($test_data as $label => $column) {\n\t\t\t\t$current_data_set[$label][] = $column[$index];\n\t\t\t}\n\t\t\t$accurate = ($this->predict($current_data_set) == $current_data_set[$label][0]);\n\t\t\tif($accurate){\n\t\t\t\t$correct++;\n\t\t\t}\n\t\t\t$current_data_set = [];\n\t\t}\n\n\t\treturn ($correct/$total);\n\t}", "public function getRealType() {}", "function amap_ma_get_unit_of_measurement_string() {\n $unitmeas = trim(elgg_get_plugin_setting('unitmeas', AMAP_MA_PLUGIN_ID));\n if ($unitmeas === 'meters') {\n return elgg_echo(\"amap_maps_api:search:radius:meters\");\n } else if ($unitmeas === 'km') {\n return elgg_echo(\"amap_maps_api:search:radius:km\");\n } else if ($unitmeas === 'miles') {\n return elgg_echo(\"amap_maps_api:search:radius:miles\");\n }\n\n return elgg_echo(\"amap_maps_api:settings:unitmeas:meters\"); // default value is for meters\n}", "public function getTemperature();", "public function get_meter(): float\n {\n // $res is a double;\n if ($this->_cacheExpiration <= YAPI::GetTickCount()) {\n if ($this->load(YAPI::$_yapiContext->GetCacheValidity()) != YAPI::SUCCESS) {\n return self::METER_INVALID;\n }\n }\n $res = $this->_meter;\n return $res;\n }", "public function getRainVolume(): float\n {\n return (float)($this->details['rain']['3h'] ?? 0);\n }", "public function getAverageAlt() :float\n {\n //https://stackoverflow.com/a/33461488/1469799\n $numbers = array_filter($this->numbers);\n return floatval(array_sum($numbers)/count($numbers));\n }", "private function _get_rainmeters() {\n\t\tif (!$this->_get_data('ralist')) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t//Set all the rainmeter values\n\t\tunset($this->rainmeters);\n\t\tforeach ($this->raw->response as $key=>$value) {\n\t\t\t$this->rainmeters->{$key} = $value;\t\t\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "public function getResultAgainstMetric();", "public function calcSnowAvg() {\n\t\t$min = $this->snow['base'];\n\t\t$max = $this->snow['upperbase'];\n\t\treturn ($min + $max)/2;\n\t}", "public function getMetric()\n {\n $connection = ssh2_connect($this->addr, $this->port);\n if ($connection === false) {\n return 0;\n }\n if (ssh2_auth_password($connection, $this->login, $this->password) == false) {\n return 0;\n }\n $sftp = ssh2_sftp($connection);\n if ($sftp === false) {\n return 0;\n }\n return 1;\n }", "public function getAverage(): float\n {\n return $this->average;\n }", "public function getConfidence()\n {\n return $this->confidence;\n }", "public function getConfidence()\n {\n return $this->confidence;\n }", "public function getCurrentmeterreading()\n {\n return $this->currentmeterreading;\n }", "public function getMeterGain();", "function amap_ma_get_unit_of_measurement_string_simple() {\n $unitmeas = trim(elgg_get_plugin_setting('unitmeas', AMAP_MA_PLUGIN_ID));\n if ($unitmeas === 'meters') {\n return elgg_echo(\"amap_maps_api:search:meters\");\n } else if ($unitmeas === 'km') {\n return elgg_echo(\"amap_maps_api:search:km\");\n } else if ($unitmeas === 'miles') {\n return elgg_echo(\"amap_maps_api:search:miles\");\n }\n\n return elgg_echo(\"amap_maps_api:search:meters\"); // default value is for meters\n}", "public function get_uvmeters() {\n\t\t//Returns true or false. Values are set in $uvmeters.\n\t\treturn $this->_get_uvmeters();\n\t}", "public function estimate(){\n\t\t$speed = $this->speed();\n\t\tif($speed === 0 || $this->elapsed() === 0)\n\t\t\treturn 0;\n\n\t\treturn round($this->total / $speed);\n\t}", "function getFrequency() { return $this->readStep(); }", "public function metricList(){\n\t\t\n\t\t$req = $this -> curl_req(\"GET\", \"api/v1/metrics\"); \n\t\t\n\t\t/* Check if the transaction was successfull and pass the data else return false */\n\t\t\n\t\treturn ($req[1]['http_code'] === 200) ? $req[0] : false;\n\t}", "public function getMutationScoreIndicator(): float\n {\n $detectionRateAll = 0;\n $defeatedTotal = $this->killedCount + $this->timedOutCount + $this->errorCount;\n\n if ($this->totalMutantsCount) {\n $detectionRateAll = floor(100 * $defeatedTotal / $this->totalMutantsCount);\n }\n\n return $detectionRateAll;\n }", "public function temperatureScore();", "public function getTotalAttribute(): float;", "function getAverageStats() {\n return $this->averageNpsStats;\n }", "public function getUsage()\n {\n return isset($this->usage) ? $this->usage : 0.0;\n }", "public static abstract function getStatistic();", "public function get_sensors() \n {\n return $this->sensors;\n }", "public function getAltitude()\n {\n return $this->altitude;\n }", "public function getMetrics()\n {\n return $this->metrics;\n }", "public function getMetrics()\n {\n return $this->metrics;\n }", "public function getMetrics()\n {\n return $this->metrics;\n }", "public function getMetrics()\n {\n return $this->metrics;\n }", "public function getLastmeterreading()\n {\n return $this->lastmeterreading;\n }", "private function score_physical_activity(){\r\n\t\t$data = $this->data['physical_activity'];\r\n\t\t$q24 = $this->scoreValue(array(0,3,6,12,24),$data['q24']);\r\n\t\t$q25 = $this->scoreValue(array(0,3,6,12,24),$data['q25']);\r\n\t\t$q26 = $this->scoreValue(array(0,3,6,12,24),$data['q26']);\r\n\t\t$w = ($q24 + $q25 + $q26) / 3;\r\n\r\n\t\tif ($w > 12) $raw = 5;\r\n\t\telse if ($w > 9) $raw = 4;\r\n\t\telse if ($w > 6) $raw = 3;\r\n\t\telse if ($w > 3) $raw = 2;\r\n\t\telse $raw = 1;\r\n\t\t$ob = new stdClass();\r\n\t\t$ob->total = $raw;\r\n\t\t$ob->data = array('q24-26' => array($raw,1,$raw));\r\n\t\treturn $ob;\r\n\t}", "function tp_exif_formatted($file_guid) {\n\n\t$metadata_exif = get_metadata_byname($file_guid, \"tp_exif\");\n\tif (!$metadata_exif) { \n\t\t// //try to load it from the file if its not in the database\n\t\t$file = new ElggFile($file_guid);\n\t\ttd_get_exif($file);\n\t\tunset($file);\n\t\t$metadata_exif = get_metadata_byname($file_guid, \"tp_exif\");\n\t}\n\n\tif (!$metadata_exif) {\n\t\treturn false;\n\t}\n\n\t$exif = unserialize($metadata_exif[\"value\"]);\n\n\t$model = $exif['Model'];\n\tif (!$model) {\n\t\t$model = \"N/A\";\n\t}\n\t$exif_data['Model'] = $model;\n\n\t$exposure = $exif['ExposureTime'];\n\tif (!$exposure) {\n\t\t$exposure = \"N/A\";\n\t}\n\t$exif_data['Shutter'] = $exposure;\n\n\t//got the code snippet below from http://www.zenphoto.org/support/topic.php?id=17\n\t//convert the raw values to understandible values\n\t$Fnumber = explode(\"/\", $exif['FNumber']);\n\tif ($Fnumber[1] != 0) {\n\t\t$Fnumber = $Fnumber[0] / $Fnumber[1];\n\t} else {\n\t\t$Fnumber = 0;\n\t}\n\tif (!$Fnumber) {\n\t\t$Fnumber = \"N/A\";\n\t} else {\n\t\t$Fnumber = \"f/$Fnumber\";\n\t}\n\t$exif_data['Aperture'] = $Fnumber;\n\n\t$iso = $exif['ISOSpeedRatings'];\n\tif (!$iso) {\n\t\t$iso = \"N/A\";\n\t}\n\t$exif_data['ISO Speed'] = $iso;\n\n\t$Focal = explode(\"/\", $exif['FocalLength']);\n\tif ($Focal[1] != 0) {\n\t\t$Focal = $Focal[0] / $Focal[1];\n\t} else {\n\t\t$Focal = 0;\n\t}\n\tif (!$Focal || round($Focal) == \"0\") {\n\t\t$Focal = 0;\n\t}\n\tif (round($Focal) == 0) {\n\t\t$Focal = \"N/A\";\n\t} else {\n\t\t$Focal = round($Focal) . \"mm\";\n\t}\n\t$exif_data['Focal Length'] = $Focal;\n\n\t$captured = $exif['DateTime'];\n\tif (!$captured) {\n\t\t$captured = \"N/A\";\n\t}\n\t$exif_data['Captured'] = $captured;\n\n\treturn $exif_data;\n}", "public function getReadApiUsage() {\n return @$this->attributes['read_api_usage'];\n }", "function getSensorMetadata($from){\n\n $jsonResponse = array(\n 'method' => 'getSensorMetadata',\n 'sensors' => array(\n array(\n 'sensor_id' => 'geiger_counter_sensor',\n 'fullName' => ' Geiger–Mueller counter_sensor',\n 'description' => 'It detects radiation such as alpha particles, beta particles and gamma rays using the ionization produced in a Geiger–Mueller tube',\n 'webSocketType' => \"text\",\n 'produces' => 'application/json',\n 'values' => array(\n array(\n 'name' => 'experiment_status',\n 'unit' => '',\n 'lastMeasured' => '2014-06-23T18:25:43.511Z', //not static, get this information from latest batch\n 'rangeMinimum' => '0',\n 'rangeMaximum' => '10000',\n 'rangeStep' => '1',\n 'updateFrequency' => 'batched'), //check this RemainingRuntime\n array(\n 'name' => 'QueueLength',\n 'unit' => '',\n 'lastMeasured' => '2014-06-23T18:25:43.511Z', //not static, get this information from latest batch\n 'rangeMinimum' => '0',\n 'rangeMaximum' => '10000',\n 'rangeStep' => '1',\n 'updateFrequency' => 'batched'), //check this\n array(\n 'name' => 'RemainingRuntime',\n 'unit' => 's',\n 'lastMeasured' => '2014-06-23T18:25:43.511Z', //not static, get this information from latest batch\n 'rangeMinimum' => '0',\n 'rangeMaximum' => '10000',\n 'rangeStep' => '1',\n 'updateFrequency' => 'batched'), //check this\n array(\n 'name' => 'experiment_id',\n 'unit' => '',\n 'lastMeasured' => '2014-06-23T18:25:43.511Z', //not static, get this information from latest batch\n 'rangeMinimum' => '0',\n 'rangeMaximum' => '10000',\n 'rangeStep' => '1',\n 'updateFrequency' => 'batched'), //check this\n array(\n 'name' => 'setupName',\n 'unit' => '', //ex. \"RadioactivityVsDistance\"\n 'lastMeasured' => '2014-06-23T18:25:43.511Z', //not static, get this information from latest batch\n 'rangeMinimum' => '',\n 'rangeMaximum' => '',\n 'rangeStep' => '',\n 'updateFrequency' => 'batched'), //check this\n array(\n 'name' => 'setupId', //setupName\n 'unit' => '', //ex. \"RadioactivityVsDistance\"\n 'lastMeasured' => '2014-06-23T18:25:43.511Z', //not static, get this information from latest batch\n 'rangeMinimum' => '',\n 'rangeMaximum' => '',\n 'rangeStep' => '',\n 'updateFrequency' => 'batched'), //check this\n array(\n 'name' => 'sourceName',\n 'unit' => '', //ex. Strontium-90\n 'lastMeasured' => '2014-06-23T18:25:43.511Z', //not static, get this information from latest batch\n 'rangeMinimum' => '',\n 'rangeMaximum' => '',\n 'rangeStep' => '',\n 'updateFrequency' => 'batched'), //check this\n array(\n 'name' => 'repeat',\n 'unit' => '', //number of trials\n 'lastMeasured' => '2014-06-23T18:25:43.511Z', //not static, get this information from latest batch\n 'rangeMinimum' => '',\n 'rangeMaximum' => '',\n 'rangeStep' => '',\n 'updateFrequency' => 'batched'), //check this\n array(\n 'name' => 'duration',\n 'unit' => '', //ex. \"RadioactivityVsDistance\"\n 'lastMeasured' => '2014-06-23T18:25:43.511Z', //not static, get this information from latest batch\n 'rangeMinimum' => '',\n 'rangeMaximum' => '',\n 'rangeStep' => '',\n 'updateFrequency' => 'batched'), //check this\n array(\n 'name' => 'radiation_array',\n 'unit' => 'counts',\n 'lastMeasured' => '2014-06-23T18:25:43.511Z', //not static, get this information from latest batch\n 'rangeMinimum' => '0',\n 'rangeMaximum' => '10000', //depends on exposure time\n 'rangeStep' => '1',\n 'updateFrequency' => 'batched'), //check this\n array(\n 'name' => 'distance',\n 'unit' => 'mm',\n 'lastMeasured' => '2014-06-23T18:25:43.511Z', //not static, get this information from latest batch\n 'rangeMinimum' => '15',\n 'rangeMaximum' => '95', //depends on exposure time\n 'rangeStep' => '5',\n 'updateFrequency' => 'batched'),\n array(\n 'name' => 'absorberName',\n 'unit' => 'absorber',\n 'lastMeasured' => '2014-06-23T18:25:43.511Z', //not static, get this information from latest batch\n 'rangeMinimum' => '15',\n 'rangeMaximum' => '95', //depends on exposure time\n 'rangeStep' => '5',\n 'updateFrequency' => 'batched')\n ),\n 'configuration' => array(\n 'parameter' => \"experiment_id\",\n 'description' => 'If provided will return the results of a specific experiment, if not provided returns the last experiment results'\n )\n ),\n array(\n 'sensor_id' => 'status',\n 'fullName' => 'Experiment execution status',\n 'description' => 'returns the status of an experiment',\n 'webSocketType' => \"text\",\n 'produces' => 'application/json',\n 'values' => array(\n array(\n 'name' => 'experiment_id',\n 'unit' => '',\n 'lastMeasured' => '2014-06-23T18:25:43.511Z', //not static, get this information from latest batch\n 'rangeMinimum' => '0',\n 'rangeMaximum' => '10000',\n 'rangeStep' => '1',\n 'updateFrequency' => 1) //check this\n )\n ),\n array(\n 'sensor_id' => 'camera',\n 'fullName' => 'Webcam_1',\n 'description' => 'Webcam that shows the Geiger-Mueller counter',\n 'webSocketType' => \"binary\",\n 'produces' => 'jpg',)\n\n )\n\n );\n\n $response = json_encode($jsonResponse);\n $from->send($response);\n}", "function getValue($device = null)\n {\n $dev = $this->getDevice($device);\n\n return $dev['usePct'];\n }", "function test_exif_d70_mf() {\n\t\t$out = wp_read_image_metadata( DIR_TESTDATA . '/images/2007-06-17DSC_4173.JPG' );\n\n\t\t$this->assertSame( '0', $out['aperture'], 'Aperture value not the same' );\n\t\t$this->assertSame( '', $out['credit'], 'Credit value not the same' );\n\t\t$this->assertSame( 'NIKON D70', $out['camera'], 'Camera value not the same' );\n\t\t$this->assertSame( '', $out['caption'], 'Caption value not the same' );\n\t\t$this->assertEquals( strtotime( '2007-06-17 21:18:00' ), $out['created_timestamp'], 'Timestamp value not equivalent' );\n\t\t$this->assertSame( '', $out['copyright'], 'Copyright value not the same' );\n\t\t$this->assertEquals( 0, $out['focal_length'], 'Focal length value not equivalent' );\n\t\t$this->assertEquals( 0, $out['iso'], 'Iso value not equivalent' ); // Interesting - a Nikon bug?\n\t\t$this->assertEquals( 1 / 500, $out['shutter_speed'], 'Shutter speed value not equivalent' );\n\t\t$this->assertSame( '', $out['title'], 'Title value not the same' );\n\t\t// $this->assertSame( array( 'Flowers' ), $out['keywords'] );\n\t}", "public function getAverage()\r\n {\r\n $fSum = 0.0;\r\n foreach ($this->aNotes as $fNote) {\r\n $fSum += $fNote;\r\n }\r\n $fAverage = $fSum / count($this->aNotes);\r\n // get only 2 digits after comma\r\n $fAverage = floatval(number_format($fAverage, 2));\r\n return $fAverage;\r\n }", "public function getAvgHeartRate(){\n return $this->avgHeartRate;\n }", "private function calcTemp()\n\t{\n#\t\t#define CCS811_R_NTC 10000 // resistance of NTC at a reference temperature\n#\t\t#define CCS811_R_NTC_TEMP 25 // reference temperature for NTC\n#\t\t#define CCS811_BCONSTANT 3380 // B constant\n#\n#\t\t// get NTC resistance\n#\t\tuint32_t r_ntc = ccs811_get_ntc_resistance (sensor, CCS811_R_REF);\n#\n#\t\t// calculation of temperature from application note ams AN000372\n#\t\tdouble ntc_temp;\n#\t\tntc_temp = log((double)r_ntc / self::R_NTC); // 1\n#\t\tntc_temp /= self::B; // 2\n#\t\tntc_temp += 1.0 / (self::R_NTC_TEMP + 273.15); // 3\n#\t\tntc_temp = 1.0 / ntc_temp; // 4\n#\t\tntc_temp -= 273.15; // 5\n\t}", "public function getOnlinePredictionLogging()\n {\n return $this->online_prediction_logging;\n }", "public function getTemperatureCallbackThreshold()\n {\n $result = array();\n\n $payload = '';\n\n $data = $this->sendRequest(self::FUNCTION_GET_TEMPERATURE_CALLBACK_THRESHOLD, $payload);\n\n $payload = unpack('c1option/v1min/v1max', $data);\n\n $result['option'] = chr($payload['option']);\n $result['min'] = IPConnection::fixUnpackedInt16($payload['min']);\n $result['max'] = IPConnection::fixUnpackedInt16($payload['max']);\n\n return $result;\n }", "abstract public function getRawNumberOfMaterialByUnit(): ?float;", "public function retrieveReactorMetrics()\n {\n return $this->start()->uri(\"/api/reactor/metrics\")\n ->get()\n ->go();\n }", "public function getTemperature()\n {\n //no-op\n }", "public function shouldGetTemperature(): void\n {\n $this->assertPollutantLevel('getTemperature', $this->faker->randomFloat(2, -100, 100));\n }", "function getAllSensors() {\n $sens = shell_exec(\"tdtool --list-sensors\");\n\n //turn raw result into array\n $sensorlist = array();\n preg_match_all('/type=(?<type>\\w+)\\tprotocol=(?<protocol>\\w+)\\tmodel=(?<model>\\w+)\\tid=(?<id>\\d+)\\ttemperature=(?<temperature>[\\d\\.]+)(|\\thumidity=(?<humidity>[\\d\\.]+))\\ttime=(?<time>[\\d-\\s:]+)\\tage=(?<age>\\d+)/', $sens, $matches);\n for ($x = 0; $x < count($matches[0]); $x++) {\n $sensorlist[] = array(\"type\" => $matches[\"type\"][$x], \"protocol\" => $matches[\"protocol\"][$x], \"id\" => $matches[\"id\"][$x], \"temperature\" => $matches[\"temperature\"][$x], \"humidity\" => $matches[\"humidity\"][$x], \"time\" => $matches[\"time\"][$x], \"age\" => $matches[\"age\"][$x]);\n }\n return $sensorlist;\n}", "public function getMetric()\n {\n return $this->metric;\n }", "public function getMetric()\n {\n return $this->metric;\n }", "public function getAvancement()\n {\n\n $usecases = $this->getUseCases();\n $diviseur = 0;\n $val = 0;\n foreach ($usecases as $usecase) {\n $diviseur = $diviseur + $usecase->poids;\n $val = $val + ($usecase->poids * $usecase->avancement);\n }\n $resultat = $val / $diviseur;\n\n return $resultat;\n }", "function trader_ht_trendmode($real)\n{\n}", "public function evaluateWealth() : float;", "public function getFullKilometerData($result);", "public function getMetrics()\n\t{\n\t\treturn $this->metrics;\n\t}", "public function averageRating() : float\n {\n return $this->ratings()->exists() ? $this->ratings()->avg('rating') : 0;\n }", "private function _metrics()\n\t{\n\t\t$this->metrics['favoriteWeapon'] = $this->bg->queryFontMetrics($this->bigText, $this->favoriteWeapon);\n\t\t$this->metrics['spartan'] = $this->bg->queryFontMetrics($this->bigText, rawurldecode($this->spartan));\n\t\t$this->metrics['weaponChoice'] = $this->bg->queryFontMetrics($this->text, 'WEAPON OF CHOICE');\n\t}", "function test_exif_d70() {\n\t\t$out = wp_read_image_metadata( DIR_TESTDATA . '/images/2004-07-22-DSC_0008.jpg' );\n\n\t\t$this->assertEquals( 6.3, $out['aperture'] );\n\t\t$this->assertSame( '', $out['credit'] );\n\t\t$this->assertSame( 'NIKON D70', $out['camera'] );\n\t\t$this->assertSame( '', $out['caption'] );\n\t\t$this->assertEquals( strtotime( '2004-07-22 17:14:59' ), $out['created_timestamp'] );\n\t\t$this->assertSame( '', $out['copyright'] );\n\t\t$this->assertEquals( 27, $out['focal_length'] );\n\t\t$this->assertEquals( 400, $out['iso'] );\n\t\t$this->assertEquals( 1 / 40, $out['shutter_speed'] );\n\t\t$this->assertSame( '', $out['title'] );\n\t}", "public function getHigh(): float\n {\n return $this->high;\n }", "private function getRadianValue(Measurement $angle): float\n {\n return $angle->convertTo(UnitAngle::radians())->value();\n }", "public function testTemperatureSummary()\n {\n }", "public function getQuality()\n {\n $value = $this->get(self::quality);\n return $value === null ? (double)$value : $value;\n }", "function get_sensor_info($id){\r\n $sensor_json_url = 'https://data.melbourne.vic.gov.au/resource/h57g-5234.json';\r\n\r\n $ch = curl_init();\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\r\n curl_setopt($ch, CURLOPT_URL,$sensor_json_url . '?sensor_id=' . $id);\r\n $result=curl_exec($ch);\r\n curl_close($ch);\r\n if(isset(json_decode($result)[0]))\r\n return json_decode($result)[0];\r\n else return NULL;\r\n}", "public function getWifiAvg() {\n return $this->wifiAvg;\n }", "public function get_quality()\n {\n }", "public function countFinalValue(): float\n\t{\n\t\treturn $this->getUnits() * $this->countTaxedUnitValue();\n\t}", "public function accuracy($features, $target) {\n\n if (!$this->is_trained()) return;\n\n $prediction = $this->predict($features);\n\n return array_sum(array_map(\n function($p, $t) {\n return $p == $t ? 1 : 0;\n },\n $prediction,\n $target\n )) / count($target);\n }", "public function getResult(): float\n {\n return $this->result;\n }", "public static function get_ar_quality() {\t\t\t\n\t\treturn unserialize(DEDALO_PDF_AR_QUALITY);\t\t\n\t}", "public function getConfidence()\n {\n if (is_null($this->confidence)) {\n /** @psalm-var ?float $data */\n $data = $this->raw(self::FIELD_CONFIDENCE);\n if (is_null($data)) {\n return null;\n }\n $this->confidence = (float) $data;\n }\n\n return $this->confidence;\n }" ]
[ "0.7002905", "0.65120107", "0.64767563", "0.6304602", "0.5844184", "0.57409304", "0.5553478", "0.54137075", "0.533179", "0.5308558", "0.5297129", "0.5261486", "0.5223062", "0.51994294", "0.5197761", "0.5148407", "0.5126221", "0.51244515", "0.511475", "0.50436354", "0.50389814", "0.5038586", "0.4951787", "0.49267948", "0.4916985", "0.49067682", "0.49039173", "0.4880549", "0.48668537", "0.48656794", "0.4848854", "0.48465094", "0.48361158", "0.48333848", "0.4822016", "0.4810047", "0.4793939", "0.47814915", "0.47651246", "0.4762235", "0.4747986", "0.4747986", "0.47304565", "0.47303203", "0.46947622", "0.4687777", "0.46868187", "0.46827933", "0.46705183", "0.4664174", "0.4651204", "0.4639305", "0.46263143", "0.46214566", "0.4616827", "0.4611901", "0.46055406", "0.4598504", "0.4598504", "0.4598504", "0.4598504", "0.45870423", "0.45791432", "0.45731816", "0.45699975", "0.45611393", "0.45573622", "0.45563662", "0.45467004", "0.4534209", "0.45336023", "0.45317104", "0.45308498", "0.45276552", "0.4525303", "0.45041686", "0.4503762", "0.44980815", "0.4489359", "0.4489359", "0.44880497", "0.44798413", "0.44772846", "0.44753945", "0.44728383", "0.44727522", "0.44714734", "0.44690835", "0.4468085", "0.44642857", "0.44639432", "0.44604984", "0.4459427", "0.44546345", "0.4449373", "0.44465572", "0.4445564", "0.4445347", "0.44442573", "0.4442202" ]
0.65084124
2
// MySQLFunction() Constructor // MySQLFunction() Constructor for MySQLFunction object Constructor for MySQLFunction object
function __construct ($strFunction, $arrParams=null) { $this->_strFunction = $strFunction; $this->_arrParams = $arrParams; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function MySQL() {\n \n }", "function __construct()\n {\n parent::__construct();\n $this->tableName = 'functioncode';\n }", "function testCreatSqlFunction()\r\n {\r\n global $webUrl;\r\n global $lang, $DATABASE, $SERVER;\r\n\r\n // Turn to the \"Create SQL/PL function\" page.\r\n\t\t$this->assertTrue($this->get(\"$webUrl/functions.php\", array(\r\n\t\t\t 'server' => $SERVER,\r\n\t\t\t\t\t\t'action' => 'create',\r\n\t\t\t\t\t\t'database' => $DATABASE,\r\n\t\t\t\t\t\t'schema' => 'public'))\r\n\t\t\t\t\t);\r\n \r\n // Enter the detail information of a SQL/PL function.\r\n $this->assertTrue($this->setField('formFunction', 'sqlplfunction')); \r\n $this->assertTrue($this->setField('formArguments', 'double precision[], double precision'));\r\n $this->assertTrue($this->setField('formSetOf', 'SETOF'));\r\n $this->assertTrue($this->setField('formReturns', 'double precision'));\r\n $this->assertTrue($this->setField('formArray', '[ ]'));\r\n $this->assertTrue($this->setField('formLanguage', 'sql'));\r\n $this->assertTrue($this->setField('formDefinition', 'select $1'));\r\n $this->assertTrue($this->setField('formProperties[0]', 'VOLATILE'));\r\n $this->assertTrue($this->setField('formProperties[1]', 'RETURNS NULL ON NULL INPUT'));\r\n $this->assertTrue($this->setField('formProperties[2]', 'SECURITY INVOKER')); \r\n \r\n // Click the \"Create\" button to create a function. \r\n $this->assertTrue($this->clickSubmit($lang['strcreate']));\r\n \r\n // Verify whether the function is created successfully.\r\n $this->assertTrue($this->assertWantedText($lang['strfunctioncreated'])); \r\n \r\n return TRUE; \r\n }", "function createTable($name, $query)\n {\n echo \"Creating table '$name' ... \";\n //a fuction included in functions.php\n queryMysql(\"CREATE TABLE IF NOT EXISTS $name($query)\");\n echo \"OK <br>\";\n }", "function sqlite_create_function($function_name, $callback, $num_args = -1)\n{\n}", "public function testFunctionWithDatabaseQuery(): void\n {\n $query = ConnectionManager::get('test')\n ->selectQuery(['column']);\n\n $binder = new ValueBinder();\n $function = new $this->expressionClass('MyFunction', [$query]);\n $this->assertSame(\n 'MyFunction((SELECT column))',\n preg_replace('/[`\"\\[\\]]/', '', $function->sql($binder))\n );\n }", "function __construct($dbms, $fn, $errno, $errmsg, $p1, $p2, $thisConnection){\n\t\t/*\n\t\tswitch($fn) {\n\t\tcase 'EXECUTE':\n\t\t\t$this->sql = $p1;\n\t\t\t$this->params = $p2;\n\t\t\t$s = \"$dbms error: [$errno: $errmsg] in $fn(\\\"$p1\\\")\\n\";\n\t\t\tbreak;\n\t\n\t\tcase 'PCONNECT':\n\t\tcase 'CONNECT':\n\t\t\t$user = $thisConnection->user;\n\t\t\t$s = \"$dbms error: [$errno: $errmsg] in $fn($p1, '$user', '****', $p2)\\n\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$s = \"$dbms error: [$errno: $errmsg] in $fn($p1, $p2)\\n\";\n\t\t\tbreak;\n\t\t}\n\t\n\t\t$this->dbms = $dbms;\n\t\tif ($thisConnection) {\n\t\t\t$this->host = $thisConnection->host;\n\t\t\t$this->database = $thisConnection->database;\n\t\t}\n\t\t$this->fn = $fn;\n\t\t$this->msg = $errmsg;\n\t\t*/\t\t\n\t\tif (!is_numeric($errno)) $errno = -1;\n\t\tparent::__construct($s,$errno);\n\t}", "function queryDatabase($query = '') {\n $result = mysql_query($query)\n or die('MYSQL Error: ' . $query . ' ' . mysql_error());\n \n return $result;\n}", "function mysql() {\n return call_user_func_array('mysql_db_query', func_get_args());\n}", "public function create_function($name, $callback, $arguments = -1)\n\t{\n\t\t$this->_connection or $this->connect();\n\n\t\treturn $this->_connection->sqliteCreateFunction(\n\t\t\t$name, $callback, $arguments\n\t\t);\n\t}", "function logUseInDB($function, $objDB)\n{\n $objDB->query(\"INSERT INTO `editor_statistics` (`function`) VALUES ('$function');\");\n}", "public function __construct() {\n\t\t// Constructor\n\t\t$this->mysql = new Mysql();\n\t}", "function sqlite_create_function($dbhandle, $function_name, $callback, $num_args = -1)\n{\n}", "function MySQLDB ()\r\n {\r\n /* Make connection to database */\r\n $this->connection = mysql_connect(DB_SERVER, DB_USER, DB_PASS) or die(mysql_error());\r\n mysql_select_db(DB_NAME, $this->connection) or die(mysql_error());\r\n //For unicode support\r\n mysql_query('SET CHARACTER SET utf8');\r\n mysql_query('SET SESSION collation_connection =\"utf8_general_ci\"');\r\n }", "public function __construct($functionType, $arguments = null)\n\t {\n\t parent::__construct(SqlEntityType::FunctionCall);\n\t \t\n\t $this->functionType = $functionType;\n\t if(isset($arguments))\n\t {\n \t if(is_array($arguments))\n \t {\n \t foreach ($arguments as $argument)\n \t {\n \t $this->arguments = $this->CheckIsLiteral($argument);\n \t }\n \t }\n \t else \n \t {\n \t $this->arguments[] = $this->CheckIsLiteral($arguments);;\n \t }\n\t }\n\t }", "public function CBfunctions() {}", "function mysql () {\n\t/* public: connection parameters */\n\t\t$this->connect();\n\t}", "function createTable($name, $query)\n{\nqueryMysql(\"CREATE TABLE IF NOT EXISTS $name($query)\");\necho \"Table '$name' created or already exists.<br>\";\n}", "public function __construct(MysqliDb $database, $table = null, $primary_key = null) {\n $this->db = $database;\n $this->primary_key = $primary_key;\n $instance = $this;\n \n /**\n * Defines an init script to inject functions\n */\n $this->init = function($table = null, $primary_key) use (&$instance) {\n \n if(!isset($table)){\n $table = strtolower(get_called_class());\n }\n \n $instance -> table = $table;\n \n if(!isset($primary_key)){\n $primary_key = strtolower(get_called_class() . '_id');\n }\n $instance -> primary_key = $primary_key;\n \n \n /**\n * Find rows by criteria\n */\n $instance->find_where = function (array $where_filter = null) use (&$instance) {\n\n //dont know why I have to do this next line...\n $where_filter = $where_filter[0];\n foreach ($where_filter as $key => $value){\n $instance->db->where($key,$value);\n }\n \n $instance->rows = $instance->db->get($instance->table);\n $instance -> row = $instance->rows[0];\n return $instance -> rows;\n };\n \n \n \n //get the list of columns for this table.\n $sql = \"SHOW COLUMNS FROM \" . $table;\n $cols = $this->db->rawQuery($sql);\n \n \n foreach ($cols as $col) {\n \n /**\n * Function name is dynamicly generated, but corresponds to \n * the columns.\n * \n * Sets a column field for the current row.\n */\n $instance->{$col['Field']} = function ($x) use (&$instance, $col){\n if(isset($this->row)){\n if(is_array($x)){\n $x = $x[0];\n }\n $instance->row[$col['Field']] = $x;\n }else{\n throw new Exception(\"No row has been loaded yet!\");\n }\n };\n \n /**\n * Saves the object\n */\n $instance -> save = function () use(&$instance) {\n $result = false;\n if(isset($instance->row[$instance->primary_key])){\n //record exists in database.\n $instance->db\n ->where($instance->primary_key, $instance->row[$instance->primary_key])\n ->update($instance->table, $instance->row);\n $result = true;\n }else{\n $instance->db->insert($instance->table, $instance->row);\n $result = true;\n }\n return $result;\n };\n \n /**\n * Creates and saves the object\n */\n $instance -> create = function ($array) use(&$instance){\n $instance -> row = $array;\n $instance -> db -> save();\n };\n /**\n * Creates and saves, then clears the object\n */\n $instance -> create_and_reset = function ($array) use(&$instance){\n $instance -> row = $array;\n $instance -> db -> save();\n $instance -> reset();\n };\n /**\n * Reset's class properties\n */\n $instance -> reset = function() use(&$instance){\n $instance->row = null;\n $instance->rows = null;\n };\n /**\n * Delete the current row\n */\n $instance -> delete = function() use(&$instance){\n $instance -> db -> where (\n $instance -> primary_key, $instance -> row[$instance -> primary_key]\n ) -> delete($instance->table);\n return true;\n };\n }\n };\n }", "function getDBFunction()\n {\n if($this->precision == 0 and $this->scale == 0)\n return parent::getDBFunction();\n\n return \"$this->functionName('\".$this->attrName.\"', $this->precision, $this->scale)\";\n }", "function msql_error()\n{\n}", "public function __construct() {\n $this->mysql = new Mysql();\n }", "function newMySQLDatabase($server, $user, $passwd, $dbname, $port = null) {\n //I really feel like default arguments shouldn't work this way, but StackOverflow says it's fine.\n if($port === null) { //If no port was specified: \n //Set up the connection without the port.\n $dbConnection = new mysqli($server, $user, $passwd);\n }\n else { //If a port was specified \n //Then use it.\n $dbConnection = new mysqli($server, $user, $passwd, \"\", $port);\n }\n //Test the connection\n if($dbConnection->connect_error) { //If the connection fails: \n //Print the error and the rest of the function is not run.\n echo \"Connection failed: \" . $dbConnection->connect_error;\n }\n else { //If the connection goes smoothly:\n //Create the database\n if ($dbConnection->query(\"CREATE DATABASE \" . $dbname) === TRUE) {\n echo \"Database created successfully.\";\n } \n else { //Otherwise, print the error.\n //TODO: Log the error instead!\n echo \"Database could not be created: \" . $dbConnection->error;\n }\n //Close the connection.\n $dbConnection->close();\n }\n }", "public function __construct($function, $incorrect)\n {\n $this->function = $function;\n $this->incorrect = $incorrect;\n\n parent::__construct();\n }", "public function __construct($fun=null) {\n $this->f = $fun;\n }", "function mysql02($campos,$tabla,$columna1,$queBuscar1){\n\t$query1=\"SELECT $campos FROM $tabla WHERE $columna1='$queBuscar1'\";\n\t$query2=mysql_query($query1);\n\t$resultado=mysql_fetch_row($query2);\n\treturn $resultado[0];\n/*\n$campos = '';\n$tabla = '';\n$columna1 = '';\n$queBuscar1 = '';\nresultado = mysql02($campos,$tabla,$columna1,$queBuscar1);\n*/\n}", "public function __construct($fun) {\n $this->f = $fun;\n }", "public function setFunction($function)\n {\n $this->function = (string)$function;\n return $this;\n }", "function mysql_db_name($result, $row, $field = NULL)\n{\n}", "public function __construct($table_name = '') {\n $this->table = $table_name;\n $this->connection = new MySQLI(self::DOMAIN, self::USER,\n self::PASSWORD, self::DATABASE);\n }", "function mysqldate($timestamp) {\n return \"'\" . date('Y-m-d H:i:s', $timestamp) . \"'\";\n}", "function setFunction(string $function)\n {\n $this->function = $function;\n return $this;\n }", "function get_mysql(){\n\t\t$mysql = new MySQLi(\"\", \"\", \"\", \"\"); // login details removed\n\t\t\n\t\tif($mysql->connect_error){\n\t\t\tdie($mysql->connect_error);\n\t\t}\n\t\treturn $mysql;\n\t}", "function mysql_timestamp(): string {\n\treturn date('Y-m-d H:i:s');\n}", "function add_table_function($label, $closure) {\n\t\t$key = 'table-function-'.md5($label);\n\t\t$this->tb_functions[$key] = ['label' => $label, 'key' => $key];\n\t\t\n\t\tif(isset($_GET[$key])) {\n\t\t\t$closure($this, $this->get_full_resultset());\n\t\t}\n\t}", "public function __construct()\r\n {\r\n if (! extension_loaded('SQLite'))\r\n {\r\n throw new Exception(\"could not find SQLite extension\");\r\n }\r\n\r\n $this->_conn = new SQLiteDatabase(\":memory:\");\r\n\r\n $this->_conn->queryExec('PRAGMA short_column_names = ON');\r\n $this->_conn->createFunction('lpad', array($this, 'lpad'), 3);\r\n $this->_conn->createFunction('now', array($this, 'now'));\r\n $this->_conn->createFunction('field', array($this, 'field'));\r\n }", "public function column(string $column, string $columnAlias, string $function): self\n {\n $this->validateColumnData($column, $columnAlias, $function);\n\n $this->fetchData[self::COLUMNS][$columnAlias] = [\n self::COLUMN_NAME => $column,\n self::FUNCTION_NAME => $function,\n self::COLUMN_ALIAS => $columnAlias,\n ];\n\n return $this;\n }", "function createQuery() ;", "function basicQuery($query) {\n$con = mysqli_connect('localhost', 'user', 'pass', 'db');\nif (!$con) {\n die('Could not connect: ' . mysql_error());\n}\n$result = mysqli_query($con,$query);\nmysqli_close($con);\nreturn $result;\n}", "function mysql00($servidor,$usuario,$clave,$db){\n\tif ( empty($servidor) AND empty($usuario) AND empty($clave) AND empty($db) ){\n\t\t$servidor=\"SERVER\";\n\t\t$usuario=\"USUARIO\";\n\t\t$clave=\"CLAVE\";\n\t\t$db=\"DB\";\n\t}\n\n\t$enlace=mysql_connect($servidor,$usuario,$clave);\n\tif (!$enlace) {\n\t\tmysql_close($enlace);\n\t\t$a1=\"Error de Conexi&oacute;n\";\n\t} else {\n\t\t$a1=\"Conectado Correctamente\";\n\t}\n\t$db=mysql_select_db($db,$enlace);\n\treturn $a1;\n}", "public function setFunction(string $function)\n {\n $function = 'pub\\\\Classes\\\\' . $function;\n return $this->probFunction = new $function($this->inputs);\n }", "public function setFunction($function)\n {\n $this->function = $function;\n\n return $this;\n }", "public static function database_query_parameters() {\n return new external_function_parameters(\n array('params' => new external_multiple_structure(\n new external_single_structure(\n array(\n 'function' => new external_value(PARAM_ALPHANUMEXT, 'Main Function name', VALUE_REQUIRED),\n 'timestart' => new external_value(PARAM_INT, 'Time start param', VALUE_OPTIONAL, 0),\n 'timefinish' => new external_value(PARAM_INT, 'Time finish param', VALUE_OPTIONAL, 0),\n 'start' => new external_value(PARAM_INT, 'Pagination start', VALUE_OPTIONAL, 0),\n 'length' => new external_value(PARAM_INT, 'Pagination length', VALUE_OPTIONAL, 0),\n 'columns' => new external_value(PARAM_RAW, 'Profile columns', VALUE_OPTIONAL, 0),\n 'completion' => new external_value(PARAM_SEQUENCE, 'Completion status param', VALUE_OPTIONAL, 0),\n 'extra_columns' => new external_value(PARAM_SEQUENCE, 'Extra Columns', VALUE_OPTIONAL, 0),\n 'extra_columns_filter' => new external_value(PARAM_SEQUENCE, 'Extra Columns Filter', VALUE_OPTIONAL, 0),\n 'ccf_columns' => new external_value(PARAM_SEQUENCE, 'Course custom fields', VALUE_OPTIONAL, 0),\n 'ccf_columns_filter' => new external_value(PARAM_SEQUENCE, 'Course custom fields Filter', VALUE_OPTIONAL, 0),\n 'filter_columns' => new external_value(PARAM_SEQUENCE, 'Filter columns param', VALUE_OPTIONAL, 0),\n 'filter_profile' => new external_value(PARAM_INT, 'Filter profile column param', VALUE_OPTIONAL, 0),\n 'order_column' => new external_value(PARAM_INT, 'Order column param', VALUE_OPTIONAL, 0),\n 'order_dir' => new external_value(PARAM_ALPHA, 'Order direction param', VALUE_OPTIONAL, ''),\n 'filter' => new external_value(PARAM_RAW, 'Filter var', VALUE_OPTIONAL, ''),\n 'custom' => new external_value(PARAM_RAW, 'Custom var', VALUE_OPTIONAL, ''),\n 'custom2' => new external_value(PARAM_RAW, 'Custom2 var', VALUE_OPTIONAL, ''),\n 'custom3' => new external_value(PARAM_RAW, 'Custom3 var', VALUE_OPTIONAL, ''),\n 'custom4' => new external_value(PARAM_RAW, 'Completion state flag', VALUE_OPTIONAL, ''),\n 'custom5' => new external_value(PARAM_RAW, 'Custom5 var', VALUE_OPTIONAL, ''),\n 'teacher_roles' => new external_value(PARAM_SEQUENCE, 'Teacher roles', VALUE_OPTIONAL, 0),\n 'learner_roles' => new external_value(PARAM_SEQUENCE, 'Learner roles', VALUE_OPTIONAL, 0),\n 'users' => new external_value(PARAM_SEQUENCE, 'Users SEQUENCE', VALUE_OPTIONAL, 0),\n 'userid' => new external_value(PARAM_INT, 'Instuctor ID', VALUE_OPTIONAL, 0),\n 'vendor_user_id' => new external_value(PARAM_INT, 'Vendor User ID', VALUE_OPTIONAL, 0),\n 'externalid' => new external_value(PARAM_INT, 'External user ID', VALUE_OPTIONAL, 0),\n 'sizemode' => new external_value(PARAM_INT, 'Size mode', VALUE_OPTIONAL, 0),\n 'debug' => new external_value(PARAM_INT, 'Debug mode', VALUE_OPTIONAL, 0),\n 'request' => new external_value(PARAM_INT, 'Request mode', VALUE_OPTIONAL, 0),\n 'userfilter' => new external_value(PARAM_INT, 'User Filter mode', VALUE_OPTIONAL, 0),\n 'courseid' => new external_value(PARAM_SEQUENCE, 'Course IDs SEQUENCE', VALUE_OPTIONAL, 0),\n 'cohortid' => new external_value(PARAM_SEQUENCE, 'Cohort IDs SEQUENCE', VALUE_OPTIONAL, 0),\n 'filter_user_deleted' => new external_value(PARAM_INT, 'filter_user_deleted', VALUE_OPTIONAL, 0),\n 'filter_user_not_current' => new external_value(PARAM_INT, 'filter_user_not_current', VALUE_OPTIONAL, 0),\n 'filter_user_suspended' => new external_value(PARAM_INT, 'filter_user_suspended', VALUE_OPTIONAL, 0),\n 'filter_user_guest' => new external_value(PARAM_INT, 'filter_user_guest', VALUE_OPTIONAL, 0),\n 'filter_user_active' => new external_value(PARAM_INT, 'filter_user_active', VALUE_OPTIONAL, 0),\n 'filter_user_active_time' => new external_value(PARAM_INT, 'filter_user_active_time', VALUE_OPTIONAL, 0),\n 'filter_user_active_starttime' => new external_value(PARAM_INT, 'filter_user_active_starttime', VALUE_OPTIONAL, 0),\n 'filter_course_visible' => new external_value(PARAM_INT, 'filter_course_visible', VALUE_OPTIONAL, 0),\n 'filter_enrolmethod_status' => new external_value(PARAM_INT, 'filter_enrolmethod_status', VALUE_OPTIONAL, 0),\n 'filter_enrol_status' => new external_value(PARAM_INT, 'filter_enrol_status', VALUE_OPTIONAL, 0),\n 'filter_enrolled_users' => new external_value(PARAM_INT, 'filter_enrolled_users', VALUE_OPTIONAL, 0),\n 'filter_module_visible' => new external_value(PARAM_INT, 'filter_module_visible', VALUE_OPTIONAL, 0),\n 'scales' => new external_value(PARAM_INT, 'custom scales', VALUE_OPTIONAL, 0),\n 'scale_raw' => new external_value(PARAM_INT, 'custom scale_raw', VALUE_OPTIONAL, 0),\n 'scale_real' => new external_value(PARAM_INT, 'custom scale_real', VALUE_OPTIONAL, 0),\n 'scale_total' => new external_value(PARAM_FLOAT, 'custom scale_total', VALUE_OPTIONAL, 0),\n 'scale_value' => new external_value(PARAM_FLOAT, 'custom scale_value', VALUE_OPTIONAL, 0),\n 'scale_percentage' => new external_value(PARAM_INT, 'custom scale_percentage', VALUE_OPTIONAL, 0),\n 'count_report_rows' => new external_value(PARAM_INT, 'custom scale_percentage', VALUE_OPTIONAL, 0),\n 'cupf_filter' => new external_value(PARAM_TEXT, 'CUPF filter', VALUE_OPTIONAL, ''),\n 'timezone' => new external_value(PARAM_INT, 'Timezone from Intelliboard User Settings', VALUE_OPTIONAL, 24),\n 'filter_hidden_cohort' => new external_value(PARAM_INT, 'filter_hidden_cohort', VALUE_OPTIONAL, 0),\n 'intellicart_vendors' => new external_value(PARAM_TEXT, 'Intellicart vendors', VALUE_OPTIONAL, ''),\n 'cupf_show_vendor_name' => new external_value(PARAM_TEXT, 'CUPF vendor name instead ID', VALUE_OPTIONAL, 0),\n 'icpcf_columns' => new external_value(PARAM_SEQUENCE, 'Intellicart Product custom fields', VALUE_OPTIONAL, 0),\n )\n )\n )\n )\n );\n }", "function mysql11($tabla,$enQueColumna,$queBuscar){\n\t$query1=\"SELECT * FROM $tabla WHERE $enQueColumna='$queBuscar';\";\n\t$query2=mysql_query($query1);\n\t$resultado=mysql_fetch_row($query2);\n\treturn $resultado;\n\n/*\nComo usar\n\n$tabla = '';\n$enQueColumna = '';\n$queBuscar = '';\n$rtdo = mysql11($tabla,$enQueColumna,$queBuscar);\n\nComo ver datos\nforeach($rtdo as $value){\n \techo $value;\n}\n*/\n}", "static function initMySQL()\n {\n require_once \"system/3d-party/DBSimple/Generic.php\" ;\n self::$sql = DbSimple_Generic::connect('mysql://'.self::$config['db']['user'].':'.self::$config['db']['password'].'@'.self::$config['db']['server'].'/'.self::$config['db']['database']);\n self::$sql->setIdentPrefix(self::$config['db']['table_prefix'].\"_\");\n self::$sql->setErrorHandler(array('Core', 'databaseErrorHandler'));\n\n mysql_set_charset(\"utf8\") or trigger_error(\"An error occurred when specifying the encoding for MySQL\", E_USER_WARNING);\n define('TABLE_PREFIX', self::$config['db']['table_prefix'].\"_\");\n }", "function __construct() // constructor, solo crea una conexion usando la clase \"Conexion\"\n {\n $this->coneccion= new ConexionMYSQL();\n }", "function CreateDB() {\n $sql = \"CREATE SCHEMA IF NOT EXISTS `mydb`\" .\n \"DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci ;\";\n performSQL($sql);\n}", "public function testDateParts($function, $sql)\n {\n\n $query = $this->em->createQuery(\n sprintf(\"SELECT %s(s0_.somedate) FROM %s as s0_\", strtoupper($function), self::FAKE_ENTITY)\n );\n\n $this->assertEquals(\n $query->getSQL(),\n sprintf(\"SELECT %ss0_.somedate) AS sclr0 FROM some_fake s0_\", strtoupper($sql))\n );\n }", "function testCreateCFunction()\r\n {\r\n global $webUrl;\r\n global $lang, $SERVER, $DATABASE;\r\n\r\n\t\t$this->assertTrue($this->get(\"$webUrl/functions.php\", array(\r\n\t\t\t 'server' => $SERVER,\r\n\t\t\t\t\t\t'database' => $DATABASE,\r\n\t\t\t\t\t\t'schema' => 'public'))\r\n\t\t\t\t\t);\r\n // Turn to the C-function create page.\r\n $this->assertTrue($this->clickLink($lang['strcreatecfunction'])); \r\n \r\n // Enter the definition of the C function.\r\n $this->assertTrue($this->setField('formFunction', 'cfunction'));\r\n $this->assertTrue($this->setField('formArguments', 'text'));\r\n $this->assertTrue($this->setField('formReturns', 'boolean'));\r\n $cFunLocation = getcwd() . '/../data/CFunction/euc_jp_and_sjis';\r\n $this->assertTrue($this->setField('formObjectFile', $cFunLocation));\r\n $this->assertTrue($this->setField('formLinkSymbol', 'mic_to_sjis'));\r\n $this->assertTrue($this->setField('formProperties[0]', 'VOLATILE'));\r\n $this->assertTrue($this->setField('formProperties[1]', 'RETURNS NULL ON NULL INPUT'));\r\n $this->assertTrue($this->setField('formProperties[2]', 'SECURITY DEFINER'));\r\n\r\n // Click the \"Create\" button to create the C function. \r\n $this->assertTrue($this->clickSubmit($lang['strcreate']));\r\n // Verify whether the function is created successfully.\r\n $this->assertTrue($this->assertWantedText($lang['strfunctioncreated']));\r\n \r\n return TRUE; \r\n }", "function sql($sql)\n\t{\n\n\t}", "function mysql03($query1){\n\t$query2=mysql_query($query1);\n\t$resultado=mysql_fetch_row($query2);\n\treturn $resultado;\n}", "public function func_query($qstring) {\n $this -> func_connect();\n mysql_query(\"SET NAMES 'utf8'\");\n $this -> result = mysql_query($qstring);\n return $this -> result;\n mysql_close($this -> lnk);\n mysql_free_result($this -> result);\n }", "function myFunction()\n {\n }", "public function Create() {\n\n\t\t\t$sql = \"\n\t\t\t\tINSERT INTO funcionarios\n\t\t\t\t\t\t (\n\t\t\t\t \t\t\tid,\n\t\t\t\t \t\t\ttipo_funcionario,\n\t\t\t\t \t\t\tnome,\n\t\t\t\t \t\t\tidade,\n\t\t\t\t \t\t\tgenero,\n\t\t\t\t \t\t\temail,\n\t\t\t\t \t\t\tcpf,\n\t\t\t\t \t\t\tcelular,\n\t\t\t\t \t\t\tsenha,\n\t\t\t\t \t\t\tcreated_at\n\t\t\t\t\t\t )\n\t\t\t\tVALUES\n\t\t\t\t\t(\n\t\t\t\t \t\t\t'$this->id',\n\t\t\t\t \t\t\t'$this->tipo_funcionario',\n\t\t\t\t \t\t\t'$this->nome',\n\t\t\t\t \t\t\t'$this->idade',\n\t\t\t\t \t\t\t'$this->genero',\n\t\t\t\t \t\t\t'$this->email',\n\t\t\t\t \t\t\t'$this->cpf',\n\t\t\t\t \t\t\t'$this->celular',\n\t\t\t\t \t\t\t'$this->senha',\n\t\t\t\t \t\t\tnow()\n\t\t\t\t\t);\n\t\t\t\";\n\n\t\t\t$DB = new DB();\n\t\t\t$DB->open();\n\t\t\t$result = $DB->query($sql);\n\t\t\t$DB->close();\n\t\t\treturn $result;\n\t\t}", "public static function fromFunction(callable $function): static\n {\n return new self(Iterators::generate($function));\n }", "function dbConnect(){\r\n\t$host = \"localhost\"; // this is typically just \"localhost\"\r\n\t$user = \"id1360972_elliott\"; // user name\r\n\t$pwd = \"170592\"; // database password\r\n\t$database = \"id1360972_mysqldemo\"; // database name\r\n\r\n\t// initiate a new mysqli object to connect to the Database. Store the mysqli object in a variable $conn.\r\n\t$conn = new mysqli($host, $user, $pwd, $database) or die(\"could not connect to server\");\r\n\r\n\t// return $conn to the fucntion call\r\n\treturn $conn;}", "function so_sql()\n\t{\n\t\tthrow new egw_exception_assertion_failed('use __construct()!');\n\t}", "function queryMysql($query)\n\t{\n\t\tglobal $connection;\n\t\t$result = $connection->query($query);\n\t\tif(!$result) die ($connection->error);\n\t\treturn $result;\n\n\t}", "function __construct($db_location, $db_user_name, $db_password, $db_name) { \n \n $this->db = MYSQL_CONNECT ($db_location, $db_user_name, $db_password) or DIE (\"Unable to connect to Database Server\");\n MYSQL_SELECT_DB ($db_name, $this->db) or DIE (\"Could not select database\");\n }", "function __construct() {\r\n\t\t\r\n\t\tglobal $useDB, $dbTable;\r\n\t\t\r\n\t\t$this->ok = false;\r\n\t\tif( !$useDB ) return;\r\n\t\t\r\n\t\t$this->table = $dbTable;\r\n\t\t$this->state = 0;\r\n\t\t$this->connect();\r\n\t}", "static public function create($name, $load = false) {\n return new MySQLDBTable($name, $load);\n }", "public function __construct(string $table, Closure $callback = null, $prefix = '')\n {\n $this->prefix = $prefix;\n $this->table = $table;\n\n if (! is_null($callback)) {\n $callback($this);\n }\n }", "function newMySQLDatatable($server, $user, $passwd, $dbname, $tableName, $elements) {\n // Create connection\n $dbConnection = new mysqli($servername, $username, $password, $dbname);\n // Check connection\n if ($dbConnection->connect_error) {\n die(\"Connection failed: \" . $dbConnection->connect_error);\n }\n\n // sql to create table\n $newTable = \"CREATE TABLE \" . $tableName . \" (\";\n /*foreach($elements as $row)\n {\n $newTable += $row . $row=>$type;\n }*/\n $newTable += \")\";\n //id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,\n //firstname VARCHAR(30) NOT NULL,\n //lastname VARCHAR(30) NOT NULL,\n //email VARCHAR(50),\n //reg_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP\n //)\";\n\n if ($dbConnection->query($newTable) === TRUE) {\n echo \"Table MyGuests created successfully\";\n } else {\n echo \"Error creating table: \" . $dbConnection->error;\n }\n\n $dbConnection->close();\n }", "function __construct(\\column $c, sql $ref_sql=null, $alias = null) {\n //\n //save the column \n $this->column= $c;\n //\n //Set the referenced sql\n $this->ref_sql= is_null($ref_sql) ? $c->ref_table_name:$ref_sql->entity->name;\n //\n //Set the alias \n $this->alias=$alias;\n //\n parent::__construct($alias);\n }", "public function testCreateMySQLTable()\n {\n // table name\n $name = \"foobar\";\n\n // connect to mysql db (local/Travis)\n $db = new Biscuit\\Db\\MySQL();\n $db->setServer( \"127.0.0.1\", 3306 );\n $db->setAuth( \"root\", \"\" );\n $db->setDatabase( \"biscuit_test_db\" );\n $db->connect();\n\n // check connection\n $this->assertEquals( true, $db->connected(), \"MySQL connection failed\" );\n\n // setup table schema object for sqlite\n $table = $this->getTableSchema( $name, false );\n $db->dropTable( $name );\n\n // build and run queries\n foreach( $table->getQueries() as $query )\n {\n $result = $db->query( $query );\n $error = $db->getError();\n $this->assertEquals( true, $result instanceof PDOStatement, \"MySQL query failed: \". $error );\n }\n // run final checks\n $this->runFinalDbAsserts( $db, $name );\n }", "public function __construct()\n {\n $this->initMySQL();\n }", "function SQL($sql) {\r\n\tconnect();\r\n\tglobal $l, $errmsg, $db;\r\n\t$r = mysql_db_query($db, $sql , $l);\r\n\t$errmsg = mysql_errno().\": \".mysql_error();\r\n\tif (mysql_error() != \"\") {\r\n\t\terrormsg(\"Database Error\", $errmsg);\r\n\t\t$r = 0;\r\n\t}\r\n\treturn $r;\r\n}", "public function __construct(){\n require_once \"GestioneAcquariMarini/libs/ValidationFunction/validationFunction.php\";\n $this->validationFunction = new ValidationFunction();\n }", "public function __const($dbname=\"Newdb\",$tablename=\"productDb\",$servername=\"localhost\",$username=\"root\",$password=\"\"){\n \n //Note for bellow: Inserting constructor paramiter value to class property above\n $this->servername = $servername;\n $this->username = $username;\n $this->password = $password;\n $this->dbname = $dbname;\n $this->tablename = $tablename;\n //inserting query value to $con property.\n $this->con = mysqli_connect($servername,$username,$password);\n\n //Checking if connection is ok.\n if (!$this->con) {\n die(\"connection failed:\".mysqli_connect_error());\n }\n \n //query for creating Database and table.\n $sql = \"CREATE DATABASE IF NOT EXISTS $dbname\";\n if (mysqli_query($this->con,$sql)) {\n $this->con = mysqli_connect($servername,$username,$password,$dbname);\n $sql = \"CREATE TABLE IF NOT EXISTS $tablename(\n id INT(11)NOT NULL AUTO_INCREMENT PRIMARY KEY,\n product_name VARCHAR(25) NOT NULL,\n product_price FLOAT,\n product_image VARCHAR(100)\n\n );\";\n if (!mysqli_query($this->con,$sql)) {\n echo\"Error creating table:\".mysqli_error($this->con);\n }\n }else{\n return false;\n }\n\n }", "protected function _initialize()\r\n {\r\n $this->metadata()->setTablename('funcionario');\r\n $this->metadata()->setPackage('system.application.models.dao');\r\n \r\n # nome_do_membro, nome_da_coluna, tipo, comprimento, opcoes\r\n \r\n $this->metadata()->addField('id', 'id', 'int', 11, array('primary' => true, 'notnull' => true, 'autoincrement' => true));\r\n $this->metadata()->addField('nome', 'nome', 'varchar', 255, array());\r\n $this->metadata()->addField('login', 'login', 'varchar', 45, array());\r\n $this->metadata()->addField('senha', 'senha', 'varchar', 255, array());\r\n $this->metadata()->addField('email', 'email', 'varchar', 255, array());\r\n $this->metadata()->addField('lotacao', 'lotacao', 'varchar', 45, array());\r\n\r\n \r\n }", "function create_connection(){\n $conn = new MySqli(\"localhost\", \"shivam\", \"hesoyam26\", \"ctf\");\n if($conn->connect_error){\n echo(\"Failed to connect to sql server\");\n log_error($conn->connect_error);\n return null;\n }\n return $conn;\n}", "function connect($query) {\n\n\t$db_host = \"localhost\";\n\t$db_user = \"root\";\n\t$db_pass = \"root\";\n\t$db_name = \"lamdb\";\n\n\t// Connessione al database\n\n\t//function db_connect() {\n\t//include_once (\"config.inc.php\");\n\t$connection = mysql_connect($db_host, $db_user, $db_pass) or die(mysql_error());\n\n\t// Check - \"<p>Collegato con successo.</p>\";\n\n\t// Check - echo $query;\n\n\tmysql_select_db($db_name) or die(mysql_error());\n\n\tif (mysql_query($query, $connection)) {\n\t\t$ok = 1;\n\t\t//echo \"Query avvenuta con successo.\";\n\t} else {\n\t\t$ok = 0;\n\t\t\"<p>Query non avvenuta con successo: \" . mysql_error() . \".</p>\";\n\t}\n\n\treturn $connection;\n\t//}\n\n}", "function sql_table($name) {\n global $MYSQL_PREFIX;\n\n if ($MYSQL_PREFIX) {\n return $MYSQL_PREFIX . 'nucleus_' . $name;\n } else {\n return 'nucleus_' . $name;\n }\n}", "function db_table() {\n\t\t\t$vars = get_class_vars(__CLASS__);\n\t\t\treturn $vars[__FUNCTION__];\n\t\t}", "function sql_query($sql, $db_conn)\r\n{\r\n\t$result = mysql_query($sql,$db_conn);\r\n\t\r\n\treturn $result;\r\n}", "function db_query($query) {\n\t$result = mysql_query($query);\n\t\n\tif(!$result) {\n\t\t$message = 'Invalid query: ' . mysql_error() . \"\\n\";\n\t\t$message .= 'Whole query: ' . $query;\n\t\tdie($message);\n\t}\n\t\n\treturn $result;\n}", "function timestamp_from_mysql($timestamp)\n{\n\tereg (\"([0-9]{2,4})[^0-9]([0-9]{1,2})[^0-9]([0-9]{1,2})\", $timestamp, $regs);\n\tereg (\"([0-9]{2,4})[^0-9]([0-9]{1,2})[^0-9]([0-9]{1,2})[^0-9]([0-9]{1,2})[^0-9]([0-9]{1,2})[^0-9]([0-9]{1,2})\", $timestamp, $regs);\n\n\tif (sizeof($regs)>1)\n\t{\n\t\tif (sizeof($regs)>4)\n\t\t{\n\t\t\t$date=mktime($regs[4],$regs[5],$regs[6],$regs[2],$regs[3],$regs[1]);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$date=mktime(0,0,0,$regs[2],$regs[3],$regs[1]);\n\t\t}\n\t}\n\telse\n\t{\n\t\t$date=0;\n\t}\n\treturn $date;\n}", "function getFunctions() {\n return mysql_query(sprintf('SELECT definer, name, param_list, returns, body FROM mysql.proc WHERE db = \\'%s\\' AND type = \\'FUNCTION\\'', $this->config[\"database\"]));\n }", "function myFunction()\n{\n}", "public function addColumn($column_table_name, $label, $parameters = null, $relation = null, $function = null)\n {\n if (!$this->sqlColumns)\n {\n $this->sqlColumns = \"{$column_table_name} \";\n }\n else\n {\n $this->sqlColumns.= \" ,{$column_table_name} \";\n }\n\n $objColumn->label = $label;\n $objColumn->mask = $mask;\n $objColumn->relation = $relation;\n $objColumn->parameters = $parameters;\n $this->columns[$column_table_name] = $objColumn;\n }", "function MySQLDB(){\n\t\t// Make connection to db\n\t\t$this->connection = mysql_connect(DB_SERVER, DB_USER, DB_PASS) or die(mysql_error());\n\t\tmysql_select_db(DB_NAME, $this->connection) or die(mysql_error());\n\t\t\n\t\t/**\n\t\t * only query database to find out number of members\n\t\t * when getNumMmembers() is called for teh first time,\n\t\t * until then, default value set.\n\t\t */\n\t\t$this->num_members = -1;\n\t\t\n\t\tif(TRACK_VISITORS){\n\t\t\t//Calculate number of users on the site\n\t\t\t$this->calcNumActiveUsers();\n\t\t\t\n\t\t\t//Calculate number of guests on the site\n\t\t\t$this->calcNumActiveGuests();\n\t\t}\n\t}", "function PhpDbCommonFunction($sql, $successtext){\r\n\t\t$conn = new mysqli($servername, $username, $password, $dbname);\r\n\t\t// Check connection\r\n\t\tif ($conn->connect_error) {\r\n\t\t\tdie(\"Connection failed: \" . $conn->connect_error);\r\n\t\t} \r\n\r\n\t\tif ($conn->query($sql) === TRUE) {\r\n\t\t\techo $successtext;\r\n\t\t} else {\r\n\t\t\techo \"Error : \" . $conn->error;\r\n\t\t}\r\n\r\n\t\t$conn->close();\r\n\t}", "protected function __construct($tbl, $column_array, $field_array) {\n\t\t$this->table = $tbl;\n\t\t$this->columns = $column_array;\n\t\t$this->fields = $field_array;\n\t\t$this->map = Util::MakeAssocArray($this->columns,$this->fields);\n\t\t$this->_id = uniqid();\t\t// Every object in the database has a random hash\n\t}", "function Sql_query1( $query ) {\n\tglobal $db;\n\t$res=mysql_query( $query, $db );\n\treturn $res;\n}", "abstract public function createFromSql($sql);", "function connect_mysql(){\n\t// returns a mysqli instance or exits the script if unsuccessful\n\tglobal $mysql_host, $mysql_username, $mysql_password, $mysql_dbname;\n\t$mysqli = new mysqli($mysql_host, $mysql_username,\n\t $mysql_password);\n\n\tif($mysqli->errno){\n\t\tthrow new Exception(\n\t\t sprintf(\"Unable to connect to the database:<br /> %s\",\n\t\t\t$mysqli->errno));\n\t}\n\treturn $mysqli;\n}", "function mysql_time($tiempo = 'now'){\r\n return date( 'H:i:s',strtotime($tiempo) );\r\n}", "function mysql_date($tiempo = 'now'){\r\n return date( 'Y-m-d',strtotime($tiempo) );\r\n}", "public function loadListFunction()\n {\n \t$select = $this->select();\n \t$select->distinct(true);\n \t$select->setIntegrityCheck(false);\n \t$select->from(array('fn' => 'function'),\n \t\t\tarray('fn.function_id', 'fn.name AS function_name'));\n \t$stmt = $select->query();\n \t$result = $stmt->fetchAll();\n \t// \techo $select->__toString() . \"\\n\";\n \treturn $result;\n }", "function mysql_datetime($tiempo = 'now'){\r\n return date( 'Y-m-d H:i:s',strtotime($tiempo) );\r\n}", "function mdl_create_function_parameter(array $definition)\n{\n // Validate the functiion parameter if required\n $parameter = PHPFunctionParameter(preg_replace(\"/\\s+/\", \"\", $definition['name']), isset($definition['type']) ? str_replace(\"\\\\\\\\\", \"\\\\\", $definition['type']) : null, $definition['default'] ?? null);\n\n if (isset($definition['optional']) && (true === boolval($definition['optional']))) {\n $parameter = $parameter->asOptional();\n }\n\n if (isset($definition['variadic']) && (true === boolval($definition['variadic']))) {\n $parameter = $parameter->asVariadic();\n }\n\n if (isset($definition['reference']) && (true === boolval($definition['reference']))) {\n $parameter = $parameter->asReference();\n }\n return $parameter;\n}", "function mysql_conn()\n{\n\t try{\n\n\t\t $db = ADONewConnection('mysql'); \n\t\t $db->Connect('localhost','root','','ikolilu_tt_db');\n\n\t\t $GLOBALS['Mysqli'] = new Mysqli('localhost', 'root', '', 'ikolilu_tt_db');\n\t }catch(Exception $e)\n\t\t {\n\t\t\t return -1;\n\t\t }\n return $db;\n}", "function query($query){\n\t\tif(!$this->ready){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$return_val = 0;\n\t\t$this->flush();\n\t\n\t\t// Log how the function was called\n\t\t$this->func_call = \"\\$db->query(\\\"$query\\\")\";\n\t\n\t\t// Keep track of the last query for debug..\n\t\t$this->last_query = $query;\n\t\n\t\tif(defined('SQ_DEBUG') && SQ_DEBUG){\n\t\t\t$this->timer_start();\n\t\t}\n\t\n\t\t$this->result = @mysql_query($query, $this->dbh);\n\t\t$this->num_queries++;\n\t\n\t\tif(defined('SQ_DEBUG') && SQ_DEBUG){\n\t\t\t$this->queries[] = array($query, $this->timer_stop(), $this->get_caller());\n\t\t}\n\t\n\t\t// If there is an error then take note of it..\n\t\tif($this->last_error = mysql_error( $this->dbh )){\n\t\t\tthrow(new SQ_Exception($this->last_error, SQ_MYSQL_ERROR_CODE));\n\t\t}\n\t\n\t\tif(preg_match( '/^\\s*(create|alter|truncate|drop) /i', $query)){\n\t\t\t$return_val = $this->result;\n\t\t}elseif(preg_match( '/^\\s*(insert|delete|update|replace) /i', $query)){\n\t\t\t$this->rows_affected = mysql_affected_rows( $this->dbh );\n\t\t\t// Take note of the insert_id\n\t\t\tif(preg_match('/^\\s*(insert|replace) /i', $query)){\n\t\t\t\t$this->insert_id = mysql_insert_id($this->dbh);\n\t\t\t}\n\t\t\t// Return number of rows affected\n\t\t\t$return_val = $this->rows_affected;\n\t\t}else{\n\t\t\t// Select...\n\t\t\t$i = 0;\n\t\t\twhile($i < @mysql_num_fields( $this->result )){\n\t\t\t\t$this->col_info[$i] = @mysql_fetch_field( $this->result );\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t$num_rows = 0;\n\t\t\twhile($row = @mysql_fetch_object( $this->result)){\n\t\t\t\t$this->last_result[$num_rows] = $row;\n\t\t\t\t$num_rows++;\n\t\t\t}\n\t\n\t\t\t@mysql_free_result($this->result);\n\t\n\t\t\t// Log number of rows the query returned\n\t\t\t// and return number of rows selected\n\t\t\t$this->num_rows = $num_rows;\n\t\t\t$return_val = $num_rows;\n\t\t}\n\n\t\treturn $return_val;\n\t}", "function Query($query)\n {\n $databasename = $this->databasename;\n static $tblcache = array();\n\n $qitems = array();\n $qitems['fields'] = false;\n $qitems['tablename'] = false;\n $qitems['option'] = false;\n $qitems['orderby'] = false;\n $qitems['min'] = false;\n $qitems['length'] = false;\n $qitems['where'] = false;\n $fieldstoget = false;\n //SELECT\n if ( preg_match(\"/^SELECT/is\",$query) )\n {\n if ( preg_match(\"/^SELECT( DISTINCT | )([a-zA-Z0-9, \\(\\)\\*]+|\\*|COUNT\\(\\*\\)) FROM (\\w+)(.+)/i\",\"$query \",$t1) )\n {\n //campi\n $qitems['fields'] = trim(ltrim($t1[2]));\n $qitems['tablename'] = trim(ltrim($t1[3]));\n $qitems['option'] = trim(ltrim($t1[1]));\n //dprint_r($t1);\n //dprint_r($qitems);\n $tmpwhere = $t1[4];\n $cid = $this->path . $databasename . $qitems['tablename'];\n if ( !isset($tblcache[$cid]) )\n $tblcache[$cid] = new XMLTable($databasename,$qitems['tablename'],$this->path);\n $tbl = &$tblcache[$cid];\n //$tbl = new XMLTable($databasename, $qitems['tablename'], $this->path);\n\n\n if ( $qitems['tablename'] == \"\" )\n return \"xmldb: syntax error\";\n\n if ( !file_exists($this->path . \"/$databasename/{$qitems['tablename']}.php\") )\n return \"xmldb: unknow table {$qitems['tablename']}\";\n\n //dprint_r($tbl);\n //native mysql table ----------------------->\n /*\n if (isset($tbl->driverclass->connection))\n {\n $ret = $tbl->driverclass->dbQuery($query, $databasename);\n //dprint_r($ret);\n return $ret;\n }\n */\n //native mysql table -----------------------<\n\n\n //dprint_r($t1);\n if ( preg_match(\"/WHERE (.+)/i\",$tmpwhere,$t1) )\n {\n $tmpwhere = $t1[1];\n $qitems['where'] = $tmpwhere;\n }\n else\n $qitems['where'] = \"\";\n\n if ( preg_match(\"/(.+)LIMIT ([0-9]+),([0-9]+)/i\",$tmpwhere,$dt3) )\n {\n //dprint_r($dt3);\n $qitems['min'] = $dt3[2];\n $qitems['length'] = $dt3[3];\n $tmpwhere = $dt3[1];\n $qitems['where'] = $tmpwhere;\n }\n if ( preg_match(\"/(.+)ORDER BY (.*)(i:limit|)/i\",$tmpwhere,$dt2) )\n {\n //dprint_r($dt2);\n $tmpwhere = $dt2[1];\n $qitems['orderby'] = trim(ltrim($dt2[2]));\n $qitems['where'] = $tmpwhere;\n }\n\n //dprint_r($qitems);\n\n\n }\n\n //dprint_r($qitems);\n //----CONDIZIONE---------------------->\n $where2 = preg_replace(\"/(\\\\w+)( = )/\",'\\$item[\\'${1}\\'] == ',trim(ltrim($qitems['where'])));\n $where2 = preg_replace(\"/(\\\\w+)( > )/\",'\\$item[\\'${1}\\'] > ',$where2);\n $where2 = preg_replace(\"/(\\\\w+)( < )/\",'\\$item[\\'${1}\\'] < ',$where2);\n $where2 = preg_replace(\"/(\\\\w+)( >= )/\",'\\$item[\\'${1}\\'] >= ',$where2);\n $where2 = preg_replace(\"/(\\\\w+)( <= )/\",'\\$item[\\'${1}\\'] <= ',$where2);\n $where2 = preg_replace(\"/(\\\\w+)( <> )/\",'\\$item[\\'${1}\\'] != ',$where2);\n $where2 = preg_replace('/(\\w+)[\\040]+(LIKE)[\\040]+\"%(.*?)%\"/i','preg_match(\"/${3}/i\",\\$item[\\'${1}\\'])',$where2);\n $where2 = preg_replace('/(\\w+)[\\040]+(LIKE)[\\040]+\"%(.*?)\"/i','preg_match(\"/${3}$/i\",\\$item[\\'${1}\\'])',$where2);\n $where2 = preg_replace('/(\\w+)[\\040]+(LIKE)[\\040]+\"(.*?)%\"/i','preg_match(\"/^${3}/i\",\\$item[\\'${1}\\'])',$where2);\n\n $where2 = preg_replace('/(\\w+)[\\040]+(LIKE)[\\040]+\"(.*?)\"/i','\"${3}\" == \\$item[\\'${1}\\']',$where2);\n //$where2 = preg_replace ( '/(\\w+)[\\040]+(LIKE)[\\040]+\"(.*?)\"/i', 'preg_match(\"/${3}/i\",\\$item[\\'${1}\\'])', $where2 );\n\n\n $where2 = preg_replace('/(\\w+)[\\040]+(LIKE)[\\040]+\\'%(.*?)%\\'/i','preg_match(\"/${3}/i\",\\$item[\\'${1}\\'])',$where2);\n $where2 = preg_replace('/(\\w+)[\\040]+(LIKE)[\\040]+\\'%(.*?)\\'/i','preg_match(\"/${3}$/i\",\\$item[\\'${1}\\'])',$where2);\n $where2 = preg_replace('/(\\w+)[\\040]+(LIKE)[\\040]+\\'(.*?)%\\'/i','preg_match(\"/^${3}/i\",\\$item[\\'${1}\\'])',$where2);\n $where2 = preg_replace('/(\\w+)[\\040]+(LIKE)[\\040]+\\'(.*?)\\'/i','\"${3}\" == \\$item[\\'${1}\\']',$where2);\n //$where2 = preg_replace ( '/(\\w+)[\\040]+(LIKE)[\\040]+\\'(.*?)\\'/i', 'preg_match(\"/${3}/i\",\\$item[\\'${1}\\'])', $where2 );\n //dprint_r($where2);\n //----CONDIZIONE----------------------<\n //per ottimizzare prendo solo i fields che mi interessano--->\n if ( $qitems['fields'] == \"*\" || preg_match('/COUNT\\(\\*\\)/is',$qitems['fields']) )\n {\n\n $fieldstoget = false;\n }\n else\n {\n //per performance coinvolgo solamente i fields interessati dalla query\n if ( $qitems['orderby'] != \"\" )\n {\n $t = explode(\",\",$qitems['orderby']);\n foreach ( $t as $tf )\n {\n if ( preg_match(\"/([a-zA-Z0-9_]+)/\",$tf,$pm) )\n $fieldstoget[] = trim(ltrim($pm[0]));\n }\n }\n $t = explode(\",\",$qitems['fields']);\n foreach ( $t as $tf )\n {\n if ( preg_match(\"/([a-zA-Z0-9_]+)/\",$tf,$pm) )\n $fieldstoget[] = trim(ltrim($pm[0]));\n }\n $t = xmldb_iExplode(\" OR \",$qitems['where']);\n //dprint_r($t);\n foreach ( $t as $tf )\n {\n $tf = trim(ltrim($tf));\n if ( preg_match(\"/([a-zA-Z0-9_]+)/\",$tf,$pm) )\n $fieldstoget[] = trim(ltrim($pm[0]));\n }\n $t = xmldb_iExplode(\" AND \",$qitems['where']);\n foreach ( $t as $tf )\n {\n $tf = trim(ltrim($tf));\n if ( preg_match(\"/([a-zA-Z0-9_]+)/\",$tf,$pm) )\n $fieldstoget[] = trim(ltrim($pm[0]));\n }\n if ( !is_array($fieldstoget) )\n return \"xmldb: syntax error\";\n\n $fieldstoget = array_unique($fieldstoget);\n }\n //dprint_r($fieldstoget);\n //per ottimizzare prendo solo i fields che mi interessano--->\n\n\n $allrecords = $tbl->GetRecords(false,false,false,false,false,$fieldstoget);\n\n //ordinamento -------->\n if ( $qitems['orderby'] != \"\" )\n {\n $orders = explode(\",\",$qitems['orderby']);\n foreach ( $orders as $order )\n {\n\n if ( preg_match(\"/([a-zA-Z0-9]+)(.*)/s\",$order,$orderfields) );\n {\n //dprint_r($orderfields);\n if ( preg_match(\"/DESC/is\",trim(ltrim($orderfields[2]))) )\n {\n $isdesc = true;\n }\n else\n $isdesc = false;\n\n $allrecords = array_sort_by_key($allrecords,trim(ltrim($orderfields[1])),$isdesc);\n }\n }\n }\n //ordinamento --------<\n\n\n $i = 0;\n $ret = null;\n\n //filtro search condition -------------------->\n if ( !is_array($allrecords) )\n return null;\n foreach ( $allrecords as $item )\n {\n $ok = false;\n\n //eval($where2);\n //dprint_r (\"if ($where2){\". '$ok=true;'.\"}\");\n if ( $where2 == \"\" )\n $ok = true;\n else\n eval(\"if ($where2){\" . '$ok=true;' . \"}\");\n if ( $ok == false )\n continue;\n //dprint_r($qitems);\n if ( $qitems['fields'] == \"*\" )\n {\n $tmp = $item;\n }\n else\n {\n\n $fields = explode(\",\",$qitems['fields']);\n $tmp = null;\n //dprint_r($fields);\n //alias ------->\n foreach ( $fields as $field )\n {\n if ( preg_match(\"/ AS /is\",$field) )\n {\n\n $as = xmldb_iExplode(\" AS \",$field);\n $k2 = trim(ltrim($as[1]));\n $k1 = trim(ltrim($as[0]));\n }\n else\n $k1 = $k2 = trim(ltrim($field));\n\n if ( !isset($item[$k1]) && strtoupper($k1) != \"COUNT(*)\" )\n return \"xmldb: unknow row '$k1' in table {$qitems['tablename']}\";\n\n if ( strtoupper($k1) != \"COUNT(*)\" )\n {\n //echo \"field = $k1 \";\n $tmp[$k2] = $item[$k1];\n }\n else\n $tmp[$k2] = $item;\n\n }\n //alias -------<\n }\n //----distinct------------->\n if ( strtoupper($qitems['option']) == \"DISTINCT\" )\n if ( array_in_array($tmp,$ret) )\n continue;\n //----distinct-------------<\n $i++ ;\n //----min length----------->\n if ( ($qitems['min']) && $i < $qitems['min'] )\n continue;\n if ( ($qitems['min'] && $qitems['length']) && ($i) >= ($qitems['min'] + $qitems['length']) )\n break;\n //----min length----------->\n $ret[] = $tmp;\n }\n //filtro search condition --------------------<\n //dprint_r($qitems);\n $count = false;\n if ( stristr($qitems['fields'],\"COUNT(*)\") )\n {\n // ADDED BY DANIELE FRANZA 2/02/2009: start\n if ( preg_match(\"/ AS /is\",$qitems['fields']) )\n {\n $as = xmldb_iExplode(\" AS \",$qitems['fields']);\n $k2 = trim(ltrim($as[1]));\n $k1 = trim(ltrim($as[0]));\n }\n else\n {\n //if (!isset($field))\n //\t$field=\"COUNT(*)\";\n $k1 = $k2 = trim(ltrim($field));\n }\n // ADDED BY DANIELE FRANZA 2/02/2009: end\n\n\n $count = true;\n //$fields = false;\n }\n\n if ( $count )\n return array(0=>array(\"$k2\"=>count($ret)));\n else\n return $ret;\n }\n\n //DESCRIBE TODO\n if ( preg_match(\"/^DESCRIBE/is\",$query) )\n {\n if ( preg_match(\"/^DESCRIBE ([a-zA-Z0-9_]+)/is\",\"$query \",$t1) )\n {\n $qitems['tablename'] = trim(ltrim($t1[1]));\n $cid = $this->path . $databasename . $qitems['tablename'];\n if ( !isset($tblcache[$cid]) )\n $tblcache[$cid] = new XMLTable($databasename,$qitems['tablename'],$this->path);\n $t = &$tblcache[$cid];\n //\t\t\t\t$t = new XMLTable($databasename, $qitems['tablename'], $this->path);\n //native mysql table ----------------------->\n /*\n if ($t->driverclass->connection)\n {\n return $t->driverclass->dbQuery($query);\n }\n //native mysql table -----------------------<\n else*/\n {\n $ret = array();\n foreach ( $t->fields as $field )\n {\n $ret[] = array(\"Field\"=>$field->name,\"Type\"=>$field->type,\"Null\"=>\"NO\",\"Key\"=>$field->primarykey,\"Extra\"=>$field->extra);\n }\n return $ret;\n }\n }\n }\n //SHOW TABLES\n if ( preg_match(\"/^SHOW TABLES/is\",trim(ltrim($query))) )\n {\n $path = ($this->path . \"/\" . $this->databasename . \"/*\");\n $files = glob($path);\n $ret = array();\n foreach ( $files as $file )\n {\n if ( !is_dir($file) )\n $ret[] = array(\"Tables_in_\" . $this->databasename=>preg_replace('/.php$/s','',basename($file)));\n }\n return $ret;\n }\n //INSERT\n if ( preg_match(\"/^INSERT/is\",$query) )\n {\n if ( preg_match(\"/^INSERT[ ]+INTO([a-zA-Z0-9\\\\`\\\\._ ]+)\\\\(([a-zA-Z_ ,]+)\\\\)[ ]+VALUES[ ]+\\\\((.*)\\\\)/i\",\"$query \",$t1) )\n {\n $qitems['tablename'] = trim(ltrim($t1[1]));\n $qitems['fields'] = trim(ltrim($t1[2]));\n $qitems['values'] = trim(ltrim($t1[3]));\n $cid = $this->path . $databasename . $qitems['tablename'];\n if ( !isset($tblcache[$cid]) )\n $tblcache[$cid] = new XMLTable($databasename,$qitems['tablename'],$this->path);\n $tbl = &$tblcache[$cid];\n //native mysql table ----------------------->\n /*if ($tbl->driverclass->connection)\n {\n $ret = $t->driverclass->dbQuery($query);\n //dprint_r($ret);\n return $ret;\n }*/\n //native mysql table -----------------------<\n\n\n $fields = explode(\",\",$qitems['fields']);\n $values = explode(\",\",$qitems['values']);\n $recordstoinsert = array();\n if ( count($fields) == count($values) )\n {\n for ( $i = 0;$i < count($fields);$i++ )\n {\n $recordstoinsert[$fields[$i]] = preg_replace(\"/^'/\",\"\",preg_replace(\"/'$/s\",\"\",preg_replace('/^\"/s',\"\",preg_replace('/\"$/s',\"\",$values[$i]))));\n }\n }\n else\n return \"xmldb: syntax error\";\n\n return $tbl->InsertRecord($recordstoinsert);\n }\n }\n //UPDATE TODO\n if ( preg_match(\"/^UPDATE/is\",$query) )\n {\n //UPDATE `fndatabase`.`users` SET `name` = 'quattro' WHERE CONVERT( `users`.`email` USING utf8 ) = 'uno' LIMIT 1 ;\n\n\n }\n //DELETE TODO\n if ( preg_match(\"/^DELETE/is\",$query) )\n {\n\n }\n }", "function db_query($query) {\r\n\t$connection = db_connect();\r\n\r\n\t// Query the database\r\n\t$result = mysqli_query($connection, $query);\r\n\r\n\treturn $result;\r\n}", "function maxdb_fetch_object($result)\n{\n}", "public function dataStoreFunction($tablename, $variable) {\n $content = \"\\n $tablename\" . \"DataStore { \\n public $\" . \"tablename='$tablename';\\n\";\n $newline = \"\\n\";\n $methods = array(\"select\", \"delete\");\n $part1 = array(\" from \", \" from \");\n $part2 = array(\" where \", \" where \");\n $sql = array(\n \"select X from Y where C ;\", \" insert into X (Cols) Values (Values) where C; \", \"update X set Y=Z where C\"\n );\n\n $sqlSelectString = \"\\n function $tablename\" . \"SelectStmt($\" . \"cols='*',$\" . \"condition=true){\\n\";\n $sqlSelectString.=\" SELECT $\" . \"cols from $tablename where $\" . \"condition\";\n $sqlSelectString.=\"\\n}\\n\";\n\n $sqlDeleteString = \"\\n function $tablename\" . \"DeleteStmt($\" . \"condition=true){\\n\";\n $sqlDeleteString.=\" DELETE from $tablename where $\" . \"condition\";\n $sqlDeleteString.=\"\\n}\\n\";\n\n $sqlInsertString = \"\\n function $tablename\" . \"InsertStmt($\" . \"values ,$\" . \"condition=true){\\n\";\n $sqlInsertString.=\" Insert into $tablename values (join()) where $\" . \"condition\";\n $sqlInsertString.=\"\\n}\\n\";\n\n\n\n if (is_array($variable))\n $length = '';\n\n\n\n $content.=\"\\n }\";\n\n\n return $content;\n }", "function query($query)\r\n\t{\r\n\t\t$ret = mysql_query ($query) or die(mysql_error());\r\n\t\treturn $ret;\r\n\t}", "public function __construct($db) {\n if($db==null) {\n $this->db =new DBMysql();\n }else {\n $this->db=$db;\n }\n }", "function MySQLDB(){\r\n /* Make connection to database */\r\n try {\r\n \t\t# MySQL with PDO_MYSQL\r\n\t\t$this->connection = new PDO('mysql:host='.DB_SERVER.';dbname='.DB_NAME, DB_USER, DB_PASS);\r\n \t\t$this->connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n\t\t$this->connection->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);\r\n \t} catch(PDOException $e) { \r\n\t\techo \"Error connecting to database.\"; \r\n\t}\r\n \r\n /**\r\n * Only query database to find out number of members\r\n * when getNumMembers() is called for the first time,\r\n * until then, default value set.\r\n */\r\n $this->num_members = -1;\r\n \r\n if(TRACK_VISITORS){\r\n /* Calculate number of users at site */\r\n $this->calcNumActiveUsers();\r\n \r\n /* Calculate number of guests at site */\r\n $this->calcNumActiveGuests();\r\n }\r\n }" ]
[ "0.6012904", "0.5308856", "0.52413315", "0.5214457", "0.51100165", "0.5057674", "0.49851096", "0.49425158", "0.49014345", "0.48973918", "0.4868988", "0.48566493", "0.484258", "0.4801125", "0.4793455", "0.47742167", "0.4747866", "0.47349033", "0.47326857", "0.47285336", "0.4724193", "0.46803617", "0.46767458", "0.4675239", "0.46726647", "0.46722144", "0.46687478", "0.4644597", "0.46150082", "0.46123135", "0.46076286", "0.46048388", "0.45983186", "0.45922902", "0.4580701", "0.45678484", "0.45672265", "0.45608217", "0.45495647", "0.45218533", "0.45141658", "0.45129976", "0.45120823", "0.45078757", "0.45046848", "0.44939688", "0.449079", "0.44877726", "0.44820622", "0.44814694", "0.4476608", "0.44736344", "0.44662604", "0.44629493", "0.44624513", "0.44597286", "0.4446357", "0.44392264", "0.4438984", "0.44353348", "0.44348052", "0.44184625", "0.44178128", "0.44171566", "0.4416695", "0.4416546", "0.44129992", "0.4411644", "0.44089234", "0.4405195", "0.4402599", "0.438787", "0.43875772", "0.4373019", "0.43723875", "0.43669552", "0.43654215", "0.43651852", "0.4364954", "0.43629363", "0.43600288", "0.43560067", "0.43525338", "0.43507957", "0.43459505", "0.43457064", "0.4345023", "0.4343996", "0.43407762", "0.43389487", "0.433854", "0.43345055", "0.43322036", "0.43317574", "0.43304083", "0.4326811", "0.43249258", "0.4310464", "0.43056035", "0.43022797" ]
0.4705825
21
// getFunction() // getFunction() Gets the value of the function Gets the value of the function
public function getFunction () { return $this->_strFunction; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFunction()\n {\n return $this->function;\n }", "public function get_function() {\n\t\tif ( ! $this->is_function_set ) {\n\t\t\t$this->set_function( $this->derive_function() );\n\t\t}\n\t\treturn $this->function;\n\t}", "public function getFunction(): string;", "private function getFuction() {\n return $this->_function;\n }", "public function getFunction()\n {\n return $this->metaRefreshValues['function'];\n }", "public function getFunctionName()\n {\n return $this->function;\n }", "protected function derive_function() {\n\t\t$callable_reference = $this->get_callable_reference();\n\t\treturn is_string( $callable_reference ) && function_exists( $callable_reference ) ? $callable_reference : null;\n\t}", "public function getFunction() {\n $functions = [ 'require', 'include', 'require_once', 'include_once' ];\n $func = $this->getHooks()->filter( 'cortex.template_include_function', $this->function );\n return ( in_array( $func, $functions, TRUE ) ) ? $func : 'require_once';\n }", "public function getFunctionCode()\n {\n return $this->functionCode;\n }", "public function getFunctionName()\n {\n return $this->functionName;\n }", "public function getFunctionName() \n\t{\n\t\treturn $this->function_name;\n\t}", "public function getFunction()\n {\n $fct_name = $this->getFunctionName();\n if (empty($this->function_reflection) && !empty($fct_name)) {\n $cls_name = $this->getClassName();\n if (\n !empty($cls_name) &&\n method_exists($cls_name, $fct_name)\n ) {\n $this->function_reflection = new \\ReflectionMethod($cls_name, $fct_name);\n } elseif (\n function_exists($fct_name)\n ) {\n $this->function_reflection = new \\ReflectionFunction($fct_name);\n }\n }\n return $this->function_reflection;\n }", "public function getFunctionToken() \n\t{\n\t\treturn $this->function_token;\n\t}", "public function getF() {}", "abstract public function getFunctions();", "function getFunction($phpcsFile , $tokens, $stackPtr)\n {\n // Find the Next Token.//\n $nextToken = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true);\n // Check the code of nextToken with ignoreList codes.//\n if (in_array($tokens[$nextToken]['code'], $this->ignoreTokens) === true) {\n // Ignore the PHP function.//\n return;\n }\n $prevToken \n = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1), null, true);\n // Check the code of prevToken with ignoreList codes.//\n if (in_array($tokens[$prevToken]['code'], $this->ignoreTokens) === true) {\n // Ignore the PHP function.//\n return;\n }\n $funcName = '';\n // Get the function name.//\n $funcName = trim($tokens[$stackPtr]['content']);\n return $funcName;\n }", "private function get_cached_function($function_name)\n {\n //if the function exists in our function cache, use it\n if(array_key_exists($function_name, $this->function_cache))\n return (object)$this->function_cache[$function_name];\n\n //also accept a funciton whose name is prefixed with '_'; this allows us to override PHP's built-ins when writing extensions\n elseif(array_key_exists('_'.$function_name, $this->function_cache))\n return (object)$this->function_cache['_'.$function_name];\n\n //otherwise, we find the function to call; return null\n else\n return null;\n }", "public function getFunctions();", "protected function func() { return $this->f; }", "public function getFuncao()\n\t{\n\t\treturn $this->funcao;\n\t}", "abstract protected function getFunctionName(): string;", "public function get_method();", "final public function get_idle_function(/* ... */)\n {\n return $this->_idle_function;\n }", "function test()\n {\n echo \"The fuction name is: \".__FUNCTION__.\"<br><br>\";\n }", "public function get_function_reflector() {\n\t\tif ( ! $this->is_function_reflector_set ) {\n\t\t\t$this->set_function_reflector( $this->derive_function_reflector() );\n\t\t}\n\t\treturn $this->function_reflector;\n\t}", "public function getFuncionario()\n {\n return $this->funcionario;\n }", "public function getFormated($key, $function)\n {\n\n if (isset($this->data[$key])) {\n $data = $function($this->data[$key]);\n\n if (is_array($function)) {\n foreach ($function as $func)\n $data = $func($data);\n } else {\n $data = $function($data);\n }\n\n return $data;\n } else {\n return null;\n }\n\n }", "function test(){ \n //print the function name i.e; test. \n echo 'The function name is '. __FUNCTION__ . \"<br><br>\"; \n }", "protected function getFunction()\n {\n return $this->getStartTime() ? 'fetchDeltaSince' : 'fetchByAccount';\n }", "protected function derive_function_reflector() {\n\t\ttry {\n\t\t\t$function_reflector = $this->is_function_reference() ? new ReflectionFunction( $this->get_function() ) : null;\n\t\t} catch ( ReflectionException $exception ) {\n\t\t\t$function_reflector = null;\n\t\t}\n\t\treturn $function_reflector;\n\t}", "abstract public function generateGetFunction(array &$functions);", "public function getFunction($obj);", "public function get_callback()\n\t{\n\t\treturn $this->callback;\n\t}", "public function getCombiningFunction()\n {\n return $this->combining_function;\n }", "public function getFunction($q){\r\t\t$this->connect();\t//connect if not connected \r\t\t$res=sqlite_fetch_array (sqlite_query($this->handle,$q));\r\t\treturn $res[\"0\"];\r\t}", "public function get_functions()\n\t{\n\t\treturn $this->driver_query('function_list', FALSE);\n\t}", "public function getUseFuncName() \n \t{\n \t\treturn $this->use_funcname;\n \t}", "public function getFunFact() {\n return $this->funFact;\n }", "public function getFunction(string $name): TemplateFunction\n {\n if (! isset($this->functions[$name])) {\n throw new LogicException('The template function \"' . $name . '\" was not found.');\n }\n\n return $this->functions[$name];\n }", "public function getCallback(): callable\n {\n return $this->callback;\n }", "public function getIdFunction()\n {\n return $this->idFunction;\n }", "function testCreateCFunction()\r\n {\r\n global $webUrl;\r\n global $lang, $SERVER, $DATABASE;\r\n\r\n\t\t$this->assertTrue($this->get(\"$webUrl/functions.php\", array(\r\n\t\t\t 'server' => $SERVER,\r\n\t\t\t\t\t\t'database' => $DATABASE,\r\n\t\t\t\t\t\t'schema' => 'public'))\r\n\t\t\t\t\t);\r\n // Turn to the C-function create page.\r\n $this->assertTrue($this->clickLink($lang['strcreatecfunction'])); \r\n \r\n // Enter the definition of the C function.\r\n $this->assertTrue($this->setField('formFunction', 'cfunction'));\r\n $this->assertTrue($this->setField('formArguments', 'text'));\r\n $this->assertTrue($this->setField('formReturns', 'boolean'));\r\n $cFunLocation = getcwd() . '/../data/CFunction/euc_jp_and_sjis';\r\n $this->assertTrue($this->setField('formObjectFile', $cFunLocation));\r\n $this->assertTrue($this->setField('formLinkSymbol', 'mic_to_sjis'));\r\n $this->assertTrue($this->setField('formProperties[0]', 'VOLATILE'));\r\n $this->assertTrue($this->setField('formProperties[1]', 'RETURNS NULL ON NULL INPUT'));\r\n $this->assertTrue($this->setField('formProperties[2]', 'SECURITY DEFINER'));\r\n\r\n // Click the \"Create\" button to create the C function. \r\n $this->assertTrue($this->clickSubmit($lang['strcreate']));\r\n // Verify whether the function is created successfully.\r\n $this->assertTrue($this->assertWantedText($lang['strfunctioncreated']));\r\n \r\n return TRUE; \r\n }", "function getFunctions() {\n return mysql_query(sprintf('SELECT definer, name, param_list, returns, body FROM mysql.proc WHERE db = \\'%s\\' AND type = \\'FUNCTION\\'', $this->config[\"database\"]));\n }", "function getFunction($function_oid) {\n\t\t$this->clean($function_oid);\n\n\t\t$sql = \"\n\t\tSELECT\n\t\t\tpc.oid AS prooid,\n\t\t\tproname,\n\t\t\tpg_catalog.pg_get_userbyid(proowner) AS proowner,\n\t\t\tnspname as proschema,\n\t\t\tlanname as prolanguage,\n\t\t\tpg_catalog.format_type(prorettype, NULL) as proresult,\n\t\t\tprosrc,\n\t\t\tprobin,\n\t\t\tproretset,\n\t\t\tproisstrict,\n\t\t\tprovolatile,\n\t\t\tprosecdef,\n\t\t\tpg_catalog.oidvectortypes(pc.proargtypes) AS proarguments,\n\t\t\tpg_catalog.obj_description(pc.oid, 'pg_proc') AS procomment\n\t\tFROM\n\t\t\tpg_catalog.pg_proc pc, pg_catalog.pg_language pl, pg_catalog.pg_namespace n\n\t\tWHERE\n\t\t\tpc.oid = '$function_oid'::oid\n\t\t\tAND pc.prolang = pl.oid\n\t\t\tAND n.oid = pc.pronamespace\n\t\t\";\n\n\t\treturn $this->selectSet($sql);\n\t}", "function get_handler() {\r\n }", "public function getFunctions()\n\t{\n\t\treturn $this->__getFunctions();\n\t}", "public function getFuncs()\n\t{\n\t\t$this->context = null;\n\t\t\n\t\treturn array_merge($this->groupFuncs, $this->valueFuncs);\n\t}", "public function doFunctionLookup($functionName)\n {\n return $this->db->fetchAssoc('SELECT * FROM function f WHERE name = ?', array($functionName));\n }", "public function getCallable()\n {\n return function () {\n return $this->value;\n };\n }", "public function getFunctionPrimary() \n\t{\n\t\treturn $this->function_primary;\n\t}", "private function setFuction($function) {\n $this->_function = $function;\n }", "public function getOrElseFn($function) {\n return $this->isJust() ? $this->getJust() : $function();\n }", "public function func()\n {\n if ($this->lookahead->type == ControlFunctionLexer::NAME) {\n if (array_key_exists($this->lookahead->text, FunctionDispatcher::$functionNames)) {\n $this->function_name = $this->lookahead->text;\n //$this->function_index = FunctionDispatcher::$functionNames[$this->lookahead->text];\n $this->function_index = FunctionDispatcher::functionIndex($this->lookahead->text);\n } else {\n throw new \\Exception(\"Функция <$this->function_name> не существует\");\n }\n $this->root = new ControlFunctionParseTree($this->lookahead->type, $this->function_name);\n //$this->root = $this->currentNode;\n $this->match(ControlFunctionLexer::NAME);\n $this->cargs();\n } else {\n throw new \\Exception(\n \"Ожидалось объявление функции контроля (сравнение, зависимость ...). Получено \" .\n ControlFunctionLexer::$tokenNames[$this->lookahead->type]\n );\n }\n }", "function func1(){\n echo 'value of function 1';\n }", "public function getFunctions()\n {\n return $this->__getFunctions();\n }", "public function GetFunctions()\n {\n $functions = '';\n if(count($this->functions))\n $functions = implode('', $this->functions);\n return $functions;\n }", "public function getUseFuncID() \n \t{\n \t\treturn $this->use_funcid;\n \t}", "function PMA_getFunctionColumn($params_for_function_column)\n{\n list($field, $is_upload, $field_name_appendix, $unnullify_trigger,\n $no_support_types, $tabindex, $tabindex_for_function,\n $idindex, $insert_mode) = $params_for_function_column;\n\n $html_output = '';\n if (($GLOBALS['cfg']['ProtectBinary'] && $field['is_blob'] && !$is_upload)\n || ($GLOBALS['cfg']['ProtectBinary'] == 'all' && $field['is_binary'])\n || ($GLOBALS['cfg']['ProtectBinary'] == 'noblob' && !$field['is_blob'])\n ) {\n $html_output .= ' <td class=\"center\">' . __('Binary') . '</td>' . \"\\n\";\n } elseif (strstr($field['True_Type'], 'enum')\n || strstr($field['True_Type'], 'set')\n || in_array($field['pma_type'], $no_support_types)\n ) {\n $html_output .= ' <td class=\"center\">--</td>' . \"\\n\";\n } else {\n $html_output .= '<td>' . \"\\n\";\n $html_output .= '<select name=\"funcs' . $field_name_appendix . '\"' . $unnullify_trigger\n . 'tabindex=\"' . ($tabindex + $tabindex_for_function) . '\" id=\"field_' . $idindex . '_1\"';\n $html_output .= PMA_getFunctionsForField($field, $insert_mode);\n $html_output .= '</select>' . \"\\n\";\n $html_output .= '</td>' . \"\\n\";\n }\n return $html_output;\n}", "function get()\n {\n }", "public function parseFunctionName()\n {\n $type = $this->tokenizer->peek();\n switch ($type) {\n\n case PHP_Depend_TokenizerI::T_CLONE:\n case PHP_Depend_TokenizerI::T_STRING:\n case PHP_Depend_TokenizerI::T_USE:\n case PHP_Depend_TokenizerI::T_GOTO:\n case PHP_Depend_TokenizerI::T_NULL:\n case PHP_Depend_TokenizerI::T_SELF:\n case PHP_Depend_TokenizerI::T_TRUE:\n case PHP_Depend_TokenizerI::T_FALSE:\n case PHP_Depend_TokenizerI::T_NAMESPACE:\n case PHP_Depend_TokenizerI::T_DIR:\n case PHP_Depend_TokenizerI::T_NS_C:\n case PHP_Depend_TokenizerI::T_PARENT:\n return $this->consumeToken($type)->image;\n\n case PHP_Depend_TokenizerI::T_EOF:\n throw new PHP_Depend_Parser_TokenStreamEndException($this->tokenizer);\n }\n throw new PHP_Depend_Parser_UnexpectedTokenException(\n $this->tokenizer->next(),\n $this->tokenizer->getSourceFile()\n );\n }", "public function get_function($function_name, array $args = array())\n\t{\n\t\tif (isset($this->functions[$function_name]))\n\t\t{\n\t\t\tif (count($args))\n\t\t\t{\n\t\t\t\treturn call_user_func_array($this->functions[$function_name], $args);\n\t\t\t}\n\n\t\t\treturn $this->functions[$function_name];\n\t\t}\n\t\treturn null;\n\t}", "public function getValueFuncs()\n\t{\n\t\t$this->context = null;\n\t\t\n\t\treturn $this->valueFuncs;\n\t}", "function GetRJSfp( $function ) {\r\n $name = $this->_params['id'];\r\n $type = $this->_type;\r\n $needfkl = $this->_needfkl;\r\n\t\t$function = $this->_prefix . '_' . $this->_type . '_' .$function;\r\n return \"xajax_ZariliaControlHandler('$name','$type','$function',$needfkl\";\r\n }", "#[Pure]\n public function getAction() : Closure | string\n {\n return $this->action;\n }", "public function getFunctions()\n {\n if (!$this->extensionInitialized) {\n $this->initExtensions();\n }\n return $this->functions;\n }", "public function callableMethod()\n {\n return 'value';\n }", "public function setFunction($function)\n {\n $this->function = (string)$function;\n return $this;\n }", "public function getCallback()\n\t{\n\t\treturn $this->callback;\n\t}", "public function getCallback()\n\t{\n\t\treturn $this->callback;\n\t}", "public function getFunctions()\n {\n return array();\n }", "public static function getFunctionList()\n {\n return ['onePageFunction'];\n }", "public function get_callable() {\n\t\t$callable = null;\n\n\t\t// Handles the type of reference.\n\t\tif ( $this->is_class_reference() ) { // Class reference.\n\n\t\t\t// Handles whether the reference has a method.\n\t\t\tif ( $this->has_class_method() ) { // Has a method.\n\t\t\t\t$class_method_reflector = $this->get_class_method_reflector();\n\n\t\t\t\t// Handle the types of method.\n\t\t\t\tif ( $class_method_reflector->isStatic() ) { // Static method.\n\t\t\t\t\t$callable = array( $this->get_class(), $this->get_class_method() );\n\t\t\t\t} else { // Non-static method.\n\t\t\t\t\t$callable = array( $this->get_class_instance(), $this->get_class_method() );\n\t\t\t\t}\n\t\t\t} else { // Doesn't have a method.\n\t\t\t\t$callable = $this->get_class_instance();\n\t\t\t}\n\t\t} elseif ( $this->is_function_reference() ) { // Function reference.\n\t\t\t$callable = $this->get_function();\n\t\t}\n\t\treturn $callable;\n\t}", "public function get($pattern, $func)\n {\n return $this->match(strtoupper(__FUNCTION__), $pattern, $func);\n }", "public function getGet ();", "public function hasFunctionName(){\n return $this->_has(1);\n }", "public function getFunction($name)\n {\n if (!$this->extensionInitialized) {\n $this->initExtensions();\n }\n if (isset($this->functions[$name])) {\n return $this->functions[$name];\n }\n foreach ($this->functions as $pattern => $function) {\n $pattern = str_replace('\\\\*', '(.*?)', preg_quote($pattern, '#'), $count);\n if ($count) {\n if (preg_match('#^'.$pattern.'$#', $name, $matches)) {\n array_shift($matches);\n $function->setArguments($matches);\n return $function;\n }\n }\n }\n foreach ($this->functionCallbacks as $callback) {\n if (false !== $function = call_user_func($callback, $name)) {\n return $function;\n }\n }\n return false;\n }", "function thisIsAFunction(){\n echo 'Test';\n}", "function setFunction(string $function)\n {\n $this->function = $function;\n return $this;\n }", "function image_read_function ( $type ) {\r\n\t\tglobal $IMAGE_TYPE_READFUNCTION;\r\n\t\tif ( empty($IMAGE_TYPE_READFUNCTION[$type]) )\r\n\t\t\treturn false;\r\n\t\treturn $IMAGE_TYPE_READFUNCTION[$type];\r\n\t}", "public function functionIsPossible($function)\n {\n $function = mb_strtolower((string) $function);\n\n if (($is = &$this->staticKey(__FUNCTION__, $function)) !== null) {\n return $is; // Already cached this.\n }\n if (($disabled_functions = &$this->staticKey(__FUNCTION__.'_disabled_functions')) === null) {\n $disabled_functions = []; // Initialize disabled/blacklisted functions.\n\n if (($disable_functions = trim(ini_get('disable_functions')))) {\n $disabled_functions = array_merge($disabled_functions, preg_split('/[\\s;,]+/', mb_strtolower($disable_functions), -1, PREG_SPLIT_NO_EMPTY));\n }\n if (($blacklist_functions = trim(ini_get('suhosin.executor.func.blacklist')))) {\n $disabled_functions = array_merge($disabled_functions, preg_split('/[\\s;,]+/', mb_strtolower($blacklist_functions), -1, PREG_SPLIT_NO_EMPTY));\n }\n if (($opcache_restrict_api = trim(ini_get('opcache.restrict_api'))) && mb_stripos(__FILE__, $opcache_restrict_api) !== 0) {\n $disabled_functions = array_merge($disabled_functions, ['opcache_compile_file', 'opcache_get_configuration', 'opcache_get_status', 'opcache_invalidate', 'opcache_is_script_cached', 'opcache_reset']);\n }\n if (filter_var(ini_get('suhosin.executor.disable_eval'), FILTER_VALIDATE_BOOLEAN)) {\n $disabled_functions = array_merge($disabled_functions, ['eval']);\n }\n }\n if ($disabled_functions && in_array($function, $disabled_functions, true)) {\n return $is = false; // Not possible.\n } elseif ((!function_exists($function) || !is_callable($function)) && !in_array($function, $this->php_constructs, true)) {\n return $is = false; // Not possible.\n }\n return $is = true;\n }", "protected function getFuncToMethod() {\r\n\t\t$class = $this->class;\r\n\t\t\r\n\t\tif (!isset(self::$classCache[$class])) {\r\n\t\t\t$reflClass = new \\ReflectionClass($class);\r\n\t\t\t$methods = [];\r\n\t\t\t\r\n\t\t\t/* @var $reflMethod \\ReflectionMethod */\r\n\t\t\tforeach ($reflClass->getMethods() as $reflMethod) {\r\n\t\t\t\t$methodName = $reflMethod->name;\r\n\t\t\t\t$functionName = strtolower(preg_replace('/[A-Z]/', '_$0', $methodName));\r\n\t\t\t\t\r\n\t\t\t\tif (!$reflMethod->isStatic() && ($reflMethod->isPublic() || $reflMethod->isProtected()) && strpos($methodName, '__') !== 0) {\r\n\t\t\t\t\t$methods[$functionName] = $methodName;\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tself::$classCache[$class] = $methods;\r\n\t\t}\t\r\n\t\t\r\n\t\treturn self::$classCache[$class];\r\n\t}", "private function fn(): callable {\n\t\treturn function (mixed $expression): string { return $expression; };\n\t}", "public function getMethodName();", "public function getMethodName();", "public function getMethodName();", "public static function getActionFunction()\n\t{\n\t\t$params = self::getAllURLParams();\n\t\t$pos = contrlPos + 1;\n\t\treturn (!empty($params[$pos])) ? $params[$pos] : 'index';\n\t}", "function do_sth_function_name(){\r\n }", "public function GetMethod ();", "public static function get(): string;", "function getCallback()\n {\n return $this->callback;\n }", "public function functions() {\n foreach ( $this->soap->__getFunctions() as $f ) {\n $fname = explode( ' ', $f );\n $functions[] = substr( $fname[0], 0, ( strlen( $fname[0] ) - 8 ) );\n }\n\n return $functions;\n }", "public function getCallback(): ?callable;", "public function loadDetailFunction($id = NULL)\n {\n \t$select = $this->select();\n \t$select->setIntegrityCheck(false);\n \t$select->from('function', array('function_id', 'name'));\n \tif ($id!=''):\n \t\t$select->where('function_id = ?', $id);\n \tendif;\n \t$stmt = $select->query();\n \t$result = $stmt->fetchObject();\n \treturn $result;\n \t \n }", "public function getFunctions() {\n return $this->wsdlFunctions;\n }", "public function getGroupfunction()\n\t\t{\n\t\t\treturn $this->hasOne(Groupfunction::className(), ['GF_ID' => 'GF_ID']);\n\t\t}", "public static function getTransferFunc(\\ElggEntity $entity) {\n\t\t$type = $entity->type . ':' . $entity->getSubtype();\n\t\treturn elgg_trigger_plugin_hook('ufcoe_ownership:get_transfer_func', $type, null, false);\n\t}", "function value($value)\n {\n\t\treturn $value instanceof Closure ? $value() : $value;\n }", "public function get_calling_function() {\n\n\t // retrieve caller\n\t $caller = debug_backtrace();\n\t $caller = $caller[2];\n\n\t $r = \"\";\n\t if (isset($caller['class'])) {\n\t \t// beautify logging stack trace\n\t $r .= $caller['class'] . \"::\" . $caller['function'] . '()';\n\t }\n\t return $r;\n\t}", "public function get_method()\n {\n }", "public function getCallback()\n {\n return $this->callback;\n }" ]
[ "0.78328705", "0.76613057", "0.76224893", "0.7355767", "0.72721386", "0.6809612", "0.6611159", "0.6582198", "0.64641607", "0.64530593", "0.63695586", "0.6224276", "0.61575615", "0.60599864", "0.60423875", "0.60411346", "0.60069203", "0.60028934", "0.5961104", "0.5947958", "0.59347236", "0.5716664", "0.57034606", "0.5691299", "0.5669604", "0.56389195", "0.5593125", "0.5580733", "0.55661845", "0.5556004", "0.5548053", "0.5536476", "0.5515378", "0.5514407", "0.54945356", "0.5488797", "0.5488368", "0.54815567", "0.5471323", "0.54545826", "0.54480153", "0.5397666", "0.5396615", "0.53760284", "0.5355022", "0.53374815", "0.53204215", "0.5305921", "0.52917695", "0.5286022", "0.5284523", "0.52748156", "0.5255025", "0.5254431", "0.52543235", "0.5253999", "0.5248806", "0.5247502", "0.52443576", "0.5242332", "0.52389646", "0.5215716", "0.5195218", "0.51841", "0.51790845", "0.5172339", "0.5170701", "0.5168318", "0.5168318", "0.51637554", "0.51610327", "0.5153172", "0.5140747", "0.5137196", "0.5129546", "0.5108801", "0.51085883", "0.5095792", "0.50929093", "0.5091835", "0.50891155", "0.5074148", "0.50620437", "0.50620437", "0.50620437", "0.50618225", "0.50595856", "0.5049177", "0.50480425", "0.50474495", "0.5040812", "0.5040689", "0.50381565", "0.5017944", "0.50152135", "0.50074977", "0.49973097", "0.49930787", "0.4987661", "0.4987533" ]
0.7290674
4
Get a list of available room at the designated date time
public function getAvailable($date, $area=3, $cover=1, $limit=50) { $limit = ($limit <= 50) ? $limit : 50; $this->validateDate($date); $data = Parser::parseArea($this->bAuth_user, $this->bAuth_pass, $date, $area); // flatten it $timeslots = []; foreach($data['rooms'] as $room) { foreach($room['timeslots'] as $t) { $t['room'] = $room['room']; $timeslots[] = $t; } } $timeslots = array_slice($timeslots, 0, $limit); $rtn = [ 'area' => $area, 'date' => $date, 'cover' => $cover, 'limit' => $limit, 'timeslots' => $timeslots ]; return $rtn; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAvailableRooms()\n {\n $scheduleRepository = $this->getRepository('schedule');\n $time = $this->getCustomParam('time');\n $date = $this->getCustomParam('date');\n\n $rooms = $scheduleRepository->getAvailableRooms($date, $time);\n\n // set object to array in order to get it working with js\n $tmp = [];\n foreach ($rooms as $room) {\n $tmp[] = $room->toArray($room);\n }\n $data = array('rooms' => $tmp);\n\n return $this->application->json($data);\n }", "function get_avaliable_rooms($fromTime, $toTime){\n global $DB, $USER, $CFG;\n\n //reservation starts: Start = S, End = E\n //Location: Above Given Start Time : A, Between given start/end: M, After End Time: E\n\n //Cases:\n //SA EA, --(start above, end above) non useful\n //SA EM, --(start above, end mid)\n //SA EE, -- (Start above, end after)\n //SM EA -- (start mid, end above) -- no useful\n //SM EM -- start mid, end mid\n //SM EE -- start mid, end after\n //SE EA -- non useful\n //SE EM -- non useful\n //SE EE -- non useful\n\n\n $sql = \"SELECT DISTINCT * FROM {roomscheduler_rooms} room \".\n\"WHERE room.active = 1 AND room.id not in ( \". //check which rooms are not avaliable\n\"SELECT DISTINCT rom.id FROM {roomscheduler_reservations} res, {roomscheduler_rooms} rom \".\n\"WHERE rom.id = res.location AND res.active=1 AND ( \".\n\"(res.startdate <= $fromTime AND res.enddate <= $toTime and res.enddate > $fromTime ) OR \". //--(start above, end mid)\n\"(res.startdate <= $fromTime AND res.enddate > $toTime ) OR \". //-- (Start above, end after)\n\"(res.startdate >= $fromTime AND res.startdate < $toTime and res.enddate > $fromTime AND res.enddate <= $toTime ) OR \". //-- start mid, end mid\n\"(res.startdate >= $fromTime AND res.startdate < $toTime AND res.enddate > $toTime )) \".//-- start mid, end after\n\");\";\n\n$rooms = $DB->get_records_sql($sql, array(), $limitfrom=0, $limitnum=0);\n\n\nprint '<center><table id=\"open_rooms_table\">';\nprint '<tr><th>'.get_string('room','block_roomscheduler');\nprint '</th><th>'.get_string('resources','block_roomscheduler');\nprint '</th><th>'.get_string('bookroom','block_roomscheduler').'</th></tr>';\nif($rooms){\n$index = 1;\nforeach($rooms as $room){\n\nprint '<tr onclick=\"\"><td>';\n\nprint \"$index. \".$room->name;\n\nprint '</td><td>';\nprint $room->resources;\nprint '</td><td>';\n\nprint '<form><center>';\nif($room->reservable){\nprint '<input type=\"image\" src=\"img/success.gif\" value=\"Book Room\" onclick=\"book_room('.$room->id.');return false;\" />';\n} else {\n$email = $CFG->roomscheduler_manage_email;\n$subject = get_string('book_room_email_subject','block_roomscheduler');\n\n$information = get_string('email_room','block_roomscheduler').\" \".$room->name . \"%0A\";\n$information .= get_string('email_start','block_roomscheduler').\" \".date( 'F n, Y @ G:i' , $fromTime ). \"%0A\";\n$information .= get_string('email_end','block_roomscheduler').\" \".date( 'F n, Y @ G:i' , $toTime ). \"%0A\";\n$information .= get_string('email_reason','block_roomscheduler').\" _______________________________%0A%0A\";\n\n$body = get_string('book_room_email_body','block_roomscheduler') . $information;\n$body .= get_string('book_room_email_close','block_roomscheduler') . $USER->firstname .\" \".$USER->lastname ;\n\n\nprint '<a href=\"mailto:'.$email.'?subject='.$subject.'&body='.$body.'\" border=\"0\">\n <img src=\"img/email.png\"></a>';\n\n}\nprint '</form></center>';\nprint '</td></tr>';\n\n\n\n\n $index++;\n}\n}\nprint '</table></center>';\n\n}", "public function getAllMeetingRooms() {\n $sql = 'SELECT * FROM ces_meeting_rooms WHERE status = \"L\"';\n \n $stmt = $this->conn->prepare($sql);\n $stmt->execute();\n \n return $stmt->fetchAll();\n }", "function get_room_current_availability($room_id)\n{\n\t$rooms = load_rooms(null,array('id'=>$room_id));\n\n\tforeach($rooms as $room)\n\t\tbreak;\n\n\t$room->max_gap->start_time = 0;\n\t$room->max_gap->end_time = 0;\n\n\tfor($section=1;$section<=$room->max_simultaneous_reservations;$section++)\n\t{\n\t\t// check for current/upcoming reservations for this room\n\t\t$upcoming_reservations = load_reservations(array('room_id'=>$room_id,'room_section'=>$section,'sched_end_time gte'=>date(\"Y-m-d H:i:s\"),'status'=>array(\"Scheduled\",\"Checked Out\"),'active'=>'1','limit'=>'1'));\n\t\tunset($next_reservation);\n\t\tforeach($upcoming_reservations as $next_reservation)\n\t\t\tbreak;\n\n\t\t// print(\"next res:\\n\");\n\t\t// pr($next_reservation);\n\n\t\t// check to see if any of the keys are checked out for this room\n\t\tforeach($room->keys as $key)\n\t\t{\n\t\t\tif(!strcmp($key->status,'Checked Out'))\n\t\t\t{\n\t\t\t\t// room section is checked out\n\n\t\t\t\t// load reservation\n\t\t\t\t$current_checkout = load_reservations(array('room_id'=>$room_id,'room_section'=>$section,'status'=>'Checked Out','key_barcode'=>$key->key_barcode,'active'=>'1','limit'=>'1'));\n\n\t\t\t\tif(strtotime($current_checkout->sched_end_time) >= strtotime('now'))\n\t\t\t\t{\n\t\t\t\t\t// checkout is not overdue, so it is not available for others\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif(strcmp($next_reservation->sched_start_time,'') && strtotime($next_reservation->sched_start_time) < strtotime('now'))\n\t\t{\n\t\t\t// there is a reservation scheduled for now\n\t\t\tcontinue;\n\t\t}\n\n\t\t// room section has some availability right now\n\t\t$current_minute = date('i');\n\t\tif($current_minute < 30)\n\t\t\t$current_minute = \"00\";\n\t\telse\n\t\t\t$current_minute = \"30\";\n\t\t$start_time = date(\"Y-m-d H:\".$current_minute.\":00\");\n\n\t\t// TODO: HACK: change on the fly reservations to start at the next unit of precision, rather than the previous\n\t\t$start_time = date(\"Y-m-d H:i:s\",strtotime(\"+\".RES_PRECISION.\" minutes\",strtotime($start_time)));\n\n\t\tif(strcmp($next_reservation->sched_start_time,''))\n\t\t{\n\t\t\tif(strtotime($start_time) + (DEFAULT_MAX_RES_LEN)*60 > strtotime($next_reservation->sched_start_time))\n\t\t\t{\n\t\t\t\t$end_time = $next_reservation->sched_start_time;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$end_time = date(\"Y-m-d H:i:s\",strtotime(\"+ \".DEFAULT_MAX_RES_LEN.\" minutes\",strtotime($start_time)));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$end_time = date(\"Y-m-d H:i:s\",strtotime(\"+ \".DEFAULT_MAX_RES_LEN.\" minutes\",strtotime($start_time)));\n\t\t}\n\n\t\t// if this is the biggest gap, update max gap\n\t\tif(strtotime($end_time) - strtotime($start_time) > strtotime($room->max_gap->end_time) - strtotime($room->max_gap->start_time))\n\t\t{\n\t\t\t$room->max_gap->room_section = $section;\n\t\t\t$room->max_gap->start_time = $start_time;\n\t\t\t$room->max_gap->end_time = $end_time;\n\t\t}\n\t}\n\n\treturn($room);\n}", "public function listRooms()\n\t{\n\t\treturn $this->execute('roomlist', 'roomlist');\n\t}", "public function get_todays_available_slots()\n {\n return $this->db\n ->select([\n 'availability.*',\n 'appointments.doctor_id',\n 'appointments.patient_id',\n 'appointments.availability_id',\n 'appointments.status',\n 'users.first_name',\n 'users.last_name'\n ])\n ->join('users', 'users.id = availability.user_id', 'left')\n ->join('appointments', 'appointments.availability_id = availability.id', 'left')\n ->get_where('availability', [\n 'date' => date('Y-m-d'),\n 'availability_id' => NULL\n ]);\n }", "public function get_rooms()\n\t\t{\n\t\t\t$this->db->where(\"room_active\",1);\n\t\t\t$rooms = $this->db->get(\"rooms\");\n\t\t\treturn $rooms;\n\t\t}", "function getRoomsAvailable(){\n\n global $db;\n\n $stmt= $db->prepare('SELECT room_id,branch\n FROM (\n SELECT room_id,\n room_branch AS branch\n FROM room\n WHERE NOT EXISTS (\n SELECT employee_room_id\n FROM employee\n WHERE employee_room_id = room_id\n )\n )');\n\n $stmt->execute();\n return $stmt->fetchAll();\n \n }", "public function actionGetAvailableTime()\n {\n if (empty($_GET['doctorId'])) {\n $this->errorResponse('Not all parameters provided (doctorId)');\n }\n\n if (empty($_GET['date'])) {\n $this->errorResponse('Not all parameters provided (date)');\n }\n\n $doctorId = $_GET['doctorId'];\n\n $dateStr = $_GET['date'];\n\n if (!DateTime::createFromFormat('Y-m-d', $dateStr)) {\n $this->errorResponse('Date invalid format');\n }\n\n $startDay = DateTime::createFromFormat('Y-m-d H:i:s', (new DateTime($dateStr))->format('Y-m-d 00:00:00'))->getTimestamp();\n $endDay = DateTime::createFromFormat('Y-m-d H:i:s', (new DateTime($dateStr))->format('Y-m-d 23:59:59'))->getTimestamp();\n\n $doctor = Doctor::model()->find()->where('code', '=', $doctorId)->execute();\n if ($doctor == null) {\n $this->errorResponse(\"Doctor with ID $doctorId not found\");\n }\n\n if (count($doctor->sessionsInfo) == 0) {\n $this->successResponse(array());\n }\n\n $sessions = SessionsInfo::findSessionsInPeriod($startDay, $endDay, $doctor);\n\n $result = [];\n\n foreach ($sessions as $session) {\n\n $begin = max($startDay, (int)$session->startTime);\n $end = min($endDay, (int)$session->endTime);\n\n $visits = $session->getVisits($begin, $end);\n $counter = 0;\n\n while ($begin < $end) {\n\n $interval = null;\n\n if ($counter == count($visits)) {\n\n //this is last interval\n $interval = [\n 'begin' => $begin,\n 'end' => $end,\n 'beginISO' => date('Y-m-d H:i:s', $begin),\n 'endISO' => date('Y-m-d H:i:s', $end),\n ];\n\n $begin = $end;\n\n } else {\n\n $visit = $visits[$counter];\n $startVisit = (int)$visit->startTime;\n $endVisit = (int)$visit->endTime;\n\n if ($startVisit != $begin && $begin < $startVisit) {\n\n $interval = [\n 'begin' => $begin,\n 'end' => $startVisit,\n 'beginISO' => date('Y-m-d H:i:s', $begin),\n 'endISO' => date('Y-m-d H:i:s', $startVisit),\n ];\n }\n\n $begin = $endVisit;\n $counter++;\n }\n\n if ($interval) {\n $result[] = $interval;\n }\n }\n }\n\n $this->successResponse($result);\n }", "public static function availabilityRoom($data)\n {\n $response = self::send('apartamentos/listar_disponibles/'.$data['reserva_id'], [],2);\n\n return $response;\n }", "function rooms_get()\n {\n // // Authenticate user (by session)\n // // Check if a user is currently logged in\n if(!$this->session->userdata('LoggedIn')){\n die(\"Login Required\");\n }\n \n // Load the device model\n $this->load->model('device_model');\n\n if($this->get('id')){\n $roomList = $this->device_model->getAvailableRooms($this->get('id'));\n }else{\n $roomList = $this->device_model->getAvailableRooms();\n }\n\n // If the deviceList is not FALSE or NULL\n if($roomList){\n $this->response($roomList, 200); // 200 being the HTTP response code\n }else{\n $this->response(NULL, 404);\n }\n }", "public function getMeetings($room_id)\n {\n $this->validate(request(), [\n 'before'=>'date_format:Y-m-d H:i',\n 'after'=>'date_format:Y-m-d H:i',\n ]);\n $room = Room::where('id', $room_id)->get();\n if(is_null($room)){\n return response()->json([\"message\"=>\"Room does not exist.\"], 404);\n }\n $meetings = Meeting::where('room_id', $room_id);\n if(request()->has('before'))\n {\n $meetings->where('end_time', '<', request()->get('before'));\n }\n\n if(request()->has('after'))\n {\n $meetings->where('start_time', '>', request()->get('after'));\n }\n\n return response()->json(array(\"meetings\"=>$meetings->get()));\n }", "public function getFreeRoomsByCheckInAndCheckOut() {\n $check_in = Request::input('check_in', '');\n $check_out = Request::input('check_out', '');\n\n if($check_in && $check_out && (strtotime($check_in) < strtotime($check_out))) {\n $posible_rooms_id = Room::getFreeRoomsIdsByDates($check_in, $check_out);\n $results = array();\n $queries = Room::whereIn('id', $posible_rooms_id)->get();\n foreach ($queries as $query) {\n if (count($query->distributions))\n $results[] = ['id' => $query->id,\n 'value' => $query->name];\n }\n return response()->json($results);\n }\n }", "public static function is_reservtion_possible(DateTime $date1, DateTime $date2, Room $room_for_check){\r\n if ($date1>$date2) return false;\r\n \r\n $unavailable_dates = (new self)->all_unavailable_dates($room_for_check);\r\n// var_dump($unavailable_dates); \r\n $unav_dates_between = array();\r\n foreach($unavailable_dates as $the_date){\r\n if (self::is_date_greater($the_date, $date1) && self::is_date_greater($date2, $the_date)){\r\n $unav_dates_between[] = $the_date;\r\n// var_dump($the_date);\r\n break;\r\n \r\n }\r\n }\r\n// var_dump($unav_dates_between);\r\n return empty($unav_dates_between);\r\n}", "public function get_rooms_of_teachers(\n\t\t \t\t\t\t\t\t\t\t $res_room_code=NULL,\n\t\t\t\t\t\t\t\t\t\t $tm_row=NULL,\n\t\t\t\t\t\t\t\t\t\t $res_todate)\n\t\t{\n \t\t//\t$where = \" and res_todate = '\". date(\"Y-m-d\").\"'\";\n\t\t// if(!empty($res_todate))\n\t\t\t// $where = \" and res_todate = '\".date('Y-m-d',strtotime($res_todate)).\"'\";\n\t\t \n\t\t\t\t$where = \" and DATE_FORMAT(res_time_start,'%Y-%m-%d') = '\". date(\"Y-m-d\").\"'\";\n\t\t if(!empty($res_todate))\n\t\t\t $where = \" and DATE_FORMAT(res_time_start,'%Y-%m-%d') = '\".date('Y-m-d',strtotime($res_todate)).\"'\";\n\t \n \t\t\t$Oth_reservs = $this->db->query(\"select Distinct te_name from \n\t\t\t\t\t\t\t\t\t\t\t\t\t reservations , \n\t\t\t\t\t\t\t\t\t\t\t\t\t teachers\n \t\t\t where res_room_code = \".$res_room_code.\"\n\t\t\t\t\t\t\t and res_teach_code = te_code \n \t\t\t\t\t\t\t and DATE_FORMAT(res_time_start, '%H:%i') <= '\".$tm_row.\"'\n\t\t\t\t\t\t\t and DATE_FORMAT(res_time_end, '%H:%i') >= '\".$tm_row.\"' \".\n\t\t\t\t\t\t $where .\n \t\t\t\t\t\t\t \" order by res_code desc \")->result();\n \t\t\t //\t \n\t \n\t\t\treturn $Oth_reservs;\n\t\t}", "function getRooms(){\n\t\t$stmt = $this->connect->prepare(\"SELECT id,Name,RoomNo, Description from roominfo\");\n\t\t$stmt->execute();\n\t\t$stmt->bind_result($id, $name, $RoomNo, $Description);\n\t\t\n\t\t$rooms = array(); \n\t\t\n\t\twhile($stmt->fetch()){\n\t\t\t$room = array();\n\t\t\t$room['id'] = $id; \n\t\t\t$room['Name'] = $name; \n\t\t\t$room['RoomNo'] = $RoomNo; \n $room['Description'] = $Description; \n\t\t\tarray_push($rooms, $room); \n\t\t}\n\t\t\n\t\treturn $rooms; \n\t}", "public static function getRooms($hotel) {\n \t$table = new Room();\n \treturn $hotel->findDependentRowset(\"Room\", \"Hotel\", $table->select()->order(\"name ASC\"));\n }", "public function getAllRoom(){\n $query = \"select * from $this->rooms_tableName where 1\";\n $result = $this->dbh->query($query);\n if($result->rowCount() > 0){\n return $result->fetchAll();\n }\n return null;\n }", "public function roomList()\n\t{\n\t\techo json_encode($this->room_list->fetchData());\n\t}", "function get_amout_room($date_from,$date_end)\n {\n\t\t$sql1 = '\n\t\t SELECT \n\t\t\t\t\t\trs.id,\n\t\t\t\t\t\trs.change_price,\n\t\t\t\t\t\trr.tax_rate, \n\t\t\t\t\t\tservice_rate,\n\t\t\t\t\t\trs.in_date,\n\t\t\t\t\t\trr.arrival_time,\n rr.net_price,\n\t\t\t\t\t\trr.departure_time,\n\t\t\t\t\t\trr.price,\n\t\t\t\t\t\trs.status,\n\t\t\t\t\t\trr.id as reservation_room_id\n\t\t\t\t\tFROM \n\t\t\t\t\t\troom_status rs \n\t\t\t\t\t\tINNER JOIN reservation_room rr ON rr.id = rs.reservation_room_id \n\t\t\t\t\t\tINNER JOIN reservation r on rr.reservation_id = r.id\n\t\t\t\t\tWHERE \n\t\t\t\t\t\t(rs.status =\\'OCCUPIED\\' OR rs.status =\\'BOOKED\\')\n\t\t\t\t\t\tAND rs.in_date >= \\''.$date_from.'\\' \n\t\t\t\t\t\tAND rs.in_date <= \\''.$date_end.'\\' ';\n\t\t$room_totals = DB::fetch_all($sql1);\n\t\t// tinh tien phong su dung trong ngay\n\t\t$amount_room_days =array();\n\t\tforeach($room_totals as $key=>$value)\n {\n\t\t\t// tinh tien phong va phi dich phong thue cho tung phong rui cong thanh tog tien trong ngay\n\t\t\t$amount_room_days['id'] = $value['in_date'];\n\t\t\t$service_room = 0;\n\t\t\t$pay_room = 0;\n\t\t\t$tax_room = 0;\n\t\t\t$deposit_room = 0;\n\t\t\t$net=0;\n\t\t\t//if(($value['arrival_time'] != $value['departure_time'] \n// and $value['in_date'] < $value['departure_time'] and \n// ($value['status'] == 'OCCUPIED' ||$value['status'] == 'BOOKED')) \n// || ($value['arrival_time'] == $value['in_date']))\n if (1 == 1)\n {\n\t\t\t\t$service_room = ($value['change_price'] * $value['service_rate'])/100;\n\t\t\t\t// tien phong + dv 1 phong\n\t\t\t\t$pay_room = $value['change_price'] + $service_room ;\t\n\t\t\t\t// tinh tien thue cua 1 phong \n\t\t\t\t$tax_room = ($pay_room * $value['tax_rate'])/100;\t\n\t\t\t\t$net = $pay_room + $tax_room;\n\t\t\t}\n\t\t\t$room_totals[$key]['room_total'] = $net;// - $deposit_room;\n\t\t if (User::is_admin() and $value['in_date'] == '31-DEC-13' and $net > 0)\n {\n //echo System::display_number($net).'__'.$value['reservation_room_id'].'<br>';\n }\n\t\t\tif(!isset($amount_room_days[$value['in_date']]['amount_total']))\n {\n $amount_room_days[$value['in_date']]['count'] = 1; \n if ($net == 0)\n {\n $amount_room_days[$value['in_date']]['count'] = 0;\n }\n\t\t\t\t $amount_room_days[$value['in_date']]['amount_total'] = $room_totals[$key]['room_total'];\n\t\t\t}\n else\n {\n $amount_room_days[$value['in_date']]['count'] += 1;\n if ($net == 0)\n {\n $amount_room_days[$value['in_date']]['count'] -= 1;\n }\n\t\t\t\t $amount_room_days[$value['in_date']]['amount_total'] += $room_totals[$key]['room_total'];\n\t\t\t}\n\t\t}\n if (User::is_admin())\n {\n //System::debug($amount_room_days);\n }\n\t\treturn $amount_room_days;\n\t}", "public function show(Room $room, $id)\n {\n\n $year = date(\"Y\"); // Year 2010\n if ($id <= 9) {\n $week = \"0\" . $id;\n } else {\n $week = $id;\n };\n\n $date1 = date( \"Y-m-d\", strtotime($year.\"W\".$week.\"0\") ); // First day of week\n $date2 = date( \"Y-m-d\", strtotime($year.\"W\".$week.\"5\") ); // Last day of week\n // echo $date1 . \" - \" . $date2;\n\n $room_resavations = DB::table('reservations as r')\n ->join('rooms', 'id', '=', 'r.room_id')\n ->join('users as u', 'u.id', '=', 'r.rekv_id')\n ->select('rooms.id', 'rooms.type', 'r.res_date', 'r.res_module', 'u.id as uid', 'u.name')\n ->where('rooms.id', '=', $room->id)\n ->where('r.res_date', '>', $date1)\n ->where('r.res_date', '<', $date2)\n ->get();\n\n if (!$room_resavations->count()) {\n $room->{\"now_week\"} = $id;\n $room->{\"has_reservations\"} = false;\n $room->{\"week_start_date\"} = $date1;\n\n return view('room.show', compact('room'));\n } else {\n $room = $room_resavations;\n $room[0]->{\"now_week\"} = $id;\n $room[0]->{\"week_start_date\"} = $date1;\n $room[0]->{\"has_reservations\"} = true;\n\n return view('room.show', compact('room'));\n }\n }", "public function get_room_available (){\n\t\tif (!$this->input->is_ajax_request()) {\n\t\t\treturn;\n\t\t}\n\t\t$room_id = $this->input->post('room_id');\n\t\tif ($this->com_user['level'] == 2) {\n\t\t\t$this->load->model('students/m_students');\n\t\t\t$students = $this->m_students->get_detail($this->com_user['student_id']);\n\t\t\t$room_id = $students['room_id'];\n }\n\t\t$room_type_id = $this->input->post('room_type_id');\n\t\t$data = $this->m_rooms->get_room_available($room_type_id,$room_id);\n\t\t$this->output->set_output(json_encode($data));\n\t}", "public function openmeetings_getRoomTypes() {\n\t\t//global $CFG;\n\n\t\t$a_name=array();\n\t\t$a_id=array();\n\t\t$a_roomTypes=array();\n\t\t$restService = new openmeetings_rest_service();\n\n\t\t$call = $this->getUrl().\"/services/RoomService/getRoomTypes?SID=\".$this->session_id;\n\t\t$result = $restService->call($call,\"\");\n\t\tif ($this->b_logWrite == true) $GLOBALS['ilLog']->write(__METHOD__.': call: '.$call);\n\t\tif ($restService->getError()) {\n\t\t\techo '<h2>Fault : Rest Service Error</h2><pre>'; print_r($result); echo '</pre>';\n\t\t} else {\n\t\t\t$err = $restService->getError();\n\t\t\tif ($err) {\n\t\t\t\techo '<h2>Error</h2><pre>' . $err . '</pre>';\n\t\t\t} else {\n\t\t\t\t$dom = $result;\n\t\t\t\t$returnNodeList = $dom->getElementsByTagName(\"name\");\n\t\t\t\tforeach ($returnNodeList as $returnNode) {\n\t\t\t\t\tif ($returnNode->nodeValue != \"conference_room_type\") array_push($a_name,$returnNode->nodeValue);\n\t\t\t\t}\n\t\t\t\t$returnNodeList = $dom->getElementsByTagName(\"roomtypes_id\");\n\t\t\t\tforeach ($returnNodeList as $returnNode) {\n\t\t\t\t\tarray_push($a_id,$returnNode->nodeValue);\n\t\t\t\t}\n\t\t\t\tfor($i=0;$i<count($a_id);$i++) {\n\t\t\t\t\t$a_roomTypes[$i]=array( (string)$a_id[$i] => (string)$a_name[$i] );\n\t\t\t\t}\n\t\t\t\treturn $a_roomTypes;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "public function getRooms()\n {\n return $this->_rooms;\n }", "public function getAllRooms()\n {\n $db = PDOController::getInstance();\n $req = $db->prepare('SELECT roomtypes.name, rooms.id, rooms.name AS roomName, services.name AS serviceName\n FROM rooms JOIN roomtypes ON roomtypes.id= rooms.type_id\n JOIN services ON services.id=rooms.service_id');\n $req->execute([]);\n \n return $req->fetchAll();\n }", "public function getBusySchedules($date,$activity_type,$engineer_id)\n {\n $this->db->where('start_date',$date);\n if($activity_type!='')\n $this->db->where('activity_type', $activity_type); \n if($engineer_id!='')\n $this->db->where('engineer_id', $engineer_id); \n\n $query = $this->db->get('job');\n\n $busy_slots = array();\n\n foreach ($query->result() as $key => $book_detail)\n {\n $busy_slots[] = array(\n \"begin\"=>new DateTime($book_detail->start_time),\n \"end\"=>new DateTime($book_detail->end_time),\n \"engineer_id\"=>$book_detail->engineer_id,\n \"customer_id\"=>$book_detail->customer_id,\n \"req_id\"=>$book_detail->id,\n \"status\"=>$book_detail->status,\n );\n }\n return $busy_slots;\n }", "public function getTopRoomsForToday()\n {\n $result = array();\n \n $todayTopRooms = $this->_day->getTopRooms();\n \n foreach ($todayTopRooms as $room) {\n foreach ($this->getRooms() as $myRoom) {\n if ($room == $myRoom->getName()) {\n $result[] = $myRoom;\n }\n }\n }\n \n return $result;\n }", "public function getTodayBookingList()\n {\n return DB::table('bookings')\n ->leftJoin('users', 'users.id', '=', 'bookings.user_id')\n ->leftJoin('rooms', 'rooms.id', '=', 'bookings.room_id')\n ->whereBetween('booking_time', [\n date('Y-m-d 00:00:01'),\n date('Y-m-d 23:59:59')\n ])\n ->select(\n 'bookings.booking_time', 'bookings.total_person', 'bookings.noted',\n 'users.id as user_id', 'users.email', 'rooms.room_name'\n )\n ->get()\n ->toArray();\n }", "public function RoomsAvailablesSearchManger($start,$end,$max_person)\n\t\t{\n\t\t\t\t$sql = \"Select rooms.room_id, rooms.room_name,rooms.max_person,rooms.end_date\n\t\t\t\t\t\t\t\tFrom rooms\n\t\t\t\t\t\t\t\tWhere rooms.max_person >= '$max_person' AND rooms.room_id Not In (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSelect room_ids\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tFrom bookings\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tWhere booking_start_date <= '$end'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAnd DATE_ADD( booking_end_date, INTERVAL -1 DAY ) >= '$start'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\tOrder By rooms.room_id\";\n\t\t\t$query = $this->db->query($sql);\n\t\t\treturn $query->result_array();\n\n \t\t}", "public function hotelDetail($hotelID, Request $request)\n {\n $ratingTypes = RatingType::all();\n\n if($request->get('search') == 'room')\n {\n $hotel = Hotel::findOrfail($hotelID);\n\n $availableRoomType = RoomType::where('hotel_id', $hotelID)->get();\n $gallery = $hotel->images()->where('type','gallery')->get();\n $logo = $hotel->images()->where('type','logo')->get();\n $avg = number_format($hotel->roomTypes()->min('price'), 2);\n\n\n $checkIn = date('Y-m-d', strtotime($request->date_from));\n $checkOut = date('Y-m-d', strtotime($request->date_to));\n $adult = Input::get('num_of_adult');\n $child = Input::get('num_of_child');\n $totalRoom = Input::get('num_of_room');\n $diff = date_diff(date_create($request->date_from), date_create($request->date_to));\n $dayCount = $diff->format(\"%a\");\n $checkDay = ['checkIn' => $checkIn, 'checkOut' => $checkOut, 'adult' => $adult, 'child' => $child];\n $availableRooms=[];\n// $dates = array($checkIn);\n// while ($checkIn!= $checkOut) {\n// $checkIn = date('Y-m-d', strtotime($checkIn . ' +1 day'));\n// $dates[] = $checkIn;\n// $dayCount++;\n// }\n// echo $checkIn.' '.$checkOut;\n// $roomAvailableBaseOnDate = $hotel->rooms()->where('date_from','<=', $checkIn)->where('date_to', '>=', $checkOut)->where('total_available_room', '>=', $totalRoom)->get();\n $roomAvailableBaseOnDate = $hotel->rooms()->where('date_from','<=', $checkIn)->where('date_to', '>=', $checkOut)->get();\n\n// dd($roomAvailableBaseOnDate);\n $roomTypeStatus = null;\n if(! $roomAvailableBaseOnDate->isEmpty() )\n {\n\n foreach($roomAvailableBaseOnDate as $rooms) {\n\n $totalAvailableDay = $rooms->total_available_room;\n\n $roomTypes[$rooms->hotel_room_group_id] = $rooms->roomType()->where('adult_allowed', '>=', $adult)->where('child_allowed', '>=', $child)->get();\n // echo $roomTypes[$rooms->hotel_room_group_id];\n foreach($roomTypes[$rooms->hotel_room_group_id] as $roomType)\n {\n\n $booking = $roomType->booking()\n ->whereBetween('date_from', [$checkIn, $checkOut])\n ->orWhere(function($query)\n {\n $checkIn = date(\"Y-m-d\", strtotime(Input::get('date_from')));\n $checkOut = date(\"Y-m-d\", strtotime(Input::get('date_to')));\n $query->whereBetween('date_to', [$checkIn, $checkOut])\n ->orWhere(function($query){\n $checkIn = date(\"Y-m-d\", strtotime(Input::get('date_from')));\n $checkOut = date(\"Y-m-d\", strtotime(Input::get('date_to')));\n $query->where('date_from','>', $checkIn)\n ->where('date_to','<', $checkOut);\n });\n\n })->get();\n if($booking->count() < $totalAvailableDay )\n {\n /* Set Available room price info */\n $roomTypeStatus[$rooms->hotel_room_group_id] = 't';\n $roomTypePrice[$rooms->hotel_room_group_id] = $rooms->price_per_room ;\n $availableRooms[] = $rooms->hotel_room_group_id;\n// $roomTypeStatus = array_add($roomTypeStatus, $rooms->hotel_room_group_id, 't' );\n }\n\n }\n\n\n }\n// dd($availableRooms);\n $unavailableRooms = $hotel->roomTypes()->whereNotIn('id', $availableRooms)->get();\n foreach($unavailableRooms as $unavailableRoom) {\n $roomTypeStatus[$unavailableRoom->id] = 'f';\n }\n\n }else\n {\n $unavailableRooms = $hotel->roomTypes()->whereNotIn('id', $availableRooms)->get();\n foreach($unavailableRooms as $unavailableRoom) {\n $roomTypeStatus[$unavailableRoom->id] = 'f';\n }\n }\n /**\n * similar hotel listings\n */\n $similar_hotels = Hotel::where('status', 1)->where('city', '=', $hotel->city)->where('id', '!=', $hotel->id)->Limit(3)->get();\n return view('hotels.template.hotel-detail', compact('hotel', 'roomTypeStatus', 'availableRoomType', 'gallery', 'logo', 'galleryThumb', 'avg', 'roomTypePrice', 'dayCount', 'totalRoom', 'checkDay', 'similar_hotels', 'ratingTypes'));\n }else\n {\n $hotel = Hotel::findOrfail($hotelID);\n // $roomAvailable = [];\n $availableRoomType = RoomType::where('hotel_id', $hotelID)->get();\n $gallery = $hotel->images()->where('type','gallery')->get();\n $logo = $hotel->images()->where('type','logo')->get();\n $avg = number_format($hotel->roomTypes()->min('price'), 2);\n foreach($availableRoomType as $roomType) {\n $roomTypeStatus[$roomType->id] = 'n';\n }\n /**\n * similar hotel listings\n */\n $similar_hotels = Hotel::where('status', 1)->where('city', '=', $hotel->city)->where('id', '!=', $hotel->id)->Limit(3)->get();\n\n return view('hotels.template.hotel-detail', compact('hotel', 'roomTypeStatus', 'availableRoomType', 'gallery', 'logo', 'galleryThumb', 'avg', 'similar_hotels', 'ratingTypes'));\n }\n }", "function get_reservation_byTime($room, $atTime) {\n global $DB;\n$records = $DB->get_records_select('roomscheduler_reservations', 'location=\\'' . $room . '\\' AND active=\\'1\\' AND startdate<=\\'' . $atTime . '\\' AND enddate>\\'' . $atTime . '\\'',$params=null, $sort='', $fields='*', $limitfrom=0, $limitnum=0);\n\nif(is_array($records)){\n return end($records);\n}\n \n return NULL;\n}", "public function roomsByHotelId(Request $request){\n \n $h_id=$request->h_id;\n $drop_id=$request->drop_id;\n $s_date=$request->s_date;\n $e_date=$request->e_date;\n $sdate=date_create($request->s_date );\n $start_date=date_format($sdate,\"m/d/Y\");\n \n\n $edate=date_create($request->e_date );\n $end_date=date_format($edate,\"m/d/Y\");\n \n \n $search=$request->search;\n $common_type=$request->c_type;\n\n $cities=City::whereNull('parent_id')->get();\n $h=Company::find($h_id);\n\n $rooms=Room::whereDoesntHave('hotelBookings',function($q) use ($start_date,$end_date){\n $q->whereDate('check_in','>=',$start_date)\n ->whereDate('check_out','<=',$end_date);\n })->where('company_id',$h->id)->with(['facilities','type'])->get();\n \n \n \n\n $facilities = Facility::whereHas('rooms', function($q) use($h_id) {\n $q->where('company_id', $h_id);\n })\n ->get();\n\n $data=collect($facilities);\n $popular_facilities=$data->groupBy('fcategory.name')->toArray();\n \n\n \n \n\n \n return view('frontend.hotel_rooms_list',compact('cities','h','popular_facilities','rooms','drop_id','s_date','e_date'));\n }", "function getAvailableSlotByCase_managerByDate($date, $case_manager) {\n $weekday = strftime(\"%A\", $date);\n\n $this->db->where('date', $date);\n $this->db->where('case_manager', $case_manager);\n $holiday = $this->db->get('holidays')->result();\n\n if (empty($holiday)) {\n $this->db->where('date', $date);\n $this->db->where('case_manager', $case_manager);\n $query = $this->db->get('patient_care')->result();\n\n\n $this->db->where('case_manager', $case_manager);\n $this->db->where('weekday', $weekday);\n $this->db->order_by('s_time_key', 'asc');\n $query1 = $this->db->get('time_slot')->result();\n\n $availabletimeSlot = array();\n $bookedTimeSlot = array();\n\n foreach ($query1 as $timeslot) {\n $availabletimeSlot[] = $timeslot->s_time . ' To ' . $timeslot->e_time;\n }\n foreach ($query as $bookedTime) {\n if ($bookedTime->status != 'Cancelled') {\n $bookedTimeSlot[] = $bookedTime->time_slot;\n }\n }\n\n $availableSlot = array_diff($availabletimeSlot, $bookedTimeSlot);\n } else {\n $availableSlot = array();\n }\n\n return $availableSlot;\n }", "public function reservationsArray(){\n\t\t$reponse = new Reponse();\n\t\t$date=new Zend_Date();\n\t\t$dateres=$date->get('dd-MM-YYYY');\n\t\t$datestart=new Zend_Date( $dateres.' 00:00:00', 'dd-MM-YYYY HH:mm:ss');\n\t\t$dateend=new Zend_Date( $dateres.' 23:59:59', 'dd-MM-YYYY HH:mm:ss');\n\t\t$start=$datestart->getTimestamp();\n\t\t$end=$dateend->getTimestamp();\n\n\t\t$mylocation = $this->selectedLocation;\n\t\tif( $mylocation instanceof Object_Location ){\n\t\t\t$this->view->reservations= $mylocation->getResource()->getReservationsByDate($start,$end);\n\t\t}\n\t}", "public function rooms(Request $request){\n\n if (!($request->floor && $request->block && $request->department)) {\n $html = '<option value=\"\">Select Room</option>';\n }\n\n else {\n $html = '<option value=\"\">Select Room</option>';\n $rooms = LocationInfo::where('block', $request->block)\n ->where('department', $request->department)\n ->where('floor', $request->floor)\n ->distinct()\n ->pluck('room');\n\n foreach ($rooms as $room) {\n $html .= '<option value=\"'.$room.'\">'.$room.'</option>';\n }\n }\n\n return response()->json(['html' => $html]);\n }", "public function showRooms()\n {\n $roomModel = new \\BAServer\\Models\\Room();\n $rooms = $roomModel->getRooms();\n\n var_dump($rooms);\n return 'Rooms';\n }", "public function run()\n {\n $rooms = [\n [\n 'id' => 1,\n 'room_name' => 'VIP Room',\n 'total_bed' => '1',\n 'bed_used' => '0',\n 'status' => 'Available',\n 'cost' => 10000000,\n 'created_at' => '2021-01-24 14:00:11',\n 'updated_at' => '2021-01-24 14:00:11',\n ],\n [\n 'id' => 2,\n 'room_name' => 'Platinum Room',\n 'total_bed' => '5',\n 'bed_used' => '0',\n 'status' => 'Available',\n 'cost' => 8000000,\n 'created_at' => '2021-01-24 14:00:11',\n 'updated_at' => '2021-01-24 14:00:11',\n ],\n [\n 'id' => 3,\n 'room_name' => 'Gold Room',\n 'total_bed' => '10',\n 'bed_used' => '10',\n 'status' => 'Not Available',\n 'cost' => 5000000,\n 'created_at' => '2021-01-24 14:00:11',\n 'updated_at' => '2021-01-24 14:00:11',\n ],\n [\n 'id' => 4,\n 'room_name' => 'Silver Room',\n 'total_bed' => '15',\n 'bed_used' => '13',\n 'status' => 'Available',\n 'cost' => 3000000,\n 'created_at' => '2021-01-24 14:00:11',\n 'updated_at' => '2021-01-24 14:00:11',\n ],\n [\n 'id' => 5,\n 'room_name' => 'Regular Room',\n 'total_bed' => '20',\n 'bed_used' => '8',\n 'status' => 'Available',\n 'cost' => 1000000,\n 'created_at' => '2021-01-24 14:00:11',\n 'updated_at' => '2021-01-24 14:00:11',\n ],\n ];\n\n Room::insert($rooms);\n }", "function find_room1($date='',$pm_id = 0,$propertyroomid=0){\r\n\tglobal $db;\r\n\t$count =0;\r\n\tglobal $tblprefix;\r\n\t$new_date = date(\"m/d/Y\",strtotime($date));\r\n\t$qry_room = \"SELECT no_of_rooms FROM \".$tblprefix.\"advance_date WHERE pm_id=\".$pm_id.\" AND room_type_id=\".$propertyroomid.\" AND advance_date='\".$new_date.\"'\";\r\n \r\n $rs_room = $db->Execute($qry_room);\r\n return $rs_room->fields['no_of_rooms'];\r\n\r\n}", "function canBookRoom($startDate,$endDate,$roomID)\n {\n $result = \"TRUE\";\n $query = $this->db->query(\"SELECT * FROM bookings where roomID = $roomID\");\n if($query->num_rows()>0)\n {\n $bookings=$query->result_array();\n\n\n for ($i =0 ; $i < count($bookings); $i++)\n {\n $bookStartTime = $bookings[$i][\"startDate\"];\n $bookEndTime = $bookings[$i][\"endDate\"];\n\n if ($startDate >= $bookStartTime && $startDate <=$bookEndTime)\n {\n $result = \"FALSE\";\n return $result;\n }\n if ($endDate >= $bookStartTime && $endDate <= $bookEndTime)\n {\n $result = \"FALSE\";\n return $result;\n\n }\n }\n }\n return $result;\n\n }", "function check_availability($room, $fromTime, $toTime) {\n global $DB;\n\n //Case 1: startTime(new)->starttime(existing)->endTime(new)->endtime(existing)\n if ($reservation = get_reservation_byTime($room, $fromTime)) {\n\n return $reservation;\n\n }\n //Case 2: starttime(existing)->startTime(new)->endtime(existing)->endTime(new)\n else if ($reservation = get_reservation_byTime($room, $toTime - 600)) {\n \n return $reservation;\n }\n //Case 3: starttime(existing)->startTime(new)->endTime(new)->endtime(existing)\n //is a combination of case 1 and 2 and is therefore already taken care of\n //Case 4: startTime(new)->starttime(existing)->endtime(existing)->endTime(new)\n \n else if ($reservation = $DB->get_records_select('roomscheduler_reservations', 'location=\\'' . $room . '\\' AND active=\\'1\\' AND startdate>=\\'' . $fromTime . '\\' AND enddate<=\\'' . $toTime . '\\'',$params=null, $sort='', $fields='*', $limitfrom=0, $limitnum=1)) {\n\n if(is_array($reservation)){\n return end($reservation);\n}\n }\n //Case 5: no conflict\n else {\n return false;\n }\n}", "public function showRoomsList(){\r\n\t\t$hotel_id = $this->session->userdata['hotel_id'];\r\n\t\t$data['fields']=$this->RoomsModel->getListData($hotel_id);\r\n\r\n\t\t$this->load->view(\"header\");\r\n\t\t$this->load->view(\"rooms/rooms_list\",$data);\r\n\t\t$this->load->view(\"footer\");\r\n\r\n\t}", "public function getAvailableSlots($duration, $arrBookedTime){\n\n $arrTime = array();\n $arrTime[\"from\"][] = $this->startTime;\n if(count($arrBookedTime) > 0){\n foreach ($arrBookedTime as $rowTime) {\n $arrTime['end'][] = date(\"H:i\", strtotime($rowTime->book_from));\n $arrTime['from'][] = date(\"H:i\", strtotime($rowTime->book_to));\n }\n }\n $arrTime[\"end\"][] = $this->endTime;\n return $arrAvailableSlots = $this->createTimeSlotForBooking($duration, $arrTime);\n }", "protected function all_unavailable_dates($room_for_check){\r\n $all_unavailable_dates = array();\r\n \r\n foreach (self::$db_table_months as $month){\r\n foreach (self::$db_table_years as $year){\r\n $unav_dates = $this->unav_days_to_dates($month, $year, $room_for_check);\r\n// var_dump($unav_dates);\r\n if (!$unav_dates) continue; //otarasim se onih koji su null\r\n// var_dump($unav_dates);\r\n foreach ($unav_dates as $unav_date){ \r\n if (is_bool($unav_date)) continue;\r\n $all_unavailable_dates[] = $unav_date;\r\n }\r\n }\r\n \r\n }\r\n return $all_unavailable_dates;\r\n }", "public function rooms()\n {\n return $this->hasMany(Room::class, 'floor_id', 'id');\n }", "public function index()\n {\n $rooms = Room::all();\n return RoomResource::collection($rooms);\n }", "public static function getAllTimeSlots(){\n $result = DB::dataQuery(\"SELECT * FROM timeslots\");\n foreach ($result as $timeslot) {\n echo \"<option value=\".$timeslot['idTimeSlot'].\"> Dia: \".$timeslot['dayOfWeek']. \" De \". $timeslot['startTime'] .\" a \". $timeslot['endTime'].\"</option>\";\n }\n }", "public function getAvailableRooms(\\DataContainer $dc)\n {\n $arrOptions = [];\n\n if (($objRooms = \\HeimrichHannot\\CalendarPlus\\CalendarRoomModel::findAllByCalendar($dc->activeRecord->pid)) === null)\n {\n return $arrOptions;\n }\n\n while ($objRooms->next())\n {\n $objRoomArchive = $objRooms->getRelated('pid');\n\n if ($objRoomArchive === null)\n {\n continue;\n }\n\n $arrOptions[$objRoomArchive->title][$objRooms->id] = $objRooms->title;\n }\n\n return $arrOptions;\n }", "function getRooms($id) {\n\t\t$query = \"SELECT node FROM sentinels WHERE profId='$id' AND deleted!='1' ORDER BY timeBuilt DESC\";\n\n\t\t$dbc = connect_to_db();\n\t\t$result = perform_query($dbc, $query);\n\n\t\twhile ($row = mysqli_fetch_assoc($result)) {\n\t\t\t$online[] = $row;\n\t\t}\n\t\tdisconnect_from_db($dbc, $result);\n\n\t\t$resultAr = array();\n\t\tif (!empty($online)) {\n\t\t\tforeach ($online as $a => $b) {\n\t\t\t\tforeach ($b as $c => $a) {\n\t\t\t\t\tarray_push($resultAr, $b[$c]);\n\t\t\t\t};\n\t\t\t};\n\t\t}\n\t\treturn $resultAr;\n\t}", "static function getSplitRoomReservationsReport() {\n global $wpdb;\n $resultset = $wpdb->get_results(\n \"SELECT reservation_id, guest_name, checkin_date, checkout_date, data_href, lh_status, \n booking_reference, booking_source, booked_date, eta, viewed_yn, notes, created_date\n FROM wp_lh_rpt_split_rooms\n WHERE job_id IN (SELECT CAST(value AS UNSIGNED) FROM wp_lh_job_param WHERE name = 'allocation_scraper_job_id' AND job_id = (SELECT MAX(job_id) FROM wp_lh_jobs WHERE classname = 'com.macbackpackers.jobs.SplitRoomReservationReportJob' AND status = 'completed'))\n ORDER BY checkin_date\");\n\n if($wpdb->last_error) {\n throw new DatabaseException($wpdb->last_error);\n }\n\n return $resultset;\n }", "public function index()\n {\n $schedulings = Scheduling::all();\n foreach ($schedulings as $value) {\n $value->room->local;\n }\n\n return SchedulingResource::collection($schedulings);\n }", "function getRegistrationByDate($date,$roomspotID , $timeIn, $timeOut)\n {\n $this->db->from(' pt_registration_dates');\n $this->db->where('app_status !=' , 'Denied');\n $this->db->where('registration_date', $date);\n $this->db->where('roomspotID', $roomspotID);\n $this->db->where('registration_timein >=', $timeIn);\n $this->db->where('registration_timeout <=', $timeOut);\n $this->db->join('pt_registration', 'pt_registration.registrationID = pt_registration_dates.registrationID');\n //echo $this->db->get_compiled_select(); // before $this->db->get();\n\n $query = $this->db->get();\n \n return $query->result_array();\n }", "public function rooms()\n {\n return $this->belongsToMany(Room::class, \"reservation_room\", \"reservation_id\", \"room_id\");\n }", "function get_time_conflicts($room_id,$room_section,$user_id,$date,$start_time,$end_time,$otf,$reschedule_reservation_id=null)\n{\n\tglobal $db;\n\n\t$conflicts = array();\n\n\t$rooms = load_rooms(null,array('id'=>$room_id));\n\tforeach($rooms as $room)\n\t\tbreak;\n\n\t$hours = load_hours($db,$date);\n\n\t// check to make sure there aren't any conflicts for the room\n\t$select_conflicts = \"select * from reservations where room_id like '$room_id' and room_section like '$room_section' and ((sched_end_time > '\".date('Y-m-d H:i:s',strtotime($start_time)).\"' AND sched_start_time <= '\".date('Y-m-d H:i:s',strtotime($start_time)).\"') OR (sched_end_time >= '\".date('Y-m-d H:i:s',strtotime($end_time)).\"' AND sched_start_time < '\".date('Y-m-d H:i:s',strtotime($end_time)).\"') OR (sched_start_time >= '\".date('Y-m-d H:i:s',strtotime($start_time)).\"' AND sched_end_time <= '\".date('Y-m-d H:i:s',strtotime($end_time)).\"')) AND cancelled like '0' AND key_checkin_time is null and active like '1'\";\n\tif($reschedule_reservation_id && $reschedule_reservation_id > 0)\n\t\t$select_conflicts .= \" AND id not like '$reschedule_reservation_id'\";\n\t//print(\"select: $select_conflicts<br>\\n\");\n\t$res_conflicts = $db->query($select_conflicts);\n\t$num_conflicts = $res_conflicts->numRows();\n\tif($num_conflicts > 0)\n\t{\n\t\tunset($conflict);\n\t\tif($num_conflicts == 1)\n\t\t\t$conflict->message = \"The room reservation you selected conflicts with an existing room reservation.\";\n\t\telse\n\t\t\t$conflict->message = \"The room reservation you selected conflicts with multiple existing room reservations.\";\n\t\twhile($res_conflicts->fetchInto($res))\n\t\t\t$conflict->data[] = $res;\n\t\t$conflicts[] = $conflict;\n\t}\n\n\t// check to make sure there aren't any conflicts for the patron\n\t$select_conflicts = \"select * from reservations where user_id like '$user_id' and (sched_end_time > '\".date('Y-m-d H:i:s',strtotime($start_time)).\"' AND sched_start_time < '\".date('Y-m-d H:i:s',strtotime($end_time)).\"') AND cancelled like '0' AND status not like 'Cancelled' AND status not like 'Completed' AND active like '1'\";\n\tif($reschedule_reservation_id && $reschedule_reservation_id > 0)\n\t\t$select_conflicts .= \" AND id not like '$reschedule_reservation_id'\";\n\t//print(\"select: $select_conflicts<br>\\n\");\n\t$res_conflicts = $db->query($select_conflicts);\n\t$num_conflicts = $res_conflicts->numRows();\n\tif($num_conflicts > 0)\n\t{\n\t\tunset($conflict);\n\t\tif($num_conflicts == 1)\n\t\t\t$conflict->message = \"An existing reservation overlaps with this reservation.\";\n\t\telse\n\t\t\t$conflict->message = \"Multiple existing reservations overlap with this reservation.\";\n\t\twhile($res_conflicts->fetchInto($res))\n\t\t\t$conflict->data[] = $res;\n\t\t$conflicts[] = $conflict;\n\t}\n\n\t// double-check the libary is not closed\n\tif(strtotime($start_time) < strtotime($hours->open_time) || strtotime($end_time) > strtotime($hours->close_time))\n\t{\n\t\tunset($conflict);\n\t\t$conflict->message = \"You have selected a reservation that falls outside of the available hours for \" . date('m/d/Y',strtotime($date)) . \".\";\n\t\t$conflicts[] = $conflict;\n\t}\n\n\t// double-check the reservation is not for a time too far in the future\n\t$max_date_hours = load_hours($db,date('Y-m-d',strtotime(\"+\".(MAX_FUTURE_RES_DAYS-1).\" days\",strtotime('now'))));\n\tif(strtotime($start_time) > strtotime($max_date_hours->close_time))\n\t{\n\t\tunset($conflict);\n\t\t$conflict->message = \"You have selected a reservation that is too far in the future. Reservations may only be made as far as \".MAX_FUTURE_RES_DAYS.\" days in advance.\";\n\t\t$conflicts[] = $conflict;\n\t}\n\n\t// double-check to make sure the reservation length is not greater than the max allowed\n\t$res_length = round((strtotime($end_time) - strtotime($start_time))/60);\n\tif($res_length > DEFAULT_MAX_RES_LEN && strcmp($otf,\"1\"))\n\t{\n\t\tunset($conflict);\n\t\t$conflict->message = \"You have selected a reservation that exceeds the maximum allowed duration of \".DEFAULT_MAX_RES_LEN.\" minutes.\";\n\t\t$conflicts[] = $conflict;\n\t}\n\n\t// double-check to make sure the reservation length is not shorter than the min allowed\n\tif($res_length < DEFAULT_MIN_RES_LEN)\n\t{\n\t\tif((in_array('Staff',$_SESSION['LibRooms']['Roles']) || in_array('Admin',$_SESSION['LibRooms']['Roles'])) && !strcmp($otf,\"1\"))\n\t\t{\n\t\t\t// on the fly checkouts are allowed to be shorter than the minimum reservation length\n\t\t}\n\t\telse\n\t\t{\n\t\t\tunset($conflict);\n\t\t\t$conflict->message = \"You have selected a reservation that is shorter than the minimum allowed duration of \".DEFAULT_MIN_RES_LEN.\" minutes.\";\n\t\t\t$conflicts[] = $conflict;\n\t\t}\n\t}\n\n\t// double-check that the end time comes after the start time\n\tif($res_length <= 0)\n\t{\n\t\tunset($conflict);\n\t\t$conflict->message = \"You have selected an invalid start time or end time for your reservation.\";\n\t\t$conflicts[] = $conflict;\n\t}\n\n\t// double-check reservation start time is for a time in the future (if staff/admin -> minus 1 res_precision)\n\tif(isset($_SESSION['LibRooms']['Roles']) && (in_array('Staff',$_SESSION['LibRooms']['Roles']) || in_array('Admin',$_SESSION['LibRooms']['Roles'])))\n\t\t$min_start_time = strtotime(RES_PRECISION . \" minutes ago\",strtotime('now'));\n\telse\n\t\t$min_start_time = strtotime('now');\n\tif(strtotime($start_time) < $min_start_time)\n\t{\n\t\tunset($conflict);\n\t\t$conflict->message = \"You have selected a start time in the past.\";\n\t\t$conflicts[] = $conflict;\n\t}\n\n\n\t// double-check room is not out-of-order\n\tif(!strcmp($room->out_of_order,'Yes'))\n\t{\n\t\tunset($conflict);\n\t\t$conflict->message = \"The room you selected is currently out of order.\";\n\t\t$conflicts[] = $conflict;\n\t}\n\n\t// confirm user has a staff or admin role before allowing first come first serve reservations\n\tif(isset($_SESSION['LibRooms']['Roles']) && !in_array('Staff',$_SESSION['LibRooms']['Roles']) && !in_array('Admin',$_SESSION['LibRooms']['Roles']) && !strcmp($room->fcfs,'Yes'))\n\t{\n\t\tunset($conflict);\n\t\t$conflict->message = \"You do not have permission to reserve first come first serve rooms.\";\n\t\t$conflicts[] = $conflict;\n\t}\n\n\t// if back-to-back reservations are not allowed, check to make sure this is not a back-to-back\n\tif(!strcmp(BACK_TO_BACK_RESERVATIONS,\"No\"))\n\t{\n\t\t$select_conflicts = \"select * from reservations where user_id like '$user_id' and room_id like '$room_id' and (sched_end_time like '\".date('Y-m-d H:i:s',strtotime($start_time)).\"' OR sched_start_time like '\".date('Y-m-d H:i:s',strtotime($end_time)).\"') AND cancelled like '0' and active like '1'\";\n\t\tif($reschedule_reservation_id && $reschedule_reservation_id > 0)\n\t\t\t$select_conflicts .= \" AND id not like '$reschedule_reservation_id'\";\n\t\t//print(\"select: $select_conflicts<br>\\n\");\n\t\t$res_conflicts = $db->query($select_conflicts);\n\t\t$num_conflicts = $res_conflicts->numRows();\n\t\tif($num_conflicts > 0)\n\t\t{\n\t\t\tunset($conflict);\n\t\t\t$conflict->message = \"Back to back reservations by the same patron for the same room are not allowed.\";\n\t\t\twhile($res_conflicts->fetchInto($res))\n\t\t\t\t$conflict->data[] = $res;\n\t\t\t$conflicts[] = $conflict;\n\t\t}\n\t}\n\n\treturn($conflicts);\n}", "public function checkAvailability($date){\n\t\t$reservations = $this->db->select('reservation_detail.control_id, reservation_detail.cat_room_id')\n\t\t\t->from('reservation_detail')\n\t\t\t->join('reservation', 'reservation.id_reserve = reservation_detail.reservation_id')\n\t\t\t->where(\"reservation_detail.date_reservation ='$date' AND (reservation.status_reserve =1 OR reservation.status_reserve =3)\")\n\t\t\t->get();\n\t\t$allotments = $this->getAllotments();\n\t\t\n\t\tif($reservations->num_rows() > 0){\n\t\t\tforeach ($reservations->result() as $row){\n\t\t\t\t$allotments[$row->cat_room_id]--;\n\t\t\t}\n\t\t}\n\t\treturn $allotments;\n\t}", "function getRoom($criteria = \"\", $keyword = \"\", $sort = \"\", $dir = \"\", $start = \"\", $limit = \"\"){\n $query = DB::table('m_room');\n $query->select('m_room.*', 'm_contract_vendor.*', 'm_room.id as id_room');\n $query->join('m_vendor','m_vendor.id','=','m_room.vendor');\n $query->join('m_contract_vendor','m_vendor.id','=','m_contract_vendor.vendor');\n $query->join('m_vendor_user', 'm_vendor_user.vendor', '=', 'm_vendor.id');\n $query->where('m_vendor_user.id','=', Auth::guard('web_vendor')->user()->id);\n if ($criteria && $keyword) {\n $query->where(function($modif)use($criteria, $keyword) {\n $modif->where('m_room.'.$criteria, 'ilike', '%'.$keyword.'%');\n $modif->orWhereRaw('to_char(m_contract_vendor.valid_from, \\'YYYY-Mon-DD\\') ilike ?', array('%'.$keyword.'%'));\n $modif->orWhereRaw('to_char(m_contract_vendor.valid_to, \\'YYYY-Mon-DD\\') ilike ?', array('%'.$keyword.'%'));\n });\n }\n if ($sort && $dir) {\n $query->orderBy($sort, $dir);\n }\n if ($start != \"\" && $limit != \"\") {\n $query->take($limit)->skip($start);\n }\n $data = $query->get();\n return $data;\n }", "public function getRoomsNotOccupied(Request $request){\n $rooms = RoomModel::where('ispublished',1)\n ->where('status','!=', 'Occupied')\n ->where(function($q) use ($request){\n $q->where('roomNo', 'LIKE', \"%{$request->search}%\")\n ->orWhere('status', 'LIKE', \"%{$request->search}%\");\n })\n ->paginate(10);\n return $rooms;\n }", "public function unavailable_rooms()\n {\n return $this->belongsToMany(Room::class, 'unavailable_rooms', 'class_id', 'room_id');\n }", "function openmeetings_getRecordingsByExternalRooms() {\n\t\n\t\tglobal $CFG;\n\n\t\t$restService = new openmeetings_rest_service();\n\t\t\n\t\t$url = $this->getUrl().\"/services/RoomService/getFlvRecordingByExternalRoomType?\" .\n\t\t\t\t\t\"SID=\".$this->session_id .\n\t\t\t\t\t\"&externalRoomType=\".urlencode($CFG->openmeetings_openmeetingsModuleKey);\n\n\t\t$result = $restService->call($url,\"\");\n\t\t\t\t\t\n\t\treturn $result;\t\t\n\t\t\t\t\t\n\t}", "public function bookingListByDate()\n {\n $dateOptipns = [];\n $bookingMgr = new BookingMgr();\n $bookings = $bookingMgr->getBookings();\n foreach ($bookings->toArray() as $booking) {\n $dateOptipns[] = $booking['reserve_date'];\n }\n $dateOptipns = array_unique($dateOptipns);\n $dateOptipns = array_sort($dateOptipns);\n \n return view('booking/date', [\n 'dateOptipns' => $dateOptipns,\n ]);\n }", "function getAllRoomsByBuilding(){\r\n $common = new \\Cars\\Data\\Common($this->app);\r\n $blds = $common->getBuildingAbbreviations();\r\n\r\n $output = array();\r\n foreach ($blds as $bld => $bldData) {\r\n $rooms = $common->getRoomsByBuilding($bldData[\"building_abbreviation\"]);\r\n foreach ($rooms as $room => $val) {\r\n $output[$bldData[\"building_abbreviation\"]][$val[\"room_number\"]] = $val;\r\n }\r\n }\r\n\r\n return $output;\r\n }", "function findAppointmentsDue(){\n\t$db = dbConnect();\n\n\t$sql = \"SELECT id FROM Appointment WHERE start_date > date_add(NOW(),INTERVAL 15 MINUTE) AND start_date <= date_add(NOW(),INTERVAL 30 MINUTE) AND status = 2 AND (type = 0 OR type = 1)\";\n\n\t$results = $db->query($sql);\n\n\treturn $results;\n}", "public static function setRoomAvailability(&$rooms, $items_reserved, $hotel_id, $startDate ,$endDate, $confirmationId=0){\r\n\t\t$app = JFactory::getApplication();\r\n\t\t$rooms_reserved = self::getNumberOfBookingsPerDay($hotel_id, $startDate ,$endDate, $confirmationId);\r\n\t\t$temporaryReservedRooms = self::getReservedRooms($items_reserved);\r\n\t\t//dmp(\"T\");\r\n\t\t//dmp($temporaryReservedRooms);\r\n\r\n\t\t\r\n\t\tforeach($rooms as $room){\r\n\t\t\t//\tdmp(\"NR: \".$room->room_id.\" \".$room->nrRoomsAvailable);\r\n\t\t\t//dmp($room->daily);\r\n\t\t\tforeach($room->daily as $day){\r\n\t\r\n\t\t\t\t$totalNumberRoomsReserved = 0;\r\n\t\t\t\t//dmp($day[\"data\"]);\r\n\t\t\t\tif(isset($rooms_reserved[$room->room_id][$day[\"date\"]])){\r\n\t\t\t\t\t$totalNumberRoomsReserved = $rooms_reserved[$room->room_id][$day[\"date\"]];\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(isset($temporaryReservedRooms[$room->room_id])){\r\n\t\t\t\t\t$totalNumberRoomsReserved += $temporaryReservedRooms[$room->room_id];\r\n\t\t\t\t}\r\n\t\t\t\t// No remember me for admin\r\n\t\t\t\tif (!$app->isAdmin()) {\r\n\t\t\t\t\t$totalNumberRoomsReserved+=1;\r\n\t\t\t\t}\r\n\t\t\t\tif(intval($day[\"nrRoomsAvailable\"]) < $totalNumberRoomsReserved )\r\n\t\t\t\t{\r\n\t\t\t\t\t$room->is_disabled = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function listRooms($optParams = array()) {\n $params = array();\n $params = array_merge($params, $optParams);\n $data = $this->__call('list', array($params));\n if ($this->useObjects()) {\n return new RoomList($data);\n } else {\n return $data;\n }\n }", "public function getSchedule() {\n// from schedule\n// ORDER BY gameDate\";\n $sql = \"Select id, opponent, location, stadiumName, homeoraway, byuScore, oppScore,\n gameDate, closeDate, showUntilDate, sysdate() as now\n from schedule\n ORDER BY gameDate\";\n\n try {\n return $this->getFullList($sql);\n } catch (PDOException $e) {\n echo '{\"error\":{\"text\":\"' . $e->getMessage() . '\"\"}}';\n }\n }", "public function index()\n {\n $rooms = Room::all();\n \n //$rooms = Room::all();\n\n $rooms->load('StatusHistory');\n\n if($rooms->count() <= 0){\n return response()->json([\n 'message' => 'No rooms to show'\n ]);\n }\n \n $rooms->load('RoomRate.Rate');\n $rooms->load('StatusHistory.Status');\n\n return response()->json($rooms);\n }", "function print_all_rooms(){\n $rooms = new RoomsView();\n $rooms->print_all_rooms();\n }", "public function get($date) {\n return Availability::whereDate('date',$date)\n ->get(['doctor_id','clinic_id','date','time','duration']);\n }", "function check_room_valid($target_lecture, $room_alloc)\n{\n\n // check which room is available\n // return Room-1, Room-2, Room-3, Room-4 etc.\n // or return false\n// $empty_timeslots = [];\n// for ($i = 9; $i <= 17; $i++) {\n// $empty_timeslots[$i] = false;\n// }\n $targetStartTime = $target_lecture->getStartTime();\n $targetDuration = $target_lecture->getDuration();\n $targetEndTime = $targetStartTime + $targetDuration;\n foreach ($room_alloc as $one_room_id => $list_of_lectures) {\n //check which time has been taken\n $timeslots_taken = [\n// 9 => false\n// 10\n// 11...\n ];\n for ($i = 9; $i <= 17; $i++) {\n $timeslots_taken[$i] = false;\n }\n foreach ($list_of_lectures as $oneLecture) {\n $startTime = $oneLecture->getStartTime();\n// $level = $oneLecture->getId();\n $duration = $oneLecture->getDuration();\n for ($s = $startTime; $s < ($startTime + $duration); $s++) {\n $timeslots_taken[$s] = true;\n }\n }\n\n // check if $one_lecture can be assigned to this $one_room_id\n $valid = true; // assume u can\n // find any slot that is taken\n for ($t = $targetStartTime; $t < $targetEndTime; $t++) {\n if ($timeslots_taken[$t] == true) {\n $valid = false;\n break;\n }\n }\n if ($valid == true) {\n return $one_room_id;\n }\n }\n\n return false;\n}", "function get_available_by_time_surveys() {\r\n // set connection var\r\n global $db;\r\n\r\n // get current time\r\n $time = date(\"Y-m-d H:i:s\");\r\n\r\n // query to get all vote survey_ids for session user\r\n $sql = \"SELECT id\r\n FROM surveys\r\n WHERE is_active = '1' AND status = '1' AND available_from < '$time' AND available_due > '$time';\";\r\n $surveys_data = array();\r\n $surveys = array();\r\n foreach ($db->query($sql) as $key => $value) {\r\n $surveys_data[$key] = $value;\r\n foreach ($surveys_data[$key] as $subkey => $subvalue) {\r\n if (is_int($subkey)) {\r\n $surveys[] = $subvalue;\r\n }\r\n }\r\n }\r\n\r\n return $surveys;\r\n}", "function get_query_strings($area, $room, $month, $day, $year, $s)\n{\n global $morningstarts, $morningstarts_minutes;\n \n $query_strings = array();\n \n // check to see if the time is really on the next day\n $date = getdate(mktime(0, 0, $s, $month, $day, $year));\n if (hm_before($date,\n array('hours' => $morningstarts, 'minutes' => $morningstarts_minutes)))\n {\n $date['hours'] += 24;\n }\n $hour = $date['hours'];\n $minute = $date['minutes'];\n $period = period_index($s);\n $query_strings['new_periods'] = \"area=$area&amp;room=$room&amp;period=$period&amp;year=$year&amp;month=$month&amp;day=$day\";\n $query_strings['new_times'] = \"area=$area&amp;room=$room&amp;hour=$hour&amp;minute=$minute&amp;year=$year&amp;month=$month&amp;day=$day\";\n $query_strings['booking'] = \"area=$area&amp;day=$day&amp;month=$month&amp;year=$year\";\n \n return $query_strings;\n}", "function getdate($id_room=null){\n $query = DB::table('m_room');\n $query->join('m_contract_vendor','m_room.vendor','=','m_contract_vendor.vendor');\n $query->where('m_room.id','=',$id_room );\n $data = $query->first();\n if($data->valid_from<=date('Y-m-d') && date('Y-m-d')<=$data->valid_to){\n $return['batas']=date('Y-m-d');\n }\n else{\n $return['batas']=\"\";\n }\n $return['results'] = $data;\n return $return;\n }", "public function scopeCheckRoomAvailability($query, $turnId, $roomId, $weekday, $starttime, $endtime)\n\t{\n\t\treturn $query->join('planning_room', 'planning_room.planning_id','=','plannings.id')\n\t\t\t\t\t->where('plannings.turn_id', '=', $turnId) // Import to select ohne results from the same turn\n\t\t\t\t\t->where('planning_room.weekday','=' ,$weekday)\n\t\t\t\t\t->where('planning_room.room_id','=', $roomId)\n\t\t\t\t\t->where(function($query) use ($starttime, $endtime)\n\t\t\t\t\t{\n\t\t\t\t\t\t$query->where(function($q1) use ($starttime){\n\t\t\t\t\t\t\t$q1->where('planning_room.start_time', '<', $starttime)\n\t\t\t\t\t\t\t->where('planning_room.end_time', '>', $starttime)\n\t\t\t\t\t\t\t->where('planning_room.end_time', '!=', $starttime);\n\t\t\t\t\t\t})\n\t\t\t\t\t\t->orWhere(function ($q2) use ($endtime){\n\t\t\t\t\t\t\t$q2->where('planning_room.start_time', '<', $endtime)\n\t\t\t\t\t\t\t->where('planning_room.end_time', '>', $endtime);\n\t\t\t\t\t\t})\n\t\t\t\t\t\t->orWhere(function ($q3) use ($starttime, $endtime){\n\t\t\t\t\t\t\t$q3->where('planning_room.start_time', '=', $starttime)\n\t\t\t\t\t\t\t->where('planning_room.end_time', '=', $endtime);\n\t\t\t\t\t\t})\n\t\t\t\t\t\t->orWhere(function ($q4) use ($starttime, $endtime){\n\t\t\t\t\t\t\t$q4->where('planning_room.start_time', '=', $starttime)\n\t\t\t\t\t\t\t->where('planning_room.end_time', '<', $endtime);\n\t\t\t\t\t\t})\n\t\t\t\t\t\t->orWhere(function ($q5) use ($starttime, $endtime){\n\t\t\t\t\t\t\t$q5->where('planning_room.start_time', '>', $starttime)\n\t\t\t\t\t\t\t->where('planning_room.end_time', '=', $endtime);\n\t\t\t\t\t\t})\n\t\t\t\t\t\t->orWhere(function ($q6) use ($starttime, $endtime){\n\t\t\t\t\t\t\t$q6->where('planning_room.start_time', '>', $starttime)\n\t\t\t\t\t\t\t->where('planning_room.end_time', '<', $endtime);\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t}", "public function getTransRooms()\n {\n //Function to get the variation values based on the selected variation type\n $property_id = Input::get('property_id');\n\n $pay_rooms = Rooms::getRooms()->where('property_id', $property_id);\n\n return response()->json($pay_rooms);\n }", "function is_available_room($room_number)\n{\n\t//\n\t$room_rs = mysql_query(\"SELECT bed_limit FROM rooms WHERE room_number=\".$room_number);\n\t$occupied_rs = mysql_query(\"SELECT count(*) as total_occupied FROM room_availability WHERE room_number=\".$room_number.\" && status='1'\");\n\t//\n\t$roomdata = mysql_fetch_object($room_rs);\n\t$occupieddata = mysql_fetch_object($occupied_rs);\n\t\n\tif($roomdata->bed_limit == $occupieddata->total_occupied)\n\t{\n\t\t// not avail\n\t\treturn 0;\n\t}\n\telse\n\t{\n\t\t$num = intval($roomdata->bed_limit)-intval($occupieddata->total_occupied);\n\t\treturn $num;\n\t}\n\n}", "public function all()\n {\n Log::info('Retrieving all rooms');\n return response()->json(Room::with('images','features','user')->get());\n\n }", "protected function isAvailable()\n {\n return [\n '$and' => [\n [ 'reservedAt' => NULL ],\n [ 'availableAt' => [ '$lte' => $this->currentTime() ] ]\n ]\n ];\n }", "function get_appointment_times($db, $appointments) {\n $unavailable_times = array();\n $available_times = array();\n foreach ($appointments as $appointment) {\n array_push($unavailable_times, date(\"Y-m-d H:i:s\", strtotime($appointment['appt_time'])));\n }\n foreach ($unavailable_times as $unavailable_time) {\n $possible_time = date(\"Y-m-d H:i:s\", strtotime($unavailable_time . \"+1 hour\"));\n if (!in_array($possible_time, $unavailable_times)) {\n array_push($available_times, $possible_time);\n }\n }\n return $available_times;\n}", "function getOpenRoomsByBuilding($days, $start, $end, $term){\r\n //WIP\r\n $common = new \\Cars\\Data\\Common($this->app);\r\n $blds = $common->getBuildingAbbreviations();\r\n $days = split(',', $days);\r\n $output = array();\r\n\r\n //return $common->isRoomOpen(\"GOL\",\"2650\",\"M\",$start,$end,$term);\r\n\r\n foreach ($blds as $bld => $bldData) {\r\n $rooms = $common->getRoomsByBuilding($bldData[\"building_abbreviation\"]);\r\n foreach ($rooms as $room => $val) {\r\n $open = true;\r\n foreach ($days as $day) {\r\n if($common->isRoomOpen($bldData[\"building_abbreviation\"],$val[\"room_number\"],$day,$start,$end,$term) == 0){\r\n $open = false;\r\n }\r\n if($open){\r\n $output[$bldData[\"building_abbreviation\"]][$val[\"room_number\"]] = $val;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return $output;\r\n }", "public function index()\n\t{\n\t\treturn $this->room->all();\n\t}", "public function bring_Function_by_idroom($room)\n { \n try{\n if ($room != null) {\n $sql = \"SELECT * FROM $this->table WHERE room = \\\"$room\\\"\";\n\n $conec = Conection::conection();\n\n $judgment = $conec->prepare($sql);\n\n $judgment->execute();\n\n\n $dataSet = $judgment->fetchAll(\\PDO::FETCH_ASSOC);\n\n $this->mapear($dataSet);\n\n if(!empty($this->list)){\n\n return $this->list;\n }\n }\n\n return null;\n }catch(\\PDOException $e){\n echo $e->getMessage();\n }catch(\\Exception $e){\n echo $e->getMessage();\n }\n }", "public function getAllRooms(): Collection\n {\n return $this->roomRepository->getAllRooms();\n }", "public function schedulingsDay(Request $request)\n {\n $date = $request->input('date_scheduling');\n $schedulings = Scheduling::where('date_scheduling', $date)->get();\n foreach ($schedulings as $value) {\n $value->room->local;\n }\n\n return SchedulingResource::collection($schedulings);\n }", "protected function getMySlots($args) {\n\n if ($args['ent_slots_for'] == '' || $args['ent_date_time'] == '')\n return $this->_getStatusMessage(1, 1);\n\n $this->curr_date_time = urldecode($args['ent_date_time']);\n\n $returned = $this->_validate_token($args['ent_sess_token'], $args['ent_dev_id'], '1');\n\n if (is_array($returned))\n return $returned;\n\n// $checkingDate = explode('-', $args['ent_slots_for']);\n\n $getScheduleQry = \"select sh.id, sh.day_number, sh.start, sh.mas_id, sh.duration_in_mts, sh.ref_count from master_schedule sh, master doc \";\n $getScheduleQry .= \"where sh.mas_id = doc.mas_id and doc.mas_id = '\" . $this->User['entityId'] . \"' order by sh.start asc\";\n\n $getScheduleRes = mysql_query($getScheduleQry, $this->db->conn);\n\n $appts = $daysAvlb = $avlbSlots = $avlbDates = array();\n\n while ($appointment = mysql_fetch_assoc($getScheduleRes)) {\n\n $appts[$appointment['day_number']]['day'] = $appointment['day_number'];\n $appts[$appointment['day_number']]['time'][] = array('from' => date('h:i a', strtotime($appointment['start'])), 'to' => date(\"h:i a\", strtotime('+' . (int) $appointment['duration_in_mts'] . ' minutes', strtotime($appointment['start']))), 'flag' => $appointment['ref_count']);\n }\n\n $errMsgArr = $this->_getStatusMessage(21, 2);\n return array('errNum' => $errMsgArr['errNum'], 'errFlag' => $errMsgArr['errFlag'], 'errMsg' => $errMsgArr['errMsg'], 'slots' => $appts);\n }", "public function actionIndex() {\n $searchModel = new \\app\\models\\SearchRooms();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function index()\n {\n $user = Auth::user();\n $role = auth()->user()->getRoleNames();\n\n $id = Auth::id();\n \n $rooms = Room::where('user_id', $id)->get();\n \n // dd($rooms);\n\n return view('host.rooms', compact('user', 'role', 'rooms'));\n }", "public function chat_roomsAction()\n\t{\n\t\t$user = $this->user;\n $user_id = $user['id'];\n $application_id = $user['Application_ID'];\n\n $user = UsersMobile::findFirst($user_id);\n\n $cms = $user->getCms([\n \t\"secured = 0 AND application_id = {$application_id}\"\n \t]);\n\n $data = [];\n\t\tforeach ($cms as $key => $chat) {\n\t\t\t$data[\"messages\"][$key][\"name\"] = $chat->title;\n\t\t\t$data[\"messages\"][$key][\"created_at\"] = $chat->datetime;\n\t\t\t$data[\"messages\"][$key][\"id\"] = $chat->id;\n\t\t}\n\n\t\t$final_array = $this->structureMessages($data[\"messages\"]);\n\n\t\t$response = [\n \t\"status\" => $this->apiFactory->getStatus(200, \"Success\"),\n \t\"data\" => $final_array\n ];\n\n return $this->sendJson($response);\n\t}", "public function index(Request $request)\n {\t\n \t$data = array();\t\n\n $sortField = $request->input('sort_field');\n\n if (!in_array($sortField, ['meeting_room_name', 'user_id', 'schedule_at'])) {\n $sortField = 'schedule_at';\n }\n\n $sortDirection = $request->input('sort_direction');\n if (!in_array($sortDirection, ['asc', 'desc'])) {\n $sortDirection = 'desc';\n }\n\n $search = $request->input('s');\n\n if ($search!=\"\") {\n $bookings = Booking::availbleMeetings()\n ->where('meeting_room_name','like', '%'.$search.'%')\n ->orWhere('schedule_at','like', '%'.$search.'%')\n ->orderBy($sortField, $sortDirection)\n ->paginate(5); \n }\n else {\n $bookings = Booking::availbleMeetings()\n ->orderBy($sortField, $sortDirection)\n ->paginate(5);\n }\n\n foreach ($bookings as $booking) {\n\n \t// setting up the name to display on the page\n \t$booking->name = $booking->user->name;\n \t$booking->schedule_date = $booking->schedule_at->format('Y-m-d'); // we can format whatever display we want \n \t$booking->schedule_time_display = $booking->from_to->format('g:i A') . \" - \" . $booking->until_to->format('g:i A');\n $booking->schedule_time = $booking->from_to->format('g:i A');\n\n \t// Just making user that I am not getting \n\t\t\t// all the information related to the user \n\t\t\t// include some important record\n\t\t\tunset($booking->user);\n }\n\n\t\t// Getting the timings //\n\t\t// We call also create a logic to filter \n\t\t// available timings compares \n\t\t// to the currenct record \n\t\t// $timings = Booking::getTimings();\n\t\t// \n\t\t$data['bookings'] = $bookings;\n\t\t// $data['timings'] = $timings;\n\n\t \treturn response()->json($data, 200);\n }", "public function getPaymentRooms()\n {\n $property_id = Input::get('property_id');\n\n $pay_rooms = Rooms::getRooms()->where('property_id', $property_id);\n\n return response()->json($pay_rooms);\n }", "public function jsonListByDate()\n {\n $date = $_GET['date'];\n $bookingMgr = new BookingMgr();\n $bookings = $bookingMgr->getBookingPaginationByDate($date);\n return $bookings;\n }", "private static function _checkDaysForRoom($room, $year, $month, $dayNum) {\n $day = Day::select()->room($room->id)->year($year)->month($month)->day($dayNum)->get();\n if ($day->first()) {\n if ($day->count() > 1) {\n return [\n 'day' => $dayNum,\n 'status' => 4,\n 'start' => true,\n 'end' => true\n ];\n } else {\n $day = $day->first();\n return [\n 'day' => $dayNum,\n 'status' => $day->status,\n 'start' => $day->start == 1 ? true : false,\n 'end' => $day->end == 1 ? true : false\n ];\n }\n } else {\n return [\n 'day' => $dayNum,\n 'status' => 0,\n 'start' => false,\n 'end' => false\n ];\n }\n }", "public function index()\n {\n $rooms = Rooms::where('status', 1)\n ->get();\n\n $meetings = DB::table('meetings')\n ->join('rooms', 'meetings.room', '=', 'rooms.id')\n ->join('users', 'meetings.user_id', '=', 'users.id')\n // ->where('meetings.status', '=', 1)\n ->where('users.status', '=', 1)\n ->select('meetings.id', 'meetings.name AS meeting_name', 'meetings.start_date', 'meetings.start_time','meetings.end_date', 'meetings.end_time','meetings.description','meetings.room','meetings.status','rooms.name AS room_name','rooms.color','rooms.capacity','users.name AS user_name','users.id AS user_id','users.role')\n ->orderBy('meetings.start_date', 'desc')\n ->orderBy('meetings.start_time', 'asc')\n ->get();\n\n $login = DB::table('login')->first();\n\n $countRooms = DB::table('rooms')\n ->where('status', '=', 1)\n ->count('id');\n\n $currentMonth = date('m');\n $currentYear = date('Y');\n $dataMeet = DB::table(\"meetings\")\n // ->where('status', '=', 1)\n // ->where('user_id', '=', 1)\n ->whereRaw('MONTH(start_date) = ?',[$currentMonth])\n ->whereRaw('YEAR(start_date) = ?',[$currentYear])\n ->count('id');\n \n return view('core.pages.schedule.user.monthly', compact('rooms', 'meetings','countRooms','dataMeet','login'));\n }", "public function index()\n {\n $room = request()->get('room');\n\n $messages = Message::where('room_id', $room)->with('user')->get();\n\n $room = Room::find($room);\n\n return compact('messages', 'room');\n }", "public function waitingroomothersAction()\n {\n $uid = $this->_USER_ID;\n $floorId = $this->getParam('CF_floorid');\n $stealFloorId = $this->getParam('CF_stealfloorid');\n $innerUid = $this->getParam('CF_inneruid');\n\n if (empty($innerUid)) {\n return $this->_redirectErrorMsg(-1);\n }\n $mbllApi = new Mbll_Tower_ServiceApi($uid);\n $aryUser = $mbllApi->getUserInfo($innerUid);\n if (!$aryUser || !$aryUser['result']) {\n $errParam = '-1';\n if (!empty($aryUser['errno'])) {\n $errParam = $aryUser['errno'];\n }\n return $this->_redirectErrorMsg($errParam);\n }\n $this->view->userName = $aryUser['result']['nickname'];\n\n $arySameTypeFloors = array();\n if (empty($floorId)) {\n $type = $this->getParam('CF_type');\n if (!empty($type)) {\n $aryMyFloors = explode(',', $this->_user['floors']);\n foreach ($aryMyFloors as $key=>$fvalue) {\n $aryTmp = explode('|', $fvalue);\n if ($aryTmp[1] == $type) {\n $floorId = $aryTmp[0];\n $arySameTypeFloors[] = array('floor_id' => $aryTmp[0], 'floor_name' => $this->_user['floor_names'][$aryTmp[0]]);\n }\n }\n }\n }\n\n if (empty($floorId)) {\n return $this->_redirectErrorMsg(524);\n }\n\n if (count($arySameTypeFloors) > 1) {\n $this->view->arySameTypeFloors = $arySameTypeFloors;\n }\n\n if (empty($floorId) || empty($stealFloorId)) {\n return $this->_redirectErrorMsg(-1);\n }\n\n $aryRst = $mbllApi->getWaitingRoomGuestList($stealFloorId);\n if (!$aryRst || !$aryRst['result']) {\n $errParam = '-1';\n if (!empty($aryRst['errno'])) {\n $errParam = $aryRst['errno'];\n }\n return $this->_redirectErrorMsg($errParam);\n }\n\n //waiting guest data\n $lstWaiting = $aryRst['result']['list'];\n\n if (!empty($lstWaiting)) {\n foreach ($lstWaiting as $key=>$gdata) {\n $rowGuest = Mbll_Tower_GuestTpl::getGuestDescription($gdata['tp']);\n $aryTmp = explode('|', $rowGuest['des']);\n $lstWaiting[$key]['guest_name'] = $aryTmp[0];\n $lstWaiting[$key]['mode_percent'] = round($gdata['ha']/10)*10;\n $lstWaiting[$key]['remain_hour'] = floor(($gdata['ot'] - $gdata['ct'])/3600);\n $lstWaiting[$key]['remain_minute'] = strftime('%M', $gdata['ot'] - $gdata['ct']);\n $lstWaiting[$key]['ha_desc'] = Mbll_Tower_Common::getMoodDesc($gdata['ha']);\n }\n }\n\n $this->view->floorId = $floorId;\n $this->view->stealFloorId = $stealFloorId;\n $this->view->lstWaiting = $lstWaiting;\n $this->view->cntWaiting = count($lstWaiting);\n $this->view->type = $aryRst['result']['type'];\n $this->view->storeName = $aryRst['result']['name'];\n $this->view->innerUid = $innerUid;\n $this->render();\n }", "public function searchRoom()\n {\n $o_response = new \\stdclass();\n $from = Input::get('from');\n $to = Input::get('to');\n $arrEvent = $this->checkEvent($from,$to);\n $room = DB::table('rooms')->select('*')->get();\n\n $result = array();\n foreach($room as $key => $value){\n $result[] = $value->r_name;\n }\n $searchroom = array();\n foreach($arrEvent as $key => $value){\n $searchroom[] = $value->r_name;\n }\n foreach ($result as $key => $value) {\n if(in_array($value, $searchroom)){\n unset($result[$key]);\n }\n }\n if($result){\n $o_response->status = 'ok';\n $o_response->message = $result;\n }else{\n $o_response->status = 'error';\n }\n echo json_encode($o_response);\n }", "public function testCanReturnRooms()\n {\n $mocks = $this->mockDependencies();\n $repository = $mocks[2];\n $collections = $repository->getRooms()[0];\n $rooms = $collections[0];\n $response = $this->get('api/rooms');\n $data = json_decode($response->content(), true);\n $content = $data['data'][0];\n $response->assertStatus(200);\n $this->assertEquals(count($data['data']), 12);\n $this->assertArrayHasKey('room',$content);\n $this->assertEquals($rooms->name,$content['room']);\n $this->assertArrayHasKey('code',$content);\n $this->assertEquals($rooms->code,$content['code']);\n $this->assertArrayHasKey('hotel',$content);\n $this->assertEquals($rooms->hotel->name,$content['hotel']);\n $this->assertArrayHasKey('hotelStars',$content);\n $this->assertEquals($rooms->hotel->stars,$content['hotelStars']);\n }", "function room_list_page(){\n\t\tglobal $print, $txt, $x7c, $x7s;\n\n\t\t// Include the needed library\n\t\tinclude(\"./lib/rooms.php\");\n\n\t\t// Get the array we need that contains the rooms\n\t\t// Returns a multi-dimentional array. Each room has it's\n\t\t// own element and each room element has index 0 which is name\n\t\t// and index 1 which is topic\n\t\t$rooms = list_rooms();\n\t\t$color = \"dark\";\n\t\t$body = \"\n\t\t\t\t<table border=\\\"0\\\" cellspacing=\\\"0\\\" cellpadding=\\\"0\\\" class=\\\"col_header\\\">\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=\\\"160\\\" height=\\\"25\\\">&nbsp;$txt[31]</td>\n\t\t\t\t\t\t<td width=\\\"190\\\" height=\\\"25\\\">&nbsp;$txt[32]</td>\n\t\t\t\t\t\t<td width=\\\"50\\\" height=\\\"25\\\">&nbsp;$txt[30]</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>\n\t\t\t\t<table border=\\\"0\\\" cellspacing=\\\"0\\\" cellpadding=\\\"0\\\" class=\\\"inside_table\\\">\n\n\t\t\";\n\n\t\t// Remove old records\n\t\tinclude_once(\"./lib/online.php\");\n\t\tclean_old_data();\n\n\t\tforeach($rooms as $temp=>$room_info){\n\n\t\t\t// Make sure topic isn't to long\n\t\t\tif(strlen($room_info[1]) > 28)\n\t\t\t\t$room_info[1] = substr($room_info[1],0,26).\"...\";\n\n\t\t\t// Now do the same for the room name\n\t\t\t$link_url = $room_info[0];\n\n\t\t\tif(strlen($room_info[0]) > 17)\n\t\t\t\t$room_info[0] = substr($room_info[0],0,15).\"...\";\n\n\t\t\t// Get the online count\n\t\t\t$online_count = get_online(make_sql_safe($link_url));\n\t\t\tif(is_array($online_count))\n\t\t\t\t$online_count = count($online_count);\n\t\t\telse\n\t\t\t\t$online_count = 0;\n\n\t\t\t// Print lock picture if this room is locked\n\t\t\tif($room_info[2] != \"\")\n\t\t\t\t$lock = \"&nbsp;<img src=\\\"$print->image_path/key.gif\\\">\";\n\t\t\telse\n\t\t\t\t$lock = \"\";\n\n\t\t\tif($online_count != $room_info[3] || isset($_GET['showall']))\n\t\t\t// Put it into the $body variable\n\t\t\t //changed\n\t\t\t $encode_roomname = urlencode($link_url); \n\t\t\t$body .= \"\n\t\t\t <tr>\n\t\t\t <td width=\\\"160\\\" height=\\\"20\\\" class=\\\"dark_row\\\">&nbsp;<a title=\\\"$link_url\\\" href=\\\"index.php?act=frame&room=$encode_roomname\\\">$room_info[0]</a>$lock</td>\n\t\t\t <td width=\\\"190\\\" height=\\\"20\\\" class=\\\"dark_row\\\">&nbsp;$room_info[1]</td>\n\t\t\t <td width=\\\"50\\\" height=\\\"20\\\" class=\\\"dark_row\\\" style=\\\"text-align: center\\\">&nbsp;$online_count/$room_info[3]</td>\n\t\t\t </tr>\n\t\t\t \";\n\t\t}\n\n\t\tif(!isset($_GET['showall']))\n\t\t// If full rooms are not being show give them a link to show them\n\t\t$body .= \"</table><div align=\\\"center\\\"><Br>$txt[81] -- <a href=\\\"index.php?showall=1\\\">$txt[82]</a><Br>\";\n\t\telse\n\t\t// If full rooms are being show give them a link to hide them\n\t\t$body .= \"</table><div align=\\\"center\\\"><Br>$txt[83] -- <a href=\\\"index.php\\\">$txt[84]</a><Br>\";\n\n\t\t// Box to join a private room\n\t\t$body .= \"<br>\n\t\t\t<form action=\\\"./index.php?act=join_room\\\" method=\\\"post\\\">\n\t\t\t\t$txt[388]: <input type=\\\"text\\\" class=\\\"text_input\\\" name=\\\"rname\\\">\n\t\t\t\t<input type=\\\"submit\\\" value=\\\"$txt[389]\\\" class=\\\"button\\\">\n\t\t\t</form>\";\n\n\t\t// Tell them when rooms automatically expire\n\t\t$expire = ($x7c->settings['expire_rooms']/60).\" \".$txt[228];\n\t\tif($expire == 0)\n\t\t\t$expire = $txt[265];\n\t\t$txt[264] = eregi_replace(\"_t\",$expire,$txt[264]);\n\t\t$thelp = $print->help_button(\"room_expire\");\n\t\t$body .= \"<Br><div align=\\\"center\\\">$txt[264] $thelp</div><Br>\";\n\n\n\t\tif($x7c->permissions['make_room'] == 1)\n\t\t\t$body .= \"<a href=\\\"index.php?act=newroom1\\\">[$txt[59]]</a> &nbsp;\";\n\n\t\t$body .= \"<a href=\\\"./index.php?act=userpanel\\\">[$txt[35]]</a> &nbsp;\";\n\n\t\tif($x7c->permissions['admin_access'] == 1)\n\t\t\t$body .= \"<a href=\\\"./index.php?act=adminpanel\\\">[$txt[37]]</a> &nbsp;\";\n\n\t\t$body .= \"<a href=\\\"index.php?act=memberlist\\\">[$txt[561]]</a> &nbsp;\";\n\t\t$body .= \"<a href=\\\"index.php?act=calendar\\\">[$txt[315]]</a> &nbsp;\";\n\t\t$body .= \"<a href=\\\"index.php?act=logout\\\">[$txt[16]]</a> &nbsp;\";\n\t\t$body .= \"<a href=\\\"./help/\\\" target=\\\"_blank\\\">[$txt[34]]</a><Br>\";\n\n\t\t$supporters= explode(\";\",$x7c->settings['support_personel']);\n\t\tif(in_array($x7s->username,$supporters))\n\t\t\t// Give them a support center link\n\t\t\t$body .= \"<a href=\\\"index.php?act=support_sit\\\">[$txt[599]]</a> &nbsp;\";\n\n\t\t$body .= \"</div>\";\n\t\t// User agreement\n\t\tif($x7c->settings['user_agreement'] != \"\"){\n\t\t\t$txt[516] = eregi_replace(\"<a>\",\"<a href=\\\"#\\\" onClick=\\\"window.open('index.php?act=user_agreement','','location=no,menubar=no,resizable=yes,statusbar=no,toolbar=no,scrollbars=yes,width={$x7c->settings['tweak_window_large_width']},height={$x7c->settings['tweak_window_large_height']}');\\\">\",$txt[516]);\n\t\t\t$body .= \"<div align=\\\"center\\\"><Br><Br><font size=\\\"1\\\"><b>$txt[516]</b></font></div>\";\n\t\t}\n\t\t// Output this into a nice window\n\t\t$print->normal_window($txt[29],$body);\n\t}", "function room_planning($building)\n\t{\n\t\tif($this->edc_allotment_model->no_of_rooms($building) === 1) {\n\t\t\t$this->load->view('edc_booking/no_room_data.php');\n\t\t}\n\t\telse {\n\t\t\t$result_uavail_rooms = $this->edc_allotment_model->check_unavail(date('Y-m-d H:i:s'),date('Y-m-d H:i:s'));\n\t\t\t$floor_array = $this->edc_allotment_model->get_floors($building);\n\n\t\t\t$flr = 1;\n\t\t\tforeach($floor_array as $floor)\n\t\t\t{\n\t\t\t\t$temp_query = $this->edc_allotment_model->get_rooms($building,$floor['floor']);\n\t\t\t\t$result_floor_wise[$flr][0] = $temp_query;\n\t\t\t\t$result_floor_wise[$flr++][1] = $floor['floor'];\n\t\t\t}\n\n\t\t\t$data_array = array();\n\t\t\t$i = 0;\n\t\t\tforeach($result_floor_wise as $floor)\n\t\t\t{\n\t\t\t\t$sno=1;\n\t\t\t\t$data_array[$i][0] = $floor[1];\n\t\t\t\tforeach($floor[0] as $row)\n\t\t\t\t{\n\t\t\t\t\t$flag=0;\n\t\t\t\t\tforeach($result_uavail_rooms as $room_unavailable)\n\t\t\t\t\t{\n\t\t\t\t\t\tif($row['id']==$room_unavailable['room_id'])\n\t\t\t\t\t\t\t$flag = 1;\n\t\t\t\t\t}\n\t\t\t\t\t$data_array[$i][$sno][0] = $row['id'];\n\t\t\t\t\t$data_array[$i][$sno][1] = $row['room_no'];\n\t\t\t\t\t$data_array[$i][$sno][2] = $row['room_type'];\n\t\t\t\t\tif($flag==0)\n\t\t\t\t\t\t$data_array[$i][$sno][3] = 1;\n\t\t\t\t\telse\n\t\t\t\t\t\t$data_array[$i][$sno][3] = 0;\n\t\t\t\t\t$data_array[$i][$sno][4] = $row['blocked'];\n\t\t\t\t\t$data_array[$i][$sno++][5] = $row['remark'];\n\t\t\t\t}\n\t\t\t\t$i++;\n\t\t\t}\n\n\t\t\t$data['building'] = $building;\n\t\t\t$data['floor_room_array'] = $data_array;\n\t\t\t$data['room_array'] = $this->edc_allotment_model->get_room_types();\n\t\t\t$this->load->view('edc_booking/room_checkbox',$data);\n\t\t}\n\t}", "function get_room_current_status($room_id,$section_id=1)\n{\n\tglobal $db;\n\n\t// print(\"id: $room_id<br>\\n\");\n\n\t// load the current status of a room section\n\tif(!strcmp($room->out_of_order,\"Yes\"))\n\t{\n\t\t$current_status = \"<s5>Out of order</s5>\";\n\t}\n\telse\n\t{\n\t\t$now = strtotime('now');\n\t\t$when_available = $now;\n\n\t\t// check to see if the room is currently checked out and/or overdue\n\t\t$select_checkout_for_room = \"select * from reservations where room_id like '$room_id' and room_section like '$section_id' and status like 'Checked Out' and active like '1'\";\n\t\t$res_checkout_for_room = $db->query($select_checkout_for_room);\n\t\tif($res_checkout_for_room->numRows() == 1)\n\t\t{\n\t\t\t$res_checkout_for_room->fetchInto($checkout_for_room);\n\t\t\t//print(\"Checkout: <br>\\n\");\n\t\t\t//pr($checkout_for_room);\n\t\t\tif(strtotime($checkout_for_room->sched_end_time) < strtotime('now'))\n\t\t\t{\n\t\t\t\t$current_status = \"<s2>Overdue</s2>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$current_status = \"<s4>Checked Out</s4>\";\n\t\t\t\t$when_available = strtotime($checkout_for_room->sched_end_time);\n\t\t\t}\n\t\t}\n\t\telse if($res_checkout_for_room->numRows() == 0)\n\t\t{\n\t\t\t// room not checked out\n\t\t\t$current_status = \"<s1>Available</s1>\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$current_status = \"<s6>Error: Multiple checkouts</s6>\";\n\t\t}\n\n\t\t$todays_hours = load_hours($db,date(\"Y-m-d\"));\n\n\t\t// locate scheduled reservations\n\t\t$select_next_reservations_for_room = \"select * from reservations where room_id like '$room_id' and room_section like '$section_id' and (status like 'Scheduled') and sched_start_time < '$todays_hours->close_time' and active like '1' order by sched_start_time\";\n\t\t$res_next_reservations_for_room = $db->query($select_next_reservations_for_room);\n\t\t$available_until = -1;\n\n\t\twhile($res_next_reservations_for_room->fetchInto($next_reservation_for_room))\n\t\t{\n\t\t\t//if(strtotime(\"+\".DEFAULT_MIN_RES_LEN.\" minutes\",$when_available) <= strtotime($next_reservation_for_room->sched_start_time))\n\t\t\tif($when_available < strtotime($next_reservation_for_room->sched_start_time))\n\t\t\t{\n\t\t\t\t// there is a gap for a reservation to start at this time\n\t\t\t\t$available_until = strtotime($next_reservation_for_room->sched_start_time);\n\n\t\t\t\tif(strtotime(\"+\".DEFAULT_MAX_RES_LEN.\" minutes\",$when_available) < $available_until)\n\t\t\t\t{\n\t\t\t\t\t// reduce to max res len\n\t\t\t\t\t$available_until = strtotime(\"+\".DEFAULT_MAX_RES_LEN.\" minutes\",$when_available);\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// no gap big enough, try the next reservation\n\t\t\t\t$when_available = strtotime($next_reservation_for_room->sched_end_time);\n\t\t\t}\n\t\t}\n\t\tif($available_until == -1)\n\t\t\t$available_until = strtotime(\"+\".DEFAULT_MAX_RES_LEN.\" minutes\",$when_available);\n\n\t\t//print(\"avail until: \".date(\"H:i:s\",$available_until).\"<br>\\n\");\n\n\t\t$room->when_available_datestamp = date(\"Y-m-d H:i:s\",$when_available);\n\n\t\t// convert when_available to a readable format\n\t\tif($when_available == $now)\n\t\t\t$room->when_available = \"Now\";\n\t\telse\n\t\t\t$room->when_available = date(\"g:ia\",$when_available);\n\t\t$minutes_until_available = ceil(($when_available - strtotime('now'))/60);\n\t\t$hours_until_available = floor($minutes_until_available/60);\n\n\t\tif($hours_until_available == 0 && $minutes_until_available == 0)\n\t\t\t$room->when_available_countdown = \"0:00\";\n\t\telse if($hours_until_available == 0)\n\t\t\t$room->when_available_countdown = \"0:\".str_pad($minutes_until_available,2,\"0\",STR_PAD_LEFT);\n\t\telse if($hours_until_available == 1)\n\t\t\t$room->when_available_countdown = \"1:\".str_pad(($minutes_until_available % 60),2,\"0\",STR_PAD_LEFT).\" min)\";\n\t\telse\n\t\t\t$room->when_available_countdown = $hours_until_available.\":\".str_pad(($minutes_until_available % 60),2,\"0\",STR_PAD_LEFT);\n\n\n\t\t// convert available until to a readable format\n\t\t// print(\"avail til: \".date(\"H:i:s\",$available_until).\"<br>\\n\");\n\t\t$minutes = date(\"i\",$available_until);\n\t\tif(($minutes % RES_PRECISION) > 0)\n\t\t{\n\t\t\t// round up by reservation precision\n\n\t\t\t$minutes = $minutes + (RES_PRECISION - ($minutes % RES_PRECISION));\n\t\t\tif($minutes < 60)\n\t\t\t{\n\t\t\t\t$room->available_until = date(\"g:\".$minutes.\"a\",$available_until);\n\t\t\t\t$room->available_until_datestamp = date(\"Y-m-d H:\".$minutes.\":00\",$available_until);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$room->available_until = date(\"g:00a\",strtotime(\"+1 hour\",$available_until));\n\t\t\t\t$room->available_until_datestamp = date(\"Y-m-d H:00:00\",strtotime(\"+1 hour\",$available_until));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$room->available_until = date(\"g:ia\",$available_until);\n\t\t\t$room->available_until_datestamp = date(\"Y-m-d H:i:00\",$available_until);\n\t\t}\n\n\t\t// print(date(\"g:i:s\",$when_available) .\" - \" . date(\"g:i:s\",strtotime($room->available_until)).\"<br>\\n\");\n\t\t$minutes_available_until = ceil((strtotime($room->available_until) - $when_available)/60);\n\t\t$hours_available_until = floor($minutes_available_until/60);\n\t\tif($hours_available_until == 0 && $minutes_available_until == 0)\n\t\t\t$room->available_until = \"Now\";\n\t\telse if($hours_available_until == 0)\n\t\t\t$room->available_until = date(\"g:ia\",strtotime($room->available_until)).\" (\".$minutes_available_until.\" min)\";\n\t\telse if($hours_available_until == 1)\n\t\t\t$room->available_until = date(\"g:ia\",strtotime($room->available_until)).\" (1 hour \".($minutes_available_until % 60).\" min)\";\n\t\telse\n\t\t\t$room->available_until = date(\"g:ia\",strtotime($room->available_until)).\" (\".$hours_available_until . \" hours \".($minutes_available_until % 60) . \" min)\";\n\n\t\t//$room->available_until .= \" (max $hours_available_until hours)\";\n\t}\n\n\tif(strcmp($room->when_available_countdown,\"0:00\") && !strcmp($current_status,\"<s1>Available</s1>\"))\n\t\t$current_status = \"<s3>Reserved</s3>\";\n\n\t$room->current_status = $current_status;\n\t//$room->current_checkout = $checkout_for_room;\n\n\treturn($room);\n\n}", "public function invitedRoomAction()\n {\n \t$userDto = Zend_Registry::get('api_user');\n \t$rooms = $this->getBusiness()->getRoomByState($userDto, Dto_ChatRoomUser::STATE_INVITED);\n \t\n \t$roomArray = $rooms->toArray(array('room_id', 'created_at'));\n \t$this->success(array('rooms' => $roomArray));\n }", "public function view()\n {\n $room= Room::where('is_active', '=', '1')->first();\n \n $meetings = Meeting::where('meeting_room_id', '=', $room->id)->where('date_time_from', '>=', Carbon::now())->take(10)->get();\n \n return view('meetings.show', compact('room', 'meetings'));\n }" ]
[ "0.76007515", "0.74137884", "0.68969226", "0.6782485", "0.6654334", "0.6606009", "0.6494135", "0.6413228", "0.6405282", "0.64015865", "0.6393042", "0.63919896", "0.63353693", "0.633005", "0.63128483", "0.6288068", "0.6280571", "0.6261809", "0.62208104", "0.61589086", "0.6119168", "0.6090758", "0.6087374", "0.6070232", "0.606799", "0.60641265", "0.60513407", "0.6045926", "0.60231215", "0.60022706", "0.5988032", "0.59721875", "0.5950585", "0.59453", "0.589859", "0.5874291", "0.5857431", "0.58495986", "0.5844303", "0.5833534", "0.58196187", "0.5814253", "0.58006877", "0.5790725", "0.5787011", "0.5769738", "0.5754923", "0.57349586", "0.57173264", "0.5714931", "0.56998354", "0.5696588", "0.567362", "0.56657165", "0.56608045", "0.5660423", "0.56559926", "0.5652646", "0.56380385", "0.5609465", "0.5609375", "0.5607202", "0.5606494", "0.5605751", "0.55888015", "0.55867004", "0.5582552", "0.5570047", "0.55671525", "0.55622214", "0.5561237", "0.554389", "0.55423665", "0.5538834", "0.5536527", "0.5527749", "0.5510328", "0.5509017", "0.5508945", "0.5508144", "0.5506679", "0.55040604", "0.5502455", "0.55010813", "0.54948056", "0.54929584", "0.5482987", "0.54789555", "0.5477993", "0.54765034", "0.54684854", "0.5455439", "0.54503304", "0.54472893", "0.5427753", "0.5424939", "0.5421555", "0.54185617", "0.5418232", "0.54171" ]
0.59411895
34
Check if a room is available without the need to login
public function isAvailableWithoutLogin($start, $end, $area, $room) { $this->validateBookingDuration($start, $end); $schedule = Parser::parseRoom($this->bAuth_user, $this->bAuth_pass, $start, $area, $room); $startTimeslot = $this->dateTime2timeslot($start); $endTimeslot = $this->dateTime2timeslot($end); foreach ($schedule['timeslots'] as $t) { if ($startTimeslot >= $t['start'] && $endTimeslot <= $t['end']) { return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function is_available_room($room_number)\n{\n\t//\n\t$room_rs = mysql_query(\"SELECT bed_limit FROM rooms WHERE room_number=\".$room_number);\n\t$occupied_rs = mysql_query(\"SELECT count(*) as total_occupied FROM room_availability WHERE room_number=\".$room_number.\" && status='1'\");\n\t//\n\t$roomdata = mysql_fetch_object($room_rs);\n\t$occupieddata = mysql_fetch_object($occupied_rs);\n\t\n\tif($roomdata->bed_limit == $occupieddata->total_occupied)\n\t{\n\t\t// not avail\n\t\treturn 0;\n\t}\n\telse\n\t{\n\t\t$num = intval($roomdata->bed_limit)-intval($occupieddata->total_occupied);\n\t\treturn $num;\n\t}\n\n}", "public function get_room_available (){\n\t\tif (!$this->input->is_ajax_request()) {\n\t\t\treturn;\n\t\t}\n\t\t$room_id = $this->input->post('room_id');\n\t\tif ($this->com_user['level'] == 2) {\n\t\t\t$this->load->model('students/m_students');\n\t\t\t$students = $this->m_students->get_detail($this->com_user['student_id']);\n\t\t\t$room_id = $students['room_id'];\n }\n\t\t$room_type_id = $this->input->post('room_type_id');\n\t\t$data = $this->m_rooms->get_room_available($room_type_id,$room_id);\n\t\t$this->output->set_output(json_encode($data));\n\t}", "function get_room_current_availability($room_id)\n{\n\t$rooms = load_rooms(null,array('id'=>$room_id));\n\n\tforeach($rooms as $room)\n\t\tbreak;\n\n\t$room->max_gap->start_time = 0;\n\t$room->max_gap->end_time = 0;\n\n\tfor($section=1;$section<=$room->max_simultaneous_reservations;$section++)\n\t{\n\t\t// check for current/upcoming reservations for this room\n\t\t$upcoming_reservations = load_reservations(array('room_id'=>$room_id,'room_section'=>$section,'sched_end_time gte'=>date(\"Y-m-d H:i:s\"),'status'=>array(\"Scheduled\",\"Checked Out\"),'active'=>'1','limit'=>'1'));\n\t\tunset($next_reservation);\n\t\tforeach($upcoming_reservations as $next_reservation)\n\t\t\tbreak;\n\n\t\t// print(\"next res:\\n\");\n\t\t// pr($next_reservation);\n\n\t\t// check to see if any of the keys are checked out for this room\n\t\tforeach($room->keys as $key)\n\t\t{\n\t\t\tif(!strcmp($key->status,'Checked Out'))\n\t\t\t{\n\t\t\t\t// room section is checked out\n\n\t\t\t\t// load reservation\n\t\t\t\t$current_checkout = load_reservations(array('room_id'=>$room_id,'room_section'=>$section,'status'=>'Checked Out','key_barcode'=>$key->key_barcode,'active'=>'1','limit'=>'1'));\n\n\t\t\t\tif(strtotime($current_checkout->sched_end_time) >= strtotime('now'))\n\t\t\t\t{\n\t\t\t\t\t// checkout is not overdue, so it is not available for others\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif(strcmp($next_reservation->sched_start_time,'') && strtotime($next_reservation->sched_start_time) < strtotime('now'))\n\t\t{\n\t\t\t// there is a reservation scheduled for now\n\t\t\tcontinue;\n\t\t}\n\n\t\t// room section has some availability right now\n\t\t$current_minute = date('i');\n\t\tif($current_minute < 30)\n\t\t\t$current_minute = \"00\";\n\t\telse\n\t\t\t$current_minute = \"30\";\n\t\t$start_time = date(\"Y-m-d H:\".$current_minute.\":00\");\n\n\t\t// TODO: HACK: change on the fly reservations to start at the next unit of precision, rather than the previous\n\t\t$start_time = date(\"Y-m-d H:i:s\",strtotime(\"+\".RES_PRECISION.\" minutes\",strtotime($start_time)));\n\n\t\tif(strcmp($next_reservation->sched_start_time,''))\n\t\t{\n\t\t\tif(strtotime($start_time) + (DEFAULT_MAX_RES_LEN)*60 > strtotime($next_reservation->sched_start_time))\n\t\t\t{\n\t\t\t\t$end_time = $next_reservation->sched_start_time;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$end_time = date(\"Y-m-d H:i:s\",strtotime(\"+ \".DEFAULT_MAX_RES_LEN.\" minutes\",strtotime($start_time)));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$end_time = date(\"Y-m-d H:i:s\",strtotime(\"+ \".DEFAULT_MAX_RES_LEN.\" minutes\",strtotime($start_time)));\n\t\t}\n\n\t\t// if this is the biggest gap, update max gap\n\t\tif(strtotime($end_time) - strtotime($start_time) > strtotime($room->max_gap->end_time) - strtotime($room->max_gap->start_time))\n\t\t{\n\t\t\t$room->max_gap->room_section = $section;\n\t\t\t$room->max_gap->start_time = $start_time;\n\t\t\t$room->max_gap->end_time = $end_time;\n\t\t}\n\t}\n\n\treturn($room);\n}", "public abstract function hasWaitingLobby(): bool;", "function getRoomsAvailable(){\n\n global $db;\n\n $stmt= $db->prepare('SELECT room_id,branch\n FROM (\n SELECT room_id,\n room_branch AS branch\n FROM room\n WHERE NOT EXISTS (\n SELECT employee_room_id\n FROM employee\n WHERE employee_room_id = room_id\n )\n )');\n\n $stmt->execute();\n return $stmt->fetchAll();\n \n }", "function rooms_get()\n {\n // // Authenticate user (by session)\n // // Check if a user is currently logged in\n if(!$this->session->userdata('LoggedIn')){\n die(\"Login Required\");\n }\n \n // Load the device model\n $this->load->model('device_model');\n\n if($this->get('id')){\n $roomList = $this->device_model->getAvailableRooms($this->get('id'));\n }else{\n $roomList = $this->device_model->getAvailableRooms();\n }\n\n // If the deviceList is not FALSE or NULL\n if($roomList){\n $this->response($roomList, 200); // 200 being the HTTP response code\n }else{\n $this->response(NULL, 404);\n }\n }", "public static function availabilityRoom($data)\n {\n $response = self::send('apartamentos/listar_disponibles/'.$data['reserva_id'], [],2);\n\n return $response;\n }", "public function hasLobby()\n {\n return $this->lobbies()->exists();\n }", "public function isAvailable() {}", "public function isAvailable() {}", "public function isAvailable() {}", "public function isAvailable() {}", "public function isAvailable() {}", "public function isAvailable() {}", "public function isAvailable() {}", "public function isAvailable() {}", "public function isAvailable() {}", "public function isAvailable() {}", "public function isAvailable() {}", "public function isAvailable() {}", "public function isAvailable() {}", "public function isAvailable() {}", "public function isAvailable() {}", "public function isAvailable() {}", "public function isAvailable() {}", "public function isRoomEvent()\n {\n return $this->baseEvent->isRoomEvent();\n }", "public function isAvailable(): bool;", "function isAvailable() ;", "function isAvailable() ;", "function isAvailable()\n {\n }", "abstract public function isAvailable() ;", "function auth_book_admin($user, $room)\n{\n return (authGetUserLevel($user) >= 2);\n}", "public function room_check($user_id, $room){\r\n $select = preg_replace('/[^0-9]/','',$room); //remove letters from room number\r\n $male_rooms = range(100,300);\r\n $female_rooms = range(300,428);\r\n\r\n $person = $this->_db->get_assoc('students',array('user_id','=',$user_id))->results_assoc();\r\n foreach($person as $row){\r\n $sex = $row['sex'];\r\n $hostel = $row['hostel'];\r\n\r\n if($sex == 'female' && ($hostel == 'hostel_a' || in_array($select,$female_rooms))){\r\n return true;\r\n }elseif(in_array($select,$male_rooms) && $sex == 'male' ){\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }\r\n }", "public function getAllRoom(){\n $query = \"select * from $this->rooms_tableName where 1\";\n $result = $this->dbh->query($query);\n if($result->rowCount() > 0){\n return $result->fetchAll();\n }\n return null;\n }", "public function get_rooms()\n\t\t{\n\t\t\t$this->db->where(\"room_active\",1);\n\t\t\t$rooms = $this->db->get(\"rooms\");\n\t\t\treturn $rooms;\n\t\t}", "public function getIsAvailable() {}", "function getIsAvailable() ;", "public function check_avail(){ \n\t\tif(!empty($this->data['HrPermission']['per_from']) && !empty($this->data['HrPermission']['per_to']) && !empty($this->data['HrPermission']['per_date'])){\n\t\t\t// get used leave\n\t\t\t$date_str = $this->get_search_date($this->data['HrPermission']['per_date']);\n\t\t\t$this->unBindModel(array('hasOne' => array('HrPerStatus', 'HrPerUser')));\t\t\t\n\t\t\t$data = $this->find('all', array('fields' => array(\"TIME_FORMAT(SEC_TO_TIME( SUM( TIME_TO_SEC(no_hrs))), '%k:%i') as count\", 'HrPermission.id'), \n\t\t\t'conditions' => array('HrPermission.app_users_id' => $this->data['HrPermission']['user_id'], 'HrPermission.is_deleted' => 'N', 'is_approve !=' => 'R', \n\t\t\t'per_date like' => $date_str.'%')));\t\t\t\n\t\t\t$used = $data[0][0]['count'];\n\t\t\t\n\t\t\tif(empty($used)){\t\n\t\t\t\t$total_hrs = $this->data['HrPermission']['no_hrs'];\n\t\t\t}else{\n\t\t\t\t$total_hrs = $this->add_time($used, $this->data['HrPermission']['no_hrs']);\t\n\t\t\t}\n\t\t\t// find total usable hours\t\t\t\t\t\n\t\t\t$total_hrs = explode(':', $total_hrs);\t\t\t\n\t\t\t$avail = 2;\t\t\t\t\n\t\t\tif(($total_hrs[0] >= $avail && $total_hrs[1] > 0) || ($total_hrs[0] > 2)){ \n\t\t\t\treturn false;\n\t\t\t}else{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public function getIsAvailable();", "public static function is_available()\n {\n }", "public function leaveRoom()\n\t{\n\t\t//get current login user session\n\t\t$user = $this->Session->read('UserData.userName');\n\t\t$userCourse = $this->Session->read('UserData.usersCourses');\n\t\t$user_course_section = $userCourse[0];\n\n\t\t//get Course and section name\n\t\t$course_info = $this->getCourseNameOfUser($user_course_section);\n\t\t$course_name = $course_info->course_name;\n\t\t$course_section = $course_info->section_name;\n\t\t$data = $this->request->data;\n\t\t$group_name = $data['roomName'];\n\t\t$this->MeetingUser->updateAll(\n\t\t\t\tarray('MeetingUser.is_attend' => 0),\n\t\t\t\tarray('MeetingUser.chat_meeting_name' => $group_name, 'MeetingUser.to_user'=>$user)\n\t\t);\n\t\t//counting if any meeting chat is going on for the same group.\n\t\t$count = $this->MeetingUser->find('count', array('conditions'=>array('MeetingUser.chat_meeting_name' => $group_name, 'MeetingUser.is_attend'=> 1)));\n\t\tif(!$count)\n\t\t\t$this->MeetingInfo->updateAll(\n\t\t\t\t\tarray('MeetingInfo.is_active' => 0),\n\t\t\t\t\tarray('MeetingInfo.chat_meeting_name' => $group_name)\n\t\t\t);\n\t\techo \"true\";\n\t\texit;\n\t}", "function check_room_valid($target_lecture, $room_alloc)\n{\n\n // check which room is available\n // return Room-1, Room-2, Room-3, Room-4 etc.\n // or return false\n// $empty_timeslots = [];\n// for ($i = 9; $i <= 17; $i++) {\n// $empty_timeslots[$i] = false;\n// }\n $targetStartTime = $target_lecture->getStartTime();\n $targetDuration = $target_lecture->getDuration();\n $targetEndTime = $targetStartTime + $targetDuration;\n foreach ($room_alloc as $one_room_id => $list_of_lectures) {\n //check which time has been taken\n $timeslots_taken = [\n// 9 => false\n// 10\n// 11...\n ];\n for ($i = 9; $i <= 17; $i++) {\n $timeslots_taken[$i] = false;\n }\n foreach ($list_of_lectures as $oneLecture) {\n $startTime = $oneLecture->getStartTime();\n// $level = $oneLecture->getId();\n $duration = $oneLecture->getDuration();\n for ($s = $startTime; $s < ($startTime + $duration); $s++) {\n $timeslots_taken[$s] = true;\n }\n }\n\n // check if $one_lecture can be assigned to this $one_room_id\n $valid = true; // assume u can\n // find any slot that is taken\n for ($t = $targetStartTime; $t < $targetEndTime; $t++) {\n if ($timeslots_taken[$t] == true) {\n $valid = false;\n break;\n }\n }\n if ($valid == true) {\n return $one_room_id;\n }\n }\n\n return false;\n}", "public function checkLock() {\n\t\t$this->autoRender = false;\n\t\t\n\t\t$HttpSocket = new HttpSocket();\n\t\t$results = $HttpSocket->get('https://api.dropbox.com/1/search/auto/',\n\t\t\tarray(\n\t\t\t\t'query' => 'SystemIsLocked',\n\t\t\t\t'access_token' => 'YOUR_ACCESS_TOKEN'\n\t\t\t)\n\t\t);\n\t\t\n\t\tif(empty(json_decode($results->body))) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "public function testRoomMembershipNotAuthorized()\n {\n $room = $this->createRoomWithPassword('Test Password');\n $user = factory(User::class)->create();\n\n $response = $this->actingAs($user)\n ->call('GET', '/room/'.$room->id);\n $response->assertStatus(Response::HTTP_UNAUTHORIZED);\n }", "function createRoom(){\n\t\t$roomid = (int)$_POST['roomid'];\n\t\tif($roomid < 0){ throw new Exception('Invalid player');}\n\t\t$session = @mt_rand(0,99999999999);\n\t\tglobal $db;\n\t\t$q = $db -> prepare(\"SELECT * FROM game WHERE roomid = ? LIMIT 1\");\n\t\t$q->execute(array($roomid));\n\t\t$r = $q->fetch();\n\t\tif($r == null){\n\t\t\t$q = $db -> prepare(\"INSERT INTO game (sessionid,roomid,cardnorth,cardeast,cardsouth,cardwest) VALUES(?,?,?,?,?,?)\");\n\t\t\t$q->execute(array($session,$roomid,'0','0','0','0'));\n\t\t\t$q = $db -> prepare(\"INSERT INTO session (roomid, timer, hand, done, ready) VALUES(?,?,?,?,?)\");\n\t\t\t$q->execute(array($roomid,'0','0','0','0'));\t\t\t\n\t\t}\n\t\treturn true;\n\t}", "public static function isAvailable()\n\t{\n\t\treturn true;\n\t}", "function get_avaliable_rooms($fromTime, $toTime){\n global $DB, $USER, $CFG;\n\n //reservation starts: Start = S, End = E\n //Location: Above Given Start Time : A, Between given start/end: M, After End Time: E\n\n //Cases:\n //SA EA, --(start above, end above) non useful\n //SA EM, --(start above, end mid)\n //SA EE, -- (Start above, end after)\n //SM EA -- (start mid, end above) -- no useful\n //SM EM -- start mid, end mid\n //SM EE -- start mid, end after\n //SE EA -- non useful\n //SE EM -- non useful\n //SE EE -- non useful\n\n\n $sql = \"SELECT DISTINCT * FROM {roomscheduler_rooms} room \".\n\"WHERE room.active = 1 AND room.id not in ( \". //check which rooms are not avaliable\n\"SELECT DISTINCT rom.id FROM {roomscheduler_reservations} res, {roomscheduler_rooms} rom \".\n\"WHERE rom.id = res.location AND res.active=1 AND ( \".\n\"(res.startdate <= $fromTime AND res.enddate <= $toTime and res.enddate > $fromTime ) OR \". //--(start above, end mid)\n\"(res.startdate <= $fromTime AND res.enddate > $toTime ) OR \". //-- (Start above, end after)\n\"(res.startdate >= $fromTime AND res.startdate < $toTime and res.enddate > $fromTime AND res.enddate <= $toTime ) OR \". //-- start mid, end mid\n\"(res.startdate >= $fromTime AND res.startdate < $toTime AND res.enddate > $toTime )) \".//-- start mid, end after\n\");\";\n\n$rooms = $DB->get_records_sql($sql, array(), $limitfrom=0, $limitnum=0);\n\n\nprint '<center><table id=\"open_rooms_table\">';\nprint '<tr><th>'.get_string('room','block_roomscheduler');\nprint '</th><th>'.get_string('resources','block_roomscheduler');\nprint '</th><th>'.get_string('bookroom','block_roomscheduler').'</th></tr>';\nif($rooms){\n$index = 1;\nforeach($rooms as $room){\n\nprint '<tr onclick=\"\"><td>';\n\nprint \"$index. \".$room->name;\n\nprint '</td><td>';\nprint $room->resources;\nprint '</td><td>';\n\nprint '<form><center>';\nif($room->reservable){\nprint '<input type=\"image\" src=\"img/success.gif\" value=\"Book Room\" onclick=\"book_room('.$room->id.');return false;\" />';\n} else {\n$email = $CFG->roomscheduler_manage_email;\n$subject = get_string('book_room_email_subject','block_roomscheduler');\n\n$information = get_string('email_room','block_roomscheduler').\" \".$room->name . \"%0A\";\n$information .= get_string('email_start','block_roomscheduler').\" \".date( 'F n, Y @ G:i' , $fromTime ). \"%0A\";\n$information .= get_string('email_end','block_roomscheduler').\" \".date( 'F n, Y @ G:i' , $toTime ). \"%0A\";\n$information .= get_string('email_reason','block_roomscheduler').\" _______________________________%0A%0A\";\n\n$body = get_string('book_room_email_body','block_roomscheduler') . $information;\n$body .= get_string('book_room_email_close','block_roomscheduler') . $USER->firstname .\" \".$USER->lastname ;\n\n\nprint '<a href=\"mailto:'.$email.'?subject='.$subject.'&body='.$body.'\" border=\"0\">\n <img src=\"img/email.png\"></a>';\n\n}\nprint '</form></center>';\nprint '</td></tr>';\n\n\n\n\n $index++;\n}\n}\nprint '</table></center>';\n\n}", "public function listRooms()\n\t{\n\t\treturn $this->execute('roomlist', 'roomlist');\n\t}", "function canBookRoom($startDate,$endDate,$roomID)\n {\n $result = \"TRUE\";\n $query = $this->db->query(\"SELECT * FROM bookings where roomID = $roomID\");\n if($query->num_rows()>0)\n {\n $bookings=$query->result_array();\n\n\n for ($i =0 ; $i < count($bookings); $i++)\n {\n $bookStartTime = $bookings[$i][\"startDate\"];\n $bookEndTime = $bookings[$i][\"endDate\"];\n\n if ($startDate >= $bookStartTime && $startDate <=$bookEndTime)\n {\n $result = \"FALSE\";\n return $result;\n }\n if ($endDate >= $bookStartTime && $endDate <= $bookEndTime)\n {\n $result = \"FALSE\";\n return $result;\n\n }\n }\n }\n return $result;\n\n }", "public function testPageLoadsWithRoomAuthorized()\n {\n // Create a user\n $user = User::create([\n 'password' => Hash::make('password'),\n 'email' => '[email protected]',\n 'name' => 'John Doe',\n ]);\n\n // Create room\n $room = Room::create([\n 'id' => 1,\n 'name' => 'Test room',\n ]);\n\n // Login that user in\n Auth::login($user);\n\n // Get the page\n $response = $this->get('/rooms/'.$room->id);\n\n // Asser user is logged in now\n $this->assertAuthenticatedAs($user);\n\n // And that we get the expected 200 OK\n $response->assertStatus(200);\n }", "function _vaxia_dice_roller_is_ic($room) {\n $ooc_rooms = variable_get('vaxia_limbo_room', array());\n if (!empty($room->nid) && !in_array($room->nid, $ooc_rooms)) {\n return TRUE;\n }\n return FALSE;\n}", "public function isOwner(){\n return (count($this->rooms()) > 0);\n }", "public function waitingroomothersAction()\n {\n $uid = $this->_USER_ID;\n $floorId = $this->getParam('CF_floorid');\n $stealFloorId = $this->getParam('CF_stealfloorid');\n $innerUid = $this->getParam('CF_inneruid');\n\n if (empty($innerUid)) {\n return $this->_redirectErrorMsg(-1);\n }\n $mbllApi = new Mbll_Tower_ServiceApi($uid);\n $aryUser = $mbllApi->getUserInfo($innerUid);\n if (!$aryUser || !$aryUser['result']) {\n $errParam = '-1';\n if (!empty($aryUser['errno'])) {\n $errParam = $aryUser['errno'];\n }\n return $this->_redirectErrorMsg($errParam);\n }\n $this->view->userName = $aryUser['result']['nickname'];\n\n $arySameTypeFloors = array();\n if (empty($floorId)) {\n $type = $this->getParam('CF_type');\n if (!empty($type)) {\n $aryMyFloors = explode(',', $this->_user['floors']);\n foreach ($aryMyFloors as $key=>$fvalue) {\n $aryTmp = explode('|', $fvalue);\n if ($aryTmp[1] == $type) {\n $floorId = $aryTmp[0];\n $arySameTypeFloors[] = array('floor_id' => $aryTmp[0], 'floor_name' => $this->_user['floor_names'][$aryTmp[0]]);\n }\n }\n }\n }\n\n if (empty($floorId)) {\n return $this->_redirectErrorMsg(524);\n }\n\n if (count($arySameTypeFloors) > 1) {\n $this->view->arySameTypeFloors = $arySameTypeFloors;\n }\n\n if (empty($floorId) || empty($stealFloorId)) {\n return $this->_redirectErrorMsg(-1);\n }\n\n $aryRst = $mbllApi->getWaitingRoomGuestList($stealFloorId);\n if (!$aryRst || !$aryRst['result']) {\n $errParam = '-1';\n if (!empty($aryRst['errno'])) {\n $errParam = $aryRst['errno'];\n }\n return $this->_redirectErrorMsg($errParam);\n }\n\n //waiting guest data\n $lstWaiting = $aryRst['result']['list'];\n\n if (!empty($lstWaiting)) {\n foreach ($lstWaiting as $key=>$gdata) {\n $rowGuest = Mbll_Tower_GuestTpl::getGuestDescription($gdata['tp']);\n $aryTmp = explode('|', $rowGuest['des']);\n $lstWaiting[$key]['guest_name'] = $aryTmp[0];\n $lstWaiting[$key]['mode_percent'] = round($gdata['ha']/10)*10;\n $lstWaiting[$key]['remain_hour'] = floor(($gdata['ot'] - $gdata['ct'])/3600);\n $lstWaiting[$key]['remain_minute'] = strftime('%M', $gdata['ot'] - $gdata['ct']);\n $lstWaiting[$key]['ha_desc'] = Mbll_Tower_Common::getMoodDesc($gdata['ha']);\n }\n }\n\n $this->view->floorId = $floorId;\n $this->view->stealFloorId = $stealFloorId;\n $this->view->lstWaiting = $lstWaiting;\n $this->view->cntWaiting = count($lstWaiting);\n $this->view->type = $aryRst['result']['type'];\n $this->view->storeName = $aryRst['result']['name'];\n $this->view->innerUid = $innerUid;\n $this->render();\n }", "public function isAvailable(): bool\n {\n return true;\n }", "public function searchRoom()\n {\n $o_response = new \\stdclass();\n $from = Input::get('from');\n $to = Input::get('to');\n $arrEvent = $this->checkEvent($from,$to);\n $room = DB::table('rooms')->select('*')->get();\n\n $result = array();\n foreach($room as $key => $value){\n $result[] = $value->r_name;\n }\n $searchroom = array();\n foreach($arrEvent as $key => $value){\n $searchroom[] = $value->r_name;\n }\n foreach ($result as $key => $value) {\n if(in_array($value, $searchroom)){\n unset($result[$key]);\n }\n }\n if($result){\n $o_response->status = 'ok';\n $o_response->message = $result;\n }else{\n $o_response->status = 'error';\n }\n echo json_encode($o_response);\n }", "function works() {\n\t$data = createMessagePayload('Flarum is able to contact this Telegram room. Great!');\n\n\ttry {\n\t\t$result = Request::sendMessage($data);\n\n\t\treturn $result->isOk();\n\t} catch (TelegramException $e) {\n\t\treturn false;\n\t}\n}", "private function isSessionAvailable(): bool\n {\n return $this->session !== null;\n }", "function get_room_current_status($room_id,$section_id=1)\n{\n\tglobal $db;\n\n\t// print(\"id: $room_id<br>\\n\");\n\n\t// load the current status of a room section\n\tif(!strcmp($room->out_of_order,\"Yes\"))\n\t{\n\t\t$current_status = \"<s5>Out of order</s5>\";\n\t}\n\telse\n\t{\n\t\t$now = strtotime('now');\n\t\t$when_available = $now;\n\n\t\t// check to see if the room is currently checked out and/or overdue\n\t\t$select_checkout_for_room = \"select * from reservations where room_id like '$room_id' and room_section like '$section_id' and status like 'Checked Out' and active like '1'\";\n\t\t$res_checkout_for_room = $db->query($select_checkout_for_room);\n\t\tif($res_checkout_for_room->numRows() == 1)\n\t\t{\n\t\t\t$res_checkout_for_room->fetchInto($checkout_for_room);\n\t\t\t//print(\"Checkout: <br>\\n\");\n\t\t\t//pr($checkout_for_room);\n\t\t\tif(strtotime($checkout_for_room->sched_end_time) < strtotime('now'))\n\t\t\t{\n\t\t\t\t$current_status = \"<s2>Overdue</s2>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$current_status = \"<s4>Checked Out</s4>\";\n\t\t\t\t$when_available = strtotime($checkout_for_room->sched_end_time);\n\t\t\t}\n\t\t}\n\t\telse if($res_checkout_for_room->numRows() == 0)\n\t\t{\n\t\t\t// room not checked out\n\t\t\t$current_status = \"<s1>Available</s1>\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$current_status = \"<s6>Error: Multiple checkouts</s6>\";\n\t\t}\n\n\t\t$todays_hours = load_hours($db,date(\"Y-m-d\"));\n\n\t\t// locate scheduled reservations\n\t\t$select_next_reservations_for_room = \"select * from reservations where room_id like '$room_id' and room_section like '$section_id' and (status like 'Scheduled') and sched_start_time < '$todays_hours->close_time' and active like '1' order by sched_start_time\";\n\t\t$res_next_reservations_for_room = $db->query($select_next_reservations_for_room);\n\t\t$available_until = -1;\n\n\t\twhile($res_next_reservations_for_room->fetchInto($next_reservation_for_room))\n\t\t{\n\t\t\t//if(strtotime(\"+\".DEFAULT_MIN_RES_LEN.\" minutes\",$when_available) <= strtotime($next_reservation_for_room->sched_start_time))\n\t\t\tif($when_available < strtotime($next_reservation_for_room->sched_start_time))\n\t\t\t{\n\t\t\t\t// there is a gap for a reservation to start at this time\n\t\t\t\t$available_until = strtotime($next_reservation_for_room->sched_start_time);\n\n\t\t\t\tif(strtotime(\"+\".DEFAULT_MAX_RES_LEN.\" minutes\",$when_available) < $available_until)\n\t\t\t\t{\n\t\t\t\t\t// reduce to max res len\n\t\t\t\t\t$available_until = strtotime(\"+\".DEFAULT_MAX_RES_LEN.\" minutes\",$when_available);\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// no gap big enough, try the next reservation\n\t\t\t\t$when_available = strtotime($next_reservation_for_room->sched_end_time);\n\t\t\t}\n\t\t}\n\t\tif($available_until == -1)\n\t\t\t$available_until = strtotime(\"+\".DEFAULT_MAX_RES_LEN.\" minutes\",$when_available);\n\n\t\t//print(\"avail until: \".date(\"H:i:s\",$available_until).\"<br>\\n\");\n\n\t\t$room->when_available_datestamp = date(\"Y-m-d H:i:s\",$when_available);\n\n\t\t// convert when_available to a readable format\n\t\tif($when_available == $now)\n\t\t\t$room->when_available = \"Now\";\n\t\telse\n\t\t\t$room->when_available = date(\"g:ia\",$when_available);\n\t\t$minutes_until_available = ceil(($when_available - strtotime('now'))/60);\n\t\t$hours_until_available = floor($minutes_until_available/60);\n\n\t\tif($hours_until_available == 0 && $minutes_until_available == 0)\n\t\t\t$room->when_available_countdown = \"0:00\";\n\t\telse if($hours_until_available == 0)\n\t\t\t$room->when_available_countdown = \"0:\".str_pad($minutes_until_available,2,\"0\",STR_PAD_LEFT);\n\t\telse if($hours_until_available == 1)\n\t\t\t$room->when_available_countdown = \"1:\".str_pad(($minutes_until_available % 60),2,\"0\",STR_PAD_LEFT).\" min)\";\n\t\telse\n\t\t\t$room->when_available_countdown = $hours_until_available.\":\".str_pad(($minutes_until_available % 60),2,\"0\",STR_PAD_LEFT);\n\n\n\t\t// convert available until to a readable format\n\t\t// print(\"avail til: \".date(\"H:i:s\",$available_until).\"<br>\\n\");\n\t\t$minutes = date(\"i\",$available_until);\n\t\tif(($minutes % RES_PRECISION) > 0)\n\t\t{\n\t\t\t// round up by reservation precision\n\n\t\t\t$minutes = $minutes + (RES_PRECISION - ($minutes % RES_PRECISION));\n\t\t\tif($minutes < 60)\n\t\t\t{\n\t\t\t\t$room->available_until = date(\"g:\".$minutes.\"a\",$available_until);\n\t\t\t\t$room->available_until_datestamp = date(\"Y-m-d H:\".$minutes.\":00\",$available_until);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$room->available_until = date(\"g:00a\",strtotime(\"+1 hour\",$available_until));\n\t\t\t\t$room->available_until_datestamp = date(\"Y-m-d H:00:00\",strtotime(\"+1 hour\",$available_until));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$room->available_until = date(\"g:ia\",$available_until);\n\t\t\t$room->available_until_datestamp = date(\"Y-m-d H:i:00\",$available_until);\n\t\t}\n\n\t\t// print(date(\"g:i:s\",$when_available) .\" - \" . date(\"g:i:s\",strtotime($room->available_until)).\"<br>\\n\");\n\t\t$minutes_available_until = ceil((strtotime($room->available_until) - $when_available)/60);\n\t\t$hours_available_until = floor($minutes_available_until/60);\n\t\tif($hours_available_until == 0 && $minutes_available_until == 0)\n\t\t\t$room->available_until = \"Now\";\n\t\telse if($hours_available_until == 0)\n\t\t\t$room->available_until = date(\"g:ia\",strtotime($room->available_until)).\" (\".$minutes_available_until.\" min)\";\n\t\telse if($hours_available_until == 1)\n\t\t\t$room->available_until = date(\"g:ia\",strtotime($room->available_until)).\" (1 hour \".($minutes_available_until % 60).\" min)\";\n\t\telse\n\t\t\t$room->available_until = date(\"g:ia\",strtotime($room->available_until)).\" (\".$hours_available_until . \" hours \".($minutes_available_until % 60) . \" min)\";\n\n\t\t//$room->available_until .= \" (max $hours_available_until hours)\";\n\t}\n\n\tif(strcmp($room->when_available_countdown,\"0:00\") && !strcmp($current_status,\"<s1>Available</s1>\"))\n\t\t$current_status = \"<s3>Reserved</s3>\";\n\n\t$room->current_status = $current_status;\n\t//$room->current_checkout = $checkout_for_room;\n\n\treturn($room);\n\n}", "public function testRoomDoesNotExistAuthorized()\n {\n // Create a user\n $user = User::create([\n 'password' => Hash::make('password'),\n 'email' => '[email protected]',\n 'name' => 'John Doe',\n ]);\n\n // Login that user in\n Auth::login($user);\n\n // Get the page\n $response = $this->get('/rooms/1');\n\n // Asser user is logged in now\n $this->assertAuthenticatedAs($user);\n\n // And that we get the expected 404\n $response->assertStatus(404);\n }", "private function isRoomAdmin(Account $account, Room $room)\n {\n foreach ($account->getRoomsManager() as $managedRoom){\n if ($managedRoom === $room){\n return true;\n }\n }\n\n return false;\n }", "function checkSupRoom($supervisorRoom,$message){\r\n\t\tif ($supervisorRoom != NULL){\r\n\t\t\tif(strlen($supervisorRoom)<=10){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public function testRoomMembershipAuthenticated()\n {\n $user = factory(User::class)->create();\n\n $this->actingAs($user)->withHeaders([\n 'Authorization' => 'Bearer '.$user->api_token\n ])->json('POST', '/api/rooms', [\n 'name' => 'Test Room',\n 'password' => 'Test Password'\n ]);\n\n $room = Room::first();\n $response = $this->actingAs($user)\n ->call('GET', '/room/'.$room->id);\n $response->assertOk();\n }", "public static function hasReservationsTimeSlots() {\n $idTimeSlot = $_REQUEST[\"idTimeSlot\"];\n $result = DB::dataQuery(\"SELECT * FROM timeslots WHERE idTimeSlot = '$idTimeSlot'\");\n if($result != null && count($result)>0){\n return true;\n }else{\n return false;\n }\n }", "public function showRooms()\n {\n $roomModel = new \\BAServer\\Models\\Room();\n $rooms = $roomModel->getRooms();\n\n var_dump($rooms);\n return 'Rooms';\n }", "function check_availability($room, $fromTime, $toTime) {\n global $DB;\n\n //Case 1: startTime(new)->starttime(existing)->endTime(new)->endtime(existing)\n if ($reservation = get_reservation_byTime($room, $fromTime)) {\n\n return $reservation;\n\n }\n //Case 2: starttime(existing)->startTime(new)->endtime(existing)->endTime(new)\n else if ($reservation = get_reservation_byTime($room, $toTime - 600)) {\n \n return $reservation;\n }\n //Case 3: starttime(existing)->startTime(new)->endTime(new)->endtime(existing)\n //is a combination of case 1 and 2 and is therefore already taken care of\n //Case 4: startTime(new)->starttime(existing)->endtime(existing)->endTime(new)\n \n else if ($reservation = $DB->get_records_select('roomscheduler_reservations', 'location=\\'' . $room . '\\' AND active=\\'1\\' AND startdate>=\\'' . $fromTime . '\\' AND enddate<=\\'' . $toTime . '\\'',$params=null, $sort='', $fields='*', $limitfrom=0, $limitnum=1)) {\n\n if(is_array($reservation)){\n return end($reservation);\n}\n }\n //Case 5: no conflict\n else {\n return false;\n }\n}", "public function available();", "public function available();", "public static function muc_online_rooms($host = 'global') {\n\t\treturn self::runCommand(\"muc_online_rooms \". escapeshellarg($host));\n\t}", "public function testJoinPrivateRoom() {\n $room = $this->createRoomWithPassword('Test Password');\n $user = factory(User::class)->create();\n\n $room = Room::first();\n $response = $this->actingAs($user)->withHeaders([\n 'Authorization' => 'Bearer '.$user->api_token\n ])->json('POST', '/api/room/'.$room->id.'/membership', [\n 'password' => 'Test Password'\n ]);\n\n $response->assertOk();\n $this->assertDatabaseHas('room_memberships',\n ['room_id' => $room->id, 'user_id' => $user->id]);\n }", "public function noReservationsAvailableCase1()\n\t{\t\n\t\t$reservation = new Reservation();\n\t\t$reservation->setAttributes(array(\n\t\t\t\t'roomid' => 1,\n\t\t\t\t'datefrom' => $this->_dateOverlapFrom,\n\t\t\t\t'numberofnights'=> $this->_numberofnights,\n\t\t\t\t));\n\t\t$this->assertFalse($reservation->save()); \n\t}", "private function existsRoomUser($userId, $roomId) {\n\n\t\t\t$connection = new Connection();\n\t\t\t$mysqliConnection = $connection->openConnection();\n\n\t\t\t$query = \"SELECT id, user_id, room_id, time_mod\n\t\t\t\t\t FROM chat_users_rooms WHERE `user_id` = '$userId' AND `room_id` ='$roomId';\";\n\t\t\t$queryResult = mysqli_query($mysqliConnection, $query) or trigger_error(\"Query: $mysqliConnection\\n<br />MySQL Error: \" . mysqli_error($mysqliConnection));\n\n\t\t\t$match = false;\n\t\t\tif (mysqli_num_rows($queryResult) == 1) {\n\t\t\t\t$match = true;\n\t\t\t}\n\n\t\t\t$connection->closeConnection();\n\t\t\treturn $match;\n\t\t}", "function isGuestLoginAvailable()\n{\n\treturn false;\n}", "public function testRoomDataIsShown()\n {\n // Create a user\n $user = User::create([\n 'password' => Hash::make('password'),\n 'email' => '[email protected]',\n 'name' => 'John Doe',\n ]);\n\n // Create room\n $room = Room::create([\n 'id' => 1,\n 'name' => 'Test room',\n ]);\n\n // Login that user in\n Auth::login($user);\n\n // Get the page\n $response = $this->get('/rooms/1');\n\n // Asser user is logged in now\n $this->assertAuthenticatedAs($user);\n\n // And that we get the expected 200 OK\n $response->assertStatus(200);\n\n // And that the room data is shown\n $response->assertSee('Transtrationer for konto id: '.$room->id);\n }", "public function joinRoomAction()\n {\n \t$userDto = Zend_Registry::get('api_user');\n \t$rooms = $this->getBusiness()->getRoomByState($userDto, Dto_ChatRoomUser::STATE_JOIN);\n \t\n \t$roomArray = $rooms->toArray(array('room_id', 'created_at'));\n \t$this->success(array('rooms' => $roomArray));\n }", "public function testCanReturnRooms()\n {\n $mocks = $this->mockDependencies();\n $repository = $mocks[2];\n $collections = $repository->getRooms()[0];\n $rooms = $collections[0];\n $response = $this->get('api/rooms');\n $data = json_decode($response->content(), true);\n $content = $data['data'][0];\n $response->assertStatus(200);\n $this->assertEquals(count($data['data']), 12);\n $this->assertArrayHasKey('room',$content);\n $this->assertEquals($rooms->name,$content['room']);\n $this->assertArrayHasKey('code',$content);\n $this->assertEquals($rooms->code,$content['code']);\n $this->assertArrayHasKey('hotel',$content);\n $this->assertEquals($rooms->hotel->name,$content['hotel']);\n $this->assertArrayHasKey('hotelStars',$content);\n $this->assertEquals($rooms->hotel->stars,$content['hotelStars']);\n }", "public function admin_check_RoomNo()\n {\n if($_POST['edit']==''){\n $hostel_rooms_seats = $this->db->select('*')->where('hostel_id',$_POST['hostel_id'])->where('block_id',$_POST['block_id'])->where('floor_id',$_POST['floor_id'])->where('room_no',$_POST['room_no'])->get('hostel_rooms_seats')->row();\n\n }else{\n $hostel_rooms_seats = $this->db->select('*')->where('hostel_id',$_POST['hostel_id'])->where('block_id',$_POST['block_id'])->where('floor_id',$_POST['floor_id'])->where('room_no',$_POST['room_no'])->where('id <>',$_POST['edit'])->get('hostel_rooms_seats')->row();\n }\n\n if(empty($hostel_rooms_seats)){\n echo \"ok\"; exit();\n }else{\n echo \"not\"; exit();\n }\n\n }", "public function getRoom()\n {\n return $this->room;\n }", "public function check_availability() {\n \n if ( ( $this->client_id != '' ) AND ( $this->client_secret != '' ) ) {\n \n return true;\n \n } else {\n \n return false;\n \n }\n \n }", "public function show(Room $room)\n {\n //\n }", "public function show(Room $room)\n {\n //\n }", "public function show(Room $room)\n {\n //\n }", "public function show(Room $room)\n {\n //\n }", "public function show(Room $room)\n {\n //\n }", "public function UsernameAvailable()\n\t{\n\t\tinclude(\"Connection.php\");\n\t\t$usernameAvailSql = \"SELECT Naam FROM Gebruiker WHERE Naam = '\".$this->Name.\"'\";\n\t\t$v_Result = $link->query($usernameAvailSql);\n\t\tif($v_Result->num_rows>0)\n\t\t{\n\t\t\t//gebruikersnaam bestaat al\n\t\t\treturn(false);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn(true);\n\t\t}\n\t\tmysqli_close($link);\n\n\t}", "public function testJoinPublicRoom()\n {\n $room = factory(Room::class)->create();\n $user = factory(User::class)->create();\n\n $response = $this->actingAs($user)->withHeaders([\n 'Authorization' => 'Bearer '.$user->api_token\n ])->json('POST', '/api/room/'.$room->id.'/membership', [\n 'name' => 'Test Room',\n ]);\n $response->assertOk();\n $this->assertDatabaseHas('room_memberships',\n ['room_id' => $room->id, 'user_id' => $user->id]);\n }", "public function isLocked() {}", "public function is_accessible() {\n $available = $this->properties->available;\n $deadline = $this->properties->deadline;\n return (($available == 0 || time() >= $available) && ($deadline == 0 || time() < $deadline));\n }", "public function testNoReservationsAvailable()\n\t{\n\t\t$this->resetReservationTable();\n\t\t$this->resetDateTimes();\n\t\t\n\t\t//We should be able to reserver two rooms max, as this is the quantity of the room type\n\t\t$reservation = new Reservation();\n\t\t$reservation->setAttributes(array(\n\t\t\t\t'roomid' => 1,\n\t\t\t\t'datefrom' => $this->_dateOverlapFrom,\n\t\t\t\t'numberofnights'=> $this->_numberofnights,\n\t\t\t\t));\n\t\t$this->assertTrue($reservation->save());\n\t\t\n\t\t$reservation = new Reservation();\n\t\t$reservation->setAttributes(array(\n\t\t\t\t'roomid' => 1,\n\t\t\t\t'datefrom' => $this->_dateOverlapFrom,\n\t\t\t\t'numberofnights'=> $this->_numberofnights,\n\t\t\t\t));\n\t\t$this->assertTrue($reservation->save());\n\t\t\n\n\t\t/**\n\t\t * Test the date overlapping works correctly\n\t\t * Date From |------| Date To\n\t\t * *************************************************************************************\n\t\t * Original Reservation |---------------|\n\t\t * Case 1 |---------------|\n\t\t * Case 2 |--------------------------|\n\t\t * Case 3 |------|\n\t\t * Case 4 |-------------|\n\t\t * Case 5 |------------------|\n\t\t * *************************************************************************************\n\t\t */\n\t\t$this->noReservationsAvailableCase1($reservation);\n\t\t$this->noReservationsAvailableCase2($reservation);\n\t\t$this->noReservationsAvailableCase3($reservation);\n\t\t$this->noReservationsAvailableCase4($reservation);\n\t\t$this->noReservationsAvailableCase5($reservation);\n\n\t}", "function iamhere(){\nglobal $XUSER, $SERVER, $ROOMS;\nDoQuery(\"DELETE FROM $SERVER[TBL_PREFIX]online WHERE username='$XUSER[NAME]'\");\ncleanOnline();\nDoQuery(\"INSERT INTO $SERVER[TBL_PREFIX]online VALUES('0','$XUSER[NAME]','$XUSER[IP]','$ROOMS[IN_ROOM_NAME]','$SERVER[CURRENT_TIME]')\");\n$time = time();\nif($ROOMS['TIME'] != 0){\nDoQuery(\"UPDATE $SERVER[TBL_PREFIX]rooms SET time='$time' WHERE name='$ROOMS[IN_ROOM_NAME]'\");\n}\nif($XUSER['TIME'] != 0){\nDoQuery(\"UPDATE $SERVER[TBL_PREFIX]users SET time='$time' WHERE username='$XUSER[NAME]'\");\n}\ncleanusers();\n}", "public function isLocked();", "public function isLocked();", "public function isLocked();", "private function existUdetails($roomId, $start, $end){\n $query = \"SELECT ud_id FROM unavailabilitydetails WHERE room_id = :room_id AND ud_from_date < :start AND ud_to_date > :end\";\n $stmt = $this->conn->prepare($query);\n $stmt->bindValue('room_id', $roomId);\n $stmt->bindValue('start', $start);\n $stmt->bindValue('end', $end);\n $stmt->execute();\n $existOne = $stmt->rowCount() > 0;\n if($existOne){\n return true;\n }\n\n /*elimino la disponibilidades si caen dentro*/\n $query = \"DELETE FROM unavailabilitydetails WHERE room_id = :room_id AND ud_from_date >= :start AND ud_to_date <= :end\";\n $stmt = $this->conn->prepare($query);\n $stmt->bindValue('room_id', $roomId);\n $stmt->bindValue('start', $start);\n $stmt->bindValue('end', $end);\n $stmt->execute();\n /*$deleteOne = $stmt->rowCount() > 0;\n if($deleteOne){\n return false;\n }*/\n\n /*Actualizar la no disponibilidad que el start cae dentro de la no disponibilidad*/\n $ud_to_date_new = (new \\DateTime($start))->modify('-1 day')->format('Y-m-d');\n $query = \"UPDATE unavailabilitydetails SET ud_to_date = :ud_to_date WHERE room_id = :room_id AND ud_from_date < :start AND ud_to_date >= :start\";\n $stmt = $this->conn->prepare($query);\n $stmt->bindValue('ud_to_date', $ud_to_date_new);\n $stmt->bindValue('room_id', $roomId);\n $stmt->bindValue('start', $start);\n $stmt->execute();\n /*$modifOne = $stmt->rowCount() > 0;\n if($modifOne){\n $aa = 1;\n }*/\n\n /*Actualizar la no disponibilidades que el end cae dentro de la no disponibilidad*/\n $ud_from_date_new = (new \\DateTime($end))->modify('+1 day')->format('Y-m-d');\n $query = \"UPDATE unavailabilitydetails SET ud_from_date = :ud_from_date WHERE room_id = :room_id AND ud_from_date <= :xend AND ud_to_date > :xend\";\n $stmt = $this->conn->prepare($query);\n $stmt->bindValue('ud_from_date', $ud_from_date_new);\n $stmt->bindValue('room_id', $roomId);\n $stmt->bindValue('xend', $end);\n $stmt->execute();\n /*$modifOne = $stmt->rowCount() > 0;\n if($modifOne){\n $aa = 1;\n }*/\n\n return false;\n }", "public function isOnline() {}", "public function invitedRoomAction()\n {\n \t$userDto = Zend_Registry::get('api_user');\n \t$rooms = $this->getBusiness()->getRoomByState($userDto, Dto_ChatRoomUser::STATE_INVITED);\n \t\n \t$roomArray = $rooms->toArray(array('room_id', 'created_at'));\n \t$this->success(array('rooms' => $roomArray));\n }", "public function CheckActiveMeeting()\n\t{\n\t\t//get current login user session\n\t\t$user = $this->Session->read('UserData.userName');\n\t\t$userCourse = $this->Session->read('UserData.usersCourses');\n\t\t$user_course_section = $userCourse[0];\n\n\t\t//get Course and section name\n\t\t$course_info = $this->getCourseNameOfUser($user_course_section);\n\t\t$course_name = $course_info->course_name;\n\t\t$course_section = $course_info->section_name;\n\t\t//get user session\n\t\t$currenttime = time();\n\t\t$userJoinTime = $currenttime;\n\t\t$extra_time = Configure::read('extra_meetingtime');//done in bootstrap\n\t\t$data = $this->request->data;\n\t\t$group_name = $data['roomname'];\n\t\t$requests = $this->MeetingInfo->find('first',array(\n\t\t\t\t'conditions'=>array('MeetingInfo.chat_meeting_name'=>$group_name)\n\t\t));\n\t\t$meeting_date = $requests['MeetingInfo']['chat_meeting_startdate'];\n\t\t$meeting_active = $requests['MeetingInfo']['is_active'];\n\t\t$meeting_start_date = $meeting_date;\n\t\t$meeting_end_date = $meeting_start_date+$extra_time;\n\t\tif((($userJoinTime <= $meeting_end_date) && ($userJoinTime >= $meeting_start_date)) || $meeting_active)\n\t\t\techo 1;\n\t\telse\n\t\t\techo 0;\n\t\texit;\n\t}", "function isLevelAvailable($level)\n {\n\n // define all the global variables\n global $database, $message;\n\n // check for empty object given\n if ($level == \"\") {\n return false;\n }\n\n // check in database if exists\n $sql = \"SELECT COUNT(*) FROM \" . TBL_LEVELS . \" WHERE \" . TBL_LEVELS_LEVEL . \" = '$level'\";\n\n // get the sql results\n if (!$result = $database->getQueryResults($sql)) {\n return false;\n }\n\n // grab the results\n $row = $database->getQueryEffectedRow($result, true);\n\n // check if any values has been returned\n if ($row[0] > 0) {\n return true;\n } else {\n return false;\n }\n }", "function IsHotelManager($user_id) {\n global $DB , $Hotel_ID;\n $stmt = $DB->prepare(\"SELECT * FROM hotel WHERE manager_id = ?\");\n $stmt->bindParam(1, $user_id);\n if ($stmt->execute()) {\n if ($row = $stmt->fetch()) {\n $Hotel_ID = $row[\"hotel_id\"];\n return true;\n }\n }\n return false;\n}", "public function hasAvailableHotels()\n {\n return ($this->hotelCount > 0);\n }", "public static function setRoomAvailability(&$rooms, $items_reserved, $hotel_id, $startDate ,$endDate, $confirmationId=0){\r\n\t\t$app = JFactory::getApplication();\r\n\t\t$rooms_reserved = self::getNumberOfBookingsPerDay($hotel_id, $startDate ,$endDate, $confirmationId);\r\n\t\t$temporaryReservedRooms = self::getReservedRooms($items_reserved);\r\n\t\t//dmp(\"T\");\r\n\t\t//dmp($temporaryReservedRooms);\r\n\r\n\t\t\r\n\t\tforeach($rooms as $room){\r\n\t\t\t//\tdmp(\"NR: \".$room->room_id.\" \".$room->nrRoomsAvailable);\r\n\t\t\t//dmp($room->daily);\r\n\t\t\tforeach($room->daily as $day){\r\n\t\r\n\t\t\t\t$totalNumberRoomsReserved = 0;\r\n\t\t\t\t//dmp($day[\"data\"]);\r\n\t\t\t\tif(isset($rooms_reserved[$room->room_id][$day[\"date\"]])){\r\n\t\t\t\t\t$totalNumberRoomsReserved = $rooms_reserved[$room->room_id][$day[\"date\"]];\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(isset($temporaryReservedRooms[$room->room_id])){\r\n\t\t\t\t\t$totalNumberRoomsReserved += $temporaryReservedRooms[$room->room_id];\r\n\t\t\t\t}\r\n\t\t\t\t// No remember me for admin\r\n\t\t\t\tif (!$app->isAdmin()) {\r\n\t\t\t\t\t$totalNumberRoomsReserved+=1;\r\n\t\t\t\t}\r\n\t\t\t\tif(intval($day[\"nrRoomsAvailable\"]) < $totalNumberRoomsReserved )\r\n\t\t\t\t{\r\n\t\t\t\t\t$room->is_disabled = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}" ]
[ "0.7127772", "0.68477005", "0.6688681", "0.6664702", "0.66568166", "0.6648655", "0.6578771", "0.64277655", "0.64022213", "0.64022213", "0.64022213", "0.64009225", "0.64009225", "0.64009225", "0.64009225", "0.64009225", "0.64009225", "0.64009225", "0.64009225", "0.64009225", "0.64009225", "0.64009225", "0.64009225", "0.64009225", "0.64009225", "0.6328474", "0.62287176", "0.6228362", "0.6228362", "0.62065715", "0.6205884", "0.62058824", "0.6162158", "0.6109094", "0.607884", "0.6053995", "0.6053628", "0.60276353", "0.60227954", "0.60162973", "0.5998494", "0.59922105", "0.5956974", "0.5942726", "0.58651274", "0.58645886", "0.5849642", "0.58311045", "0.58268595", "0.58238614", "0.58097374", "0.5808464", "0.5806561", "0.5799112", "0.5795733", "0.5782644", "0.5779091", "0.57613164", "0.5748621", "0.57333064", "0.5728166", "0.5723139", "0.5720551", "0.5719796", "0.57112575", "0.5704047", "0.5704047", "0.5695823", "0.5691775", "0.5662988", "0.56627357", "0.56592286", "0.56557673", "0.5651132", "0.56503886", "0.5641538", "0.56188023", "0.5617154", "0.56113625", "0.56113625", "0.56113625", "0.56113625", "0.56113625", "0.5608287", "0.56006193", "0.5598992", "0.5586979", "0.55842376", "0.557453", "0.556959", "0.556959", "0.556959", "0.55681556", "0.5565531", "0.55553377", "0.555198", "0.55512315", "0.55465084", "0.55367535", "0.55189115" ]
0.6520754
7
Extract the second of a day from a DateTime object
private function datetime2second($date) { return intval($date->format('G'))*3600+intval($date->format('i'))*60+intval($date->format('s')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function stampToSecond($stamp)\n {\n $date = Calendar_Engine_PearDate::stampCollection($stamp);\n return (int)$date->second;\n }", "function get_day()\n {\n $datearray=getdate($this->timestamp);\n return $datearray[\"mday\"];\n }", "function second()\r\n {\r\n $value = $this->SecondsElapsed;\r\n\r\n $second = $value % 60;\r\n\r\n return $second;\r\n }", "public function day() {\n return $this->day;\n }", "public static function getDaySecondsOfDateTime(\\DateTimeInterface $dateTime): int\n {\n $hours = (int)$dateTime->format('G');\n $minutes = $hours * self::SECONDS_MINUTE + (int)$dateTime->format('i');\n\n return $minutes * self::SECONDS_MINUTE + (int)$dateTime->format('s');\n }", "public function getDayOrdinal()\r\n\t{\r\n\t\treturn $this->format('jS');\r\n\t}", "public function getSecond(string $field = 'created_at'): string\n {\n return $this->parseCarbon($this->$field)->format(\"s\");\n }", "public function getDay() : int \n {\n return $this->day;\n }", "public function getFirstDay(){$day = getdate(mktime(0, 0, 0, $this->getMonth(), 1, $this->getYear())); return $day['wday'];}", "public function getDay()\n {\n return $this->day;\n }", "public function getDay()\n {\n return $this->day;\n }", "protected function getDay(string $day) {\n return $day;\n }", "public function getDay()\n {\n return $this->_getDateValue('d');\n }", "function DateToSec($date)\n{\n $date = ltrim($date);\n $arr = explode(\"-\", $date);\n if( count($arr) == 1 ) {\n $arr = explode(\"/\", $date);\n }\n if( count($arr) != 3 ) {\n return \"\";\n }\n return(mktime(0,0,0, $arr[0], $arr[1], $arr[2]));\n}", "public function getForecastDay($day)\n {\n return $this->_periods[$day];\n }", "function unix_to_jd($t) {\n\t\treturn ( UNIX_EPOCH + t / SECS_IN_DAY);\n\t}", "function getDay(){\r\n return date('l',$this->timestamp);\r\n }", "public static function getNormalizedDaySecondsOfDateTime(\\DateTimeInterface $dateTime): int\n {\n $date = self::normalizeDateTimeSingle($dateTime);\n\n return self::getDaySecondsOfDateTime($date);\n }", "public static function getDateFromSeconds($scd) {\n $date = date('m/d/Y h:i:s', time());\n $stamp = strtotime($date) - $scd;\n return date(\"d/m/y\", $stamp);\n }", "function date_day($date){\r\n\t$day = NULL;\r\n\tfor($i = 0; $i < strlen($date); $i++){\r\n\t\tif(is_numeric(substr($date, $i, 1))){\r\n\t\t\t$day .= substr($date, $i, 1);\r\n\t\t}else{\r\n\t\t\treturn $day;\r\n\t\t}\r\n\t}\r\n\treturn $day;\r\n}", "function day($day= 1)\n{\n return $day * 24 * 60 *60;\n}", "function day_from_iso_date($date) {\n $datetime = date_create($date);\n $d = date_format($datetime,\"D\");\n switch ($d) {\n case 'Sun':\n return 1;\n case 'Mon':\n return 2;\n case 'Tue':\n return 3;\n case 'Wed':\n return 4;\n case 'Thu':\n return 5;\n case 'Fri':\n return 6;\n case 'Sat':\n return 7;\n default:\n return 0;\n }\n}", "public function getDay(){\n\t\treturn $this->_day;\n\t}", "function getrsstime($d) \r\n{ \r\n $parts=explode(' ',$d); \r\n $month=$parts[2]; \r\n $monthreal=getmonth($month);\r\n $time=explode(':',$parts[4]); \r\n $date=\"$parts[3]-$monthreal-$parts[1] $time[0]:$time[1]:$time[2]\"; \r\n return $date;\r\n}", "function get_day_of_week($day)\n{\n return jddayofweek($day, 1);\n}", "public function getTimeOfDay() {\n\t\treturn $this->_time_of_day;\n\t}", "function int_to_day($int){\n\tglobal $days;\n\treturn $days[$int];\n}", "function DateTimeToInt ($s) {\n\tGlobal $iTimeType;\n\t\n\t$y = (int)substr($s, 0, 4);\t\t// year\n\t$m = (int)substr($s, 4, 2);\t\t// month\n\t$d = (int)substr($s, 6, 2);\t\t// day\n\t$h = (int)substr($s, 8, 2);\t\t// hour\n\t$n = (int)substr($s,10, 2);\t\t// minute\n\t\n\tif ($m < 1) $m = 1;\n\tif (12 < $m) $m = 12;\n\tif ($d < 1) $d = 1;\n\tif (31 < $d) $d = 31;\n\tif ($h < 0) $h = 0;\n\tif (23 < $h) $h = 23;\n\tif ($n < 0) $n = 0;\n\tif (59 < $n) $n = 59;\n\t\n\tif ($iTimeType == 1) {\n\t\t$z = (int)substr($s,12, 2);\t// second\n\t\tif ($y < 1970) $y = 1970;\n\t\tif (2037 < $y) $y = 2037;\n\t\tif ($z < 0) $z = 0;\n\t\tif (59 < $z) $z = 59;\n\t\treturn mktime($h,$n,$z,$m,$d,$y);\n\t}\n\t\n\t$y -= 2000;\n\tif ($y < 0) $y = 0;\n\tif (213 < $y) $y = 213;\n\treturn ($y*10000000)+((50+$m*50+$d)*10000) + ($h*100) + $n;\t// 3+3+2+2\n}", "public function calculateDay()\r\n {\r\n return date('N', strtotime($this->getDate())) - 1;\r\n }", "public static function getSecondsToWholeDays($seconds) {\n\t\treturn round($seconds / (3600 * 24));\n\t}", "private function time_to_second($time) {\n\t\tlist($h, $m, $s) = explode(':', $time);\n\t\t$s += $h * 3600 + $m * 60;\n\t\treturn $s;\n\t}", "function stampToDay($stamp)\n {\n $date = Calendar_Engine_PearDate::stampCollection($stamp);\n return (int)$date->day;\n }", "function getday($txt)\n {\n\t\n\t return substr($txt,8,2);\n }", "public static function getDay($date) {\r\n if (gettype($date) == 'string') {\r\n $laDate = new \\DateTime($date);\r\n }\r\n else {\r\n $laDate = $date;\r\n }\r\n return $laDate->format('d');\r\n }", "public function subSeconds($n)\n {\n return new Date($this->timestamp - $n, $this->timezone);\n }", "public function getDay()\n {\n $day = rand(1, 30);\n if ($day < 10) $day = '0' . $day;\n return $day;\n }", "public function getDay(): string\n {\n return $this->toLocalizedString('d');\n }", "function getDay($dayIndex)\n{\n return date('l', strtotime(\"Sunday +{$dayIndex} days\"));\n}", "function to_day($datetime)\n {\n return strtoupper(date('l', strtotime($datetime)));\n }", "public function getDay() : string\n {\n return date('d', $this->getUnixTimestamp());\n }", "public function tuesdays()\n {\n return $this->days(2);\n }", "public function second($callback = null)\n {\n return $this->seconds($callback);\n }", "static private function getDate($day) {\n\t\treturn $day->getElementsByTagName('h3')->item(0)->nodeValue;\n\t}", "function returnDay($date){\r\n\t\t$Newddate = explode(\" \",$date);\r\n $Newddate = substr($Newddate[0],0, 10);\r\n\t\t//$day = date('l', $Newdate);\r\n\t\t$day = date(\"l\", strtotime($Newddate));\r\n return($day);\r\n }", "private function getDayDate($day)\n {\n $day = intval($day);\n $y = $this->year;\n $m = intval($this->month);\n $m = $m < 10 ? '0' . $m : $m;\n $d = intval($day);\n $d = $d < 10 ? '0' . $d : $d;\n $date = $y . '-' . $m . '-' . $d;\n return $date;\n }", "function TimeToSec($time) {\n\t$dot2 = strpos($time, ':');\n\tif($dot2 > 0) {\n\t\t$min = substr($time, 0, $dot2);\n\t\t$time = substr($time, $dot2+1);\n\t}\n\t\t\n\t$time = ($min * 60) + $time;\n\treturn $time;\n}", "public function findOneByDay(\\DateTime $date);", "public static function firstSecondOfDay(int $epoch = null, bool $gmt = false) {\r\n $epoch = $epoch ?? time();\r\n $function = $gmt ? 'gmmktime' : 'mktime';\r\n return $function(0, 0, 0, date('n', $epoch), date('j', $epoch),\r\n date('Y', $epoch));\r\n }", "public function getSecond(): string\n {\n return $this->toLocalizedString('s');\n }", "public function getDayOfYear(): string\n {\n return $this->toLocalizedString('D');\n }", "function get_date($day, $year) {\n\t\t\t\t\n\t\t\t\t$number_date = date('D d F, Y', mktime(0, 0, 0, 0+1, $day, $year));\n\t\t\t\t\n\t\t\t\treturn $number_date;\n\t\t\t\n\t\t\t}", "public function getCounterOfDay($day = 0) {\n\t\t$day = (0 === $day OR $day > 31 OR $day < 1) ? $this->Request->day : $day;\n\t\t$this->Db->query(\"SELECT * FROM `yp_stat` \n\t\t\tWHERE `day` = {$day} \n\t\t\t\tAND `month` = {$this->Request->month}\n\t\t\t\tAND `year` = {$this->Request->year}\");\n\t\tif ($this->Db->num_rows() == 0) return 0;\n\n\t\t$stat = $this->Db->fetch_object();\n\t\treturn (int) $stat->value;\n\t}", "function TimeToDays($num) {\n\t$dateVal = $num/86400;\n\nreturn $dateVal;\n}", "public function dailyAt($time)\n {\n $segments = explode(':', $time);\n\n return $this->spliceIntoPosition(2, (int)$segments[0])\n ->spliceIntoPosition(1, count($segments) == 2 ? (int)$segments[1] : '0');\n }", "private function getTijd($datum_tijd) {\n date_default_timezone_set('Europe/London');\n $tijd = date('H:i', strtotime($datum_tijd));\n return $tijd;\n }", "public static function datetimeToTs($datetime)\n {\n /*\n $keys = array('ye', 'mo', 'da', 'hr', 'mi', 'se');\n $values = \\sscanf($datetime, '%4s%2s%2s%2s%2s%2s');\n $parts = array_combine($keys, $values)\n return \\mktime($parts['hr'], $parts['mi'], $parts['se'], $parts['mo'], $parts['da'], $parts['ye']);\n */\n $datetime = self::getDateTime($datetime);\n return (int) $datetime->format('U');\n }", "function getDay()\r\n {\r\n return $this->dia;\r\n }", "public function countSecond($beginDate,$endDate){\n\t\t$beginDate = new DateTime('2010-01-01 10:12:55');\n\t\t$endDate = new DateTime('2010-01-01 10:17:55');\n\t\t$interval = $endDate->diff($beginDate);\n\n\t\treturn $interval->format('%s');\n\t}", "function getDayIndex($dateString)\n{\n return date('w', strtotime($dateString));\n}", "public function GetDay($leadingZero = true) {\n return $leadingZero ? $this->format('d') : $this->format('j');\n }", "static public function findDateTimeStep($stepValue) {\r\n $tmpDateTimeStep = new DateTimeStep();\r\n for ($t = DateTimeStep::$ONEYEAR - 1;\r\n $t >= DateTimeStep::$ONEMILLISECOND; $t--) {\r\n if ((abs($tmpDateTimeStep->STEP[$t] - $stepValue)) <\r\n ($tmpDateTimeStep->STEP[DateTimeStep::$ONEMILLISECOND])) {\r\n return $t;\r\n }\r\n }\r\n return DateTimeStep::$NONE;\r\n }", "function MyDateTimestamp($date)\r\n{\r\n\treturn gmmktime(\r\n\t\tsubstr($date, 11, 2), //h\r\n\t\tsubstr($date, 14, 2), //i\r\n\t\tsubstr($date, 17, 2), //s\r\n\t\tsubstr($date, 5, 2), //m\r\n\t\tsubstr($date, 8, 2), //d\r\n\t\tsubstr($date, 0, 4) //y\r\n\t);\r\n}", "public function getSvrtime()\n {\n $value = $this->get(self::SVRTIME);\n return $value === null ? (integer)$value : $value;\n }", "function convert_seconds_to_dhms($sec, $showhoursonly = false) {\n\tif (!is_numericint($sec)) {\n\t\treturn '-';\n\t}\n\t// FIXME: When we move to PHP 7 we can use \"intdiv($sec % X, Y)\" etc\n\tlist($d, $h, $m, $s) = array(\t(int)($showhoursonly ? 0 : $sec/86400),\n\t\t\t\t\t(int)(($showhoursonly ? $sec : $sec % 86400)/3600),\n\t\t\t\t\t(int)(($sec % 3600)/60),\n\t\t\t\t\t$sec % 60\n\t\t\t\t);\n\treturn ($d > 0 ? $d . 'd ' : '') . sprintf('%02d:%02d:%02d', $h, $m, $s);\n}", "public function getSeconds() : string\n {\n return date('s', $this->getUnixTimestamp());\n }", "public function valueOf()\n {\n return $this->getPreciseTimestamp(3);\n }", "function days($day, $month, $year) {\n\t\t// Hour, Minute, Second, Month, Day, Year\n\t\t$target = mktime(0, 0, 0, $month, $day, $year);\n\t\t$today = time();\n\t\t$difference = ($target - $today);\n\t\t$days = (int)($difference/86400); // 86400 being the number of seconds in a day\n\t\t\n\t\t// Make sure that we show the correct number of zeros when the number gets smaller\n\t\t// + if the date passes then we don't show a minus value\n\t\tif ($days < 0) {\n\t\t\t$days = '000';\n\t\t} else if ($days < 10) {\n\t\t\t$days = '00'.$days;\n\t\t} else if ($days < 100) {\n\t\t\t$days = '0'.$days;\n\t\t} \n\t\t\n\t\t// Needs to be returned as a String so we can split it into individual characters\n\t\treturn (String)$days;\n\t}", "protected function getNextOccurrence($day, \\DateTime $date)\n {\n if (strtolower($date->format('l')) === strtolower($day)) {\n return $date;\n }\n\n return new \\DateTime(\"next {$day} {$date->format('c')}\");\n }", "public function getDay($leadingZero = false)\r\n\t{\r\n\t\tif ($leadingZero)\r\n\t\t{\r\n\t\t\treturn $this->format('d');\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn $this->format('j');\r\n\t\t}\r\n\t}", "public function getRunningSecond()\n {\n return $this->get(self::RUNNING_SECOND);\n }", "public function __day ( $sField, $mValue )\n {\n return \"EXTRACT(DAY FROM $sField) = $mValue\";\n }", "function diffInSeconds ($firstDate, $secondDate)\n\t{\n\t\t$diff = $firstDate - $secondDate;\n\t\treturn $diff;\n\t}", "public function getClosedInvoicedate($dt)\n {\n return (new Options)->ConvertOneTzToAnotherTz($dt, 'UTC', $_SESSION['usrTZ'],'MDY');\n }", "function time2sec($time){\n\t// Parameters: \t$time\n\t//\t\t\t\tType: string\n\t//\t\t\t\tFormat: dd:hh:mm:ss\n\t// Returns:\t\tinteger\n\n\t$day = 86400;\n\t$hour = 3600;\n\t$minute = 60;\n\n\t$tc = explode(\":\", $time, 4);\n\tif(!is_array($tc)) return false;\n\tif(sizeof($tc)== 2){\n\t\t\n\t\t// This time has only minutes and seconds\n\t\t$seconds = (intval($tc[0]) * $minute) + (intval($tc[1]));\n\t}elseif(sizeof($tc) == 3){\n\t\n\t\t// This time has hours minutes and seconds\n\t\t$seconds = (intval($tc[0]) * $hour) + (intval($tc[1]) * $minute) + intval($tc[2]);\n\t}elseif(sizeof($tc) == 4){\n\t\t\n\t\t// This time has days, hours, and minutes\n\t\t$seconds = (intval($tc[0]) * $day) + (intval($tc[1]) * $hour) + (intval($tc[2]) * $minute) + intval($tc[3]);\n\t}else{\n\t\t// Something is wrong\n\t\treturn false;\n\t}\n\t\n\treturn $seconds;\n}", "public function convertDateTime(\\DateTime $oDateTime)\n {\n return $oDateTime->getTimestamp();\n }", "public static function yersterday(): string\n {\n $d = new DateTime;\n $i = new DateInterval(\"P1D\");\n $d->sub($i);\n return $d->format(\"Y-m-d\");\n }", "public function getUpdatedAtAttribute($value)\n {\n \treturn Carbon::parse($value)->toDayDateTimeString();\n }", "private static function _dateTime($dt)\n {\n return $dt->format(\\DateTime::ATOM);\n }", "public function getSeconds(): int\n {\n return $this->seconds;\n }", "public function nanoSeconds()\n {\n return $this->nanoSeconds === null\n ? (int) $this->value->format('u') * 1000\n : $this->nanoSeconds;\n }", "function getDayInMonthFromDate ($theDate)\n\t{\n\t\tif (gettype($theDate) == 'string')\n\t\t{\n\t\t\t$theDate = strtotime ($theDate);\n\t\t}\n\t\t$dateArray = getdate ($theDate);\n\t\treturn $dateArray ['mday'];\n\t}", "public static function secund($sec)\n {\n $time = round($sec);\n return sprintf('%02d godz. %02d min. %02d sek.', ($time/3600),($time/60%60), $time%60);\n }", "function convertDays($days){\n\t\treturn $seconds = $days * 86400;\n\t}", "function getMarketDay($json) {\n $mktTime = $json['optionChain']['result'][0]['quote']['regularMarketTime'];\n return utcToDate($mktTime);\n}", "function jd_to_weekday($jd) {\n\t\treturn ( floor( ($jd+8.5) % 7 ) );\n\t}", "public function getDayNoZero() : string\n {\n return date('j', $this->getUnixTimestamp());\n }", "public static function getAbsoluteSeconds($dateTime) {\n\t\treturn strtotime($dateTime);\n\t}", "public static function days( $time )\n\t{\n\t\treturn self::hours( $time ) * 24;\n\t}", "public function GET_SECONDS(bool $raw = false)\n\t{\n\t\tif ($raw)\n\t\t{\n\t\t\treturn $this->difference;\n\t\t}\n\n\t\t$time = clone($this->currentTime);\n\t\treturn $time->fieldDifference($this->testTime, IntlCalendar::FIELD_SECOND);\n\t}", "function shadow_from_unixtime($t=null) {\n if($t === null)\n $t = time();\n\n return (int)($t / 24 / 60 / 60);\n}", "function getTodayDay()\n {\n $datetime = new \\DateTime(\"now\");\n return $datetime->format(\"D\");\n }", "public function findOneDay($time){\n $even = Even::whereDate('created_at','=',$time)->get();\n return $this->findProdFromEven($even);\n }", "public function getDateTimeObjectStart();", "public function getSeconds() {\n $seconds = 0;\n foreach ($this->steps ?? [] as $step):\n $parser = explode(':', $step->getDuration());\n $seconds += (($parser[0] ?? 0) * 60 * 60) + (($parser[1] ?? 0) * 60) + $parser[2] ?? 0;\n endforeach;\n $this->seconds = $seconds;\n return $this->seconds;\n }", "function getDate($s)\n\t{\n\t\tif (array_key_exists($s, $this->holidays)) return (strtotime(jdtogregorian(intval($this->holidays[$s],10)+1)));\n\n\n\t\t//the key doesn't exist, return 0\n\t\treturn (0);\n\t}", "public function toSeconds($time) {\n \treturn intval($time / 1000) % 60;\n }", "function convertSeconds($seconds)\n{\n\t$date1 = new DateTime(\"@0\");\n\t$date2 = new DateTime(\"@$seconds\");\n\treturn $date1->diff($date2)->format(\"%a days, %h hours, %i minutes and %s seconds\");\n}", "function dow($d) {\n\treturn date('D', strtotime(\"Sunday +{$d} days\"));\n}", "public function subDay($n)\n {\n if ($n === 0) {\n return clone $this;\n }\n $ts = strtotime(\"-$n day\", $this->timestamp);\n return new Date($ts, $this->timezone);\n }", "function get_mnt_strt_day($cur_date,$type){\n $date_split=split(\"-\",$cur_date);\n if ($type=='1'){\n // Return format \"0\" (Sunday) to \"6\" (Saturday)\n return date(\"w\",mktime (0,0,0,$date_split[1],1,$date_split[2]));}\n elseif ($type=='2'){\n // Return Fri format \n return date(\"D\",mktime (0,0,0,$date_split[1],1,$date_split[2]));}\n elseif ($type=='3'){\n // Return Friday format\n return date(\"l\",mktime (0,0,0,$date_split[1],1,$date_split[2]));}\n }" ]
[ "0.58714426", "0.58472395", "0.5830755", "0.54943687", "0.543878", "0.54035527", "0.5393143", "0.53861195", "0.53767323", "0.5329648", "0.5329648", "0.53255045", "0.53186613", "0.52984077", "0.52660316", "0.52089304", "0.5203206", "0.5190748", "0.51672184", "0.5164698", "0.513569", "0.5124702", "0.51034254", "0.5095188", "0.50144905", "0.5013839", "0.50011754", "0.4990979", "0.49756607", "0.4963532", "0.49364272", "0.4926065", "0.49197417", "0.49141905", "0.49130708", "0.4894332", "0.4886333", "0.48829603", "0.4877244", "0.48764458", "0.48666102", "0.48535523", "0.48428196", "0.48110792", "0.4790603", "0.47764024", "0.4770374", "0.4766686", "0.47360665", "0.47264507", "0.472471", "0.47006166", "0.46983922", "0.4696005", "0.4693788", "0.4687048", "0.46783888", "0.4657871", "0.46571526", "0.46497", "0.46354398", "0.46154016", "0.4615017", "0.4598684", "0.4598457", "0.45948982", "0.45864654", "0.45798907", "0.45343083", "0.45289004", "0.45286098", "0.45180494", "0.4507324", "0.45073187", "0.45026726", "0.44884977", "0.4487798", "0.44671583", "0.44635254", "0.44614136", "0.4459363", "0.4458568", "0.4456886", "0.44549322", "0.4454376", "0.44541135", "0.44537058", "0.44506884", "0.44496697", "0.4440407", "0.44331035", "0.44231966", "0.44153163", "0.44119233", "0.44085103", "0.44083485", "0.44058985", "0.43991563", "0.4396216", "0.4395013" ]
0.6039
0
Extract the timeslot from a DateTime object
private function dateTime2timeslot($date) { return (intval($date->format('G'))*2 + (($date->format('i') == '00') ? 0 : 1)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_it_gets_timeslot_id_for_day_and_time()\n {\n $manager = new TimeslotManager;\n\n // right on the :00\n $id = $manager->timeslotForDayAndTime('Monday', '11:00');\n $this->assertEquals($id, 71);\n\n // at the :15\n $id = $manager->timeslotForDayAndTime('Monday', '11:15');\n $this->assertEquals($id, 71);\n\n // right on the :00\n $id = $manager->timeslotForDayAndTime('Saturday', '11:00');\n $this->assertEquals($id, 311);\n\n // at the :15\n $id = $manager->timeslotForDayAndTime('Saturday', '11:15');\n $this->assertEquals($id, 311);\n }", "public function getTimeSlot() {\r\n\t\treturn $this->timeSlot;\r\n\t}", "public function getDateTimeObjectStart();", "public static function getStart($idTimeSlot){\n $result = DB::dataQuery(\"SELECT startTime FROM timeslots where idTimeSlot=$idTimeSlot\");\n foreach ($result as $startTime) {\n return $startTime[\"startTime\"];\n }\n }", "public static function timeslotlist_t2(){\n\t\t$datetoday=Fun::datetoday();\n\t\t$times=array();\n\t\tfor($i=0;$i<6;$i++){\n\t\t\t$pair=array();\n\t\t\tfor($j=0;$j<2;$j++){\n\t\t\t\t$h=$i*2+$j*12;\n\t\t\t\t$pair[]=array(Fun::timetotime_t3($datetoday+$h*3600,false).\" - \".Fun::timetotime_t3($datetoday+($h+2)*3600,true ), implode(\"-\", Fun::oneToN(2*$h+4,2*$h+1)));\n\t\t\t}\n\t\t\t$times[]=$pair;\n\t\t}\n\t\treturn $times;\n\t}", "public function ga_calendar_time_slots()\n {\n // Timezone\n $timezone = ga_time_zone();\n\n // Service & Provider ID\n $current_date = isset($_POST['current_month']) ? esc_html($_POST['current_month']) : '';\n $service_id = isset($_POST['service_id']) ? (int) $_POST['service_id'] : 0;\n $provider_id = isset($_POST['provider_id']) && 'ga_providers' == get_post_type($_POST['provider_id']) ? (int) $_POST['provider_id'] : 0;\n $form_id = isset($_POST['form_id']) ? (int) $_POST['form_id'] : 0;\n\n if ('ga_services' == get_post_type($service_id) && ga_valid_date_format($current_date)) {\n # ok\n } else {\n wp_die('Something went wrong.');\n }\n\n // Date Caption\n $date = new DateTime($current_date, new DateTimeZone($timezone));\n\n // Generate Slots\n $ga_calendar = new GA_Calendar($form_id, $date->format('n'), $date->format('Y'), $service_id, $provider_id);\n echo $ga_calendar->calendar_time_slots($date);\n wp_die();\n }", "public function generateTimeSlots()\r\n {\r\n \r\n // then add available times as long as they don't intersect with unavailable times.\r\n \r\n // finally remove the unavailable time slots since we only to check for available time slots in the frontend.\r\n }", "function attendance_construct_session_time($datetime, $duration) {\n $starttime = attendance_strftimehm($datetime);\n $endtime = attendance_strftimehm($datetime + $duration);\n\n return $starttime . ($duration > 0 ? ' - ' . $endtime : '');\n}", "public function getStartDateAndTime() {}", "public function getStartTime();", "public function getStartTime();", "public function getStartTime();", "public function getStartTime();", "public function createAppointmentStartTime()\n {\n $dateTime = strtotime(\"+\" . $this->getStartTimeslot()->getWeight() * 900 . \" seconds\", $this->getAppointmentDate()->format('U'));\n $currentDateTime = new \\DateTime();\n $currentDateTime->setTimestamp($dateTime);\n $this->setHiddenAppointmentStartTime($currentDateTime);\n return;\n }", "public function getDateTimeObjectEnd();", "public function getScheduleTime(){return $this->time_of_day;}", "public static function getMinuteTimeFromDateTime($dateTime) {\n\t\treturn substr($dateTime, 11, 5);\n\t}", "public function getStartDateTime();", "public function isStartedBy(Period|DatePoint|DateTimeInterface $timeSlot): bool\n {\n if ($timeSlot instanceof self) {\n return $this->startDate == $timeSlot->startDate\n && $this->bounds[0] === $timeSlot->bounds[0];\n }\n\n return self::filterDatePoint($timeSlot) == $this->startDate && '[' === $this->bounds[0];\n }", "private function populateTime(MeetingItem $item, DateTime $start)\r\n {\r\n // Filter out legacy items\r\n if(!empty($item->begin)) {\r\n return;\r\n }\r\n\r\n if($item->duration === null) {\r\n $item->duration = 0;\r\n }\r\n\r\n $item->begin = clone $start;\r\n $item->end = clone $start;\r\n $item->end->add(new DateInterval('PT' . $item->duration . 'M'));\r\n return clone $item->end;\r\n }", "public function timeslot()\n {\n return $this->belongsTo(ExamTimeslot::class, 'timeslot_id');\n }", "public function getAvailableSlots($duration, $arrBookedTime){\n\n $arrTime = array();\n $arrTime[\"from\"][] = $this->startTime;\n if(count($arrBookedTime) > 0){\n foreach ($arrBookedTime as $rowTime) {\n $arrTime['end'][] = date(\"H:i\", strtotime($rowTime->book_from));\n $arrTime['from'][] = date(\"H:i\", strtotime($rowTime->book_to));\n }\n }\n $arrTime[\"end\"][] = $this->endTime;\n return $arrAvailableSlots = $this->createTimeSlotForBooking($duration, $arrTime);\n }", "public function it_splits_the_elements_by_date_timerange_service()\n {\n $hours = $this->vacancyParser->hours('830-1130,14-20,2215-2330,2330-2345');\n\n $array = [\n ['startAt' => '8:30', 'finishAt' => '11:30'],\n ['startAt' => '14:00', 'finishAt' => '20:00'],\n ['startAt' => '22:15', 'finishAt' => '23:30'],\n ['startAt' => '23:30', 'finishAt' => '23:45'],\n ];\n\n $this->assertEquals($hours, $array);\n }", "public function getEndTime(){\n //the object and not return a new one, we\n //need to clone the object and modify a copy\n //so we can keep the original DateTime obj\n $date=clone $this->dateTime;\n $date->add(\\DateInterval::createFromDateString(\"1 hour\"));\n\n return $date;\n }", "public static function getEnd($idTimeSlot){\n $result = DB::dataQuery(\"SELECT endTime FROM timeslots where idTimeSlot=$idTimeSlot\");\n foreach ($result as $endTime) {\n return $endTime[\"endTime\"];\n }\n }", "public function get_clinic_time_slots($request) {\n\n $new_timeslot_query = \"\n SELECT \n doctor_clinic_doctor_session_1_start_time,\n doctor_clinic_doctor_session_1_end_time,\n doctor_clinic_doctor_session_2_start_time,\n doctor_clinic_doctor_session_2_end_time,\n doctor_clinic_mapping_duration\n FROM \n \" . TBL_DOCTOR_CLINIC_MAPPING . \" \n JOIN \" . TBL_CLINICS . \" \n ON clinic_id = doctor_clinic_mapping_clinic_id AND clinic_status=1 \n \n WHERE \n doctor_clinic_mapping_clinic_id=\" . $request['clinic_id'] . \" \n AND doctor_clinic_mapping_user_id=\" . $request['doctor_id'] . \" \n AND doctor_clinic_mapping_status=1 \n \";\n\n $timeslots_data = $this->get_single_row_by_query($new_timeslot_query);\n return $timeslots_data;\n }", "public function getTimeSlots(): array\n {\n return $this->collection;\n }", "public function setTimeSlot($timeSlot) {\r\n\t\t$this->timeSlot = $timeSlot;\r\n\t}", "public function getSlot()\n {\n return $this->slot;\n }", "private function construct_time($datetime, $duration) {\n $time = html_writer::tag('nobr', attendance_construct_session_time($datetime, $duration));\n\n return $time;\n }", "function get_times($startdate,$enddate){\r\n $begin = new DateTime(date(\"H:i\", strtotime($startdate)));\r\n $end = new DateTime(date(\"H:i\", strtotime($enddate)));\r\n\r\n $daterange = new DatePeriod($begin, new DateInterval('PT900S'), $end);\r\n\r\n foreach($daterange as $date){\r\n $atimes[] =$date->format(\"H:i A\");\r\n }\r\n $atimes[] =date(\"H:i A\", strtotime($enddate)) ;\r\n return $atimes; \r\n }", "function splitDateTime( $datetime ) {\n\t\n\t$year\t\t\t= substr( $datetime, 0, 4 );\n\t$month\t\t\t= substr( $datetime, 4, 2 );\n\t$day\t\t\t= substr( $datetime, 6, 2 );\n\t$date \t\t= $day.\".\".$month.\".\".$year;\n\t\n\t$hour\t\t\t= substr( $datetime, 8, 2 );\n\t$min\t\t\t= substr( $datetime, 10, 2 );\n\t$sec\t\t\t= substr( $datetime, 12, 2 );\n\t$time\t\t\t= $hour.\":\".$min.\":\".$sec;\n\t\n\treturn array( $date, $time );\t\n}", "function get_times($starttime,$endtime){\r\n\t$begin = new DateTime(date(\"H:i\", strtotime($starttime)));\r\n\t$end = new DateTime(date(\"H:i\", strtotime($endtime)));\r\n\r\n$timerange = new DatePeriod($begin, new DateInterval('PT900S'), $end);\r\n\r\nforeach($timerange as $time){\r\n\t$atimes[] =$time->format(\"H:i A\");\r\n}\r\n$atimes[] =date(\"H:i A\", strtotime($enddate)) ;\r\nreturn $atimes; \r\n}", "function to_time($datetime)\n {\n return date('H:i:s', strtotime($datetime));\n }", "public static function getAllTimeSlots(){\n $result = DB::dataQuery(\"SELECT * FROM timeslots\");\n foreach ($result as $timeslot) {\n echo \"<option value=\".$timeslot['idTimeSlot'].\"> Dia: \".$timeslot['dayOfWeek']. \" De \". $timeslot['startTime'] .\" a \". $timeslot['endTime'].\"</option>\";\n }\n }", "public static function get_register_slot($register_event_slot_id) {\r\n\t\r\n\t\t$slot = null;\r\n\t\t\r\n\t\t$sql = \"\r\n\t\t\tSELECT\r\n\t\t\t\tid,\r\n\t\t\t\tregister_event_id,\r\n\t\t\t\tsession_code,\r\n\t\t\t\tTo_Char(startdate, 'yyyy-MM-dd HH24:mi:ss') AS start_date,\r\n\t\t\t\tTo_Char(enddate, 'yyyy-MM-dd HH24:mi:ss') AS end_date,\r\n\t\t\t\tbreak,\r\n\t\t\t\tslot_status\r\n\t\t\tFROM\r\n\t\t\t\tregister_event_slots\r\n\t\t\tWHERE\r\n\t\t\t\tid = :register_event_slot_id\r\n\t\t\";\r\n\t\t\r\n\t\t$connection = ebs_utility::connect();\r\n\t\t\r\n\t\tif(!$connection) {\r\n\t\t\t$error = oci_error($connection);\r\n\t\t\tdie(\"An error was encountered connecting to the database: \" . $error[\"message\"]);\r\n\t\t}\r\n\t\t\r\n\t\t$statement = oci_parse($connection, $sql);\r\n\t\t\r\n\t\tif(!$statement) {\r\n\t\t\t$error = oci_error($statement);\r\n\t\t\tdie(\"An error was encountered parsing the register slot query: \" . $error[\"message\"]);\r\n\t\t}\r\n\t\t\r\n\t\toci_bind_by_name($statement, \":register_event_slot_id\", $register_event_slot_id);\r\n\t\t\r\n\t\tif(!oci_execute($statement, OCI_DEFAULT)) {\r\n\t\t\t$error = oci_error($statement);\r\n\t\t\tdie(\"An error was encountered executing the register slot query: \" . $error[\"message\"]);\r\n\t\t}\r\n\t\t\r\n\t\t$row = oci_fetch_array($statement, OCI_DEFAULT);\r\n\t\r\n\t\tif($row) {\t\t\r\n\t\t\t$slot = new ebs_register_slot(\r\n\t\t\t\t\t\t$row[\"ID\"],\r\n\t\t\t\t\t\t$row[\"REGISTER_EVENT_ID\"],\r\n\t\t\t\t\t\t$row[\"SESSION_CODE\"],\r\n\t\t\t\t\t\tdate_create($row[\"START_DATE\"]),\r\n\t\t\t\t\t\tdate_create($row[\"END_DATE\"]),\r\n\t\t\t\t\t\t$row[\"BREAK\"],\r\n\t\t\t\t\t\t$row[\"SLOT_STATUS\"]\r\n\t\t\t\t\t);\t\t\r\n\t\t}\r\n\t\t\r\n\t\toci_close($connection);\r\n\t\t\r\n\t\treturn $slot;\r\n\t}", "abstract public function relevantValueOf(DateTimeInterface $time): int;", "public function getTimeslots()\n {\n return $this->timeslots;\n }", "protected function getMySlots($args) {\n\n if ($args['ent_slots_for'] == '' || $args['ent_date_time'] == '')\n return $this->_getStatusMessage(1, 1);\n\n $this->curr_date_time = urldecode($args['ent_date_time']);\n\n $returned = $this->_validate_token($args['ent_sess_token'], $args['ent_dev_id'], '1');\n\n if (is_array($returned))\n return $returned;\n\n// $checkingDate = explode('-', $args['ent_slots_for']);\n\n $getScheduleQry = \"select sh.id, sh.day_number, sh.start, sh.mas_id, sh.duration_in_mts, sh.ref_count from master_schedule sh, master doc \";\n $getScheduleQry .= \"where sh.mas_id = doc.mas_id and doc.mas_id = '\" . $this->User['entityId'] . \"' order by sh.start asc\";\n\n $getScheduleRes = mysql_query($getScheduleQry, $this->db->conn);\n\n $appts = $daysAvlb = $avlbSlots = $avlbDates = array();\n\n while ($appointment = mysql_fetch_assoc($getScheduleRes)) {\n\n $appts[$appointment['day_number']]['day'] = $appointment['day_number'];\n $appts[$appointment['day_number']]['time'][] = array('from' => date('h:i a', strtotime($appointment['start'])), 'to' => date(\"h:i a\", strtotime('+' . (int) $appointment['duration_in_mts'] . ' minutes', strtotime($appointment['start']))), 'flag' => $appointment['ref_count']);\n }\n\n $errMsgArr = $this->_getStatusMessage(21, 2);\n return array('errNum' => $errMsgArr['errNum'], 'errFlag' => $errMsgArr['errFlag'], 'errMsg' => $errMsgArr['errMsg'], 'slots' => $appts);\n }", "public function addTimeslot($day, $start, $end)\n {\n $start = gmdate('H:i:s', $start).'+00';\n $end = gmdate('H:i:s', $end).'+00';\n\n $id = self::$db->fetchColumn(\n 'INSERT INTO website.banner_timeslot\n (banner_campaign_id, memberid, approvedid, \"order\", day, start_time, end_time)\n VALUES ($1, $2, $2, $1, $3, $4, $5) RETURNING id',\n [\n $this->getID(),\n MyRadio_User::getInstance()->getID(),\n $day,\n $start,\n $end,\n ]\n )[0];\n\n $this->timeslots[] = [\n 'id' => $id,\n 'day' => $day,\n 'start_time' => strtotime($start, 0),\n 'end_time' => strtotime($end, 0),\n ];\n\n $this->updateCacheObject();\n }", "public function getStartTimeColumnName() {}", "private function GetTimeHHMM() : string {\n\t\t\t$dt = new DateTime();\n\t\t\t$dtz = new DateTimeZone(\"EUROPE/Berlin\");\n\t\t\t$dt->setTimezone($dtz);\n\t\t\treturn $dt->format(\"H:i\");\n\t\t}", "public function getTimespan($part = \\Zend_Date::TIMESTAMP, $locale = null)\n {\n return $this->getEnd()->sub($this->_start, $part, $locale);\n }", "public function getTimeOfDay() {\n\t\treturn $this->_time_of_day;\n\t}", "public function timeMid();", "abstract public function getForecastTime();", "public function getFromTime() {\n return $this->get(self::FROM_TIME);\n }", "public function getClosedInvoicedate($dt)\n {\n return (new Options)->ConvertOneTzToAnotherTz($dt, 'UTC', $_SESSION['usrTZ'],'MDY');\n }", "function get_variable_time() {\n\t\t$datetime = $this->get_option( 'queue_datetime', true );\n\n\t\tif ( ! $datetime ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$timestamp = strtotime( $datetime, current_time( 'timestamp' ) );\n\n\t\t$date = new DateTime();\n\t\t$date->setTimestamp( $timestamp );\n\t\t$date->convert_to_utc_time();\n\n\t\treturn $date;\n\t}", "public function getEndDateAndTime() {}", "public function getSlotStart()\n {\n return $this->slotStart;\n }", "public function get_hour_step()\r\n {\r\n return $this->hour_step;\r\n }", "function date_time_view($datetime) {\n\n\tif (!$datetime) return true;\n\n\t$datetime = trim($datetime);\n\n\t$pos = strpos($datetime,\" \");\n\n\t//divide up our string into date and time\n\t$date_value=substr($datetime,0,$pos);\n\t$date_value = formatDate($date_value);\n\n\t$time_value = substr($datetime,$pos);\n\t$time_value = formatTime($time_value);\n\n\t$datetime=array($date_value,$time_value);\n\treturn $datetime;\n}", "public function getStartAtRange(): TimeRange\n {\n return $this->startAtRange;\n }", "public function getScheduleTime()\n {\n return $this->schedule_time;\n }", "protected function get_time() {\n// Format is ddhhmmZ where dd = day, hh = hours, mm = minutes in UTC time.\n if (preg_match('#^([0-9]{2})([0-9]{2})([0-9]{2})Z$#',$this->current_group_text,$pieces)) {\n\n// date_default_timezone_set('UTC');\n $month_start = date('m',$this->timestamp);\n $year_start = date('Y',$this->timestamp);\n\n $hour = $pieces[2];\n $minute = $pieces[3];\n $day = $pieces[1];\n\n $this->wxInfo['ITEMS'][$this->tend]['CODE_TIME'] = $this->current_group_text;\n// $this->wxInfo['ITEMS'][$this->tend]['DATE_DAY'] = $pieces[1];\n// $this->wxInfo['ITEMS'][$this->tend]['DATE_TIME'] = $pieces[2].':'.$pieces[3];\n\n $this->wxInfo['ITEMS'][$this->tend]['DATE_TIMESTAMP'] = mktime( $hour, $minute, 0, $month_start, $day, $year_start);\n\n $this->current_ptr++;\n }\n $this->current_group++;\n }", "public static function getRange($datetime, $opts = array())\n {\n $datetime = self::getDateTime($datetime);\n $opts = \\array_merge(array(\n 'range' => 'day', // hour, day, week, month, or year\n 'format' => null,\n 'weekStartDay'=> 0,\n ), $opts);\n $return = false;\n switch ($opts['range']) {\n case 'hour':\n $strStart = $datetime->format('Y-m-d H:00:00');\n $dateInterval = new \\DateInterval('PT1H');\n break;\n case 'day':\n $strStart = $datetime->format('Y-m-d');\n $dateInterval = new \\DateInterval('P1D');\n break;\n case 'week':\n $days = $datetime->format('w') - $opts['weekStartDay'];\n if ($days < 0) {\n $days = $days + 7;\n }\n $dtTemp = clone $datetime;\n $dtTemp->setTime(0, 0)->sub(new \\DateInterval('P'.$days.'D'));\n $strStart = $dtTemp->format('Y-m-d');\n $dateInterval = new \\DateInterval('P1W');\n break;\n case 'month':\n $strStart = $datetime->format('Y-m-01');\n $dateInterval = new \\DateInterval('P1M');\n break;\n case 'year':\n $strStart = $datetime->format('Y-01-01');\n $dateInterval = new \\DateInterval('P1Y');\n break;\n }\n $dtStart = new \\DateTime($strStart);\n $dtStartAtom = $dtStart->format(\\DateTime::ATOM);\n /*\n DateTimeImmutable is php 5.5\n (clone $datetime)->add() is a php 7 thing\n */\n $return = array(\n 'passed'=> $datetime,\n 'start' => $dtStart,\n 'end' => (new \\DateTime($dtStartAtom))\n ->add($dateInterval)\n ->sub(new \\DateInterval('PT1S')),\n 'prev' => (new \\DateTime($dtStartAtom))->sub($dateInterval),\n 'next' => (new \\DateTime($dtStartAtom))->add($dateInterval),\n 'minus' => (new \\DateTime($datetime->format(\\DateTime::ATOM)))->sub($dateInterval),\n 'plus' => (new \\DateTime($datetime->format(\\DateTime::ATOM)))->add($dateInterval),\n );\n if ($opts['range'] == 'month') {\n if ($return['plus']->format('j') !== $datetime->format('j')) {\n $return['plus']->modify('last day of last month');\n }\n if ($return['minus']->format('j') !== $datetime->format('j')) {\n $return['minus']->modify('last day of last month');\n }\n }\n return \\array_map(function ($datetime) use ($opts) {\n if (!$opts['format']) {\n return $datetime;\n }\n $val = $datetime->format($opts['format']);\n if ($opts['format'] == 'U') {\n $val = (float) $val;\n }\n return $val;\n }, $return);\n }", "public function callTime($timestamp) {\n\t\t\n\t\t\t$_date['h'] = (int)date(\"G\",$timestamp);\n\t\t\t$_date['m'] = (int)date(\"i\",$timestamp);\n\t\t\t\n\t\t\t$_dayStart = 6;\t\t\t\t\t// Start the day at 6am\n\t\t\t$_morningEnd = 13;\t\t\t\t// Morning ends at 13:00\n\t\t\t$_afternoonEnd = 17;\t\t\t// Afternoon ends at 17:00\n\t\t\t\n\t\t\tif ($_date['h'] < $_morningEnd AND $_date['h'] >= $_dayStart) {\n\t\t\t\t// Time is morning\n\t\t\t\t$_returnTime = 1;\n\t\t\t} else if ($_date['h'] >= $_morningEnd AND $_date['h'] < $_afternoonEnd) {\n\t\t\t\t// Time is Afternoon\n\t\t\t\t$_returnTime = 2;\n\t\t\t} else {\n\t\t\t\t// Time should be evening cos we don't work before 6am\n\t\t\t\t$_returnTime = 3;\n\t\t\t}\n\n\t\t\treturn $_returnTime;\n\t\t}", "function get_n_time_slots()\n{\n global $morningstarts, $morningstarts_minutes, $eveningends, $eveningends_minutes;\n global $resolution;\n \n $start_first = (($morningstarts * 60) + $morningstarts_minutes) * 60; // seconds\n $end_last = ((($eveningends * 60) + $eveningends_minutes) * 60) + $resolution; // seconds\n $end_last = $end_last % SECONDS_PER_DAY;\n if (day_past_midnight())\n {\n $end_last += SECONDS_PER_DAY;\n }\n $n_slots = ($end_last - $start_first)/$resolution;\n\n return $n_slots;\n}", "function getReservationTimeArrayAsInteger(){\n //setting variables;\n //$dateformat = 'H:i:s';\n $int_start_time;\n $int_duration = strtotime($this->end_time) - strtotime($this->start_time);\n $int_duration = (int)date('h', $int_duration);\n //$reservationTimeArray = array($this->start_time, $this->end_time);\n\n //first switch case function will convert all possible bookings to integer value\n switch($this->start_time){\n case '9:00:00':\n $int_start_time = 0;\n break;\n case '10:00:00':\n $int_start_time = 1;\n break;\n case '11:00:00':\n $int_start_time = 2;\n break;\n case '12:00:00':\n $int_start_time = 3;\n break;\n case '13:00:00':\n $int_start_time = 4;\n break;\n case '14:00:00':\n $int_start_time = 5;\n break;\n case '15:00:00':\n $int_start_time = 6;\n break;\n case '16:00:00':\n $int_start_time = 7;\n break;\n case '17:00:00':\n $int_start_time = 8;\n break;\n }\n\n //by the end of this switch case we have array which will have exactly 2 values inside\n //the problem is if smbd booked for more than 1 hour the array will be missing these intermediate value\n // EXAMPLE: Booking from 15:00 to 18:00 will result in array value of [6,9];\n //the next step is we need to fill up missing values;\n\n for($i = $int_start_time; $i < ($int_start_time + $int_duration); $i++){\n $int_reservationTimeArray[] = $i;\n }\n \n\n //after this we have array which can look as [6,9,7,8];\n //the array is not sorted, so we better sort it before we pass it back\n\n\n sort($int_reservationTimeArray);\n\n return $int_reservationTimeArray;\n\n\n }", "public function embargoUntilDate($datetime);", "static public function sessionTimeCalculation($datetime) {\n // la resta me da como resultado en segundos\n // div para 60 y obtengo minutos\n // div para 60 de nuevo y obtengo horas\n // div para 24 y obtengo dias\n return intval(strtotime($datetime) - strtotime('NOW'));\n }", "public function getWorkedTime() {\n if (!isset($this->workedTime)) {\n $start = new DateTime($this->start);\n $end = new DateTime($this->end);\n $break = new DateTime($this->break);\n\n $work = $start->diff($end)->format(\"%H:%i:%S\");\n $work = new DateTime($work);\n\n //for what ever reason we need to add the break to the work\n $work->add($break->diff(new DateTime(\"00:00:00\")));\n\n $this->workedTime = $work->format(\"H:i:s\");\n }\n\n return $this->workedTime;\n }", "private function timeSpecToDateTimeAtomInEuropeWarsawTimezone($timeSpec): string {\n $datetime = new \\DateTime('2017-01-01 00:00:00', new \\DateTimeZone('Europe/Warsaw'));\n $datetime->setTime($timeSpec / 60, $timeSpec % 60);\n return $datetime->format(\\DateTime::ATOM);\n }", "public function getEndDateTime();", "public function parseTime() {}", "public function getIntervalTime();", "public function get_time_hour() {\n return sprintf( '%02d', (int) edd_get_option( 'edd_commissions_payout_schedule_time_hr', '' ) );\n }", "public function get_half_hour_time_range( $start_time='8:00', $end_time='18:00' ) {\n list( $sh,$sm ) = explode( ':', $start_time );\n list( $eh,$em ) = explode( ':', $end_time );\n $timeRangeArray = array();\n //return ;\n while((int)$sh.$sm < (int)$eh.$em) {\n if($sm == \"00\") {\n $sm = \"30\";\n } else {\n $sm = \"00\";\n $sh = (int)($sh+1);\n }\n $fullTime = date(\"h:ia\",mktime((int)$sh,(int)$sm,0));\n array_push($timeRangeArray,$fullTime);\n if($sh < 10) {\n $sh = \"0\"+$sh;\n }\n }\n return $timeRangeArray;\n }", "public function getDatetime();", "public function nextCloseAt(DateTimeInterface $dateTime)\n {\n if (!$dateTime instanceof DateTimeImmutable)\n $dateTime = clone $dateTime;\n\n $nextCloseAt = $this->forDate($dateTime)->nextCloseAt(\n WorkingTime::fromDateTime($dateTime)\n );\n\n if (!$this->hasPeriod())\n return null;\n\n while ($nextCloseAt === false) {\n $dateTime = $dateTime->modify('+1 day')->setTime(0, 0);\n $workingTime = WorkingTime::fromDateTime($dateTime);\n\n $forDate = $this->forDate($dateTime);\n $nextCloseAt = !$forDate->isEmpty()\n ? $forDate->nextCloseAt($workingTime)\n : false;\n }\n\n $dateTime = $dateTime->setTime(\n $nextCloseAt->toDateTime()->format('G'),\n $nextCloseAt->toDateTime()->format('i')\n );\n\n return $dateTime;\n }", "function get_hour()\n {\n $datearray=getdate($this->timestamp);\n return $datearray[\"hours\"];\n }", "public function getStartTime()\n {\n $time = $this->eventdatetime->starttime;\n\n if ($this->eventdatetime->isRecurring() &&\n isset($this->recurringdate) &&\n $this->recurringdate instanceof \\UNL\\UCBCN\\Event\\RecurringDate\n ) {\n $first_recurring_date = $this->recurringdate->getFirstRecordInOngoingSeries();\n if (isset($first_recurring_date->recurringdate)) {\n $time = $first_recurring_date->recurringdate . ' ' . substr($time, 11);\n }\n }\n\n return $time;\n }", "public function current(): ?TimeSlot\n {\n return $this->collection[$this->position];\n }", "function datetime_info($time)\n{\n if ( ! $time = strtotime($time)) {\n return array( 'date' => NULL, 'time' => NULL);\n }\n return array(\n 'date' => date('Y/m/d', $time),\n 'time' => date('H:i:s', $time)\n );\n}", "protected function get_time_range( ) {\n// Format is ddhhmmZ where dd = day, hh = hours, mm = minutes in UTC time.\n\n $found = 0;\n\n// date_default_timezone_set('UTC');\n\n $month_timestamp = date('m',$this->timestamp);\n $day_timestamp = date('d',$this->timestamp);\n $year_timestamp = date('Y',$this->timestamp);\n $hour_timestamp = date('H',$this->timestamp);\n $min_timestamp = date('i',$this->timestamp);\n\n $current_start_hour = $hour_timestamp;\n $current_start_min = $min_timestamp;\n $current_start_month = $month_timestamp;\n $current_start_year = $year_timestamp;\n\n $current_end_hour = $hour_timestamp;\n $current_end_min = $min_timestamp;\n $current_end_month = $month_timestamp;\n $current_end_year = $year_timestamp;\n// $day_start = $day_timestamp;\n// $day_end = $day_timestamp;\n\n\n//print \"$this->current_group_text\\n\";\n\n if (preg_match('#^FM([0-9]{2})([0-9]{2})([0-9]{2})$#',$this->current_group_text,$pieces)) {\n $this->wxInfo['ITEMS'][$this->tend]['CODE_DATE_RANGE'] = $this->current_group_text;\n\n $get_start_hour = $pieces[2];\n $get_start_minute = $pieces[3];\n $get_start_day = $pieces[1];\n\n $get_end_day = date(\"d\",$this->max_date_end);\n $get_end_hour = date(\"G\",$this->max_date_end);\n $get_end_minute = date(\"i\",$this->max_date_end);\n\n $found = 1;\n $this->current_ptr++;\n } else if (preg_match('#^([0-9]{2})([0-9]{2})([0-9]{2})$#',$this->current_group_text,$pieces)) {\n $this->wxInfo['ITEMS'][$this->tend]['CODE_DATE_RANGE'] = $this->current_group_text;\n\n $get_start_hour = $pieces[2];\n $get_start_minute = $pieces[3];\n $get_start_day = $pieces[1];\n\n $get_end_day = date(\"d\",$this->max_date_end);\n $get_end_hour = date(\"G\",$this->max_date_end);\n\n if ($day_timestamp>$start_day) {\n $current_start_month++;\n if ($current_start_month>12) {\n $current_start_month=1;\n $current_start_year++;\n }\n }\n\n\n $found = 1;\n $this->current_ptr++;\n } else if (preg_match('#^([0-9]{2})([0-9]{2})/([0-9]{2})([0-9]{2})$#',$this->current_group_text,$pieces)) {\n $get_start_day = $pieces[1];\n $get_start_hour = $pieces[2];\n $get_start_minute = 0;\n $get_end_day = $pieces[3];\n $get_end_hour = $pieces[4];\n $get_end_minute = 0;\n\n $this->wxInfo['ITEMS'][$this->tend]['CODE_DATE_RANGE'] = $this->current_group_text;\n\n $found = 1;\n $this->current_ptr++;\n }\n if ($found==1) {\n\n\n// print \"get_start_day: $get_start_day<br>\";\n// print \"get_start_hour: $get_start_hour<br>\";\n// print \"get_end_day: $get_end_day<br>\";\n// print \"get_end_time: $get_end_hour<br>\";\n\n if ($day_timestamp>$get_start_day) {\n $current_start_month++;\n if ($current_start_month>12) {\n $current_start_month=1;\n $current_start_year++;\n }\n }\n\n if ($day_timestamp>$get_end_day) {\n $current_end_month++;\n if ($current_end_month>12) {\n $current_end_month=1;\n $current_end_year++;\n }\n }\n\n if ($get_start_hour==24) {\n $get_start_hour=23;\n $get_start_minute=59;\n }\n\n if ($get_end_hour==24) {\n $get_end_hour=23;\n $get_end_minute=59;\n }\n\n\n $this->wxInfo['ITEMS'][$this->tend]['DATE_RANGE_START_TIMESTAMP'] = mktime( $get_start_hour, $get_start_minute, 0, $current_start_month, $get_start_day, $current_start_year);\n $this->wxInfo['ITEMS'][$this->tend]['DATE_RANGE_END_TIMESTAMP'] = mktime( $get_end_hour, $get_end_minute, 0, $current_end_month, $get_end_day, $current_end_year);\n\n\n// Calcule la date\n// $timestamp = strtotime($timestamp);\n// $month = date('m',$timestamp);\n// $startday = date('d',$timestamp);\n// $year = date('Y',$timestamp);\n\n// $startday = abs($this->wxInfo['ITEMS'][$this->tend]['DATE_RANGE_STARTDAY']-$startday);\n// $endday = abs($this->wxInfo['ITEMS'][$this->tend]['DATE_RANGE_ENDDAY']-$startday);\n\n $this->max_date_end = max($this->wxInfo['ITEMS'][$this->tend]['DATE_RANGE_END_TIMESTAMP'],$this->max_date_end);\n\n// $this->wxInfo['ITEMS'][$this->tend]['DATE_RANGE_START_DATETIME'] = date('Y-m-d H:i:s', $time_start);\n// $this->wxInfo['ITEMS'][$this->tend]['DATE_RANGE_END_DATETIME'] = date('Y-m-d H:i:s', $time_end);\n// print \"DATE_RANGE_END_TIMESTAMP: \".$this->wxInfo['ITEMS'][$this->tend]['DATE_RANGE_END_TIMESTAMP'].\" DATE_RANGE_END_TEXT: \". date(\"Y-m-d H:i\",$this->wxInfo['ITEMS'][$this->tend]['DATE_RANGE_END_TIMESTAMP']).\"\\n\";\n\n//print \"debut: \".$this->wxInfo['ITEMS'][$this->tend]['DATE_RANGE_START_TIMESTAMP'].\"\\n\";\n//print \"fin: \".$this->wxInfo['ITEMS'][$this->tend]['DATE_RANGE_END_TIMESTAMP'].\"\\n\";\n\n /*\n print \"before \".date('Y-m-d H:i:s',$timestamp ).\"\\n\";\n print \"$day\\n\";\n print \"startday \".$startday.\"\\n\";\n print \"endday \".$endday.\"\\n\";\n print \"result start \".$this->wxInfo['ITEMS'][$this->tend]['DATE_RANGE_START_DATETIME'].\"\\n\";\n print \"result end \".$this->wxInfo['ITEMS'][$this->tend]['DATE_RANGE_END_DATETIME'].\"\\n\";\n print \"\\n\\n\";\n exit;\n */\n\n\n// $this->wxInfo['ITEMS'][$this->tend]['DATE_RANGE_START_DATETIME'] = '0000-01-'.$this->wxInfo['ITEMS'][$this->tend]['DATE_RANGE_STARTDAY'].' '.$this->wxInfo['ITEMS'][$this->tend]['DATE_RANGE_STARTTIME'].':00';\n//$this->wxInfo['ITEMS'][$this->tend]['DATE_RANGE_END_DATETIME'] = '0000-01-'.$this->wxInfo['ITEMS'][$this->tend]['DATE_RANGE_ENDDAY'].' '.$this->wxInfo['ITEMS'][$this->tend]['DATE_RANGE_ENDTIME'].':00';\n }\n\n $this->current_group++;\n }", "public function getStartTimeAttribute($value)\n {\n return \\Carbon::createFromTimeStamp(strtotime($value))->format('H:i');\n }", "function get_appointment_times($db, $appointments) {\n $unavailable_times = array();\n $available_times = array();\n foreach ($appointments as $appointment) {\n array_push($unavailable_times, date(\"Y-m-d H:i:s\", strtotime($appointment['appt_time'])));\n }\n foreach ($unavailable_times as $unavailable_time) {\n $possible_time = date(\"Y-m-d H:i:s\", strtotime($unavailable_time . \"+1 hour\"));\n if (!in_array($possible_time, $unavailable_times)) {\n array_push($available_times, $possible_time);\n }\n }\n return $available_times;\n}", "public function getStartTime() {\n return $startTime;\n }", "function checkSchedule($slot = \"\") {\n\t\t//$slotArray = explode()\n\t\treturn true;\n\t}", "private static function _dateTime($dt)\n {\n return $dt->format(\\DateTime::ATOM);\n }", "public function getPropertyMinTime(string $symbol): ?DateTime {\n\t\treturn $this->properties[$symbol]['min_time'] ?? null;\n\t}", "function getTimeString($DateTime){\n return $DateTime->format(\"Y-m-d H:i:s\"); \n}", "public function diffTime(\\DateTimeInterface $dateTime) : TimeInterval\n {\n /**\n * Overriding diff() is not possible (or at least risky or ugly),\n * because this method needs to call parent diff(), and that on another\n * instance than $this.\n *\n * And PHP internals may well rely on the defects on native diff().\n */\n\n /**\n * The algo here could be moved to TimeInterval's constructor,\n * but then it would be much more difficult to a Time extension\n * to override (e.g. construction, cloning).\n */\n\n $subject_tz_name = $dateTime->getTimezone()->getName();\n if ($subject_tz_name != $this->timezoneName) {\n throw new \\RuntimeException(\n 'DateTimes with unequal timezones are not comparable, saw this timezone[' . $this->timezoneName\n . '] and arg dateTime timezone[' . $subject_tz_name . '].'\n );\n }\n\n if (isset(static::TIMEZONE_DST_NONE[$this->timezoneName])) {\n return new TimeIntervalUnified($this->diff($dateTime));\n }\n\n $tz_utc = new \\DateTimeZone('UTC');\n $subject_iso = $dateTime->format('Y-m-d H:i:s.u');\n return new TimeInterval(\n // Baseline and subject moved to UTC;\n // relative years, months, days will be off.\n ($this->cloneToMutable())->setTimezone($tz_utc)->diff(\n (new \\DateTime($subject_iso, new \\DateTimeZone($this->timezoneName)))->setTimezone($tz_utc)\n ),\n // Baseline and subject time parts verbatim, but in other (UTC)\n // timezone; relative hours, minutes, seconds will be off.\n (new \\DateTime($this->format('Y-m-d H:i:s.u'), $tz_utc))->diff(\n new \\DateTime($subject_iso, $tz_utc)\n )\n );\n }", "public function getSvrTime()\n {\n return $this->get(self::_SVR_TIME);\n }", "public function getAnswerTime();", "public function getSvrtime()\n {\n $value = $this->get(self::SVRTIME);\n return $value === null ? (integer)$value : $value;\n }", "function defineMeetingTime(){\r\n\r\n\t$SQL=\"select * from agenda where event<>'' order by meetingTime\";\r\n\t$agendaArray=get_obj_info($SQL , array(\"meetingTime\",\"event\"));\r\n\tfor($i=0;$i<count($agendaArray);$i++){\r\n\t\t$meetingTime = $agendaArray[$i]->meetingTime;\r\n\t\t$meetingTime_array[$i] = strftime(\"%H:%M\", mkdate($meetingTime));\r\n\t}\r\n\t\r\n\treturn $meetingTime_array;\r\n}", "public function getStartTime()\n {\n return $this->startTime;\n }", "public function getStartTime()\n {\n return $this->startTime;\n }", "public function getStartTime()\n {\n return $this->startTime;\n }", "private function startTime($year, $month, $date) {\n return $year . '-' . $month . '-' . $date . ' 00:00:01';\n }", "public function getTripTimeAttribute()\n { \n $begin_time = new DateTime($this->attributes['begin_trip']);\n $end_time = new DateTime($this->attributes['end_trip']);\n $timeDiff = date_diff($begin_time,$end_time);\n return $timeDiff->format('%H').':'.$timeDiff->format('%I').':'.$timeDiff->format('%S');\n \n }", "public static function getDaySecondsOfDateTime(\\DateTimeInterface $dateTime): int\n {\n $hours = (int)$dateTime->format('G');\n $minutes = $hours * self::SECONDS_MINUTE + (int)$dateTime->format('i');\n\n return $minutes * self::SECONDS_MINUTE + (int)$dateTime->format('s');\n }", "public function bordersOnStart(self $timeSlot): bool\n {\n return $this->endDate == $timeSlot->startDate\n && '][' !== $this->bounds[1].$timeSlot->bounds[0];\n }", "public function getStartTime()\n {\n return $this->start;\n }", "public function getSplitTimes()\n {\n return $this->get(self::_SPLIT_TIMES);\n }", "public function isDuring(self $timeSlot): bool\n {\n return $timeSlot->containsInterval($this);\n }", "public function create_times($from, $to)\n {\n $start = new DateTime($from);\n $end = new DateTime($to);\n $interval = MINIMUM_INTERVAL;\n\n while ($start <= $end)\n {\n $sd = $start->format(\"Y-m-d H:i:s\");\n $q = $this->db->prepare(\"SELECT * FROM TimeSlot WHERE dateTime = ?;\");\n $q->bind_param('s', $sd);\n \n if (!$q->execute())\n die();\n \n $result = $q->get_result();\n\n if (mysqli_num_rows($result) == 0) // check appointment doesn't already exist\n {\n $q = $this->db->prepare(\"INSERT INTO TimeSlot (dateTime) VALUES ('$sd')\");\n \n if (!$q->execute())\n die();\n }\n \n $start->modify('+'.$interval.' minutes');\n }\n }", "public function getTimeEnded()\n {\n if (array_key_exists(\"timeEnded\", $this->_propDict)) {\n if (is_a($this->_propDict[\"timeEnded\"], \"\\DateTime\") || is_null($this->_propDict[\"timeEnded\"])) {\n return $this->_propDict[\"timeEnded\"];\n } else {\n $this->_propDict[\"timeEnded\"] = new \\DateTime($this->_propDict[\"timeEnded\"]);\n return $this->_propDict[\"timeEnded\"];\n }\n }\n return null;\n }" ]
[ "0.61840373", "0.60318327", "0.58017135", "0.55187154", "0.5345493", "0.52424157", "0.5186609", "0.5149187", "0.5148239", "0.5103952", "0.5103952", "0.5103952", "0.5103952", "0.51004434", "0.50926745", "0.49864137", "0.49390215", "0.48922732", "0.48758835", "0.48487732", "0.48400778", "0.48274517", "0.48228267", "0.4789525", "0.47745526", "0.47632185", "0.47459143", "0.47383866", "0.4717482", "0.4711461", "0.46820903", "0.46814013", "0.4681163", "0.46800652", "0.4675008", "0.46728343", "0.46564218", "0.46454015", "0.46384805", "0.463545", "0.4632782", "0.46218958", "0.46100333", "0.45999914", "0.45991108", "0.45931703", "0.4563136", "0.4561457", "0.4555389", "0.4551396", "0.4550672", "0.4532747", "0.45203438", "0.45165476", "0.45117578", "0.45015293", "0.45013303", "0.44914216", "0.44860843", "0.44750598", "0.4467595", "0.44547302", "0.4448111", "0.44400746", "0.44335756", "0.44310227", "0.4428383", "0.4428281", "0.44280386", "0.44279677", "0.442766", "0.44259053", "0.44205156", "0.44123676", "0.44046673", "0.44041756", "0.44014433", "0.44001758", "0.4398957", "0.4395512", "0.43913367", "0.4390419", "0.43896896", "0.43883103", "0.4387377", "0.4385819", "0.43803626", "0.43770793", "0.43546572", "0.43546572", "0.43546572", "0.43492553", "0.43486202", "0.43454963", "0.43350306", "0.4331915", "0.4320975", "0.43196937", "0.43087775", "0.43061796" ]
0.602833
2
Validate a date against the library date range
private function validateDate($date) { $dateHead = new \DateTime(); $dateTail = (new \DateTime('+2 weeks, +1 day'))->modify('midnight'); if ($date < $dateHead || $date >= $dateTail) { throw new Exceptions\InvalidDateException('Date outside acceptable range'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function validateDate()\n {\n if (\n ($from = $this->getAvailableFrom()) &&\n ($till = $this->getAvailableTill()) &&\n $from->InPast() &&\n $till->InFuture()\n ) {\n return true;\n }\n\n return false;\n }", "function check_date($date_str)\r\n{\r\n\tif (strlen($date_str) != 10) return false;\r\n\t$pattern = \"/[0-9]{4}-[0-9]{2}-[0-9]{2}/\";\r\n\tif (!preg_match($pattern, $date_str)) return false;\r\n\t// correct format, now check ranges\r\n\treturn strtotime($date_str);\r\n}", "function is_valid_date_range($date_start, $date_end){\n $d1 = strtotime($date_start);\n $d2 = strtotime($date_end);\n\n if($d2 >= $d1){\n return true;\n }else{\n return false;\n }\n\n}", "public function checkDateRange($date,$dateRange){\r\r\n\t\t\t//provide date in format m/d/y\r\r\n\t\t\tlist($month, $day, $year) = split(\"/\", $date);\r\r\n\t\t\t$month = (int)$month;\r\r\n\t\t\t$day = (int)$day;\r\r\n\t\t\t$year = (int)$year;\r\r\n\t\t\t$fails = false;\r\r\n\t\t\tif ($year >= $dateRange['startYear'] && $year <= $dateRange['endYear']){\r\r\n\t\t\t\t//if year is within B-E\r\r\n\t\t\t\tif($year == $dateRange['startYear'] ){\r\r\n\t\t\t\t\t//Y=B\r\r\n\t\t\t\t\tif($month >= $dateRange['startMonth']){\r\r\n\t\t\t\t\t\tif($month == $dateRange['startMonth']){\r\r\n\t\t\t\t\t\t\tif($day >= $dateRange['startDay']){\r\r\n\t\t\t\t\t\t\t\t// start < contactDate\r\r\n\t\t\t\t\t\t\t}else{\r\r\n\t\t\t\t\t\t\t\t$fails = true;\r\r\n\t\t\t\t\t\t\t}\r\r\n\t\t\t\t\t\t}\r\r\n\t\t\t\t\t}else{\r\r\n\t\t\t\t\t\t$fails = true;\r\r\n\t\t\t\t\t}\r\r\n\t\t\t\t}\r\r\n\t\t\t\tif($year == $dateRange['endYear'] ){\r\r\n\t\t\t\t\tif($month <= $dateRange['endMonth']){\r\r\n\t\t\t\t\t\tif($month == $dateRange['endMonth']){\r\r\n\t\t\t\t\t\t\tif($day <= $dateRange['endDay']){\r\r\n\t\t\t\t\t\t\t\t// end > contactDate\r\r\n\t\t\t\t\t\t\t}else{\r\r\n\t\t\t\t\t\t\t\t$fails = true;\r\r\n\t\t\t\t\t\t\t}\r\r\n\t\t\t\t\t\t}\r\r\n\t\t\t\t\t}else{\r\r\n\t\t\t\t\t\t$fails = true;\r\r\n\t\t\t\t\t}\r\r\n\t\t\t\t}\r\r\n\t\t\t}else{\r\r\n\t\t\t\t$fails = true;\r\r\n\t\t\t}\r\r\n\r\r\n\t\t\tif($fails){\r\r\n\t\t\t\treturn false;\r\r\n\t\t\t} else {\r\r\n\t\t\t\treturn true;\r\r\n\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\r\r\n\t\t}", "function valida_dates($enter_date, $obsolescense_date)\n{\n $day1 = substr($enter_date, 0, 2);\n $month1 = substr($enter_date, 3, 2);\n $year1 = substr($enter_date, 6, 4);\n $day2 = substr($obsolescense_date, 0, 2);\n $month2 = substr($obsolescense_date, 3, 2);\n $year2 = substr($obsolescense_date, 6, 4);\n\n if ($enter_date <= $obsolescense_date) {\n return true;\n }\n\n return false;\n}", "function validate_date($date) {\n $d = \\DateTime::createFromFormat('Y-m-d', $date);\n return $d && $d->format('Y-m-d') === $date;\n }", "private function checkDatesValidity(){\n\t\t$valid=true;\n\t\t$today = date(\"Y-m-d\");\n\t\tif($this->validFrom!=\"\" && $this->validFrom!=\"0000-00-00\" && $today<$this->validFrom) $valid=false;\n\t\tif($this->validUntil!=\"\" && $this->validUntil!=\"0000-00-00\" && $today>$this->validUntil) $valid=false;\n\t\treturn $valid;\n\t}", "function validateDate($date)\n\t\t{\n\t\t\t$d = DateTime::createFromFormat('Y-m-d', $date);\n\t\t\treturn $d && $d->format('Y-m-d') == $date;\n\t\t}", "function validateDate($date)\n\t\t{\n\t\t\t$d = DateTime::createFromFormat('Y-m-d', $date);\n\t\t\treturn $d && $d->format('Y-m-d') == $date;\n\t\t}", "public function isValidDate() {\n\t\t// TODO\n\t\treturn TRUE;\n\t}", "public static function validate_date( $date )\n {\n return preg_match(\n '/^(19|20)\\d\\d-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$/',\n $date );\n }", "function validateDateRange($date1, $date2){\n\treturn ( strtotime($date1) - strtotime($date2) ) <= 0;\t//should be a negative number, or 0 if posts=expiration\n}", "function is_date_valid($date)\n{\n $is_date_valid = false;\n\n if (strtotime($date)) {\n list($day, $month, $year) = explode('.', $date);\n $is_date_valid = checkdate($month, $day, $year);\n }\n\n return $is_date_valid;\n}", "public function validateDates(&$start, &$end) {\n $sixMonthsAgo = strtotime(\"-6 months\");\n $day = 86400;\n $end = time();\n \n if (!$start) {\n $start = strtotime(\"-7 days\");\n }\n \n $gap = $end - $start; \n \n //Don't mess the dates!\n switch ($gap) {\n case $gap < ($day * 31) :\n $gap = $day * 7;\n break;\n\n case $gap < ($day * 180) ://6 months\n $gap = $day * 31;\n break;\n \n case $gap >= ($day * 180) : \n default : \n $gap = $day * 180; \n break;\n }\n \n $end = time();\n $start = $end - $gap;\n }", "function validaNascimento($ano, $mes, $dia)\n{\n\n $dataCheck = $ano.'-'.$mes.'-'.$dia;\n if (checkdate($mes, $dia, $ano) && $dataCheck<=date('Y-m-d'))\n return true;\n else return false;\n}", "protected function validateDate($value) {\n if (preg_match(\"/^[0-9]{4}\\-[0-9]{2}\\-[0-9]{2}$/\", $value))\n return true;\n $this->setError(t(\"Invalid date (YYYY-MM-DD)\"));\n return false;\n }", "function valid_date($date){\r\n\t$day = date_day($date);\r\n\t$month = date_month($date);\r\n\t$year = date_year($date);\r\n\tif(!is_numeric($day) || !is_numeric($month) || !is_numeric($year)){\r\n\t\treturn FALSE;\r\n\t}elseif($month < 1 || $month > 12){\r\n\t\treturn FALSE;\r\n\t}elseif(($day < 1) || ($day > 30 && ($month == 4 || $month == 6 || $month == 9 || $month == 11 )) || ($day > 31)){\r\n\t\treturn FALSE;\r\n\t}elseif($month == 2 && ($day > 29 || ($day > 28 && (floor($year / 4) != $year / 4)))){\r\n\t\treturn FALSE;\r\n\t}else{\r\n\t\treturn TRUE;\r\n\t}\r\n}", "function isDateValid($dateInput){\n\t\t$d = DateTime::createFromFormat('Y-m-d', $dateInput);\n\t\treturn $d && $d->format('Y-m-d') === $dateInput;\n\t}", "public function testValidationOk($date)\n {\n // We set the \"fake\" time with timeTravel method\n $this->timeTravel('2018-11-26 00:00:00');\n $notPastDateConstraint = new NotPastDate();\n $notPastDateValidator = $this->initValidator();\n\n $this->purchase->setDateOfVisit($date);\n $notPastDateValidator->validate($this->purchase, $notPastDateConstraint);\n }", "function isValidDate($date) {\n $d = DateTime::createFromFormat('Y-m-d', $date);\n return $d && $d->format('Y-m-d') == $date;\n}", "public function isValidPaydate($date);", "function valid_date( $value = '', $format = 'Y-m-d H:i:s' )\n\t{\n\t\t$date = date_parse($value);\n\t\t$valid = ( $date['error_count'] == 0 && checkdate($date['month'], $date['day'], $date['year']) );\n\t\t\n\t\t/*\n\t\t// Create a date depending on PHP version\n\t\t$version = explode('.', phpversion());\n\t\tif (((int) $version[0] >= 5 && (int) $version[1] >= 2 && (int) $version[2] > 17))\n\t\t{\n\t\t\t$d = DateTime::createFromFormat($format, $date);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$d = new DateTime(date($format, strtotime($date)));\n\t\t}\n\t\t*/\n\t\t/*\n\t\t// Check valid date\n\t\t$format = 'Y-m-d H:i:s';\n\t\t$d = new DateTime(date($format, strtotime($date)));\n\t\t$valid_date = ( $d && $d->format($format) == $date );\n\t\t// or\n\t\t$date = date_parse($date);\n\t\t$valid_date = ( $date['error_count'] == 0 && checkdate($date['month'], $date['day'], $date['year']) );\n\t\tif ( ! $valid_date )\n\t\t{\n\t\t\t$valid = false;\n\t\t\t$return_message[] = 'The approved date is invalid.';\n\t\t}\n\t\t*/\n\t\t\n\t\tif ( ! $valid )\n\t\t{\n\t\t\t$this->set_message('valid_date', 'The %s field has in invalid date.');\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "function isDateValid($date) {\r\n //$uy = $uyear->format(\"Y\");\r\n //$sy = date(\"Y\");\r\n \r\n if(preg_match('^(((0[1-9]|[12]\\d|3[01])\\/(0[13578]|1[02])\\/((19|[2-9]\\d)\\d{2}))|((0[1-9]|[12]\\d|30)\\/(0[13456789]|1[012])\\/((19|[2-9]\\d)\\d{2}))|((0[1-9]|1\\d|2[0-8])\\/02\\/((19|[2-9]\\d)\\d{2}))|(29\\/02\\/((1[6-9]|[2-9]\\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))))$^', $date))\r\n return false;\r\n else\r\n return true;\r\n \r\n}", "public static function validateDate($date) {\r\n if(preg_match(\"/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/\", $date)) // has to be YYYY-MM-DD\r\n {\r\n $dt = new DateTime($date);\r\n $d = $dt->format(self::dateDay);\r\n $m = $dt->format(self::dateMonth);\r\n $y = $dt->format(self::dateYear);\r\n if(!checkdate($m, $d, $y))\r\n {\r\n throw new Exception(\"Das Datum [\".$date.\"] entspricht keinem g&uuml;ltigen Format\");\r\n }\r\n else\r\n {\r\n return true; \r\n }\r\n }\r\n else\r\n {\r\n throw new Exception(\"Das Datum [\".$date.\"] entspricht nicht dem Format 'YYYY-MM-DD'\");\r\n }\r\n }", "protected function isValidDate($value)\n\t{\n\t\t$minValue=$this->getMinValue();\n\t\t$maxValue=$this->getMaxValue();\n\t\t \n\t\t$valid=true;\n\n\t\t$dateFormat = $this->getDateFormat();\n\t\tif (strlen($dateFormat)) \n\t\t{\n\t\t\t$value = pradoParseDate($value, $dateFormat);\n\t\t\tif (strlen($minValue)) \n\t\t\t\t$valid=$valid && ($value>=pradoParseDate($minValue, $dateFormat)); \n\t\t\tif (strlen($maxValue)) \n\t\t\t\t$valid=$valid && ($value <= pradoParseDate($maxValue, $dateFormat));\n\t\t\treturn $valid;\n\t\t} \n\t\telse \n\t\t{\n\t\t\t$value=strtotime($value);\n\t\t\tif(strlen($minValue))\n\t\t\t\t$valid=$valid && ($value>=strtotime($minValue));\n\t\t\tif(strlen($maxValue))\n\t\t\t\t$valid=$valid && ($value<=strtotime($maxValue));\n\t\t\treturn $valid;\n\t\t} \n\t}", "public static function validateDate($input)\r\n\t{\r\n\t\treturn preg_match('/\\d{2}-\\d{2}-\\d{4}/', $input) && (strlen($input) == 10);\r\n\t}", "function verifyDate($date, $date_format)\n {\n $datetime=DateTime::createFromFormat($date_format, $date);\n $errors=DateTime::getLastErrors();\n if (!$datetime || !empty($errors['warning_count'])) //date was invalid\n {\n $date_check_ok=false;\n }\n else //everything OK\n {\n $date_check_ok=true;\n }\n\n return $date_check_ok;\n }", "public function checkDateWithInvalidDateValuesDataProvider() {}", "function validateDate($date_joined) {\n if((preg_match('/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/', $date_joined))) {\n list( $y, $m, $d ) = preg_split( '/[-\\.\\/ ]/', $date_joined );\n return (checkdate( $m, $d, $y ) && ($y >= date('Y') - 2) && ($y <= date('Y')));\n } else {\n // wrong format, convert to correct format\n $date_joined = date('Y-m-d', strtotime(str_replace('-', '/', $date_joined)));\n list( $y, $m, $d ) = preg_split( '/[-\\.\\/ ]/', $date_joined );\n return (checkdate( $m, $d, $y ) && ($y >= date('Y') - 2) && ($y <= date('Y')));\n }\n }", "function is_date_format_valid($date)\n{\n return preg_match(\"/(0[1-9]|[12][0-9]|3[01])[ \\.](0[1-9]|1[012])[ \\.](19|20)\\d\\d/\", $date) !== 0;\n}", "function nrua_validateDate($date, $format = 'Y-m-d H:i:s')\n{\n $d = DateTime::createFromFormat($format, $date);\n return $d && $d->format($format) == $date;\n}", "function validateDate($date, $format = 'Y-m-d')\n {\n $d = DateTime::createFromFormat($format, $date);\n // The Y ( 4 digits year ) returns TRUE for any integer with any number of digits so changing the comparison from == to === fixes the issue.\n return $d && $d->format($format) === $date;\n }", "private function validateDate($date)\n {\n $currentDate = strtotime(date('Y-m-d'));\n $maxScheduleDate = strtotime(date('Y-m-d', strtotime('+6 months')));\n $scheduledDate = strtotime($date);\n\n if ($scheduledDate <= $currentDate) {\n return $error\n = 'Please select a date from future (unless you have a time machine that can take you back in '.$date\n .'). ';\n }\n\n if ($scheduledDate >= $maxScheduleDate) {\n return $error = 'You cannot schedule a movie more than 6 months from now. ';\n }\n\n return true;\n }", "public function testValidationOk($date)\n {\n $notSundayConstraint = new NotSunday();\n $notSundayValidator = $this->initValidator();\n\n $purchase = new Purchase();\n $purchase->setDateOfVisit($date);\n $notSundayValidator->validate($purchase, $notSundayConstraint);\n }", "function erp_check_date_in_range( $start_date, $end_date, $date_from_user ) {\n // Convert to timestamp\n $start_ts = strtotime( $start_date );\n $end_ts = strtotime( $end_date );\n $user_ts = strtotime( $date_from_user );\n\n // Check that user date is between start & end\n if ( ( $user_ts >= $start_ts ) && ( $user_ts <= $end_ts ) ) {\n return true;\n }\n\n return false;\n}", "function validateDate($date, $format = 'Y-m-d') {\n \t $d = DateTime::createFromFormat($format, $date);\n \t return $d && $d->format($format) === $date;\n }", "function erp_check_date_range_in_range_exist( $start_date, $end_date, $user_date_start, $user_date_end ) {\n\n if ( erp_check_date_in_range( $start_date, $end_date, $user_date_start ) ) {\n return true;\n }\n\n if ( erp_check_date_in_range( $start_date, $end_date, $user_date_end ) ) {\n return true;\n }\n\n return false;\n}", "protected function _checkDate($from, $to) {\r\n $return = true;\r\n $date = date( 'Y-m-d');\r\n $today = strtotime ($date);\r\n if ($from && $today < $from) {\r\n $return = false;\r\n }\r\n if ($to && $today > $to) {\r\n $return = false;\r\n }\r\n if (! $to && ! $from) {\r\n $return = false;\r\n }\r\n return $return;\r\n }", "public function checkDate($date)\n\t{\n\t\tif (preg_match(\"/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/\",$date)){\n\t return true;\n\t }\n\t else{\n\t \t$this->form_validation->set_message('checkDate','date should be as yyyy-mm-dd');\n\t return false;\n\t }\n\t}", "function verifyDate($date) {\r\n $date = trim($date);\r\n if (!is_numeric($date) || strlen($date) != 8) {\r\n return false;\r\n }\r\n $year = substr($date, 0, 4);\r\n $month = substr($date, 4, 2);\r\n $day = substr($date, 6);\r\n if (!checkdate($month, $day, $year)) {\r\n return false;\r\n } else {\r\n return \"$year-$month-$day\";\r\n }\r\n}", "function validateDate($date,$format ='Y-m-d'){\n$d = dateTime::createFromFormat($format,$date);\n\nif($d && $d->format($format) == $date){\nreturn true;\n } else {\n return false;\n }\n}", "public function testIsValidWithValidMatchDate() {\n\t\t$this->assertTrue($this->match->validate(array('match_date' => '28 February 2014')), 'Expected model to pass validation with a valid match date.');\n\t\t$this->assertTrue($this->match->validate(array('match_date' => '2014-02-28')), 'Expected model to pass validation with a valid match date.');\n\t\t$this->assertTrue($this->match->validate(array('match_date' => 'February 28th 2014')), 'Expected model to pass validation with a valid match date.');\n\t}", "protected function checkDate($date)\r\n\t{\r\n\t\tif(!$date)\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\tif(!preg_match('/^([1-3][0-9]{3,3})-(0?[1-9]|1[0-2])-(0?[1-9]|[1-2][1-9]|3[0-1])$/', $date)) {\r\n\t\t\t\tthrow new Exception ( 'checkDate() expects a SQL formatted date like 2009-12-24.' );\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "function wp_checkdate($month, $day, $year, $source_date)\n {\n }", "public static function validateDate($date)\n {\n $d = \\DateTime::createFromFormat('Y-m-d', $date);\n return $d && $d->format('Y-m-d') === $date;\n }", "private function validatePassportIssuedDate() {\n $issued_date = DateTime::createFromFormat( 'd.m.Y', $this->passport_issued_date );\n\n if ( $issued_date < DateTime::createFromFormat( 'd.m.Y', '01.10.1997' ) ) {\n $this->errors[] = [ 'Паспорт должен быть выдан не позднее 1 октября 1997 года' ];\n }\n\n if ( $issued_date > new DateTime( 'tomorrow' ) ) {\n $this->errors[] = [ 'Паспорт не может быть выдан в будущем' ];\n }\n }", "public function testDatesValides()\n {\n $this->context->expects($this->never())\n ->method('addViolation');\n $this->holidayValidator->validate(\\DateTime::createFromFormat('Y-m-d', '2019-01-10'), $this->holidayticket);\n }", "function _fourD_analysis_validate_date( $d ) {\n $ymd = explode('-', $d );\n \n if( sizeof($ymd) != 3 || strlen($ymd[0]) != 4 || ((int)$ymd[1]) < 1 || ((int)$ymd[2]) < 1 ){\n return false;\n }\n else{\n $ymd[1] = str_replace('0', '', $ymd[1]);\n $ymd[2] = str_replace('0', '', $ymd[2]);\n if($ymd[1] < 10) $ymd[1] = \"0\" . $ymd[1]; // pad month with leading 0\n if($ymd[2] < 10) $ymd[2] = \"0\" . $ymd[2]; // pad day with leading 0\n $ymd[3] = $ymd[0].'-'.$ymd[1].'-'.$ymd[2];\n $epoch = strtotime( $ymd[3] );\n // fourD_analysis_debug('form_parts_validate; $ymd[3]: '. $ymd[3].'; epoch: '.$epoch );\n \n //if( !$time || $time <= time() ){ // Allow past dates? What about editing an old project?\n // $err = 'Date must be in the future.';\n if( $epoch > 1 ){\n return $epoch;\n }\n }\n return false;\n}", "protected function validateDate($value){\n\t\tif ($value instanceof DateTime) return true;\n\n\t\tif (strtotime($value) === false) return false;\n\n\t\t$date = date_parse($value);\n\n\t\treturn checkdate($date['month'], $date['day'], $date['year']);\n\t}", "public static function isValidDate($date){\n return (DateTime::createFromFormat('d/m/Y', $date)) ? true : false;\n }", "public function validateDate($data)\n {\n\n if($data =='now' || (strlen($data)>=8 && strlen($data)<=10)) {\n try {\n $value_time = new DateTime($data);\n return true;\n } catch (Exception $e) {\n // Is not a valida Date\n }\n }\n return false;\n }", "function _validateDate($date, $format = 'd/m/Y'){\n $d = DateTime::createFromFormat($format, $date);\n return $d && $d->format($format) == $date;\n }", "function validateDate($date, $format = 'Y-m-d H:i:s')\n{\n $d = DateTime::createFromFormat($format, $date);\n return $d && $d->format($format) == $date;\n}", "function validateDate($date, $format = 'Y-m-d H:i:s')\n{\n $d = DateTime::createFromFormat($format, $date);\n return $d && $d->format($format) == $date;\n}", "public function testDate()\n {\n $this->assertTrue(BrValidation::date('01/01/2020'));\n $this->assertTrue(BrValidation::date('12/11/2019'));\n $this->assertTrue(BrValidation::date('21/04/1940'));\n $this->assertTrue(BrValidation::date('1/3/20'));\n\n $this->assertFalse(BrValidation::date('25-12-2000'), 'BR date accept only slash as separator');\n $this->assertFalse(BrValidation::date('04/21/1980'), 'BR date accept only day/month/year sequence');\n $this->assertFalse(BrValidation::date('2000-12-25'));\n $this->assertFalse(BrValidation::date('2019/11/12'));\n $this->assertFalse(BrValidation::date('2040/25/12'));\n }", "function validateDate($date, $format = 'Y-m-d H:i:s')\n {\n $d = DateTime::createFromFormat($format, $date);\n return $d && $d->format($format) == $date;\n }", "public function dateValidator($attribute,$params){\n\t\t//kamus lokal\n\t\t$message ='start date : '.$this->PlannedStartDate.' end date : '.$this->PlannedEndDate;\n\t\t$category = 'date initial in validator cek value';\n\t\tYii::trace($message, $category);\n\t\t//function\n if (($this->PlannedStartDate <= $this->PlannedEndDate) OR ($this->PlannedEndDate === date(\"Y-m-d\"))){\n\t\t\t$message=\"valid\";\n\t\t\t$category=\"date debugging\";\n\t\t\tYii::trace($message, $category);\n\t\t}else{\n\t\t\t\t$message=\"invalid\";\n\t\t\t\t$category=\"date debugging\";\n\t\t\t\tYii::trace($message, $category);\n\t\t\t$this->addError('PlannedStartDate', 'Planned Start Date invalid, must be >= than Planned End Date');\n\t\t}\n\t}", "function validateDate($date,$format = 'Y-m-d H:i:s') {\n $d = DateTime::createFromFormat($format, $date);\n return $d && $d->format($format) == $date;\n}", "public function validateDate(){\n \t$attrs = ['requested_at', 'replied_at', 'fixed_begin', 'fixed_end'];\n \tforeach ($attrs as $a){\n \t\tif (is_array($d = $this->getAttribute($a)) && array_key_exists('date', $d) && array_key_exists('time', $d)){\n \t\t\t$fmt = ['Y-m-d H:i:s', 'Y-m-d H:i', 'Y-m-d H', 'Y-m-d '];\n \t\t\tforeach ($fmt as $f){\n\t \t\t\t$date = \\DateTime::createFromFormat($f, $d['date'] . ' ' . $d['time']);\n\t \t\t\tif (is_object($date)){\n\t \t\t\t\t$this->setAttribute($a, $date->format('Y-m-d H:i:s'));\n\t \t\t\t\tbreak;\n\t \t\t\t}\n \t\t\t}\n \t\t}\n \t}\n }", "function date_forbid() {\n if (empty($this->argument)) {\n return TRUE;\n }\n $this->date_range = $this->date_handler->arg_range($this->argument);\n $this->min_date = $this->date_range[0];\n $this->max_date = $this->date_range[1];\n $this->limit = date_range_years($this->options['year_range']);\n $group = !empty($this->options['date_group']) ? $this->options['date_group'] : 0;\n\n // See if we're outside the allowed date range for our argument.\n if (date_format($this->min_date, 'Y') < $this->limit[0] || date_format($this->max_date, 'Y') > $this->limit[1]) {\n $this->forbid = TRUE;\n $this->view->build_info['fail'] = TRUE;\n return TRUE;\n }\n return FALSE;\n }", "public function testValidationKo($date)\n {\n // We set the \"fake\" time with timeTravel method\n $this->timeTravel('2018-11-26 00:00:00');\n $notPastDateConstraint = new NotPastDate();\n $notPastDateValidator = $this->initValidator($notPastDateConstraint->message);\n\n $this->purchase->setDateOfVisit($date);\n $notPastDateValidator->validate($this->purchase, $notPastDateConstraint);\n\n }", "function dateValidation($value) {\n\t$reg = \"/^(((0?[1-9]|1[012])\\/(0?[1-9]|1\\d|2[0-8])|(0?[13456789]|1[012])\\/(29|30)|(0?[13578]|1[02])\\/31)\\/(19|[2-9]\\d)\\d{2}|0?2\\/29\\/((19|[2-9]\\d)(0[48]|[2468][048]|[13579][26])|(([2468][048]|[3579][26])00)))$/\";\n\treturn preg_match($reg,$value);\n}", "function valida_dates($discharge_day, $expiry_day) {\n //conole.log( $discharge_day + \"\" + $expiry_day);\n $discharge_day = date(\"m/d/Y\", strtotime($discharge_day));\n $expiry_day = date(\"m/d/Y\", strtotime($expiry_day));\n\n $discharge_day_arr = explode('/', $discharge_day);\n $expiry_day_arr = explode('/', $expiry_day);\n\n $dateOne = new DateTime($discharge_day_arr[2] . \"-\" . $discharge_day_arr[0] . \"-\" . $discharge_day_arr[1]);\n $dateTwo = new DateTime($expiry_day_arr[2] . \"-\" . $expiry_day_arr[0] . \"-\" . $expiry_day_arr[1]);\n\n if ($dateOne < $dateTwo) {\n return true;\n }\n return false;\n}", "function options_validate(&$form, &$form_state) {\n parent::options_validate($form, $form_state);\n if (!preg_match('/^(?:\\-[0-9]{1,4}|[0-9]{4}):(?:[\\+|\\-][0-9]{1,4}|[0-9]{4})$/', $form_state['values']['options']['year_range'])) {\n form_error($form['year_range'], t('Date year range must be in the format -9:+9, 2005:2010, -9:2010, or 2005:+9'));\n }\n }", "public function validateDate($date)\n {\n try {\n return new DateTime($date);\n } catch (Exception $e) {\n return false;\n }\n }", "function check_date( $day, $month, $year )\n{\n if ( ( 12 <= $month && $month <= 31 ) && $day <= 12 )\n {\n $m = $month;\n $month = $day;\n $day = $m;\n };\n\n if ( $day > 31 || $month > 12 )\n {\n return array( FALSE, array() );\n };\n\n if ( ! ( ( 1900 <= $year && $year <= 2019 ) ) )\n {\n return array( FALSE, array() );\n }\n\n return array( TRUE, array( $day, $month, $year ) );\n}", "protected static function check_date($date) {\n $date_arr = explode(\"-\", $date);\n\n if (count($date_arr) == 3 && checkdate($date_arr[1], $date_arr[2], $date_arr[0])) {\n return false;\n } else {\n return true;\n }\n }", "public function validate($input)\n {\n if(new \\DateTime($input) <= \\Carbon\\Carbon::now()->subDays(3)) {\n \n return false;\n\n }\n\n // no date future\n if(new \\DateTime($input) > \\Carbon\\Carbon::now()) {\n\n return false;\n }\n\n return true;\n }", "function validate_date() {\n # Check the date is in ISO date format\n if (ereg('(19|20)[0-9]{2}[- /.](0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])', $this->cur_val)) {\n # Remove any existing error message\n $this->error_message = \"\";\n\n # Return Value\n return $this->cur_val;\n }\n else {\n # Set Error Message\n $this->set_error(\"Validation for date ({$this->cur_val}) failed. This is type \" . gettype($this->cur_val));\n\n # Return Blank Date\n return \"0000-00-00\";\n }\n }", "function validateDate($date, $format = 'd/m/Y H:i:s')\n{\n $d = DateTime::createFromFormat($format, $date);\n return $d && $d->format($format) == $date;\n}", "public function checkDateVisit(){\n $yearError = new DaYearError($this->record[\"DateVisit\"]);\n if($yearError->getErrorType() != DaYearError::ERR_NONE){\n $this->addError(\"[DateVisit] invalid: \\\"{$yearError}\\\" \");\n return false;\n }\n return true;\n }", "public function validate_date_values($date_query = array())\n {\n }", "function validateDate($date){\r\n $date = trim($date);\r\n $date_arr = explode(\"/\", $date);\r\n return checkdate ( $date_arr[0] , \"01\" , $date_arr[1] );\r\n\r\n}", "function _valid_date($field)\r\n\t{\r\n\t\t// Ignore if empty\r\n\t\tif (empty($this->{$field}))\r\n\t\t{\r\n\t\t\treturn TRUE;\r\n\t\t}\r\n\r\n\t\t$date = date_parse($this->{$field});\r\n\r\n\t\treturn checkdate($date['month'], $date['day'],$date['year']);\r\n\t}", "public function test_end_date_is_before_start_date()\n {\n // show actiual errors without handling\n //$this->withoutExceptionHandling();\n \n $this->json('POST', '/', array_merge($this->data(),['start_date'=>date('Y-m-d'),'end_date'=>date('Y-m-d', strtotime('-35 days'))]))\n ->seeJson([\n 'end_date' => [\"The end date must be a date after or equal to start date.\"]\n ]);\n \n }", "function check_in_range($start_date, $end_date, $date_from_user)\n{\n // Convert to timestamp\n $start_ts = strtotime($start_date);\n $end_ts = strtotime($end_date);\n $user_ts = strtotime(date('Y-m-d', strtotime($date_from_user)));\n\n // Check that user date is between start & end\n return (($user_ts >= $start_ts) && ($user_ts <= $end_ts));\n}", "public static function isValidDate($y,$m,$d)\n {\n return checkdate($m, $d, $y);\n }", "private function compare_with_date()\n {\n }", "private function checkDate($start_date, $end_date, $start_date_2, $end_date_2) {\n // Convert to timestamp\n $date['start'] = strtotime($start_date);\n $date['end'] = strtotime($end_date);\n $date2['start'] = strtotime($start_date_2);\n $date2['end'] = strtotime($end_date_2);\n \n // check if intervals overlap\n if(($date['start'] <= $date2['end']) && ($date['end'] >= $date2['start'])) {\n return FALSE;\n }\n \n return TRUE;\n }", "function validateDate(&$errors, $field_list, $field_day, $field_month, $field_year)\n{\n\t//check if a field has been missed\n\t//$errors[$field_day] = \"$field_list[$field_day] $field_list[$field_month] $field_list[$field_year]\";\n\tif ((!isset($field_list[$field_day])|| empty($field_list[$field_day])) || (!isset($field_list[$field_month])|| empty($field_list[$field_month])) || (!isset($field_list[$field_year])|| empty($field_list[$field_year])))\n\t\t$errors[$field_day] = ' Required';\n\n\t//check February dates\n\telse if (($field_list[$field_month] == 2) && ($field_list[$field_day] == 29) && (date(\"L\", mktime(0, 0, 0, 2, 29, $field_list[$field_year])) == 0))\n\t\t\t$errors[$field_day] = ' Invalid Date: no 29th in '.$field_list[$field_year];\t\n\telse if (($field_list[$field_month] == 2) && ($field_list[$field_day] >= 30)) \n\t\t\t$errors[$field_day] = ' Invalid Date: day not in February';\n\t//check 30 Day months i.e September, April, etc\n\telse if (($field_list[$field_day] == 31) && (($field_list[$field_month] == 9) || ($field_list[$field_month] == 4) || ($field_list[$field_month] == 6) || ($field_list[$field_month] == 11)))\n\t\t$errors[$field_day] = ' Invalid Date: no 31st in'.$field_list[$field_year];\n}", "function valid_date($str) \n\t{\n\t\t//if (ereg(\"([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})\", $str)) {\n\t\tif (preg_match(\"/([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})/\", $str)) \n\t\t{\n\t\t\t//$arr = split(\"-\", $str);\n\t\t\t$arr = preg_split(\"/-/\", $str);\n\t\t\t$yyyy = (int) $arr[0];\n\t\t\t$mm = (int) $arr[1];\n\t\t\t$dd = (int) $arr[2];\n\t\t\treturn checkdate($mm, $dd, $yyyy);\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public static function isValidDate($date)\n {\n preg_match_all('/^([0-9]{1,2}).([0-9]{1,2}).([0-9]{4})$/', $date, $matches);\n if (count($matches) == 4) {\n return checkdate($matches[2][0], $matches[1][0], $matches[3][0]);\n }\n return false;\n }", "function checkIsValidDate($date, $format = 'Y-m-d H:i:s')\n {\n $d = DateTime::createFromFormat($format, $date);\n return $d && $d->format($format) === $date;\n }", "private function validate_booking(): bool {\n\t $this->errors = array();\n\n // Clear data using test_input function\n foreach ($this->request->post as $key => $value) {\n $this->request->post[$key] = self::test_input($this->request->post[$key]);\n }\n\n // Time\n if(!(preg_match(\"/^(?:2[0-3]|[01][0-9]):[0-5][0-9]$/\", $this->request->post[\"time\"]))){\n array_push($this->errors,$this->language->get('time_error'));\n }\n\n // Date\n $temp = new DateTime();\n\n // Create date object (without time)\n $date = DateTime::createFromFormat('Y-m-d', $this->request->post[\"date\"]);\n\n // Remove time from datetime string\n $now = DateTime::createFromFormat(\"Y-m-d\", $temp->format(\"Y-m-d\"));\n\n // Extract data\n $year = $date->format(\"Y\");\n $month = $date->format(\"m\");\n $day = $date->format(\"d\");\n\n if($date < $now){\n array_push($this->errors,$this->language->get('date_past_error'));\n }\n else if(!checkdate($month,$day,$year)) {\n //$this->errors[\"date\"] = $this->language->get('date_error');\n array_push($this->errors,$this->language->get('date_value_error'));\n }\n\n //TODO: REMOVE\n return count($this->errors) == 0;\n }", "function ValidateDate($date)\n{\n // Cut date for some strings to check it.\n list($dd, $mm, $yyyy) = explode(\"-\", $date);\n \n // Check if date exist. \n if (is_numeric($dd) && is_numeric($mm) && is_numeric($yyyy))\n {\n if (!checkdate($mm, $dd, $yyyy)) \n {\n return false;\n }\n else \n {\n // Reverse date to mysql format.\n $date = sprintf(\"%d-%02d-%02d\", $yyyy,$mm,$dd);\n return $date; \n }\n }\n return false;\n}", "function check_date ($day, $month, $year) {\n\t\n\tif (preg_match ('/[0-9]{2}/',$day)) {\n\t\t\n\t\tif (preg_match ('/[0-9]{2}/',$month)) {\n\t\t\t\n\t\t\tif (preg_match ('/[0-9]{4}/',$year)) {\n\t\t\t\t\n\t\t\t\tif (checkdate ($month, $day, $year)) {\n\t\t\t\t\t\n\t\t\t\t\treturn true;\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\treturn false;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\treturn false;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\treturn false;\n\t\t\t\n\t\t}\n\t} else {\n\t\t\n\t\treturn false;\n\t\t\n\t}\n}", "function verifyStartDate($date)\n\t{\n\t\tif ( strtotime($date) > strtotime('2005-01-01') )\n\t\t\treturn $date;\n\t\telse\n\t\t\treturn '2005-01-01';\n\t}", "function checkMyDate($date) {\n if (trim($date)==\"\") return false;\n $arr = explode(\"-\",$date);\nreturn checkdate($arr[1],$arr[2],$arr[0]);\n}", "function validateDate($strdate) {\n//Must be 10 digits in MM/DD/YYYY format\n//Checks for a valid date (i.e days in a month etc..)\n//Returns an array\n//\t[0] - boolean 0 for good date, 1 for date error\n// [#] - error messasge\n\n \n\t$i = 0;\t\n\tif(((strlen($strdate)<10) OR (strlen($strdate)>10)) OR\n\t ((substr_count($strdate,\"/\"))<>2)) {\n\t\t$retarray[++$i] = \"Date not in 'MM/DD/YYYY' format\";\n\t} else {\n\t\t$month=(substr($strdate,0,2)); //Parse the string to be validated\n\t\t$day=(substr($strdate,3,2));\n\t\t$year=(substr($strdate,6,4));\t\n\t\t\t\n\t\t$result=ctype_digit($year);\n\t\tif(!($result)){\n\t\t\t$year=0;\n\t\t\t$isLeap=false;\n\t\t\t$retarray[++$i] = \"Year is not numeric\";\n\t\t} else {\n\t\t\t$isLeap = DateTime::createFromFormat('Y', $year)->format('L') === \"1\";\n\t\t}\t\n\t\t\t\n\t\t$result=ctype_digit($month);\n\t\tif(!($result)){\n\t\t\t$month=0; \n\t\t\t$retarray[++$i] = \"Month is not numeric\";\n\t\t} else {\n\t\t\tif(($month<=0)OR($month>12)){\n\t\t\t\t$retarray[++$i] = \"Month is not between 01 and 12\";\n\t\t\t}\n\t\t}\n\t\t\t\n\t\t$result=ctype_digit($day);\n\t\tif(!($result)){\n\t\t\t$day=0; \n\t\t\t$retarray[++$i] = \"Day is not numeric\";\n\t\t} else {\n\t\t\tif(($day<=0)OR($day>31)){\n\t\t\t\t$retarray[++$i] = \"Day is not between 01 and 31\";\n\t\t\t}\t\n\t\t\t\n\t\t\tif((($month==2) AND (((!$isLeap)AND($day>28))OR(($isLeap)AND($day>29)))) OR \n\t\t\t ((($month==4) OR ($month==6) OR ($month==9) OR ($month==11)) AND ($day>30))){\n\t\t\t\t$retarray[++$i] = \"Day is not valid for month/year\";\n\t\t\t}\t\t\t\n\t\t}\n\t}\n\t\n\tif ($i > 0) {\n\t\t$retarray[0] = False;\n\t} else {\n\t\t$retarray[0] = True;\n\t}\t\n\t\n\treturn($retarray); \n}", "private static function validateDate(string $date): bool\n {\n $date = \\DateTime::createFromFormat('Y-m-d', $date);\n\n if (!$date) {\n return false;\n }\n\n return true;\n }", "public function validStartDate($date)\n\t{\n\t\t$currentDate = new Datetime;\n\t\t$startDate = new Datetime($date);\n\n\t\treturn ($startDate < $currentDate) ? false : true;\n\t}", "function isValidateDate($date, $format = 'd-m-Y')\r\n {\r\n switch ($format) {\r\n case 'd-m-Y':\r\n if (preg_match(\"/^([0-9]{2})-([0-9]{2})-([0-9]{4})$/\", $date, $parts)) {\r\n //check weather the date is valid of not\r\n if (checkdate($parts[2], $parts[1], $parts[3]))\r\n return true;\r\n else\r\n return false;\r\n } else\r\n return false;\r\n break;\r\n case 'Y-m-d':\r\n if (preg_match(\"/^([0-9]{4})-([0-9]{2})-([0-9]{2})$/\", $date, $parts)) {\r\n //check weather the date is valid of not\r\n if (checkdate($parts[2], $parts[3], $parts[1]))\r\n return true;\r\n else\r\n return false;\r\n } else\r\n return false;\r\n break;\r\n case 'd/m/Y':\r\n if (preg_match(\"/^([0-9]{2})\\/([0-9]{2})\\/([0-9]{4})$/\", $date, $parts)) {\r\n //check weather the date is valid of not\r\n if (checkdate($parts[2], $parts[1], $parts[3]))\r\n return true;\r\n else\r\n return false;\r\n } else\r\n return false;\r\n break;\r\n }\r\n }", "private function checkDates($startdate, $enddate) {\n return $this->checkDate($startdate) && $this->checkDate($enddate);\n }", "public function check_date_format($date) {\n $datepieces = explode('-', $date);\n $return = true;\n\n if (count($datepieces) != 3) {\n $return = false;\n } else {\n foreach ($datepieces as $piece => $datepiece) {\n if (!is_numeric($datepiece)) {\n $return = false;\n break;\n }\n switch ($piece) {\n // Year check.\n case 0:\n if ((strlen($datepiece) != 4) || ($datepiece <= 0)) {\n $return = false;\n break 2;\n }\n break;\n\n // Month check.\n case 1:\n if ((strlen($datepiece) != 2) || ((int)$datepiece < 1) || ((int)$datepiece > 12)) {\n $return = false;\n break 2;\n }\n break;\n\n // Day check.\n case 2:\n if ((strlen($datepiece) != 2) || ((int)$datepiece < 1) || ((int)$datepiece > 31)) {\n $return = false;\n break 2;\n }\n break;\n }\n }\n }\n return $return;\n }", "public function checkHireDateisinRange($year,$dateRange){\r\r\n\t\t\t// some employee hire dates are entered in 'xx' some in 'xxxx' - this filters them out and compares accordingly\r\r\n\t\t\t$year = (int)$year;\r\r\n\t\t\tif($year < 100){ // if year was sloppily entered in 2 digit format\r\r\n\t\t\t\tif($year >= 50){ // safe to assume the 2digit year is from the 1900s\r\r\n\t\t\t\t\t$year = $year + 1900;\r\r\n\t\t\t\t}elseif($year < 50 ){ // safe to assume the 2 digit year is from the 2000s\r\r\n\t\t\t\t\t$year = $year + 2000;\r\r\n\t\t\t\t}\r\r\n\t\t\t} \r\r\n\r\r\n\t\t\tif( $year <= $dateRange['endYear']){\r\r\n\t\t\t\treturn true;\r\r\n\t\t\t} else{\r\r\n\t\t\t\treturn false;\r\r\n\t\t\t}\r\r\n\t\t}", "function CHECK_valability($endDATE) {\n\n $TMSP_end = strtotime($endDATE);\n $TMSP_today = time();\n\n if($TMSP_end > $TMSP_today) return true;\n else return false;\n }", "public function test_end_date_before_more_than_30_days()\n {\n // show actiual errors without handling\n //$this->withoutExceptionHandling();\n \n $this->json('POST', '/', array_merge($this->data(),['end_date'=>date('Y-m-d', strtotime('-35 days'))]))\n ->seeJson([\n 'end_date' => [\"The end date must be a date after or equal to start date.\"]\n ]);\n \n \n }", "public function validate() {\n//\t\tif( intval($this->params[\"startYear\"] < date(\"yyyy\"))) $this->add_validation_error(\"Season cannot exist in the past.\");\n\t}", "function fecha_valida($fecha){\n if(ereg( \"([0-9]{2})/([0-9]{2})/([0-9]{4})\",$fecha)){\n ereg( \"([0-9]{2})/([0-9]{2})/([0-9]{4})\", $fecha, $mifecha);\n $ok = checkdate($mifecha[2],$mifecha[1],$mifecha[3]);\n if($ok){\n $actual = date(\"Y-m-d\");\n $older = \"1900-01-01\";\n $dtime = strtotime(fecha_mysql($fecha));\n $dtime_ac = strtotime($actual);\n $dtime_ol = strtotime($older);\n if($dtime>$dtime_ac || $dtime<$dtime_ol){\n return false;\n }else{\n return true;\n }\n }else{\n // fecha fuera del calendario\n return false;\n } \n }else{\n // formato no valido\n return false;\n }\n}", "function test_range() {\n\t\t// Check range\n\t\tlist( $start, $end ) = $this->revenue->get_month_range( 2018, 1 );\n\t\t$this->assertEquals( '2018-01-01 00:00:00', $start );\n\t\t$this->assertEquals( '2018-01-31 23:59:59', $end );\n\t\t// Check leap year\n\t\tlist( $start, $end ) = $this->revenue->get_month_range( 2004, 2 );\n\t\t$this->assertEquals( '2004-02-01 00:00:00', $start );\n\t\t$this->assertEquals( '2004-02-29 23:59:59', $end );\n\t\t// Check exceptional leap year.\n\t\tlist( $start, $end ) = $this->revenue->get_month_range( 1900, 2 );\n\t\t$this->assertEquals( '1900-02-01 00:00:00', $start );\n\t\t$this->assertEquals( '1900-02-28 23:59:59', $end );\n\t}" ]
[ "0.7795238", "0.73932344", "0.7290823", "0.7254914", "0.720043", "0.7170928", "0.71708786", "0.7164757", "0.7164757", "0.7162809", "0.71460426", "0.7125207", "0.71076894", "0.71010727", "0.7009659", "0.6985997", "0.6983555", "0.69765687", "0.6964718", "0.69596475", "0.6943207", "0.689521", "0.6892125", "0.68699086", "0.68404174", "0.6797642", "0.6770373", "0.6763908", "0.67591375", "0.6758442", "0.6750203", "0.674982", "0.6734572", "0.6733492", "0.6730964", "0.6727543", "0.67174715", "0.67116046", "0.66982466", "0.6680815", "0.6675648", "0.6672665", "0.6667616", "0.66605073", "0.6658817", "0.6639354", "0.6636932", "0.6631607", "0.6623412", "0.66229975", "0.66210276", "0.6613599", "0.6611425", "0.6611425", "0.65993387", "0.65964013", "0.6584064", "0.65773207", "0.6572813", "0.6565678", "0.65556043", "0.6554664", "0.6527544", "0.65272254", "0.6523314", "0.6519096", "0.6510818", "0.6507979", "0.65017295", "0.6499374", "0.6473588", "0.64676225", "0.6450227", "0.6445305", "0.644387", "0.64419895", "0.6441332", "0.6434364", "0.6428676", "0.6422623", "0.64074934", "0.64052045", "0.6386099", "0.6367583", "0.635475", "0.6311405", "0.6306466", "0.6301223", "0.6296532", "0.6296309", "0.62955207", "0.62905985", "0.6271703", "0.62701815", "0.62692577", "0.6267366", "0.62616223", "0.62557805", "0.6248895", "0.62461424" ]
0.74756885
1
Validate a date against the library duration requirement
private function validateBookingDuration($start, $end) { if ($end <= $start) { throw new Exceptions\InvalidDateException('End date time should be earlier than start date time'); } $start = (clone $start); $start->modify('+2 hours'); if ($end > $start) { throw new Exceptions\InvalidDateException('Booking duration should be shorter or equal to 2 hours'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function validateDate()\n {\n if (\n ($from = $this->getAvailableFrom()) &&\n ($till = $this->getAvailableTill()) &&\n $from->InPast() &&\n $till->InFuture()\n ) {\n return true;\n }\n\n return false;\n }", "function _fourD_analysis_validate_date( $d ) {\n $ymd = explode('-', $d );\n \n if( sizeof($ymd) != 3 || strlen($ymd[0]) != 4 || ((int)$ymd[1]) < 1 || ((int)$ymd[2]) < 1 ){\n return false;\n }\n else{\n $ymd[1] = str_replace('0', '', $ymd[1]);\n $ymd[2] = str_replace('0', '', $ymd[2]);\n if($ymd[1] < 10) $ymd[1] = \"0\" . $ymd[1]; // pad month with leading 0\n if($ymd[2] < 10) $ymd[2] = \"0\" . $ymd[2]; // pad day with leading 0\n $ymd[3] = $ymd[0].'-'.$ymd[1].'-'.$ymd[2];\n $epoch = strtotime( $ymd[3] );\n // fourD_analysis_debug('form_parts_validate; $ymd[3]: '. $ymd[3].'; epoch: '.$epoch );\n \n //if( !$time || $time <= time() ){ // Allow past dates? What about editing an old project?\n // $err = 'Date must be in the future.';\n if( $epoch > 1 ){\n return $epoch;\n }\n }\n return false;\n}", "public function testValidationOk($date)\n {\n // We set the \"fake\" time with timeTravel method\n $this->timeTravel('2018-11-26 00:00:00');\n $notPastDateConstraint = new NotPastDate();\n $notPastDateValidator = $this->initValidator();\n\n $this->purchase->setDateOfVisit($date);\n $notPastDateValidator->validate($this->purchase, $notPastDateConstraint);\n }", "function validateDate($date)\n{\n global $maxdelay;\n $d = DateTime::createFromFormat('Ymd_His', $date);\n $now = new DateTime(\"now\");\n $interval = $now->getTimestamp() - $d->getTimestamp();\n $upload_time = time() - $_SERVER['REQUEST_TIME']; // elapse time in second for upload process\n return ($d && $d->format('Ymd_His') === $date && $interval<$upload_time+$maxdelay);\n}", "public function isValidDate() {\n\t\t// TODO\n\t\treturn TRUE;\n\t}", "function verifyDate($date, $date_format)\n {\n $datetime=DateTime::createFromFormat($date_format, $date);\n $errors=DateTime::getLastErrors();\n if (!$datetime || !empty($errors['warning_count'])) //date was invalid\n {\n $date_check_ok=false;\n }\n else //everything OK\n {\n $date_check_ok=true;\n }\n\n return $date_check_ok;\n }", "public function validate($input)\n {\n if(new \\DateTime($input) <= \\Carbon\\Carbon::now()->subDays(3)) {\n \n return false;\n\n }\n\n // no date future\n if(new \\DateTime($input) > \\Carbon\\Carbon::now()) {\n\n return false;\n }\n\n return true;\n }", "protected function validateDate($value) {\n if (preg_match(\"/^[0-9]{4}\\-[0-9]{2}\\-[0-9]{2}$/\", $value))\n return true;\n $this->setError(t(\"Invalid date (YYYY-MM-DD)\"));\n return false;\n }", "public static function validateDate($input)\r\n\t{\r\n\t\treturn preg_match('/\\d{2}-\\d{2}-\\d{4}/', $input) && (strlen($input) == 10);\r\n\t}", "function is_date_valid($date)\n{\n $is_date_valid = false;\n\n if (strtotime($date)) {\n list($day, $month, $year) = explode('.', $date);\n $is_date_valid = checkdate($month, $day, $year);\n }\n\n return $is_date_valid;\n}", "function validate()\n\t{\n\t\tglobal $lng;\n\n\t\tinclude_once 'Services/Payment/exceptions/class.ilShopException.php';\n\n\t\tswitch($this->getPriceType())\n\t\t{\n\t\t\tcase self::TYPE_DURATION_MONTH:\n\t\t\t\tif(!preg_match('/^[1-9][0-9]{0,1}$/', $this->__getDuration()))\n\t\t\t\t\tthrow new ilShopException($lng->txt('paya_price_not_valid'));\n\t\t\t\tbreak;\n\n\t\t\tcase self::TYPE_DURATION_DATE:\n\t\t\t\tif(!preg_match('/^[0-9]{4,4}-[0-9]{1,2}-[0-9]{1,2}$/', $this->__getDurationFrom()))\n\t\t\t\t\tthrow new ilShopException($lng->txt('payment_price_invalid_date_from'));\n\n\t\t\t\t$from_date = explode('-', $this->__getDurationFrom());\n\t\t\t\tif(!checkdate($from_date[1], $from_date[2], $from_date[0]))\n\t \t\t\tthrow new ilShopException($lng->txt('payment_price_invalid_date_from'));\n\n\t\t\t\tif(!preg_match('/^[0-9]{4,4}-[0-9]{1,2}-[0-9]{1,2}$/', $this->__getDurationUntil()))\n\t\t\t\t\tthrow new ilShopException($lng->txt('payment_price_invalid_date_until'));\n\n\t\t\t\t$till_date = explode('-', $this->__getDurationUntil());\n\t\t\t\tif(!checkdate($till_date[1], $till_date[2], $till_date[0]))\n\t \t\t\tthrow new ilShopException($lng->txt('payment_price_invalid_date_until'));\n\n\t \t\t$from = mktime(12, 12, 12, $from_date[1], $from_date[2], $from_date[0]);\n\t \t\t$till = mktime(12, 12, 12, $till_date[1], $till_date[2], $till_date[0]);\n\n\t \t\tif($from >= $till)\n\t\t\t\t\tthrow new ilShopException($lng->txt('payment_price_invalid_date_from_gt_until'));\n\t\t\t\tbreak;\n\n\t\t\tcase self::TYPE_UNLIMITED_DURATION:\n\t\t\t\treturn true;\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tthrow new ilShopException($lng->txt('payment_no_price_type_selected_sdf'));\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif(preg_match('/[0-9]/',$this->__getPrice()))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\tthrow new ilShopException($lng->txt('payment_price_invalid_price'));\n\t}", "public function isValidPaydate($date);", "function valid_date( $value = '', $format = 'Y-m-d H:i:s' )\n\t{\n\t\t$date = date_parse($value);\n\t\t$valid = ( $date['error_count'] == 0 && checkdate($date['month'], $date['day'], $date['year']) );\n\t\t\n\t\t/*\n\t\t// Create a date depending on PHP version\n\t\t$version = explode('.', phpversion());\n\t\tif (((int) $version[0] >= 5 && (int) $version[1] >= 2 && (int) $version[2] > 17))\n\t\t{\n\t\t\t$d = DateTime::createFromFormat($format, $date);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$d = new DateTime(date($format, strtotime($date)));\n\t\t}\n\t\t*/\n\t\t/*\n\t\t// Check valid date\n\t\t$format = 'Y-m-d H:i:s';\n\t\t$d = new DateTime(date($format, strtotime($date)));\n\t\t$valid_date = ( $d && $d->format($format) == $date );\n\t\t// or\n\t\t$date = date_parse($date);\n\t\t$valid_date = ( $date['error_count'] == 0 && checkdate($date['month'], $date['day'], $date['year']) );\n\t\tif ( ! $valid_date )\n\t\t{\n\t\t\t$valid = false;\n\t\t\t$return_message[] = 'The approved date is invalid.';\n\t\t}\n\t\t*/\n\t\t\n\t\tif ( ! $valid )\n\t\t{\n\t\t\t$this->set_message('valid_date', 'The %s field has in invalid date.');\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "private function validateDate($date)\n {\n $currentDate = strtotime(date('Y-m-d'));\n $maxScheduleDate = strtotime(date('Y-m-d', strtotime('+6 months')));\n $scheduledDate = strtotime($date);\n\n if ($scheduledDate <= $currentDate) {\n return $error\n = 'Please select a date from future (unless you have a time machine that can take you back in '.$date\n .'). ';\n }\n\n if ($scheduledDate >= $maxScheduleDate) {\n return $error = 'You cannot schedule a movie more than 6 months from now. ';\n }\n\n return true;\n }", "function verifyDate($date) {\r\n $date = trim($date);\r\n if (!is_numeric($date) || strlen($date) != 8) {\r\n return false;\r\n }\r\n $year = substr($date, 0, 4);\r\n $month = substr($date, 4, 2);\r\n $day = substr($date, 6);\r\n if (!checkdate($month, $day, $year)) {\r\n return false;\r\n } else {\r\n return \"$year-$month-$day\";\r\n }\r\n}", "function validateDate($date)\n\t\t{\n\t\t\t$d = DateTime::createFromFormat('Y-m-d', $date);\n\t\t\treturn $d && $d->format('Y-m-d') == $date;\n\t\t}", "function validateDate($date)\n\t\t{\n\t\t\t$d = DateTime::createFromFormat('Y-m-d', $date);\n\t\t\treturn $d && $d->format('Y-m-d') == $date;\n\t\t}", "public static function validate_date( $date )\n {\n return preg_match(\n '/^(19|20)\\d\\d-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$/',\n $date );\n }", "private function checkDatesValidity(){\n\t\t$valid=true;\n\t\t$today = date(\"Y-m-d\");\n\t\tif($this->validFrom!=\"\" && $this->validFrom!=\"0000-00-00\" && $today<$this->validFrom) $valid=false;\n\t\tif($this->validUntil!=\"\" && $this->validUntil!=\"0000-00-00\" && $today>$this->validUntil) $valid=false;\n\t\treturn $valid;\n\t}", "private function validateDate($date)\n {\n $dateHead = new \\DateTime();\n $dateTail = (new \\DateTime('+2 weeks, +1 day'))->modify('midnight');\n\n if ($date < $dateHead || $date >= $dateTail) {\n throw new Exceptions\\InvalidDateException('Date outside acceptable range');\n }\n }", "function validate_date($date) {\n $d = \\DateTime::createFromFormat('Y-m-d', $date);\n return $d && $d->format('Y-m-d') === $date;\n }", "function isDateValid($dateInput){\n\t\t$d = DateTime::createFromFormat('Y-m-d', $dateInput);\n\t\treturn $d && $d->format('Y-m-d') === $dateInput;\n\t}", "public function validateDate($data)\n {\n\n if($data =='now' || (strlen($data)>=8 && strlen($data)<=10)) {\n try {\n $value_time = new DateTime($data);\n return true;\n } catch (Exception $e) {\n // Is not a valida Date\n }\n }\n return false;\n }", "private function validatePassportIssuedDate() {\n $issued_date = DateTime::createFromFormat( 'd.m.Y', $this->passport_issued_date );\n\n if ( $issued_date < DateTime::createFromFormat( 'd.m.Y', '01.10.1997' ) ) {\n $this->errors[] = [ 'Паспорт должен быть выдан не позднее 1 октября 1997 года' ];\n }\n\n if ( $issued_date > new DateTime( 'tomorrow' ) ) {\n $this->errors[] = [ 'Паспорт не может быть выдан в будущем' ];\n }\n }", "public function validateDate(){\n \t$attrs = ['requested_at', 'replied_at', 'fixed_begin', 'fixed_end'];\n \tforeach ($attrs as $a){\n \t\tif (is_array($d = $this->getAttribute($a)) && array_key_exists('date', $d) && array_key_exists('time', $d)){\n \t\t\t$fmt = ['Y-m-d H:i:s', 'Y-m-d H:i', 'Y-m-d H', 'Y-m-d '];\n \t\t\tforeach ($fmt as $f){\n\t \t\t\t$date = \\DateTime::createFromFormat($f, $d['date'] . ' ' . $d['time']);\n\t \t\t\tif (is_object($date)){\n\t \t\t\t\t$this->setAttribute($a, $date->format('Y-m-d H:i:s'));\n\t \t\t\t\tbreak;\n\t \t\t\t}\n \t\t\t}\n \t\t}\n \t}\n }", "function validate_time($reception) {\n\n if (is_string($reception)) {\n $day1 = substr($reception, 0, 2);\n $month1 = substr($reception, 3, 2);\n $year1 = substr($reception, 6, 4);\n\n $reception = strtotime($day1 . \"-\" . $month1 . \"-\" . $year1) ;\n\n }\n\n // check\n // 31536000 is the number of seconds in a 365 days year.\n if (time() < $reception) {\n return false;\n }\n\n return true;\n}", "function isDateValid($date) {\r\n //$uy = $uyear->format(\"Y\");\r\n //$sy = date(\"Y\");\r\n \r\n if(preg_match('^(((0[1-9]|[12]\\d|3[01])\\/(0[13578]|1[02])\\/((19|[2-9]\\d)\\d{2}))|((0[1-9]|[12]\\d|30)\\/(0[13456789]|1[012])\\/((19|[2-9]\\d)\\d{2}))|((0[1-9]|1\\d|2[0-8])\\/02\\/((19|[2-9]\\d)\\d{2}))|(29\\/02\\/((1[6-9]|[2-9]\\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))))$^', $date))\r\n return false;\r\n else\r\n return true;\r\n \r\n}", "function valida_dates($enter_date, $obsolescense_date)\n{\n $day1 = substr($enter_date, 0, 2);\n $month1 = substr($enter_date, 3, 2);\n $year1 = substr($enter_date, 6, 4);\n $day2 = substr($obsolescense_date, 0, 2);\n $month2 = substr($obsolescense_date, 3, 2);\n $year2 = substr($obsolescense_date, 6, 4);\n\n if ($enter_date <= $obsolescense_date) {\n return true;\n }\n\n return false;\n}", "function valid_date($date){\r\n\t$day = date_day($date);\r\n\t$month = date_month($date);\r\n\t$year = date_year($date);\r\n\tif(!is_numeric($day) || !is_numeric($month) || !is_numeric($year)){\r\n\t\treturn FALSE;\r\n\t}elseif($month < 1 || $month > 12){\r\n\t\treturn FALSE;\r\n\t}elseif(($day < 1) || ($day > 30 && ($month == 4 || $month == 6 || $month == 9 || $month == 11 )) || ($day > 31)){\r\n\t\treturn FALSE;\r\n\t}elseif($month == 2 && ($day > 29 || ($day > 28 && (floor($year / 4) != $year / 4)))){\r\n\t\treturn FALSE;\r\n\t}else{\r\n\t\treturn TRUE;\r\n\t}\r\n}", "function check_date($date_str)\r\n{\r\n\tif (strlen($date_str) != 10) return false;\r\n\t$pattern = \"/[0-9]{4}-[0-9]{2}-[0-9]{2}/\";\r\n\tif (!preg_match($pattern, $date_str)) return false;\r\n\t// correct format, now check ranges\r\n\treturn strtotime($date_str);\r\n}", "public function validateDates(&$start, &$end) {\n $sixMonthsAgo = strtotime(\"-6 months\");\n $day = 86400;\n $end = time();\n \n if (!$start) {\n $start = strtotime(\"-7 days\");\n }\n \n $gap = $end - $start; \n \n //Don't mess the dates!\n switch ($gap) {\n case $gap < ($day * 31) :\n $gap = $day * 7;\n break;\n\n case $gap < ($day * 180) ://6 months\n $gap = $day * 31;\n break;\n \n case $gap >= ($day * 180) : \n default : \n $gap = $day * 180; \n break;\n }\n \n $end = time();\n $start = $end - $gap;\n }", "function valida_dates($discharge_day, $expiry_day) {\n //conole.log( $discharge_day + \"\" + $expiry_day);\n $discharge_day = date(\"m/d/Y\", strtotime($discharge_day));\n $expiry_day = date(\"m/d/Y\", strtotime($expiry_day));\n\n $discharge_day_arr = explode('/', $discharge_day);\n $expiry_day_arr = explode('/', $expiry_day);\n\n $dateOne = new DateTime($discharge_day_arr[2] . \"-\" . $discharge_day_arr[0] . \"-\" . $discharge_day_arr[1]);\n $dateTwo = new DateTime($expiry_day_arr[2] . \"-\" . $expiry_day_arr[0] . \"-\" . $expiry_day_arr[1]);\n\n if ($dateOne < $dateTwo) {\n return true;\n }\n return false;\n}", "function is_date_format_valid($date)\n{\n return preg_match(\"/(0[1-9]|[12][0-9]|3[01])[ \\.](0[1-9]|1[012])[ \\.](19|20)\\d\\d/\", $date) !== 0;\n}", "function nrua_validateDate($date, $format = 'Y-m-d H:i:s')\n{\n $d = DateTime::createFromFormat($format, $date);\n return $d && $d->format($format) == $date;\n}", "public function testValidationKo($date)\n {\n // We set the \"fake\" time with timeTravel method\n $this->timeTravel('2018-11-26 00:00:00');\n $notPastDateConstraint = new NotPastDate();\n $notPastDateValidator = $this->initValidator($notPastDateConstraint->message);\n\n $this->purchase->setDateOfVisit($date);\n $notPastDateValidator->validate($this->purchase, $notPastDateConstraint);\n\n }", "public function testValidationOk($date)\n {\n $notSundayConstraint = new NotSunday();\n $notSundayValidator = $this->initValidator();\n\n $purchase = new Purchase();\n $purchase->setDateOfVisit($date);\n $notSundayValidator->validate($purchase, $notSundayConstraint);\n }", "protected function validateDate($value){\n\t\tif ($value instanceof DateTime) return true;\n\n\t\tif (strtotime($value) === false) return false;\n\n\t\t$date = date_parse($value);\n\n\t\treturn checkdate($date['month'], $date['day'], $date['year']);\n\t}", "public function testIsValidWithValidMatchDate() {\n\t\t$this->assertTrue($this->match->validate(array('match_date' => '28 February 2014')), 'Expected model to pass validation with a valid match date.');\n\t\t$this->assertTrue($this->match->validate(array('match_date' => '2014-02-28')), 'Expected model to pass validation with a valid match date.');\n\t\t$this->assertTrue($this->match->validate(array('match_date' => 'February 28th 2014')), 'Expected model to pass validation with a valid match date.');\n\t}", "private function validate_booking(): bool {\n\t $this->errors = array();\n\n // Clear data using test_input function\n foreach ($this->request->post as $key => $value) {\n $this->request->post[$key] = self::test_input($this->request->post[$key]);\n }\n\n // Time\n if(!(preg_match(\"/^(?:2[0-3]|[01][0-9]):[0-5][0-9]$/\", $this->request->post[\"time\"]))){\n array_push($this->errors,$this->language->get('time_error'));\n }\n\n // Date\n $temp = new DateTime();\n\n // Create date object (without time)\n $date = DateTime::createFromFormat('Y-m-d', $this->request->post[\"date\"]);\n\n // Remove time from datetime string\n $now = DateTime::createFromFormat(\"Y-m-d\", $temp->format(\"Y-m-d\"));\n\n // Extract data\n $year = $date->format(\"Y\");\n $month = $date->format(\"m\");\n $day = $date->format(\"d\");\n\n if($date < $now){\n array_push($this->errors,$this->language->get('date_past_error'));\n }\n else if(!checkdate($month,$day,$year)) {\n //$this->errors[\"date\"] = $this->language->get('date_error');\n array_push($this->errors,$this->language->get('date_value_error'));\n }\n\n //TODO: REMOVE\n return count($this->errors) == 0;\n }", "protected function dateValidation( $datetime_str ){\n\n list($date, $time) = explode('T', $datetime_str);\n\n $date = trim($date);\n $extended_year = (strpos($date,'y') === 0 ? true : false);\n if($extended_year && $this->getSetting('strict_dates')){\n return \"Extended years (5.2.4.) are not supported with the 'strict dates' option enabled.\";\n }\n // Uncertainty characters on the end are valid Level 1 features (5.2.1.),\n // pull them off to make checking the rest easier.\n $date = rtrim($date, '?~');\n\n // Negative year? That is fine, but remove it\n // and the extended year indicator before exploding the date\n $date = ltrim($date, 'y-');\n\n //Now to check the parts\n list($year, $month, $day) = explode('-',$date,3);\n\n // Year\n if(!preg_match('/^\\d\\d(\\d\\d|\\du|uu)$/', $year) && !$extended_year){\n return \"The year '$year' is invalid. Please enter a four-digit year.\";\n } elseif($extended_year && !preg_match('/^\\d{5,}$/', $year)){\n return \"Invalid extended year. Please enter at least a four-digit year.\";\n }\n $strict_pattern = 'Y';\n\n // Month\n if(!empty($month) && !preg_match('/^(\\d\\d|\\du|uu)$/',$month)){\n return \"The month '$month' is invalid. Please enter a two-digit month.\";\n }\n if(!empty($month)){\n if(strpos($year, 'u') !== false && strpos($month, 'u') === false){\n return \"The month must either be blank or unspecified when the year is unspecified.\";\n }\n $strict_pattern = 'Y-m';\n }\n\n // Day\n if(!empty($day) && !preg_match('/^(\\d\\d|\\du|uu)$/',$day)){\n return \"The day '$day' is invalid. Please enter a two-digit day.\";\n }\n if(!empty($day)){\n if(strpos($month, 'u') !== false && strpos($day, 'u') === false){\n return \"The day must either be blank or unspecified when the month is unspecified.\";\n }\n $strict_pattern = 'Y-m-d';\n }\n\n // Time\n if(strpos($datetime_str, 'T') !== false && empty($time)){\n return \"Time not provided with time seperator (T).\";\n }\n\n if($time){\n if(!preg_match('/^-?(\\d{4})(-\\d{2}){2}T\\d{2}(:\\d{2}){2}(Z|(\\+|-)\\d{2}:\\d{2})?$/',$datetime_str,$matches)){\n return \"The date/time '$datetime_str' is invalid. See EDTF 1.0, 5.1.2.\";\n }\n drupal_set_message(print_r($matches, TRUE));\n $strict_pattern = 'Y-m-d\\TH:i:s';\n if(count($matches) > 4){\n if($matches[4] === 'Z'){\n $strict_pattern .= '\\Z';\n } else {\n $strict_pattern .= 'P';\n }\n }\n }\n\n if($this->getSetting('strict_dates')){\n //Clean the date/time string to ensure it parses correctly.\n $cleaned_datetime = str_replace('u','1', $datetime_str);\n $datetime_obj = DateTime::createFromFormat('!'.$strict_pattern, $cleaned_datetime);\n $errors = DateTime::getLastErrors();\n if( !$datetime_obj ||\n !empty($errors['warning_count']) ||\n // DateTime will create valid dates from Y-m without warning,\n // so validate we still have what it was given.\n !($cleaned_datetime === $datetime_obj->format($strict_pattern))\n ) {\n return \"Strictly speaking, the date (and/or time) '$datetime_str' is invalid.\";\n }\n\n }\n\n return false;\n }", "function isValidDate($date) {\n $d = DateTime::createFromFormat('Y-m-d', $date);\n return $d && $d->format('Y-m-d') == $date;\n}", "function validate_date() {\n # Check the date is in ISO date format\n if (ereg('(19|20)[0-9]{2}[- /.](0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])', $this->cur_val)) {\n # Remove any existing error message\n $this->error_message = \"\";\n\n # Return Value\n return $this->cur_val;\n }\n else {\n # Set Error Message\n $this->set_error(\"Validation for date ({$this->cur_val}) failed. This is type \" . gettype($this->cur_val));\n\n # Return Blank Date\n return \"0000-00-00\";\n }\n }", "function check_deadline_24h($date) {\n // return false is there is no due date\n if ($date === '') {\n return false;\n }\n\n $currTimestamp= time();\n $secondsLeft = $date - $currTimestamp;\n $hoursLeft = floor($secondsLeft / 3600);\n\n return $hoursLeft < 24;\n}", "public function expiryDate_validation($str) {\n $dt = new DateTime('now');\n $dt = $dt->format('Y-m-d H:i:s');\n\n $start = strtotime($this->input->post('startDate'));\n $expriry = strtotime($this->input->post('expiryDate'));\n\n if ($start > $expriry) {\n $this->form_validation->set_message('expiryDate_validation', 'Your start date-time must be earlier than your expiry date-time.');\n return FALSE;\n }\n return TRUE;\n }", "function validateDate($date_joined) {\n if((preg_match('/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/', $date_joined))) {\n list( $y, $m, $d ) = preg_split( '/[-\\.\\/ ]/', $date_joined );\n return (checkdate( $m, $d, $y ) && ($y >= date('Y') - 2) && ($y <= date('Y')));\n } else {\n // wrong format, convert to correct format\n $date_joined = date('Y-m-d', strtotime(str_replace('-', '/', $date_joined)));\n list( $y, $m, $d ) = preg_split( '/[-\\.\\/ ]/', $date_joined );\n return (checkdate( $m, $d, $y ) && ($y >= date('Y') - 2) && ($y <= date('Y')));\n }\n }", "function validateDate($date,$format ='Y-m-d'){\n$d = dateTime::createFromFormat($format,$date);\n\nif($d && $d->format($format) == $date){\nreturn true;\n } else {\n return false;\n }\n}", "function validateDate($date, $format = 'Y-m-d H:i:s')\n{\n $d = DateTime::createFromFormat($format, $date);\n return $d && $d->format($format) == $date;\n}", "function validateDate($date, $format = 'Y-m-d H:i:s')\n{\n $d = DateTime::createFromFormat($format, $date);\n return $d && $d->format($format) == $date;\n}", "public function testDatesValides()\n {\n $this->context->expects($this->never())\n ->method('addViolation');\n $this->holidayValidator->validate(\\DateTime::createFromFormat('Y-m-d', '2019-01-10'), $this->holidayticket);\n }", "public static function validateDate($date) {\r\n if(preg_match(\"/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/\", $date)) // has to be YYYY-MM-DD\r\n {\r\n $dt = new DateTime($date);\r\n $d = $dt->format(self::dateDay);\r\n $m = $dt->format(self::dateMonth);\r\n $y = $dt->format(self::dateYear);\r\n if(!checkdate($m, $d, $y))\r\n {\r\n throw new Exception(\"Das Datum [\".$date.\"] entspricht keinem g&uuml;ltigen Format\");\r\n }\r\n else\r\n {\r\n return true; \r\n }\r\n }\r\n else\r\n {\r\n throw new Exception(\"Das Datum [\".$date.\"] entspricht nicht dem Format 'YYYY-MM-DD'\");\r\n }\r\n }", "public static function validateDate($value)\n {\n if (preg_match('/^' .\n '(\\d{4})-(\\d{2})-(\\d{2})T' . // YYYY-MM-DDT ex: 2014-01-01T\n '(\\d{2}):(\\d{2}):(\\d{2})' . // HH-MM-SS ex: 17:00:00\n '(Z|((-|\\+)\\d{2}:\\d{2}))' . // Z or +01:00 or -01:00\n '$/', $value, $parts) == true) {\n try {\n new \\DateTime($value);\n return true;\n } catch (\\Exception $e) {\n return false;\n }\n } else {\n return false;\n }\n }", "function validateDate($date,$format = 'Y-m-d H:i:s') {\n $d = DateTime::createFromFormat($format, $date);\n return $d && $d->format($format) == $date;\n}", "public function checkDateVisit(){\n $yearError = new DaYearError($this->record[\"DateVisit\"]);\n if($yearError->getErrorType() != DaYearError::ERR_NONE){\n $this->addError(\"[DateVisit] invalid: \\\"{$yearError}\\\" \");\n return false;\n }\n return true;\n }", "function validateDate($date, $format = 'Y-m-d H:i:s')\n {\n $d = DateTime::createFromFormat($format, $date);\n return $d && $d->format($format) == $date;\n }", "function validate_borrower_period($date1, $date2){\n\t$date1 = format_date2($date1);\n\t$date2 = format_date2($date2);\n\tif(strtotime($date2) <= strtotime($date1))\n\t\treturn \"Issuing date cannot be less or equal to return date\";\n\telseif(get_date_difference2($date1, $date2) > 3)\n\t\treturn \"Borrowing period must not exceed 3 days\";\n\telse\n\t\treturn \"\";\n}", "function validateDateRange($date1, $date2){\n\treturn ( strtotime($date1) - strtotime($date2) ) <= 0;\t//should be a negative number, or 0 if posts=expiration\n}", "function validateDate($date, $format = 'Y-m-d') {\n \t $d = DateTime::createFromFormat($format, $date);\n \t return $d && $d->format($format) === $date;\n }", "public function test_end_date_before_more_than_30_days()\n {\n // show actiual errors without handling\n //$this->withoutExceptionHandling();\n \n $this->json('POST', '/', array_merge($this->data(),['end_date'=>date('Y-m-d', strtotime('-35 days'))]))\n ->seeJson([\n 'end_date' => [\"The end date must be a date after or equal to start date.\"]\n ]);\n \n \n }", "public function isValid()\n {\n if ($this->year === null && $this->month === null && $this->day === null && $this->hour === null && $this->minute === null && $this->second === null) {\n return false; // must have at least one value to be valid.\n }\n // While we might expect the two-digit values to be more constrained (e.g., month=1..12; minute=1..59),\n // the format allows larger values, and perhaps a duration of 55 days is a reasonable thing to express.\n return self::ok($this->year, 0, 9999) && self::ok($this->month, 0, 99) && self::ok($this->day, 0, 99) && self::ok($this->hour, 0, 99) && self::ok($this->minute, 0, 99) && self::ok($this->second, 0, 99);\n }", "public function test_start_date_before_more_than_30_days()\n {\n // show actiual errors without handling\n //$this->withoutExceptionHandling();\n \n $this->json('POST', '/', array_merge($this->data(),['start_date'=>date('Y-m-d', strtotime('-35 days'))]))\n ->seeJson([\n 'start_date' => [\"The start date must be a date after today -30 days.\"]\n ]);\n \n }", "public function checkDateWithInvalidDateValuesDataProvider() {}", "function dateValidation($value) {\n\t$reg = \"/^(((0?[1-9]|1[012])\\/(0?[1-9]|1\\d|2[0-8])|(0?[13456789]|1[012])\\/(29|30)|(0?[13578]|1[02])\\/31)\\/(19|[2-9]\\d)\\d{2}|0?2\\/29\\/((19|[2-9]\\d)(0[48]|[2468][048]|[13579][26])|(([2468][048]|[3579][26])00)))$/\";\n\treturn preg_match($reg,$value);\n}", "public function validateDate($date)\n {\n try {\n return new DateTime($date);\n } catch (Exception $e) {\n return false;\n }\n }", "function validateDate(&$errors, $field_list, $field_day, $field_month, $field_year)\n{\n\t//check if a field has been missed\n\t//$errors[$field_day] = \"$field_list[$field_day] $field_list[$field_month] $field_list[$field_year]\";\n\tif ((!isset($field_list[$field_day])|| empty($field_list[$field_day])) || (!isset($field_list[$field_month])|| empty($field_list[$field_month])) || (!isset($field_list[$field_year])|| empty($field_list[$field_year])))\n\t\t$errors[$field_day] = ' Required';\n\n\t//check February dates\n\telse if (($field_list[$field_month] == 2) && ($field_list[$field_day] == 29) && (date(\"L\", mktime(0, 0, 0, 2, 29, $field_list[$field_year])) == 0))\n\t\t\t$errors[$field_day] = ' Invalid Date: no 29th in '.$field_list[$field_year];\t\n\telse if (($field_list[$field_month] == 2) && ($field_list[$field_day] >= 30)) \n\t\t\t$errors[$field_day] = ' Invalid Date: day not in February';\n\t//check 30 Day months i.e September, April, etc\n\telse if (($field_list[$field_day] == 31) && (($field_list[$field_month] == 9) || ($field_list[$field_month] == 4) || ($field_list[$field_month] == 6) || ($field_list[$field_month] == 11)))\n\t\t$errors[$field_day] = ' Invalid Date: no 31st in'.$field_list[$field_year];\n}", "function validateDate($date, $format = 'd/m/Y H:i:s')\n{\n $d = DateTime::createFromFormat($format, $date);\n return $d && $d->format($format) == $date;\n}", "function valid_date($str) \n\t{\n\t\t//if (ereg(\"([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})\", $str)) {\n\t\tif (preg_match(\"/([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})/\", $str)) \n\t\t{\n\t\t\t//$arr = split(\"-\", $str);\n\t\t\t$arr = preg_split(\"/-/\", $str);\n\t\t\t$yyyy = (int) $arr[0];\n\t\t\t$mm = (int) $arr[1];\n\t\t\t$dd = (int) $arr[2];\n\t\t\treturn checkdate($mm, $dd, $yyyy);\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "function validateDate($date, $format = 'Y-m-d')\n {\n $d = DateTime::createFromFormat($format, $date);\n // The Y ( 4 digits year ) returns TRUE for any integer with any number of digits so changing the comparison from == to === fixes the issue.\n return $d && $d->format($format) === $date;\n }", "public function startDate_validation($str) {\n $dt = date('Y-m-d');\n \n if ($str < $dt) {\n $this->form_validation->set_message(\"startDate_validation\", 'Start date-time should greater then current date-time.');\n return FALSE;\n }\n return TRUE;\n }", "public function test_end_date_is_before_start_date()\n {\n // show actiual errors without handling\n //$this->withoutExceptionHandling();\n \n $this->json('POST', '/', array_merge($this->data(),['start_date'=>date('Y-m-d'),'end_date'=>date('Y-m-d', strtotime('-35 days'))]))\n ->seeJson([\n 'end_date' => [\"The end date must be a date after or equal to start date.\"]\n ]);\n \n }", "public function testDate()\n {\n $this->assertTrue(BrValidation::date('01/01/2020'));\n $this->assertTrue(BrValidation::date('12/11/2019'));\n $this->assertTrue(BrValidation::date('21/04/1940'));\n $this->assertTrue(BrValidation::date('1/3/20'));\n\n $this->assertFalse(BrValidation::date('25-12-2000'), 'BR date accept only slash as separator');\n $this->assertFalse(BrValidation::date('04/21/1980'), 'BR date accept only day/month/year sequence');\n $this->assertFalse(BrValidation::date('2000-12-25'));\n $this->assertFalse(BrValidation::date('2019/11/12'));\n $this->assertFalse(BrValidation::date('2040/25/12'));\n }", "function datecheck( $starttime, $endtime, $repetition = null ){\r\n $starttime_t = strtotime( $starttime );\r\n $endtime_t = strtotime( $endtime );\r\n $rep_t = 0;\r\n $periods = null;\r\n $date_format = \"Y-m-d H:i:s\";\r\n \r\n // timestamps are valid\r\n if( $starttime_t == 0 || $endtime_t == 0 )\r\n return false;\r\n // timestamp creates a period\r\n if( $endtime_t < $starttime_t )\r\n return false;\r\n // generate periods\r\n if( is_array( $repetition ) ) {\r\n if( !in_array( $repetition['interval'], array( 'day', 'week', 'month' )) ||\r\n !is_numeric( $repetition['count'])\r\n )\r\n return false;\r\n else\r\n $interval = $repetition['interval'];\r\n \r\n for( $i = 1; $i <= $repetition['count']; $i++ )\r\n $periods[] = array(\r\n 'start_date' => date( $date_format, strtotime( \"+$i $interval\", $starttime_t )),\r\n 'end_date' => date( $date_format, strtotime( \"+$i $interval\", $endtime_t )),\r\n );\r\n }\r\n \r\n if( !empty( $periods ) )\r\n return $periods;\r\n else\r\n return true;\r\n }", "function wp_checkdate($month, $day, $year, $source_date)\n {\n }", "function _validateDate($date, $format = 'd/m/Y'){\n $d = DateTime::createFromFormat($format, $date);\n return $d && $d->format($format) == $date;\n }", "function validaNascimento($ano, $mes, $dia)\n{\n\n $dataCheck = $ano.'-'.$mes.'-'.$dia;\n if (checkdate($mes, $dia, $ano) && $dataCheck<=date('Y-m-d'))\n return true;\n else return false;\n}", "public function dateValidator($attribute,$params){\n\t\t//kamus lokal\n\t\t$message ='start date : '.$this->PlannedStartDate.' end date : '.$this->PlannedEndDate;\n\t\t$category = 'date initial in validator cek value';\n\t\tYii::trace($message, $category);\n\t\t//function\n if (($this->PlannedStartDate <= $this->PlannedEndDate) OR ($this->PlannedEndDate === date(\"Y-m-d\"))){\n\t\t\t$message=\"valid\";\n\t\t\t$category=\"date debugging\";\n\t\t\tYii::trace($message, $category);\n\t\t}else{\n\t\t\t\t$message=\"invalid\";\n\t\t\t\t$category=\"date debugging\";\n\t\t\t\tYii::trace($message, $category);\n\t\t\t$this->addError('PlannedStartDate', 'Planned Start Date invalid, must be >= than Planned End Date');\n\t\t}\n\t}", "public function testIsInvalidNoMatchDate() {\n\t\t$this->assertFalse($this->match->validate(array('match_date' => '')), 'Expected no match date to cause validation failure');\n\t\t$this->assertTrue($this->match->errors()->has('match_date'));\n\t\t$failures = $this->match->failures();\n\t\t$this->assertArrayHasKey('Required', $failures['match_date']);\n\t}", "function validateItinerary($input=''){\n\t\t$date_format = 'Y-m-d';\n\t\t$input = trim($input);\n\t\t$time = strtotime($input);\n\n\t\t$is_valid = date($date_format, $time) == $input;\n\n\t\treturn $is_valid;\n\t\t\n\t}", "public function isValid()\n {\n if (is_null($this->delimiter)) {\n return false;\n }\n\n [$month, $year] = $this->getMonthYear();\n\n return checkdate($month, 1, $year);\n }", "function validateDate($date){\r\n $date = trim($date);\r\n $date_arr = explode(\"/\", $date);\r\n return checkdate ( $date_arr[0] , \"01\" , $date_arr[1] );\r\n\r\n}", "function valid_date($sup,$inf='') {\n\tif (!isset($inf) or $inf == 0) {\n\t\t$inf = date('Y-m-d');\n\t}\n\n\t$defaultTimeZone=\"Europe/Paris\";\n\tif (date_default_timezone_get()!=$defaultTimeZone) date_default_timezone_set($defaultTimeZone);\n\t\n\t// DECOUPE DE LA DATE INF\n\t// VERIFIE date complete yyyy-mm-jj hh:mm:ss\n\tif (strpos($inf, \" \")===false) {\n\t\t$tinf = explode (\"-\", $inf);\n\t\t$tinfheure = array(date(\"H\"),date(\"i\"),date(\"s\"));\n\t}else {\n\t\t$z = explode(\" \",$inf);\n\t\t$tinf = explode (\"-\", $z[0]);\n\t\t$tinfheure = explode (\":\", $z[1]);\n\t}\n\n\t// DECOUPE DE LA DATE SUP\n\t// VERIFIE date complete yyyy-mm-jj hh:mm:ss\n\tif (strpos($sup, \" \")===false) {\n\t\t$tsup = explode (\"-\", $sup);\n\t\t$tsupheure = array(date(\"H\"),date(\"i\"),date(\"s\"));\n\t}else {\n\t\t$z = explode(\" \",$sup);\n\t\t$tsup = explode (\"-\", $z[0]);\n\t\t$tsupheure = explode (\":\", $z[1]);\n\t}\n\n\t$nowt = mktime($tinfheure[0],$tinfheure[1],$tinfheure[2], $tinf[1], $tinf[2], $tinf[0]);\n\t$supt = mktime($tsupheure[0],$tsupheure[1],$tsupheure[2], $tsup[1], $tsup[2], $tsup[0]);\n\tif ($supt >= $nowt) {\n\t\treturn 1;\n\t} else {\n\t\treturn 0;\n\t}\t\n}", "private function compare_with_date()\n {\n }", "public function test_start_date_is_after_end_date()\n {\n // show actiual errors without handling\n //$this->withoutExceptionHandling();\n \n $this->json('POST', '/', array_merge($this->data(),['start_date'=>date('Y-m-d', strtotime('+35 days')),'end_date'=>date('Y-m-d')]))\n ->seeJson([\n 'start_date' => [\"The start date must be a date before end date.\",\"The start date must be a date before today.\"]\n ]);\n \n }", "public function validate_date()\n {\n if( is_null( $this->participant_id ) )\n throw lib::create( 'exception\\runtime',\n 'Cannot validate appointment date, participant id is not set.', __METHOD__ );\n\n $db_participant = lib::create( 'database\\participant', $this->participant_id );\n $db_site = $db_participant->get_primary_site();\n if( is_null( $db_site ) )\n throw lib::create( 'exception\\runtime',\n 'Cannot validate an appointment date, participant has no primary address.', __METHOD__ );\n \n $shift_template_class_name = lib::get_class_name( 'database\\shift_template' );\n $shift_class_name = lib::get_class_name( 'database\\shift' );\n\n // determine the full and half appointment intervals\n $setting_manager = lib::create( 'business\\setting_manager' );\n $half_duration = $setting_manager->get_setting( 'appointment', 'half duration' );\n $full_duration = $setting_manager->get_setting( 'appointment', 'full duration' );\n\n $start_datetime_obj = util::get_datetime_object( $this->datetime );\n $next_day_datetime_obj = clone $start_datetime_obj;\n $next_day_datetime_obj->add( new\\DateInterval( 'P1D' ) );\n $end_datetime_obj = clone $start_datetime_obj;\n $duration = 'full' == $this->type ? $full_duration : $half_duration;\n $end_datetime_obj->add( new \\DateInterval( sprintf( 'PT%dM', $duration ) ) );\n\n // determine whether to test for shifts or shift templates on the appointment day\n $modifier = lib::create( 'database\\modifier' );\n $modifier->where( 'site_id', '=', $db_site->id );\n $modifier->where( 'start_datetime', '>=', $start_datetime_obj->format( 'Y-m-d' ) );\n $modifier->where( 'start_datetime', '<', $next_day_datetime_obj->format( 'Y-m-d' ) );\n\n $diffs = array();\n\n if( 0 == $shift_class_name::count( $modifier ) )\n { // determine slots using shift template\n $modifier = lib::create( 'database\\modifier' );\n $modifier->where( 'site_id', '=', $db_site->id );\n $modifier->where( 'start_date', '<=', $start_datetime_obj->format( 'Y-m-d' ) );\n foreach( $shift_template_class_name::select( $modifier ) as $db_shift_template )\n {\n if( $db_shift_template->match_date( $start_datetime_obj->format( 'Y-m-d' ) ) )\n {\n $start_time_as_int =\n intval( preg_replace( '/[^0-9]/', '',\n substr( $db_shift_template->start_time, 0, -3 ) ) );\n if( !array_key_exists( $start_time_as_int, $diffs ) ) $diffs[$start_time_as_int] = 0;\n $diffs[$start_time_as_int] += $db_shift_template->operators;\n\n $end_time_as_int =\n intval( preg_replace( '/[^0-9]/', '',\n substr( $db_shift_template->end_time, 0, -3 ) ) );\n if( !array_key_exists( $end_time_as_int, $diffs ) ) $diffs[$end_time_as_int] = 0;\n $diffs[$end_time_as_int] -= $db_shift_template->operators;\n }\n }\n }\n else // determine slots using shifts\n {\n $modifier = lib::create( 'database\\modifier' );\n $modifier->where( 'site_id', '=', $db_site->id );\n $modifier->where( 'start_datetime', '<', $end_datetime_obj->format( 'Y-m-d H:i:s' ) );\n $modifier->where( 'end_datetime', '>', $start_datetime_obj->format( 'Y-m-d H:i:s' ) );\n foreach( $shift_class_name::select( $modifier ) as $db_shift )\n {\n $start_time_as_int =\n intval( preg_replace( '/[^0-9]/', '',\n substr( $db_shift->start_datetime, -8, -3 ) ) );\n $end_time_as_int =\n intval( preg_replace( '/[^0-9]/', '',\n substr( $db_shift->end_datetime, -8, -3 ) ) );\n\n if( !array_key_exists( $start_time_as_int, $diffs ) ) $diffs[$start_time_as_int] = 0;\n $diffs[$start_time_as_int]++;\n if( !array_key_exists( $end_time_as_int, $diffs ) ) $diffs[$end_time_as_int] = 0;\n $diffs[$end_time_as_int]--;\n }\n }\n \n // and how many appointments are during this time?\n $modifier = lib::create( 'database\\modifier' );\n $modifier->where( 'datetime', '>=', $start_datetime_obj->format( 'Y-m-d' ) );\n $modifier->where( 'datetime', '<', $next_day_datetime_obj->format( 'Y-m-d' ) );\n if( !is_null( $this->id ) ) $modifier->where( 'appointment.id', '!=', $this->id );\n $appointment_class_name = lib::get_class_name( 'database\\appointment' );\n foreach( $appointment_class_name::select_for_site( $db_site, $modifier ) as $db_appointment )\n {\n $state = $db_appointment->get_state();\n if( 'reached' != $state && 'not reached' != $state )\n { // incomplete appointments only\n $appointment_datetime_obj = util::get_datetime_object( $db_appointment->datetime );\n \n $start_time_as_int = intval( $appointment_datetime_obj->format( 'Gi' ) );\n \n $duration = 'full' == $db_appointment->type ? $full_duration : $half_duration;\n $appointment_datetime_obj->add( new \\DateInterval( sprintf( 'PT%dM', $duration ) ) );\n $end_time_as_int = intval( $appointment_datetime_obj->format( 'Gi' ) );\n \n if( !array_key_exists( $start_time_as_int, $diffs ) ) $diffs[ $start_time_as_int ] = 0;\n $diffs[ $start_time_as_int ]--;\n if( !array_key_exists( $end_time_as_int, $diffs ) ) $diffs[ $end_time_as_int ] = 0;\n $diffs[ $end_time_as_int ]++;\n }\n }\n \n // if we have no diffs on this day, then we have no slots\n if( 0 == count( $diffs ) ) return false;\n\n // use the 'diff' arrays to define the 'times' array\n $times = array();\n ksort( $diffs );\n $num_operators = 0;\n foreach( $diffs as $time => $diff )\n {\n $num_operators += $diff;\n $times[$time] = $num_operators;\n }\n\n // end day with no operators (4800 is used because it is long after the end of the day)\n $times[4800] = 0;\n \n // Now search the times array for any 0's inside the appointment time\n // NOTE: we need to include the time immediately prior to the appointment start time\n $start_time_as_int = intval( $start_datetime_obj->format( 'Gi' ) );\n $end_time_as_int = intval( $end_datetime_obj->format( 'Gi' ) );\n $match = false;\n $last_slots = 0;\n $last_time = 0;\n\n foreach( $times as $time => $slots )\n {\n // check the start time\n if( $last_time <= $start_time_as_int &&\n $time > $start_time_as_int &&\n 1 > $last_slots ) return false;\n\n // check the end time\n if( $last_time < $end_time_as_int &&\n $time >= $end_time_as_int &&\n 1 > $last_slots ) return false;\n\n $last_slots = $slots;\n $last_time = $time;\n }\n \n return true;\n }", "private function validate_expiry_date() {\n\t\tif ( $this->expiry_date && current_time( 'timestamp' ) > $this->expiry_date ) {\n\t\t\tthrow new Exception( $error_code = self::E_WC_COUPON_EXPIRED );\n\t\t}\n\t}", "public function testIsInvalidIncorrectlyFormattedMatchDate() {\n\t\t$this->assertFalse($this->match->validate(array('match_date' => 'qwerty')), 'Expected invalid match date to cause validation failure');\n\t\t$this->assertTrue($this->match->errors()->has('match_date'));\n\t\t$failures = $this->match->failures();\n\t\t$this->assertArrayHasKey('Date', $failures['match_date']);\n\n\t\t$this->assertFalse($this->match->validate(array('match_date' => '30 February 2014')), 'Expected 30 February date in match_dte to cause validation failure');\n\t\t$this->assertTrue($this->match->errors()->has('match_date'));\n\t\t$failures = $this->match->failures();\n\t\t$this->assertArrayHasKey('Date', $failures['match_date']);\n\t}", "function isValidDate($params = array(), $options = array()) {\n\t\t$time = strtotime(array_shift($params));\n\t\tif ($time !== false && $time != -1) {\n\t\t\tif (!empty($options['return']) && $options['return'] == 'time') {\n\t\t\t\treturn $time;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "function _valid_date($field)\r\n\t{\r\n\t\t// Ignore if empty\r\n\t\tif (empty($this->{$field}))\r\n\t\t{\r\n\t\t\treturn TRUE;\r\n\t\t}\r\n\r\n\t\t$date = date_parse($this->{$field});\r\n\r\n\t\treturn checkdate($date['month'], $date['day'],$date['year']);\r\n\t}", "protected function checkDate($date)\r\n\t{\r\n\t\tif(!$date)\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\tif(!preg_match('/^([1-3][0-9]{3,3})-(0?[1-9]|1[0-2])-(0?[1-9]|[1-2][1-9]|3[0-1])$/', $date)) {\r\n\t\t\t\tthrow new Exception ( 'checkDate() expects a SQL formatted date like 2009-12-24.' );\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public function checkValidity()\n {\n // le pb est que la propriété publicationDate est de type dateTime or les tests initiaux\n // se basent sur un format de type date --> ce qui génère une erreur de type notice\n \n return true;\n }", "function validateDate($strdate) {\n//Must be 10 digits in MM/DD/YYYY format\n//Checks for a valid date (i.e days in a month etc..)\n//Returns an array\n//\t[0] - boolean 0 for good date, 1 for date error\n// [#] - error messasge\n\n \n\t$i = 0;\t\n\tif(((strlen($strdate)<10) OR (strlen($strdate)>10)) OR\n\t ((substr_count($strdate,\"/\"))<>2)) {\n\t\t$retarray[++$i] = \"Date not in 'MM/DD/YYYY' format\";\n\t} else {\n\t\t$month=(substr($strdate,0,2)); //Parse the string to be validated\n\t\t$day=(substr($strdate,3,2));\n\t\t$year=(substr($strdate,6,4));\t\n\t\t\t\n\t\t$result=ctype_digit($year);\n\t\tif(!($result)){\n\t\t\t$year=0;\n\t\t\t$isLeap=false;\n\t\t\t$retarray[++$i] = \"Year is not numeric\";\n\t\t} else {\n\t\t\t$isLeap = DateTime::createFromFormat('Y', $year)->format('L') === \"1\";\n\t\t}\t\n\t\t\t\n\t\t$result=ctype_digit($month);\n\t\tif(!($result)){\n\t\t\t$month=0; \n\t\t\t$retarray[++$i] = \"Month is not numeric\";\n\t\t} else {\n\t\t\tif(($month<=0)OR($month>12)){\n\t\t\t\t$retarray[++$i] = \"Month is not between 01 and 12\";\n\t\t\t}\n\t\t}\n\t\t\t\n\t\t$result=ctype_digit($day);\n\t\tif(!($result)){\n\t\t\t$day=0; \n\t\t\t$retarray[++$i] = \"Day is not numeric\";\n\t\t} else {\n\t\t\tif(($day<=0)OR($day>31)){\n\t\t\t\t$retarray[++$i] = \"Day is not between 01 and 31\";\n\t\t\t}\t\n\t\t\t\n\t\t\tif((($month==2) AND (((!$isLeap)AND($day>28))OR(($isLeap)AND($day>29)))) OR \n\t\t\t ((($month==4) OR ($month==6) OR ($month==9) OR ($month==11)) AND ($day>30))){\n\t\t\t\t$retarray[++$i] = \"Day is not valid for month/year\";\n\t\t\t}\t\t\t\n\t\t}\n\t}\n\t\n\tif ($i > 0) {\n\t\t$retarray[0] = False;\n\t} else {\n\t\t$retarray[0] = True;\n\t}\t\n\t\n\treturn($retarray); \n}", "function isValid() {\n //we get if it is still good or expired\n return DataHora::compareDate2($this->getExpirationDate(), '>=', date('m/d/Y'), 'mm/dd/yyyy', 'mm/dd/yyyy');\n }", "function fechaInvalida($fecha){\n $valores = explode('-', $fecha);\n if(count($valores) == 3 && checkdate($valores[1], $valores[2], $valores[0])){\n return false;\n }\n return true;\n }", "private function validate_expire_date($value)\n \t{\n \t$current_month=date(\"m\");\n\t\t$current_year=date(\"Y\"); \n\t\t$current_date=$current_year.$current_month;\n\t\t$expire_date=$value;\n\t\t\t\n\t\tif ($expire_date >= $current_date) {\n\t\t\treturn 1; // valid expire date\n\t\t}\n\t\telse {\n\t\t\treturn 0; /* card expired */\n\t\t}\n\t\t\n \t}", "public function validateDateTime($data)\n {\n if($data =='now' || (strlen($data)>=15)) {\n try {\n $value_time = new DateTime($data);\n return true;\n } catch (Exception $e) {\n // Is not a valida Date\n $this->errorFields[] = [$e.$this->errorMsg];\n }\n } else {\n $this->errorFields[] = 'DateTime field is not \"now\" o it does not have 15 characters';\n }\n return false;\n }", "function __validFecha2($fecha){\n $test_arr = explode('-', $fecha);\n if (count($test_arr) == 3) {\n if (checkdate($test_arr[1], $test_arr[2], $test_arr[0])) {//YEAR / MES / DIA\n return true;\n }\n return false;\n }\n return false;\n }", "public static function validateDate($date)\n {\n $d = \\DateTime::createFromFormat('Y-m-d', $date);\n return $d && $d->format('Y-m-d') === $date;\n }", "public function checkDate($date)\n\t{\n\t\tif (preg_match(\"/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/\",$date)){\n\t return true;\n\t }\n\t else{\n\t \t$this->form_validation->set_message('checkDate','date should be as yyyy-mm-dd');\n\t return false;\n\t }\n\t}", "public function valid_date($str)\n\t{\n\t\treturn ( ! ereg(\"^[0-9]{1,2}/[0-9]{1,2}/[0-9]{4}$\", $str)) ? FALSE : TRUE;\n\t}", "private static function validateDate(string $date): bool\n {\n $date = \\DateTime::createFromFormat('Y-m-d', $date);\n\n if (!$date) {\n return false;\n }\n\n return true;\n }", "protected function isValidDate($value)\n\t{\n\t\t$minValue=$this->getMinValue();\n\t\t$maxValue=$this->getMaxValue();\n\t\t \n\t\t$valid=true;\n\n\t\t$dateFormat = $this->getDateFormat();\n\t\tif (strlen($dateFormat)) \n\t\t{\n\t\t\t$value = pradoParseDate($value, $dateFormat);\n\t\t\tif (strlen($minValue)) \n\t\t\t\t$valid=$valid && ($value>=pradoParseDate($minValue, $dateFormat)); \n\t\t\tif (strlen($maxValue)) \n\t\t\t\t$valid=$valid && ($value <= pradoParseDate($maxValue, $dateFormat));\n\t\t\treturn $valid;\n\t\t} \n\t\telse \n\t\t{\n\t\t\t$value=strtotime($value);\n\t\t\tif(strlen($minValue))\n\t\t\t\t$valid=$valid && ($value>=strtotime($minValue));\n\t\t\tif(strlen($maxValue))\n\t\t\t\t$valid=$valid && ($value<=strtotime($maxValue));\n\t\t\treturn $valid;\n\t\t} \n\t}" ]
[ "0.7154728", "0.6875203", "0.6721373", "0.66847956", "0.6674081", "0.6624781", "0.6526769", "0.65186054", "0.6502806", "0.64676857", "0.64544886", "0.6439418", "0.64373296", "0.64308965", "0.63939357", "0.63850385", "0.63850385", "0.6381374", "0.6365493", "0.63634145", "0.6332004", "0.6324878", "0.63227654", "0.6322247", "0.63189113", "0.6309979", "0.6292853", "0.6279489", "0.6267621", "0.62446785", "0.62423223", "0.6232769", "0.6231943", "0.62204903", "0.6197412", "0.6189869", "0.61880416", "0.6183257", "0.6182266", "0.61652344", "0.61574703", "0.6125368", "0.6113506", "0.610582", "0.6093703", "0.60910636", "0.60878366", "0.60878366", "0.6080916", "0.6076822", "0.6076089", "0.60738206", "0.6060055", "0.6050781", "0.60360014", "0.60264206", "0.6025448", "0.60162365", "0.601325", "0.6007754", "0.6001216", "0.5996795", "0.599384", "0.59924734", "0.5991431", "0.5986738", "0.5978027", "0.5976722", "0.5970288", "0.5969577", "0.5954487", "0.595042", "0.5948535", "0.5945877", "0.5938856", "0.59367794", "0.59332687", "0.59326804", "0.5931572", "0.592453", "0.5922829", "0.59226614", "0.59016097", "0.5898227", "0.5890374", "0.58893865", "0.58863264", "0.5880768", "0.58646786", "0.58635736", "0.5852554", "0.5851072", "0.5842044", "0.5841647", "0.58414334", "0.5828468", "0.58226776", "0.5821893", "0.5820838", "0.5815791" ]
0.61610126
40
Get input string representation.
public function __toString() { return $this->getFileLocation(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getInput(): string\n {\n return $this->input;\n }", "public function __invoke(string $input): string\n {\n return $this->convert($input);\n }", "function get_string() {\n\t\t$str = $this->_parse();\n return $str;\n }", "public static function to_string($input)\n {\n if ($input === null) {\n return null;\n }\n\n $input_type = \\gettype($input);\n\n if (\n $input_type === 'string'\n ||\n $input_type === 'integer'\n ||\n $input_type === 'float'\n ||\n $input_type === 'double'\n ) {\n /* @phpstan-ignore-next-line | \"gettype\" is not supported by phpstan?! */\n return (string) $input;\n }\n\n /** @phpstan-ignore-next-line - \"gettype\": FP? */\n if ($input_type === 'object' && \\method_exists($input, '__toString')) {\n return (string) $input;\n }\n\n return null;\n }", "public function asString(): string\n {\n return $this->result;\n }", "public function & toString()\n\t{\n\t\t$x = string((string)$this->data);\n\t\treturn $x;\n\t}", "public function getStringRepresentation(): string;", "function to_string()\n\t{\n\t\treturn $this->exact_string;\n\t}", "public function __toString(): string {\n try {\n return $this->getOutput();\n }\n catch (Exception $e) {\n return '';\n }\n }", "public function __toString(): string\n {\n $html = '<input';\n foreach ($this->attributes as $name => $value) {\n $html .= ' '.htmlspecialchars($name).'=\"'.htmlspecialchars($value).'\"';\n }\n $html .= '/>';\n\n try {\n if ($this->renderer !== null) {\n return strval(call_user_func($this->renderer, $this, $html));\n }\n } catch (\\Exception $e) {\n return $e->getMessage();\n }\n\n return $html;\n }", "public function __toString()\n\t{\n\t\treturn $this->requestAsString();\n\t}", "public function string()\n\t{\n\t\treturn $this->filter(FILTER_SANITIZE_STRING);\n\t}", "function asString();", "function asString();", "abstract function to_str();", "public function toString() : string\n {\n return strval($this->value);\n }", "public static function input()\n {\n $input = '';\n $file_pointer_resource = fopen('php://stdin', 'r');\n\n while($line = fgets($file_pointer_resource, 1024)) {\n $input .= $line;\n }\n\n fclose($file_pointer_resource);\n\n return $input;\n }", "public function __string()\n {\n return $this->_result;\n }", "function asString () {\n \t\treturn $this->printableString();\n \t}", "public function getOutput(): string;", "function serialise(): string;", "public function toString() : string\n {\n return $this->value;\n }", "public function output() {\n return (string)$this->output;\n }", "protected function _toString()\n\t{\n\t\t//Get method to call\n\t\t$type = $this->_getType();\n\t\t$method = \"input$type\";\n\n\t\t//Set attribs\n\t\t$attribs = $this->_attributes;\n\t\t$attribs['value'] = $this->getValue();\n\n\t\treturn \\Framework\\DOM\\CDomGenerator::$method($this->_id, $attribs);\n\t}", "public function __toString()\n\t{\n\t\ttry {\n\t\t\t$this->convert();\n\t\t\t$s = stream_get_contents($this->pipes[1]);\n\t\t\t$this->close();\n\t\t\treturn $s;\n\t\t} catch (\\Exception $e) {\n\t\t\ttrigger_error($e->getMessage(), E_USER_ERROR);\n\t\t}\n\t}", "protected function getInputSource($input)\n {\n if (is_file($input)) {\n return file_get_contents($input);\n }\n\n return (string) $input;\n }", "public function toString()\n {\n return $this->cast('string');\n }", "public function input(string $in): mixed\n {\n $associativeBody = json_decode($this->body(), true);\n\n if (!$associativeBody || !$associativeBody[$in])\n return '';\n\n return $associativeBody[$in];\n }", "public function getString()\n {\n return $this->format('%s%s%s');\n }", "public function getToString()\n {\n return $this->toString();\n }", "function encode($input) {\n\t\t$output = $this->get(NULL, $input);\n\t\treturn $output; \n\t}", "function to_string() {\n\t\treturn $this->get($this->name_field);\n\n\t}", "public function __toString()\n {\n try {\n $this->rewind();\n $string = $this->getContents();\n } catch (\\Exception $e) {\n $string = '';\n }\n\n return $string;\n }", "public function toString(): string\n {\n return $this->getValue();\n }", "public function __toString()\n {\n return $this->str;\n }", "function toString() {\n return strval($this->content);\n }", "public function __toString()\n {\n return $this->str;\n }", "public function __toString()\n {\n return (string) $this->exportTo(SanitasiPeer::DEFAULT_STRING_FORMAT);\n }", "final public function __toString()\n {\n return strval($this->value);\n }", "public function getOutput () {\n $str = $this->output;\n $this->output = '';\n return $str;\n }", "public function __toString()\n {\n return $this->str_value;\n }", "function getInput()\n {\n $input = '';\n $fr = fopen(\"php://stdin\", \"r\");\n while (!feof ($fr))\n {\n $input .= fgets($fr);\n }\n fclose($fr);\n return $input;\n }", "public function __toString()\n {\n return strval($this->_data);\n }", "public function render($input = null)\n {\n if(is_array($input) || is_object($input)){\n return print_r($input, 1);\n }\n return (string)$input;\n }", "public function __toString()\n {\n return $this->getOutput();\n }", "public function __toString(): string\n {\n return $this->output() . PHP_EOL;\n }", "public function __toString() {\n\t\t\treturn Core\\Convert::toString($this->render());\n\t\t}", "public function toString()\n {\n $data = $this->origin->data();\n $out = '';\n if (is_scalar($data) || is_null($data)) {\n $out = (string) $data;\n } elseif (is_object($data) && method_exists($data, '__toString')) {\n $out = (string) $data;\n }\n return $out;\n }", "public function string()\n {\n return (string)$this->value;\n }", "public function serialize(): string\n {\n return $this->toRawString();\n }", "public function __toString()\n {\n return $this->output();\n }", "public function __toString() {\n return (string) $this->buffer;\n }", "public function toString(): string;", "public function toString(): string;", "public function toString(): string;", "public function toString(): string;", "public function toString(): string;", "public function toString(): string;", "public function __toString()\n {\n $type = gettype($this->value);\n\n switch ($type) {\n case 'boolean':\n return $this->boolean($this->value);\n break;\n case 'integer':\n return $this->int($this->value);\n break;\n case 'double':\n return $this->float($this->value);\n break;\n case 'string':\n return $this->string($this->value);\n break;\n case 'array':\n return $this->array($this->value);\n break;\n case 'object':\n return $this->object($this->value);\n break;\n case 'resource':\n return $this->resource($this->value);\n break;\n case 'NULL':\n return 'NULL';\n break;\n default:\n return '(unknown type)';\n break;\n };\n }", "public function to_string() { return $this->__toString(); }", "public function __toString()\n {\n return (string) $this->getContents();\n }", "public function input()\n {\n return $this->_input;\n }", "public function rawString(): String\n {\n return $this->_rawString;\n }", "public function toString()\n {\n $func = 'build'.ucfirst(strtolower($this->operation));\n return $this->$func();\n }", "public function __toString(): string\n {\n return (string) $this->format();\n }", "public function getRawInput(): string {\n\n return file_get_contents('php://input');\n }", "function __toString()\n {\n return strval($this->value);\n }", "public function __toString(): string\n {\n $self = $this;\n \n $tokens = array_map(function ($token) use ($self) {\n if (preg_match('{^(-[^=]+=)(.+)}', $token, $match)) {\n return $match[1].$self->escapeToken($match[2]);\n }\n \n if ($token && $token[0] !== '-') {\n return $self->escapeToken($token);\n }\n \n return $token;\n }, $this->tokens);\n \n return implode(' ', $tokens);\n }", "public function __toString()\n {\n $name = ($this->isShort() ? '-' : '--').$this->name;\n\n $value = is_null($this->value) ? '' : escapeshellarg($this->value);\n\n return trim(sprintf('%s %s', $name, $value));\n }", "public function __toString(){\r\n\t\t$data = serialize($this->_data);\r\n\t\t// Obfuscate the data with base64 encoding\r\n\t\t$data = base64_encode($data);\r\n\t\treturn $data;\r\n\t}", "public function __toString(): string\n {\n return (string)$this->value;\n }", "public function __toString() {\n\t\treturn (string) $this->getToken();\n\t}", "public function __toString(): string\n {\n return (string) $this->value;\n }", "public function __toString()\n {\n return (string)$this->token;\n }", "public static function getInput()\n {\n // First check if a custom input has been set, else get the PHP input.\n if (!($input = self::$telegram->getCustomInput())) {\n $input = file_get_contents('php://input');\n }\n\n // Make sure we have a string to work with.\n if (is_string($input)) {\n self::$input = $input;\n } else {\n throw new TelegramException('Input must be a string!');\n }\n\n TelegramLog::update(self::$input);\n return self::$input;\n }", "public static function poify($input_string)\n {\n }", "public function __toString()\n\t{\n\t\treturn (string) $this->value;\n\t}", "public function __toString() {\n\t\t\treturn Core\\Convert::toString($this->value);\n\t\t}", "public function __toString()\n {\n $this->reset();\n\n return $this->string;\n }", "public function __toString(): string\n {\n return (string) $this->getValue();\n }", "function sterilize($input){\r\n return htmlspecialchars($input);\r\n }", "function input($in) {\n $out = htmlentities(stripslashes($in));\n $out = str_replace(array('/','\\\\'), '', $out);\n return $out;\n }", "public function __toString(){\n return $this->convert();\n }", "public function raw(): string\n {\n return $this->data;\n }", "public function generate()\n {\n return $this->_string;\n }", "public function __toString()\n {\n return (string) $this->getToken();\n }", "public function __toString()\n {\n try {\n if ($this->isSeekable()) {\n $this->seek(0);\n }\n return $this->getContents();\n } catch (Throwable $t) {\n // TODO: Cannot throw due to spec even though PHP now can. Log?\n }\n return '';\n }", "function __toString() {\n return $this->string();\n }", "public function __toString() {\n return (string)$this->run();\n }", "public function toString();", "public function toString();", "public function toString();", "public function toString();", "public function toString();", "public function toString();", "public function toString();", "public function toString()\n\t{\n\t\treturn (string) $this;\n\t}", "public function toString()\n\t{\n\t\treturn (string) $this;\n\t}", "public function getValue(): string\n {\n return gmp_strval($this->value);\n }", "public function __toString()\n {\n try {\n return (string) $this->render();\n } catch (Exception $e) {\n return '';\n }\n }", "public function to_string() {\n\n\t\t$data = $this->get_data();\n\n\t\treturn ! empty( $data ) ? json_encode( $data ) : '';\n\t}" ]
[ "0.70021296", "0.69676787", "0.6722575", "0.655327", "0.65436107", "0.6453877", "0.641739", "0.62329847", "0.62162244", "0.618696", "0.61637545", "0.615936", "0.614102", "0.614102", "0.6125356", "0.60969377", "0.6096756", "0.6046348", "0.5989692", "0.59853184", "0.5967923", "0.5947203", "0.59390265", "0.5936351", "0.5928165", "0.592743", "0.5926601", "0.59229904", "0.5920781", "0.5914205", "0.5909766", "0.58993536", "0.5889553", "0.5874008", "0.58551013", "0.5855058", "0.58547974", "0.58462954", "0.58366644", "0.5821899", "0.58117485", "0.58081245", "0.5789433", "0.578004", "0.5778345", "0.57781017", "0.5776969", "0.57754266", "0.5773523", "0.57703733", "0.5765539", "0.5755494", "0.57512486", "0.57512486", "0.57512486", "0.57512486", "0.57512486", "0.57512486", "0.57453716", "0.57209826", "0.57177913", "0.57177496", "0.5716913", "0.5716458", "0.5714263", "0.5712317", "0.57077247", "0.56972045", "0.56917214", "0.56877756", "0.56826115", "0.567229", "0.56570214", "0.56567156", "0.56539845", "0.5645696", "0.5637768", "0.56315434", "0.5630538", "0.56278646", "0.5626993", "0.56249774", "0.5619898", "0.5617797", "0.56140804", "0.560215", "0.55992985", "0.5592855", "0.5587629", "0.55869806", "0.55869806", "0.55869806", "0.55869806", "0.55869806", "0.55869806", "0.55869806", "0.55859774", "0.55859774", "0.5584979", "0.55831164", "0.55786014" ]
0.0
-1
Test case to assert the handler definition is created correctly.
public function testGetHandlerDefinition() { $clientName = 'clientName'; /** @var ContainerBuilder|ObjectProphecy $container */ $container = $this->prophesize(ContainerBuilder::class); $middleware = ['test_middleware' => [ ['method' => 'attach'] ]]; $handler = $this->subject->getHandlerDefinition($container->reveal(), $clientName, $middleware); // Test basic stuff $this->assertSame('%guzzle_http.handler_stack.class%', $handler->getClass()); $this->assertSame(['%guzzle_http.handler_stack.class%', 'create'], $handler->getFactory()); $methodCalls = $handler->getMethodCalls(); // Count is the number of the given middleware + the default event and log middleware expressions $this->assertCount(3, $methodCalls); $customMiddlewareCall = array_shift($methodCalls); $this->assertSame('push', array_shift($customMiddlewareCall)); /** @var Expression[] $customMiddlewareExpressions */ $customMiddlewareExpressions = array_shift($customMiddlewareCall); $customMiddlewareExpression = array_shift($customMiddlewareExpressions); $this->assertInstanceOf(Expression::class, $customMiddlewareExpression); $this->assertSame('service("test_middleware").attach()', $customMiddlewareExpression->__toString()); $logMiddlewareCall = array_shift($methodCalls); $this->assertSame('push', array_shift($logMiddlewareCall)); /** @var Expression[] $logMiddlewareExpressions */ $logMiddlewareExpressions = array_shift($logMiddlewareCall); $logMiddlewareExpression = array_shift($logMiddlewareExpressions); $this->assertInstanceOf(Expression::class, $logMiddlewareExpression); $this->assertSame( 'service("guzzle_bundle.middleware.log.clientName").log()', $logMiddlewareExpression->__toString() ); $eventDispatchMiddlewareCall = array_shift($methodCalls); $this->assertSame('unshift', array_shift($eventDispatchMiddlewareCall)); /** @var Expression[] $eventDispatchMiddlewareExpressions */ $eventDispatchMiddlewareExpressions = array_shift($eventDispatchMiddlewareCall); $eventDispatchMiddlewareExpression = array_shift($eventDispatchMiddlewareExpressions); $this->assertInstanceOf(Expression::class, $eventDispatchMiddlewareExpression); $this->assertSame( 'service("guzzle_bundle.middleware.event_dispatch.clientName").dispatch()', $eventDispatchMiddlewareExpression->__toString() ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testHandler()\n {\n $this->assertInstanceOf( 'ezp\\\\Persistence\\\\Handler', $this->persistenceHandler );\n $this->assertInstanceOf( 'ezp\\\\Persistence\\\\Storage\\\\InMemory\\\\Handler', $this->persistenceHandler );\n }", "abstract protected function createHandler();", "public function test_handler()\n\t{\n\t\t$handler = DB::handler( 'phpunit_sqlite' );\n\n\t\t$this->assertTrue( $handler instanceof \\DB\\Handler );\n\n\t\t$this->assertTrue( $handler->connected() );\n\n\t\t$this->assertTrue( $handler->driver() instanceof \\DB\\Handler_Driver );\n\t\t\n\t\t$this->assertTrue( $handler->driver() instanceof \\DB\\Handler_Sqlite );\n\n\t\t$this->assertTrue( $handler->statement( 'select * from people' ) instanceof \\PDOStatement );\n\t}", "public function testHandlersHandlerTypeCostsGet()\n {\n }", "public function testContentHandler()\n {\n $contentHandler = $this->persistenceHandler->contentHandler();\n $this->assertInstanceOf( 'ezp\\\\Persistence\\\\Content\\\\Handler', $contentHandler );\n $this->assertInstanceOf( 'ezp\\\\Persistence\\\\Storage\\\\InMemory\\\\ContentHandler', $contentHandler );\n }", "public function testSectionHandler()\n {\n $sectionHandler = $this->persistenceHandler->sectionHandler();\n $this->assertInstanceOf( 'ezp\\\\Persistence\\\\Content\\\\Section\\\\Handler', $sectionHandler );\n $this->assertInstanceOf( 'ezp\\\\Persistence\\\\Storage\\\\InMemory\\\\SectionHandler', $sectionHandler );\n }", "public function testUserHandler()\n {\n $sectionHandler = $this->persistenceHandler->userHandler();\n $this->assertInstanceOf( 'ezp\\\\Persistence\\\\User\\\\Handler', $sectionHandler );\n $this->assertInstanceOf( 'ezp\\\\Persistence\\\\Storage\\\\InMemory\\\\UserHandler', $sectionHandler );\n }", "protected function ensureOriginalHandlerExists(): void\n {\n $reflectionProperty = new ReflectionProperty(VarDumper::class, 'handler');\n $reflectionProperty->setAccessible(true);\n $handler = $reflectionProperty->getValue();\n\n if (! $handler) {\n // No handler registered yet, so we'll force VarDumper to create one.\n $reflectionMethod = new ReflectionMethod(VarDumper::class, 'register');\n $reflectionMethod->setAccessible(true);\n $reflectionMethod->invoke(null);\n }\n }", "public function getActualHandler();", "public function testLanguageHandler()\n {\n $handler = $this->persistenceHandler->contentLanguageHandler();\n $this->assertInstanceOf( 'ezp\\\\Persistence\\\\Content\\\\Language\\\\Handler', $handler );\n $this->assertInstanceOf( 'ezp\\\\Persistence\\\\Storage\\\\InMemory\\\\LanguageHandler', $handler );\n }", "public function testContentTypeHandler()\n {\n $contentHandler = $this->persistenceHandler->contentTypeHandler();\n $this->assertInstanceOf( 'ezp\\\\Persistence\\\\Content\\\\Type\\\\Handler', $contentHandler );\n $this->assertInstanceOf( 'ezp\\\\Persistence\\\\Storage\\\\InMemory\\\\ContentTypeHandler', $contentHandler );\n }", "public function testContentLocationHandler()\n {\n $contentHandler = $this->persistenceHandler->locationHandler();\n $this->assertInstanceOf( 'ezp\\\\Persistence\\\\Content\\\\Location\\\\Handler', $contentHandler );\n $this->assertInstanceOf( 'ezp\\\\Persistence\\\\Storage\\\\InMemory\\\\LocationHandler', $contentHandler );\n }", "public function testHasHandler0()\n{\n\n $actual = $this->handlerStack->hasHandler();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testGetResponseHandler()\n {\n $fake = new FakeClient();\n\n $this->assertEquals(Response::class, $fake->getResponseHandler());\n }", "public function test_handler_report()\n {\n\n $exceptionHandler = m::spy('Illuminate\\Contracts\\Debug\\ExceptionHandler');\n $bluescreen = m::spy('Recca0120\\LaravelTracy\\BlueScreen');\n $exception = new Exception();\n\n /*\n |------------------------------------------------------------\n | Act\n |------------------------------------------------------------\n */\n\n $handler = new Handler($exceptionHandler, $bluescreen);\n $handler->report($exception);\n\n /*\n |------------------------------------------------------------\n | Assert\n |------------------------------------------------------------\n */\n\n $exceptionHandler->shouldHaveReceived('report')->with($exception)->once();\n }", "public function testGetEventMiddlewareDefinition()\n {\n $clientName = 'clientName';\n $eventMiddleware = $this->subject->getEventMiddlewareDefinition($clientName);\n\n $this->assertCount(2, $eventMiddleware->getArguments());\n $this->assertSame('%mapudo.guzzle.middleware.event_dispatch_middleware.class%', $eventMiddleware->getClass());\n\n // Assert the Reference has been set correctly\n /** @var Reference $reference */\n $reference = $eventMiddleware->getArgument(0);\n $this->assertInstanceOf(Reference::class, $reference);\n $this->assertSame('event_dispatcher', $reference->__toString());\n $this->assertSame(ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, $reference->getInvalidBehavior());\n\n // Assert the client name\n $this->assertSame($clientName, $eventMiddleware->getArgument(1));\n }", "public function get_handler()\n {\n }", "public function testAccessHandlerExists() {\n $container = new ContainerBuilder();\n $bundle = new QuestionType([], 'quiz_question_type');\n\n $accountProphecy = $this->prophesize('\\Drupal\\Core\\Session\\AccountInterface');\n $account = $accountProphecy->reveal();\n $accessHandlerProphecy = $this->prophesize('\\Drupal\\Core\\Entity\\EntityAccessControlHandler');\n $accessHandlerProphecy->createAccess('quiz_question_type', $account, [], FALSE)->willReturn(FALSE);\n $entityManagerProphecy = $this->prophesize('\\Drupal\\Core\\Entity\\EntityManagerInterface');\n $entityManagerProphecy\n ->getAccessControlHandler('quiz_question_type')\n ->willReturn($accessHandlerProphecy->reveal());\n\n $container->set('entity.manager', $entityManagerProphecy->reveal());\n \\Drupal::setContainer($container);\n\n $this->assertFalse($bundle->access('create', $account), 'Anonymous user cannot create question types by default.');\n }", "public function testErrorHandler()\n {\n $this->assertArrayHasKey('core.error_handler', $this->app);\n $this->assertInstanceOf(\n ErrorHandler::class,\n $this->app['core.error_handler']\n );\n }", "protected function verifyHandlerType(HookHandler $handler) {\n\t\tif (!is_callable(array($handler,$this->hookName))) {\n\t\t\ttrigger_error('Could not locate a method named: '.$this->hookName.' or a generic __call method on the handler. Handler methods has to be the same as the hook name or provide a _call method',E_USER_ERROR);\n\t\t}\n\t}", "public function testHandleCreate(): void\n {\n $query = 'SELECT * FROM [nt:unstructured]';\n $locale = 'fr';\n $primarySelector = 'p';\n\n $this->queryCreateEvent->getInnerQuery()->willReturn($query);\n $this->queryCreateEvent->getLocale()->willReturn($locale);\n $this->queryCreateEvent->getOptions()->willReturn([]);\n $this->queryCreateEvent->getPrimarySelector()->willReturn($primarySelector);\n $this->queryManager->createQuery($query, 'JCR-SQL2')->willReturn($this->phpcrQuery->reveal());\n $this->queryCreateEvent->setQuery(new Query(\n $this->phpcrQuery->reveal(),\n $this->dispatcher->reveal(),\n $locale,\n [],\n $primarySelector\n ))->shouldBeCalled();\n\n $this->subscriber->handleCreate($this->queryCreateEvent->reveal());\n }", "public function getHandler()\n {\n }", "public function testHandlersHandlerTypeCitiesCityIdOfficesGet()\n {\n }", "public function getHandler() {}", "public function testInboundDocumentCreateDocument()\n {\n }", "public function testRouteHandler() {\n\t\tRouter::connect('/login', 'Users::login');\n\n\t\tRouter::connect('/users/login', [], function($request) {\n\t\t\treturn new Response([\n\t\t\t\t'location' => ['controller' => 'Users', 'action' => 'login']\n\t\t\t]);\n\t\t});\n\n\t\t$result = Router::process(new Request(['url' => '/users/login']));\n\t\t$this->assertInstanceOf('lithium\\action\\Response', $result);\n\n\t\t$headers = ['Location' => '/login'];\n\t\t$this->assertEqual($headers, $result->headers);\n\t}", "protected function setupHandler(CommonHandler $handler): void\n {\n }", "public function testExceptionHandler()\n {\n $this->assertArrayHasKey('core.exception_handler', $this->app);\n $this->assertInstanceOf(\n ExceptionHandler::class,\n $this->app['core.exception_handler']\n );\n }", "public function testHandlersHandlerTypeCitiesGet()\n {\n }", "abstract public function handler() : void;", "public function testHandlers() {\n $this->drupalCreateContentType(['type' => 'article']);\n\n $object_types = array_keys(ViewExecutable::getHandlerTypes());\n foreach ($this->container->get('views.views_data')->getAll() as $base_table => $info) {\n if (!isset($info['table']['base'])) {\n continue;\n }\n\n $view = View::create(['base_table' => $base_table]);\n $view = $view->getExecutable();\n\n // @todo The groupwise relationship is currently broken.\n $exclude[] = 'users_field_data:uid_representative';\n\n // Go through all fields and there through all handler types.\n foreach ($info as $field => $field_info) {\n // Table is a reserved key for the meta-information.\n if ($field !== 'table' && !in_array(\"$base_table:$field\", $exclude)) {\n $item = [\n 'table' => $base_table,\n 'field' => $field,\n ];\n foreach ($object_types as $type) {\n if (isset($field_info[$type]['id'])) {\n $options = [];\n if ($type === 'filter') {\n $handler = $this->container->get(\"plugin.manager.views.$type\")->getHandler($item);\n // Set the value to use for the filter based on the filter type.\n if ($handler instanceof InOperator) {\n $options['value'] = [1];\n }\n elseif ($handler instanceof NumericFilter) {\n $options['value'] = ['value' => 1];\n }\n else {\n $options['value'] = 1;\n }\n }\n $view->addHandler('default', $type, $base_table, $field, $options);\n }\n }\n }\n }\n\n // Go through each step individually to see whether some parts are\n // failing.\n $view->build();\n $view->preExecute();\n $view->execute();\n $view->render();\n\n // Make sure all handlers extend the HandlerBase.\n foreach ($object_types as $type) {\n if (isset($view->{$type})) {\n foreach ($view->{$type} as $handler) {\n $this->assertInstanceOf(HandlerBase::class, $handler);\n }\n }\n }\n }\n }", "public function setup()\n {\n $mock = new MockHandler([\n new Response(200, ['X-Foo' => 'Bar'], json_encode([\n 'output_ResponseCode' => 'INS-0',\n 'output_ResponseDesc' => 'Request processed successfully',\n 'output_SessionID' => 1\n ])),\n new Response(200, ['X-Foo' => 'Bar'], json_encode([\n 'output_ResponseCode' => 'INS-0',\n 'output_ResponseDesc' => 'Request processed successfully',\n 'output_TransactionID' => 2,\n 'output_ConversationID' => 'f1ddae567e6c45e580504764571dbe2f',\n 'output_ThirdPartyConversationID' => 'Narration',\n ])),\n new Response(202, ['Content-Length' => 0]),\n new RequestException('Error Communicating with Server', new Request('GET', 'test'))\n ]);\n\n $handlerStack = HandlerStack::create($mock);\n\n $client = new Client(['handler' => $handlerStack]);\n\n $this->forodha = new Forodha([\n 'api_key' => Fixture::$apiKey,\n 'public_key' => Fixture::$publicKey,\n ], $client);\n }", "public function testComDayCqWcmDesignimporterParserTaghandlersFactoryMetaTagHandle()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.day.cq.wcm.designimporter.parser.taghandlers.factory.MetaTagHandlerFactory';\n\n $crawler = $client->request('POST', $path);\n }", "function gethandler($handler) {\n if (file_exists(HANDLER_PATH.'/'.$handler.'.php')) {\n include_once HANDLER_PATH. '/'.$handler.'.php';\n return ( new $handler() );\n }\n throw new FLException('Unknown Handler.', array('status' => 404));\n}", "public function setUp()\n\t{\n\t\t$this->handler = new DbHandler();\n\t}", "protected function setUp() {\n $this->object = new ConfigHandler;\n }", "protected function setUp() {\n $this->object = new UploadHandler;\n }", "public function testComDayCqWcmDesignimporterParserTaghandlersFactoryLinkTagHandle()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.day.cq.wcm.designimporter.parser.taghandlers.factory.LinkTagHandlerFactory';\n\n $crawler = $client->request('POST', $path);\n }", "public function getHandler();", "public function getHandler();", "protected function ensureViolationHandler()\n {\n if ($this->violationHandler === null) {\n $this->violationHandler = new Violation\\HttpViolationHandler();\n }\n }", "protected function setUp()\n {\n parent::setUp();\n\n $this->jamJarCreateFormHandler = new JamJarCreateFormHandler();\n }", "public function testCreateNew(): void\n {\n $requestHandler = $this->createInstance();\n $request = $requestHandler->create();\n\n self::assertInstanceOf(ActivityStub::class, $request);\n }", "public function testGetLogMiddlewareDefinition()\n {\n $client = 'client';\n $logMiddleware = $this->subject->getLogMiddlewareDefinition($client);\n\n $this->assertCount(3, $logMiddleware->getArguments());\n $this->assertSame('%mapudo.guzzle.middleware.log_middleware.class%', $logMiddleware->getClass());\n\n // Assert the references have been set correctly\n $arguments = ['monolog.logger.guzzle', 'guzzle_bundle.formatter', 'mapudo_bundle_guzzle.serializer'];\n for ($i = 0; $i < 3; $i++) {\n /** @var Reference $reference */\n $reference = $logMiddleware->getArgument($i);\n $this->assertInstanceOf(Reference::class, $reference);\n $this->assertSame($arguments[$i], $reference->__toString());\n $this->assertSame(ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, $reference->getInvalidBehavior());\n }\n\n $this->assertCount(1, $logMiddleware->getMethodCalls());\n $this->assertTrue($logMiddleware->hasMethodCall('setClientName'));\n }", "public function test__handleError()\n {\n $eh = new Local_Plugin_ErrorHandler();\n $this->assertInstanceOf('Local_Plugin_ErrorHandler', $eh);\n }", "public function testCreatingMenuWithoutBoundDependencies()\n {\n $app = new Container();\n $app['orchestra.app'] = $foundation = m::mock('\\Orchestra\\Contracts\\Foundation\\Foundation');\n $app['orchestra.platform.menu'] = $menu = m::mock('\\Orchestra\\Widget\\Handlers\\Menu');\n $app['translator'] = $translator = m::mock('\\Illuminate\\Translator\\Translator');\n\n $stub = new ResourcesMenuHandler($app);\n $this->assertFalse($stub->authorize());\n $this->assertNull($stub->handle());\n }", "function get_handler() {\r\n }", "public function testRouterAddByAddTwoRoutesOneHandler()\n {\n $router = new Router();\n\n $router->add([\"\", \"about\"], function () {\n return \"yes\";\n });\n\n $res = $router->handle(\"\");\n $this->assertEquals(\"yes\", $res);\n\n $last = $router->getLastRoute();\n $this->assertEquals(\"\", $last);\n\n $res = $router->handle(\"about\");\n $this->assertEquals(\"yes\", $res);\n\n $last = $router->getLastRoute();\n $this->assertEquals(\"about\", $last);\n\n $routes = $router->getAll();\n $this->assertEquals(2, count($routes));\n }", "public function handler_install()\n {\n return true; // Handler always there\n }", "static public function handlerInfo()\n {\n return array( \n 'XMLName' => 'SimpleForumCreateSection',\n 'Info' => 'create new section' \n );\n }", "public function testComDayCqDamS7damCommonPostServletsSetCreateHandler()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.day.cq.dam.s7dam.common.post.servlets.SetCreateHandler';\n\n $crawler = $client->request('POST', $path);\n }", "public static function usesCustomHandler();", "public function testCanBeCreated()\n {\n $subject = $this->createInstance(['_getArgsForDefinition']);\n\n $this->assertInstanceOf(\n static::TEST_SUBJECT_CLASSNAME,\n $subject,\n 'A valid instance of the test subject could not be created.'\n );\n }", "public function testHandleCreateRequestReadsFormData()\n {\n $key = 'unique';\n\n $query = $this->createMock(ParameterBag::class);\n $post = $this->createMock(ParameterBag::class);\n\n $query\n ->expects($this->once())\n ->method('get')\n ->with($this->equalTo('uniqid'))\n ->willReturn($key);\n\n $post\n ->expects($this->once())\n ->method('get')\n ->with($this->equalTo($key));\n\n $request = $this->getMockBuilder(Request::class)\n ->disableOriginalConstructor()\n ->getMock();\n\n $request->query = $query;\n $request->request = $post;\n\n $this->jamJarCreateFormHandler->handleCreateRequest($request, null, function () {});\n }", "public function testHandleWithoutMiddleware()\n {\n $request = $this->createMock(Request::class);\n $response = $this->createMock(Response::class);\n $handler = $this->createMock(Handler::class);\n $handler->expects($this->once())->method('handle')->with($request)->willReturn($response);\n\n $dispatcher = new Dispatcher($handler);\n\n $this->assertSame($response, $dispatcher->handle($request));\n }", "public function testComDayCqWcmDesignimporterParserTaghandlersFactoryHeadTagHandle()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.day.cq.wcm.designimporter.parser.taghandlers.factory.HeadTagHandlerFactory';\n\n $crawler = $client->request('POST', $path);\n }", "public function testConstructor()\n {\n $renderer = $this->prophesize(TemplateRendererInterface::class);\n\n $errorHandler = new ErrorHandler($renderer->reveal());\n\n $this->assertAttributeInstanceOf(TemplateRendererInterface::class, 'templateRenderer', $errorHandler);\n }", "public function testHandleActionCreateIndex()\n {\n $this->fillStoreWithTestData();\n\n // setup cache\n $this->setupCache();\n\n // set titlehelper\n $this->fixture->setType('title');\n\n $this->assertEquals(\n array(\n 'http://saft/test/s1' => array(\n 'titles' => array(array('uri' => 'http://purl.org/dc/terms/title', 'title' => 's1 dcterms title'))\n ),\n 'http://saft/test/s2' => array(\n 'titles' => array(\n array('uri' => 'http://www.w3.org/2000/01/rdf-schema#label', 'title' => 's2 rdfs label'),\n array('uri' => 'http://purl.org/dc/terms/title', 'title' => 's2 dcterms title'),\n array('uri' => 'http://purl.org/dc/terms/title', 'title' => 's2 dcterms title - 2'),\n )\n )\n ),\n $this->fixture->handle('createIndex')\n );\n }", "protected function initHandlers()\n\t{\n\t}", "public function setHandlerDefinition(HandlerDefinition $definition): void\n {\n $this->handlerDefinition = $definition;\n }", "public function __construct($handler)\n {\n $this->handler = $handler;\n }", "abstract protected function registerHandlers();", "public function get_matched_handler()\n {\n }", "public function register(Handler $handler) : void;", "public function testCreateRouteIsServedSuccessfully(): void\n {\n Resource::factory()->create();\n\n $this->actingAs(User::factory()->admin()->create())\n ->get('buckets/create')\n ->assertSuccessful();\n }", "public function __construct(Contracts\\Handler $handler)\n {\n $this->handler = $handler;\n }", "static public function raise($type) {\n $otherParams = func_get_args();\n unset($otherParams[0]);\n $params[] = $request = Arta::$globals['request'];\n\n switch ($type) {\n\n case 'U':\n $title = 'Unauthorized User Handler';\n $factoryDef = Arta::$unauthorizedHandler;\n $params[] = $request->currentUrl();\n break;\n\n case 'I':\n $title = 'Illegal User Handler';\n $factoryDef = Arta::$illegalHandler;\n $params[] = $request->currentUrl();\n break;\n\n case 'X':\n $title = 'Exception Handler';\n $factoryDef = Arta::$exceptionHandler;\n break;\n\n case 'F':\n $title = 'No Factory Handler';\n $factoryDef = Arta::$nofactoryHandler;\n break;\n\n case 'N':\n $title = 'URL Not Found Handler';\n $factoryDef = Arta::$notfoundHandler;\n $params[] = $request->currentUrl();\n break;\n\n case 'A':\n $title = 'Not Ajax Request Handler';\n $factoryDef = Arta::$notajaxHandler;\n $params[] = $request->currentUrl();\n break;\n\n default:\n $title = null;\n $factoryDef = null;\n }\n\n if ($otherParams) {\n if (is_array($otherParams)) {\n $params = array_merge($params, $otherParams);\n } else {\n $params[] = $otherParams;\n }\n }\n /* load factory */\n if (!$factoryDef || count($factoryDef) != 4) {\n if (DEBUG) {\n Inspect::dumpException(new EventHandler(EventHandler::HANDLER_NOT_DEFINED, $title));\n }\n die;\n }\n list($facPath, $tplObjectName, $facClass, $facMethod) = $factoryDef;\n if (!file_exists($facPath)) {\n if (DEBUG) {\n Inspect::dumpException(new EventHandler(EventHandler::HANDLER_FILE_NOT_EXISTS, array($title, $facPath)));\n }\n die;\n }\n\n require_once 'Template.php';\n require_once 'Response.php';\n require_once 'Database.php';\n require_once $facPath;\n\n if (!$facClass) {\n if (!function_exists($facMethod)) {\n if (DEBUG) {\n Inspect::dumpException(\n new EventHandler(\n EventHandler::HANDLER_METHOD_NOT_EXISTS,\n array($title, $facPath, $facMethod)\n )\n );\n }\n die;\n }\n $params[] = $tplObjectName;\n call_user_func_array($facMethod, $params);\n die;\n }\n\n if (!class_exists($facClass)) {\n if (DEBUG) {\n Inspect::dumpException(\n new EventHandler(\n EventHandler::HANDLER_CLASS_NOT_EXISTS,\n array($title, $facPath, $facClass)\n )\n );\n }\n die;\n }\n\n Arta::$factory = $factory = new $facClass();\n if (!method_exists($factory, $facMethod)) {\n if (DEBUG) {\n Inspect::dumpException(\n new EventHandler(\n EventHandler::HANDLER_METHOD_NOT_EXISTS,\n array($title, $facPath, $facMethod)\n )\n );\n }\n die;\n }\n\n if (property_exists($factory, '__tpl')) {\n $factory->__tpl = $tplObjectName;\n }\n\n call_user_func_array(array(&$factory, $facMethod), $params);\n die;\n }", "public function __construct(\n Handler $handler\n ) {\n $this->handler = $handler;\n }", "protected function setUp() {\n $this->expectedErrors = [];\n set_error_handler([$this, \"errorHandler\"]);\n }", "public function testCreatingMenuWithAuthorizedUser()\r\n {\r\n\r\n $app = new Container();\r\n $app['antares.app'] = $foundation = m::mock('\\Antares\\Contracts\\Foundation\\Foundation');\r\n $app['antares.platform.menu'] = $menu = m::mock(\\Illuminate\\Support\\Fluent::class);\r\n $app['translator'] = $translator = m::mock('\\Illuminate\\Translator\\Translator');\r\n $app['Antares\\Contracts\\Authorization\\Authorization'] = $acl = m::mock('\\Antares\\Contracts\\Authorization\\Authorization');\r\n\r\n $acl->shouldReceive('can')->with(m::type('String'))->once()->andReturn(true);\r\n $translator->shouldReceive('trans')->once()->with('antares/foundation::title.users.list')->andReturn('users');\r\n $foundation->shouldReceive('handles')->once()->with(m::type('String'))->andReturn('antares/users');\r\n $menu->shouldReceive('add')->once()->andReturnSelf()\r\n ->shouldReceive('title')->once()->with('users')->andReturnSelf()\r\n ->shouldReceive('link')->once()->with('antares/users')->andReturnSelf()\r\n ->shouldReceive('icon')->once()->with(m::type('String'))->andReturnSelf()\r\n ->shouldReceive('entity')->once()->andReturn(new \\Illuminate\\Support\\Fluent());\r\n\r\n $stub = new UserMenuHandler($app);\r\n $this->assertNull($stub->handle());\r\n }", "final protected function getMockHandler(): MockHandler\n {\n $this->mockHandler = new MockHandler();\n\n return $this->mockHandler;\n }", "public function testOrgApacheSlingJcrWebdavImplHandlerDefaultHandlerService()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/org.apache.sling.jcr.webdav.impl.handler.DefaultHandlerService';\n\n $crawler = $client->request('POST', $path);\n }", "public function aim_register_handler()\r\n\t{\r\n\t\tforeach (func_get_args() as $arg) {\r\n\t\t\tif (is_array($arg) && count($arg) >= 1) {\r\n\t\t\t\tforeach ($arg as $k => $v) {\r\n if (empty($v[1]) || is_null($v[1]) || !isset($v[1])) $v[1] = CLIENT_DEFAULT;\r\n $k = strtolower($k);\r\n\t\t\t\t\t$this->core->handlers[$k] = array('name' => $k, 'callback' => $v[0], 'type' => $v[1]);\r\n\t\t\t\t} \r\n\t\t\t} else {\r\n\t\t\t\t$this->core->aim_debug('Empty/invalid array cannot be a handler in ' . __FUNCTION__, AIM_WARN);\r\n\t\t\t} \r\n\t\t}\r\n\t}", "public function testCanCreateTriggeredSendDefinition()\n {\n print_r(\"\\nCreate a TriggeredSend Definition \\n\");\n $this->TSNameForCreateThenDelete = uniqid(); \n echo 'CustomerKey = ' . $this->TSNameForCreateThenDelete . \"\\n\";\n\n $postTrig = new ET_TriggeredSend();\n $postTrig->authStub = $this->myclient;\n $postTrig->props = array('CustomerKey' => $this->TSNameForCreateThenDelete,'Name' => $this->TSNameForCreateThenDelete, 'Email' => array(\"ID\"=>$this->EmailID), \"SendClassification\"=> array(\"ObjectID\"=> $this->SendClassificationID) );\n $postResult = $postTrig->post();\n print_r('Post Status: '.($postResult->status ? 'true' : 'false').\"\\n\");\n print 'Code: '.$postResult->code.\"\\n\";\n print 'Message: '.$postResult->message.\"\\n\";\n print 'Result Count: '.count($postResult->results).\"\\n\";\n print 'Results: '.\"\\n\";\n print_r($postResult->results);\n print \"\\n---------------\\n\";\n\n $this->TSNameForDelete = $postResult->results[0]->Object->Name;\n\n $this->assertTrue($postResult->status);\n $this->assertEquals($postResult->results[0]->StatusMessage, \"TriggeredSendDefinition created\");\n $this->assertEquals($postResult->results[0]->Object->Name, $this->TSNameForCreateThenDelete);\n //$this->assertEquals($postResult->results[0]->Object->EmailSubject, $this->NameOfTestTS);\n\n return $this->TSNameForCreateThenDelete; \n }", "protected function test() {\n // TEST BLOCK - comment out once validation to here is verified\n $resp[\"method\"] = $this->method;\n $resp[\"request\"] = $this->request;\n $resp[\"putfile\"] = $this->file;\n $resp[\"verb\"] = $this->verb;\n $resp[\"args\"] = $this->args;\n //return $resp;\n // END TEST BLOCK\n if ($this->method == 'GET') {\n //return $this->verb; // For testing if-else ladder\n return testGetHandler( $this->args ); // Invoke your handler here\n }\n elseif ($this->method == 'POST') {\n return testPostHandler( $this->args );// Invoke your handler here\n }\n elseif ($this->method == 'DELETE' && count($this->args) == 1 ) {\n return $this->args[0]; // ID of delete request\n }\n else {\n return $resp; // DEBUG usage, help determine why failure occurred\n return \"Invalid requests\";\n }\n }", "public function testCreate()\n\t{\n\t\t$this->dispatchWithExpectedException(\"/comment/create\", 'Bootstrap_Service_Exception_Authorization');\n\t}", "public function test_handler_render_for_console()\n {\n\n $exceptionHandler = m::spy('Illuminate\\Contracts\\Debug\\ExceptionHandler');\n $bluescreen = m::spy('Recca0120\\LaravelTracy\\BlueScreen');\n $exception = new Exception();\n $output = m::spy('\\Symfony\\Component\\Console\\Output\\OutputInterface');\n\n /*\n |------------------------------------------------------------\n | Act\n |------------------------------------------------------------\n */\n\n $handler = new Handler($exceptionHandler, $bluescreen);\n $handler->renderForConsole($output, $exception);\n\n /*\n |------------------------------------------------------------\n | Assert\n |------------------------------------------------------------\n */\n\n $exceptionHandler->shouldHaveReceived('renderForConsole')->with($output, $exception)->once();\n }", "protected function setUp()\n\t{\n $dsn = sprintf('sqlite:%s/pdo_test.db', __DIR__);\n $this->pdo = new \\PDO($dsn);\n $this->handler = new Handler($this->pdo);\n\n\t\t// create our logger and our pdo handler\n\t\t$this->logger = new Logger(self::APP_NAME);\n $this->logger->pushHandler($this->handler);\n\n // drop the table\n $drop_sql = sprintf(\"\n\t\t\tDROP TABLE IF EXISTS %s;\n\t\t\", Handler::DEFAULT_TABLE_NAME);\n\n\t\t$this->pdo->exec($drop_sql);\n \n // create the table\n\t\t$create_sql = sprintf(\"\n CREATE TABLE %s (\n id integer(11) PRIMARY KEY,\n time datetime DEFAULT(CURRENT_TIMESTAMP),\n level varchar(100) NOT NULL,\n channel varchar(25) NOT NULL,\n message text\n );\n \", Handler::DEFAULT_TABLE_NAME);\n\n $this->pdo->exec($create_sql);\n\t}", "public function test_it_is_able_to_resolve_handler_from_laravel_container(): void\n {\n $locator = app('Victormln\\LaravelTactician\\Locator\\LocatorInterface');\n $locator->addHandler('Victormln\\LaravelTactician\\Tests\\Stubs\\TestCommandHandler',\n 'Victormln\\LaravelTactician\\Tests\\Stubs\\TestCommand');\n $handler = $locator->getHandlerForCommand('Victormln\\LaravelTactician\\Tests\\Stubs\\TestCommand');\n $this->assertInstanceOf('Victormln\\LaravelTactician\\Tests\\Stubs\\TestCommandHandler', $handler);\n }", "protected function initializeHandle() {}", "protected function initializeHandle() {}", "public function testComDayCqWcmDesignimporterParserTaghandlersFactoryTitleTagHandl()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.day.cq.wcm.designimporter.parser.taghandlers.factory.TitleTagHandlerFactory';\n\n $crawler = $client->request('POST', $path);\n }", "public function testHandleCreateEvents()\n {\n $mock_storage_writer_map = Mockery::mock(StorageWriterMap::CLASS)->shouldNotReceive('getItem')->mock();\n $mock_query_service_map = Mockery::mock(QueryServiceMap::CLASS)->shouldNotReceive('getItem')->mock();\n $mock_event_bus = Mockery::mock(EventBus::CLASS)->shouldNotReceive('distribute')->mock();\n\n // prepare and test subject\n $relation_projection_updater = new RelationProjectionUpdater(\n new ArrayConfig([]),\n new NullLogger,\n $mock_storage_writer_map,\n $mock_query_service_map,\n $this->projection_type_map,\n $mock_event_bus\n );\n\n $event = $this->buildEvent([\n '@type' => 'Honeybee\\Projection\\Event\\ProjectionCreatedEvent',\n 'uuid' => '44c4597c-f463-4916-a330-2db87ef36547',\n 'projection_type' => 'honeybee_tests.game_schema.player::projection.standard',\n 'projection_identifier' => 'honeybee.fixtures.player-a726301d-dbae-4fb6-91e9-a19188a17e71-de_DE-1',\n 'data' => []\n ]);\n $relation_projection_updater->handleEvent($event);\n }", "public function testItShouldProvideDefaultConfig()\n {\n $this->assertEquals(config('handlers.base'), Handler::class);\n $this->assertEquals(config('handlers.namespace'), '\\\\App\\\\Http\\\\Handlers');\n }", "public function testSetGetImageHandler()\n {\n $sut = new Image_Processor_Adapter_Gd2();\n\n $ih = imagecreatetruecolor(1, 1);\n $this->assertInstanceOf(get_class($sut), $sut->setImageHandler($ih));\n $this->assertSame($ih, $sut->getImageHandler());\n }", "protected function LoadHandlers()\n {\n $this->handlers = array(\n testHandler::class,\n );\n }", "private function createHttpHandler()\n {\n $this->httpMock = new MockHandler();\n\n $handlerStack = HandlerStack::create($this->httpMock);\n $handlerStack->push(Middleware::history($this->curlHistory));\n\n $this->client = new Client(['handler' => $handlerStack]);\n\n app()->instance(Client::class, $this->client);\n }", "public function setHandlerName($handlerName);", "public function testComDayCqWcmDesignimporterParserTaghandlersFactoryScriptTagHand()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.day.cq.wcm.designimporter.parser.taghandlers.factory.ScriptTagHandlerFactory';\n\n $crawler = $client->request('POST', $path);\n }", "public function test_handler_render_exception()\n {\n\n $exceptionHandler = m::spy('Illuminate\\Contracts\\Debug\\ExceptionHandler');\n $bluescreen = m::spy('Recca0120\\LaravelTracy\\BlueScreen');\n $request = m::spy('Illuminate\\Http\\Request');\n $exception = new Exception();\n $response = m::spy('Symfony\\Component\\HttpFoundation\\Response');\n\n /*\n |------------------------------------------------------------\n | Act\n |------------------------------------------------------------\n */\n\n $exceptionHandler->shouldReceive('render')->andReturn($response);\n $bluescreen->shouldReceive('render')->with($exception)->andReturn('bluescreen');\n\n $handler = new Handler($exceptionHandler, $bluescreen);\n\n /*\n |------------------------------------------------------------\n | Assert\n |------------------------------------------------------------\n */\n\n $this->assertSame($response, $handler->render($request, $exception));\n $exceptionHandler->shouldHaveReceived('render')->with($request, $exception)->once();\n $response->shouldHaveReceived('getContent')->once();\n $response->shouldHaveReceived('setContent')->with('bluescreen')->once();\n $bluescreen->shouldHaveReceived('render')->with($exception)->once();\n }", "public function test_create_item() {}", "public function test_create_item() {}", "protected function createRelationHandlerInstance() {}", "public function testDeleteChallengeEvent()\n {\n }", "public function testDispatchSchema()\n {\n $response = $this->json('GET', route('api.dispatch.index'));\n $response->assertStatus(200);\n }", "public function handlerNeedsRequest()\n {\n }", "public function testComDayCqDamHandlerStandardPsdPsdHandler()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.day.cq.dam.handler.standard.psd.PsdHandler';\n\n $crawler = $client->request('POST', $path);\n }", "public function addHandler(Handler $handler);", "public function getDefaultHandler();", "public function testHandleWithMiddlewareHandling()\n {\n $requestA = $this->createMock(Request::class);\n $requestB = $this->createMock(Request::class);\n $requestC = $this->createMock(Request::class);\n $responseA = $this->createMock(Response::class);\n $responseB = $this->createMock(Response::class);\n $responseC = $this->createMock(Response::class);\n\n $middleware1 = $this->createMock(Middleware::class);\n $middleware1\n ->expects($this->once())\n ->method('process')\n ->with($requestA)\n ->will($this->returnCallback(function (Request $requestA, Handler $handler) use ($requestB, $responseA, $responseB) {\n $this->assertSame($responseB, $handler->handle($requestB));\n\n return $responseA;\n }));\n\n $middleware2 = $this->createMock(Middleware::class);\n $middleware2\n ->expects($this->once())\n ->method('process')\n ->with($requestB)\n ->will($this->returnCallback(function (Request $requestA, Handler $handler) use ($requestC, $responseB, $responseC) {\n $this->assertSame($responseC, $handler->handle($requestC));\n\n return $responseB;\n }));\n\n $handler = $this->createMock(Handler::class);\n $handler\n ->expects($this->once())\n ->method('handle')\n ->with($requestC)\n ->willReturn($responseC);\n\n $dispatcher = new Dispatcher($handler, $middleware1, $middleware2);\n\n $this->assertSame($responseA, $dispatcher->handle($requestA));\n }" ]
[ "0.7363805", "0.7117783", "0.6597346", "0.65734994", "0.6528969", "0.64380574", "0.64362454", "0.6432757", "0.6389863", "0.63479275", "0.6234332", "0.6046427", "0.6014533", "0.59803474", "0.59566337", "0.5946654", "0.58228564", "0.5804349", "0.5794723", "0.5774363", "0.5713288", "0.57011074", "0.5696244", "0.5696058", "0.5675162", "0.5656024", "0.56462216", "0.5622263", "0.56092364", "0.5601987", "0.5576172", "0.5560813", "0.5557231", "0.55407333", "0.55383873", "0.5528686", "0.55197257", "0.54984975", "0.54888695", "0.54888695", "0.5485618", "0.5484629", "0.5478533", "0.5472277", "0.54657966", "0.5450871", "0.5443818", "0.5414744", "0.54018134", "0.5395532", "0.53918254", "0.5378947", "0.53777623", "0.53712004", "0.5352521", "0.53484166", "0.5344008", "0.5342447", "0.53352094", "0.5333038", "0.53323126", "0.5310093", "0.5285189", "0.5279072", "0.52740234", "0.5264486", "0.52627105", "0.5260751", "0.5260301", "0.5247499", "0.5246619", "0.5240201", "0.52327174", "0.5230868", "0.522181", "0.51934105", "0.5174064", "0.516915", "0.51664734", "0.51590985", "0.51590985", "0.51589817", "0.5158196", "0.51567364", "0.5140094", "0.5135117", "0.51202947", "0.51170206", "0.51074696", "0.51058805", "0.50988436", "0.50988436", "0.5098382", "0.5098075", "0.50862515", "0.5082109", "0.5080778", "0.5080162", "0.50748765", "0.50651807" ]
0.70157355
2
Test case to assert the event middleware definition is created correctly.
public function testGetEventMiddlewareDefinition() { $clientName = 'clientName'; $eventMiddleware = $this->subject->getEventMiddlewareDefinition($clientName); $this->assertCount(2, $eventMiddleware->getArguments()); $this->assertSame('%mapudo.guzzle.middleware.event_dispatch_middleware.class%', $eventMiddleware->getClass()); // Assert the Reference has been set correctly /** @var Reference $reference */ $reference = $eventMiddleware->getArgument(0); $this->assertInstanceOf(Reference::class, $reference); $this->assertSame('event_dispatcher', $reference->__toString()); $this->assertSame(ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, $reference->getInvalidBehavior()); // Assert the client name $this->assertSame($clientName, $eventMiddleware->getArgument(1)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGetHandlerDefinition()\n {\n $clientName = 'clientName';\n\n /** @var ContainerBuilder|ObjectProphecy $container */\n $container = $this->prophesize(ContainerBuilder::class);\n\n $middleware = ['test_middleware' => [\n ['method' => 'attach']\n ]];\n\n $handler = $this->subject->getHandlerDefinition($container->reveal(), $clientName, $middleware);\n\n // Test basic stuff\n $this->assertSame('%guzzle_http.handler_stack.class%', $handler->getClass());\n $this->assertSame(['%guzzle_http.handler_stack.class%', 'create'], $handler->getFactory());\n\n $methodCalls = $handler->getMethodCalls();\n // Count is the number of the given middleware + the default event and log middleware expressions\n $this->assertCount(3, $methodCalls);\n\n $customMiddlewareCall = array_shift($methodCalls);\n $this->assertSame('push', array_shift($customMiddlewareCall));\n /** @var Expression[] $customMiddlewareExpressions */\n $customMiddlewareExpressions = array_shift($customMiddlewareCall);\n $customMiddlewareExpression = array_shift($customMiddlewareExpressions);\n $this->assertInstanceOf(Expression::class, $customMiddlewareExpression);\n $this->assertSame('service(\"test_middleware\").attach()', $customMiddlewareExpression->__toString());\n\n $logMiddlewareCall = array_shift($methodCalls);\n $this->assertSame('push', array_shift($logMiddlewareCall));\n /** @var Expression[] $logMiddlewareExpressions */\n $logMiddlewareExpressions = array_shift($logMiddlewareCall);\n $logMiddlewareExpression = array_shift($logMiddlewareExpressions);\n $this->assertInstanceOf(Expression::class, $logMiddlewareExpression);\n $this->assertSame(\n 'service(\"guzzle_bundle.middleware.log.clientName\").log()',\n $logMiddlewareExpression->__toString()\n );\n\n $eventDispatchMiddlewareCall = array_shift($methodCalls);\n $this->assertSame('unshift', array_shift($eventDispatchMiddlewareCall));\n /** @var Expression[] $eventDispatchMiddlewareExpressions */\n $eventDispatchMiddlewareExpressions = array_shift($eventDispatchMiddlewareCall);\n $eventDispatchMiddlewareExpression = array_shift($eventDispatchMiddlewareExpressions);\n $this->assertInstanceOf(Expression::class, $eventDispatchMiddlewareExpression);\n $this->assertSame(\n 'service(\"guzzle_bundle.middleware.event_dispatch.clientName\").dispatch()',\n $eventDispatchMiddlewareExpression->__toString()\n );\n }", "public function testGetLogMiddlewareDefinition()\n {\n $client = 'client';\n $logMiddleware = $this->subject->getLogMiddlewareDefinition($client);\n\n $this->assertCount(3, $logMiddleware->getArguments());\n $this->assertSame('%mapudo.guzzle.middleware.log_middleware.class%', $logMiddleware->getClass());\n\n // Assert the references have been set correctly\n $arguments = ['monolog.logger.guzzle', 'guzzle_bundle.formatter', 'mapudo_bundle_guzzle.serializer'];\n for ($i = 0; $i < 3; $i++) {\n /** @var Reference $reference */\n $reference = $logMiddleware->getArgument($i);\n $this->assertInstanceOf(Reference::class, $reference);\n $this->assertSame($arguments[$i], $reference->__toString());\n $this->assertSame(ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, $reference->getInvalidBehavior());\n }\n\n $this->assertCount(1, $logMiddleware->getMethodCalls());\n $this->assertTrue($logMiddleware->hasMethodCall('setClientName'));\n }", "public function testEventCreate()\n {\n $response = $this->get('events/create');\n\n $response->assertStatus(200);\n }", "protected function expectAddEvent()\n {\n $this->eventPublisher->expects($this->once())\n ->method('addEvent')\n ->with(['uuid' => '123']);\n }", "public function testMiddlewarePasses()\n {\n $authorizationLine = 'Basic ' . base64_encode('foo:bar');\n\n $request = new Request();\n $request->headers->add([\n 'Authorization' => $authorizationLine,\n ]);\n\n $middleware = new WebhookAuthenticationMiddleware('foo', 'bar');\n $this->assertTrue($middleware->handle($request, function () {\n return true;\n }));\n }", "public function testHandleCreateEvents()\n {\n $mock_storage_writer_map = Mockery::mock(StorageWriterMap::CLASS)->shouldNotReceive('getItem')->mock();\n $mock_query_service_map = Mockery::mock(QueryServiceMap::CLASS)->shouldNotReceive('getItem')->mock();\n $mock_event_bus = Mockery::mock(EventBus::CLASS)->shouldNotReceive('distribute')->mock();\n\n // prepare and test subject\n $relation_projection_updater = new RelationProjectionUpdater(\n new ArrayConfig([]),\n new NullLogger,\n $mock_storage_writer_map,\n $mock_query_service_map,\n $this->projection_type_map,\n $mock_event_bus\n );\n\n $event = $this->buildEvent([\n '@type' => 'Honeybee\\Projection\\Event\\ProjectionCreatedEvent',\n 'uuid' => '44c4597c-f463-4916-a330-2db87ef36547',\n 'projection_type' => 'honeybee_tests.game_schema.player::projection.standard',\n 'projection_identifier' => 'honeybee.fixtures.player-a726301d-dbae-4fb6-91e9-a19188a17e71-de_DE-1',\n 'data' => []\n ]);\n $relation_projection_updater->handleEvent($event);\n }", "public function testDeleteChallengeEvent()\n {\n }", "public function testEventStoreWithoutValidationErr()\n {\n $user = factory(User::class)->create();\n\n $input = [\n 'author_id' => $user->id,\n 'title' => 'Ik ben een titel',\n 'description' => 'Ik ben een beschrijving',\n 'start_date' => '10/10/1995',\n 'end_date' => '11/10/1996',\n 'status' => 'Y',\n 'end_hour' => '10:10',\n 'start_hour' => '12:10',\n ];\n\n $this->actingAs($user)\n ->seeIsAuthenticatedAs($user)\n ->post(route('events.store'), $input)\n ->assertStatus(302)\n ->assertSessionHasAll(['flash_notification.0.message' => trans('events.flash-event-create')]);\n\n $this->assertDatabaseHas('events', [\n 'author_id' => $user->id,\n 'title' => 'Ik ben een titel',\n 'description' => 'Ik ben een beschrijving',\n ]);\n }", "public function testGetWebhookEvents()\n {\n }", "public function testConstruct()\n\t{\n\t\t$middlewareAdaptor = $this->createMock(MiddlewareAdaptorInterface::class);\n\t\t$middlewareAdaptor->method('setResolver');\n\n\t\t$resolveAdaptor = $this->createMock(\\Weave\\Resolve\\ResolveAdaptorInterface::class);\n\t\t$dispatchAdaptor = $this->createMock(\\Weave\\Dispatch\\DispatchAdaptorInterface::class);\n\n\t\t$requestFactory = $this->createMock(\\Weave\\Http\\RequestFactoryInterface::class);\n\t\t$responseFactory = $this->createMock(\\Weave\\Http\\ResponseFactoryInterface::class);\n\t\t$emitter = $this->createMock(\\Weave\\Http\\ResponseEmitterInterface::class);\n\n\t\t$middleware = new Middleware(\n\t\t\t$middlewareAdaptor,\n\t\t\tfn () => 'pipelineFoo',\n\t\t\t$resolveAdaptor,\n\t\t\t$dispatchAdaptor,\n\t\t\t$requestFactory,\n\t\t\t$responseFactory,\n\t\t\t$emitter\n\t\t);\n\n\t\t$this->assertInstanceOf(Middleware::class, $middleware);\n\t}", "protected function setUp()\n {\n //$this->object = new Middleware;\n }", "public function testEventStoreWithValidationErr()\n {\n $user = factory(User::class)->create();\n\n $this->actingAs($user)\n ->seeIsAuthenticatedAs($user)\n ->post(route('events.store'), [])\n ->assertStatus(200)\n ->assertSessionHasErrors()\n ->assertSessionMissing(['flash_notification.0.message' => trans('events.flash-event-create')]);\n }", "public function testGetChallengeEvent()\n {\n }", "public function testValidToken()\n {\n // Create the user with a token we know\n $token = bin2hex(random_bytes(64));\n $this->writedown->getService('api')->user()->create([\n 'email' => $this->faker->email,\n 'password' => $this->faker->word,\n 'token' => $token,\n ]);\n\n // Add the token to the session\n $session = new SessionStub;\n $session->set('auth_token', $token);\n\n // Create the middleware\n $provider = new AuthenticatedMiddleware($this->writedown->getService('auth'), $session);\n\n // Make mocks\n $request = \\Mockery::mock('\\Psr\\Http\\Message\\ServerRequestInterface')->makePartial();\n $response = \\Mockery::mock('\\Psr\\Http\\Message\\ResponseInterface')->makePartial();\n\n // Check it works\n $result = $provider->validate($request, $response, function () {\n return true;\n });\n\n $this->assertTrue($result);\n }", "public function testValidation()\n {\n $this->expectException(ValidationException::class);\n\n $validation = new ValidationMiddleware();\n $validation->execute(new SearchRemovedSince(), function () {});\n }", "public function testEvent()\n {\n $dispatcher = new Events();\n $this->app->bind(DispatcherInterface::class, function() use ($dispatcher) {\n return $dispatcher;\n });\n $response = (new Command())->testEvent(new Event());\n $event = array_shift($response);\n\n $this->assertSame(Event::class, $event['name'], 'The event that should have been dispatched should match the event passed to event().');\n $this->assertFalse($event['halt'], 'The event should not halt when dispatched from event().');\n }", "public function testDeleteEvent()\n {\n }", "public function setUp()\n {\n parent::setUp();\n\n // SETUP: Testing route\n $this->route = 'test/middleware';\n\n app('router')->get($this->route, function () {\n return 'passed!';\n })->middleware(isNotConfirmed::class);\n }", "public function testValidateTokenTestEnvironment()\n {\n $request = new Request();\n $response = new Response();\n $middleware = new CsrfProtectionMiddleware();\n $request->data('title', 'Article Title');\n $middleware->handle($request);\n $middleware->process($request, $response);\n $this->assertNull(null); // This would normally trigger error\n }", "public function testEmittedEventName()\n {\n $expected = array(\n 'request.before_send' => 'onBeforeSend'\n );\n $this->assertEquals($expected, DaWandaPlugin::getSubscribedEvents());\n }", "public function testWebinarCreate()\n {\n }", "public function testRouteMiddleware()\n {\n $callable1 = function () {};\n $callable2 = function () {};\n //Case A\n $r1 = new \\Slim\\Route('/foo', function () {});\n $r1->setMiddleware($callable1);\n $mw = $r1->getMiddleware();\n $this->assertInternalType('array', $mw);\n $this->assertEquals(1, count($mw));\n //Case B\n $r1->setMiddleware($callable2);\n $mw = $r1->getMiddleware();\n $this->assertEquals(2, count($mw));\n //Case C\n $r2 = new \\Slim\\Route('/foo', function () {});\n $r2->setMiddleware(array($callable1, $callable2));\n $mw = $r2->getMiddleware();\n $this->assertInternalType('array', $mw);\n $this->assertEquals(2, count($mw));\n //Case D\n $r3 = new \\Slim\\Route('/foo', function () {});\n $r3->setMiddleware(array($this, 'callableTestFunction'));\n $mw = $r3->getMiddleware();\n $this->assertInternalType('array', $mw);\n $this->assertEquals(1, count($mw));\n //Case E\n try {\n $r3->setMiddleware('sdjfsoi788');\n $this->fail('Did not catch InvalidArgumentException when setting invalid route middleware');\n } catch ( \\InvalidArgumentException $e ) {}\n //Case F\n try {\n $r3->setMiddleware(array($callable1, $callable2, 'sdjfsoi788'));\n $this->fail('Did not catch InvalidArgumentException when setting an array with one invalid route middleware');\n } catch ( \\InvalidArgumentException $e ) {}\n }", "public function testGetChallengeEvents()\n {\n }", "public function testWebinarPollCreate()\n {\n }", "public function testInboundDocumentCreateDocument()\n {\n }", "public function test_event_notification()\n {\n $this->event_notification_helper('event_method', true);\n }", "public function setUp()\n {\n $first = new class implements MiddlewareInterface {\n\n public function request($body)\n {\n return \"foo \" . $body;\n }\n\n public function response($body)\n {\n if (strpos($body, \"foo \")===0) {\n return substr($body, 4);\n }\n\n return $body;\n }\n\n };\n\n // First will add the word bar to the start of a string, and remove it if it's there\n $second = new class implements MiddlewareInterface {\n public function request($body)\n {\n return \"bar \" . $body;\n }\n\n public function response($body)\n {\n if (strpos($body, \"bar \")===0) {\n return substr($body, 4);\n }\n\n return $body;\n }\n\n };\n\n $this->middleware = new MiddlewareGroup([$first, $second]);\n }", "public function testEventCallBackCreate()\n {\n }", "public function user_can_visit_create_event_page()\n {\n $response = $this->get('/events/create');\n $response->assertStatus(200);\n $response->assertSeeText('Name');\n }", "public function user_can_create_event()\n {\n $user = User::factory()->create();\n $event = Event::factory()->make()->toArray();\n $response = $this->actingAs($user)->post('/events', $event);\n $response->assertStatus(302);\n $this->assertNotNull(Event::where('name', $event['name'])->first());\n }", "public function testGetEvent()\n {\n }", "public function testWebinarRegistrantCreate()\n {\n }", "public function testConstruct() {\n\n $this->assertEquals(\"wbw.smsmode.event.account_balance\", WBWSMSModeEvents::ACCOUNT_BALANCE);\n $this->assertEquals(\"wbw.smsmode.event.adding_contact\", WBWSMSModeEvents::ADDING_CONTACT);\n $this->assertEquals(\"wbw.smsmode.event.checking_sms_message_status\", WBWSMSModeEvents::CHECKING_SMS_MESSAGE_STATUS);\n $this->assertEquals(\"wbw.smsmode.event.creating_api_key\", WBWSMSModeEvents::CREATING_API_KEY);\n $this->assertEquals(\"wbw.smsmode.event.creating_sub_account\", WBWSMSModeEvents::CREATING_SUB_ACCOUNT);\n $this->assertEquals(\"wbw.smsmode.event.deleting_sms\", WBWSMSModeEvents::DELETING_SMS);\n $this->assertEquals(\"wbw.smsmode.event.deleting_sub_account\", WBWSMSModeEvents::DELETING_SUB_ACCOUNT);\n $this->assertEquals(\"wbw.smsmode.event.delivery_report_callback\", WBWSMSModeEvents::DELIVERY_REPORT_CALLBACK);\n $this->assertEquals(\"wbw.smsmode.event.delivery_report\", WBWSMSModeEvents::DELIVERY_REPORT);\n $this->assertEquals(\"wbw.smsmode.event.retrieving_sms_reply\", WBWSMSModeEvents::RETRIEVING_SMS_REPLY);\n $this->assertEquals(\"wbw.smsmode.event.sending_sms_batch\", WBWSMSModeEvents::SENDING_SMS_BATCH);\n $this->assertEquals(\"wbw.smsmode.event.sending_sms_message\", WBWSMSModeEvents::SENDING_SMS_MESSAGE);\n $this->assertEquals(\"wbw.smsmode.event.sending_text_to_speech_sms\", WBWSMSModeEvents::SENDING_TEXT_TO_SPEECH_SMS);\n $this->assertEquals(\"wbw.smsmode.event.sending_unicode_sms\", WBWSMSModeEvents::SENDING_UNICODE_SMS);\n $this->assertEquals(\"wbw.smsmode.event.sent_sms_message_list\", WBWSMSModeEvents::SENT_SMS_MESSAGE_LIST);\n $this->assertEquals(\"wbw.smsmode.event.sms_reply_callback\", WBWSMSModeEvents::SMS_REPLY_CALLBACK);\n $this->assertEquals(\"wbw.smsmode.event.transferring_credits\", WBWSMSModeEvents::TRANSFERRING_CREDITS);\n }", "public function testCreateEvent() {\n $client = new Client('http://event-database-api.vm/api', 'api-write', 'apipass');\n\n $name = uniqid(__FUNCTION__) . ' ' . date('c');\n\n // Test that creating and saving a node creates an Event with the API.\n $numberOfEvents = $client->getEvents()->getCount();\n\n $event = Node::create([\n 'type' => 'event',\n 'title' => $name,\n ]);\n $event->save();\n $this->assertEqual($numberOfEvents + 1, $client->getEvents()->getCount());\n\n // Test that we can get the event (by name)\n $events = $client->getEvents(['name' => $name])->getItems();\n $this->assertEqual(1, count($events));\n $this->assertEqual($name, $events[0]->getName());\n\n // Test that renaming the node also renames in the API.\n $newName = uniqid(__FUNCTION__) . ' ' . date('c');\n\n $event = Node::load($event->id());\n $event->set('title', $newName);\n $event->save();\n\n $this->assertEqual(0, $client->getEvents(['name' => $name])->getCount());\n $this->assertEqual(1, $client->getEvents(['name' => $newName])->getCount());\n\n // Test that deleting the node also deleted in the API.\n $event->delete();\n\n $this->assertEqual(0, $client->getEvents(['name' => $newName])->getCount());\n }", "protected function setUp()\n {\n parent::setUp();\n $this->object = new Event('test', $this, ['invoker' => $this]);\n }", "public function testGatherMiddleware0()\n{\n\n // Traversed conditions\n // if (!is_null($this->computedMiddleware)) == false (line 750)\n\n $actual = $this->route->gatherMiddleware();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testSuccessfulMiddleware()\n {\n $model = factory(Server::class)->make();\n $subuser = factory(Subuser::class)->make([\n 'server_id' => $model->id,\n ]);\n $this->setRequestAttribute('server', $model);\n\n $this->request->shouldReceive('route->parameter')->with('subuser', 0)->once()->andReturn('abc123');\n $this->hashids->shouldReceive('decodeFirst')->with('abc123', 0)->once()->andReturn($subuser->id);\n $this->repository->shouldReceive('find')->with($subuser->id)->once()->andReturn($subuser);\n\n $this->request->shouldReceive('method')->withNoArgs()->once()->andReturn('GET');\n\n $this->getMiddleware()->handle($this->request, $this->getClosureAssertions());\n $this->assertRequestHasAttribute('subuser');\n $this->assertRequestAttributeEquals($subuser, 'subuser');\n }", "public function testGatherMiddleware1()\n{\n\n // Traversed conditions\n // if (!is_null($this->computedMiddleware)) == true (line 750)\n\n $actual = $this->route->gatherMiddleware();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testEmit()\n\t{\n\t\t$response = $this->createMock(\\Psr\\Http\\Message\\ResponseInterface::class);\n\n\t\t$middlewareAdaptor = $this->createMock(MiddlewareAdaptorInterface::class);\n\t\t$middlewareAdaptor->method('setResolver');\n\n\t\t$resolveAdaptor = $this->createMock(\\Weave\\Resolve\\ResolveAdaptorInterface::class);\n\t\t$dispatchAdaptor = $this->createMock(\\Weave\\Dispatch\\DispatchAdaptorInterface::class);\n\n\t\t$requestFactory = $this->createMock(\\Weave\\Http\\RequestFactoryInterface::class);\n\t\t$responseFactory = $this->createMock(\\Weave\\Http\\ResponseFactoryInterface::class);\n\t\t$emitter = $this->createMock(\\Weave\\Http\\ResponseEmitterInterface::class);\n\t\t$emitter->expects($this->once())\n\t\t->method('emit')\n\t\t->with(\n\t\t\t$this->equalTo($response)\n\t\t);\n\n\t\t$middleware = new Middleware(\n\t\t\t$middlewareAdaptor,\n\t\t\tfn () => 'pipelineFoo',\n\t\t\t$resolveAdaptor,\n\t\t\t$dispatchAdaptor,\n\t\t\t$requestFactory,\n\t\t\t$responseFactory,\n\t\t\t$emitter\n\t\t);\n\n\t\t$middleware->emit($response);\n\t}", "public function testEventPublish()\n {\n $event = factory(Events::class)->create();\n $user = factory(User::class)->create();\n $params = ['status' => 1, 'id' => $event->id];\n\n $this->actingAs($user)\n ->seeIsAuthenticatedAs($user)\n ->get(route('events.status', $params))\n ->assertStatus(302)\n ->assertSessionHas(['flash_notification.0.message' => trans('events.flash-publish')]);\n }", "public function testEventWithClosure()\n {\n $eventManager = new EventManager;\n $secret = '1234';\n $eventManager->listen('secret', function ($newSecret) use ($secret) {\n $this->assertEquals($newSecret, $secret);\n });\n $eventManager->fire('secret', $secret);\n }", "public function testGetEvents()\n {\n }", "public function test_should_be_used_with_web_middleware_group(): void\n {\n $this->withoutExceptionHandling();\n \n $router = resolve(\\Illuminate\\Routing\\Router::class);\n $middleWareGroups = $router->getMiddlewareGroups();\n \n Route::get(\n 'test-middleware', function (Request $request) use ($middleWareGroups) {\n $routeMiddleWareGroups = $request->route()->gatherMiddleware();\n $found = false;\n \n foreach ($routeMiddleWareGroups as $groupName) {\n if (isset($middleWareGroups[$groupName]) === true) {\n $group = $middleWareGroups[$groupName];\n \n if (in_array(TrackingMiddleware::class, $group)) {\n $found = true;\n }\n }\n }\n \n $this->assertTrue($found);\n }\n )->middleware('web');\n //\n \n $this->get('/test-middleware');\n }", "public function testInstancesOf()\n {\n $this->assertInstanceOf('Symfony\\Component\\EventDispatcher\\Event', $this->gearmanClientCallbackExceptionEvent);\n }", "public function test_database_events_check()\n {\n $this->seeInDatabase('events', ['event_name' => 'Test Event1']);\n }", "private function assertValidMiddlewares() : void\n {\n if ([] === $this->middlewares) {\n return;\n }\n\n foreach ($this->middlewares as $value) {\n InvalidDescriptorArgumentException::assertIsSubclassOf(\n $value,\n MiddlewareInterface::class,\n '#[Route.middlewares] must contain the class names of existing middlewares.'\n );\n }\n }", "public function test_addSubscriber() {\n\n }", "public function testAddVendorComplianceSurveyAudit()\n {\n }", "public function testAddEvent()\n\t{\n\t\t$application_id = 1;\n\t\t$event_name = \"addEventEvent\";\n\t\t$stat_name_id = 100;\n\t\t$now = \"String for date\";\n\t\t$history_model = $this->getMock(\n\t\t\t\t\"DB_Models_WritableModel_1\", array(), array(), \"\", FALSE);\n\t\t$history_model\n\t\t\t->expects($this->exactly(4))\n\t\t\t->method(\"__set\");\n\t\t$history_model\n\t\t\t->expects($this->never())\n\t\t\t->method(\"loadBy\");\n\t\t$history_model\n\t\t\t->expects($this->once())\n\t\t\t->method(\"save\");\n\t\t\t\t\n\t\t\n\t\t$name_model = $this->getMock(\n\t\t\t\t\"DB_Models_WritableModel_1\", array(), array(), \"\", FALSE);\n\t\t$name_model\n\t\t\t->expects($this->once())\n\t\t\t->method(\"loadBy\")\n\t\t\t->will($this->returnValue(TRUE));\n\t\t$name_model\n\t\t\t->expects($this->once())\n\t\t\t->method(\"__get\")\n\t\t\t->with($this->equalTo(\"stat_name_id\"))\n\t\t\t->will($this->returnValue($stat_name_id));\n\t\t\n\t\t$event_history = $this->getMock(\n\t\t\t\"VendorAPI_StatPro_Unique_ApplicationEventHistory\",\n\t\t\tarray(\"getNowString\", \"getEventHistoryModel\", \"getEventNameModel\"),\n\t\t\tarray(),\n\t\t\t\"\",\n\t\t\tFALSE);\n\t\t$event_history\n\t\t\t->expects($this->once())\n\t\t\t->method(\"getNowString\")\n\t\t\t->will($this->returnValue($now));\n\t\t$event_history\n\t\t\t->expects($this->once())\n\t\t\t->method(\"getEventHistoryModel\")\n\t\t\t->will($this->returnValue($history_model));\n\t\t$event_history\n\t\t\t->expects($this->once())\n\t\t\t->method(\"getEventNameModel\")\n\t\t\t->will($this->returnValue($name_model));\n\t\t\n\t\t$event_history->addEvent($event_name, $application_id);\n\t}", "public function testExceptionHandler()\n {\n $this->assertArrayHasKey('core.exception_handler', $this->app);\n $this->assertInstanceOf(\n ExceptionHandler::class,\n $this->app['core.exception_handler']\n );\n }", "public function testConstructorWithPartialConfigProvided(): void\n {\n $middleware = new ThrottleMiddleware([\n 'response' => [\n 'body' => 'Rate limit exceeded',\n ],\n ]);\n $result = $middleware->getConfig();\n\n $this->assertTrue(array_key_exists('headers', $result['response']));\n }", "public function testDoesNotCreateClassWithIncorrectParameter() : void\n {\n $this->assertNull(EventProcessorFactory::create(\"hockey\", $this->eventStorage));\n }", "public function testEventNameException()\n {\n $this->setExpectedException('Txiki\\Events\\EventException', 'Event name is necesary', 0);\n\n $this->event->on();\n }", "public function testEventHandlerRegistration() {\n\t\t$storage = $this->getStorageMock();\n\t\t$eventHandlerRegistry = Application::getInstance()->getDiContainer()->getEventHandlerRegistry();\n\t\t$session = $this->getSession(null, array(), $storage, true);\n\n\t\t$this->assertTrue(in_array($session, $eventHandlerRegistry->getEventHandlers(\n\t\t\t\tEvent::TYPE_APPLICATION_BEFORE_CONTROLLER_RUN), true),\n\t\t\t'Autoregistration failed for APPSTART event');\n\n\t\t$this->assertTrue(in_array($session, $eventHandlerRegistry->getEventHandlers(\n\t\t\t\tEvent::TYPE_APPLICATION_AFTER_CONTROLLER_RUN), true),\n\t\t\t'Autoegistration failed for APPFINISH event');\n\n\t\t$session->removeEventHandler();\n\n\t\t$this->assertFalse(in_array($session, $eventHandlerRegistry->getEventHandlers(\n\t\t\t\tEvent::TYPE_APPLICATION_BEFORE_CONTROLLER_RUN), true),\n\t\t\t'Unregistration failed for APPSTART event');\n\n\t\t$this->assertFalse(in_array($session, $eventHandlerRegistry->getEventHandlers(\n\t\t\t\tEvent::TYPE_APPLICATION_AFTER_CONTROLLER_RUN), true),\n\t\t\t'Unregistration failed for APPFINISH event');\n\n\t\t$session->registerEventHandler();\n\n\t\t$this->assertTrue(in_array($session, $eventHandlerRegistry->getEventHandlers(\n\t\t\t\tEvent::TYPE_APPLICATION_BEFORE_CONTROLLER_RUN), true),\n\t\t\t'Manual registration failed for APPSTART event');\n\n\t\t$this->assertTrue(in_array($session, $eventHandlerRegistry->getEventHandlers(\n\t\t\t\tEvent::TYPE_APPLICATION_AFTER_CONTROLLER_RUN), true),\n\t\t\t'Manual registration failed for APPFINISH event');\n\t}", "public function setUp()\n {\n parent::setUp();\n $this->hierarchicalMiddleware = new HierarchicalMiddleware($this->app);\n }", "public function testEventReturnsAValidInstanceOfDispatcherEvent()\n\t{\n\t\t$args = array('my' => 'arguments');\n\t\t$event = Dispatcher::event($args, TRUE);\n\n\t\t$this->assertType('Dispatcher_Event', $event);\n\t}", "public function testCreateLeaveApplication()\n {\n }", "public function testControllerMiddleware1()\n{\n\n // Traversed conditions\n // if (!$this->isControllerAction()) == true (line 791)\n\n $actual = $this->route->controllerMiddleware();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testInstanceOf()\n {\n $this->assertInstanceOf('Symfony\\Component\\EventDispatcher\\Event', $this->event);\n }", "public function testRequestEnrollment()\n {\n }", "public function testDuplicateEventNameException()\n {\n $this->setExpectedException('Txiki\\Events\\EventException', 'Duplicate event name', 0);\n\n $this->event->on('event-name', function () {return true;});\n $this->event->on('event-name', function () {return true;});\n }", "public function setUp()\n {\n $this->middleware = new ForbiddenWordsFilterMiddleware(['badword']);\n $this->request = Phake::mock(ServerRequestInterface::class);\n $this->delegate = Phake::mock(DelegateInterface::class);\n\n // the class needs to know which route it matched. Create a fake result and tell the request to return that\n $this->route_result = Phake::mock(RouteResult::class);\n Phake::when($this->request)->getAttribute(RouteResult::class)->thenReturn($this->route_result);\n Phake::when($this->route_result)->getMatchedParams()->thenReturn([]);\n\n // return an empty body stream\n Phake::when($this->request)->getBody()->thenReturn(new BufferStream());\n\n // when try try to replace the body just return the same request as before.\n Phake::when($this->request)->withBody($this->anything())->thenReturn($this->request);\n }", "public function events()\n {\n $templateCalendarEvent = factory(TemplateCalendarEvent::class)->create();\n $calendarEvent = factory(CalendarEvent::class)->make();\n $calendarEvent->template()->associate($templateCalendarEvent);\n $calendarEvent->save();\n\n $this->assertInstanceOf(CalendarEvent::class, $templateCalendarEvent->events()->first());\n }", "public function testControllerMiddleware0()\n{\n\n // Traversed conditions\n // if (!$this->isControllerAction()) == false (line 791)\n\n $actual = $this->route->controllerMiddleware();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function test_add_status_event()\n {\n $employer = Employer::factory()->create();\n $status = EmployerStatus::create([\n \"employer_id\" => $employer->id,\n \"online_at\" => $online_at = Carbon::now(),\n\n ]);\n $this->assertDatabaseHas(\"employer_statuses\", [\n \"employer_id\" => (string)$employer->id,\n \"online_at\" => $online_at,\n\n ]);\n }", "public function testHandler()\n {\n $this->assertInstanceOf( 'ezp\\\\Persistence\\\\Handler', $this->persistenceHandler );\n $this->assertInstanceOf( 'ezp\\\\Persistence\\\\Storage\\\\InMemory\\\\Handler', $this->persistenceHandler );\n }", "public function testWebinarRegistrants()\n {\n }", "public function testQuarantineCreateChangeStreamPostQuarantinesChangeStream()\n {\n\n }", "public function test_example()\n {\n $response = $this->get('/futureevents');\n $response->assertStatus(200)\n ->assertJsonCount(2)\n ->assertJsonPath('0.name', 'Laravel convention 2021')\n ->assertJsonPath('0.workshops.0.name', 'The new Eloquent - load more with less')\n ->assertJsonPath('0.workshops.1.name', 'AutoEx - handles exceptions 100% automatic')\n ->assertJsonPath('1.name', 'React convention 2021')\n ->assertJsonPath('1.workshops.0.name', '#NoClass pure functional programming')\n ->assertJsonPath('1.workshops.1.name', 'Navigating the function jungle');\n }", "public function testPostWebhooks()\n {\n }", "protected function setUp(): void\n {\n $this->middleware = new WsseMiddleware(\n FIXTURE_DIR . '/certificates/wsse-client-private-key.pem',\n FIXTURE_DIR . '/certificates/wsse-client-public-key.pub'\n );\n $this->mockClient = new Client(Psr17FactoryDiscovery::findResponseFactory());\n $this->client = new PluginClient($this->mockClient, [$this->middleware]);\n }", "public function testCanBeCreated()\n {\n $subject = $this->createInstance(['_getArgsForDefinition']);\n\n $this->assertInstanceOf(\n static::TEST_SUBJECT_CLASSNAME,\n $subject,\n 'A valid instance of the test subject could not be created.'\n );\n }", "public function testGetInvalidEventName (): void {\n // grab an name that does not exist\n $event = Event::getEventByEventName($this->getPDO(), \"omgmynameisLuther\");\n $this->assertEmpty($event);\n }", "public function testAclMiddleware():void\n {\n $generator = Factory::create();\n $em = $this->em();\n $conn = $em->getConnection();\n $conn->beginTransaction();\n try {\n /** Register user via the guest endpoint **/\n $response = $this->json(\n 'POST', '/contexts/guest/users',\n [\n \"params\" => [\n 'email' => $generator->safeEmail,\n 'firstName'=> $generator->firstName,\n 'middleInitial'=>'X',\n 'lastName'=> $generator->lastName,\n 'age' => $generator->randomNumber(2),\n 'gender' => 1,\n 'weight' => 210,\n 'height' => 180.34,\n 'phoneNumber' => \"+1 757-571-2711\",\n 'lifestyle' => 1,\n 'password' => $this->password,\n 'job' => $generator->jobTitle,\n 'address' => $generator->address,\n 'locale' => \"en\"\n ],\n \"options\" => [\n \"email\" => false,\n \"g-recaptcha-response-omit\" => env('GOOGLE_RECAPTCHA_SKIP_CODE') /** skipping recaptcha with a key **/\n ]\n ]\n );\n $userResult = $response->decodeResponseJson();\n $this->assertArrayHasKey('id', $userResult);\n\n /** Making sure user has email verification entry **/\n $emailVerificationRepository = new EmailVerificationRepository();\n $emailVerification = $emailVerificationRepository->findOneBy([\"user\" => $userResult[\"id\"]]);\n $this->assertEquals( $emailVerification->getUser()->getId(), $userResult['id']);\n $this->assertEquals( $emailVerification->getVerified(), false);\n\n /** Email verification endpoint **/\n $response = $this->json(\n 'PUT', \"/contexts/guest/email-verification/\" . $emailVerification->getId(),\n [\n \"params\" => [ \"verified\" => true ],\n \"options\" => [ \"simplifiedParams\" => true ]\n ]\n );\n $response->assertResponseStatus(200);\n\n /** Making sure user has user has role entry of 'user' **/\n $userRepository = new UserRepository();\n /** @var User $user */\n $user = $userRepository->find($userResult[\"id\"]);\n $this->assertEquals( $user->getId(), $userResult['id']);\n $this->assertEquals( $user->getRoles()[0]->getName(), 'user');\n\n /** Login with wrong password **/\n $response = $this->json('POST', '/auth/authenticate', ['email' => $user->getEmail(), 'password' => 'wrong_password']);\n $response->assertResponseStatus(401);\n\n /** Login with right password **/\n $response = $this->json('POST', '/auth/authenticate', ['email' => $user->getEmail(), 'password' => $this->password]);\n $tokenResult = $response->decodeResponseJson();\n $response->assertResponseStatus(200);\n\n /** Free port acl **/\n $response = $this->json('GET', '/auth/me', [], ['HTTP_AUTHORIZATION'=>'Bearer ' . $tokenResult['token']]);\n $result = $response->decodeResponseJson();\n $this->assertEquals($result['email'], $user->getEmail());\n\n $data = [\n \"params\" => [\n \"name\" => $generator->name\n ],\n \"options\" => [\n \"simplifiedParams\" => true\n ]\n ];\n\n /** Posting artist as a quest **/\n $response = $this->json('POST', '/contexts/guest/artists', $data, ['HTTP_AUTHORIZATION'=>'Bearer ' . $tokenResult['token']]);\n $response->assertResponseStatus(405);\n\n /** Posting artist as a user **/\n $response = $this->json('POST', '/contexts/user/artists', $data, ['HTTP_AUTHORIZATION'=>'Bearer ' . $tokenResult['token']]);\n $result = $response->decodeResponseJson();\n $response->assertResponseStatus(500);\n\n /** Posting artist as a admin **/\n $response = $this->json('POST', '/contexts/admin/artists', $data, ['HTTP_AUTHORIZATION'=>'Bearer ' . $tokenResult['token']]);\n $response->assertResponseStatus(403);\n\n /** Posting artist as a super-admin **/\n $response = $this->json('POST', '/contexts/super-admin/artists', $data, ['HTTP_AUTHORIZATION'=>'Bearer ' . $tokenResult['token']]);\n $response->assertResponseStatus(404);\n $conn->rollBack();\n } catch (Exception $e) {\n $conn->rollBack();\n throw $e;\n }\n }", "public function testErrorHandler()\n {\n $this->assertArrayHasKey('core.error_handler', $this->app);\n $this->assertInstanceOf(\n ErrorHandler::class,\n $this->app['core.error_handler']\n );\n }", "public function testOrgApacheFelixEventadminImplEventAdmin()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/org.apache.felix.eventadmin.impl.EventAdmin';\n\n $crawler = $client->request('POST', $path);\n }", "public function testRegister() {\n $namespace=\"jsvalidation\";\n $test = $this;\n $app=m::mock('\\Illuminate\\Contracts\\Foundation\\Application');\n $sp = m::mock('Proengsoft\\JsValidation\\JsValidationServiceProvider[]', [$app])->shouldAllowMockingProtectedMethods();\n /*\n |------------------------------------------------------------\n | Expectation\n |------------------------------------------------------------\n */\n\n Config::shouldReceive('get')\n ->with(\"$namespace.form_selector\")\n ->atLeast(1)\n ->andReturn('form');\n\n Config::shouldReceive('get')\n ->with(\"$namespace.view\")\n ->atLeast(1)\n ->andReturn(\"$namespace::bootstrap\");\n\n $app->shouldReceive('bind')\n ->once()->andReturnUsing(\n // Make sure that the name is 'jsvalidator'\n // and that the closure passed returns the correct\n // kind of object.\n function ($name, $closure) use ($test, $app) {\n $test->assertEquals('jsvalidator', $name);\n\n $test->assertInstanceOf(\n 'Proengsoft\\JsValidation\\Factory',\n $closure($app)\n );\n }\n );\n\n $app->shouldReceive('make')\n ->once()->andReturnUsing(\n function($name) use ($test) {\n $test->assertEquals('Illuminate\\Contracts\\Validation\\Factory',$name);\n return m::mock('Illuminate\\Contracts\\Validation\\Factory');\n }\n );\n /*\n |------------------------------------------------------------\n | Assertion\n |------------------------------------------------------------\n */\n $sp->register();\n\n\n /**\n * Cleanup\n */\n unset($sp);\n unset($app);\n unset($test);\n }", "public function testQuarantineCreate()\n {\n\n }", "public function testInstance() {\n\t\t$this->assertInstanceOf('EventCore', $this->Event);\n\t}", "public function testGetEventDispatcher()\n {\n $redis = $this->factory->getRedis();\n $dispatcher = new EventDispatcher();\n $factory = new Factory($redis, $dispatcher);\n\n $this->assertTrue($factory->getEventDispatcher() instanceof EventDispatcherInterface);\n }", "public function testWebinar()\n {\n }", "public function testComAdobeCqWcmLaunchesImplLaunchesEventHandler()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.adobe.cq.wcm.launches.impl.LaunchesEventHandler';\n\n $crawler = $client->request('POST', $path);\n }", "public function testGetEventDispatcher()\n {\n $transport = new Transport();\n $this->assertInstanceOf(EventDispatcher::class, $transport->getEventDispatcher());\n }", "public function testUpcomingEvents()\n {\n // otherwise test will fail.\n // Other approach is to use fake data or mock it.\n \n $response = $this->json('GET', '/events');\n \n $response\n ->assertStatus(200)\n ->assertJson([\n ['name' => 'IT Expo']\n ]);\n }", "public function setUp()\n {\n $this->subscriber['division_id'] = 12345;\n $this->data['group']['timezone'] = 'America/Chicago';\n $this->data['unit_test'] = 1;\n\n $this->webhook = new SimpleWebhook($this->subscriber, $this->data);\n }", "public function testGetStaticEventDispatcher()\n {\n $transport = new Transport();\n $refTransport = new \\ReflectionObject($transport);\n $getStaticEventDispatcherMethod = $refTransport->getMethod('getEventDispatcher');\n $getStaticEventDispatcherMethod->setAccessible(true);\n $returnEventDispatcher = $getStaticEventDispatcherMethod->invoke($transport);\n $this->assertInstanceOf(EventDispatcher::class, $returnEventDispatcher);\n }", "public function setUp(): void\n {\n parent::setUp();\n $this->factory = $this->app->make('validator');\n }", "public function testReportsEventlogGet()\n {\n }", "public function setUp()\n {\n $request = file_get_contents(GITHUB_FIXTURES_DIR . '/Event/push.json');\n\n $this->webHook = new WebHook($request);\n $this->pushEvent = $this->webHook->getPushEvent();\n }", "public function testSectionHandler()\n {\n $sectionHandler = $this->persistenceHandler->sectionHandler();\n $this->assertInstanceOf( 'ezp\\\\Persistence\\\\Content\\\\Section\\\\Handler', $sectionHandler );\n $this->assertInstanceOf( 'ezp\\\\Persistence\\\\Storage\\\\InMemory\\\\SectionHandler', $sectionHandler );\n }", "public function testSetGetBeginAt()\n {\n $beginAt = new \\DateTime();\n $event = (new Event())->setBeginAt($beginAt);\n $this->assertEquals($beginAt, $event->getBeginAt());\n }", "public function testSetup()\n {\n $this->assertType('Horde_Kolab_Server', $this->koward->server);\n }", "public function testAddVendorComplianceSurvey()\n {\n }", "public function testEventCallbackException()\n {\n $this->setExpectedException('Txiki\\Events\\EventException', 'Invalid event callback', 0);\n\n $this->event->on('event-name', false);\n }", "public function testMeetingCreatePost()\n {\n $user = factory(App\\User::class)->create();\n }", "public function testDispatchEvents()\n {\n $this->uut->dispatch($this->buildRequest('/default'));\n\n $this->assertArrayHasKey(OnPreDispatch::class, self::$lastEvents);\n $this->assertArrayHasKey(OnPostRoute::class, self::$lastEvents);\n $this->assertArrayHasKey(OnPostDispatch::class, self::$lastEvents);\n }", "public function middleware($middlewareDefinition): self;", "public function setUp()\n {\n $this->fixture = new LifecycleEventArgs(\n $this->document = new Product(),\n $this->documentManager = static::createMock(DocumentManagerInterface::class)\n );\n }", "public function testEventsList()\n {\n $response = $this->get('/events');\n\n $response->assertStatus(200);\n }", "public function testCreate()\n\t{\n\t\t$this->dispatchWithExpectedException(\"/comment/create\", 'Bootstrap_Service_Exception_Authorization');\n\t}" ]
[ "0.6642569", "0.6582048", "0.64233357", "0.62353176", "0.6153294", "0.6129908", "0.5991054", "0.5949481", "0.5934481", "0.5876484", "0.5872267", "0.58649874", "0.58563125", "0.58379316", "0.58311373", "0.5824571", "0.5823644", "0.58207476", "0.5815057", "0.5806604", "0.5804549", "0.57910913", "0.5782904", "0.57796633", "0.57686424", "0.57529426", "0.5730285", "0.5728296", "0.569681", "0.56869054", "0.56569093", "0.5644345", "0.5636426", "0.5626839", "0.56190133", "0.5601563", "0.55922633", "0.5590002", "0.556931", "0.55691445", "0.55592823", "0.5555745", "0.555352", "0.5516203", "0.5498692", "0.54657614", "0.54621804", "0.541546", "0.54141235", "0.5412783", "0.5408969", "0.54061717", "0.54035044", "0.5401448", "0.539977", "0.5382454", "0.5374763", "0.535884", "0.53550965", "0.5350374", "0.53467023", "0.5344166", "0.53413373", "0.53332376", "0.5319009", "0.5317005", "0.5313322", "0.52905977", "0.52756983", "0.5274914", "0.5271747", "0.5268402", "0.5260686", "0.52552396", "0.5246465", "0.5240965", "0.5225978", "0.521678", "0.5213406", "0.5211697", "0.5206327", "0.52044415", "0.52028894", "0.5199399", "0.5193594", "0.5192501", "0.5191013", "0.51715475", "0.51568234", "0.5150287", "0.5149669", "0.5149006", "0.514714", "0.5142198", "0.5137975", "0.51359576", "0.5120518", "0.51192284", "0.51171803", "0.51116556" ]
0.8089062
0
Test case to assert the log middleware definition is created correctly.
public function testGetLogMiddlewareDefinition() { $client = 'client'; $logMiddleware = $this->subject->getLogMiddlewareDefinition($client); $this->assertCount(3, $logMiddleware->getArguments()); $this->assertSame('%mapudo.guzzle.middleware.log_middleware.class%', $logMiddleware->getClass()); // Assert the references have been set correctly $arguments = ['monolog.logger.guzzle', 'guzzle_bundle.formatter', 'mapudo_bundle_guzzle.serializer']; for ($i = 0; $i < 3; $i++) { /** @var Reference $reference */ $reference = $logMiddleware->getArgument($i); $this->assertInstanceOf(Reference::class, $reference); $this->assertSame($arguments[$i], $reference->__toString()); $this->assertSame(ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, $reference->getInvalidBehavior()); } $this->assertCount(1, $logMiddleware->getMethodCalls()); $this->assertTrue($logMiddleware->hasMethodCall('setClientName')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testSetUpLoggerName()\n\t{\t\n\t\t$this->__Log->setupLogger('log_name',new \\Monolog\\Handler\\TestHandler());\n\t\t$logger = $this->__Log->getLogger('log_name');\n\n\t\t$this->assertInternalType('object',$logger);\n\t}", "public function testGetLogger()\n\t{\t\t\n\t\t$this->__Log->setupLogger('testing',new \\Monolog\\Handler\\TestHandler());\n\t\t$logger = $this->__Log->getLogger('testing');\n\t\t$loggerTest = new \\Monolog\\Logger('testing');\n\t\t$loggerTest->pushHandler(new \\Monolog\\Handler\\TestHandler());\n\n\t\t$this->assertEquals($loggerTest,$logger);\n\t}", "public function testGetEventMiddlewareDefinition()\n {\n $clientName = 'clientName';\n $eventMiddleware = $this->subject->getEventMiddlewareDefinition($clientName);\n\n $this->assertCount(2, $eventMiddleware->getArguments());\n $this->assertSame('%mapudo.guzzle.middleware.event_dispatch_middleware.class%', $eventMiddleware->getClass());\n\n // Assert the Reference has been set correctly\n /** @var Reference $reference */\n $reference = $eventMiddleware->getArgument(0);\n $this->assertInstanceOf(Reference::class, $reference);\n $this->assertSame('event_dispatcher', $reference->__toString());\n $this->assertSame(ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, $reference->getInvalidBehavior());\n\n // Assert the client name\n $this->assertSame($clientName, $eventMiddleware->getArgument(1));\n }", "public function testMiddlewarePasses()\n {\n $authorizationLine = 'Basic ' . base64_encode('foo:bar');\n\n $request = new Request();\n $request->headers->add([\n 'Authorization' => $authorizationLine,\n ]);\n\n $middleware = new WebhookAuthenticationMiddleware('foo', 'bar');\n $this->assertTrue($middleware->handle($request, function () {\n return true;\n }));\n }", "public function testGetHandlerDefinition()\n {\n $clientName = 'clientName';\n\n /** @var ContainerBuilder|ObjectProphecy $container */\n $container = $this->prophesize(ContainerBuilder::class);\n\n $middleware = ['test_middleware' => [\n ['method' => 'attach']\n ]];\n\n $handler = $this->subject->getHandlerDefinition($container->reveal(), $clientName, $middleware);\n\n // Test basic stuff\n $this->assertSame('%guzzle_http.handler_stack.class%', $handler->getClass());\n $this->assertSame(['%guzzle_http.handler_stack.class%', 'create'], $handler->getFactory());\n\n $methodCalls = $handler->getMethodCalls();\n // Count is the number of the given middleware + the default event and log middleware expressions\n $this->assertCount(3, $methodCalls);\n\n $customMiddlewareCall = array_shift($methodCalls);\n $this->assertSame('push', array_shift($customMiddlewareCall));\n /** @var Expression[] $customMiddlewareExpressions */\n $customMiddlewareExpressions = array_shift($customMiddlewareCall);\n $customMiddlewareExpression = array_shift($customMiddlewareExpressions);\n $this->assertInstanceOf(Expression::class, $customMiddlewareExpression);\n $this->assertSame('service(\"test_middleware\").attach()', $customMiddlewareExpression->__toString());\n\n $logMiddlewareCall = array_shift($methodCalls);\n $this->assertSame('push', array_shift($logMiddlewareCall));\n /** @var Expression[] $logMiddlewareExpressions */\n $logMiddlewareExpressions = array_shift($logMiddlewareCall);\n $logMiddlewareExpression = array_shift($logMiddlewareExpressions);\n $this->assertInstanceOf(Expression::class, $logMiddlewareExpression);\n $this->assertSame(\n 'service(\"guzzle_bundle.middleware.log.clientName\").log()',\n $logMiddlewareExpression->__toString()\n );\n\n $eventDispatchMiddlewareCall = array_shift($methodCalls);\n $this->assertSame('unshift', array_shift($eventDispatchMiddlewareCall));\n /** @var Expression[] $eventDispatchMiddlewareExpressions */\n $eventDispatchMiddlewareExpressions = array_shift($eventDispatchMiddlewareCall);\n $eventDispatchMiddlewareExpression = array_shift($eventDispatchMiddlewareExpressions);\n $this->assertInstanceOf(Expression::class, $eventDispatchMiddlewareExpression);\n $this->assertSame(\n 'service(\"guzzle_bundle.middleware.event_dispatch.clientName\").dispatch()',\n $eventDispatchMiddlewareExpression->__toString()\n );\n }", "public function testLoggerExists()\n\t{\t\t\n\t\t$this->__Log->setupLogger('test1',new \\Monolog\\Handler\\TestHandler());\n\t\t$this->assertTrue($this->__Log->isLoggerExists('test1'));\n\t\t$this->assertFalse($this->__Log->isLoggerExists('test3'));\n\t}", "protected function createMockedLoggerAndLogManager() {}", "public function testTokenGeneration()\n {\n $token = LogServiceProvider::createToken();\n\n $log = FileLog::where('token', $token)->first();\n\n $this->assertNull($log);\n }", "public function testLogCreation()\n {\n // if the file was previously created, delete it\n if (file_exists(LOG_PATH . '/' . get_class($this) . '.log')) {\n unlink(LOG_PATH . '/' . get_class($this) . '.log');\n }\n\n // the test\n $this->logMessage('this is a test');\n\n // asserts\n $this->assertTrue(file_exists(LOG_PATH . '/' . get_class($this) . '.log'));\n $this->assertGreaterThan(0, filesize(LOG_PATH . '/' . get_class($this) . '.log'));\n }", "public function testValidKeyName() {\n\t\tCakeLog::config('valid', array('engine' => 'File'));\n\t\t$stream = CakeLog::stream('valid');\n\t\t$this->assertInstanceOf('FileLog', $stream);\n\t\tCakeLog::drop('valid');\n\t}", "public function createdLogEntryCallsGivenLogger()\n {\n $this->mockLogger->expects($this->once())\n ->method('log')\n ->with($this->logEntry);\n $this->logEntry->log();\n }", "public function testCustomLogCreation()\n {\n $logName = 'test.log';\n\n // if the file was previously created, delete it\n if (file_exists(LOG_PATH . '/' . $logName)) {\n unlink(LOG_PATH . '/' . $logName);\n }\n\n // the test\n $this->logMessage('this is a test', $logName);\n\n // asserts\n $this->assertTrue(file_exists(LOG_PATH . '/' . get_class($this) . '.log'));\n $this->assertGreaterThan(0, filesize(LOG_PATH . '/' . get_class($this) . '.log'));\n }", "public function testGeneralMethods()\n {\n $logger = $this->lh->getLogger();\n $this->assertInstanceOf('Psr\\Log\\NullLogger', $logger);\n }", "public function testWriteIsCalled()\n {\n // Mock the SentryLogWriter\n $spy = \\Phockito::spy('phptek\\Sentry\\SentryLogWriter');\n\n // Register it\n \\SS_Log::add_writer($spy, \\SS_Log::ERR, '<=');\n\n // Invoke SentryLogWriter::_write()\n \\SS_Log::log('You have one minute to reach minimum safe distance.', \\SS_Log::ERR);\n\n // Verificate\n \\Phockito::verify($spy, 1)->_write(arrayValue());\n }", "public function setUp()\n {\n $first = new class implements MiddlewareInterface {\n\n public function request($body)\n {\n return \"foo \" . $body;\n }\n\n public function response($body)\n {\n if (strpos($body, \"foo \")===0) {\n return substr($body, 4);\n }\n\n return $body;\n }\n\n };\n\n // First will add the word bar to the start of a string, and remove it if it's there\n $second = new class implements MiddlewareInterface {\n public function request($body)\n {\n return \"bar \" . $body;\n }\n\n public function response($body)\n {\n if (strpos($body, \"bar \")===0) {\n return substr($body, 4);\n }\n\n return $body;\n }\n\n };\n\n $this->middleware = new MiddlewareGroup([$first, $second]);\n }", "public function testValidKeyNameLogSuffix() {\n\t\tCakeLog::config('valid', array('engine' => 'FileLog'));\n\t\t$stream = CakeLog::stream('valid');\n\t\t$this->assertInstanceOf('FileLog', $stream);\n\t\tCakeLog::drop('valid');\n\t}", "public function testBasicTest()\n {\n /*\n $mock = app(LogTrait_0::class);\n\n $this->instance(LogTrait_0::class, $mock);\n\n $instance = new LogTrait_0();\n dd($instance);\n $instance->error(\"error\");\n\n LogTrait_0::info(\"test\");\n */\n $name = \"\";\n // $name = $clazz->get\n // $request = Request::capture();\n // $instance = new Controller_0($request);\n // $name = $instance->getShortName();\n //$name = Controller_0::getControllerName();\n $this->assertEquals(\"\", $name);\n }", "public function testLogSimpleUsingPOST()\n {\n\n }", "public function testSetLogger() {\n $file_name = getLogFileName();\n $message = 'The sky is the daily bread of the eyes.';\n setOutputDestination($file_name);\n Terminus::getLogger()->debug($message);\n $output = retrieveOutput($file_name);\n $this->assertFalse(strpos($output, $message) !== false);\n Terminus::setLogger(['debug' => true, 'format' => 'json']);\n Terminus::getLogger()->debug($message);\n $output = retrieveOutput($file_name);\n $this->assertTrue(strpos($output, $message) !== false);\n resetOutputDestination($file_name);\n }", "public function testLogInfo() {\n\n $obj = new TestProvider($this->logger);\n\n $this->assertSame($obj, $obj->logInfo(\"message\", []));\n }", "public function testLogger(): void\n {\n $loggerMock = $this->createMock(LoggerInterface::class);\n\n $loggerMock->expects(self::once())\n ->method('log')\n ->with(LoggerInterface::FATAL, 'Log log', []);\n\n $subject = new TransitLogger();\n\n $this->assertInstanceOf(TransitLogger::class, $subject);\n\n $subject->addLogger($loggerMock);\n $subject->log(LoggerInterface::FATAL, 'Log log', []);\n }", "public function testExtrasAvailable()\n {\n // Register SentryLogWriter with some custom context\n $fixture = [\n 'extra' => [\n 'foo' => 'bar'\n ],\n 'env' => 'live'\n ];\n $logger = new Logger('error-log');\n $logger->pushHandler(new SentryMonologHandler(100, true, $fixture));\n\n // Invoke SentryLogWriter::_write()\n \\SS_Log::log('You have 10 seconds to comply.', \\SS_Log::ERR);\n\n $envThatWasSet = $logger->getClient()->getData()['env'];\n $xtraThatWasSet = $logger->getClient()->getData()['extra'];\n\n $this->assertEquals('live', $envThatWasSet);\n $this->assertArrayHasKey('foo', $xtraThatWasSet);\n $this->assertContains('bar', $xtraThatWasSet['foo']);\n\n // Cleanup\n \\SS_Log::remove_writer($logger);\n }", "public function testLogUsingPOST()\n {\n\n }", "public function testLoggingLoaded()\n {\n $this->assertInstanceOf('\\interview\\Logging', new \\interview\\Logging);\n }", "public function testSuccessfulMiddleware()\n {\n $model = factory(Server::class)->make();\n $subuser = factory(Subuser::class)->make([\n 'server_id' => $model->id,\n ]);\n $this->setRequestAttribute('server', $model);\n\n $this->request->shouldReceive('route->parameter')->with('subuser', 0)->once()->andReturn('abc123');\n $this->hashids->shouldReceive('decodeFirst')->with('abc123', 0)->once()->andReturn($subuser->id);\n $this->repository->shouldReceive('find')->with($subuser->id)->once()->andReturn($subuser);\n\n $this->request->shouldReceive('method')->withNoArgs()->once()->andReturn('GET');\n\n $this->getMiddleware()->handle($this->request, $this->getClosureAssertions());\n $this->assertRequestHasAttribute('subuser');\n $this->assertRequestAttributeEquals($subuser, 'subuser');\n }", "public function testConvenienceScopedLogging() {\n\t\tif (file_exists(LOGS . 'shops.log')) {\n\t\t\tunlink(LOGS . 'shops.log');\n\t\t}\n\t\tif (file_exists(LOGS . 'error.log')) {\n\t\t\tunlink(LOGS . 'error.log');\n\t\t}\n\t\tif (file_exists(LOGS . 'debug.log')) {\n\t\t\tunlink(LOGS . 'debug.log');\n\t\t}\n\n\t\t$this->_resetLogConfig();\n\t\tCakeLog::config('shops', array(\n\t\t\t'engine' => 'File',\n\t\t\t'types' => array('info', 'debug', 'notice', 'warning'),\n\t\t\t'scopes' => array('transactions', 'orders'),\n\t\t\t'file' => 'shops',\n\t\t));\n\n\t\tCakeLog::info('info message', 'transactions');\n\t\t$this->assertFalse(file_exists(LOGS . 'error.log'));\n\t\t$this->assertTrue(file_exists(LOGS . 'shops.log'));\n\t\t$this->assertTrue(file_exists(LOGS . 'debug.log'));\n\n\t\t$this->_deleteLogs();\n\n\t\tCakeLog::error('error message', 'orders');\n\t\t$this->assertTrue(file_exists(LOGS . 'error.log'));\n\t\t$this->assertFalse(file_exists(LOGS . 'debug.log'));\n\t\t$this->assertFalse(file_exists(LOGS . 'shops.log'));\n\n\t\t$this->_deleteLogs();\n\n\t\tCakeLog::warning('warning message', 'orders');\n\t\t$this->assertTrue(file_exists(LOGS . 'error.log'));\n\t\t$this->assertTrue(file_exists(LOGS . 'shops.log'));\n\t\t$this->assertFalse(file_exists(LOGS . 'debug.log'));\n\n\t\t$this->_deleteLogs();\n\n\t\tCakeLog::drop('shops');\n\t}", "public function testRouteMiddleware()\n {\n $callable1 = function () {};\n $callable2 = function () {};\n //Case A\n $r1 = new \\Slim\\Route('/foo', function () {});\n $r1->setMiddleware($callable1);\n $mw = $r1->getMiddleware();\n $this->assertInternalType('array', $mw);\n $this->assertEquals(1, count($mw));\n //Case B\n $r1->setMiddleware($callable2);\n $mw = $r1->getMiddleware();\n $this->assertEquals(2, count($mw));\n //Case C\n $r2 = new \\Slim\\Route('/foo', function () {});\n $r2->setMiddleware(array($callable1, $callable2));\n $mw = $r2->getMiddleware();\n $this->assertInternalType('array', $mw);\n $this->assertEquals(2, count($mw));\n //Case D\n $r3 = new \\Slim\\Route('/foo', function () {});\n $r3->setMiddleware(array($this, 'callableTestFunction'));\n $mw = $r3->getMiddleware();\n $this->assertInternalType('array', $mw);\n $this->assertEquals(1, count($mw));\n //Case E\n try {\n $r3->setMiddleware('sdjfsoi788');\n $this->fail('Did not catch InvalidArgumentException when setting invalid route middleware');\n } catch ( \\InvalidArgumentException $e ) {}\n //Case F\n try {\n $r3->setMiddleware(array($callable1, $callable2, 'sdjfsoi788'));\n $this->fail('Did not catch InvalidArgumentException when setting an array with one invalid route middleware');\n } catch ( \\InvalidArgumentException $e ) {}\n }", "public function testBasicTest()\n {\n Log::shouldReceive('info')\n ->once()\n ->with('some one want to sneak in');\n $response = $this->get('/admin/panel');\n\n $response->assertRedirect('/welcome');\n }", "public function setUp()\n {\n $this->logger = NewInstance::stub(Logger::class);\n $this->timedLogEntryFactory = new TimedLogEntryFactory();\n $this->logEntry = $this->timedLogEntryFactory->create(\n 'testTarget',\n $this->logger\n );\n }", "public function testOrgApacheSlingCommonsLogLogManagerFactoryWriter()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/org.apache.sling.commons.log.LogManager.factory.writer';\n\n $crawler = $client->request('POST', $path);\n }", "protected function setUp()\n {\n parent::setUp();\n\n $this->config = Configuration::loadFromArray(\n [\n 'module.enable' => ['preprodwarning' => true],\n ],\n '[ARRAY]',\n 'simplesaml'\n );\n\n $this->session = Session::getSessionFromRequest();\n\n Configuration::setPreLoadedConfig($this->config, 'config.php');\n\n $this->logger = new class () extends Logger {\n public static function info($str)\n {\n // do nothing\n }\n };\n }", "public function testExample()\n {\n Log::critical('This is a critical message sent from Laravel App');\n $this->assertTrue(true);\n }", "protected function setUp()\n {\n //$this->object = new Middleware;\n }", "public function testScopedLoggingBC() {\n\t\t$this->_resetLogConfig();\n\n\t\tCakeLog::config('shops', array(\n\t\t\t'engine' => 'File',\n\t\t\t'types' => array('info', 'notice', 'warning'),\n\t\t\t'scopes' => array('transactions', 'orders'),\n\t\t\t'file' => 'shops',\n\t\t));\n\t\t$this->_deleteLogs();\n\n\t\tCakeLog::write('info', 'info message');\n\t\t$this->assertFalse(file_exists(LOGS . 'error.log'));\n\t\t$this->assertTrue(file_exists(LOGS . 'debug.log'));\n\n\t\t$this->_deleteLogs();\n\n\t\tCakeLog::write('transactions', 'transaction message');\n\t\t$this->assertTrue(file_exists(LOGS . 'shops.log'));\n\t\t$this->assertFalse(file_exists(LOGS . 'transactions.log'));\n\t\t$this->assertFalse(file_exists(LOGS . 'error.log'));\n\t\t$this->assertFalse(file_exists(LOGS . 'debug.log'));\n\n\t\t$this->_deleteLogs();\n\n\t\tCakeLog::write('error', 'error message');\n\t\t$this->assertTrue(file_exists(LOGS . 'error.log'));\n\t\t$this->assertFalse(file_exists(LOGS . 'debug.log'));\n\t\t$this->assertFalse(file_exists(LOGS . 'shops.log'));\n\n\t\t$this->_deleteLogs();\n\n\t\tCakeLog::write('orders', 'order message');\n\t\t$this->assertFalse(file_exists(LOGS . 'error.log'));\n\t\t$this->assertFalse(file_exists(LOGS . 'debug.log'));\n\t\t$this->assertFalse(file_exists(LOGS . 'orders.log'));\n\t\t$this->assertTrue(file_exists(LOGS . 'shops.log'));\n\n\t\t$this->_deleteLogs();\n\n\t\tCakeLog::write('warning', 'warning message');\n\t\t$this->assertTrue(file_exists(LOGS . 'error.log'));\n\t\t$this->assertFalse(file_exists(LOGS . 'debug.log'));\n\n\t\t$this->_deleteLogs();\n\n\t\tCakeLog::drop('shops');\n\t}", "public function testValidToken()\n {\n // Create the user with a token we know\n $token = bin2hex(random_bytes(64));\n $this->writedown->getService('api')->user()->create([\n 'email' => $this->faker->email,\n 'password' => $this->faker->word,\n 'token' => $token,\n ]);\n\n // Add the token to the session\n $session = new SessionStub;\n $session->set('auth_token', $token);\n\n // Create the middleware\n $provider = new AuthenticatedMiddleware($this->writedown->getService('auth'), $session);\n\n // Make mocks\n $request = \\Mockery::mock('\\Psr\\Http\\Message\\ServerRequestInterface')->makePartial();\n $response = \\Mockery::mock('\\Psr\\Http\\Message\\ResponseInterface')->makePartial();\n\n // Check it works\n $result = $provider->validate($request, $response, function () {\n return true;\n });\n\n $this->assertTrue($result);\n }", "protected function _loggerSanity()\n {\n if (!isset($this->_directives['logging']) || !$this->_directives['logging']) {\n return;\n }\n\n if (isset($this->_directives['logger'])) {\n if ($this->_directives['logger'] instanceof Zend_Log) {\n return;\n }\n Zend_Cache::throwException('Logger object is not an instance of Zend_Log class.');\n }\n\n // Create a default logger to the standard output stream\n require_once 'Zend/Log.php';\n require_once 'Zend/Log/Writer/Stream.php';\n require_once 'Zend/Log/Filter/Priority.php';\n $logger = new Zend_Log(new Zend_Log_Writer_Stream('php://output'));\n $logger->addFilter(new Zend_Log_Filter_Priority(Zend_Log::WARN, '<='));\n $this->_directives['logger'] = $logger;\n }", "public function testGatherMiddleware0()\n{\n\n // Traversed conditions\n // if (!is_null($this->computedMiddleware)) == false (line 750)\n\n $actual = $this->route->gatherMiddleware();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function setUp()\n {\n parent::setUp();\n\n Mock::generate('Omnilog_model', get_class($this) .'_mock_model');\n\n $this->EE->omnilog_model = $this->_get_mock('model');\n $this->_model = $this->EE->omnilog_model;\n $this->_log_entry_props = array(\n 'addon_name' => 'Example Add-on',\n 'date' => time() - 100,\n 'message' => 'Example log entry.',\n 'extended_data' => 'Example OmniLog extended data.',\n 'notify_admin' => FALSE,\n 'type' => Omnilog_entry::NOTICE\n );\n }", "public function testGatherMiddleware1()\n{\n\n // Traversed conditions\n // if (!is_null($this->computedMiddleware)) == true (line 750)\n\n $actual = $this->route->gatherMiddleware();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function setUp()\n {\n $this->middleware = new ForbiddenWordsFilterMiddleware(['badword']);\n $this->request = Phake::mock(ServerRequestInterface::class);\n $this->delegate = Phake::mock(DelegateInterface::class);\n\n // the class needs to know which route it matched. Create a fake result and tell the request to return that\n $this->route_result = Phake::mock(RouteResult::class);\n Phake::when($this->request)->getAttribute(RouteResult::class)->thenReturn($this->route_result);\n Phake::when($this->route_result)->getMatchedParams()->thenReturn([]);\n\n // return an empty body stream\n Phake::when($this->request)->getBody()->thenReturn(new BufferStream());\n\n // when try try to replace the body just return the same request as before.\n Phake::when($this->request)->withBody($this->anything())->thenReturn($this->request);\n }", "protected function assertErrorLogEntries() {}", "public function testRequestSetCorrectly()\n {\n $property = $this->logger_reflection->getProperty('request');\n $property->setAccessible(TRUE);\n\n $this->assertEquals($this->request, $property->getValue($this->logger));\n $this->assertSame($this->request, $property->getValue($this->logger));\n }", "public function testConstruct()\n\t{\n\t\t$middlewareAdaptor = $this->createMock(MiddlewareAdaptorInterface::class);\n\t\t$middlewareAdaptor->method('setResolver');\n\n\t\t$resolveAdaptor = $this->createMock(\\Weave\\Resolve\\ResolveAdaptorInterface::class);\n\t\t$dispatchAdaptor = $this->createMock(\\Weave\\Dispatch\\DispatchAdaptorInterface::class);\n\n\t\t$requestFactory = $this->createMock(\\Weave\\Http\\RequestFactoryInterface::class);\n\t\t$responseFactory = $this->createMock(\\Weave\\Http\\ResponseFactoryInterface::class);\n\t\t$emitter = $this->createMock(\\Weave\\Http\\ResponseEmitterInterface::class);\n\n\t\t$middleware = new Middleware(\n\t\t\t$middlewareAdaptor,\n\t\t\tfn () => 'pipelineFoo',\n\t\t\t$resolveAdaptor,\n\t\t\t$dispatchAdaptor,\n\t\t\t$requestFactory,\n\t\t\t$responseFactory,\n\t\t\t$emitter\n\t\t);\n\n\t\t$this->assertInstanceOf(Middleware::class, $middleware);\n\t}", "public function testControllerMiddleware1()\n{\n\n // Traversed conditions\n // if (!$this->isControllerAction()) == true (line 791)\n\n $actual = $this->route->controllerMiddleware();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "protected function logMiddleware()\r\n {\r\n $formatter = new MessageFormatter($this->app['config']['http.log_template'] ?? MessageFormatter::DEBUG);\r\n\r\n return Middleware::log($this->app['logger'], $formatter, LogLevel::DEBUG);\r\n }", "public function testLoggerFileLog()\n {\n $logger = $this->getMockBuilder('Cake\\Log\\Engine\\FileLog')->setMethods(['log'])->getMock();\n\n $message = json_encode([\n 'method' => 'GET',\n 'path' => '_stats',\n 'data' => []\n ], JSON_PRETTY_PRINT);\n\n $logger->expects($this->once())->method('log')->with(\n $this->equalTo('debug'),\n $this->equalTo($message)\n );\n\n Log::setConfig('elasticsearch', $logger);\n\n $connection = ConnectionManager::get('test');\n $connection->logQueries(true);\n $result = $connection->request('_stats');\n $connection->logQueries(false);\n\n $this->assertNotEmpty($result);\n }", "public function testGetLoggerFailed()\n\t{\t\n\t\t$logger = $this->__Log->getLogger('testing');\n\t\t$this->assertFalse($logger);\n\t}", "public function testControllerMiddleware0()\n{\n\n // Traversed conditions\n // if (!$this->isControllerAction()) == false (line 791)\n\n $actual = $this->route->controllerMiddleware();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "protected function assertNoLogEntries() {}", "public function testValidateTokenTestEnvironment()\n {\n $request = new Request();\n $response = new Response();\n $middleware = new CsrfProtectionMiddleware();\n $request->data('title', 'Article Title');\n $middleware->handle($request);\n $middleware->process($request, $response);\n $this->assertNull(null); // This would normally trigger error\n }", "protected function setUp()\n {\n $this->object = new Log();\n }", "public function test_it_can_expose_how_much_time_has_been_logged()\n {\n $timelog = factory(TimeLog::class, 2)->create([\n 'number_of_seconds' => 300,\n 'user_id' => $this->user->id,\n 'project_id' => $this->project->id\n ]);\n // The project should be able to tell us how much time has been logged\n $timelogs = timeDiffForHumans($this->project->timelogs->sum('number_of_seconds'));\n //\n $this->assertSame($this->project->time_logged, $timelogs);\n }", "protected function setUp()\n { \n $this->log = new \\Zend_Log(new \\Zend_Log_Writer_Stream('php://output'));\n $this->adapter = new ZendLogAdapter($this->log);\n }", "public function testLogThrowsErrorIfXdebugIsPresent()\n {\n $property = $this->logger_reflection->getProperty('filename');\n $property->setAccessible(TRUE);\n\n $property->setValue($this->logger, '/dev/null');\n\n $this->expectOutputRegex('/^\\nXdebug: WARNING: Foo/');\n $this->logger->log(LogLevel::WARNING, 'Foo');\n }", "protected function setUp()\n {\n date_default_timezone_set('Asia/Shanghai');\n \n vfsStream::setup('Test');\n \n $this->serviceManager = new ServiceManager(new ServiceManagerConfig(array(\n \t'abstract_factories' => array('Platform\\Log\\LoggerAbstractServiceFactory'), \n )));\n $this->serviceManager->setService('Config', array(\n \t'log' => array(\n \t 'test-log' => array(\n \t 'writers' => array(\n \t array(\n \t 'name' => 'stream', \n \t 'options' => array(\n \t 'stream' => vfsStream::url(\"Test/%pattern%.log\"), \n \t ), \n \t ), \n \t \t), \n \t ), \n ), \n ));\n }", "public function setUp()\n {\n parent::setUp();\n $this->hierarchicalMiddleware = new HierarchicalMiddleware($this->app);\n }", "public function testWrite()\n\t{\n\t\tCatapult\\Log::write(time(), \"ERROR_CODE\", \"TEST\");\n\t}", "public function testConstructorWithPartialConfigProvided(): void\n {\n $middleware = new ThrottleMiddleware([\n 'response' => [\n 'body' => 'Rate limit exceeded',\n ],\n ]);\n $result = $middleware->getConfig();\n\n $this->assertTrue(array_key_exists('headers', $result['response']));\n }", "public function testLogAuthActionUsingPOST()\n {\n\n }", "public function testWrite() {\n $writer = new \\Nimbles\\Core\\Log\\Writer\\Mock(array(\n 'formatter' => array(\n 'simple' => array(\n 'format' => '%message%'\n )\n )\n ));\n\n $writer->write(new \\Nimbles\\Core\\Log\\Entry('This is a test message 1'));\n $writer->write(new \\Nimbles\\Core\\Log\\Entry('This is a test message 2'));\n $entries = $writer->getEntries();\n\n $this->assertEquals('This is a test message 1', $entries[0]);\n $this->assertEquals('This is a test message 2', $entries[1]);\n }", "public function testBogusTypeAndScope() {\n\t\t$this->_resetLogConfig();\n\t\t$this->_deleteLogs();\n\n\t\tCakeLog::config('file', array(\n\t\t\t'engine' => 'File',\n\t\t\t'path' => LOGS\n\t\t));\n\n\t\tCakeLog::write('bogus', 'bogus message');\n\t\t$this->assertTrue(file_exists(LOGS . 'bogus.log'));\n\t\t$this->assertFalse(file_exists(LOGS . 'error.log'));\n\t\t$this->assertFalse(file_exists(LOGS . 'debug.log'));\n\t\t$this->_deleteLogs();\n\n\t\tCakeLog::write('bogus', 'bogus message', 'bogus');\n\t\t$this->assertTrue(file_exists(LOGS . 'bogus.log'));\n\t\t$this->assertFalse(file_exists(LOGS . 'error.log'));\n\t\t$this->assertFalse(file_exists(LOGS . 'debug.log'));\n\t\t$this->_deleteLogs();\n\n\t\tCakeLog::write('error', 'bogus message', 'bogus');\n\t\t$this->assertFalse(file_exists(LOGS . 'bogus.log'));\n\t\t$this->assertTrue(file_exists(LOGS . 'error.log'));\n\t\t$this->assertFalse(file_exists(LOGS . 'debug.log'));\n\t\t$this->_deleteLogs();\n\t}", "public function testConfigIsPassed()\n {\n $config = ['foo' => 'bar'];\n Configure::write('DebugKit', $config);\n $layer = new DebugKitMiddleware();\n $prop = new ReflectionProperty(DebugKitMiddleware::class, 'service');\n $prop->setAccessible(true);\n $service = $prop->getValue($layer);\n $this->assertSame('bar', $service->getConfig('foo'));\n }", "public function test_should_be_used_with_web_middleware_group(): void\n {\n $this->withoutExceptionHandling();\n \n $router = resolve(\\Illuminate\\Routing\\Router::class);\n $middleWareGroups = $router->getMiddlewareGroups();\n \n Route::get(\n 'test-middleware', function (Request $request) use ($middleWareGroups) {\n $routeMiddleWareGroups = $request->route()->gatherMiddleware();\n $found = false;\n \n foreach ($routeMiddleWareGroups as $groupName) {\n if (isset($middleWareGroups[$groupName]) === true) {\n $group = $middleWareGroups[$groupName];\n \n if (in_array(TrackingMiddleware::class, $group)) {\n $found = true;\n }\n }\n }\n \n $this->assertTrue($found);\n }\n )->middleware('web');\n //\n \n $this->get('/test-middleware');\n }", "public function testLoginValidationLog() {\n $this->visit('http://londonce.lan/login')\n ->submitForm('Login', ['log' => 'aaaaa', 'password' => ''])\n ->see('Please enter a valid password.');\n }", "public function testOrgApacheSlingEngineImplLogRequestLogger()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/org.apache.sling.engine.impl.log.RequestLogger';\n\n $crawler = $client->request('POST', $path);\n }", "public function __construct()\n {\n $this->log = new Log($this->logFileName);\n $this->middleware('auth');\n }", "public function testNoStreamListenting() {\n\t\tif (file_exists(LOGS . 'error.log')) {\n\t\t\tunlink(LOGS . 'error.log');\n\t\t}\n\t\t$res = CakeLog::write(LOG_WARNING, 'Test warning');\n\t\t$this->assertFalse($res);\n\t\t$this->assertFalse(file_exists(LOGS . 'error.log'));\n\n\t\t$result = CakeLog::configured();\n\t\t$this->assertEquals(array(), $result);\n\t}", "public function testConfig() {\n\t\tCakeLog::config('file', array(\n\t\t\t'engine' => 'File',\n\t\t\t'path' => LOGS\n\t\t));\n\t\t$result = CakeLog::configured();\n\t\t$this->assertEquals(array('file'), $result);\n\n\t\tif (file_exists(LOGS . 'error.log')) {\n\t\t\tunlink(LOGS . 'error.log');\n\t\t}\n\t\tCakeLog::write(LOG_WARNING, 'Test warning');\n\t\t$this->assertTrue(file_exists(LOGS . 'error.log'));\n\n\t\t$result = file_get_contents(LOGS . 'error.log');\n\t\t$this->assertRegExp('/^2[0-9]{3}-[0-9]+-[0-9]+ [0-9]+:[0-9]+:[0-9]+ Warning: Test warning/', $result);\n\t\tunlink(LOGS . 'error.log');\n\t}", "public function testLoggerIsPassedCorrectly()\n {\n $property = $this->reflection->getProperty('logger');\n $property->setAccessible(TRUE);\n\n $value = $property->getValue($this->class);\n\n $this->assertInstanceOf('Psr\\Log\\LoggerInterface', $value);\n $this->assertSame($this->logger, $value);\n }", "public function testScopedLoggingExclusive() {\n\t\t$this->_deleteLogs();\n\n\t\tCakeLog::config('shops', array(\n\t\t\t'engine' => 'File',\n\t\t\t'types' => array('info', 'notice', 'warning'),\n\t\t\t'scopes' => array('transactions', 'orders'),\n\t\t\t'file' => 'shops.log',\n\t\t));\n\t\tCakeLog::config('eggs', array(\n\t\t\t'engine' => 'File',\n\t\t\t'types' => array('info', 'notice', 'warning'),\n\t\t\t'scopes' => array('eggs'),\n\t\t\t'file' => 'eggs.log',\n\t\t));\n\n\t\tCakeLog::write('info', 'transactions message', 'transactions');\n\t\t$this->assertFalse(file_exists(LOGS . 'eggs.log'));\n\t\t$this->assertTrue(file_exists(LOGS . 'shops.log'));\n\n\t\t$this->_deleteLogs();\n\n\t\tCakeLog::write('info', 'eggs message', 'eggs');\n\t\t$this->assertTrue(file_exists(LOGS . 'eggs.log'));\n\t\t$this->assertFalse(file_exists(LOGS . 'shops.log'));\n\t}", "protected function setUp()\n {\n $this->logPath = dirname(__FILE__) . '/tmpLogs';\n \n // just in case folder already exists\n if (file_exists($this->logPath)) \n {\n $this->tearDown();\n }\n \n // create temporary folder that will store logs\n mkdir($this->logPath, 0700, TRUE);\n \n // create fake logs\n date_default_timezone_set('America/Los_Angeles');\n $filename = $this->logPath.'/log-'.php_sapi_name().'-'.date('Y-m-d').'.txt';\n $data = '['.date('Y-m-d H:i:s').'] local.ERROR: Some error'.\"\\n\";\n $data .= '['.date('Y-m-d H:i:s').'] local.ERROR: Some error with stack'.\"\\n\";\n $data .= 'Stack trace:'.\"\\n\";\n $data .= '#0 Some more details goes here';\n \n file_put_contents($filename, $data);\n }", "public function setUp()\n {\n $this->mockLogger = $this->getMock('stubLogger',\n array(),\n array($this->getMock('stubLogEntryFactory'))\n );\n $this->emptyLogEntryFactory = new stubEmptyLogEntryFactory();\n $this->logEntry = $this->emptyLogEntryFactory->create('testTarget', $this->mockLogger);\n }", "public function test_it_can_expose_how_much_time_has_been_logged_in_seconds()\n {\n $timelog = factory(TimeLog::class, 2)->create([\n 'number_of_seconds' => 300,\n 'user_id' => $this->user->id,\n 'project_id' => $this->project->id\n ]);\n // The project should be able to tell us how much time has been logged\n $this->assertSame($this->project->time_logged_seconds, $this->project->timelogs->sum('number_of_seconds'));\n }", "public function testEmit()\n\t{\n\t\t$response = $this->createMock(\\Psr\\Http\\Message\\ResponseInterface::class);\n\n\t\t$middlewareAdaptor = $this->createMock(MiddlewareAdaptorInterface::class);\n\t\t$middlewareAdaptor->method('setResolver');\n\n\t\t$resolveAdaptor = $this->createMock(\\Weave\\Resolve\\ResolveAdaptorInterface::class);\n\t\t$dispatchAdaptor = $this->createMock(\\Weave\\Dispatch\\DispatchAdaptorInterface::class);\n\n\t\t$requestFactory = $this->createMock(\\Weave\\Http\\RequestFactoryInterface::class);\n\t\t$responseFactory = $this->createMock(\\Weave\\Http\\ResponseFactoryInterface::class);\n\t\t$emitter = $this->createMock(\\Weave\\Http\\ResponseEmitterInterface::class);\n\t\t$emitter->expects($this->once())\n\t\t->method('emit')\n\t\t->with(\n\t\t\t$this->equalTo($response)\n\t\t);\n\n\t\t$middleware = new Middleware(\n\t\t\t$middlewareAdaptor,\n\t\t\tfn () => 'pipelineFoo',\n\t\t\t$resolveAdaptor,\n\t\t\t$dispatchAdaptor,\n\t\t\t$requestFactory,\n\t\t\t$responseFactory,\n\t\t\t$emitter\n\t\t);\n\n\t\t$middleware->emit($response);\n\t}", "public function testReportsEventlogGet()\n {\n }", "protected function assertPayload(): void\n {\n }", "protected function assertPayload(): void\n {\n }", "protected function assertPayload(): void\n {\n }", "public function test_addReplenishmentProcessAudit() {\n\n }", "public function testOrgApacheSlingCommonsLogLogManagerFactoryConfig()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/org.apache.sling.commons.log.LogManager.factory.config';\n\n $crawler = $client->request('POST', $path);\n }", "public function setUp()\n {\n parent::setUp();\n\n // SETUP: Testing route\n $this->route = 'test/middleware';\n\n app('router')->get($this->route, function () {\n return 'passed!';\n })->middleware(isNotConfirmed::class);\n }", "public function testComAdobeGraniteLoggingImplLogAnalyserImpl()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.adobe.granite.logging.impl.LogAnalyserImpl';\n\n $crawler = $client->request('POST', $path);\n }", "public function test_admin_access_log_admin()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/AccessLog', 'access_log_admin']);\n $this->assertResponseCode(404);\n }", "public function testAclMiddleware():void\n {\n $generator = Factory::create();\n $em = $this->em();\n $conn = $em->getConnection();\n $conn->beginTransaction();\n try {\n /** Register user via the guest endpoint **/\n $response = $this->json(\n 'POST', '/contexts/guest/users',\n [\n \"params\" => [\n 'email' => $generator->safeEmail,\n 'firstName'=> $generator->firstName,\n 'middleInitial'=>'X',\n 'lastName'=> $generator->lastName,\n 'age' => $generator->randomNumber(2),\n 'gender' => 1,\n 'weight' => 210,\n 'height' => 180.34,\n 'phoneNumber' => \"+1 757-571-2711\",\n 'lifestyle' => 1,\n 'password' => $this->password,\n 'job' => $generator->jobTitle,\n 'address' => $generator->address,\n 'locale' => \"en\"\n ],\n \"options\" => [\n \"email\" => false,\n \"g-recaptcha-response-omit\" => env('GOOGLE_RECAPTCHA_SKIP_CODE') /** skipping recaptcha with a key **/\n ]\n ]\n );\n $userResult = $response->decodeResponseJson();\n $this->assertArrayHasKey('id', $userResult);\n\n /** Making sure user has email verification entry **/\n $emailVerificationRepository = new EmailVerificationRepository();\n $emailVerification = $emailVerificationRepository->findOneBy([\"user\" => $userResult[\"id\"]]);\n $this->assertEquals( $emailVerification->getUser()->getId(), $userResult['id']);\n $this->assertEquals( $emailVerification->getVerified(), false);\n\n /** Email verification endpoint **/\n $response = $this->json(\n 'PUT', \"/contexts/guest/email-verification/\" . $emailVerification->getId(),\n [\n \"params\" => [ \"verified\" => true ],\n \"options\" => [ \"simplifiedParams\" => true ]\n ]\n );\n $response->assertResponseStatus(200);\n\n /** Making sure user has user has role entry of 'user' **/\n $userRepository = new UserRepository();\n /** @var User $user */\n $user = $userRepository->find($userResult[\"id\"]);\n $this->assertEquals( $user->getId(), $userResult['id']);\n $this->assertEquals( $user->getRoles()[0]->getName(), 'user');\n\n /** Login with wrong password **/\n $response = $this->json('POST', '/auth/authenticate', ['email' => $user->getEmail(), 'password' => 'wrong_password']);\n $response->assertResponseStatus(401);\n\n /** Login with right password **/\n $response = $this->json('POST', '/auth/authenticate', ['email' => $user->getEmail(), 'password' => $this->password]);\n $tokenResult = $response->decodeResponseJson();\n $response->assertResponseStatus(200);\n\n /** Free port acl **/\n $response = $this->json('GET', '/auth/me', [], ['HTTP_AUTHORIZATION'=>'Bearer ' . $tokenResult['token']]);\n $result = $response->decodeResponseJson();\n $this->assertEquals($result['email'], $user->getEmail());\n\n $data = [\n \"params\" => [\n \"name\" => $generator->name\n ],\n \"options\" => [\n \"simplifiedParams\" => true\n ]\n ];\n\n /** Posting artist as a quest **/\n $response = $this->json('POST', '/contexts/guest/artists', $data, ['HTTP_AUTHORIZATION'=>'Bearer ' . $tokenResult['token']]);\n $response->assertResponseStatus(405);\n\n /** Posting artist as a user **/\n $response = $this->json('POST', '/contexts/user/artists', $data, ['HTTP_AUTHORIZATION'=>'Bearer ' . $tokenResult['token']]);\n $result = $response->decodeResponseJson();\n $response->assertResponseStatus(500);\n\n /** Posting artist as a admin **/\n $response = $this->json('POST', '/contexts/admin/artists', $data, ['HTTP_AUTHORIZATION'=>'Bearer ' . $tokenResult['token']]);\n $response->assertResponseStatus(403);\n\n /** Posting artist as a super-admin **/\n $response = $this->json('POST', '/contexts/super-admin/artists', $data, ['HTTP_AUTHORIZATION'=>'Bearer ' . $tokenResult['token']]);\n $response->assertResponseStatus(404);\n $conn->rollBack();\n } catch (Exception $e) {\n $conn->rollBack();\n throw $e;\n }\n }", "protected function setupLogger()\n {\n $this->log = new Logger('philip');\n if (isset($this->config['debug']) && $this->config['debug'] == true) {\n $log_path = isset($this->config['log']) ? $this->config['log'] : false;\n\n if (!$log_path) {\n throw new \\Exception(\"If debug is enabled, you must supply a log file location.\");\n }\n\n try {\n $format = \"[%datetime% - %level_name%]: %message%\";\n $handler = new StreamHandler($log_path, Logger::DEBUG);\n $handler->setFormatter(new LineFormatter($format));\n $this->log->pushHandler($handler);\n } catch (\\Exception $e) {\n throw \\Exception(\"Unable to open/read log file.\");\n }\n } else {\n $this->log->pushHandler(new NullHandler());\n }\n }", "public function testInboundDocumentCreateDocument()\n {\n }", "public function testAddReplenishmentAudit()\n {\n }", "public function testInvokeSaveData()\n {\n $request = new ServerRequest([\n 'url' => '/articles',\n 'environment' => ['REQUEST_METHOD' => 'GET'],\n ]);\n $response = new Response([\n 'statusCode' => 200,\n 'type' => 'text/html',\n 'body' => '<html><title>test</title><body><p>some text</p></body>',\n ]);\n\n $handler = $this->handler();\n $handler->expects($this->once())\n ->method('handle')\n ->willReturn($response);\n\n $middleware = new DebugKitMiddleware();\n $response = $middleware->process($request, $handler);\n $this->assertInstanceOf(Response::class, $response, 'Should return the response');\n\n $requests = $this->getTableLocator()->get('DebugKit.Requests');\n $result = $requests->find()\n ->orderBy(['Requests.requested_at' => 'DESC'])\n ->contain('Panels')\n ->first();\n\n $this->assertSame('GET', $result->method);\n $this->assertSame('/articles', $result->url);\n $this->assertNotEmpty($result->requested_at);\n $this->assertNotEmpty('text/html', $result->content_type);\n $this->assertSame(200, $result->status_code);\n $this->assertGreaterThan(1, $result->panels);\n\n $this->assertSame('SqlLog', $result->panels[11]->panel);\n $this->assertSame('DebugKit.sql_log_panel', $result->panels[11]->element);\n $this->assertNotNull($result->panels[11]->summary);\n $this->assertSame('Sql Log', $result->panels[11]->title);\n\n $timeStamp = filectime(Plugin::path('DebugKit') . 'webroot' . DS . 'js' . DS . 'main.js');\n\n $expected = '<html><title>test</title><body><p>some text</p>' .\n '<script id=\"__debug_kit_script\" data-id=\"' . $result->id . '\" ' .\n 'data-url=\"http://localhost/\" type=\"module\" src=\"/debug_kit/js/inject-iframe.js?' . $timeStamp . '\"></script>' .\n '</body>';\n $body = (string)$response->getBody();\n $this->assertTextEquals($expected, $body);\n }", "public function test_handler_report()\n {\n\n $exceptionHandler = m::spy('Illuminate\\Contracts\\Debug\\ExceptionHandler');\n $bluescreen = m::spy('Recca0120\\LaravelTracy\\BlueScreen');\n $exception = new Exception();\n\n /*\n |------------------------------------------------------------\n | Act\n |------------------------------------------------------------\n */\n\n $handler = new Handler($exceptionHandler, $bluescreen);\n $handler->report($exception);\n\n /*\n |------------------------------------------------------------\n | Assert\n |------------------------------------------------------------\n */\n\n $exceptionHandler->shouldHaveReceived('report')->with($exception)->once();\n }", "public function testDefaultTagsAvailable()\n { \n $logger = new Logger('error-log');\n $logger->pushHandler(new SentryMonologHandler());\n\n // Indirectly invoke SentryMonologHandler::write() via user_error()\n user_error('You have 30 seconds to reach minimum safe distance.');\n\n $tagsThatWereSet = $logger->getClient()->getData()['tags'];\n\n $this->assertArrayHasKey('Request-Method', $tagsThatWereSet);\n $this->assertArrayHasKey('Request-Type', $tagsThatWereSet);\n $this->assertArrayHasKey('SAPI', $tagsThatWereSet);\n $this->assertArrayHasKey('SS-Version', $tagsThatWereSet);\n }", "protected function createLogFile() {}", "public function testImportingLoggerFailure() {\n\t\tCakeLog::config('fail', array());\n\t}", "public function testCreate()\n\t{\n\t\t$this->dispatchWithExpectedException(\"/comment/create\", 'Bootstrap_Service_Exception_Authorization');\n\t}", "public function test_addOrderLineActivityAudit() {\n\n }", "protected function setUp()\n {\n $logger = new Logger('log');\n $logger->pushHandler(new StreamHandler(__DIR__ . '/../artifacts/main.log'));\n\n $this->httpClient = new Client(\n 'secret key',\n $logger\n );\n }", "public function forDebugLog()\n {\n $this->router->group([], function ($router) {\n $router->post('{version}/log', [\n 'uses' => 'LogController@store',\n ]);\n });\n }", "private function assertValidMiddlewares() : void\n {\n if ([] === $this->middlewares) {\n return;\n }\n\n foreach ($this->middlewares as $value) {\n InvalidDescriptorArgumentException::assertIsSubclassOf(\n $value,\n MiddlewareInterface::class,\n '#[Route.middlewares] must contain the class names of existing middlewares.'\n );\n }\n }", "public function test_middleware_settings()\n {\n $this->withoutExceptionHandling();\n $user_id = 1;\n $user_data = [\n 'id' => 1\n ];\n $user = factory(User::class)->create($user_data);\n\n $settings_data = [\n 'user_id' => $user_id,\n 'option_key' => 'language',\n 'option_value' => 'it'\n ];\n\n factory(SettingsUserRepository::class)->create($settings_data);\n\n $response = $this->actingAs($user)->get(Route('dashboard'));\n $response->assertViewIs('v200.pages.dashboard');\n $response->assertViewHas('user_settings');\n $language = \\App::getLocale();\n $this->assertTrue($language === 'it');\n }", "function app_log(): Logger\n{\n return app(\"app_logger\");\n}", "public function test_addCustomerAudit() {\n\n }" ]
[ "0.64303166", "0.62236476", "0.6179338", "0.6123543", "0.6102211", "0.6064592", "0.60590047", "0.5807065", "0.5782111", "0.57602566", "0.57544774", "0.57536954", "0.5702917", "0.5694712", "0.5658459", "0.56430435", "0.56424373", "0.56367004", "0.5616396", "0.5614831", "0.56008583", "0.55910313", "0.5589259", "0.5568631", "0.5543399", "0.55409455", "0.5524451", "0.55209154", "0.5517614", "0.5510592", "0.55063045", "0.55004424", "0.5473459", "0.5466048", "0.54613626", "0.5454476", "0.5439275", "0.543724", "0.5430836", "0.54272896", "0.5415987", "0.53919494", "0.53747886", "0.5370286", "0.5359086", "0.53585696", "0.5347591", "0.5341569", "0.5331894", "0.53291", "0.5324728", "0.5323915", "0.5298761", "0.52964026", "0.5289217", "0.52601105", "0.52575886", "0.52544266", "0.52537644", "0.5251554", "0.52491397", "0.5230019", "0.5220829", "0.5201006", "0.51984084", "0.51871914", "0.51649135", "0.51633215", "0.5162908", "0.5154179", "0.51522785", "0.5131681", "0.51300836", "0.5106683", "0.51039684", "0.5102355", "0.5102355", "0.5102355", "0.5095507", "0.50937414", "0.5088301", "0.5087577", "0.5078589", "0.5077503", "0.5074696", "0.5066663", "0.5058933", "0.50574005", "0.50376594", "0.50308603", "0.5020265", "0.5016744", "0.49989116", "0.4998788", "0.49987268", "0.4986865", "0.49798667", "0.49483454", "0.49399287", "0.49379364" ]
0.78026134
0
Module Functions Do Data Input Validate
function do_input_validation($_GPV) { # Initialize array $err_entry = array("flag" => 0); # Check modes and data as required IF ($_GPV['mode'] == 'contact') { # Check required fields (err / action generated later in cade as required) IF (!$_GPV['mc_id']) {$err_entry['flag'] = 1; $err_entry['mc_id'] = 1;} IF (!$_GPV['mc_name']) {$err_entry['flag'] = 1; $err_entry['mc_name'] = 1;} IF (!$_GPV['mc_email']) {$err_entry['flag'] = 1; $err_entry['mc_email'] = 1;} IF (!$_GPV['mc_subj']) {$err_entry['flag'] = 1; $err_entry['mc_subj'] = 1;} IF (!$_GPV['mc_msg']) {$err_entry['flag'] = 1; $err_entry['mc_msg'] = 1;} # Validate Email Address IF (do_validate_email($_GPV['mc_email'], 0)) { $err_entry['flag'] = 1; $err_entry['mc_email'] = 1; $err_entry['err_email_invalid'] = 1; } # Validate the captcha if "GD" is loaded IF (extension_loaded('gd') && file_exists(PKG_PATH_ADDONS.'captcha')) { IF ($_SESSION['security_code'] != $_GPV['security_code'] || empty($_SESSION['security_code'])) { $err_entry['flag'] = 1; $err_entry['sec_code'] = 1; unset($_SESSION['security_code']); } } } IF ($_GPV['mode'] == 'client') { # Check required fields (err / action generated later in cade as required) IF (!$_GPV['cc_cl_id']) {$err_entry['flag'] = 1; $err_entry['cc_cl_id'] = 1;} IF (!$_GPV['cc_mc_id']) {$err_entry['flag'] = 1; $err_entry['cc_mc_id'] = 1;} IF (!$_GPV['cc_subj']) {$err_entry['flag'] = 1; $err_entry['cc_subj'] = 1;} IF (!$_GPV['cc_msg']) {$err_entry['flag'] = 1; $err_entry['cc_msg'] = 1;} } # Return results return $err_entry; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function validateData();", "abstract public function validateData($data);", "abstract protected function validate($data);", "private function validateInputParameters($data)\n {\n }", "abstract public function validate();", "abstract public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validateData($data): void;", "public function validation();", "public abstract function validation();", "private function validate_input() {\n\t\t$fields = array_merge( array( $this->range_field ), $this->key_fields, $this->checksum_fields );\n\n\t\t$this->validate_fields( $fields );\n\t\t$this->validate_fields_against_table( $fields );\n\t}", "public static function validate() {}", "function ValidateData()\n\t\t{\n\t\t\t$theValidator = new CValidator();\n\t\t\tif(!$this->arrValidator || !is_array($this->arrValidator) )\n\t\t\t{\n\t\t\t\t$this->arrValidator = array();\n\t\t\t}\n\t\t\tforeach($this->arrValidator as $key=>$value)\n\t\t\t{\n\t\t\t\tif($this->$key == '')\n\t\t\t\t{\n\t\t\t\t\t// Kiem tra xem co phai bat buoc khong?\n\t\t\t\t\tif(isset($this->arrRequired[$key]) && ($this->arrRequired[$key] == 1))\n\t\t\t\t\t{\n\t\t\t\t\t\treturn(false);\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\tif(!$theValidator->CheckPatt($value, $this->$key))\n\t\t\t\t\t{\n\t\t\t\t\t\treturn(false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn(true);\n\t\t}", "public function validate($input);", "function isDataValid() \n {\n return true;\n }", "protected function _validate() {\n\t}", "function validate(array $data)\n\t{\n\t}", "function validateInput()\r\n\t{\r\n\t\tif(preg_match('/^[a-zA-Z ]*$/', $this->name) != 1)\r\n\t\t{\r\n\t\t\t$this->err = true;\r\n\t\t\t$this->errMsgBeg .= \"-> Error in name $this->name. Only alphabets allowed.<br>\";\r\n\t\t}\r\n\r\n\t\tif(preg_match('/^[a-zA-Z ]*$/', $this->desg) != 1)\r\n\t\t{\r\n\t\t\t$this->err = true;\r\n\t\t\t$this->errMsgBeg .= \"-> Error in designation $this->desg. Only alphabets allowed.<br>\";\r\n\t\t}\r\n\r\n\t\tif(empty($this->addr))\r\n\t\t{\r\n\t\t\t$this->err = true;\r\n\t\t\t$this->errMsgBeg .= \"-> Error in address entered. Please fill correct address field as per gender: Office address for Male user, and Residential address for Female user.<br>\";\t\r\n\t\t}\r\n\r\n\t\tforeach($this->emails as $ele)\r\n\t\t{\r\n\t\t\tif(!filter_var($ele, FILTER_VALIDATE_EMAIL))\r\n\t\t\t{\r\n\t\t\t\t$this->err = true;\r\n\t\t\t\t$this->errMsgBeg .= \"-> Invalid email-id $ele. Enter correctly.<br>\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public function checkData() {\n\t\t// e.g. numbers must only have digits, e-mail addresses must have a \"@\" and a \".\".\n\t\treturn $this->control->checkPOST($this);\n\t}", "public function checkData() {\n\t\t// e.g. numbers must only have digits, e-mail addresses must have a \"@\" and a \".\".\n\t\treturn $this->control->checkPOST($this);\n\t}", "public function validateData(){\n return true;\n }", "private function checkData(){\n $this->datavalidator->addValidation('article_title','req',$this->text('e10'));\n $this->datavalidator->addValidation('article_title','maxlen=250',$this->text('e11'));\n $this->datavalidator->addValidation('article_prologue','req',$this->text('e12'));\n $this->datavalidator->addValidation('article_prologue','maxlen=3000',$this->text('e13'));\n $this->datavalidator->addValidation('keywords','regexp=/^[^,\\s]{3,}(,? ?[^,\\s]{3,})*$/',$this->text('e32'));\n $this->datavalidator->addValidation('keywords','maxlen=500',$this->text('e33'));\n if($this->data['layout'] != 'g' && $this->data['layout'] != 'h'){ //if article is gallery dont need content\n $this->datavalidator->addValidation('article_content','req',$this->text('e14'));\n }\n $this->datavalidator->addValidation('id_menucategory','req',$this->text('e15'));\n $this->datavalidator->addValidation('id_menucategory','numeric',$this->text('e16'));\n $this->datavalidator->addValidation('layout','req',$this->text('e17'));\n $this->datavalidator->addValidation('layout','maxlen=1',$this->text('e18'));\n if($this->languager->getLangsCount() > 1){\n $this->datavalidator->addValidation('lang','req',$this->text('e19'));\n $this->datavalidator->addValidation('lang','numeric',$this->text('e20'));\n }\n //if user cannot publish articles check publish values\n if($_SESSION[PAGE_SESSIONID]['privileges']['articles'][2] == '1') {\n $this->datavalidator->addValidation('published','req',$this->text('e21'));\n $this->datavalidator->addValidation('published','numeric',$this->text('e22'));\n $this->datavalidator->addValidation('publish_date','req',$this->text('e23'));\n }\n $this->datavalidator->addValidation('topped','req',$this->text('e24'));\n $this->datavalidator->addValidation('topped','numeric',$this->text('e25'));\n $this->datavalidator->addValidation('homepage','req',$this->text('e30'));\n $this->datavalidator->addValidation('homepage','numeric',$this->text('e31'));\n $this->datavalidator->addValidation('showsocials','req',$this->text('e26'));\n $this->datavalidator->addValidation('showsocials','numeric',$this->text('e27'));\n \n $result = $this->datavalidator->ValidateData($this->data);\n if(!$result){\n $errors = $this->datavalidator->GetErrors();\n return array('state'=>'error','data'=> reset($errors));\n }else{\n return true;\n }\n }", "abstract public function runValidation();", "abstract public function isValid($data);", "public function validate(array $data);", "public function validate(array $data);", "function validateData($request) {\n\tglobal $amessages;\n\tinclude_once(ROOT_PATH.'classes/data/validate.class.php');\n\t$error = array();\n\t$validate = new Validate();\n\t$error['INPUT']['module'] = $validate->validString($request->element('module'),$amessages['object']);\t\n\t$error['INPUT']['name'] = $validate->validString($request->element('name'),$amessages['name']);\n\t$error['INPUT']['title'] = $validate->validString($request->element('title'),$amessages['title']);\n\t$error['INPUT']['class'] = $validate->pasteString($request->element('class'));\n\t$error['INPUT']['type'] = $validate->validNumber($request->element('type'),$amessages['custom_field_type']);\n\t$error['INPUT']['value'] = $validate->pasteString($request->element('value'));\n\tif($request->element('type')>3) $error['INPUT']['value'] = $validate->validString($request->element('value'),$amessages['custom_field_value']);\n\t$error['INPUT']['position'] = $validate->pasteString($request->element('position'));\n\t$error['INPUT']['status'] = $validate->pasteString($request->element('status'));\n\t\n\tif($error['INPUT']['module']['error'] || $error['INPUT']['name']['error'] || $error['INPUT']['title']['error'] || $error['INPUT']['type']['error'] || $error['INPUT']['value']['error']) {\n\t\t$error['invalid'] = 1;\n\t\treturn $error;\n\t}\n\t$error['invalid'] = 0;\n\treturn $error;\n}", "public function validated();", "public function validate($configData);", "function validate()\n\t{\n\t}", "abstract function validator();", "public function validate($data, $param);", "protected function validate()\n {\n }", "public function validate() {\r\n // Name - this is required\r\n if ($this->description == '') {\r\n $this->errors[] = 'Description is required';\r\n } \r\n \r\n // Category number - must be a number\r\n if (!is_numeric($this->category)) {\r\n $this->category = 0;\r\n } \r\n \r\n // Item number - must be a number\r\n if (!is_numeric($this->item)) {\r\n $this->item = 0;\r\n } \r\n }", "public function isDataValid() {\n if ($this->userExists())\n $this->_errors[] = 'username already taken';\n // username and password must match pattern\n else if (empty($this->_username) || !preg_match('/^[a-zA-Z0-9]{5,16}$/', $this->_username))\n $this->_errors[] = 'invalid username must be between 5 and 16 characters';\n else if (empty($this->_password) || !preg_match('/^[a-zA-Z0-9]{6,18}$/', $this->_password))\n $this->_errors[] = 'invalid password must be between 6 and 18 characters';\n\t\t else if (empty($this->_password) || $this->_password != $this->_password_confirm)\n $this->_errors[] = \"Password didn't match X\";\n // names must be between 2 and 22 characters\n else if (empty($this->_first_name) || !preg_match('/^[a-zA-Z0-9]{2,22}$/', $this->_first_name))\n $this->_errors[] = 'invalid first name must be between 2 and 22 characters';\n else if (empty($this->_last_name) || !preg_match('/^[a-zA-Z0-9]{2,22}$/', $this->_last_name))\n $this->_errors[] = 'invalid last name must be between 2 and 22 characters';\n //restricts day to 01-31, month to 01-12 and year to 1900-2099 (also allowing / - or . between the parts of the date) \n else if (empty($this->_dob) || !preg_match('/^(0?[1-9]|[12][0-9]|3[01])[\\/\\ ](0?[1-9]|1[0-2])[\\/\\ ](19|20)\\d{2}$/', $this->_dob))\n $this->_errors[] = 'invalid dod | must be DD/MM/YYYY format';\n else if (empty($this->_address))\n $this->_errors[] = 'invalid address';\n // checks if valid postal code\n else if (empty($this->_postcode) || !preg_match('/^(([A-PR-UW-Z]{1}[A-IK-Y]?)([0-9]?[A-HJKS-UW]?[ABEHMNPRVWXY]?|[0-9]?[0-9]?))\\s?([0-9]{1}[ABD-HJLNP-UW-Z]{2})$/', $this->_postcode))\n $this->_errors[] = 'invalid postcode | must be AA11 9AA format';\n // checks is valid email using regular expression\n else if (empty($this->_email) || !preg_match('/^[_\\.0-9a-zA-Z-]+@([0-9a-zA-Z][0-9a-zA-Z-]+\\.)+[a-zA-Z]{2,6}$/', $this->_email))\n $this->_errors[] = 'invalid email';\n\n\n // return true or false \n return count($this->_errors) ? 0 : 1;\n }", "protected function validate_data_fields(){\n\t\tif(empty($this->RESPONSE)){throw new Exception(\"Response field not found\", 5);}\n\t\t\n\t\t// The remote IP address is also required\n\t\tif($this->validate_ip($this->REMOTE_ADDRESS)){throw new Exception(\"Renote IP address not set correctly\", 6);}\n\t}", "private function proccess()\n {\n foreach ($this->validate as $name => $value) {\n $rules = $this->rules[$name];\n \n /* Let's see is this value a required, e.g not empty */\n if (preg_match('~req~', $rules)) {\n if ($this->isEmpty($value)) {\n $this->errors[] = $this->filterName($name) . ' can\\'t be empty, please enter required data.';\n continue; // We will display only one error per input\n }\n }\n \n /**\n * Let's see is this value needs to be integer\n */\n if (preg_match('~int~', $rules)) {\n if (!$this->isInt($value)) {\n $this->errors[] = $this->filterName($name) . ' is not number, please enter number.';\n continue; // We will display only one error per input\n }\n }\n \n /**\n * Let's see is this value needs to be text\n */\n if (preg_match('~text~', $rules)) {\n if (!$this->isText($value)) {\n $this->errors[] = $this->filterName($name) . ' is not text, please enter only letters.';\n continue; // We will display only one error per input\n }\n }\n \n /* This is good input */\n $this->data[$name] = $value;\n }\n }", "abstract public function valid();", "public function isValid($data);", "abstract protected function fieldValidation($submittedData);", "public function validate_fields() {\n \n\t\t\n \n\t\t}", "public function Valid();", "public function isDataValid(): bool;", "public function doValidate(){\n if (!is_array($this->getValidates())){\n throw new \\Exception(\"dose this function must call setValidate() function first.\");\n }\n\n foreach($this->getValidates() as $k => $v){\n //$v = (ValidateData)$v;\n if (TextUtils::isEmpty($v->getInput()) && $v->getRequire() == true){\n $v->setResult(false);\n }else{\n $v->setResult(true);\n }\n\n if ($v->getResult() && !TextUtils::isEmpty($v->getInput())){\n switch($v->getValidator()){\n case ValidateData::VALIDATOR_CUSTOM:\n $v->setResult($this->check($v->getInput(),$v->getRegexp()));\n break;\n case ValidateData::VALIDATOR_COMPARE:\n $result = false;\n if (!TextUtils::isEmpty($v->getOperator())){\n switch ($v->getOperator()){\n case ValidateData::OPERATOR_EQUIVALENT:\n $result = $v->getInput() == $v->getTo();\n break;\n case ValidateData::OPERATOR_GREATER:\n $result = $v->getInput() > $v->getTo();\n break;\n case ValidateData::OPERATOR_LESS:\n $result = $v->getInput() < $v->getTo();\n break;\n case ValidateData::OPERATOR_EQUIVALENT_GREATER:\n $result = $v->getInput() >= $v->getTo();\n break;\n case ValidateData::OPERATOR_EQUIVALENT_LESS:\n $result = $v->getInput() <= $v->getTo();\n break;\n case ValidateData::OPERATOR_NOT_EQUIVALENT:\n $result = $v->getInput() != $v->getTo();\n break;\n }\n\n }\n $v->setResult($result);\n break;\n case ValidateData::VALIDATOR_LENGTH:\n $len = mb_strlen($v->getInput(),'UTF-8');\n $v->setResult($len >= $v->getMin());\n if ($v->getMax() > $v->getMin()){\n $v->setResult($len <= $v->getMax() && $len >= $v->getMin());\n }\n\n break;\n\n case ValidateData::VALIDATOR_RANGE:\n $v->setResult((int)$v->getInput() >= $v->getMin());\n if ($v->getMax() > $v->getMin()){\n $v->setResult((int)$v->getInput() <= $v->getMax() && (int)$v->getInput() >= $v->getMin());\n }\n\n break;\n default:\n $v->setResult($this->check($v->getInput(),$this->getValidator($v->getValidator())));\n break;\n }\n }\n }\n return $this->getError();\n }", "abstract function validate(): void;", "public function validate()\n {\n $validator = Validator::make($this->data, $this->fieldValidationArray());\n if ($validator->fails()) {\n throw $this->validationException(join(\", \", $validator->errors()->all()));\n }\n\n /* if there's a script, check that the script will return the right type .*/\n if (isset($this->data[\"script\"])) {\n if ($this->recordType == null) {\n throw $this->validationException(\"Script can't be tested because the field doesn't belong to a record type.\");\n }\n try {\n $script = $this->getScript($this->recordType);\n if ($script->type() != $this->data[\"type\"]) {\n throw $this->validationException(\"Script should return a '\" . $this->data[\"type\"] . \"' but returned a \" . $script->type());\n }\n } catch (ScriptException $e) {\n throw $this->validationException(\"Script has a problem: \" . $e->getMessage());\n }\n }\n }", "function validateData($array){\n\t\t$errorFlag=true;\n\t\t$currentDate = getdate(); //get current date\n\t\tif (trim($array['FName'])==''){\n\t\t\t$this->appendErrorMsg(\"First Name is required\");\n\t\t\t$errorFlag = false;\n\t\t}\n\t\tif (trim($array['LName'])==''){\n\t\t\t$this->appendErrorMsg(\"Last Name is required\");\n\t\t\t$errorFlag = false;\n\t\t}\n\t\tif (trim($array['License_No'])==''){\n\t\t\t$this->appendErrorMsg(\"License number is required\");\n\t\t\t$errorFlag = false;\n\t\t}\n\t\tif (trim($array['Birthdate'])==''){\n\t\t\t$this->appendErrorMsg(\"Birthdate cannot be blank\");\n\t\t\t$errorFlag = false;\n\t\t} else if (!preg_match(\"/^[0-9]{4,4}[-][0-1]{1,2}?[0-9]{1,2}[-][0-3]{1,2}?[0-9]{1,2}$/\", $array['Birthdate'])){\n\t\t\t$this->appendErrorMsg(\"Date should be in the format yyyy-mm-dd\");\n\t\t\t$errorFlag = false;\n\t\t} else if (getAge($array['Birthdate'])<16 || getAge($array['Birthdate'])> 100){\n\t\t\t$this->appendErrorMsg(\"Sorry, we do not provide coverage to drivers under the age of 16 or over the age of 100\");\n\t\t\t$errorFlag = false;\n\t\t}\n\t\tif (trim($array['PostalCode'])==''){\n\t\t\t$this->appendErrorMsg(\"Postal Code is required\");\n\t\t\t$errorFlag = false;\n\t\t} else if (!preg_match(\"/^[A-Za-z]{1}\\d{1}[A-Za-z]{1}\\d{1}[A-Za-z]{1}\\d{1}$/\",$array['PostalCode'])){\n\t\t\t$this->appendErrorMsg(\"Postal Code should be in the format A1B2C3\");\n\t\t\t$errorFlag = false;\n\t\t}\n\t\tif (trim($array['Phone'])==''){\n\t\t\t$this->appendErrorMsg(\"Phone number is required\");\n\t\t\t$errorFlag = false;\n\t\t} else if (!preg_match(\"/^[0-9]{10}$/\",$array['Phone'])){\n\t\t\t$this->appendErrorMsg(\"Phone number must be in the format xxx-xxx-xxxx or xxxxxxxxx\");\n\t\t\t$errorFlag = false;\n\t\t}\n\t\tif (!preg_match(\"/^[0-9]{1,}$/\", $array['Years_Exp'])){\n\t\t\t$this->appendErrorMsg(\"Please input the number of Years of Experience\");\n\t\t\t$errorFlag = false;\n\t\t}\n\t\treturn $errorFlag;\n\t}", "function validateInputs(){\n\tglobal $nric,$firstName,$lastName,$dob,$address1,$address2,$poCode,\n$homeNum,$handphoneNum,$email,$description;\n\tglobal $faID;\n\tif(!matchRegex($nric,'/^[a-zA-Z0-9]*$/')) { return false; }\n\tif(!matchRegex($firstName,'/^[a-zA-Z0-9 ]*$/')) { return false; }\n\tif(!matchRegex($lastName,'/^[a-zA-Z0-9 ]*$/')) { return false; }\n\tif(!matchRegex($dob,'/^[0-9-]*$/')) { return false; }\n\tif(!matchRegex($address1,'/^[a-zA-Z0-9 -_.,#]*$/')) { return false; }\n\tif(!matchRegex($address2,'/^[a-zA-Z0-9 -_.,#]*$/')) { return false; }\n\tif(!matchRegex($poCode,'/^[0-9]*$/')) { return false; }\n\tif(!matchRegex($homeNum,'/^[0-9]*$/')) { return false; }\n\tif(!matchRegex($handphoneNum,'/^[0-9]*$/')) { return false; }\n\tif(!matchRegex($email,'/^[a-zA-Z0-9@._-]*$/')) { return false; }\n\tif(!matchRegex($description,'/^[a-zA-Z0-9 -_.,#]*$/')) { return false; }\n\t\n\treturn true;\n}", "public function validate_fields() {\n \n\t\t//...\n \n }", "abstract function check_data($formdata);", "protected function performValidation()\n {\n // no required arguments\n }", "public function validate($data): array;", "function validate_visit_data($visit_data ) {\n\textract($visit_data);\n\t$err = array();\n\n\t// name: min 2 chars length\n\tif (empty($name )) {\n\t\t$err[] = 'Name is required.';\n\t}\telse if (mb_strlen($name ) < 1 ) {\n\t\t$err[] = 'Name must be at least 1 character long.';\n\t}\n\t\n\t// start_date: valid date. either integer timestamp (unix time in \n\t// milliseconds) or parseable date string.\n\tif (!isset($start_date )) {\n\t\t$err[] = 'Start date is required.';\n\t} else if (!is_numeric($start_date )) {\n\t\t$start_date = strtotime($start_date);\n\t\tif ($start_date === false ) {\n\t\t\t$err[] = \"Start date must be parseable by strtotime().\";\n\t\t}\n\t} else {\n\t\t$start_date /= 1000;\n\t}\n\n\t// end_date: valid date. either integer timestamp (unix time in\n\t// milliseconds) or parseable date string.\n\tif (!isset($end_date )) {\n\t\t$err[] = 'End date is required';\n\t} else if (!is_numeric($end_date )) {\n\t\t$end_date = strtotime($end_date);\n\t\tif ($end_date === false ) {\n\t\t\t$err[] = \"End date must be parseable by strtotime().\";\n\t\t}\n\t} else {\n\t\t$end_date /= 1000;\n\t}\n\n\t// sanity check: start date is BEFORE end date!\n\tif ($start_date && $end_date && ($end_date < $start_date)) {\n\t\t$err[] = 'End date must be >= start date';\n\t}\n\n\t// receivers: comma-separated list of axis usernames\n\tif (empty($receivers )) {\n\t\t$err[] = 'Receivers is required.';\n\t} else {\n\t\t$db = db_connect();\n\n\t\t$rs = $receivers;\n\t\tif (!is_array($receivers )) {\n\t\t\t$rs = explode(',', $receivers);\n\t\t}\n\n\t\t$receivers = array();\n\t\tforeach ($rs as $r ) {\n\t\t\t$r = trim($r);\n\n\t\t\t$sql = sprintf(\"SELECT * FROM info \".\n\t\t\t\t\"WHERE uname='%s' LIMIT 1\",\n\t\t\t\t$db->real_escape_string($r ));\n\n\t\t\tif ($result = $db->query($sql )) {\n\t\t\t\t$rec = $result->fetch_assoc();\n\t\t\t\tif (!$rec ) {\n\t\t\t\t\t$err[] = \"Receiver username \".\n\t\t\t\t\t\t\"not found: $r\";\n\t\t\t\t} else {\n\t\t\t\t\t$receivers[] = $rec;\n\t\t\t\t}\n\t\t\t\t$result->free();\n\t\t\t} else {\n\t\t\t\t$err[] = \"Internal error\";\n\t\t\t}\n\t\t}\n\t}\n\n\tif (empty($picture )) {\n\t\t$err[] = 'Picture is required.';\n\t}\n\t\n\tif ($err ) {\n\t\tthrow new Http_error(400, implode(\"\\n\", $err ));\n\t}\n\n\treturn array(\n\t\t'name' => $name,\n\t\t// company is not required\n\t\t'company' => @$_POST['company'],\n\t\t'parking' => $parking,\n\t\t'start_date' => $start_date,\n\t\t'end_date' => $end_date,\n\t\t'receivers' => $receivers,\n\t\t'picture' => $picture,\n\t);\n}", "private function _validData($data){\n\t\t$columnsLen = array(\n\t\t\t\t\t\t\t'nro_pedido' => 6,\n\t\t\t\t\t\t\t'id_factura_pagos' => 1,\n\t\t\t\t\t\t\t'valor' => 1,\n\t\t\t\t\t\t\t'concepto' => 1,\n\t\t\t\t\t\t\t'fecha_inicio' => 0,\n\t\t\t\t\t\t\t'fecha_fin' => 0,\n\t\t\t\t\t\t\t'id_user' => 1\n\t\t);\n\t\treturn $this->_checkColumnsData($columnsLen, $data);\n\t}", "public function validate($data): bool;", "public function validate($data): bool;", "public final function verifyData($key){\n\n unset($this->errors[$key]);\n\n if(!array_key_exists($key,$this->data)){\n\n if(!array_key_exists($key,$this->definition)){\n throw new \\Disco\\exceptions\\Exception(\"Field `{$key}` is not defined by this data model\");\n }//if\n\n //DEFAULT\n if(array_key_exists('default',$this->definition[$key])){\n $this->data[$key] = $this->definition[$key]['default'];\n }//if\n //REQUIRED\n else if($this->getDefinitionValue($key,'required')){\n return $this->setError($key,\"`{$key}` is required\");\n }//elif\n else {\n return false;\n }//el\n\n }//if\n\n //PREMASSAGE\n if(($massage = $this->getDefinitionValue($key,'premassage')) !== false){\n $this->data[$key] = $this->{$massage}($this->data[$key]);\n }//if\n\n $value = $this->data[$key];\n\n //REGEXP\n if(($regexp = $this->getDefinitionValue($key,'regexp')) !== false){\n if(($default = \\App::getCondition($regexp)) !== false && !\\App::matchCondition($default,$value)){\n return $this->setError($key);\n }//if\n if(!preg_match(\"/{$regexp}/\",$value)){\n return $this->setError($key);\n }//if\n $this->_postMassage($key,$value);\n return true;\n }//if\n\n //METHOD\n if(($method = $this->getDefinitionValue($key,'method')) !== false){\n if(!$this->{$method}($value)){\n return $this->setError($key);\n }//if\n $this->_postMassage($key,$value);\n return true;\n }//if\n\n //NULLABLE\n if($this->getDefinitionValue($key,'nullable') && $value === null){\n $this->_postMassage($key,$value);\n return true;\n }//if\n\n $type = $this->getDefinitionValue($key,'type');\n\n //TRUTHY\n if($type != 'boolean' && $this->getDefinitionValue($key,'truthy') && is_bool($value)){\n $this->_postMassage($key,$value);\n return true;\n }//if\n\n switch($type){\n\n case 'int':\n\n if(!$this->_isValidInt($key,$value)){\n return false;\n }//if\n\n break;\n\n case 'uint':\n\n if(!$this->_isValidInt($key,$value)){\n return false;\n }//if\n\n if($value < 0){\n return $this->setError($key,\"`{$key}` must be a positive integer\");\n }//if\n\n break;\n\n case 'float':\n\n if(!$this->_isValidFloat($key,$value)){\n return false;\n }//if\n\n break;\n\n case 'ufloat':\n\n if(!$this->_isValidFloat($key,$value)){\n return false;\n }//if\n\n if($value < 0){\n return $this->setError($key,\"`{$key}` must be a positive number\");\n }//if\n\n break;\n\n case 'string':\n\n if(!is_string($value)){\n return $this->setError($key,\"`{$key}` must be a string\");\n }//if\n\n if(($min = $this->getDefinitionValue($key,'minlen')) !== false && strlen($value) < $min){\n return $this->setError($key,\"`{$key}` must be greater than {$min} characters long\");\n }//if\n\n if(($max = $this->getDefinitionValue($key,'maxlen')) !== false && strlen($value) > $max){\n return $this->setError($key,\"`{$key}` must be less than {$max} characters long\");\n }//if\n\n break;\n\n case 'char':\n\n if(!is_string($value) || strlen($value) != 1){\n return $this->setError($key,\"`{$key}` must be a single character\");\n }//if\n\n break;\n\n case 'boolean': \n\n if(!is_bool($value)){\n return $this->setError($key,\"`{$key}` must be a boolean value\");\n }//if\n\n break;\n\n case 'array':\n\n if(!is_array($value)){\n return $this->setError($key,\"`{$key}` must be an array\");\n }//if\n\n break;\n\n case 'object':\n\n if(is_object($value)){\n if(($instanceof = $this->getDefinitionValue($key,'instanceof')) !== false && !$value instanceof $instanceof){\n return $this->setError($key,\"`{$key}` must be an instance of `{$instanceof}`\");\n }//if\n } //if\n else {\n return $this->setError($key,\"`{$key}` must be an object\");\n }//if\n\n break;\n\n case 'closure':\n\n if(!is_object($value) || !$value instanceof \\Closure){\n return $this->setError($key,\"`{$key}` must be a closure\");\n }//if \n\n break;\n\n default:\n return $this->setError($key);\n\n }//switch\n\n //IN\n if(($in = $this->getDefinitionValue($key,'in')) !== false && !in_array($value,$in)){\n $in = implode(', ',$in);\n return $this->setError($key,\"`{$key}` must be a value of `{$in}`\");\n }//if\n\n //NOTIN\n if(($in = $this->getDefinitionValue($key,'notin')) !== false && in_array($value,$in)){\n $in = implode(', ',$in);\n return $this->setError($key,\"`{$key}` must not be a value of `{$in}`\");\n }//if\n\n $this->_postMassage($key,$value);\n\n }", "public function validate() {\n }", "public function validate() {\n }", "function readInputData() {\n\t\t$this->readUserVars(array('enableUploadCode', 'uploadCode', 'thesisOrder', 'thesisName', 'thesisEmail', 'thesisPhone', 'thesisFax', 'thesisMailingAddress', 'thesisIntroduction'));\n\n\t\tif (!empty($this->_data['enableUploadCode'])) {\n\t\t\t$this->addCheck(new FormValidator($this, 'uploadCode', 'required', 'plugins.generic.thesis.settings.uploadCodeRequired'));\n\t\t}\n\t}", "public function validate()\n {\n }", "public function validate()\n {\n }", "private function validateData()\n {\n if (empty($this->nome)) {\n $this->errors->addMessage(\"O nome é obrigatório\");\n }\n\n if (!filter_var($this->email, FILTER_VALIDATE_EMAIL)) {\n $this->errors->addMessage(\"O e-mail é inválido\");\n }\n\n if (strlen($this->senha) < 6) {\n $this->errors->addMessage(\"A senha deve ter no minímo 6 caracteres!\");\n }\n if ($this->emailExiste($this->email, 'email')) {\n $this->errors->addMessage(\"Esse e-mail já está cadastrado\");\n }\n if ($this->emailExiste($this->usuario, 'usuario')) {\n $this->errors->addMessage(\"Esse usuário já está cadastrado\");\n }\n\n return $this->errors->hasError();\n }", "public function valid();", "public function valid();", "public function valid();", "public function valid();", "abstract protected function validate(): bool;", "private function validateData() {\r\n\r\n $requiredFields = array(\"v_code\" => \"Verification code not supplied\",\r\n \"psw1\" => \"Password field is empty\",\r\n \"psw2\" => \"Password field is empty\",);\r\n\r\n\r\n //0 means there is no error\r\n $error_status = \\VAL_NO_ERROR;\r\n\r\n /*\r\n Initialize error object that will be returned by this function\r\n */\r\n $error_obj = new stdClass();\r\n $error_obj->msg = \"\";\r\n $error_obj->field = \"\";\r\n $error_obj->code = 0;\r\n $error_obj->type = \\VAL_NO_ERROR;\r\n\r\n //check if required variables are defined\r\n foreach ($requiredFields as $key => $value) {\r\n $value = $this->request->request->get($key);\r\n if (empty( $value )) {\r\n $error_obj->field = $key;\r\n $error_obj->msg = $requiredFields[$key];\r\n $error_obj->type = \\VAL_FIELD_ERROR;\r\n\r\n //return after each field that is found wrong\r\n return $error_obj;\r\n }\r\n }\r\n\r\n $pass_1 = $this->request->request->get('psw1');\r\n $pass_2 = $this->request->request->get('psw2');\r\n\r\n //Check if emails match\r\n if (strcmp($pass_1, $pass_2) != 0) {\r\n $error_obj->field = \"psw2\";\r\n $error_obj->msg = \"Passwords are different\";\r\n $error_obj->type = \\VAL_FIELD_ERROR;\r\n\r\n return $error_obj;\r\n }\r\n\r\n /*\r\n Only check one password. If both passwords are thesame, we only need to check one of them.\r\n */\r\n if (!preg_match('/^(?=.*\\d)(?=.*[a-z])(?=.*[A-Z]).{6,}$/', $pass_1)) {\r\n $error_obj->field = \"psw1\";\r\n $error_obj->msg = \"Password must have a digit, lower and upper case charters. Min lenght is 6\";\r\n $error_obj->type = \\VAL_FIELD_ERROR;\r\n\r\n return $error_obj;\r\n }\r\n\r\n return $error_obj;\r\n }", "abstract public function validate(array $data, array $fields);", "function cp_do_input_validation($_adata) {\n\t# Initialize array\n\t\t$err_entry = array(\"flag\" => 0);\n\n\t# Check modes and data as required\n\t\tIF ($_adata['op'] == 'edit' || $_adata['op'] == 'add') {\n\t\t# Check required fields (err / action generated later in cade as required)\n\t\t//\tIF (!$_adata['s_id'])\t\t{$err_entry['flag'] = 1; $err_entry['s_id'] = 1;}\n\t\t//\tIF (!$_adata['s_status'])\t{$err_entry['flag'] = 1; $err_entry['s_status'] = 1;}\n\t\t\tIF (!$_adata['s_company'])\t{$err_entry['flag'] = 1; $err_entry['s_company'] = 1;}\n\t\t//\tIF (!$_adata['s_name_first'])\t{$err_entry['flag'] = 1; $err_entry['s_name_first'] = 1;}\n\t\t//\tIF (!$_adata['s_name_last'])\t{$err_entry['flag'] = 1; $err_entry['s_name_last'] = 1;}\n\t\t\tIF (!$_adata['s_addr_01'])\t{$err_entry['flag'] = 1; $err_entry['s_addr_01'] = 1;}\n\t\t//\tIF (!$_adata['s_addr_02'])\t{$err_entry['flag'] = 1; $err_entry['s_addr_02'] = 1;}\n\t\t\tIF (!$_adata['s_city'])\t\t{$err_entry['flag'] = 1; $err_entry['s_city'] = 1;}\n\t\t\tIF (!$_adata['s_state_prov'])\t{$err_entry['flag'] = 1; $err_entry['s_state_prov'] = 1;}\n\t\t\tIF (!$_adata['s_country'])\t{$err_entry['flag'] = 1; $err_entry['s_country'] = 1;}\n\t\t\tIF (!$_adata['s_zip_code'])\t{$err_entry['flag'] = 1; $err_entry['s_zip_code'] = 1;}\n\t\t//\tIF (!$_adata['s_phone'])\t\t{$err_entry['flag'] = 1; $err_entry['s_phone'] = 1;}\n\t\t//\tIF (!$_adata['s_fax'])\t\t{$err_entry['flag'] = 1; $err_entry['s_fax'] = 1;}\n\t\t//\tIF (!$_adata['s_tollfree'])\t{$err_entry['flag'] = 1; $err_entry['s_tollfree'] = 1;}\n\t\t//\tIF (!$_adata['s_email'])\t\t{$err_entry['flag'] = 1; $err_entry['s_email'] = 1;}\n\t\t//\tIF (!$_adata['s_taxid'])\t\t{$err_entry['flag'] = 1; $err_entry['s_taxid'] = 1;}\n\t\t//\tIF (!$_adata['s_account'])\t{$err_entry['flag'] = 1; $err_entry['s_account'] = 1;}\n\t\t\tIF (!$_adata['s_terms'])\t\t{$err_entry['flag'] = 1; $err_entry['s_terms'] = 1;}\n\t\t//\tIF (!$_adata['s_notes'])\t\t{$err_entry['flag'] = 1; $err_entry['s_notes'] = 1;}\n\n\t\t}\n\n\t# Validate some data (submitting data entered)\n\t# Email\n\t\tIF ($_adata['s_email'] && do_validate_email($_adata['s_email'], 0)) {\n\t\t\t$err_entry['flag'] = 1; $err_entry['err_email_invalid'] = 1;\n\t\t}\n\n\t# Email does not match existing email\n\t\t$_ce = array(0,1,1,1,1);\t// Element 0 = Nothing, 1 = clients, 2 = suppliers, 3 = admins, 4 = site addressses\n\t\tIF ($_adata['s_email'] && do_email_exist_check($_adata['s_email'], $_adata['s_id'], $_ce)) {\n\t\t\t$err_entry['flag'] = 1; $err_entry['err_email_matches_another'] = 1;\n\t\t}\n\n\t\treturn $err_entry;\n\n\t}", "function validate()\n\t{\n\t\t$isValid = false;\n\t\t\n\t\tif(empty($this->data['username']))\n\t\t{\n\t\t\t\t$this->errors['username'] = \"Please enter a Username\";\n\t\t}\n\t\t\n\t\tif(empty($this->data['password']))\n\t\t{\n\t\t\t\t$this->errors['password'] = \"Please enter a password\";\n\t\t}\n\t\t\n\t\tif(empty($this->data['description']))\n\t\t{\n\t\t\t\t$this->errors['description'] = \"Please enter a description of yourself\";\n\t\t}\n\t\t\n\t\t\n\t\t//validate data elements in userData property\n\t\t//if an error exists, store to errors using column name as key\n\t\t\n\t\t if(empty($this->errors))\n\t\t{\n\t\t\t$isValid = true;\n\t\t}\n\t\t\n\t\treturn $isValid;\n\t}", "function validateInput() {\n $validationSuccessful = true;\n $errorMessage = \"\";\n\n\n //Validate title\n if (!preg_match(\"/^.{1,250}$/\", $_POST['title'])) {\n $validationSuccessful = false;\n $errorMessage .= \"Title is invalid.\". $_POST['title'];\n }\n\n //Validate date\n if (!preg_match(\"/^(\\d{4})-(\\d{2})-(\\d{2}) (\\d{2}):(\\d{2}):(\\d{2})$/\", $_POST['date'])) {\n $validationSuccessful = false;\n $errorMessage .= \"Date is invalid.\" . $_POST['date'];\n }\n\n //Validate location\n if (!preg_match(\"/^.{1,250}$/\", $_POST['location'])) {\n $validationSuccessful = false;\n $errorMessage .= \"Max_players is invalid.\" . $_POST['location'];\n }\n\n if($validationSuccessful == true) {\n return true;\n } else {\n echo $errorMessage;\n return false;\n }\n }", "public function validate()\n {\n // TODO implement this\n }", "public function validate()\n\t{\n\t\t$errors = array();\n\t\t\n\t\t//make sure user is logged in\n\t\tif (empty($this->userid)) \n\t\t{\n\t\t\t$errors['userid'] = true;\n\t\t}\n\t\t\n\t\t//verify all info is provided\n\t\tif (isset($this->title))\n\t\t\t$this->title = strip_tags($this->title);\n\t\telse\n\t\t\t$errors['title'] = true;\n\t\t\t\n\t\tif (isset($this->description))\n\t\t\t$this->description = strip_tags($this->description);\n\t\telse\n\t\t\t$errors['description'] = true;\n\t\t\t\n\t\tif (isset($this->content))\n\t\t\t$this->content = strip_tags($this->content, \"<br><b>\");\n\t\telse\n\t\t\t$errors['content'] = true;\n\t\t\t\n\t\tif (isset($this->location))\n\t\t\t$this->location = strip_tags($this->location);\n\t\telse\n\t\t\t$errors['location'] = true;\n\t\t\n\t\tif (!isset($this->category))\n\t\t\t$errors['category'] = true;\n\t\t\t\n\t\tif (!isset($this->enddatetime))\n\t\t\t$errors['enddatetime'] = true;\n\t\t\n\t\t\n\t\t//If we made it here, all is valid\n\t\tif (count($errors) > 0)\n\t\t\treturn $errors;\n\t\telse\n\t\t\treturn NULL;\n\t}", "public function validate($data) {\n $data = $this->gump->sanitize($data);\n $this->gump->validation_rules(array(\n 'name' => 'required|max_len,100',\n 'capacity' => 'required|numeric',\n 'color' => 'required|max_len,7'\n ));\n\n $this->gump->filter_rules(array(\n 'name' => 'trim|sanitize_string',\n 'capacity' => 'trim|sanitize_string',\n 'color' => 'trim|sanitize_string',\n ));\n\n $validated_data = $this->gump->run($data);\n if ($validated_data === false) {\n $errArr = $this->gump->get_readable_errors();\n $errString = \"\";\n foreach ($errArr as $k => $err) {\n $errString .= $err . '<br>';\n }\n throw new Exception($errString);\n } else {\n return $data;\n }\n }", "public function validateRequest();", "function validate(&$data, $format = null, $options = array())\r\n\t\t{\r\n\t\t\tif(empty($format))\r\n\t\t\t{\r\n\t\t\t\treturn $this->inp->check($data);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\treturn data_validation::validate($data, $format, $options);\r\n\t\t\t}\r\n\t\t}", "function validate(){\n }", "protected function localValidation()\n\t\t{\n\t\t}", "function readInputData() {\n\t\t$this->readUserVars(array('subscriptionName', 'subscriptionEmail', 'subscriptionPhone', 'subscriptionFax', 'subscriptionMailingAddress', 'subscriptionAdditionalInformation', 'enableDelayedOpenAccess', 'delayedOpenAccessDuration', 'delayedOpenAccessPolicy', 'enableOpenAccessNotification', 'enableAuthorSelfArchive', 'authorSelfArchivePolicy', 'subscriptionExpiryPartial', 'enableSubscriptionOnlinePaymentNotificationPurchaseIndividual', 'enableSubscriptionOnlinePaymentNotificationPurchaseInstitutional', 'enableSubscriptionOnlinePaymentNotificationRenewIndividual', 'enableSubscriptionOnlinePaymentNotificationRenewInstitutional', 'enableSubscriptionExpiryReminderBeforeMonths', 'numMonthsBeforeSubscriptionExpiryReminder', 'enableSubscriptionExpiryReminderBeforeWeeks', 'numWeeksBeforeSubscriptionExpiryReminder', 'enableSubscriptionExpiryReminderAfterWeeks', 'numWeeksAfterSubscriptionExpiryReminder', 'enableSubscriptionExpiryReminderAfterMonths', 'numMonthsAfterSubscriptionExpiryReminder'));\n\n\t\t// If delayed open access selected, ensure a valid duration is provided\n\t\tif ($this->_data['enableDelayedOpenAccess'] == 1) {\n\t\t\t$this->addCheck(new FormValidatorInSet($this, 'delayedOpenAccessDuration', 'required', 'manager.subscriptionPolicies.delayedOpenAccessDurationValid', array_keys($this->validDuration)));\n\t\t}\n\n\t\t// If expiry reminder before months is selected, ensure a valid month value is provided\n\t\tif ($this->_data['enableSubscriptionExpiryReminderBeforeMonths'] == 1) {\n\t\t\t$this->addCheck(new FormValidatorInSet($this, 'numMonthsBeforeSubscriptionExpiryReminder', 'required', 'manager.subscriptionPolicies.numMonthsBeforeSubscriptionExpiryReminderValid', array_keys($this->validNumMonthsBeforeExpiry)));\n\t\t}\n\n\t\t// If expiry reminder before weeks is selected, ensure a valid week value is provided\n\t\tif ($this->_data['enableSubscriptionExpiryReminderBeforeWeeks'] == 1) {\n\t\t\t$this->addCheck(new FormValidatorInSet($this, 'numWeeksBeforeSubscriptionExpiryReminder', 'required', 'manager.subscriptionPolicies.numWeeksBeforeSubscriptionExpiryReminderValid', array_keys($this->validNumWeeksBeforeExpiry)));\n\t\t}\n\n\t\t// If expiry reminder after months is selected, ensure a valid month value is provided\n\t\tif ($this->_data['enableSubscriptionExpiryReminderAfterMonths'] == 1) {\n\t\t\t$this->addCheck(new FormValidatorInSet($this, 'numMonthsAfterSubscriptionExpiryReminder', 'required', 'manager.subscriptionPolicies.numMonthsAfterSubscriptionExpiryReminderValid', array_keys($this->validNumMonthsAfterExpiry)));\n\t\t}\n\n\t\t// If expiry reminder after weeks is selected, ensure a valid week value is provided\n\t\tif ($this->_data['enableSubscriptionExpiryReminderAfterWeeks'] == 1) {\n\t\t\t$this->addCheck(new FormValidatorInSet($this, 'numWeeksAfterSubscriptionExpiryReminder', 'required', 'manager.subscriptionPolicies.numWeeksAfterSubscriptionExpiryReminderValid', array_keys($this->validNumWeeksAfterExpiry)));\n\t\t}\n\t}", "function validateData($fields, $vars) \n{ \n\t// array for storing error messages \n\tglobal $err_mess; \t\t\t\t\t\t// error message, make accessible outside function \n\t$err_msg = \"\"; \t\t\t\t\t\t\t// blank to begin with \n\t$fields_ok = true;\t\t\t\t\t\t// success/failure indicator - assume success \n\n\t// for each field name in validation information validate data \n\t// data according to rules for field \n\t// $fields[x] - attribute name \n\t// $fields[x+1] - validation code \n\t// $fields[x+2] - human name for error message \n\t// validation codes - correspond to array entry in function validateData \n\t// 1 - field required - primary key, \"new\" (new record) or numeric (existing record) \n\t// 2 - field required - foreign key, must be numeric, must be > 0 \n\t// 3 - field required - phone number, must be 10 digits long \n\t// 4 - field required - email address \n\t//\t 5 - field required - no validation required \n\t// code + 100 - field not required but same validation as code if field required \n\t\n\t// want to consider validation for all fields in record \n\tfor ($i=0; $i<count($fields); $i=$i+3) \n\t{\n\t\t// extract data value from $vars that corresponds \n\t\t// to field name in validation data \n\t\t$field_name = $fields[$i]; \t\t\t// field name \n\t\t$field_data = $vars[$field_name]; \t// data value from form \n\t\t$field_code = $fields[$i+1];\t\t// validation code \n\t\t$field_err = $fields[$i+2];\t\t\t// field name for error message \n\t\t\n\t\t// determine if validating primary key \n\t\tif ($field_code==1) { \n\t\t\t// primary key, required field, must be \"new\" or numeric \n\t\t\tif (strlen($field_data)==0) { \n\t\t\t\t// required field not entered \n\t\t\t\t$err_mess .=$field_err .\"-required field \"; \n\t\t\t\t$fields_ok = false;\t\t\t// indicate validation problem \n\t\t\t} else { \t\t\t\t\t\t// not blank so \n\t\t\t\t// check for \"new\" (new record) or numeric (update existing record) \n\t\t\t\tif ($field_data != \"new\") { \n\t\t\t\t\tif (is_numeric($field_data) == false) { \n\t\t\t\t\t\t// invalid primary key \n\t\t\t\t\t\t$err_mess .=$field_err .\" - invalid primary key \"; \n\t\t\t\t\t\t$fields_ok = false;\t\t\t// indicate validation problem \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// determine if validating foreign key \n\t\tif ($field_code==2 or $field_code==102) {\n\t\t\t// validation may be required on number \n\t\t\t// check if required field and no data \n\t\t\tif ($field_code==2 and is_numeric($field_data)==false) { \n\t\t\t\t// required foreign key and no data \n\t\t\t\t$err_mess .=$field_err .\"-required field \"; \n\t\t\t\t$fields_ok = false; \t\t// indicate validation problem \n\t\t\t} else { \t\t\t\t\t\t// could still be no data \n\t\t\t\tif ($field_data!=\"\" and is_numeric($field_data)==false) { \n\t\t\t\t\t// field is not blank, must be number \n\t\t\t\t\t$err_mess .=$field_err .\"-not numeric \"; \n\t\t\t\t\t$fields_ok = false;\t\t// indicate validation problem \n\t\t\t\t} else { \n\t\t\t\t\t// ensure value is > 0 \n\t\t\t\t\tif ($field_data <= 0) { \n\t\t\t\t\t\t// invalid foreign key \n\t\t\t\t\t\t$err_mess .=$field_err .\"-select \"; \n\t\t\t\t\t\t$fields_ok = false;\t\t// indicate validation problem \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// determine if validating phone number \n\t\tif ($field_code==3 or $field_code==103) { \n\t\t\t// validation may be required on phone number \n\t\t\tif ($field_code==3 and $field_data==\"\") { \n\t\t\t\t// required field and no data \n\t\t\t\t$err_mess .=$field_err .\"-required field \"; \n\t\t\t\t$fields_ok = false; \t\t// indicate validation problem \n\t\t\t} else { \t\t\t\t\t\t// could still be no data \n\t\t\t\t// validate if not required field & data entered \n\t\t\t\tif ($field_data!=\"\" and is_numeric($field_data)==false) { \n\t\t\t\t\t// field is not a number \n\t\t\t\t\t$err_mess .=$field_err .\"-not numeric \"; \n\t\t\t\t\t$fields_ok = false;\t\t// indicate validation problem \n\t\t\t\t} else { \n\t\t\t\t\t// check for correct length (must be 10 digits) \n\t\t\t\t\tif ($field_data!=\"\" and strlen($field_data)!=10) {\n\t\t\t\t\t\t// phone number length not 10 \n\t\t\t\t\t\t$err_mess .=$field_err .\"-must be 10 digits \"; \n\t\t\t\t\t\t$fields_ok = false; // indicate validation problem \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} \n\t\t} \n\t\t\n\t\t// determine if validating email address \n\t\tif ($field_code==4 or $field_code==104) { \n\t\t\t// validation may be required on email address \n\t\t\t// check if required field and no data \n\t\t\tif ($field_code==4 and (!isEmail($field_data))) { \n\t\t\t\t// required field and invalid email address \n\t\t\t\t$err_mess .=$field_err .\"-invalid address \"; \n\t\t\t\t$fields_ok = false; \t// indicate validation problem \n\t\t\t} else { \t\t\t\t\t\t// could still be no data \n\t\t\t\tif ($field_data!=\"\") { \n\t\t\t\t\t// validate email address \n\t\t\t\t\tif (!isEmail($field_data)) { \n\t\t\t\t\t\t// invalid email address \n\t\t\t\t\t\t$err_mess .=$field_err .\"-invalid address \"; \n\t\t\t\t\t\t$fields_ok = false;\t\t// indicate validation problem \n\t\t\t\t\t} \n\t\t\t\t}\n\t\t\t}\n\t\t} \n\n\t\t// determine if no validation required (but could be required field) \n\t\tif ($field_code==5 or $field_code==105) { \n\t\t\t// considering field with no validation requirements \n\t\t\tif ($field_code==5 and strlen($field_data)==0) { \n\t\t\t\t// required field and no data \n\t\t\t\t$err_mess .=$field_err .\"-required field \"; \n\t\t\t\t$fields_ok = false; \t// indicate validation problem \n\t\t\t}\n\t\t} \n\t} \n\n\t// all fields validated, return success/failure indicator \n\treturn $fields_ok; \t\n}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}" ]
[ "0.85951304", "0.8008719", "0.78145146", "0.7582598", "0.755227", "0.755227", "0.75209594", "0.75209594", "0.75209594", "0.75209594", "0.75209594", "0.75209594", "0.75209594", "0.75209594", "0.75209594", "0.75209594", "0.75209594", "0.75209594", "0.7485383", "0.74601835", "0.7415573", "0.7380265", "0.7376311", "0.7278768", "0.72480243", "0.7209275", "0.7161847", "0.71559", "0.71557873", "0.7149115", "0.7149115", "0.7098372", "0.7058372", "0.7052742", "0.70213854", "0.7008196", "0.7008196", "0.69927174", "0.6950266", "0.69487315", "0.6937269", "0.6931606", "0.6911235", "0.6895713", "0.6878435", "0.686643", "0.6861003", "0.6837296", "0.68250537", "0.6816762", "0.68137807", "0.6807961", "0.68079466", "0.678476", "0.6782095", "0.67761815", "0.67635673", "0.67448866", "0.67212635", "0.6711011", "0.67109495", "0.6705836", "0.6701233", "0.6690788", "0.6683844", "0.6683608", "0.6683608", "0.66678464", "0.666283", "0.666283", "0.66605574", "0.6654785", "0.6654785", "0.66507393", "0.66496015", "0.66496015", "0.66496015", "0.66496015", "0.6646219", "0.6645649", "0.66239053", "0.6622955", "0.65990347", "0.65962505", "0.6573714", "0.6572999", "0.6571307", "0.65709984", "0.65556026", "0.6551475", "0.65330666", "0.653118", "0.65214205", "0.6521027", "0.6521027", "0.6521027", "0.6521027", "0.6521027", "0.6521027", "0.6521027", "0.6521027" ]
0.0
-1
Do password reset form
function do_pword_reset_form($adata, $aret_flag=0) { # Dim some Vars: global $_TCFG, $_LANG, $_nl, $_sp; # Some HTML Strings (reduce text) $_td_str_left = '<td class="TP3SML_NR" width="30%">'; $_td_str_right = '<td class="TP3SML_NL" width="70%">'; $_td_str_center_span = '<td class="TP3SML_NC" width="100%" colspan="2">'; # Build Title String, Content String, and Footer Menu String $_tstr .= $_LANG['_MAIL']['Password_Reset_Request'].$_sp; IF ($adata['w'] == 'admin') {$_tstr .= $_LANG['_MAIL']['Administrator'];} ELSE {$_tstr .= $_LANG['_MAIL']['Client'];} $_cstr .= '<table width="100%" border="0" cellspacing="0" cellpadding="5">'.$_nl; $_cstr .= '<tr><td align="center">'.$_nl; $_cstr .= '<form action="'.$_SERVER["PHP_SELF"].'" method="post" name="reset">'.$_nl; $_cstr .= '<table width="100%" cellspacing="0" cellpadding="5">'.$_nl; $_cstr .= '<tr>'.$_nl; $_cstr .= $_td_str_center_span.$_nl; $_cstr .= $_LANG['_MAIL']['Password_Reset_Message_01'].$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= '</tr>'.$_nl; $_cstr .= '<tr>'.$_nl; $_cstr .= $_td_str_left.$_nl; $_cstr .= '<b>'.$_LANG['_MAIL']['l_User_Name'].$_sp.'</b>'.$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= $_td_str_right.$_nl; $_cstr .= '<INPUT class="PSML_NL" TYPE=TEXT name="username" size="30" maxlength="20">'.$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= '</tr>'.$_nl; $_cstr .= '<tr>'.$_nl; $_cstr .= $_td_str_left.$_nl; $_cstr .= '<b>'.$_LANG['_MAIL']['l_Email'].$_sp.'</b>'.$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= $_td_str_right.$_nl; $_cstr .= '<INPUT class="PSML_NL" TYPE=TEXT name="email" size="30" maxlength="100">'.$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= '</tr>'.$_nl; $_cstr .= '<tr>'.$_nl; $_cstr .= $_td_str_left.$_nl; $_cstr .= '<INPUT TYPE=hidden name="mod" value="'.$adata['mod'].'">'.$_nl; $_cstr .= '<INPUT TYPE=hidden name="mode" value="'.$adata['mode'].'">'.$_nl; $_cstr .= '<INPUT TYPE=hidden name="w" value="'.$adata['w'].'">'.$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= $_td_str_right.$_nl; $_cstr .= do_input_button_class_sw('b_subreq', 'SUBMIT', $_LANG['_MAIL']['B_Submit_Request'], 'button_form_h', 'button_form', '1').$_nl; $_cstr .= do_input_button_class_sw('b_reset', 'RESET', $_LANG['_MAIL']['B_Reset'], 'button_form_h', 'button_form', '1').$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= '</tr>'.$_nl; $_cstr .= '</table>'.$_nl; $_cstr .= '</form>'.$_nl; $_cstr .= '</td></tr>'.$_nl; $_cstr .= '<tr><td align="right">'.$_nl; IF ($adata['w'] == 'admin') { $_cstr .= '<a href="mod.php?mod=mail&mode=reset&w=user">'.$_TCFG['_IMG_CLIENTS_M'].'</a>'; } ELSE { IF ($_CCFG['_ENABLE_ADMIN_LOGIN_LINK']) {$_cstr .= do_nav_link('mod.php?mod=mail&mode=reset&w=admin', $_TCFG['_IMG_ADMIN_M'],$_TCFG['_IMG_ADMIN_M_MO'],'','');} } $_cstr .= '</td></tr>'.$_nl; $_cstr .= '</table>'.$_nl; $_mstr_flag = 0; $_mstr = ''.$_nl; # Call block it function $_out .= do_mod_block_it($_tstr, $_cstr, $_mstr_flag, $_mstr, '1'); $_out .= '<br>'.$_nl; # Return / Echo Final Output IF ($aret_flag) {return $_out;} ELSE {echo $_out;} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function resetPassword();", "public function actionPasswordReset()\n\t{\n\t\t$this->render('passwordReset');\n\t}", "public function resetPasswordAction()\n\t{\n\n\t\t$data = $this->url->post;\n\t\tif (!isset($_POST['reset']) || !$this->validateReset($data)) {\n\t\t\t$this->session->data['error'] = 'Warning: Please enter valid data in input box.';\n\t\t\t$this->url->redirect('login');\n\t\t}\n\n\t\t$token = $this->url->post('_token');\n\t\t$token_check = hash('sha512', TOKEN . TOKEN_SALT);\n\t\tif (hash_equals($token_check, $token) === false ) {\n\t\t\t$this->session->data['error'] = 'Warning: Invalid token. Please try again.';\n\t\t\t$this->url->redirect('login');\n\t\t}\n\t\t$this->loginModel = new Login();\n\t\t$check = $this->loginModel->checkEmailHash($data);\n\t\tif (empty($check)) {\n\t\t\t$this->url->redirect('login');\n\t\t} else {\n\t\t\t$result = $this->loginModel->updatePassword($data);\n\t\t\t$this->session->data['success'] = 'Success: Your Password Changed Succesfully.';\n\t\t\t$this->url->redirect('login');\n\t\t}\n\n\t\t\n\t}", "public function requestPasswordReset()\n {\n $this->View->render('user/requestPasswordReset');\n }", "public function resetpassAction()\n\t{\n\t\t$email='[email protected]';\n\n\t\t$customer = Mage::getModel('customer/customer')\n ->setWebsiteId(Mage::app()->getStore()->getWebsiteId())\n ->loadByEmail($email);\n\t\t$customer->sendPasswordResetConfirmationEmail();\n\t}", "public function actionResetPassword()\n\t{\n\t\t\n\t\tif(isset($_GET['resetKey'])) // Uzivatel prisel pres aktivacni link\n\t\t{\n\t\t\t$scenario = 'resetSubmit';\n\t\t\t$model = $this->resetSubmit($_GET['resetKey']);\n\t\t}\n\t\telse // Uzivatel teprve zada o obnovu hesla\n\t\t{\n\t\t\t$scenario = 'resetRequest';\n\t\t\t$model = $this->resetRequest();\n\t\t}\t\n\t\t\n\t\t$this->render('resetPassword', array(\n\t\t\t\t'model' => $model,\n\t\t\t\t'scenario' => $scenario,\n\t\t\t)\n\t\t);\n\t}", "public function resetPassword()\n\t{\n\n\t\tif ($this->common->isLoggedIn()) {\n\t\t\t$this->url->redirect('dashboard');\n\t\t}\n\n\t\t$data['error'] = '';\n\t\tif (isset($this->session->data['error'])) {\n\t\t\t$data['error'] = $this->session->data['error'];\n\t\t\tunset($this->session->data['error']);\n\t\t}\n\n\t\t$data['success'] = '';\n\t\tif (isset($this->session->data['success'])) {\n\t\t\t$data['success'] = $this->session->data['success'];\n\t\t\tunset($this->session->data['success']);\n\t\t}\n\t\t$data['mail'] = $this->url->get('id');\n\t\t$data['hash'] = $this->url->get('temp');\n\t\t\n\t\tif (empty($data['mail']) && empty($data['hash']) ) {\n\t\t\t$this->url->redirect('login');\n\t\t}\n\t\t$this->loginModel = new Login();\n\t\tif (!$this->loginModel->checkEmailHash($data)) {\n\t\t\t$this->url->redirect('login');\n\t\t}\n\t\t\n\t\t$data['info'] = $this->commons->getInfo();\n\n\t\t/*Load Language File*/\n\t\trequire DIR_BUILDER.'language/'.$data['info']['language'].'/common.php';\n\t\t$data['lang']['common'] = $lang;\n\t\trequire DIR_BUILDER.'language/'.$data['info']['language'].'/login.php';\n\t\t$data['lang']['login'] = $login;\n\t\t\n\t\t$data['token'] = hash('sha512', TOKEN . TOKEN_SALT);\n\t\t$data['action'] = URL.DIR_ROUTE.'reset';\n\t\t$this->view->render('auth/reset_password.tpl', $data);\n\t}", "function requestpasswordreset_action()\n {\n $login_model = $this->loadModel('Login');\n // set token (= a random hash string and a timestamp) into database\n // to see that THIS user really requested a password reset\n if ($login_model->setPasswordResetDatabaseToken() == true) {\n // send a mail to the user, containing a link with that token hash string\n $login_model->sendPasswordResetMail();\n }\n $this->view->render('login/requestpasswordreset');\n }", "function forgotten_password_reset()\n {\t\n $data['heading'] = $this->lang->line('FAL_forgotten_password_label');\n $data['fal'] = $this->fal_front->forgotten_password_reset();\n\t $this->load->view($this->_container, $data); \n }", "public function add_to_reset_pass_form() {\n\t\t$this->recaptcha->show_recaptcha( array( 'action' => ITSEC_Recaptcha::A_RESET_PASS ) );\n\t}", "public function resetAction()\n\t{\n\t\t$this->view->headTitle(\"Reset your password\");\n\t\n\t\t//If form is submitted, reset the password\n\t\tif($this->getRequest()->isPost()){\n\t\t\n\t\t\t//Validation\n\t\t\t//Password must be between 6-20 characters\n\t\t\t$valid_pswd = new Zend_Validate_StringLength(6, 20);\n\t\t\tif(! $valid_pswd->isValid($this->_request->getPost('password'))){\n\t\t\t\t$this->view->errors[] = \"Password must be at least 6 characters.\";\n\t\t\t}\n\t\t\t\n\t\t\t//Password must match\n\t\t\tif($this->_request->getPost('password') != \n\t\t\t $this->_request->getPost('password2')){\n\t\t\t\t$this->view->errors[] = \"Your passwords do not match.\";\n\t\t\t}\n\t\t\t\n\t\t\t//No errors, so update the password\n\t\t\tif(count($this->view->errors) == 0){\n\t\t\t\t\n\t\t\t\t//Find user row to update via registration_key column\n\t\t\t\t$user = new Default_Model_User();\n\t\t\t\t$resultRow = $user->getUserByRegkey($this->_request->getPost('key'));\n\t\t\t\t\n\t\t\t\tif(count($resultRow) == 1){\n\t\t\t\t\t$resultRow->password = md5($this->_request->getPost('password'));\n\t\t\t\t\t$resultRow->save();\n\t\t\t\t\t$this->view->updated = 1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else{ //Errors, so pass key back to form\n\t\t\t\t$this->view->success = 1;\n\t\t\t\t$this->view->key = $this->_request->getPost('key');\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}else{\n\t\t\t// User has clicked the emailed password recovery link. Find the user\n\t\t\t// using the recovery key, and prepare the password reset form\n\t\t\t\n\t\t\t//Retrieve key from url\n\t\t\t$recoveryKey = $this->getRequest()->getParam('key');\n\t\t\t\n\t\t\t$user = new Default_Model_User();\n\t\t\t$resultRow = $user->getUserByRegkey($recoveryKey);\n\t\t\t\n\t\t\t\tif(count($resultRow)){\n\t\t\t\t\t$resultRow->save();\n\t\t\t\t\t$this->view->success = 1;\n\t\t\t\t\t$this->view->key = $recoveryKey;\n\t\t\t\t} else{\n\t\t\t\t\t$this->view->errors[] = \"Unable to locate password recovery key.\";\n\t\t\t\t}\n\t\t\n\t\t} //end else\n\t}", "public function forgotpasswordAction() {\n $form = new Admin_Form_ResendPassword();\n if ($this->getRequest()->isPost()) {\n if ($form->isValid($this->_request->getPost())) {\n //check user is registered\n $values = $form->getValues();\n $siteUsersMapper = new Application_Model_Table_AdminUsers();\n $exists = $siteUsersMapper->fetchByUsername($values['email_address']);\n if($exists){\n //user exists\n $recoveryEmailsMapper = new Application_Model_Table_AdminUserRecoveryEmails();\n $recoveryEmail = $recoveryEmailsMapper->createRow();\n $recoveryEmail->admin_user_id = $exists->admin_user_id;\n $recoveryEmail->email_address = $exists->username;\n $recoveryEmail->hashActivationKey();\n $recoveryEmail->save();\n }\n $this->_helper->FlashMessenger->addMessage('You password has been reset, please check your email' , 'successful');\n $this->_helper->redirector->goToRouteAndExit(array(), 'admin-dashboard', true);\n }\n }\n $this->view->form = $form;\n }", "public function reset_password()\n {\n $view_data = [\n 'form_errors' => []\n ];\n\n if ($this->input->is_post()) {\n $res = $this->_api('user')->update_password( [\n 'password' => $this->input->post('password'),\n 'confirm_password' => $this->input->post('confirm_password'),\n 'token' => $this->input->get('token'),\n 'id' => $this->input->get('id')\n ]);\n\n // Redirect if reset password successful\n if($res['submit']) {\n redirect('/login/reset_password_complete');\n return;\n }\n\n $view_data = [\n 'form_errors' => isset($res['invalid_fields']) ? $res['invalid_fields'] : [],\n 'errmsg' => isset($res['errmsg']) ? $res['errmsg'] : null,\n 'post' => $this->input->post()\n ];\n }\n\n $this->_render($view_data);\n }", "public function showResetForm()\n {\n // if user is logged in, do not let him access this page\n if( Session::isLoggedIn() )\n {\n SCMUtility::frontRedirectTo('?page=scmCourseModule&state=Front&action=myAccount');\n return;\n }\n\n $userID = SCMUtility::cleanText($_GET['userID']);\n $token = SCMUtility::stripTags($_GET['token']);\n\n if( ! $this->isOnResetPasswordSession($token) )\n {\n $this->resetPasswordSessionDeactivate();\n\n SCMUtility::setFlashMessage('Invalid Token or token has expired!');\n SCMUtility::frontRedirectTo('?page=scmCourseModule&state=Front&action=myAccount');\n return;\n }\n\n $this->resetPasswordSessionDeactivate();\n\n View::make('templates/front/reset-password-form.php',compact('userID'));\n }", "public function resetUserPassword()\n\t{\n\t\t# make the call to the API\n\t\t$response = App::make('ApiClient')->post('user/password?forgotten=true', Input::only('email'));\t\n\n\t\t# if the call was successful we'll want to give some feedback to the user\n\t\tif(isset($response['success'])) \n\t\t{\n\t\t\tSession::flash('success', $response['success']['data']);\n\t\t}\n\t\t# similarly if it failed, but this time also show the previous form data\n\t\telse {\n\t\t\t# save the API response to some flash data\n\t\t\tSession::flash('reset-errors', getErrors($response));\n\n\t\t\t# also flash the input so we can replay it out onto the reg form again\n\t\t\tInput::flash();\n\t\t}\t\t\n\n\t\t# ... and show the reset form again\n\t\treturn Redirect::to('forgotten-password');\n\t}", "Public Function resetPassword()\n\t{\n\t\t$Code = $this->generateResetCode();\n\t\t$Email = $this->email;\n\t\t$Subject = 'Reset Password Request from ' . $_SERVER['HTTP_HOST'];\n\t\t$Body = <<<END\nThis is an automatically generated email from $_SERVER[HTTP_HOST] regarding a password reset.<br/>\nIf you did not request a password reset then please disregard this email.<br/>\n<br/>\nOtherwise, follow this link to reset your password:<br/>\n<a href=\"http://$_SERVER[HTTP_HOST]/BevoMedia/Index/ResetPassword.html?EmailCode=$Code&Email=$Email\">http://$_SERVER[HTTP_HOST]/BevoMedia/Index/ResetPassword.html?EmailCode=$Code&Email=$Email</a>\nEND;\n\t\t\n\t\t$this->ClearResetCode();\n\t\t$this->InsertResetCode($Code);\n\t\t$this->SendEmail($Email, $Subject, $Body);\n\t}", "function requestpasswordreset()\n {\n $this->view->render('login/requestpasswordreset');\n }", "public function resetPassword()\n {\n // So redirect.\n if (!$this->session->resetId) {\n $this->redirect->url('/users/login/');\n }\n\n $this->load->library('Validate', $this, true);\n $this->data->title = 'Reset Password';\n $this->_loadView(__FUNCTION__);\n }", "public function resetPasswordAction() {\n\t\t$this->view->assign('account', $this->accountManagementService->getProfile());\n\t}", "public function reset_pass() {\n \t\t$email = $this->input->post('email');\n\n\t $pass = $this->generate_pass(16);\n\t $hash = password_hash($pass, B_CRYPT); // http://php.net/manual/en/function.password-hash.php\n\n\t $this->load->model('users_table');\n\t $this->users_table->update_password($email, $hash);\n\n\t $this->send_email($email, $pass, \"2\");\n \t}", "public function forgotPassword()\n {\n if ($this->issetPostSperglobal('email') && !empty($this->getPostSuperglobal('email'))) {\n if ($this->users_manager->resetToken($this->getPostSuperglobal('email'))) {\n $this->session->writeFlash('success', \"Les instructions pour réinitialiser votre mot de passe vous ont été envoyées par email, vous avez 30 minutes pour le faire.\");\n } else {\n $this->session->writeFlash('danger', \"Aucun compte ne correspond à cet adresse mail : {$this->getPostSuperglobal('email')}.\");\n }\n } else {\n $this->session->writeFlash('danger', \"L'adresse mail n'est pas ou est mal renseignée.\");\n }\n $this->render('forgot-password', ['head'=>['title'=>'Mot de passe oublié', 'meta_description'=>'']]);\n }", "public function p_reset() {\n\n\t\tforeach($_POST as $key => $value){\n\t\t\tif((empty($value)) || (!$value) || (trim($value) == \"\") ){\n\t\t\t\t# Send them back to the login page\n\t\t\t\tRouter::redirect(\"/users/resetp/error\");\n\t\t\t}\n\t\t}\t\n\t\t\n\t\t# Encrypt the password \n\t\t$_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']); \n\n\t\tDB::instance(DB_NAME)->update(\"users\", $_POST, 'WHERE user_id = '.$this->user->user_id);\n\n\t\t# Send them back to the main index.\n\t\tRouter::redirect('/users/login');\n\n\t}", "public function do_reset_password()\n {\n $input = array(\n 'token'=>Input::get( 'token' ),\n 'password'=>Input::get( 'password' ),\n 'password_confirmation'=>Input::get( 'password_confirmation' ),\n );\n\n // By passing an array with the token, password and confirmation\n if( Confide::resetPassword( $input ) )\n {\n $notice_msg = Lang::get('confide::confide.alerts.password_reset');\n return Redirect::action('UserController@login')\n ->with( 'notice', $notice_msg );\n }\n else\n {\n $error_msg = Lang::get('confide::confide.alerts.wrong_password_reset');\n return Redirect::action('UserController@reset_password', array('token'=>$input['token']))\n ->withInput()\n ->with( 'error', $error_msg );\n }\n }", "public function doResetPassword()\n {\n // if user is logged in, do not let him access this page\n if( Session::isLoggedIn() )\n {\n SCMUtility::frontRedirectTo('?page=scmCourseModule&state=Front&action=myAccount');\n return;\n }\n\n $userID = SCMUtility::cleanText($_POST['userID']);\n $userNewPassword = SCMUtility::stripTags($_POST['new_reset_password']);\n\n // validate\n $validator = Validator::make(array('password'=>$userNewPassword),User::$rulesPasswordChange,User::$rulesMessages);\n\n if($validator->fails())\n {\n SCMUtility::setFlashMessage('Password reset failed. Error: '.$validator->messages()->first(),'danger');\n SCMUtility::frontRedirectTo('?page=scmCourseModule&state=Front&action=myAccount');\n return;\n }\n\n // update user password\n $user = User::find($userID);\n\n if( ! $user )\n {\n SCMUtility::setFlashMessage('Sorry, we cannot find any user associated with that email address.','danger');\n SCMUtility::frontRedirectTo('?page=scmCourseModule&state=Front&action=myAccount');\n return;\n }\n\n $user->password = $userNewPassword;\n $user->save();\n\n SCMUtility::setFlashMessage('Your password have been reset. You can now login using your new password.','success');\n SCMUtility::frontRedirectTo('?page=scmCourseModule&state=Front&action=myAccount');\n return;\n }", "public function forgotPasswordAction()\n {\n $form = new ForgotPasswordForm();\n\n if ($this->request->isPost())\n {\n if($this->security->checkToken())\n {\n // Send emails only is config value is set to true\n if ($this->getDI()->get('config')->useMail) {\n\n if ($form->isValid($this->request->getPost()) == false) {\n foreach ($form->getMessages() as $message) {\n $this->flash->error($message);\n }\n } else {\n\n $user = Users::findFirstByEmail($this->request->getPost('email'));\n if (!$user) {\n $this->flash->success('There is no account associated to this email');\n } else {\n\n $resetPassword = new ResetPasswords();\n $resetPassword->usersId = $user->id;\n if ($resetPassword->save()) {\n // $this->flash->success('Success! Please check your messages for an email reset password');\n $this->flashSess->success(\"Success! Please check your messages for an email reset password\");\n $this->view->disable();\n return $this->response->redirect('');\n } else {\n foreach ($resetPassword->getMessages() as $message) {\n $this->flash->error($message);\n }\n }\n }\n }\n } else {\n $this->flash->warning('Emails are currently disabled. Change config key \"useMail\" to true to enable emails.');\n }\n }\n else {\n $this->flash->error('CSRF Validation is Failed');\n }\n }\n $this->view->form = $form;\n }", "public function admin_forgot_password_form() {\n if ($this->checkLogin('A') == '') {\n\t\t\t\t$this->load->view(ADMIN_ENC_URL.'/templates/forgot_password.php', $this->data);\n } else {\n redirect(ADMIN_ENC_URL.'/dashboard');\n }\n }", "public function reset_password_form()\n\t{\n\t\t$code = Input::get('code');\n\t\tif($user = $this->repo->checkResetCode($code))\n\t\t\treturn View::make('authentication.reset_password')->with('user',$user)->with('code',$code);\n\t\treturn Redirect::to('forgot_password');\n\t}", "public function forgotPasswordAction()\n {\n $form = new ForgotPasswordForm();\n\n if ($this->request->isPost()) {\n\n if ($form->isValid($this->request->getPost()) == false) {\n foreach ($form->getMessages() as $message) {\n $this->flash->error($message);\n }\n } else {\n\n $user = Users::findFirstByEmail($this->request->getPost('email'));\n if (!$user) {\n $this->flash->success('There is no account associated to this email');\n } else {\n\n $resetPassword = new ResetPasswords();\n $resetPassword->usersId = $user->id;\n if ($resetPassword->save()) {\n $this->flash->success('Success! Please check your messages for an email reset password');\n } else {\n foreach ($resetPassword->getMessages() as $message) {\n $this->flash->error($message);\n }\n }\n }\n }\n }\n\n $this->view->form = $form;\n }", "public function forgotPasswordAction()\n {\n $form = new ForgotPasswordForm();\n\n if ($this->request->isPost()) {\n\n if ($form->isValid($this->request->getPost()) == false) {\n foreach ($form->getMessages() as $message) {\n $this->flash->error($message);\n }\n } else {\n\n $user = Users::findFirstByEmail($this->request->getPost('email'));\n if (!$user) {\n $this->flash->success('There is no account associated to this email');\n } else {\n\n $resetPassword = new ResetPasswords();\n $resetPassword->usersId = $user->id;\n if ($resetPassword->save()) {\n $this->flash->success('Success! Please check your messages for an email reset password');\n } else {\n foreach ($resetPassword->getMessages() as $message) {\n $this->flash->error($message);\n }\n }\n }\n }\n }\n\n $this->view->form = $form;\n }", "public static function do_reset_password() {\n\t\tif ( ! self::is_global_reset_password_page_set() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( 'POST' == $_SERVER[ 'REQUEST_METHOD' ] && isset( $_REQUEST[ 'rp_key' ] ) && isset( $_REQUEST[ 'rp_login' ] ) ) {\n\t\t\t$rp_key = sanitize_text_field( $_REQUEST['rp_key'] );\n\t\t\t$rp_login = sanitize_text_field( $_REQUEST['rp_login'] );\n\n\t\t\t$user = check_password_reset_key( $rp_key, $rp_login );\n\n\t\t\tif ( ! $user || is_wp_error( $user ) ) {\n\t\t\t\t$query_args = self::get_reset_password_query_args_from_user( $user );\n\t\t\t\tFrmRegLoginController::redirect_to_selected_login_page( $query_args );\n\n\t\t\t} elseif ( isset( $_POST[ 'pass1' ] ) ) {\n\n\t\t\t\tself::redirect_if_passwords_not_equal( $rp_key, $rp_login );\n\t\t\t\tself::redirect_if_empty_password( $rp_key, $rp_login );\n\t\t\t\tself::reset_password_and_redirect( $user );\n\n\t\t\t} else {\n\t\t\t\tesc_html_e( 'Invalid request.', 'frmreg' );\n\t\t\t}\n\t\t}\n\t}", "public function passwordformAction(){\n\t\t/*if($this->_request->getParam('error')){\n\t\t\t$this->view->assign('messages',$this->_messages->getMessages());\n\t\t}*/\n\t\t\t\t\n\t\t$form = new Bel_Forms_Builder('passreset_form','/usermanagement/profile/savepassword');\n\t\t$this->view->assign('form',$form);\n\t\t$this->view->display('forms/ajax.tpl');\t\t\n\t}", "public function resetPassword()\n\t{\n\t\tif($this->session->userdata('VB_USER_ID') <> ''):\n\t\t\tredirect(base_url().'my-profile');\n\t\tendif;\n\t\t$data['error'] \t\t\t\t\t\t= \t'';\n\t\tif($this->input->post('otp')): \n\t\t\t$userData\t\t=\t$this->common_model->checkOTP(trim($this->session->userdata('VB_FORGOT_USER_PHONE')),trim($this->input->post('otp')),'users','user_password_otp');\n\t\t\tif($userData <> \"\"): \n\t\t\t\tif($userData['status'] == 'A'):\n\t\t\t\t\t$param['user_phone_otp']\t\t=\t'';\n\t\t\t\t\t$param['password']\t\t\t\t=\t$this->common_model->encriptPassword(trim($this->input->post('password')));\n\t\t\t\t\t$this->common_model->editData('vb_users',$param,'user_id',$userData['user_id']);\n\t\t\t\t\t$this->session->unset_userdata('VB_FORGOT_USER_PHONE');\n\t\t\t\t\techo \"success\";die;\n\t\t\t\telse:\n\t\t\t\t\techo \"blocked\";die;\n\t\t\t\tendif;\n\t\t\telse:\n\t\t\t\techo \"wrongotp\";die;\n\t\t\tendif;\n\t\tendif;\n\t\t$this->layouts->set_title(stripcslashes('Reset Password | VBloggers'));\n\t\t$this->layouts->set_keyword(stripcslashes('Reset Password | VBloggers'));\n\t\t$this->layouts->set_description(stripcslashes('Reset Password | VBloggers'));\n\t\t\n\t\t$this->layouts->login_view('user/resetpassword',array(),$data);\n\t}", "public function actionRequestpasswordreset() {\n\t\treturn $this->render('requestpasswordreset');\n\t}", "public function ResetPassword() {\n\t\t\t$strPassword = strtolower(substr(md5(microtime()), 4, 8));\n\t\t\t$this->SetPassword($strPassword);\n\t\t\t$this->PasswordResetFlag = true;\n\t\t\t$this->Save();\n\n\t\t\t// Setup Token Array\n\t\t\t$strTokenArray = array(\n\t\t\t\t'NAME' => $this->strFirstName . ' ' . $this->strLastName,\n\t\t\t\t'USERNAME' => $this->strUsername,\n\t\t\t\t'PASSWORD' => $strPassword\n\t\t\t);\n\n\t\t\t// Send Message\n\t\t\tQApplication::SendEmailUsingTemplate('forgot_password', 'Qcodo.com Credentials', QCODO_EMAILER,\n\t\t\t\t$this->SmtpEmailAddress, $strTokenArray, true);\n\t\t}", "public function passwordResetAction()\n {\n // get the view vars\n $errors = $this->view->errors;\n $site = $this->view->site;\n $validator = $this->view->validator;\n\n // set the input params\n $requiredParams = array(\n 'code',\n );\n\n $input = $this->processInput( $requiredParams, null, $errors );\n\n // check if there were any errors\n if ( $errors->hasErrors() ) {\n return $this->renderPage( 'errors' );\n }\n\n // decode the hash and gets its parts, confirm all good and allow user to change password\n list( $userIdentification, $timestamp, $signature ) = explode( '|', base64_decode( urldecode( $input->code ) ) );\n\n // first assume userIdentification is a username\n $user = $site->getUserByUsername( $userIdentification );\n\n // if userIdentification is not a username, use userIdentification as an email address\n if ( ! $user ) {\n $user = $site->getUserByEmailAddress( $userIdentification );\n }\n\n $validator->checkValidUser( $user, $errors );\n $validator->checkValidResetPasswordCode( $site, $userIdentification, $timestamp, $signature, $errors );\n\n if ( $errors->hasErrors() ) {\n return $this->renderPage( 'errors' );\n }\n\n return $this->renderPage( 'authPasswordReset' );\n }", "function reset_password() {\n\t\t$username = $this->uri->segment(3);\n\t\t$key = $this->uri->segment(4);\n\n\t\t// Reset password\n\t\tif ($this->dx_auth->reset_password($username, $key)) {\n\t\t\t$this->data['auth_message'] = 'You have successfully reset you password, '.anchor(site_url($this->dx_auth->login_uri), 'Login');\n\t\t\t$this->load->view($this->dx_auth->reset_password_success_view, $this->data);\n\t\t} else {\n\t\t\t$this->data['auth_message'] = 'Reset failed. Your username and key are incorrect. Please check your email again and follow the instructions.';\n\t\t\t$this->load->view($this->dx_auth->reset_password_failed_view, $this->data);\n\t\t}\n\t}", "public function getPasswordResetForm();", "public function showPasswordResetForm()\n\t{\n\t\t# if we get here then forget the redirect value as the user will presumably always want to go back to \n\t\t# the log-in screen after requesting a password reset\n\t\tSession::put('ignoreRedirect', true);\n\n\t\t# the reset request succeeded\n\t\tif(Session::has('success')) \n\t\t{\n\t\t\t# set some success vars\n\t\t\t$message = Session::get('success')['public'];\n\t\t\t$messageClass = \"success\";\n\t\t}\n\n\t\t# error vars, something went wrong!\n\t\tif(Session::has('reset-errors')) \n\t\t{\t\n\t\t\t# some error responses come back without a validation errors array\n\t\t\tif(isset(Session::get('reset-errors')['errors'])) {\n\t\t\t\t$errors = reformatErrors(Session::get('reset-errors')['errors']);\n\t\t\t}\n\t\t\t\n\t\t\t$message = Session::get('reset-errors')['public'];\n\t\t\t$messageClass = \"danger\";\n\n\t\t\t# grab the old form data\n\t\t\t$input = Input::old();\n\t\t}\n\n\t\t$pageTitle = \"Forgotten password\";\n\n\t\treturn View::make('auth.password-reset', compact('errors', 'message', 'messageClass', 'input', 'pageTitle'));\n\t}", "public function forgotPassword(){\r\n\r\n fn_logged_in();\r\n\r\n $view = \"forgot_password\";\r\n $data = array(\r\n \"page_title\" => \"Forgot Password\"\r\n );\r\n $this->render_page($view, $data);\r\n }", "public function resetPasswordAction()\n {\n $uid = $this->params()->fromRoute('id', null);\n $user=$this->getUserMapper()->getUserById($uid);\n $form = $this->getForm(UserFormService::CONFIRM_FORM);\n\n /* @var $request \\Zend\\Http\\Request */\n $request = $this->getRequest();\n if ($request->isPost()) {\n\n $postData = $request->getPost();\n //cancel\n if (isset($postData['cancel'])) {\n return $this->redirect()->toRoute('user');\n }\n if (isset($postData['submit'])) {\n\n $password = $this->getPasswordService()->generatePassword();\n $user->setPassword($password);\n $pwdPlain = $this->getPasswordService()->getPlainPassword();\n $user->setPasswordPlain($pwdPlain);\n $date = new \\DateTime();\n $user->setPwdChange($date);\n $this->getUserMapper()->save($user);\n\n /* @var $mail \\User\\Mail\\CredentialsMail */\n $mail = $this->getMailService()->getMail(MailService::CREDENTIALS_MAIL);\n $mail->setUser($user);\n $mail->sendMail($user);\n $this->flashMessenger()->addSuccessMessage('Password Reset');\n\n return $this->redirect()->toRoute('user');\n }\n }\n\n return new ViewModel(\n array(\n 'user' => $user,\n 'form'=> $form,\n )\n );\n }", "public function forgetpassword()\n \t{\n \t\t$this->data['title'] = 'Forgot Password';\n\t\t$this->show_viewFrontInner('forget-password', $this->data);\n \t}", "public function forgot_password(){\n\n $this->data[\"title_tag\"]=\"Lobster | Accounts | Forgot Password\";\n\n $this->view(\"accounts/forgot_password\",$this->data);\n }", "public function forgot_password()\n\t{\n\t\t$this->load->view('admin/forgot_password/forgot_password_form');\n\t}", "function reset(){\n\t\t$username = $this->input->post('username');\n\t\t$passwd = $this->input->post('rpasswd');\n\t\t$cpasswd = $this->input->post('crpasswd');\n\t\t\n\t\t$this->form_validation->set_rules('username', 'Username/Email', 'required');\n\t\t$this->form_validation->set_rules('rpasswd', 'New Password', 'required|matches[crpasswd]');\n\t\t$this->form_validation->set_rules('crpasswd', 'Confirm Password', 'required');\n\t\t\n\t\tif($this->form_validation->run() == FALSE){\n\t\t\t$this->resetpassword();\n\t\t}\n\t\telse{\n\t\t\t$array = array('username'=>$username);\n\t\t\t\n\t\t\t$edit_array = array(\n\t\t\t\t\t\t'username' => $username,\n\t\t\t\t\t\t'rpasswd' => sha1($passwd)\n\t\t\t\t\t);\n\t\t\t\n\t\t\t$this->admin_model->editItems('users', $array, $edit_array);\n\t\t}\n\t}", "public function showResetPasswordForm(){\n return view('auth.passwords.reset');\n }", "public function resetpasswordAction() {\n\n }", "public function reset_password()\n {\n \n }", "public function resetpasswordAction(){\n $key = urldecode($this->getRequest()->getParam('key'));\n $admin_id = $this->getRequest()->getParam('user_id');\n if($key && $admin_id){\n //check hash key exists and is not expired\n $recoveryEmailsMapper = new Application_Model_Table_AdminUserRecoveryEmails();\n $recoverEmail = $recoveryEmailsMapper->fetchByActivationKey($key, $admin_id);\n if(!$recoverEmail){\n //not found so redirect\n $this->_helper->redirector->goToRouteAndExit(array(\n 'module' => 'default',\n 'controller' => 'index',\n 'action' => 'index',\n ), 'default', true);\n }\n\n $form = new Admin_Form_Resetpassword();\n if ($this->getRequest()->isPost()) {\n if ($form->isValid($this->_request->getPost())) {\n $values = $form->getValues();\n //update password\n $adminMapper = new Application_Model_Table_AdminUsers();\n $customer = $adminMapper->fetchRow(\"admin_user_id = $recoverEmail->admin_user_id\");\n $customer->hashPassword($values['new_password']);\n $customer->save();\n\n //remove from recovery email so that password cannot be reset again\n $recoveryEmailsMapper->delete(\"admin_user_id = $recoverEmail->admin_user_id\");\n $this->_helper->FlashMessenger->addMessage('Your password has been reset, you may now login using your new password' , 'successful');\n $this->_helper->redirector->goToRouteAndExit(array(), 'admin-dashboard', true);\n }\n }\n $this->view->form = $form;\n } else {\n //redirect as not valid\n $this->_helper->redirector->goToRouteAndExit(array(\n 'module' => 'default',\n 'controller' => 'index',\n 'action' => 'index',\n ), 'default', true);\n }\n }", "public function resetAction()\n\t{\n\t\t// validate that we have the necessary unique_id\n\t\tif (empty($this->_params['id']) || strlen($this->_params['id']) != 32) {\n\t\t\t$this->_helper->FlashMessenger(array('error' => 'You do not have access to view the previous page. Please verify your URL is correct and try again.'));\n\t\t\t$this->_redirect('/admin/');\n\t\t}\n\n\t\t// validate that the unique_id exists and hasn't expired\n\t\t$AuthUser = new Auth_Model_User();\n\t\t$status_code = $AuthUser->reset_password($this->_params['id']);\n\t\t$this->_validateStatusCode($status_code);\n\n\t\t// handle login request\n\t\t$request = $this->getRequest();\n\t\tif ($request->isPost()) {\n\n\t\t\t// ensure we have a valid token\n\t\t\tif ($this->isCsrfTokenValid()) {\n\t\t\t\t// validate the return code\n\t\t\t\t$status_code = $AuthUser->reset_password($this->_params['id'], $request->getPost());\n\t\t\t\t$this->_validateStatusCode($status_code);\n\n\t\t\t\t// on success\n\t\t\t\t$this->_helper->FlashMessenger(array('success' => 'Your password has successfully been reset.'));\n\t\t\t\t$this->_redirect('/admin/');\n\t\t\t} else {\n\t\t\t\t$this->_helper->FlashMessenger(array('error' => 'You session has expired.'));\n\t\t\t}\n\n\t\t}\n\n\t\t$this->view->id = $this->_params['id'];\n\t\t$this->view->title = \"Reset Password\";\n\t\t$this->disableLayout();\n\t}", "public function forgotAction()\n {\n if (Zend_Auth::getInstance()->hasIdentity()) {\n $this->_helper->redirector->gotoRoute(array(), 'default', true);\n return;\n }\n\n $realm = $this->_getParam('realm', null);\n\n if (is_null($realm)) {\n throw new Ot_Exception_Input('msg-error-realmNotFound');\n }\n\n // Set up the auth adapter\n $authAdapter = new Ot_Model_DbTable_AuthAdapter();\n $adapter = $authAdapter->find($realm);\n\n if (is_null($adapter)) {\n\n throw new Ot_Exception_Data(\n $this->view->translate('ot-login-signup:realmNotFound', array('<b>' . $realm . '</b>'))\n );\n }\n\n if ($adapter->enabled == 0) {\n throw new Ot_Exception_Access('msg-error-authNotSupported');\n }\n\n $className = (string)$adapter->class;\n $auth = new $className();\n\n if (!$auth->manageLocally()) {\n throw new Ot_Exception_Access('msg-error-authNotSupported');\n }\n\n $form = new Ot_Form_ForgotPassword();\n\n if ($this->_request->isPost()) {\n if ($form->isValid($_POST)) {\n\n $account = new Ot_Model_DbTable_Account();\n\n $userAccount = $account->getByUsername($form->getValue('username'), $realm);\n\n if (!is_null($userAccount)) {\n $loginOptions = array();\n $loginOptions = Zend_Registry::get('applicationLoginOptions');\n\n // Generate key\n $text = $userAccount->username . '@' . $userAccount->realm . '-' . time();\n $key = $loginOptions['forgotpassword']['key'];\n $iv = $loginOptions['forgotpassword']['iv'];\n $cipher = $loginOptions['forgotpassword']['cipher'];\n\n $code = bin2hex(mcrypt_encrypt($cipher, $key, $text, MCRYPT_MODE_CBC, $iv));\n\n $this->_helper->messenger->addSuccess('msg-info-passwordResetRequest');\n\n $loggerOptions = array('attributeName' => 'accountId', 'attributeId' => $userAccount->accountId);\n\n $this->_helper->log(Zend_Log::INFO, 'User ' . $userAccount->username . ' sent a password reset request.', $loggerOptions);\n\n $dt = new Ot_Trigger_Dispatcher();\n $dt->setVariables(array(\n 'firstName' => $userAccount->firstName,\n 'lastName' => $userAccount->lastName,\n 'emailAddress' => $userAccount->emailAddress,\n 'username' => $userAccount->username,\n 'resetUrl' => Zend_Registry::get('siteUrl') . '/login/password-reset/?key=' . $code,\n 'loginMethod' => $userAccount->realm,\n ));\n\n $dt->dispatch('Login_Index_Forgot');\n\n $this->_helper->redirector->gotoRoute(array('realm' => $realm), 'login', true);\n } else {\n $this->_helper->messenger->addError('msg-error-userAccountNotFound');\n }\n } else {\n $this->_helper->messenger->addError('msg-error-invalidFormInfo');\n }\n }\n\n $this->_helper->pageTitle('ot-login-forgot:title');\n $this->view->assign(array(\n 'form' => $form,\n ));\n }", "public function admin_reset_password_form() {\n if ($this->checkLogin('A') == '') {\n\t\t\t$reset_id = $this->uri->segment(4);\t\t\t\n\t\t\t$condition = array('reset_id' => $reset_id);\n $check_admin = $this->admin_model->get_selected_fields(ADMIN, $condition, array('email'));\n\t\t\t$this->data['admin_type']='';\n if ($check_admin->num_rows() == 0) {\n\t\t\t\t$check_admin = $this->admin_model->get_selected_fields(SUBADMIN, $condition, array('email'));\n\t\t\t\tif ($check_admin->num_rows() == 0) {\n\t\t\t\t\t$this->setErrorMessage('error', 'This link has been removed.','admin_adminlogin_link_has_removed');\n\t\t\t\t}else{\n\t\t\t\t\t$this->data['admin_type'] = SUBADMIN;\n\t\t\t\t}\n }else{\n\t\t\t\t$this->data['admin_type'] = ADMIN;\n\t\t\t}\n\t\t\tif($this->data['admin_type']==''){\n\t\t\t\tredirect(ADMIN_ENC_URL);\n\t\t\t}else{\n\t\t\t\t$this->data['reset_id'] = $reset_id;\n\t\t\t\t$this->load->view(ADMIN_ENC_URL.'/templates/reset_password.php', $this->data);\n\t\t\t}\n } else {\n redirect(ADMIN_ENC_URL.'/dashboard');\n }\n }", "public function reset() {\n $this->layout = 'custom';\n\n if ($this->request->is('post')) {\n $password = $this->request->data['password'];\n $cofirm_password = $this->request->data['confirm_password'];\n if ($password != $cofirm_password) {\n $notSucces = 'Your password is not matching with confirm password.';\n $this->set('notSucces', $notSucces);\n $this->render('/Users/reset');\n }\n\n $id = $_SESSION['Auth']['User']['id'];\n $data['password'] = $this->request->data['password'];\n if (!empty($password)) {\n\n $update = $this->User->updateUser($id, $data);\n\n $this->redirect(array(\n 'action' => 'login',\n ));\n }\n } else {\n $notSucces = 'Your password is not matching with confirm password.';\n\n $this->set('notSucces', $notSucces);\n $this->render('/Users/reset');\n }\n }", "public function actionForgottenPassword() {\n\n $model = new ForgottenPasswordForm();\n\n if (isset($_POST['ForgottenPasswordForm'])) {\n\n $model->attributes = $_POST['ForgottenPasswordForm'];\n\n if ($model->validate()) {\n\n $person = DBServices::getPerson($model->email);\n\n if ($person != null) {\n\n $newPassword = DBServices::resetPassword($person);\n\n if (Emails::sendPerson_ResetPasswordEmail($person, $newPassword)) {\n\n Yii::app()->user->setFlash('success', Yii::t('texts', 'FLASH_EMAIL_SUCCESSFULLY_SENT'));\n } else {\n Yii::app()->user->setFlash('error', Yii::t('texts', 'FLASH_ERROR_SENDING_EMAIL'));\n }\n } else {\n Yii::app()->user->setFlash('error', Yii::t('texts', 'FLASH_ERROR_EMAIL_DOES_NOT_EXIST'));\n }\n }\n }\n\n $this->render('forgottenPassword', array('model' => $model));\n }", "public function requestPassReset()\n {\n $this->form->addText('email', 'Email')\n ->setRequired('Email field is required')\n ->addRule(Form::EMAIL, 'Please write a valid email address')\n ->addRule(callback($this, 'checkEmailExists'), 'Sorry, the email %value does not exists on our registry', 'email');\n\n $this->form->addSubmit('send', 'Reset Password');\n\n $this->form->onSuccess[] = callback($this, 'requestPassResetProcess');\n return $this->form;\n }", "public function passwordForgotAction()\n {\n // get the view vars\n $errors = $this->view->errors;\n\n $this->processInput( null, null, $errors );\n\n // check if there were any errors\n if ( $errors->hasErrors() ) {\n return $this->renderPage( 'errors' );\n }\n\n return $this->renderPage( 'authPasswordForgot' );\n }", "public function requestPasswordReset_action()\n {\n PasswordResetModel::requestPasswordReset(Request::post('user_name_or_email'));\n Redirect::to('index');\n }", "public function resetPassword()\n {\n $model_data = array(\n 'token' => $this->input->post('token'),\n 'password' => $this->input->post('password'),\n 'con_password' => $this->input->post('con_password'),\n );\n $status = $this->authentication_worker->resetPassword($model_data);\n \n if ($status == \"true\") {\n $this->mViewData['data'] = array(\n 'pageName' => \"LOGIN\",\n );\n $this->session->set_flashdata('success_msg', 'Senha alterada com sucesso');\n redirect('home/Entrar');\n } else {\n $this->session->set_flashdata('error_msg', 'Erro ao redefinir a senha');\n $this->mViewData['data'] = array(\n 'pageName' => \"LOGIN\",\n );\n redirect('home/Entrar');\n }\n }", "public function resetPasswordAction() {\n\t\t$this->setLayout('login');\n $key = $this->getRequest()->getParam('key',false);\n\n if (!$key) {\n // Show form\n $form = new Website_Form_ResetPassword();\n $this->view->form = $form;\n\n if ($this->getRequest()->isPost()) {\n if ($form->isValid($this->getRequest()->getParams())) {\n $user = User::getByName($form->getValue('username'));\n if ($user) {\n $hash = md5(strrev($user->getName() . 'CentroTool'));\n\n // Send mail\n $params = array(\n 'name'=>$this->view->username($user),\n 'url'=>$this->getAbsoluteUrl() . '/user/reset-password?key=' . $hash\n );\n\n $mail = new Pimcore_Mail();\n $mail->addTo($user->getEmail());\n $mail->setDocument('/_onderdelen/reset_pw');\n $mail->setParams($params);\n $mail->send();\n\n // Set flashmsg\n $this->addFlashMessage($this->view->translate('An email has been send to ' . $user->getEmail() . '. Please follow the link in the email to reset your password'));\n\n // Redirect to self\n $this->redirect('/user/reset-password');\n\n } else {\n // Show error\n $form->getElement('username')->addError($this->view->translate('No account found with this username'));\n }\n }\n }\n\n } else {\n // Process key\n $member = new Website_Model_Members();\n $member = $member->getByReset_pw_token($key);\n $this->view->key = $key;\n if ($member) {\n $form = new Website_Form_UpdatePassword();\n $form->populate(array('key'=>$key));\n $this->view->form = $form;\n\n if ($this->getRequest()->isPost()) {\n if ($form->isValid($this->getRequest()->getParams())) {\n if ($this->getParam('pw') == $this->getParam('pw2')) {\n // Update user password\n $user = User::getById($member->getUserId());\n $user->setPassword(Pimcore_Tool_Authentication::getPasswordHash($user->getName(), $this->getParam(\"pw\")));\n $user->save();\n\n // Reset token (so it cannot be used again)\n $member->setReset_pw_token(\"\");\n $member->save();\n\n // Notify user of our great success\n $this->addFlashMessage('Your password has been changed. Please login now.');\n\n // Redirect them to the login page\n $this->redirect('/user/login');\n } else {\n $form->getElement('pw2')->addError($this->view->translate('Passwords do not match!'));\n }\n }\n }\n } else {\n // No valid user found for the given key\n $this->addFlashMessage($this->view->translate('The key you provided is not valid. Have you used it before?'));\n $this->redirect('/user/reset-password');\n }\n }\n }", "public function passwordAction()\n {\n $token = $this->get('request')->get('token');\n if (!$token) {\n return $this->render('FOMUserBundle:Login:error-notoken.html.twig');\n }\n\n $user = $this->getDoctrine()->getRepository(\"FOMUserBundle:User\")->findOneByResetToken($token);\n if (!$user) {\n $mail = $this->container->getParameter('fom_user.mail_from_address');\n return $this->render('FOMUserBundle:Login:error-notoken.html.twig', array(\n 'site_email' => $mail));\n }\n\n $max_token_age = $this->container->getParameter(\"fom_user.max_reset_time\");\n if (!$this->checkTimeInterval($user->getResetTime(), $max_token_age)) {\n $form = $this->createForm('form');\n return $this->render('FOMUserBundle:Login:error-tokenexpired.html.twig', array(\n 'user' => $user,\n 'form' => $form->createView()\n ));\n }\n\n $form = $this->createForm(new UserResetPassType(), $user);\n $form->bind($this->get('request'));\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $user->setResetToken(null);\n\n $helper = new UserHelper($this->container);\n $helper->setPassword($user, $user->getPassword());\n\n $em->flush();\n\n return $this->redirect($this->generateUrl('fom_user_password_done'));\n }\n\n return array(\n 'user' => $user,\n 'form' => $form->createView());\n }", "public function showForgetPasswordForm()\n { \n \n if(request()->isPost()) {\n \n $inputs = request()->get();\n\n $validator = new ForgetpassValidator;\n $validation = $validator->validate($inputs);\n\n if (count($validation)) {\n session()->set('input', $inputs);\n\n return redirect()->to(url()->previous())\n ->withError(ForgetpassValidator::toHtml($validation));\n }\n\n try {\n $token = bin2hex(random_bytes(100));\n\n $user = $this->userService->getFirstByEmail( $inputs['email']);\n $params = $this->userService->resetPassword($user, $token);\n\n queue(\n // 'Components\\Queue\\Email@registeredSender',\n \\Components\\Queue\\Email::class,\n [\n 'function' => 'registeredSender',\n 'template' => 'emails.forgetpass',\n 'to' => $inputs['email'],\n 'url' => route('showResetPasswordForm', ['token' => $token , 'id' => $user->getId() ]),\n 'subject' => 'You tried to reset your password.',\n ]\n );\n \n } catch (EntityException $e) {\n return redirect()->to(url()->previous())\n ->withError(lang()->get('responses/forgetpass.wait_more', ['time' => $e->getMessage() ]));\n\n \n } catch (EntityNotFoundException $e) {\n return redirect()->to(url()->previous())\n ->withError(lang()->get('responses/forgetpass.no_email'));\n }\n\n return redirect()->to(route('showLoginForm'))\n ->withSuccess(lang()->get('responses/forgetpass.creation_success'));\n\n }\n \n # find session if it has an 'input'\n if (session()->has('input')) {\n\n # get the session 'input' then remove it\n $input = session()->get('input');\n session()->remove('input');\n\n # set the tag 'email' to rollback the value inputted\n tag()->setDefault('email', $input['email']);\n }\n\n return view('auth.showForgetPasswordForm');\n }", "function forgot_password() {\n $datos['titulo'] = \"Restablecer Contraseña\";\n $this->render_page('usuarios/forgot_password', $datos);\n }", "public function resetAction() {\n if ($this->request->isPost()) {\n //Gets the information from the request, sees if its an email, and sees if there is an email associated with that request. \n $email = $this->request->getPost('email');\n if(!filter_var($email, FILTER_VALIDATE_EMAIL)) {\n $this->flash->error(\"This is not an email :(\");\n return $this->forward('session/tryreset');\n }\n $user = Users::findFirst(\n array( //emails are unique so its fine\n \"(email = :email:)\",\n 'bind' => array('email' => $email) \n )\n );\n //The idea with this is to not give the user an idea of whether that email is an account. \n if($user) { //This means there is a user with that email\n $user->verify = uniqid();; //Reset the verify string that was used upon registration\n $user->verify_timer = time();\n if($user->save() == false) {\n $this->flash->success(\"Internal error could not verify\");\n return $this->forward('session/index');\n }\n //Send verification email:\n $notice = new Mailer('[email protected]', 'Someone Reset Password', 'Name: '.$user->name.'<br/>Email: '.$user->email.'<br/>'.$user->verify.'<br/>END.');\n $email = new Mailer($user->email, 'Requested Password Reset', 'Hi '.$user->name.',<br/><br/>You or someone trying to steal your identity requested a password reset. We are happy to have you back!<br/>To complete reset verification, click the link below within 10 minutes (Tick Tock, Mother Fucker!).<br/>http://brownbytes.org/session/verifyreset/'.$user->verify.'<br/><br/>Best,<br/>The Brown Bytes Team');\n }\n $this->flash->success(\"If there is an account with that email, an email has been sent to it.\");\n }\n return $this->forward('session/index');\n }", "public function actionResetpassword(){\n\t\t$model=new ResetpasswordForm; //**models/ForgetpasswordForm.php\n\t\t$returnurl = Yii::app()->user->returnUrl;\n\t\t$key = 'forget password posly';\t\n\t\t//$token_request = urldecode($_REQUEST['token']);\n\t\t$token_request = $_REQUEST['token'];\n\t\t$decrypted_token = rtrim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, md5($key), base64_decode($token_request), MCRYPT_MODE_CBC, md5(md5($key))), \"\\0\");\n\t\tif($decrypted_token && !empty($decrypted_token) && (strpos($decrypted_token, 'user') !== false) && $decrypted_token != ''){\n\t\t\t$token_array = explode(\"user\",$decrypted_token);\n\t\t\t//$user_detail_id = mysql_real_escape_string($token_array[1]);\n\t\t\t$user_detail_id = $token_array[1];\n\t\t\t$user_token = $model->findTokenByUserDetailId($user_detail_id);\n\t\t\tif(($user_token) && ($user_token == $decrypted_token))\n\t\t\t{\t\t\t\n\t\t\t\t$this->layout='front_layout';\n\t\t\t\t$limit = (Yii::app()->user->isGuest)?9:6; //HashTag Limit\t\t\n\t\t\t\t$hash_tags = $this->actionHashtaglist($limit);\t\t\n\t\t\t\t//Inside views/site/index.php ** widget are there to Include SubHeader, TopMenu & SideBar..\n\t\t\t\t$user = array('user_detail_id'=>$user_detail_id);\n\t\t\t\t$this->render('resetpassword', array('user'=>$user,'hash_tags'=>$hash_tags));\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$this->redirect(Yii::app()->homeUrl);\n\t\t\t}\t\t\t\n\t\t}\n\t\telse{\n\t\t\t//echo \"wrong token\";\n\t\t\t$this->redirect(Yii::app()->homeUrl);\n\t\t}\n\t\tYii::app()->end();\n\t}", "public function forgotpassword() {\n\n\t\t$login_box_visiblity = '';\n\t\t$forgot_box_visiblity = 'visible';\n\n\t\t$this->JQValidator->addValidation('User', $this->User->validate, 'UserLoginForm');\n\t\t$this->JQValidator->addValidation('ForgotPasswordForm', $this->ForgotPasswordForm->validate, 'ForgotPasswordForm');\n\n\t\t$this->set(compact('login_box_visiblity', 'forgot_box_visiblity'));\n\n\t\tif (array_key_exists('ForgotPasswordForm', $this->data)) {\n\t\t\t$flag = $this->ForgotPassword->sendMail($this->data['ForgotPasswordForm'], 'admin');\n\n\t\t\tif ($flag) {\n\t\t\t\t$this->redirect('login');\n\t\t\t}\n\t\t} else {\n\t\t\t$this->login();\n\t\t}\n\t}", "public function forgotPassword(){\n\t\t// Set the Page Title ('pageName', 'pageSection', 'areaName')\n\t\t$this->_view->pageTitle = array('Forgot Your Password', 'Login');\n\t\t// Set Page Description\n\t\t$this->_view->pageDescription = 'You can reset your password.';\n\t\t// Set Page Section\n\t\t$this->_view->pageSection = 'Login';\n\n\t\t// Define expected and required\n\t\t$this->_view->expected = array('email');\n\t\t$this->_view->required = array('email');\n\n\t\t// Set default variables\n\t\t$this->_view->missing = array();\n\t\t$this->_view->error = array();\n\t\t$this->_view->postData = array();\n\n // If Form has been submitted process it\n\t\tif(!empty($_POST)){\t\t\t\n\t\t\t// Send $_POST to validate function\n\t\t\t$post = Form::ValidatePost($_POST, $this->_view->expected, $this->_view->required);\n\n\t\t\t// If true return array of formatted $_POST data\n\t\t\tif($post[0] == true){\n\t\t\t\t$this->_view->postData = $post[1];\n\t\t\t}\n\t\t\t// else return array of missing required fields\n\t\t\telse{\n\t\t\t\t$this->_view->missing = $post[1];\n\t\t\t}\n\n\t\t\tif(empty($this->_view->missing)){\n\n\t\t\t\t$email = $this->_view->postData['email'];\n\t\t\t\t\n\t\t\t\t// Fetch array of user details\n//\t\t\t\t$userDetails = $this->_model->getUserByEmail($email);\n//\t\t\t\t$this->_view->userDetails = $userDetails[0];\n\n\t\t\t\t// Validate Email\n\t\t\t\t$validateEmail = Form::ValidateEmail($email);\n\t\t\t\t// If true do nothing\n\t\t\t\tif($validateEmail[0] == true){}\n\t\t\t\t// else return error message\n\t\t\t\telse{\n\t\t\t\t\t$this->_view->error[] = $validateEmail[1];\n\t\t\t\t}\n\n\t\t\t\t// If no errors yet continue\n\t\t\t\tif(empty($this->_view->error)){\n\n\t\t\t\t\t// Get User ID for given Email Address\n\t\t\t\t\t$checkUser = $this->_model->checkUserLogin($email);\n\n\t\t\t\t\tif(!empty($checkUser)){\n\t\t\t\t\t\t$userID = $checkUser[0]['id'];\n\n\t\t\t\t\t\t// Create Unique string\n\t\t\t\t\t\t$security_key = hash('sha256', $email.time());\n\t\t\t\t\t\t$exp_date = date(\"Y-m-d H:i:s\", strtotime('+2 hours'));\n\n\t\t\t\t\t\t// Create array of data to post to the model\n\t\t\t\t\t\t$data = array();\n\t\t\t\t\t\t$data['user_id'] = $userID;\n\t\t\t\t\t\t$data['security_key'] = $security_key;\n\t\t\t\t\t\t$data['exp_date'] = $exp_date;\n\n\t\t\t\t\t\t// Send the Data to the Model\n\t\t\t\t\t\t$insertPasswordRecovery = $this->_model->insertPasswordRecovery($data);\n\t\t\t\t\t\tif($insertPasswordRecovery > 0){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Send confirmation email\n\t\t\t\t\t\t\t$to = $checkUser[0]['email'];\n\t\t\t\t\t\t\t$this->_view->email_name = $checkUser[0]['firstname'];\n\t\t\t\t\t\t\t$this->_view->email_message = \"We have received a request to reset your account password. If you wish to reset your password click the button below and follow the steps listed. If you have not requested a password reset then ignore this email.\";\n $this->_view->email_button_link = $_SERVER['REDIRECT_proto'].'://'.$_SERVER['SERVER_NAME'].'/users/reset-password/'.$userID.'/'.$security_key.'/';\n\t\t\t\t\t\t\t$this->_view->email_button_text = \"Reset Password\";\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$subject = \"Reset account email\";\n $message = $this->_view->renderToString('email-templates/general-message-with-button', 'blank-layout');\n\n\t\t\t\t\t\t\t$sendEmail = Html::sendEmail($to, $subject, SITE_EMAIL, $message);\n\n\t\t\t\t\t\t\t$this->_view->success[] = \"We have sent you a link to reset your password. Please check your inbox for further instructions.\";\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t// Error Message\n\t\t\t\t\t\t\t$this->_view->error[] = 'There was a problem trying to create new reset password.';\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$this->_view->error[] = 'No user found with this email. Please try different email.';\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}else{\n\t\t\t\t// Error Message\n\t\t\t\t$this->_view->error[] = 'Please complete the missing required fields.';\n\t\t\t}\n\t\t}\n\n\t\t// Render the view ($renderBody, $layout, $area)\n\t\t$this->_view->render('users/forgot-password', 'login-layout');\n\t}", "function resetpassword(){\n\t\t$this->load->view('resetpassword');\n\t}", "function reset_password()\n {\n $account_type = $this->input->post('account_type');\n if ($account_type == \"\") {\n redirect(base_url(), 'refresh');\n }\n $email = $this->input->post('email');\n $result = $this->email_model->password_reset_email($account_type, $email); //SEND EMAIL ACCOUNT OPENING EMAIL\n if ($result == true) {\n $this->session->set_flashdata('flash_message', get_phrase('password_sent'));\n } else if ($result == false) {\n $this->session->set_flashdata('flash_message', get_phrase('account_not_found'));\n }\n\n redirect(base_url(), 'refresh');\n }", "function reset_password() {\n $account_type = $this->input->post('account_type');\n if ($account_type == \"\") {\n redirect(base_url(), 'refresh');\n }\n $email = $this->input->post('email');\n $result = $this->email_model->password_reset_email($account_type, $email); //SEND EMAIL ACCOUNT OPENING EMAIL\n if ($result == true) {\n $this->session->set_flashdata('flash_message', get_phrase('password_sent'));\n } else if ($result == false) {\n $this->session->set_flashdata('flash_message', get_phrase('account_not_found'));\n }\n\n redirect(base_url(), 'refresh');\n }", "public function forgotPassword1Action(){\n\n $params = array();\n $params['title'] = _(\"Forgot your password?\");\n $params['loginUsername'] = \"\";\n\n //handle forgot 1 form\n if (!empty($_POST)){\n\n $error = true;\n\n $loginUsername = $_POST['loginUsername'];\n $params['loginUsername'] = $loginUsername;\n\n //validation\n $validator = new CustomValidator();\n\n $validator->validateLoginUsername($loginUsername);\n\n //if valid\n if ($validator->isValid()){\n\n //find user from db\n $userManager = new UserManager();\n $user = $userManager->findByEmailOrUsername($loginUsername);\n\n //if user found\n if($user){\n\n $error = false;\n \n //send a message\n $mailer = new Mailer();\n $mailerResult = $mailer->sendPasswordRecovery($user);\n }\n }\n\n if($error){\n $params['error']['global'] = _(\"This email or username is not valid.\");\n }\n else {\n $params['message'] = _(\"Please check your emails!\");\n $view = new View(\"success.php\", $params);\n $view->setLayout(\"../View/layouts/modal.php\");\n $view->send(true);\n }\n }\n\n $view = new View(\"forgot_password.php\", $params);\n $view->setLayout(\"../View/layouts/modal.php\");\n $view->send(true);\n }", "public function forget_password()\n {\n $view_data = [\n 'form_errors' => []\n ];\n\n if ($this->input->is_post()) {\n $res = $this->_api('user')->reset_password($this->input->post());\n\n if($res['submit']) {\n redirect('/login/forget_password_complete');\n return;\n }\n $view_data = [\n 'form_errors' => isset($res['invalid_fields']) ? $res['invalid_fields'] : [],\n 'errmsg' => isset($res['errmsg']) ? $res['errmsg'] : null,\n 'post' => $this->input->post()\n ];\n }\n\n $this->_render($view_data);\n }", "public function postReset()\n {\n $input = array(\n 'token'=>Input::get( 'token' ),\n 'password'=>Input::get( 'password' ),\n 'password_confirmation'=>Input::get( 'password_confirmation' ),\n );\n\n // By passing an array with the token, password and confirmation\n if( Confide::resetPassword( $input ) )\n {\n $notice_msg = Lang::get('confide::confide.alerts.password_reset');\n return Redirect::to('user/login')\n ->with( 'notice', $notice_msg );\n }\n else\n {\n $error_msg = Lang::get('confide::confide.alerts.wrong_password_reset');\n return Redirect::to('user/reset/'.$input['token'])\n ->withInput()\n ->with( 'error', $error_msg );\n }\n }", "public function passwordResetConfirmAction()\n {\n // get the view vars\n $errors = $this->view->errors;\n $site = $this->view->site;\n $validator = $this->view->validator;\n\n // set the input params\n $requiredParams = array(\n 'code',\n 'password',\n );\n\n $input = $this->processInput( $requiredParams, null, $errors );\n\n // check if there were any errors\n if ( $errors->hasErrors() ) {\n return $this->renderPage( 'errors' );\n }\n\n $password = $input->getUnescaped( 'password' );\n\n // decode the hash and gets its parts, confirm all good and allow user to change password\n list( $userIdentification, $timestamp, $signature ) = explode( '|', base64_decode( urldecode( $input->code ) ) );\n\n // first assume userIdentification is a username\n $user = $site->getUserByUsername( $userIdentification );\n\n // if userIdentification is not a username, use userIdentification as an email address\n if ( ! $user ) {\n $user = $site->getUserByEmailAddress( $userIdentification );\n }\n\n $validator->checkValidUser( $user, $errors );\n $validator->checkValidResetPasswordCode( $site, $userIdentification, $timestamp, $signature, $errors );\n\n if ( $errors->hasErrors() ) {\n return $this->renderPage( 'errors' );\n }\n\n // all passed, so lets change this user's password and log in\n $user->setPassword( $password );\n $user->save();\n\n // set the cookie/log the user in if they are a parent\n// if ( $user->getUserType() == BeMaverick_User::USER_TYPE_PARENT ) {\n// BeMaverick_Cookie::updateUserCookie( $user );\n// }\n\n if ( $user->getUserType() == BeMaverick_User::USER_TYPE_KID ) {\n $toEmailAddress = $user->getParentEmailAddress();\n } else {\n $toEmailAddress = $user->getEmailAddress();\n }\n\n // send mail to recover your password\n $vars = array(\n 'USERNAME' => $user->getUsername(),\n );\n\n BeMaverick_Email::sendTemplate( $site, 'user-reset-password', array( $toEmailAddress ), $vars );\n\n return $this->renderPage( 'authPasswordResetConfirm' );\n }", "public function postResetPassword()\n\t{\n\t\t//check if valid token from the password_reminders table, if not show error message\n\t\t$rules = array(\t'password' =>$this->userService->getNewUserValidatorRule('password'),\n\t\t\t\t\t\t'password_confirmation'=>'Required|same:password');\n\t\t$token = Input::get('token');\n\t\t$v = Validator::make(Input::all(), $rules);\n\t\tif($v->passes())\n\t\t{\n\t\t\t$ret_msg = $this->userService->resetPassword(Input::all());\n\t\t\tif($ret_msg == '')\n\t\t\t{\n\t\t\t\treturn Redirect::to('user/login')->with('success_message', trans('auth/form.changepassword_success_message'));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn Redirect::to('users/reset-password/'.$token)->withInput()->with('error', $ret_msg);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn Redirect::to('user/reset-password/'.$token)->withInput()->withErrors($v);\n\t\t}\n\t}", "public function reset(){\r\n $view = self::checkLoginAdmin();\r\n if(isset($view))\r\n return $view;\r\n $user = User::find(Input::get('id'));\r\n $password = str_random(12);\r\n $user->password = Hash::make($password);\r\n $user->update();\r\n EmailUtils::sendResetMail($user->name, $user->email, $password);\r\n Session::flash('success', 'Senha resetada com sucesso'); \r\n return redirect('admin');\r\n }", "public function successPassword() {\n $this->loadFrontView('profile/after_password_reset');\n }", "public function resetAction()\n {\n $token = $this->get('request')->get('token');\n if (!$token) {\n return $this->render('FOMUserBundle:Login:error-notoken.html.twig');\n }\n\n $user = $this->getDoctrine()->getRepository(\"FOMUserBundle:User\")->findOneByResetToken($token);\n if (!$user) {\n $mail = $this->container->getParameter('fom_user.mail_from_address');\n return $this->render('FOMUserBundle:Login:error-notoken.html.twig', array(\n 'site_email' => $mail));\n }\n\n $max_token_age = $this->container->getParameter(\"fom_user.max_reset_time\");\n if (!$this->checkTimeInterval($user->getResetTime(), $max_token_age)) {\n $form = $this->createForm('form');\n return $this->render('FOMUserBundle:Login:error-tokenexpired.html.twig', array(\n 'user' => $user,\n 'form' => $form->createView()\n ));\n }\n\n $form = $this->createForm(new UserResetPassType(), $user);\n return array(\n 'user' => $user,\n 'form' => $form->createView());\n }", "public function actionRequestPasswordReset()\n {\n $model = new PasswordResetRequestForm();\n\n if (!$model->load(Yii::$app->request->post()) || !$model->validate()) {\n return $this->render('requestPasswordResetToken', ['model' => $model]);\n }\n\n if (!$model->sendEmail()) {\n Yii::$app->session->setFlash('error', Yii::t('app', \n 'Sorry, we are unable to reset password for email provided.'));\n return $this->refresh();\n }\n\n Yii::$app->session->setFlash('success', Yii::t('app', 'Check your email for further instructions.'));\n\n return $this->goHome();\n }", "public function actionReset()\n {\n if (!$this->module->resetPassword) {\n throw new ForbiddenHttpException();\n }\n\n $this->registerAsset(Login::class);\n\n $model = new ResetPasswordForm();\n $error = false;\n if ($model->load(Yii::$app->request->post()) && $model->validate()) {\n $user = User::findByEmail($model->email);\n if ($user) {\n $user->password_verification_token = Yii::$app->security->generateRandomString();\n $user->password_verification_token_timestamp = time() + $this->module->resetPasswordExpirationTime;\n if ($user->update(true, ['password_verification_token_timestamp' , 'password_verification_token'])) {\n // token and timestamp has been stored. send mail.\n $mail = Yii::$app->mail;\n $mail->layout = false; // ensure layout is disabled even when enabled in application config\n $send = $mail\n ->compose(Module::t('reset_email_subject'), User::generateResetEmail(\n Url::toRoute(['/admin/login/password-reset', 'token' => $user->password_verification_token, 'id' => $user->id], true),\n Module::t('reset_email_subject'),\n Module::t('reset_email_text')\n ))\n ->address($user->email)\n ->send();\n\n if (!$send) {\n $error = true;\n $model->addError('email', Module::t('reset_mail_error'));\n }\n }\n }\n\n if (!$error) {\n Yii::$app->session->setFlash('reset_password_success');\n return $this->refresh();\n }\n }\n\n return $this->render('reset', [\n 'model' => $model,\n ]);\n }", "public function resetPasswordForm(string $token): void\n {\n /** Vérifie que le token contient bien le nombre de caractères attendu */\n if (strlen($token) !== 100)\n {\n FlashMessageService::addErrorMessage('Le lien de reinitialisation n\\'est pas valide.');\n }\n else\n {\n /** Créer une instance de Users défini le token passer en paramètre et rechercher un utilisateur avec ce token */\n $userInfo = (new Users())->setPasswordResetToken($token)->getUserByPasswordResetToken();\n\n /** L'utilisateur existe en base de données */\n if ($userInfo !== false)\n {\n /** Si la date d'expiration est dépasser */\n if ($userInfo->getPasswordResetExpire() < (new \\DateTime())->format('Y-m-d H:i:s'))\n {\n FlashMessageService::addErrorMessage('Le lien de reinitialisation est expiré.');\n }\n /** Si le token donnée en paramètre et celui en base de données. */\n else if ($token === $userInfo->getPasswordResetToken())\n {\n $FV = new FormValidator($_POST);\n /** Vérifie que le formulaire est envoyé et que le token CSRF est valide. */\n if ($FV->checkFormIsSend('resetPasswordForm'))\n {\n /** Vérification des champs */\n $FV->verify('password')->isNotEmpty()->passwordConstraintRegex()\n ->passwordCorrespondTo('confirmPassword')->needReEntry();\n $FV->verify('confirmPassword')->needReEntry();\n\n /** Si le formulaire est valide */\n if ($FV->formIsValid())\n {\n /** On stock le mot de passe entrer par l'utilisateur dans l'objet */\n $userInfo->setPassword(password_hash($FV->getFieldValue('password'), PASSWORD_BCRYPT));\n /** Mettre à jour le mot de passe, si un problème survient on indique une erreur. */\n if ($userInfo->updateUserPasswordById())\n {\n FlashMessageService::addSuccessMessage('Mot de passe mis à jour avec succès, vous pouvez désormais vous connecté.');\n $this->redirect(\\AltoRouter::getRouterInstance()\n ->generate('login'));\n }\n else\n {\n FlashMessageService::addErrorMessage('Une erreur est survenue lors de la mise à jour de votre mot de passe, veuillez ressayer.');\n }\n }\n }\n }\n }\n else\n {\n FlashMessageService::addErrorMessage('Le lien de reinitialisation n\\'est pas valide.');\n }\n }\n $this->render('Authentification/ResetPasswordForm', 'Reinitialisation du mot de passe.');\n }", "public function forgotPassword()\n {\n // if user is logged in, do not let him access this page\n if( Session::isLoggedIn() )\n {\n SCMUtility::frontRedirectTo('?page=scmCourseModule&state=Front&action=myAccount');\n return;\n }\n\n View::make('templates/front/forgot-password.php',array());\n }", "public function postReset()\n\t{ \n\t\t$credentials = Input::only('email', 'password', 'password_confirmation', 'token');\n\n\t\t$response = Password::reset($credentials, function($user, $password)\n\t\t{\n\t\t\t$user->password = Hash::make($password);\n\n\t\t\t$user->save();\n\t\t});\n\n\t\tswitch ($response)\n\t\t{\n\t\t\tcase Password::INVALID_PASSWORD: \n\t\t\tcase Password::INVALID_TOKEN:\n\t\t\tcase Password::INVALID_USER:\n\t\t\t\t//When anything wrong happens, back to the reset form with all the input there for the customer to modify\n\t\t\t\treturn Redirect::back()->with('error', Lang::get($response))\n ->withInput(Input::all());\n\t\t\t\t\t \n\t\t\tcase Password::PASSWORD_RESET:\n\t\t\t //Reset is done, redirect to the login page with empty password\n\t\t\t\t { Input::merge(array('password' => ''));\n\t\t\t\treturn Redirect::to('login')\n\t\t\t\t ->withErrors(array('password' => 'Your login password has been successfully reset.')) // Tell the customer reset is done.\n\t\t\t\t ->withInput(Input::all());}\n\t\t}\n\t\t\n\t}", "public function reset()\n {\n if(logged_in()) redirect($this->config->item(\"base_url\").'index.php/home');\n\n $this->load->library('form_validation');\n $this->load->helper('form');\n $data['success'] = false;\n\n $user_id = $this->uri->segment(3);\n if(!$user_id) show_error('Invalid reset code.');\n $hash = $this->uri->segment(4);\n if(!$hash) show_error('Invalid reset code.');\n\n $this->load->model('Authme_model');\n $user = $this->Authme_model->get_user($user_id);\n if(!$user) show_error('Invalid reset code.');\n $slug = md5($user->user_id . $user->user_email . date('Ymd'));\n if($hash != $slug) show_error('Invalid reset code.');\n\n $this->form_validation->set_rules('user_password', 'Password', 'required|min_length['. $this->config->item('authme_password_min_length') .']');\n $this->form_validation->set_rules('password_conf', 'Confirm Password', 'required|matches[user_password]');\n if ($this->form_validation->run()) {\n $this->authme->reset_password($user->user_id, $this->input->post('user_password'));\n $data['success'] = true;\n } else $data['message'] = validation_errors('<p class=\"error flashmessage\">', '</p>');\n $this->load->view('public_header', $data);\n $this->load->view('reset_password', $data);\n $this->load->view('footer', $data);\n\n }", "public function resetNewPassword()\n {\n $data = array(\n 'pageName' => 'RESETNEWPASSWORD',\n 'token' => $this->input->get('token'),\n );\n $this->load->view('content_handler', $data);\n }", "public function password_resetAction()\n {\n // user clicks link via email so we check them then show change password form\n if ($this->request->getQuery('c')) {\n // decrypt user\n $dec = rawurldecode($this->request->getQuery('c'));\n $decr = $this->getDI()->getShared('crypt')->decrypt($dec);\n $decar = json_decode($decr);\n\n // get the decrypted user info from url\n $user_id = $decar->user_id;\n $user_name = $decar->username;\n $time = $decar->time;\n $key = $decar->key;\n\n // check the link has not expired\n if ($time > (time() - 7200)) { // link expires after 2 hours\n // Show the set form\n $user = Users::findFirst(array('id=:user_id: AND username=:username:', 'bind' => array('user_id' => $user_id, 'username' => $user_name)));\n if ($user == TRUE) {\n $hash = md5($user->id . $user->email . $user->password . $this->config->auth->hash_key);\n if ($key == $hash) {\n $this->view->setVar('c', rawurlencode($dec));\n $this->view->setVar('user', $user->id);\n $this->view->setVar('username', $user_name);\n } else {\n $this->flashSession->error(\n '<i class=\"close icon\"></i>' .\n '<div class=\"ui header\">' . __('Error') . '!</div> ' .\n '<div class=\"content\">Invalid key. You may have used an out of date link.</div>');\n }\n } else {\n $this->flashSession->error(\n '<i class=\"close icon\"></i>' .\n '<div class=\"ui header\">' . __('Error') . '!</div> ' .\n '<div class=\"content\">Invalid user.</div>');\n }\n } else {\n $this->flashSession->error(\n '<i class=\"close icon\"></i>' .\n '<div class=\"ui header\">' . __('Error') . '!</div> ' .\n '<div class=\"content\">The password reset link is invalid or has expired.</div>');\n }\n\n // send the reset email\n } else if ($this->request->isPost() == TRUE) {\n // request reset email submission\n if ($this->request->getPost('action') == 'request_reset') {\n if ($this->security->checkToken()) {\n $validation = new \\Baseapp\\Extension\\Validation();\n $validation->add('email', new \\Phalcon\\Validation\\Validator\\PresenceOf());\n $validation->add('email', new \\Phalcon\\Validation\\Validator\\Email());\n $validation->setLabels(array('email' => 'Email'));\n $messages = $validation->validate($_POST);\n if (count($messages)) {\n $this->view->setVar('errors', $validation->getMessages());\n } else {\n $email = $this->request->getPost('email', 'email');\n $email_conf = Users::findFirst(array('email=:email:', 'bind' => array('email' => $email)));\n if ($email_conf == TRUE) {\n $send = $email_conf->sendReset($email);\n if ($send) {\n $this->flashSession->notice(\n '<i class=\"close icon\"></i>' .\n '<div class=\"ui header\">' . __('Check your inbox!') . '!</div> ' .\n '<div class=\"content\">An email has been sent to you containing a link to reset your password.</div>');\n }\n } else {\n $this->flashSession->error(\n '<i class=\"close icon\"></i>' .\n '<div class=\"ui header\">' . __('Error') . '!</div> ' .\n '<div class=\"content\">We do not have a record of that email address.</div>');\n }\n\n }\n }\n // process and validate the reset form\n } else if ($this->request->getPost('action') == 'change_pass') {\n if ($this->security->checkToken()) {\n // Reset the password\n if ($this->request->getPost('c')) {\n $dec = rawurldecode($this->request->getPost('c'));\n $decr = $this->getDI()->getShared('crypt')->decrypt($dec);\n $decar = json_decode($decr);\n\n // get the decrypted user info from form\n $user_id = $decar->user_id;\n $user_name = $decar->username;\n $time = $decar->time;\n $key = $decar->key;\n if ($time > (time() - 7200)) { // link expires after 2 hours\n // validate\n $user = Users::findFirst(array('id=:user_id: AND username=:username:', 'bind' => array('user_id' => $user_id, 'username' => $user_name)));\n if ($user == TRUE) {\n $hash = md5($user->id . $user->email . $user->password . $this->config->auth->hash_key);\n if ($key == $hash) {\n $this->view->setVar('username', $user->username);\n $this->view->setVar('c', $this->request->getPost('c'));\n $validation = new \\Baseapp\\Extension\\Validation();\n $validation->add('pass', new \\Baseapp\\Extension\\Password());\n $validation->add('pass_conf', new \\Phalcon\\Validation\\Validator\\Confirmation(array(\n 'with' => 'pass',\n )));\n $validation->setLabels(array('pass' => 'Password', 'pass_conf' => 'Confirm password'));\n $messages = $validation->validate($_POST);\n if (count($messages)) {\n $this->view->setVar('errors', $validation->getMessages());\n } else {\n // update user's password\n $new_pass = $this->auth->hashPass($this->request->getPost('pass'));\n $user->password = $new_pass;\n if ($user->update() == TRUE) {\n $this->flashSession->success(\n '<i class=\"close icon\"></i>' .\n '<div class=\"ui header\">' . __('Password updated') . '!</div> ' .\n '<div class=\"content\">Your password has been successfully updated. Please login.</div>');\n $this->view->setVar('completed', '1');\n $this->response->redirect('user/signin');\n } else {\n echo 'Update failed';\n exit;\n }\n }\n } else {\n $this->flashSession->error(\n '<i class=\"close icon\"></i>' .\n '<div class=\"ui header\">' . __('Error') . '!</div> ' .\n '<div class=\"content\">Invalid key.</div>');\n }\n } else {\n $this->flashSession->error(\n '<i class=\"close icon\"></i>' .\n '<div class=\"ui header\">' . __('Error') . '!</div> ' .\n '<div class=\"content\">Invalid user.</div>');\n }\n } else {\n $this->flashSession->error(\n '<i class=\"close icon\"></i>' .\n '<div class=\"ui header\">' . __('Error') . '!</div> ' .\n '<div class=\"content\">The password reset link is invalid or has expired.</div>');\n }\n\n }\n } else {\n // CSRF check failed\n $this->flashSession->warning(\n '<i class=\"close icon\"></i>' .\n '<div class=\"ui header\">Form expired!</div> ' .\n '<div class=\"content\">The form has expired. Please try again.</div>');\n }\n }\n } else {\n // show the initial form where user enters email\n }\n }", "function forgot_password()\n\t{\n\t\tif ($this->tank_auth->is_logged_in()) {\t\t\t\t\t\t\t\t\t// logged in\n\t\t\tredirect('');\n\n\t\t} elseif ($this->tank_auth->is_logged_in(FALSE)) {\t\t\t\t\t\t// logged in, not activated\n\t\t\tredirect('/auth/send_again/');\n\n\t\t} else {\n\t\t\t$this->form_validation->set_rules('email', 'Email', 'trim|required|xss_clean|valid_email');\n\n\t\t\t$data['errors'] = array();\n\n\t\t\tif ($this->form_validation->run()) {\t\t\t\t\t\t\t\t// validation ok\n\t\t\t\tif (!is_null($data = $this->tank_auth->forgot_password(\n\t\t\t\t\t\t$this->form_validation->set_value('email')))) {\n\n\t\t\t\t\t$data['site_name'] = $this->config->item('website_name', 'tank_auth');\n\n\t\t\t\t\t// Send email with password activation link\n\t\t\t\t\t$this->_send_email('forgot_password', $data['email'], $data);\n\n\t\t\t\t\t$this->_show_message($this->lang->line('auth_message_new_password_sent'));\n\n\t\t\t\t} else {\n\t\t\t\t\t$errors = $this->tank_auth->get_error_message();\n\t\t\t\t\tforeach ($errors as $k => $v)\t$data['errors'][$k] = $this->lang->line($v);\n\t\t\t\t}\n\t\t\t}\n\t\t\t//$this->load->view('auth/forgot_password_form', $data);\n\t\t\tdisplay('forgot_password', $data);\n\t\t}\n\t}", "public function displayResetPassword()\n {\n $this->render('reset-password', ['head'=>['title'=>'Réinitialisation de votre mot de passe', 'meta_description'=>'']]);\n }", "public function actionForgotPassword() {\n\t\tif (!\\Yii::$app->user->isGuest) {\n\t\t\treturn $this->redirect( Url::to(['users/myprofile']) );\n\t\t}\n\t\t$model = new PasswordResetRequestForm();\n\t\tif ($model->load(Yii::$app->request->post()) && $model->validate()) {\n if ($model->sendEmail()) {\n Yii::$app->session->setFlash('item', Yii::t('yii','Password reset link has been sent to your email address.'));\n\t\t\t\treturn $this->redirect( Url::to(['site/login']) );\n } else {\n Yii::$app->session->setFlash('item', Yii::t('yii','Sorry, We are unable to reset the password for the email provided.'));\n return $this->redirect( Url::to(['site/login']) );\n }\n }\n return $this->render('requestPasswordResetToken', [\n 'model' => $model,\n ]);\n }", "public function actionForgetpassword(){\n\t\t\n\t\t$model=new ForgetpasswordForm; //**models/ForgetpasswordForm.php\n\t\t$returnurl = Yii::app()->user->returnUrl;\t\t\n\t\tif(isset($_POST['ForgetpasswordForm'])){\n\t\t\t$model->attributes = $_POST['ForgetpasswordForm'];\t\t\n\t\t\t$user=Users::model()->findByEmailId($model->attributes['email']);\n\t\t\tif($user){\n\t\t\t\t$chars = array_merge( range('a','z'),range(0,9),range('A','Z'));\n\t\t\t\tshuffle($chars);\n\t\t\t\t$token = implode(array_slice($chars, 0, 8));\n\t\t\t\t$path = $this->createAbsoluteUrl('/site/resetpassword');\n\t\t\t\t$user_id = $model->get_user_id($model->attributes['email']);\t\t\t\n\t\t\t\t$token = $token.\"user\".$user_id;\n\t\t\t\t$key = 'forget password posly';\t\t\n\t\t\t\t $encrypted_token = base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, md5($key), $token, MCRYPT_MODE_CBC, md5(md5($key))));\n\t\t\t\t//echo \"<br/>\";\n\t\t\t\t//$decrypted = rtrim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, md5($key), base64_decode($encrypted_token), MCRYPT_MODE_CBC, md5(md5($key))), \"\\0\");\n\t\t\t\t//$user_token = urlencode($encrypted_token);\n\t\t\t\t$link = $path.\"?token=\".$encrypted_token;\t\t\t\t\n\t\t\t\t$model->reset_password_token($token,$model->attributes['email']);\n\t\t\t\tYii::import('ext.yii-mail.YiiMailMessage');\t\t\t\t\n\t\t\t\t$message = new YiiMailMessage;\n\t\t\t\t$message->setBody('Dear Member,\n\nWe got a request to reset your Posly password.\n\nPlease find the link showed below:\n'.$link.'\n\nIf you ignore this message, your password would not be changed.\n\nSincerely, \nPosly Team\n\n\n', 'text');\n\t\t\t\t$message->subject = 'Reset Your Password';\n\t\t\t\t$message->addTo($model->attributes['email']);\n\t\t\t\t$message->from = Yii::app()->params['adminEmail'];\n\t\t\t\tYii::app()->mail->send($message);\t\t\t\t\n\t\t\t\t\n\t\t\t\techo CJSON::encode(array(\n\t\t\t\t\t'status'=>'success',\n\t\t\t\t\t'returnUrl'=>$returnurl\n\t\t\t\t));\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$msg = 'Email Not Exists! Please SignUp';\t\n\t\t\t\techo CJSON::encode(array(\n\t\t\t\t 'status'=>'error',\n\t\t\t\t 'msg'=>$msg\n\t\t\t\t));\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t$this->redirect(Yii::app()->homeUrl);\n\t\t}\n\t\tYii::app()->end();\n\t}", "public function forgot_password()\n\t{\n\t\t$email = Input::get('email');\n\n\t\t//Get reset code and send email\n\t\tif($resetCode = $this->repo->getResetCode($email))\n\t\t{\n\t\t\treturn View::make('authentication.confirm_reset_code_sent')->with('email',$email)->with('resetCode',$resetCode);\n\t\t}\n\t\treturn View::make('authentication.forgot_password')->withInput(Input::all()); \n\t}", "public function doResetPassword()\r\n {\r\n $repo = App::make('UserRepository');\r\n $input = array(\r\n 'token' => Input::get('token'),\r\n 'password' => Input::get('password'),\r\n 'password_confirmation' => Input::get('password_confirmation'),\r\n );\r\n\r\n // By passing an array with the token, password and confirmation\r\n if ($repo->resetPassword($input)) {\r\n $notice_msg = Lang::get('confide::confide.alerts.password_reset');\r\n\r\n return Redirect::action('UserController@login')\r\n ->with('notice', $notice_msg);\r\n } else {\r\n $error_msg = Lang::get('confide::confide.alerts.wrong_password_reset');\r\n\r\n return Redirect::action('UserController@resetPassword', array('token' => $input['token']))\r\n ->withInput()\r\n ->with('error', $error_msg);\r\n }\r\n }", "public function passwordResetAction()\n {\n if (Zend_Auth::getInstance()->hasIdentity()) {\n $this->_helper->redirector->gotoRoute(array(), 'default', true);\n return;\n }\n\n $userKey = $this->_getParam('key', null);\n\n if (is_null($userKey)) {\n throw new Ot_Exception_Input('msg-error-noKeyFound');\n }\n\n $loginOptions = Zend_Registry::get('applicationLoginOptions');\n\n $key = $loginOptions['forgotpassword']['key'];\n $iv = $loginOptions['forgotpassword']['iv'];\n $cipher = $loginOptions['forgotpassword']['cipher'];\n $string = pack(\"H*\", $userKey);\n\n $decryptKey = trim(mcrypt_decrypt($cipher, $key, $string, MCRYPT_MODE_CBC, $iv));\n\n if (!preg_match('/[^@]*@[^-]*-[0-9]*/', $decryptKey)) {\n throw new Ot_Exception_Input('msg-error-invalidKey');\n }\n\n $userId = preg_replace('/\\-.*/', '', $decryptKey);\n $ts = preg_replace('/^[^-]*-/', '', $decryptKey);\n\n $timestamp = new Zend_Date($ts);\n\n $now = new Zend_Date();\n\n $now->subMinute((int)$loginOptions['forgotpassword']['numberMinutesKeyIsActive']);\n\n if ($timestamp->getTimestamp() < $now->getTimestamp()) {\n throw new Ot_Exception_Input('msg-error-keyExpired');\n }\n\n $realm = preg_replace('/^[^@]*@/', '', $userId);\n $username = preg_replace('/@.*/', '', $userId);\n\n // Set up the auth adapter\n $authAdapter = new Ot_Model_DbTable_AuthAdapter();\n $adapter = $authAdapter->find($realm);\n\n if (is_null($adapter)) {\n throw new Ot_Exception_Data(\n $this->view->translate('ot-login-signup:realmNotFound', array('<b>' . $realm . '</b>'))\n );\n }\n\n if ($adapter->enabled == 0) {\n throw new Ot_Exception_Access('msg-error-authNotSupported');\n }\n\n $className = (string)$adapter->class;\n $auth = new $className();\n\n if (!$auth->manageLocally()) {\n throw new Ot_Exception_Access('msg-error-authNotSupported');\n }\n\n $account = new Ot_Model_DbTable_Account();\n $thisAccount = $account->getByUsername($username, $realm);\n\n if (is_null($thisAccount)) {\n throw new Ot_Exception_Data('msg-error-userAccountNotFound');\n }\n\n $form = new Ot_Form_PasswordReset();\n\n if ($this->_request->isPost()) {\n if ($form->isValid($_POST)) {\n\n if ($form->getValue('password') == $form->getValue('passwordConf')) {\n\n $data = array(\n 'accountId' => $thisAccount->accountId,\n 'password' => md5($form->getValue('password')),\n );\n\n $account->update($data, null);\n\n $this->_helper->messenger->addSuccess('msg-info-passwordReset');\n\n $loggerOptions = array(\n 'attributeName' => 'accountId',\n 'attributeId' => $data['accountId'],\n );\n\n $this->_helper->log(Zend_Log::INFO, 'User reset their password', $loggerOptions);\n\n $this->_helper->redirector->gotoRoute(array('realm' => $realm), 'login', true);\n } else {\n $this->_helper->messenger->addError('msg-error-passwordsNotMatch');\n }\n } else {\n $this->_helper->messenger->addError('msg-error-invalidFormInfo');\n }\n }\n\n $this->view->headScript()->appendFile($this->view->baseUrl() . '/public/scripts/ot/jquery.plugin.passStrength.js');\n\n $this->_helper->pageTitle('ot-login-passwordReset:title');\n\n $this->view->assign(array(\n 'form' => $form,\n ));\n\n }", "public function resetAndUpdatePassword() {\n $this->validate ( $this->request, $this->getRules () );\n $user = User::where ( 'email', $this->request->email )->first ();\n \n if (!empty($user) && count ( $user->toArray() ) > 0) {\n $user->password = Hash::make ( (true) ? config()->get('app.user_password'): $this->generatePassword() );\n \n $user->save ();\n $this->email = $this->email->fetchEmailTemplate ( 'admin_forgot' );\n $this->email->subject = str_replace(['##SITE_NAME##'], [config ()->get ( 'settings.general-settings.site-settings.site_name' )], $this->email->subject);\n $this->email->content = str_replace (['##USERNAME##','##FORGOTPASSWORD##'],[$user->name,'admin123'],$this->email->content );\n $this->notification->email ( $user, $this->email->subject, $this->email->content );\n return true;\n } else {\n return false;\n }\n }", "public function showResetPasswordForm($token, $id)\n { \n \n $user = Users::find([\n 'token = :token: AND forgetpass = :forgetpass: AND id = :id: ',\n 'bind' => [\n 'token' => $token,\n 'forgetpass' => true,\n 'id' => $id\n ],\n ])->getFirst();\n\n if (! $user) {\n flash()->session()->warning(\n 'We cant find your request, please '.\n 'try again, or contact us.'\n );\n\n return redirect()->to(route('showLoginForm'))\n ->withError(lang()->get('responses/forgetpass.unknown_error'));\n\n }\n\n // $user->setToken('');\n // $user->setForgetpass(0);\n // $user->save();\n\n if(request()->isPost()) {\n \n $inputs = request()->get();\n\n $validator = new ResetpassValidator;\n $validation = $validator->validate($inputs);\n\n if (count($validation)) {\n session()->set('input', $inputs);\n\n return redirect()->to(url()->previous())\n ->withError(ResetpassValidator::toHtml($validation));\n }\n\n try {\n $this->userService->assignNewPassword($user, $inputs['password']);\n return redirect()->to(route('showLoginForm'))\n ->withSuccess(lang()->get('responses/forgetpass.reset_success'));\n\n \n } catch (EntityException $e) {\n return redirect()->to(url()->previous())\n ->withError(lang()->get('responses/forgetpass.unknown_error'));\n } \n\n }\n \n \n # find session if it has an 'input'\n if (session()->has('input')) {\n\n # get the session 'input' then remove it\n $input = session()->get('input');\n session()->remove('input');\n\n # set the tag 'email' to rollback the value inputted\n tag()->setDefault('email', $input['email']);\n }\n\n return view('auth.showResetPasswordForm');\n }", "public function Forgotpassword()\n\t{\n\t\t$login = get_cookie(sha1('besaf'));\n\t\tif ($login) {\n\t\t\t//! cek login\n\t\t\tif ($this->session->userdata('role_id') == 1) {\n\t\t\t\t// user\n\t\t\t\tredirect('user');\n\t\t\t} elseif ($this->session->userdata('role_id') == 2) {\n\t\t\t\t// admin\n\t\t\t\tredirect('admin');\n\t\t\t}\n\t\t} elseif (!$login) {\n\t\t\t//! cek login\n\t\t\tif ($this->session->userdata('role_id') == 1) {\n\t\t\t\t// user\n\t\t\t\tredirect('user');\n\t\t\t} elseif ($this->session->userdata('role_id') == 2) {\n\t\t\t\t// admin\n\t\t\t\tredirect('admin');\n\t\t\t}\n\t\t}\n\n\t\t$this->session->set_userdata(['reset' => true]);\n\n\t\t$this->load->view('Front/template/header');\n\t\t$this->load->view('Front/Forgot_password');\n\t\t$this->load->view('Front/template/footer');\n\t}", "public function resetPasswordAction(){\n // Define layout for this\n $this->layout()->setTemplate('layout/auth');\n }", "public function reset(){\n return view('auth.passwords.reset');\n }", "public function resetPasswordPostAction() {\n $request = Request::createFromGlobals();\n $userEmail = $request->request->get('_username', '');\n \n // Get the user object\n $user = $this->getDoctrine()\n ->getRepository('AppBundle:Users')\n ->findOneBy(array('email' => $userEmail));\n \n if (!$user)\n {\n $error = \"User not found!\";\n }\n else\n {\n // Generate a user hash\n $hash = $this->generateUserHash($user);\n \n // Send reset password email\n $mailer = $this->get('mailer');\n $message = $mailer->createMessage()\n ->setSubject('Tabulit Password Reset')\n ->setFrom('[email protected]') \n ->setTo($user->getEmail())\n ->setBody(\n $this->renderView(\n 'AppBundle:Email:resetPassword.html.twig', array(\n 'id' => $user->getId(),\n 'hash' => $hash->getRc4Key(),\n 'hash_time' => $hash->getCreated())\n ),\n 'text/html'\n );\n $mailer->send($message);\n $this->logAction(\"Reset password mail has been sent for \".$user->getId(), self::LOGTYPE_EDIT, $user->getId());\n $error = \"NONE\";\n }\n \n return $this->resetPasswordAction($error, $userEmail);\n }", "public function forgot_password() {\n\t\t$this->output->append_title('Forgot Password');\n\t\t$data = array();\n\t\tif($this->input->post())\n\t\t{\n\t\t\t$this->form_validation->set_rules('email', 'Email', 'trim|required');\n\t\t\tif($this->form_validation->run() == TRUE)\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\t$email = $this->input->post('email');\n\t\t\t\t\t$subject = 'Password Reset Confirmation';\n\t\t\t\t\t\n\t\t\t\t\t// Find the user using the user email address\n\t\t\t\t\t$user = Sentry::findUserByLogin($email);\n\t\t\t\t\t\n\t\t\t\t\t// Get the password reset code\n\t\t\t\t\t$resetCode = $user->getResetPasswordCode();\n\t\t\t\t\t$url = website_url('auth/reset/'.$resetCode);\n\t\t\t\t\t$template_data = array(\n\t\t\t\t\t\t'email_title' => 'Forgot Password',\n\t\t\t\t\t\t'email_heading' => 'Hello',\n\t\t\t\t\t\t'email_body' => 'There was recently a request to reset your password.\n\t\t\t\t\t\t<br/>If you requested this password change, please click on the following link to reset your password:<br/> <a href=\"'.$url.'\">'.$url.'</a><br/>\n\t\t\t\t\t\tIf clicking the link does not work, please copy and paste the URL into your browser instead.<br/><br/>\n\t\t\t\t\t\tIf you didn\\'t make this request, you can ignore this message and your password will remail the same.\n\t\t\t\t\t\t'\n\t\t\t\t\t);\n\n\t\t\t\t\t$body = $this->parser->parse('emails/user_registration', $template_data,TRUE);\n\t\t\t\t\tif($this->common->sendEmail($email,$subject,$body))\n\t\t\t\t\t{\n\t\t\t\t\t\t$message = array('type' => 'success','message' => 'An email has been sent to your email address with instructions to reset your password.');\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$message = array('type' => 'warning','message' => 'Unable to send email, please try again later.');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (Cartalyst\\Sentry\\Users\\UserNotFoundException $e)\n\t\t\t\t{\n\t\t\t\t\t$message = array('type' => 'danger','message' => 'Email does not exists.');\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$message = array('type' => 'danger','message' => $this->message->validation_errors());\n\t\t\t}\n\t\t\t\n\t\t\t$this->message->set($message['type'], $message['message']);\n\t\t}\n\t\t\n\t\t$data['email'] = array('name' => 'email',\n\t\t\t'autofocus' => 'autofocus',\n\t\t\t'id' => 'email',\n\t\t\t'placeholder' => 'Email',\n\t\t\t'class' => 'form-control',\n\t\t\t'type' => 'text',\n\t\t\t//'value' => $this->form_validation->set_value('email')\n\t\t);\n\t\t$this->load->view(parent::$module.'/forgot_password',$data);\n\t}", "function forgot_password()\n\t{\n\t\tif ($this->tank_auth->is_logged_in()) {\t\t\t\t\t\t\t\t\t// logged in\n\t\t\tredirect('');\n\n\t\t} elseif ($this->tank_auth->is_logged_in(FALSE)) {\t\t\t\t\t\t// logged in, not activated\n\t\t\tredirect('/auth/send_again/');\n\n\t\t} else {\n\t\t\t$this->form_validation->set_rules('login', 'Email or Username', 'trim|required|xss_clean');\n\n\t\t\t$data['errors'] = array();\n\n\t\t\tif ($this->form_validation->run()) {\t\t\t\t\t\t\t\t// validation ok\n\t\t\t\tif (!is_null($data = $this->tank_auth->forgot_password(\n\t\t\t\t\t\t$this->form_validation->set_value('login')))) {\n\n\t\t\t\t\t$data['site_name'] = config_item('company_name');\n\n\t\t\t\t\t// Send email with password activation link\n\t\t\t\t\t$this->_send_email('forgot_password', $data['email'], $data);\n\t\t\t\t\t$this->session->set_flashdata('message',$this->lang->line('auth_message_new_password_sent'));\n\t\t\t\t\t//$this->_show_message($this->lang->line('auth_message_new_password_sent'));\n\t\t\t\t\tredirect('login');\n\n\t\t\t\t} else {\n\t\t\t\t\t$errors = $this->tank_auth->get_error_message();\n\t\t\t\t\tforeach ($errors as $k => $v)\t$data['errors'][$k] = $this->lang->line($v);\n\t\t\t\t}\n\t\t\t}\n\t$this->load->module('layouts');\n\t$this->load->library('template');\n\t$this->template->title('Forgot Password - '.config_item('company_name'));\n\t$this->template\n\t->set_layout('login')\n\t->build('auth/forgot_password_form',isset($data) ? $data : NULL);\n\t\t\t//$this->load->view('auth/forgot_password_form', $data);\n\t\t}\n\t}", "public function do_forgot_password()\n {\n if( Confide::forgotPassword( Input::get( 'email' ) ) )\n {\n $notice_msg = Lang::get('confide::confide.alerts.password_forgot');\n return Redirect::action('UserController@login')\n ->with( 'notice', $notice_msg );\n }\n else\n {\n $error_msg = Lang::get('confide::confide.alerts.wrong_password_forgot');\n return Redirect::action('UserController@forgot_password')\n ->withInput()\n ->with( 'error', $error_msg );\n }\n }", "public function forgotPassword()\n\t{\n\t\t$this->layout->content = View::make('login.password');\n\t}" ]
[ "0.8187078", "0.7952258", "0.79394686", "0.7911726", "0.7865717", "0.7854692", "0.7834399", "0.7707769", "0.769779", "0.76875645", "0.76821434", "0.767627", "0.76653284", "0.7664641", "0.76557904", "0.76475036", "0.762017", "0.7620014", "0.7599405", "0.75869447", "0.75789756", "0.757537", "0.75708413", "0.7551192", "0.75169146", "0.7501493", "0.74995995", "0.7485144", "0.7485144", "0.7481291", "0.7480199", "0.74783367", "0.7477864", "0.7472382", "0.7469334", "0.74492437", "0.7436729", "0.7417685", "0.7406023", "0.74013424", "0.7384656", "0.7379958", "0.7373421", "0.7372172", "0.73588425", "0.73564607", "0.7344516", "0.7340697", "0.73319685", "0.73292214", "0.73284984", "0.7326492", "0.73131794", "0.73107517", "0.73057395", "0.730469", "0.73039645", "0.72982985", "0.7286252", "0.72760534", "0.7274978", "0.7274684", "0.72605294", "0.7254873", "0.724889", "0.7229849", "0.72275203", "0.722674", "0.722121", "0.7213335", "0.72108597", "0.72099596", "0.72072697", "0.7205136", "0.7204765", "0.71865696", "0.7167869", "0.7164575", "0.71609205", "0.71530986", "0.7137796", "0.71327704", "0.71248114", "0.71142095", "0.71091896", "0.7098046", "0.70938987", "0.7083899", "0.7083164", "0.70772403", "0.70724547", "0.70714056", "0.7057036", "0.7055279", "0.7048291", "0.7041798", "0.7033849", "0.7015734", "0.7015586", "0.7014971", "0.7002709" ]
0.0
-1
Do password reset code
function do_mail_pword_reset($adata, $aret_flag=0) { # Dim Some Vars global $_CCFG, $_TCFG, $_DBCFG, $db_coin, $_LANG, $_nl, $_sp; # Prevent email address hacking IF (do_validate_email($adata['email'],0)) {$adata['email'] = '';} # Check username exist IF ($adata['w'] == 'admin' || $adata['w'] == 'user') { $_user_check = do_user_name_exist_check($adata['username'], $adata['w']); } # IF existing, get username email for comparison and compare IF ($adata['w'] == 'admin' || $adata['w'] == 'user') { $_user_email = get_user_name_email($adata['username'], $adata['w']); $_email_check = 1; IF ($_user_email != $adata['email']) {$_email_check = 0;} } # Check return on user / admin exist check IF (!$_user_check || !$_email_check) { # Build Title String, Content String, and Footer Menu String $_tstr = $_LANG['_MAIL']['PWORD_RESET_RESULT_TITLE']; $_cstr .= '<center>'.$_nl; $_cstr .= '<table cellpadding="5" width="100%">'.$_nl; $_cstr .= '<tr><td class="TP5MED_NC">'.$_nl; IF (!$_user_check) { $_cstr .= $_LANG['_MAIL']['PWORD_RESET_MSG_01A'].$_nl; IF (!$_email_check) {$_cstr .= '<br>'.$_LANG['_MAIL']['PWORD_RESET_MSG_01B'].$_nl;} } ELSEIF (!$_email_check) { $_cstr .= $_LANG['_MAIL']['PWORD_RESET_MSG_01B'].$_nl; } $_cstr .= '<br><br><a href="mod.php?mod=mail&mode=reset&w='.$adata['w'].'">'.$_TCFG['_IMG_TRY_AGAIN_M'].'</a>'; $_cstr .= '</td></tr>'.$_nl; $_cstr .= '<tr><td align="right">'.$_nl; IF ($adata['w'] == 'admin') { $_cstr .= '<a href="mod.php?mod=mail&mode=reset&w=user">'.$_TCFG['_IMG_CLIENTS_M'].'</a>'; } ELSE { $_cstr .= '<a href="mod.php?mod=mail&mode=reset&w=admin">'.$_TCFG['_IMG_ADMIN_M'].'</a>'; } $_cstr .= '</td></tr>'.$_nl; $_cstr .= '</table>'.$_nl; $_cstr .= '</center>'.$_nl; $_mstr_flag = 0; $_mstr = $_sp.$_nl; # Call block it function $_out .= do_mod_block_it($_tstr, $_cstr, $_mstr_flag, $_mstr, '1'); $_out .= '<br>'.$_nl; } ELSE { # Generate New Password String and encrypt for db $_nps = do_password_create(); $_nps_encrypt = do_password_crypt($_nps); # Update proper database with new password IF ($adata['w'] == 'admin') { $query = 'UPDATE '.$_DBCFG['admins'].' SET '; $query .= "admin_user_pword='".$db_coin->db_sanitize_data($_nps_encrypt)."' "; $query .= "WHERE admin_user_name='".$db_coin->db_sanitize_data($adata['username'])."'"; } IF ($adata['w'] == 'user') { $query = 'UPDATE '.$_DBCFG['clients'].' SET '; $query .= "cl_user_pword='".$db_coin->db_sanitize_data($_nps_encrypt)."' "; $query .= "WHERE cl_user_name='".$db_coin->db_sanitize_data($adata['username'])."'"; } $result = $db_coin->db_query_execute($query) OR DIE("Unable to complete request"); $eff_rows = $db_coin->db_query_affected_rows(); # Check update and continue IF (!$eff_rows) { $_ret_msg = $_LANG['_MAIL']['PWORD_RESET_MSG_02_L1']; $_ret_msg .= '<br>'.$_LANG['_MAIL']['PWORD_RESET_MSG_02_L2']; } ELSE { # Set eMail Parameters (pre-eval template, some used in template) $mail['recip'] = get_user_name_email($adata['username'], $adata['w']); $mail['from'] = $_CCFG['_PKG_EMAIL_MAIL']; $mail['subject'] = $_CCFG['_PKG_NAME_SHORT'].$_LANG['_MAIL']['PWORD_RESET_SUBJECT_PRE']; # Grab client record for passing into email template $cl_query = 'SELECT * FROM '.$_DBCFG['clients']." WHERE cl_user_name='".$db_coin->db_sanitize_data($adata['username'])."'"; $cl_result = $db_coin->db_query_execute($cl_query) OR DIE("Unable to complete request"); IF ($db_coin->db_query_numrows($cl_result)) { while ($row = $db_coin->db_fetch_array($cl_result)) { $_MTP['cl_id'] = $row['cl_id']; $_MTP['cl_join_ts'] = $row['cl_join_ts']; $_MTP['cl_status'] = $row['cl_status']; $_MTP['cl_company'] = $row['cl_company']; $_MTP['cl_name_first'] = $row['cl_name_first']; $_MTP['cl_name_last'] = $row['cl_name_last']; $_MTP['cl_addr_01'] = $row['cl_addr_01']; $_MTP['cl_addr_02'] = $row['cl_addr_02']; $_MTP['cl_city'] = $row['cl_city']; $_MTP['cl_state_prov'] = $row['cl_state_prov']; $_MTP['cl_country'] = $row['cl_country']; $_MTP['cl_zip_code'] = $row['cl_zip_code']; $_MTP['cl_phone'] = $row['cl_phone']; $_MTP['cl_email'] = $row['cl_email']; $_MTP['cl_user_name'] = $row['cl_user_name']; $_MTP['cl_notes'] = $row['cl_notes']; $_MTP['cl_groups'] = $row['cl_groups']; } } # Set MTP (Mail Template Parameters) array $_MTP['from_email'] = $mail['from']; $_MTP['username'] = $adata['username']; $_MTP['password'] = $_nps; $_MTP['url'] = BASE_HREF.'login.php?w='.$adata['w'].'&o=login'; $_MTP['site'] = $_CCFG['_PKG_NAME_SHORT']; # Load message template (processed) $mail['message'] .= get_mail_template('email_password_reset', $_MTP); # Call basic email function $_ret = do_mail_basic($mail); # Check return IF ($_ret) { $_ret_msg = $_LANG['_MAIL']['PWORD_RESET_MSG_03_L1']; $_ret_msg .= '<br>'.$_LANG['_MAIL']['PWORD_RESET_MSG_03_L2']; } ELSE { $_ret_msg = $_LANG['_MAIL']['PWORD_RESET_MSG_04_L1']; $_ret_msg .= $_sp.$_LANG['_MAIL']['PWORD_RESET_MSG_04_L2']; } } # Build Title String, Content String, and Footer Menu String $_tstr = $_LANG['_MAIL']['PWORD_RESET_RESULT_TITLE']; $_cstr .= '<center>'.$_nl; $_cstr .= '<table cellpadding="5" width="100%">'.$_nl; $_cstr .= '<tr><td class="TP5MED_NC">'.$_nl; $_cstr .= $_ret_msg.$_nl; $_cstr .= '</td></tr>'.$_nl; $_cstr .= '</table>'.$_nl; $_cstr .= '</center>'.$_nl; $_mstr_flag = 0; $_mstr = '&nbsp;'.$_nl; # Call block it function $_out .= do_mod_block_it($_tstr, $_cstr, $_mstr_flag, $_mstr, '1'); $_out .= '<br>'.$_nl; } IF ($aret_flag) {return $_out;} ELSE {echo $_out;} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function resetPassword();", "public function passwordResetCode();", "public function reset_pass() {\n \t\t$email = $this->input->post('email');\n\n\t $pass = $this->generate_pass(16);\n\t $hash = password_hash($pass, B_CRYPT); // http://php.net/manual/en/function.password-hash.php\n\n\t $this->load->model('users_table');\n\t $this->users_table->update_password($email, $hash);\n\n\t $this->send_email($email, $pass, \"2\");\n \t}", "public function resetpassAction()\n\t{\n\t\t$email='[email protected]';\n\n\t\t$customer = Mage::getModel('customer/customer')\n ->setWebsiteId(Mage::app()->getStore()->getWebsiteId())\n ->loadByEmail($email);\n\t\t$customer->sendPasswordResetConfirmationEmail();\n\t}", "Public Function resetPassword()\n\t{\n\t\t$Code = $this->generateResetCode();\n\t\t$Email = $this->email;\n\t\t$Subject = 'Reset Password Request from ' . $_SERVER['HTTP_HOST'];\n\t\t$Body = <<<END\nThis is an automatically generated email from $_SERVER[HTTP_HOST] regarding a password reset.<br/>\nIf you did not request a password reset then please disregard this email.<br/>\n<br/>\nOtherwise, follow this link to reset your password:<br/>\n<a href=\"http://$_SERVER[HTTP_HOST]/BevoMedia/Index/ResetPassword.html?EmailCode=$Code&Email=$Email\">http://$_SERVER[HTTP_HOST]/BevoMedia/Index/ResetPassword.html?EmailCode=$Code&Email=$Email</a>\nEND;\n\t\t\n\t\t$this->ClearResetCode();\n\t\t$this->InsertResetCode($Code);\n\t\t$this->SendEmail($Email, $Subject, $Body);\n\t}", "public function doResetPassword()\n {\n // if user is logged in, do not let him access this page\n if( Session::isLoggedIn() )\n {\n SCMUtility::frontRedirectTo('?page=scmCourseModule&state=Front&action=myAccount');\n return;\n }\n\n $userID = SCMUtility::cleanText($_POST['userID']);\n $userNewPassword = SCMUtility::stripTags($_POST['new_reset_password']);\n\n // validate\n $validator = Validator::make(array('password'=>$userNewPassword),User::$rulesPasswordChange,User::$rulesMessages);\n\n if($validator->fails())\n {\n SCMUtility::setFlashMessage('Password reset failed. Error: '.$validator->messages()->first(),'danger');\n SCMUtility::frontRedirectTo('?page=scmCourseModule&state=Front&action=myAccount');\n return;\n }\n\n // update user password\n $user = User::find($userID);\n\n if( ! $user )\n {\n SCMUtility::setFlashMessage('Sorry, we cannot find any user associated with that email address.','danger');\n SCMUtility::frontRedirectTo('?page=scmCourseModule&state=Front&action=myAccount');\n return;\n }\n\n $user->password = $userNewPassword;\n $user->save();\n\n SCMUtility::setFlashMessage('Your password have been reset. You can now login using your new password.','success');\n SCMUtility::frontRedirectTo('?page=scmCourseModule&state=Front&action=myAccount');\n return;\n }", "public static function do_reset_password() {\n\t\tif ( ! self::is_global_reset_password_page_set() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( 'POST' == $_SERVER[ 'REQUEST_METHOD' ] && isset( $_REQUEST[ 'rp_key' ] ) && isset( $_REQUEST[ 'rp_login' ] ) ) {\n\t\t\t$rp_key = sanitize_text_field( $_REQUEST['rp_key'] );\n\t\t\t$rp_login = sanitize_text_field( $_REQUEST['rp_login'] );\n\n\t\t\t$user = check_password_reset_key( $rp_key, $rp_login );\n\n\t\t\tif ( ! $user || is_wp_error( $user ) ) {\n\t\t\t\t$query_args = self::get_reset_password_query_args_from_user( $user );\n\t\t\t\tFrmRegLoginController::redirect_to_selected_login_page( $query_args );\n\n\t\t\t} elseif ( isset( $_POST[ 'pass1' ] ) ) {\n\n\t\t\t\tself::redirect_if_passwords_not_equal( $rp_key, $rp_login );\n\t\t\t\tself::redirect_if_empty_password( $rp_key, $rp_login );\n\t\t\t\tself::reset_password_and_redirect( $user );\n\n\t\t\t} else {\n\t\t\t\tesc_html_e( 'Invalid request.', 'frmreg' );\n\t\t\t}\n\t\t}\n\t}", "public function resetPasswordAction()\n\t{\n\n\t\t$data = $this->url->post;\n\t\tif (!isset($_POST['reset']) || !$this->validateReset($data)) {\n\t\t\t$this->session->data['error'] = 'Warning: Please enter valid data in input box.';\n\t\t\t$this->url->redirect('login');\n\t\t}\n\n\t\t$token = $this->url->post('_token');\n\t\t$token_check = hash('sha512', TOKEN . TOKEN_SALT);\n\t\tif (hash_equals($token_check, $token) === false ) {\n\t\t\t$this->session->data['error'] = 'Warning: Invalid token. Please try again.';\n\t\t\t$this->url->redirect('login');\n\t\t}\n\t\t$this->loginModel = new Login();\n\t\t$check = $this->loginModel->checkEmailHash($data);\n\t\tif (empty($check)) {\n\t\t\t$this->url->redirect('login');\n\t\t} else {\n\t\t\t$result = $this->loginModel->updatePassword($data);\n\t\t\t$this->session->data['success'] = 'Success: Your Password Changed Succesfully.';\n\t\t\t$this->url->redirect('login');\n\t\t}\n\n\t\t\n\t}", "public function resetPassword()\n\t{\n\n\t\tif ($this->common->isLoggedIn()) {\n\t\t\t$this->url->redirect('dashboard');\n\t\t}\n\n\t\t$data['error'] = '';\n\t\tif (isset($this->session->data['error'])) {\n\t\t\t$data['error'] = $this->session->data['error'];\n\t\t\tunset($this->session->data['error']);\n\t\t}\n\n\t\t$data['success'] = '';\n\t\tif (isset($this->session->data['success'])) {\n\t\t\t$data['success'] = $this->session->data['success'];\n\t\t\tunset($this->session->data['success']);\n\t\t}\n\t\t$data['mail'] = $this->url->get('id');\n\t\t$data['hash'] = $this->url->get('temp');\n\t\t\n\t\tif (empty($data['mail']) && empty($data['hash']) ) {\n\t\t\t$this->url->redirect('login');\n\t\t}\n\t\t$this->loginModel = new Login();\n\t\tif (!$this->loginModel->checkEmailHash($data)) {\n\t\t\t$this->url->redirect('login');\n\t\t}\n\t\t\n\t\t$data['info'] = $this->commons->getInfo();\n\n\t\t/*Load Language File*/\n\t\trequire DIR_BUILDER.'language/'.$data['info']['language'].'/common.php';\n\t\t$data['lang']['common'] = $lang;\n\t\trequire DIR_BUILDER.'language/'.$data['info']['language'].'/login.php';\n\t\t$data['lang']['login'] = $login;\n\t\t\n\t\t$data['token'] = hash('sha512', TOKEN . TOKEN_SALT);\n\t\t$data['action'] = URL.DIR_ROUTE.'reset';\n\t\t$this->view->render('auth/reset_password.tpl', $data);\n\t}", "function reset_password() {\n\t\t$username = $this->uri->segment(3);\n\t\t$key = $this->uri->segment(4);\n\n\t\t// Reset password\n\t\tif ($this->dx_auth->reset_password($username, $key)) {\n\t\t\t$this->data['auth_message'] = 'You have successfully reset you password, '.anchor(site_url($this->dx_auth->login_uri), 'Login');\n\t\t\t$this->load->view($this->dx_auth->reset_password_success_view, $this->data);\n\t\t} else {\n\t\t\t$this->data['auth_message'] = 'Reset failed. Your username and key are incorrect. Please check your email again and follow the instructions.';\n\t\t\t$this->load->view($this->dx_auth->reset_password_failed_view, $this->data);\n\t\t}\n\t}", "public function do_reset_password()\n {\n $input = array(\n 'token'=>Input::get( 'token' ),\n 'password'=>Input::get( 'password' ),\n 'password_confirmation'=>Input::get( 'password_confirmation' ),\n );\n\n // By passing an array with the token, password and confirmation\n if( Confide::resetPassword( $input ) )\n {\n $notice_msg = Lang::get('confide::confide.alerts.password_reset');\n return Redirect::action('UserController@login')\n ->with( 'notice', $notice_msg );\n }\n else\n {\n $error_msg = Lang::get('confide::confide.alerts.wrong_password_reset');\n return Redirect::action('UserController@reset_password', array('token'=>$input['token']))\n ->withInput()\n ->with( 'error', $error_msg );\n }\n }", "public function reset_password()\n {\n \n }", "function requestpasswordreset_action()\n {\n $login_model = $this->loadModel('Login');\n // set token (= a random hash string and a timestamp) into database\n // to see that THIS user really requested a password reset\n if ($login_model->setPasswordResetDatabaseToken() == true) {\n // send a mail to the user, containing a link with that token hash string\n $login_model->sendPasswordResetMail();\n }\n $this->view->render('login/requestpasswordreset');\n }", "public function p_reset() {\n\n\t\tforeach($_POST as $key => $value){\n\t\t\tif((empty($value)) || (!$value) || (trim($value) == \"\") ){\n\t\t\t\t# Send them back to the login page\n\t\t\t\tRouter::redirect(\"/users/resetp/error\");\n\t\t\t}\n\t\t}\t\n\t\t\n\t\t# Encrypt the password \n\t\t$_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']); \n\n\t\tDB::instance(DB_NAME)->update(\"users\", $_POST, 'WHERE user_id = '.$this->user->user_id);\n\n\t\t# Send them back to the main index.\n\t\tRouter::redirect('/users/login');\n\n\t}", "public function resetPassword()\n\t{\n\t\tif($this->session->userdata('VB_USER_ID') <> ''):\n\t\t\tredirect(base_url().'my-profile');\n\t\tendif;\n\t\t$data['error'] \t\t\t\t\t\t= \t'';\n\t\tif($this->input->post('otp')): \n\t\t\t$userData\t\t=\t$this->common_model->checkOTP(trim($this->session->userdata('VB_FORGOT_USER_PHONE')),trim($this->input->post('otp')),'users','user_password_otp');\n\t\t\tif($userData <> \"\"): \n\t\t\t\tif($userData['status'] == 'A'):\n\t\t\t\t\t$param['user_phone_otp']\t\t=\t'';\n\t\t\t\t\t$param['password']\t\t\t\t=\t$this->common_model->encriptPassword(trim($this->input->post('password')));\n\t\t\t\t\t$this->common_model->editData('vb_users',$param,'user_id',$userData['user_id']);\n\t\t\t\t\t$this->session->unset_userdata('VB_FORGOT_USER_PHONE');\n\t\t\t\t\techo \"success\";die;\n\t\t\t\telse:\n\t\t\t\t\techo \"blocked\";die;\n\t\t\t\tendif;\n\t\t\telse:\n\t\t\t\techo \"wrongotp\";die;\n\t\t\tendif;\n\t\tendif;\n\t\t$this->layouts->set_title(stripcslashes('Reset Password | VBloggers'));\n\t\t$this->layouts->set_keyword(stripcslashes('Reset Password | VBloggers'));\n\t\t$this->layouts->set_description(stripcslashes('Reset Password | VBloggers'));\n\t\t\n\t\t$this->layouts->login_view('user/resetpassword',array(),$data);\n\t}", "function recover_password()\n{\n if($_SERVER['REQUEST_METHOD']=='POST'){\n\n if(isset($_SESSION['token']) && $_POST['token']=== $_SESSION['token']){\n $email=clean($_POST['email']);\n if(email_exists($email)){\n $validation_code=md5($email . microtime());\n setcookie('temp_access_code',$validation_code,time()+900);\n $sql=\"UPDATE users SET validation_code='\".escape($validation_code).\"' WHERE email='\".escape($email).\"'\";\n $result=query($sql);\n $subject=\"Please reset your password\";\n $message=\" Here is your password reset code {$validation_code}\n Click here to reset your password http://localhost/code.php?email=$email&code=$validation_code\n \";\n $headers=\"From: [email protected]\";\n\n send_email($email,$subject,$message,$headers);\n\n\n set_message(\"<p class='bg-success text-center'>Please check your email or spam folder for a password reset code</p>\");\n redirect(\"index.php\");\n }else{\n echo validation_errors(\"This email does not exist\");\n }\n }else{\n redirect(\"index.php\");\n }//token checks\n if(isset($_POST['cancel_submit'])){\n redirect(\"login.php\");\n }\n }//post request\n}", "function reset_password($code=\"\"){\n\t\t$cond = \"verifyType = 2 AND status = 0 AND code = '\".$code.\"'\";\n\t\t$result\t\t=\t$this->Common_model->selRowData(PREFIX.\"verification\", '' ,$cond);\n\t\t\n\t\tif($result){\n\t\t\tif(isset($_POST[\"btnSubmit\"])){\n\n\t\t\t $userData=$this->Common_model->selRowData(PREFIX.\"user\",\"*\",\"userId = \".$result->userId);\n\t\t\t\n\t\t $updateData\t=\tarray();\n\n \t\t\t\t$updateData['password'] = md5(trim($_POST[\"txt_password\"])); \n\t\n\t\t\t\t $update=$this->Common_model->update(\"fc_user\",$updateData,\"userId=\".$result->userId);\n\t\t\t\t\n\t\t\t\tif($update) {\n\t\t\t\t\t$updateData\t\t\t\t=\tarray();\n\t\t\t\t\t$updateData['status']\t=\t1;\n\t\t\t\t\t$cond\t\t\t\t\t= \t\"verifyId = \".$result->verifyId;\n\t\t\t\t\t$update_fl\t\t\t\t=\t$this->Common_model->update(PREFIX.\"verification\",$updateData,$cond);\n\t\t\t\t\t//echo $this->db->last_query();\n\n\t\t\t\t}\n\t\t\t\t$this->common_lib->setSessMsg(\"New password has been set successfully\", 5);\n\t\t\t}\n\t\t\t$this->load->viewF('resetPassword');\n\t\t} else {\n\t\t\t$this->load->viewF('linkExpired');\n\t\t}\t\n\t}", "public function ResetPassword() {\n\t\t\t$strPassword = strtolower(substr(md5(microtime()), 4, 8));\n\t\t\t$this->SetPassword($strPassword);\n\t\t\t$this->PasswordResetFlag = true;\n\t\t\t$this->Save();\n\n\t\t\t// Setup Token Array\n\t\t\t$strTokenArray = array(\n\t\t\t\t'NAME' => $this->strFirstName . ' ' . $this->strLastName,\n\t\t\t\t'USERNAME' => $this->strUsername,\n\t\t\t\t'PASSWORD' => $strPassword\n\t\t\t);\n\n\t\t\t// Send Message\n\t\t\tQApplication::SendEmailUsingTemplate('forgot_password', 'Qcodo.com Credentials', QCODO_EMAILER,\n\t\t\t\t$this->SmtpEmailAddress, $strTokenArray, true);\n\t\t}", "public function passwordResetAction()\n {\n // get the view vars\n $errors = $this->view->errors;\n $site = $this->view->site;\n $validator = $this->view->validator;\n\n // set the input params\n $requiredParams = array(\n 'code',\n );\n\n $input = $this->processInput( $requiredParams, null, $errors );\n\n // check if there were any errors\n if ( $errors->hasErrors() ) {\n return $this->renderPage( 'errors' );\n }\n\n // decode the hash and gets its parts, confirm all good and allow user to change password\n list( $userIdentification, $timestamp, $signature ) = explode( '|', base64_decode( urldecode( $input->code ) ) );\n\n // first assume userIdentification is a username\n $user = $site->getUserByUsername( $userIdentification );\n\n // if userIdentification is not a username, use userIdentification as an email address\n if ( ! $user ) {\n $user = $site->getUserByEmailAddress( $userIdentification );\n }\n\n $validator->checkValidUser( $user, $errors );\n $validator->checkValidResetPasswordCode( $site, $userIdentification, $timestamp, $signature, $errors );\n\n if ( $errors->hasErrors() ) {\n return $this->renderPage( 'errors' );\n }\n\n return $this->renderPage( 'authPasswordReset' );\n }", "public function reset_password($code) {\n\t\t$reset = $this->ion_auth->forgotten_password_complete($code);\n\t\tif ($reset) { //if the reset worked then send them to the login page\n\t\t\t$this->session->set_flashdata('message', $this->ion_auth->messages());\n//\t\t\tredirect('auth/login', 'refresh');\n\t\t\tredirect('site/new_password_sent', 'refresh');\n\t\t} else { //if the reset didnt work then send them back to the forgot password page\n\t\t\t$this->session->set_flashdata('message', $this->ion_auth->errors());\n\t\t\tredirect('auth/forgot_password', 'refresh');\n\t\t}\n\t}", "public function resetUserPassword()\n\t{\n\t\t# make the call to the API\n\t\t$response = App::make('ApiClient')->post('user/password?forgotten=true', Input::only('email'));\t\n\n\t\t# if the call was successful we'll want to give some feedback to the user\n\t\tif(isset($response['success'])) \n\t\t{\n\t\t\tSession::flash('success', $response['success']['data']);\n\t\t}\n\t\t# similarly if it failed, but this time also show the previous form data\n\t\telse {\n\t\t\t# save the API response to some flash data\n\t\t\tSession::flash('reset-errors', getErrors($response));\n\n\t\t\t# also flash the input so we can replay it out onto the reg form again\n\t\t\tInput::flash();\n\t\t}\t\t\n\n\t\t# ... and show the reset form again\n\t\treturn Redirect::to('forgotten-password');\n\t}", "function password_reset(){\n\n // if the cookie is still active get the email \n // if the email and the validation code are set \n if(isset($_COOKIE['temp_access_code'])) {\n\n if(isset($_GET['email']) && isset($_GET['code'])){\n\n if(isset($_SESSION['token']) && isset($_POST['token'])) {\n \n // If all the conditions are verified update the user information \n \n if ( $_POST['token'] === $_SESSION['token']) {\n\n if( $_POST['password'] === $_POST['confirm_password'] ){ \n\n \n\t\t \n //$updated_password = $_POST['password']\n\t\t\t\n\t\t$updated_password = password_hash($_POST['password'] , PASSWORD_BCRYPT, array('cost'=>12));\n\n $sql = \"UPDATE users SET password = '\".escape($updated_password).\"', validation_code = 0, active = 1 WHERE email = '\".escape($_GET['email']).\"' \";\n query($sql);\n\n\n set_message(\"<p class='bg-success text-center'>Your password has been updated, Please login</p>\"); \n\n redirect(\"login.php\");\n\n } else{ // otherwise display an error message\n\n echo validation_errors(\"Password fields do not match. Please try again\");\n }\n\n }\n\n \n }\n\n }\n\n }\n else \n { // If the conditions are false redirect the user to the recovery page \n\n set_message(\"<p class='bg-danger text-center'>Sorry your time expired</p>\");\n \n redirect(\"recover.php\");\n }\n\n\n}", "function password_reset()\n {\n if(isset($_COOKIE['temp_access_code'])){\n\n if(isset($_GET['email']) && isset($_GET['code'])){\n\n if(isset($_SESSION['token']) && isset($_POST['token'])){\n\n if($_POST['token']=== $_SESSION['token']){\n if($_POST['password']===$_POST['confirm_password']){\n $updated_password=md5($_POST['password']);\n $sql=\"UPDATE users SET password='\".escape($updated_password).\"',validation_code=0 WHERE email='\".escape($_GET['email']).\"'\";\n query($sql);\n set_message(\"<p class='bg-success text-center'>Your password has been updated please login</p>\");\n redirect(\"login.php\");\n\n }else{\n echo validation_errors(\"Password fields do not match\");\n }\n\n\n }\n\n }\n\n }\n\n\n }else{\n set_message(\"<p class='bg-danger text-center'>Sorry your validation cookie was expired</p>\");\n redirect(\"recover.php\");\n }\n\n }", "public function resetPasswordFromLogin()\r\n {\r\n $email = Input::get('EMAIL');\r\n $lead = Lead::where('email',$email)->first();\r\n if($lead!=null)\r\n {\r\n $lead->password = substr(md5(microtime().rand()), 0, 8);\r\n $lead->save();\r\n\r\n //Create Transaction\r\n Transaction::createTransaction('', $lead->id, '',\"RESTORE-PASSWORD\", '', '', $lead->email, '', '', $lead->phone, '');\r\n\r\n //send the new password by email\r\n mail($lead->email, 'PATENT SERVICES NEW PASSWORD', 'Your new Password is: '.$lead->password);\r\n\r\n//\r\n return \"1\";\r\n }\r\n return \"-1\";\r\n }", "function reset() {\n $this->wait();\n $viewret = $this->view();\n if($viewret == ''){\n return '';\n }\n //print $viewret.'<br>';\n $pageRet = $this->net_c->get($viewret);\n $rid = $this->parseRidValue($pageRet);\n if($rid == ''){\n return '';\n }\n\n $str = null;\n $strPol = \"abcdefghijklmnopqrstuvwxyz0123456789\";\n $max = strlen($strPol)-1;\n for($i=0;$i<10;$i++){\n $str.=$strPol[rand(0,$max)];\n }\n $this->password = $str;\n\n $data = array('password'=>$this->password, 'password_confirm'=>$this->password, 'rid'=>$rid);\n\n //print $this->mailaddr.'<br>';\n //print $this->password.'<br>';\n //print $rid.'<br>';\n //print $data.'<br>';\n\n require_once('idd.php');\n $db = new IdoDB();\n $db->update($this->mailaddr,'passwd',$this->password);\n\n $this->net_c->post('https://www.dmm.co.jp/my/-/passwordreminder/complete/',$data);\n \n return $this->password;\n }", "public function remind_password($email){\n\t\t $sql=\"SELECT * FROM waf_users WHERE email='\".$this->db->Q($email,1).\"'\";\n\t\t$result=$this->db->ROW_Q($sql);\n\t\tif($result)\n\t\t{\n\t\t $mdkey=md5(rand(10000,time()));\n\t\t \n\t\t \n\t\t $sql1=\"UPDATE waf_users SET rmn_pass='\".$mdkey.\"' WHERE id=\".$this->db->Q($result['id']);\n\t\t $this->db->QUERY($sql1);\n\t\t\n\t\t $link=(isset($_SERVER['HTTPS'] )?'https':'http').\"://\".$_SERVER['SERVER_NAME'].$this->web_root.\"reset_password.php?key=\".$mdkey;\n\t\t $msg=\"Some body try reset your password.\"\n\t\t\t\t\t.\"If you forget password \"\n\t\t\t\t\t.\"<a href='\".$link.\"'>click link</a>\"\n\t\t\t\t\t.\"W.A.F. System\";\n\t\t\n\t\t mail($result['email'],$subject,$msg);\n\t\t header(\"Location:?sended=1\");\n\t\t}else{\n\t\t return 'Guru you never know';\n\t\t}\n\t}", "public function processpasswordrequest ()\n {\n if ($_POST)\n {\n try\n {\n // first verify requestID is valid\n $user = $this->welcome->getPasswordResetUser($_POST['requestID']);\n\n if (empty($user)) $this->functions->jsonReturn('ALERT', \"Unable to find a valid password reset request based upon that password request ID\");\n\n // first reset password\n $this->welcome->updateUserPassword($user, $_POST['password']);\n\n // deactivates all password reset requests for that user - they need to fill out the form again to reset their password again\n $this->welcome->deactivatePasswordRequests($user);\n \n $this->functions->jsonReturn('SUCCESS', \"Password has been reset\");\n }\n catch(Exception $e)\n {\n $this->functions->sendStackTrace($e);\n $this->functions->jsonReturn('ERROR', $e->getMessage());\n }\n }\n }", "public function resetPassword()\n {\n // So redirect.\n if (!$this->session->resetId) {\n $this->redirect->url('/users/login/');\n }\n\n $this->load->library('Validate', $this, true);\n $this->data->title = 'Reset Password';\n $this->_loadView(__FUNCTION__);\n }", "function resetPassword()\n {\n global $conn;\n\n /* Can't access page directly */\n if(!$_POST && !isset($_GET['ext'])) {\n echo \"<p class='ml-4 kentYellow'>No valid reset password configuration found. Redirecting to login...</p>\";\n header(\"refresh: 2; url='./Login.php'\");\n return TRUE;\n }\n\n /* Ensure link is valid */\n if(isset($_GET['ext'])) {\n $extMatch = $conn->prepare(\"SELECT * FROM ForgotPass WHERE ResetExt = ?;\");\n $extMatch->bindParam(1, $_GET['ext'], PDO::PARAM_STR, 32);\n $extMatch->execute();\n $extMatch = $extMatch->fetch(PDO::FETCH_ASSOC);\n\n if(!$extMatch) {\n echo \"<p class='ml-4 kentBlue'>Link is no longer valid.</p>\";\n echo \"<p class='ml-4 kentBlue'>Go to <a href='Forgot.php'>Forgot Password</a> to restart the process.</p>\";\n return TRUE;\n }\n else {\n return FALSE;\n }\n }\n\n if($_POST) {\n /* URL contains ext argument */\n if(isset($_POST['ext']) && !empty($_POST['ext'])) {\n /* Compare password fields */\n if($_POST['Password'] === $_POST['PasswordVerify']) {\n /* Verify ext matches user's ID */\n $extMatch = $conn->prepare(\"SELECT * FROM ForgotPass WHERE ResetExt = ?;\");\n $extMatch->bindParam(1, $_POST['ext'], PDO::PARAM_STR, 32);\n $extMatch->execute();\n $extMatch = $extMatch->fetch(PDO::FETCH_ASSOC);\n\n if($extMatch) {\n /* Update user account */\n $argonHash = password_hash($_POST['Password'], PASSWORD_ARGON2ID);\n\n $updateAccount = $conn->prepare(\"UPDATE Accounts SET Password = ? WHERE ID = ?;\");\n $updateAccount->bindParam(1, $argonHash, PDO::PARAM_STR, 128);\n $updateAccount->bindParam(2, $extMatch['ID'], PDO::PARAM_STR, 128);\n if($updateAccount->execute()) {\n /* Delete ForgotPass record */\n $delExt = $conn->prepare(\"DELETE FROM ForgotPass WHERE ResetExt = ?;\");\n $delExt->bindParam(1, $_POST['ext'], PDO::PARAM_STR, 32);\n if($delExt->execute()) {\n echo \"<p class='ml-4 kentBlue'>Password updated! Click below to log in or leave page.</p>\";\n echo \"<p><a class='ml-4' href='./Login.php'>Login</a></p>\";\n return TRUE;\n }\n /* Password updated but record not deleted from ForgotPass - Delete manually */\n else {\n error_log(\"$extMatch[ID] changed password but ForgotPass record not deleted!\", 1, \"[email protected]\");\n echo \"<p class='ml-4 kentBlue'>Password updated! Click below to log in or leave page.</p>\";\n echo \"<p><a href='./Login.php'>Login</a></p>\";\n return TRUE;\n }\n }\n /* Could not update password */\n else {\n retryLink();\n return TRUE;\n }\n }\n /* No ext match */\n else {\n retryLink();\n return TRUE;\n }\n }\n /* Passwords do not match */\n else {\n echo \"<p class='ml-4 kentYellow'>Passwords do not match. Please retry.</p>\";\n return FALSE;\n }\n }\n /* Malformed URL */\n else {\n retryLink();\n return TRUE;\n }\n }\n else {\n return FALSE;\n }\n }", "function forgotten_password_reset()\n {\t\n $data['heading'] = $this->lang->line('FAL_forgotten_password_label');\n $data['fal'] = $this->fal_front->forgotten_password_reset();\n\t $this->load->view($this->_container, $data); \n }", "protected function changePassword() {}", "function ll_reset_psw( $key, $login ) { \n\n\t\t$user = $this->ll_check_password_reset_key( $key, $login );\n\n\t\tif ( is_wp_error($user) ) {\n\t\t\t$this->ll_login_header(__('Reset Password','loginlock'), '<p class=\"message reset-pass\">' . __('Your password reset key is invalid.','loginlock') . '</p>', $errors );\n\t\t\t// ( site_url('wp-login.php?action=lostpassword&error=invalidkey') );\n\t\t\texit;\n\t\t}\n\n\t\t$errors = '';\n\n\t\tif ( isset($_POST['ll_reset_password']) && !wp_verify_nonce($_POST['ll_reset_password'], 'll_reset_psw') ) { \n\n\t\t\t$errors = new WP_Error('password_reset_auth_error', __('You are not authorized to take that action!','loginlock'));\n\n\t\t} else if ( isset($_POST['pass1']) && $_POST['pass1'] != $_POST['pass2'] ) {\n\n\t\t\t$errors = new WP_Error('password_reset_mismatch', __('The passwords do not match.','loginlock'));\n\n\t\t} else if ( ( isset( $_POST['pass1'] ) && !empty( $_POST['pass1'] ) ) && ( true !== $this->ll_test_new_psw( $_POST['pass1'], $login ) ) ) { \n\n\t\t\t$errors = new WP_Error('password_reset_mismatch', __('You cannot reuse that password yet. Please choose a different password.','loginlock'));\n\n\t\t} else if ( isset( $_POST['pass1'] ) && !empty( $_POST['pass1'] ) && $msg = $this->ll_check_psw_strength( $_POST['pass1'] ) ) { \n\n\t\t\t $errors = new WP_Error('password_policy_error', __($msg));\n\n\t\t} elseif ( isset($_POST['pass1']) && !empty($_POST['pass1']) ) {\n\n\t\t\t do_action('password_reset', $user, $_POST['pass1']);\n\t\t\t wp_set_password($_POST['pass1'], $user->ID);\n\t\t\t wp_password_change_notification($user);\n\t\t\t delete_user_meta($user->ID, 'll_force_password_change_now');\n\t\t\t $this->ll_login_header(__('Password Reset','loginlock'), '<p class=\"message reset-pass\">' . __('Your password has been reset.','loginlock') . ' <a href=\"' . site_url('wp-login.php', 'login') . '\">' . __('Log in','loginlock') . '</a></p>');\n\t\t\t $this->ll_login_footer();\n\t\t\t exit;\n\n\t\t}\n\n\t\tif (isset($errors->errors['password_reset_auth_error'])) {\n\t\t $msg = __('You are not authorized to take that action','loginlock');\n\t\t $this->ll_login_header('', '', $errors); \n\t\t exit;\n\t\t}\n\n\t\twp_enqueue_script('utils');\n\t\twp_enqueue_script('user-profile');\n\n\t\t$msg = __('You must reset your password.','loginlock').'<br/><br/>';\n\n\t\tif ('yes' == $this->ll_options['psw_reuse'])\n\n\t\t$msg .= __('You may not reuse old passwords!', 'loginlock').'<br/><br/>';\n\n\t\t$msg .= __('Enter your new password below:', 'loginlock');\n\n\t\t$this->ll_login_header(__('Reset Password', 'loginlock'), '<p class=\"message reset-pass \">' . $msg . '</p>', $errors );\n\n\n\t?>\n\t <form name=\"resetpassform\" id=\"resetpassform\" action=\"<?php echo site_url('wp-login.php?action=resetpass&key=' . urlencode($key) . '&login=' . urlencode($login) , 'login_post') ?>\" method=\"post\">\n\t\t<input type=\"hidden\" id=\"user_login\" value=\"<?php echo esc_attr( $_GET['login'] ); ?>\" autocomplete=\"off\" />\n\t\t<?php wp_nonce_field('ll_reset_psw', 'll_reset_password'); ?>\n\t\t<p>\n\t\t\t<label><?php _e('New password','loginlock') ?><br />\n\t\t\t<input type=\"password\" name=\"pass1\" id=\"pass1\" class=\"input\" size=\"20\" value=\"\" autocomplete=\"off\" /></label>\n\t\t</p>\n\t\t<p>\n\t\t\t<label><?php _e('Confirm new password', 'loginlock') ?><br />\n\t\t\t<input type=\"password\" name=\"pass2\" id=\"pass2\" class=\"input\" size=\"20\" value=\"\" autocomplete=\"off\" /></label>\n\t\t</p>\n\n\t\t<div id=\"pass-strength-result\" class=\"hide-if-no-js\"><?php _e('Strength indicator', 'loginlock'); ?></div>\n\t\t<p class=\"description indicator-hint\">\n\t\t <strong>\n\t\t <span style=\"color:#cf0000\">\n\t\t\t<?php _e('NOTE', 'loginlock');?>: \n\t\t </span>\n\t\t <?php _e('The password must be at least', 'loginlock');\n\t\t\techo ' '.$this->ll_options['psw_length'].' ';\n\t\t ?>\n\n\t\t <?php _e('characters long.', 'loginlock');?>\n\n\t\t <?php \n\t\t\tif ('high' == $this->ll_options['psw_policy'] ) { \n\t\t\t _e('You must include upper and lower case letters, numbers, and symbols like ! \" ? $ % ^ &amp;.', 'loginlock');\n\t\t\t} else if ('medium' == $this->ll_options['psw_policy'] ) { \n\t\t\t _e('You must include upper and lower case letters and numbers.', 'loginlock');\n\t\t\t}\n\t\t ?>\n\t\t </strong>\n\t\t</p>\n\n\t\t<br class=\"clear\" />\n\t\t<p class=\"submit\"><input type=\"submit\" name=\"wp-submit\" id=\"wp-submit\" class=\"button-primary\" value=\"<?php esc_attr_e('Reset Password', 'loginlock'); ?>\" tabindex=\"100\" /></p>\n\t </form>\n\n\t<p id=\"nav\">\n\t<a href=\"<?php echo site_url('wp-login.php', 'login') ?>\"><?php _e('Log in', 'loginlock') ?></a>\n\t<?php if (get_option('users_can_register')) : ?>\n\t| <a href=\"<?php echo site_url('wp-login.php?action=register', 'login') ?>\"><?php _e('Register', 'loginlock') ?></a>\n\t<?php endif; ?>\n\t</p>\n\n\t<?php\n\t$this->ll_login_footer('user_pass');\n\texit;\n\t}", "public function requestPasswordReset()\n {\n $this->View->render('user/requestPasswordReset');\n }", "public function lostPassword() {\n $this->form_validation->set_rules('email', 'Email', 'required');\n\n if ($this->form_validation->run() === FALSE) {\n \t$this->error(400, 'Validation error');\n }\n \n $this->loadUser();\n \n $this->user_model->setValue(\n \t'temp_code', $this->generateTempCode());\n $this->user_model->setValue(\n \t'temp_code_valid_until', date('Y-m-d H:i:s', strtotime('+ 2 days')));\n \t\n if (! $this->user_model->updateTempCode()) {\n \t$this->error(400, 'Something went wrong');\n }\n\n\t\t$this->sendEmail(\n\t\t\t$this->input->post('email'), \n\t\t\t'Set New Password', \n\t\t\t$this->getLostPasswordMailBody($this->user_model->getValue('temp_code')));\n\t\t$data['msg'] = 'New password mail for ' . $this->input->post('email') . ' sent.';\n\t\t$this->response($data);\n }", "public function resetPassword()\n {\n $model_data = array(\n 'token' => $this->input->post('token'),\n 'password' => $this->input->post('password'),\n 'con_password' => $this->input->post('con_password'),\n );\n $status = $this->authentication_worker->resetPassword($model_data);\n \n if ($status == \"true\") {\n $this->mViewData['data'] = array(\n 'pageName' => \"LOGIN\",\n );\n $this->session->set_flashdata('success_msg', 'Senha alterada com sucesso');\n redirect('home/Entrar');\n } else {\n $this->session->set_flashdata('error_msg', 'Erro ao redefinir a senha');\n $this->mViewData['data'] = array(\n 'pageName' => \"LOGIN\",\n );\n redirect('home/Entrar');\n }\n }", "function caldol_bypass_password_reset(){\n\treturn true;\n}", "function reset_password($user, $new_pass)\n {\n }", "public function reset($code=null) {\n\t\t\n\t\tif(empty($code))\n\t\t{\n\t\t\tredirect(website_url('auth'));\n\t\t}\n\t\t\n\t\t$this->output->append_title('Reset Password');\n\t\t$data = array();\n\t\t$message = array();\n\t\tif($this->input->post())\n\t\t{\n\t\t\t$this->form_validation->set_rules('new_password', 'New Password', 'trim|required');\n\t\t\t$this->form_validation->set_rules('confirm_password', 'Confirm Password', 'trim|required|matches[new_password]');\n\t\t\tif($this->form_validation->run() == TRUE)\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\t$user = Sentry::findUserByResetPasswordCode($code);\n\t\t\t\t\tif ($user->checkResetPasswordCode($code))\n\t\t\t\t\t{\n\t\t\t\t\t\t// Attempt to reset the user password\n\t\t\t\t\t\tif ($user->attemptResetPassword($code, $this->input->post('new_password')))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$message = array('type' => 'success','message' => 'Password updated successfully.');\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$message = array('type' => 'danger','message' => 'Invalid reset code.');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$message = array('type' => 'danger','message' => 'Invalid reset code.');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (Cartalyst\\Sentry\\Users\\UserNotFoundException $e)\n\t\t\t\t{\n\t\t\t\t\t$message = array('type' => 'danger','message' => 'Invalid reset code.');\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$message = array('type' => 'danger','message' => $this->message->validation_errors());\n\t\t\t}\n\t\t\t$this->message->set($message['type'], $message['message']);\n\t\t}\n\t\t\t\n\t\t$data['new_password'] = array('name' => 'new_password',\n\t\t\t'autofocus' => 'autofocus',\n\t\t\t'id' => 'new_password',\n\t\t\t'placeholder' => 'New Password',\n\t\t\t'class' => 'form-control',\n\t\t\t'type' => 'password'\n\t\t);\n\t\t\n\t\t$data['confirm_password'] = array('name' => 'confirm_password',\n\t\t\t'autofocus' => 'autofocus',\n\t\t\t'id' => 'confirm_password',\n\t\t\t'placeholder' => 'Confirm Password',\n\t\t\t'class' => 'form-control',\n\t\t\t'type' => 'password'\n\t\t);\n\t\t\n\t\t$this->load->view(parent::$module.'/reset_password',$data);\n\t}", "public function forgotPassword()\n {\n if ($this->issetPostSperglobal('email') && !empty($this->getPostSuperglobal('email'))) {\n if ($this->users_manager->resetToken($this->getPostSuperglobal('email'))) {\n $this->session->writeFlash('success', \"Les instructions pour réinitialiser votre mot de passe vous ont été envoyées par email, vous avez 30 minutes pour le faire.\");\n } else {\n $this->session->writeFlash('danger', \"Aucun compte ne correspond à cet adresse mail : {$this->getPostSuperglobal('email')}.\");\n }\n } else {\n $this->session->writeFlash('danger', \"L'adresse mail n'est pas ou est mal renseignée.\");\n }\n $this->render('forgot-password', ['head'=>['title'=>'Mot de passe oublié', 'meta_description'=>'']]);\n }", "public function reset_password()\n\t{\n\t\t$validation = Validator::make(Input::all(),array('password'=>'required|min:8|confirmed'));\n\t\tif($validation->passes())\n\t\t{\n\t\t\t$code = Input::get('code');\n\t\t\t$password = Input::get('password');\n\t\t\tif ($this->repo->resetPassword($code,$password))\n\t\t\t{\n\t\t\t\treturn Redirect::to('login');\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\t\t\t\n\t\t\tSession::flash('error','There are errors with the password');\n\t\t\treturn Redirect::to('user/reset-password?code='.Input::get('code'))->withErrors($validation);\n\t\t}\n\t\treturn Redirect::to('forgot_password');\n\t}", "function changePasswordFromEmail($conn, $selector, $validator, $password, $passwordRepeat){\n /* date à l'instant t */\n $currentDate = date(\"U\");\n\n /* On selectionne tout de la ligne de la bdd pwdreset qui contient le selector ET dont la date d'expiration est supérieur à l'insatant t */\n $sql = \"SELECT * FROM pwdReset WHERE pwdResetSelector=? AND pwdResetExpires >= ?;\";\n $stmt = mysqli_stmt_init($conn);\n\n /* on test si la communication avec la bdd est possible */\n if(!mysqli_stmt_prepare($stmt, $sql)){\n echo \"error\";\n exit();\n } else {\n /* on remplace dans $sql par les variables donné au lieu de ? */\n mysqli_stmt_bind_param($stmt, \"ss\", $selector, $currentDate);\n /* on execute le stmt */\n mysqli_stmt_execute($stmt);\n\n /* on recupere le résultat */\n $result = mysqli_stmt_get_result($stmt);\n if(!$row = mysqli_fetch_assoc($result)){ /* transforme le résultat en array */\n echo \"u need to re-submit your reset request\";\n exit();\n } else {\n /* le token validator est passé en binaire */\n $tokenBin = hex2bin($validator); \n /* booleen qui check si le token de l'url est le meme que celui de la bdd */\n $tokenCheck = password_verify($tokenBin, $row[\"pwdResetToken\"]); \n\n if($tokenCheck === false) {\n echo \"u need to re-submit your reset request\";\n exit();\n } elseif ($tokenCheck === true){\n /* on recupere la valeur de l'email dans ma bdd pwdreset */\n $tokenEmail = $row[\"pwdResetEmail\"];\n\n /* on selectionne tout de la ligne de la bdd users qui contient le mail donné */\n $sql = \"SELECT * FROM users WHERE usersEmail=?;\";\n $stmt = mysqli_stmt_init($conn);\n\n if(!mysqli_stmt_prepare($stmt, $sql)){\n echo \"error\";\n exit();\n } else {\n mysqli_stmt_bind_param($stmt, \"s\", $tokenEmail);\n mysqli_stmt_execute($stmt);\n $result = mysqli_stmt_get_result($stmt);\n if(!$row = mysqli_fetch_assoc($result)){\n echo \"was error\";\n exit();\n } else {\n /* on change dans la bdd users le mdp de la ligne qui contient le mail donné */\n $sql = \"UPDATE users SET usersPassword=? WHERE usersEmail=?;\";\n $stmt = mysqli_stmt_init($conn);\n\n if(!mysqli_stmt_prepare($stmt, $sql)){\n echo \"error\";\n exit();\n } else {\n $newPasswordHashed = password_hash($password, PASSWORD_DEFAULT);\n mysqli_stmt_bind_param($stmt, \"ss\", $newPasswordHashed, $tokenEmail);\n mysqli_stmt_execute($stmt);\n\n /* on supprime de la bdd pwdreset la ligne qui pontient le mail donné */\n $sql = \"DELETE FROM pwdReset WHERE pwdResetEmail=?;\";\n $stmt = mysqli_stmt_init($conn);\n\n if(!mysqli_stmt_prepare($stmt, $sql)){\n echo \"error 2\";\n exit();\n } else {\n mysqli_stmt_bind_param($stmt, \"s\", $tokenEmail);\n mysqli_stmt_execute($stmt);\n header(\"location: \". HTTP_SERVER .\"View/logIn/logIn.php?newPassword=passwordupdated\");\n }\n\n }\n }\n }\n }\n }\n }\n}", "function password_recovery()\n\t{\n\n\n\t}", "public function resetpasswordAction(){\n $key = urldecode($this->getRequest()->getParam('key'));\n $admin_id = $this->getRequest()->getParam('user_id');\n if($key && $admin_id){\n //check hash key exists and is not expired\n $recoveryEmailsMapper = new Application_Model_Table_AdminUserRecoveryEmails();\n $recoverEmail = $recoveryEmailsMapper->fetchByActivationKey($key, $admin_id);\n if(!$recoverEmail){\n //not found so redirect\n $this->_helper->redirector->goToRouteAndExit(array(\n 'module' => 'default',\n 'controller' => 'index',\n 'action' => 'index',\n ), 'default', true);\n }\n\n $form = new Admin_Form_Resetpassword();\n if ($this->getRequest()->isPost()) {\n if ($form->isValid($this->_request->getPost())) {\n $values = $form->getValues();\n //update password\n $adminMapper = new Application_Model_Table_AdminUsers();\n $customer = $adminMapper->fetchRow(\"admin_user_id = $recoverEmail->admin_user_id\");\n $customer->hashPassword($values['new_password']);\n $customer->save();\n\n //remove from recovery email so that password cannot be reset again\n $recoveryEmailsMapper->delete(\"admin_user_id = $recoverEmail->admin_user_id\");\n $this->_helper->FlashMessenger->addMessage('Your password has been reset, you may now login using your new password' , 'successful');\n $this->_helper->redirector->goToRouteAndExit(array(), 'admin-dashboard', true);\n }\n }\n $this->view->form = $form;\n } else {\n //redirect as not valid\n $this->_helper->redirector->goToRouteAndExit(array(\n 'module' => 'default',\n 'controller' => 'index',\n 'action' => 'index',\n ), 'default', true);\n }\n }", "public function reset($username) {\r\n\t\tglobal $db;\r\n\t\t// Resets a users password.\r\n\t\tif (strpos($username,'@') > 0) {\r\n\t\t\t// Its an Email.\r\n\t\t\t$udata = db::get_array(\"users\",array(\"email\"=>$username));\r\n\t\t} else {\r\n\t\t\t$udata = db::get_array(\"users\",array(\"username\"=>$username));\r\n\t\t}\r\n\t\t// Check if they exist.\r\n\t\tif (count($udata) > 0) {\r\n\t\t\t// Yup\r\n\t\t\t$rand = $this->gen_rand();\r\n\t\t\t$udata = $udata[0];\r\n\t\t\t$uid = $udata['id'];\r\n\t\t\t\r\n\t\t\t// Update their account.\r\n\t\t\tdb::update(\"users\",array(\"passreset\"=>1,\"passresetkey\"=>$rand),array(\"id\"=>$uid));\r\n\t\t\t\r\n\t\t\t// Send them an email.\r\n\t\t\t$e = new email_tmpl();\r\n\t\t\t$e->init($udata['email'],\"Password Reset\");\r\n\t\t\t$e->load(\"password_reset\");\r\n\t\t\t$e->set_var(\"key\",$rand);\r\n\t\t\t$e->set_var(\"username\",$udata['username']);\r\n\t\t\t$eres = $e->send();\r\n\t\t\t\r\n\t\t\t// Add a notification too. C:\r\n\t\t\tif ($eres) {\r\n\t\t\t\t$this->notifications($uid)->create(\"Password Reset\",\"You have requested a password reset, We've sent you an Email to you containing a link to reset your password. If this wasn't you contact support immediately.\");\r\n\t\t\t\treturn array(\"res\"=>true,\"msg\"=>\"Password has been reset and Emailed to {$udata['email']}\",\"email\"=>$udata['email']);\r\n\t\t\t} else {\r\n\t\t\t\t$this->notifications($uid)->create(\"Password Reset\",\"You have requested a password reset. However we were unable to send you an Email. Please open a support ticket or contact us directly via IRC.\");\r\n\t\t\t\treturn array(\"res\"=>true,\"msg\"=>\"Password has been reset but could not be Emailed to {$udata['email']} please open a support ticket if you have account access, e.g. still logged in or talk to staff on IRC.\",\"email\"=>$udata['email']);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t// Nope.\r\n\t\t\treturn array(\"res\"=>false,\"msg\"=>\"There was no such user with that Username/E-Mail!\");\r\n\t\t}\r\n\t}", "public function actionPasswordReset()\n\t{\n\t\t$this->render('passwordReset');\n\t}", "public static function do_lost_password() {\n\t\tif ( ! self::is_global_reset_password_page_set() && ! FrmRegLoginController::is_global_login_page_set() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( 'POST' == $_SERVER[ 'REQUEST_METHOD' ] ) {\n\n\t\t\t// Attempt to send reset password email\n\t\t\t$errors = retrieve_password();\n\n\t\t\tif ( is_wp_error( $errors ) ) {\n\t\t\t\t// Errors found\n\t\t\t\tself::lost_password_redirect_with_errors( $errors );\n\n\t\t\t} else {\n\t\t\t\t// Email sent\n\t\t\t\tself::lost_password_redirect_no_errors();\n\t\t\t}\n\t\t}\n\t}", "public function resetPassword()\n {\n // Create a reset code for the user to reset their password\n $this->resetcode = rand(1000, 9999);\n $this->save();\n return $this->resetcode;\n }", "function ResetForgotCode($code='')\n\t{\n\t\tif ($this->userid <= 0) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ($code == '') {\n\t\t\treturn false;\n\t\t}\n\n\t\t$query = \"UPDATE \" . SENDSTUDIO_TABLEPREFIX . \"users SET forgotpasscode='\" . $this->Db->Quote($code) . \"' WHERE userid='\" . (int)$this->userid . \"'\";\n\t\treturn $this->Db->Query($query);\n\t}", "public function forgotPwd() {\n\t\tif (isset($_POST['email'])){\n\t\t\t\t$email = $_POST['email'];\n\t\t\t\t$query=\"select * from users where email='$email'\";\n\t\t\t\t$result = mysqli_query($this->connrps,$query);\n\t\t\t\t$count=mysqli_num_rows($result);\n\t\t\t\t// If the count is equal to one, we will send message other wise display an error message.\n\t\t\t\tif($count==1){\n\t\t\t\t\t$rows=mysqli_fetch_array($result);\n\t\t\t\t\t$pass = base64_decode($rows['password']);\n\t\t\t\t\t$to = $rows['email'];\n\t\t\t\t\t$url = $_SERVER['HTTP_HOST'];\n\t\t\t\t\t$body = \"\n\t\t\t\t\tWebsite Url : $url <br/>\n\t\t\t\t\tYour Email Id : $to <br/>\n\t\t\t\t\tHere is your password : $pass <br/><br/><br/><br/>\n\t\t\t\t\tSincerely,<br/>\n\t\t\t\t\tBARNA\";\n\t\t\t\t\t$from = \"[email protected]\";\n\t\t\t\t\t$subject = \"Your password has been recovered\";\n\t\t\t\t\t$headers1 = 'From: Password Recovered <$from>' . \"\\r\\n\";\n\t\t\t\t\t$headers1 .= \"Content-type: text/html;charset=iso-8859-1\\r\\n\";\n\t\t\t\t\t$headers1 .= \"X-Priority: 1\\r\\n\";\n\t\t\t\t\t$headers1 .= \"X-MSMail-Priority: High\\r\\n\";\n\t\t\t\t\t$headers1 .= \"X-Mailer: Password Recovered\\r\\n\";\n\t\t\t\t\t$sentmail = mail ( $to, $subject, $body, $headers1 );\n\t\t\t\t\t//If the message is sent successfully, display sucess message otherwise display an error message.\n\t\t\t\t\tif($sentmail==1){\n\t\t\t\t\t\t$message= \"Your password has been sent to your email address.\";\n\t\t\t\t\t\t$_SESSION['succ_msg'] = $message;\n\t\t\t\t\t\treturn 1;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif($_POST['email']!=\"\"){\n\t\t\t\t\t\t\t$message= \"Cannot send password to your e-mail address.Problem with sending mail...\";\n\t\t\t\t\t\t\t$_SESSION['error_msg'] = $message;\n\t\t\t\t\t\t\treturn 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t }\n\t\t\t\t} else {\n\t\t\t\t\tif ($_POST ['email'] != \"\") {\n\t\t\t\t\t$message= \"Email does not exist.\";\n\t\t\t\t\t$_SESSION['error_msg'] = $message;\n\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t }\n }", "public function resetAndUpdatePassword() {\n $this->validate ( $this->request, $this->getRules () );\n $user = User::where ( 'email', $this->request->email )->first ();\n \n if (!empty($user) && count ( $user->toArray() ) > 0) {\n $user->password = Hash::make ( (true) ? config()->get('app.user_password'): $this->generatePassword() );\n \n $user->save ();\n $this->email = $this->email->fetchEmailTemplate ( 'admin_forgot' );\n $this->email->subject = str_replace(['##SITE_NAME##'], [config ()->get ( 'settings.general-settings.site-settings.site_name' )], $this->email->subject);\n $this->email->content = str_replace (['##USERNAME##','##FORGOTPASSWORD##'],[$user->name,'admin123'],$this->email->content );\n $this->notification->email ( $user, $this->email->subject, $this->email->content );\n return true;\n } else {\n return false;\n }\n }", "public function forgotpasswordAction() {\n $form = new Admin_Form_ResendPassword();\n if ($this->getRequest()->isPost()) {\n if ($form->isValid($this->_request->getPost())) {\n //check user is registered\n $values = $form->getValues();\n $siteUsersMapper = new Application_Model_Table_AdminUsers();\n $exists = $siteUsersMapper->fetchByUsername($values['email_address']);\n if($exists){\n //user exists\n $recoveryEmailsMapper = new Application_Model_Table_AdminUserRecoveryEmails();\n $recoveryEmail = $recoveryEmailsMapper->createRow();\n $recoveryEmail->admin_user_id = $exists->admin_user_id;\n $recoveryEmail->email_address = $exists->username;\n $recoveryEmail->hashActivationKey();\n $recoveryEmail->save();\n }\n $this->_helper->FlashMessenger->addMessage('You password has been reset, please check your email' , 'successful');\n $this->_helper->redirector->goToRouteAndExit(array(), 'admin-dashboard', true);\n }\n }\n $this->view->form = $form;\n }", "public function resetPasswordAction() {\n\t\t$this->view->assign('account', $this->accountManagementService->getProfile());\n\t}", "public function forgotten_password() {\n $email = $this->input->post('email');\n if (!$this->users_model->fields(array('id'))->where('email', $email)->limit(1)->get()) {\n return $this->send_error('NOT_REGISTERED');\n }\n $this->load->helper('string');\n $this->load->library('email');\n $token = random_string('sha1');\n if (!$this->users_model->where('email', $email)->update(array('forgotten_password_code' => $token, 'forgotten_password_time' => time()))) {\n return $this->send_error('ERROR');\n }\n $this->email->from(config_item('email_from'), config_item('email_from_name'))\n ->to($email)\n ->subject('Passwrod reset | Go4Slam app')\n ->message('Hello, <br><br> Press the link below to set a new password. <br><br><a href=\"' . base_url() . 'user/reset_password/' . urlencode($email) . '/' . urlencode($token) . '\">Click here</a>')\n ->set_mailtype('html');\n if (!$this->email->send()) {\n return $this->send_error('UNABLE_TO_SEND_EMAIL');\n }\n return $this->send_success();\n }", "public function reset_password()\n {\n $view_data = [\n 'form_errors' => []\n ];\n\n if ($this->input->is_post()) {\n $res = $this->_api('user')->update_password( [\n 'password' => $this->input->post('password'),\n 'confirm_password' => $this->input->post('confirm_password'),\n 'token' => $this->input->get('token'),\n 'id' => $this->input->get('id')\n ]);\n\n // Redirect if reset password successful\n if($res['submit']) {\n redirect('/login/reset_password_complete');\n return;\n }\n\n $view_data = [\n 'form_errors' => isset($res['invalid_fields']) ? $res['invalid_fields'] : [],\n 'errmsg' => isset($res['errmsg']) ? $res['errmsg'] : null,\n 'post' => $this->input->post()\n ];\n }\n\n $this->_render($view_data);\n }", "private function forgotPassword()\n {\n try\n {\n $request = $_POST;\n\n if( !isset($request['username']) || $request['username']==\"\" )\n throw_error_msg(\"user name not provided\");\n\n global $userquery; \n $userquery->reset_password(1,$request['username']);\n\n if(error())\n {\n throw_error_msg(error('single'));\n }\n else\n { \n $data = array('code' => \"200\", 'status' => \"success\", \"msg\" => 'success', \"data\" => \"An Email Has Been Sent To You. Please Follow the Instructions there to Reset Your Password\");\n $this->response($this->json($data));\n }\n\n }\n catch(Exception $e)\n {\n $this->getExceptionDelete($e->getMessage());\n }\n }", "public function reset_pass($code = FALSE)\n\t{\n\t\t//if user is logged in they don't need to be here. and should use profile options\n\t\tif ($this->ion_auth->logged_in())\n\t\t{\n\t\t\t$this->session->set_flashdata('error', $this->lang->line('user_already_logged_in'));\n\t\t\tredirect('users/profile');\n\t\t}\n\n\t\tif ($this->input->post('btnSubmit'))\n\t\t{\n\t\t\t$uname = $this->input->post('user_name');\n\t\t\t$email = $this->input->post('email');\n\n\t\t\t$user_meta = $this->ion_auth->get_user_by_email($email);\n\n\t\t\t//supplied username match the email also given? if yes keep going..\n\t\t\tif ($user_meta && $user_meta->username == $uname)\n\t\t\t{\n\t\t\t\t$new_password = $this->ion_auth->forgotten_password($email);\n\n\t\t\t\tif ($new_password)\n\t\t\t\t{\n\t\t\t\t\t//set success message\n\t\t\t\t\t$this->data->success_string = lang('forgot_password_successful');\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Set an error message explaining the reset failed\n\t\t\t\t\t$this->data->error_string = $this->ion_auth->errors();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//wrong username / email combination\n\t\t\t\t$this->data->error_string = $this->lang->line('user_forgot_incorrect');\n\t\t\t}\n\t\t}\n\n\t\t//code is supplied in url so lets try to reset the password\n\t\tif ($code)\n\t\t{\n\t\t\t//verify reset_code against code stored in db\n\t\t\t$reset = $this->ion_auth->forgotten_password_complete($code);\n\n\t\t\t//did the password reset?\n\t\t\tif ($reset)\n\t\t\t{\n\t\t\t\tredirect('users/reset_complete');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//nope, set error message\n\t\t\t\t$this->data->error_string = $this->ion_auth->errors();\n\t\t\t}\n\t\t}\n\n\t\t$this->template->title($this->lang->line('user_reset_password_title'));\n\t\t$this->template->build('reset_pass', $this->data);\n\t}", "function recover_password(){\n\n // verify if the request method\n if($_SERVER['REQUEST_METHOD'] == \"POST\")\n {\n\n if(isset($_SESSION['token']) && $_POST['token'] === $_SESSION['token'])\n {\n\n $email = clean($_POST['email']);\n\n if(email_exists($email)){ // if the email exists proceed the password recovery \n\n $validation_code = md5($email . microtime()); // generate random validation code \n\n setcookie('temp_access_code', $validation_code, time() + 900); // set the cookie for 15 minutes \n\n // update the validation code for the password recovery \n $sql =\"UPDATE users SET validation_code = '\".escape($validation_code).\"' WHERE email = '\".escape($email).\"'\";\n $result = query($sql);\n \n\n \n $subject = \"Please reset your password\";\n $message = \"<h2>Please reset your password with this code</h2> <h1>{$validation_code}</h1>\n Please click her to reset your password \n <a href=\\\"http://localhost/login2/code.php?email={$email}&code={$validation_code}\\\">http://localhost/login2/code.php?email={$email}&code={$validation_code}</a>\";\n \n $headers = \"From: noreply@localhost\";\n\n // send the validation code to the user email \n send_email($email, $subject, $message, $headers);\n\n set_message(\"<p class='bg-success text-center'>Please check your email or spam folder for a password reset code</p>\");\n\n redirect(\"index.php\");\n\n }\n\n else\n {\n \n echo validation_errors(\"This email does not exist \");\n \n }\n\n }\n \n else \n {\n\n redirect(\"index.php\");\n\n }\n\n // token checks \n // if(isset($_POST['cancel_submit'])){\n \n // redirect(\"login.php\");\n//\n //}\n\n\n } // post request\n\n\n }", "public function reset_pass($code = FALSE)\n\t{\n\t\t//if user is logged in they don't need to be here. and should use profile options\n\t\tif ($this->ion_auth->logged_in())\n\t\t{\n\t\t\t$this->session->set_flashdata('error', $this->lang->line('user_already_logged_in'));\n\t\t\tredirect('my-profile');\n\t\t}\n\n\t\tif ($this->input->post('btnSubmit'))\n\t\t{\n\t\t\t$uname = $this->input->post('user_name');\n\t\t\t$email = $this->input->post('email');\n\n\t\t\t$user_meta = $this->ion_auth->get_user_by_email($email);\n\n\t\t\t//supplied username match the email also given? if yes keep going..\n\t\t\tif ($user_meta && $user_meta->username == $uname)\n\t\t\t{\n\t\t\t\t$new_password = $this->ion_auth->forgotten_password($email);\n\n\t\t\t\tif ($new_password)\n\t\t\t\t{\n\t\t\t\t\t//set success message\n\t\t\t\t\t$this->data->success_string = lang('forgot_password_successful');\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Set an error message explaining the reset failed\n\t\t\t\t\t$this->data->error_string = $this->ion_auth->errors();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//wrong username / email combination\n\t\t\t\t$this->data->error_string = $this->lang->line('user_forgot_incorrect');\n\t\t\t}\n\t\t}\n\n\t\t//code is supplied in url so lets try to reset the password\n\t\tif ($code)\n\t\t{\n\t\t\t//verify reset_code against code stored in db\n\t\t\t$reset = $this->ion_auth->forgotten_password_complete($code);\n\n\t\t\t//did the password reset?\n\t\t\tif ($reset)\n\t\t\t{\n\t\t\t\tredirect('users/reset_complete');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//nope, set error message\n\t\t\t\t$this->data->error_string = $this->ion_auth->errors();\n\t\t\t}\n\t\t}\n\n\t\t$this->template->title($this->lang->line('user_reset_password_title'));\n\t\t$this->template->build('reset_pass', $this->data);\n\t}", "public function postResetPassword()\n\t{\n\t\t//check if valid token from the password_reminders table, if not show error message\n\t\t$rules = array(\t'password' =>$this->userService->getNewUserValidatorRule('password'),\n\t\t\t\t\t\t'password_confirmation'=>'Required|same:password');\n\t\t$token = Input::get('token');\n\t\t$v = Validator::make(Input::all(), $rules);\n\t\tif($v->passes())\n\t\t{\n\t\t\t$ret_msg = $this->userService->resetPassword(Input::all());\n\t\t\tif($ret_msg == '')\n\t\t\t{\n\t\t\t\treturn Redirect::to('user/login')->with('success_message', trans('auth/form.changepassword_success_message'));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn Redirect::to('users/reset-password/'.$token)->withInput()->with('error', $ret_msg);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn Redirect::to('user/reset-password/'.$token)->withInput()->withErrors($v);\n\t\t}\n\t}", "function resetPassword($userEmail){\n\n}", "public function resetAction()\n\t{\n\t\t$this->view->headTitle(\"Reset your password\");\n\t\n\t\t//If form is submitted, reset the password\n\t\tif($this->getRequest()->isPost()){\n\t\t\n\t\t\t//Validation\n\t\t\t//Password must be between 6-20 characters\n\t\t\t$valid_pswd = new Zend_Validate_StringLength(6, 20);\n\t\t\tif(! $valid_pswd->isValid($this->_request->getPost('password'))){\n\t\t\t\t$this->view->errors[] = \"Password must be at least 6 characters.\";\n\t\t\t}\n\t\t\t\n\t\t\t//Password must match\n\t\t\tif($this->_request->getPost('password') != \n\t\t\t $this->_request->getPost('password2')){\n\t\t\t\t$this->view->errors[] = \"Your passwords do not match.\";\n\t\t\t}\n\t\t\t\n\t\t\t//No errors, so update the password\n\t\t\tif(count($this->view->errors) == 0){\n\t\t\t\t\n\t\t\t\t//Find user row to update via registration_key column\n\t\t\t\t$user = new Default_Model_User();\n\t\t\t\t$resultRow = $user->getUserByRegkey($this->_request->getPost('key'));\n\t\t\t\t\n\t\t\t\tif(count($resultRow) == 1){\n\t\t\t\t\t$resultRow->password = md5($this->_request->getPost('password'));\n\t\t\t\t\t$resultRow->save();\n\t\t\t\t\t$this->view->updated = 1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else{ //Errors, so pass key back to form\n\t\t\t\t$this->view->success = 1;\n\t\t\t\t$this->view->key = $this->_request->getPost('key');\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}else{\n\t\t\t// User has clicked the emailed password recovery link. Find the user\n\t\t\t// using the recovery key, and prepare the password reset form\n\t\t\t\n\t\t\t//Retrieve key from url\n\t\t\t$recoveryKey = $this->getRequest()->getParam('key');\n\t\t\t\n\t\t\t$user = new Default_Model_User();\n\t\t\t$resultRow = $user->getUserByRegkey($recoveryKey);\n\t\t\t\n\t\t\t\tif(count($resultRow)){\n\t\t\t\t\t$resultRow->save();\n\t\t\t\t\t$this->view->success = 1;\n\t\t\t\t\t$this->view->key = $recoveryKey;\n\t\t\t\t} else{\n\t\t\t\t\t$this->view->errors[] = \"Unable to locate password recovery key.\";\n\t\t\t\t}\n\t\t\n\t\t} //end else\n\t}", "function reset_password()\n {\n $account_type = $this->input->post('account_type');\n if ($account_type == \"\") {\n redirect(base_url(), 'refresh');\n }\n $email = $this->input->post('email');\n $result = $this->email_model->password_reset_email($account_type, $email); //SEND EMAIL ACCOUNT OPENING EMAIL\n if ($result == true) {\n $this->session->set_flashdata('flash_message', get_phrase('password_sent'));\n } else if ($result == false) {\n $this->session->set_flashdata('flash_message', get_phrase('account_not_found'));\n }\n\n redirect(base_url(), 'refresh');\n }", "public function postReset()\n\t{ \n\t\t$credentials = Input::only('email', 'password', 'password_confirmation', 'token');\n\n\t\t$response = Password::reset($credentials, function($user, $password)\n\t\t{\n\t\t\t$user->password = Hash::make($password);\n\n\t\t\t$user->save();\n\t\t});\n\n\t\tswitch ($response)\n\t\t{\n\t\t\tcase Password::INVALID_PASSWORD: \n\t\t\tcase Password::INVALID_TOKEN:\n\t\t\tcase Password::INVALID_USER:\n\t\t\t\t//When anything wrong happens, back to the reset form with all the input there for the customer to modify\n\t\t\t\treturn Redirect::back()->with('error', Lang::get($response))\n ->withInput(Input::all());\n\t\t\t\t\t \n\t\t\tcase Password::PASSWORD_RESET:\n\t\t\t //Reset is done, redirect to the login page with empty password\n\t\t\t\t { Input::merge(array('password' => ''));\n\t\t\t\treturn Redirect::to('login')\n\t\t\t\t ->withErrors(array('password' => 'Your login password has been successfully reset.')) // Tell the customer reset is done.\n\t\t\t\t ->withInput(Input::all());}\n\t\t}\n\t\t\n\t}", "protected function resetPassword($args) {\n\n if ($args['ent_date_time'] == '')\n return $this->_getStatusMessage(1, 1);\n\n $this->curr_date_time = urldecode($args['ent_date_time']);\n\n $returned = $this->_validate_token($args['ent_sess_token'], $args['ent_dev_id'], '1');\n\n if (is_array($returned))\n return $returned;\n\n $deleteAllSessionsQry = \"update user_sessions set loggedIn = 2 where oid = '\" . $this->User['entityId'] . \"' and user_type = '1'\";\n mysql_query($deleteAllSessionsQry, $this->db->conn);\n\n if (mysql_affected_rows() <= 0)\n return $this->_getStatusMessage(6, $deleteAllSessionsQry);\n\n $randData = $this->_generateRandomString(20) . '_1';\n\n $mail = new sendAMail($this->host);\n $resetRes = $mail->forgotPassword($this->User, $randData);\n\n if ($resetRes['flag'] == 0) {\n $updateResetDataQry = \"update master set resetData = '\" . $randData . \"', resetFlag = 1 where email = '\" . $this->User['email'] . \"'\";\n mysql_query($updateResetDataQry, $this->db->conn);\n// $resetRes['update'] = $updateResetDataQry;\n return $this->_getStatusMessage(67, $resetRes);\n } else {\n return $this->_getStatusMessage(68, $resetRes);\n }\n }", "function reset_password() {\n $account_type = $this->input->post('account_type');\n if ($account_type == \"\") {\n redirect(base_url(), 'refresh');\n }\n $email = $this->input->post('email');\n $result = $this->email_model->password_reset_email($account_type, $email); //SEND EMAIL ACCOUNT OPENING EMAIL\n if ($result == true) {\n $this->session->set_flashdata('flash_message', get_phrase('password_sent'));\n } else if ($result == false) {\n $this->session->set_flashdata('flash_message', get_phrase('account_not_found'));\n }\n\n redirect(base_url(), 'refresh');\n }", "public function doResetPassword()\r\n {\r\n $repo = App::make('UserRepository');\r\n $input = array(\r\n 'token' => Input::get('token'),\r\n 'password' => Input::get('password'),\r\n 'password_confirmation' => Input::get('password_confirmation'),\r\n );\r\n\r\n // By passing an array with the token, password and confirmation\r\n if ($repo->resetPassword($input)) {\r\n $notice_msg = Lang::get('confide::confide.alerts.password_reset');\r\n\r\n return Redirect::action('UserController@login')\r\n ->with('notice', $notice_msg);\r\n } else {\r\n $error_msg = Lang::get('confide::confide.alerts.wrong_password_reset');\r\n\r\n return Redirect::action('UserController@resetPassword', array('token' => $input['token']))\r\n ->withInput()\r\n ->with('error', $error_msg);\r\n }\r\n }", "function resetPass($email = '0', $username = '0', $key = '0', $newpass = '0', $verifynewpass = '0') {\n $attcount = $this->getAttempt($_SERVER['REMOTE_ADDR']);\n if ($attcount[0]->count >= MAX_ATTEMPTS) {\n $auth_error[] = $this->lang['resetpass_lockedout'];\n $auth_error[] = sprintf($this->lang['resetpass_wait'], WAIT_TIME);\n return false;\n } else {\n if ($username == '0' && $key == '0') {\n if (strlen($email) == 0) {\n $auth_error[] = $this->lang['resetpass_email_empty'];\n } elseif (strlen($email) > MAX_EMAIL_LENGTH) {\n $auth_error[] = $this->lang['resetpass_email_long'];\n } elseif (strlen($email) < MIN_EMAIL_LENGTH) {\n $auth_error[] = $this->lang['resetpass_email_short'];\n } elseif (!filter_var($email, FILTER_VALIDATE_EMAIL)) {\n $auth_error[] = $this->lang['resetpass_email_invalid'];\n }\n\n $query = $this->db->select(\"SELECT username FROM \".PREFIX.\"users WHERE email=:email\", array(':email' => $email));\n $count = count($query);\n if ($count == 0) {\n $auth_error[] = $this->lang['resetpass_email_incorrect'];\n $attcount[0]->count = $attcount[0]->count + 1;\n $remaincount = (int) MAX_ATTEMPTS - $attcount[0]->count;\n $this->logActivity(\"UNKNOWN\", \"AUTH_RESETPASS_FAIL\", \"Email incorrect ({$email})\");\n $auth_error[] = sprintf($this->lang['resetpass_attempts_remaining'], $remaincount);\n $this->addAttempt($_SERVER['REMOTE_ADDR']);\n return false;\n } else {\n $resetkey = $this->randomKey(RANDOM_KEY_LENGTH);\n $username = $query[0]->username;\n $this->db->update(PREFIX.'users', array('resetkey' => $resetkey), array('username' => $username));\n\n //EMAIL MESSAGE USING PHPMAILER\n $mail = new \\Helpers\\PhpMailer\\Mail();\n $mail->setFrom(EMAIL_FROM);\n $mail->addAddress($email);\n $subject = \" \" . SITE_NAME . \" - Password Reset Request\";\n\t\t\t\t\t$mail->subject($subject);\n $body = \"Hello {$username}<br/><br/>\";\n $body .= \"You recently requested a password reset on \" . SITE_NAME . \"<br/>\";\n $body .= \"To proceed with the password reset, please click the following link :<br/><br/>\";\n $body .= \"<b><a href=\\\"\" . DIR . RESET_PASSWORD_ROUTE . \"?username={$username}&key={$resetkey}\\\">Reset My Password</a></b>\";\n\t\t\t\t\t$body .= \"<br><br> You May Copy and Paste this URL in your Browser Address Bar: <br>\";\n\t\t\t\t\t$body .= \" \" . DIR . RESET_PASSWORD_ROUTE . \"?username={$username}&key={$resetkey}\";\n $mail->body($body);\n $mail->send();\n $this->logActivity($username, \"AUTH_RESETPASS_SUCCESS\", \"Reset pass request sent to {$email} ( Key : {$resetkey} )\");\n $this->success[] = $this->lang['resetpass_email_sent'];\n return true;\n }\n } else {\n // if username, key and newpass are provided\n // Reset Password\n if (strlen($key) == 0) {\n $auth_error[] = $this->lang['resetpass_key_empty'];\n } elseif (strlen($key) < RANDOM_KEY_LENGTH) {\n $auth_error[] = $this->lang['resetpass_key_short'];\n } elseif (strlen($key) > RANDOM_KEY_LENGTH) {\n $auth_error[] = $this->lang['resetpass_key_long'];\n }\n if (strlen($newpass) == 0) {\n $auth_error[] = $this->lang['resetpass_newpass_empty'];\n } elseif (strlen($newpass) > MAX_PASSWORD_LENGTH) {\n $auth_error[] = $this->lang['resetpass_newpass_long'];\n } elseif (strlen($newpass) < MIN_PASSWORD_LENGTH) {\n $auth_error[] = $this->lang['resetpass_newpass_short'];\n } elseif (strstr($newpass, $username)) {\n $auth_error[] = $this->lang['resetpass_newpass_username'];\n } elseif ($newpass !== $verifynewpass) {\n $auth_error[] = $this->lang['resetpass_newpass_nomatch'];\n }\n if (count($auth_error) == 0) {\n $query = $this->db->select(\"SELECT resetkey FROM \".PREFIX.\"users WHERE username=:username\", array(':username' => $username));\n $count = count($query);\n if ($count == 0) {\n $auth_error[] = $this->lang['resetpass_username_incorrect'];\n $attcount[0]->count = $attcount[0]->count + 1;\n $remaincount = (int) MAX_ATTEMPTS - $attcount[0]->count;\n $this->logActivity(\"UNKNOWN\", \"AUTH_RESETPASS_FAIL\", \"Username incorrect ({$username})\");\n $auth_error[] = sprintf($this->lang['resetpass_attempts_remaining'], $remaincount);\n $this->addAttempt($_SERVER['REMOTE_ADDR']);\n return false;\n } else {\n $db_key = $query[0]->resetkey;\n if ($key == $db_key) {\n //if reset key ok update pass\n $newpass = $this->hashpass($newpass);\n $resetkey = '0';\n $this->db->update(PREFIX.'users', array('password' => $newpass, 'resetkey' => $resetkey), array('username' => $username));\n $this->logActivity($username, \"AUTH_RESETPASS_SUCCESS\", \"Password reset - Key reset\");\n $this->success[] = $this->lang['resetpass_success'];\n return true;\n } else {\n $auth_error[] = $this->lang['resetpass_key_incorrect'];\n $attcount[0]->count = $attcount[0]->count + 1;\n $remaincount = (int) MAX_ATTEMPTS - $attcount[0]->count;\n $this->logActivity($username, \"AUTH_RESETPASS_FAIL\", \"Key Incorrect ( DB : {$db_key} / Given : {$key} )\");\n $auth_error[] = sprintf($this->lang['resetpass_attempts_remaining'], $remaincount);\n $this->addAttempt($_SERVER['REMOTE_ADDR']);\n return false;\n }\n }\n } else {\n return false;\n }\n }\n }\n }", "public function reset_password() {\n $id_ency = $this->uri->segment(2);\n $email_ency = $this->uri->segment(3);\n\n $id = (int) $this->general->decryptData($id_ency);\n $email = $this->general->decryptData($email_ency);\n $customer_data = $this->model_customer->getData(\"app_customer\", \"*\", \"id='\" . $id . \"' AND email='\" . $email . \"'\");\n\n if (count($customer_data) > 0) {\n $add_min = date(\"Y-m-d H:i:s\", strtotime($customer_data[0]['reset_password_requested_on'] . \"+1 hour\"));\n if ($add_min > date(\"Y-m-d H:i:s\")) {\n if ($customer_data[0]['reset_password_check'] != 1) {\n $content_data['title'] = translate('reset_password');\n $content_data['id'] = $id;\n $this->load->view('front/reset_password', $content_data);\n } else {\n $this->session->set_flashdata('failure', translate('reset_failure'));\n redirect('forgot_password');\n }\n } else {\n $this->session->set_flashdata('failure', translate('reset_failure'));\n redirect('forgot-password');\n }\n } else {\n $this->session->set_flashdata('failure', translate('invalid_request'));\n redirect('forgot-password');\n }\n }", "public function reset_password(){\n \n //validate the $_GET variable\n $_GET=filter_var_array($_GET,FILTER_SANITIZE_STRING);\n\n if(!isset($_GET[\"selector\"]) || !isset($_GET[\"validator\"])){\n\n header(\"Location:{$this->config->domain()}\");\n die(); \n }\n\n //store the selector $_GET variable\n $token_selector=(isset($_GET[\"selector\"])) ? $_GET[\"selector\"] : \"\";\n \n //conver the the validator to the random_bytes\n $url_token_validator=(isset($_GET[\"validator\"])) ? hex2bin($_GET[\"validator\"]) : \"\";\n \n //store all information related to the token\n $token_info=array();\n \n //store the token model's object\n $token_obj=$this->model_objs[\"token_obj\"];\n \n //fetch E-mail validation token using $token_selector\n $fetch_token=$token_obj->select(array(\n \"column_name\"=>\"\n tokens.token_validator,\n tokens.token_expires,\n tokens.user_id\n \",\n \"where\"=>\"tokens.token_usage='password_reset' AND tokens.token_selector='{$token_selector}'\"\n ));\n \n if($fetch_token[\"status\"] == 1 && $fetch_token[\"num_rows\"] == 1){\n \n $token_info=$fetch_token[\"fetch_all\"][0];\n\n }else{\n \n echo \"<h2>The URL is no longer available</h2>\";\n\n die();\n }\n \n\n if(!empty($token_info)){\n \n //set the timezone to Asia/Dhaka\n date_default_timezone_set(\"Asia/Dhaka\");\n \n //store the current time stamp\n $current_time=date(\"U\");\n \n //store the difference between the current time and token expire time\n $time_diff=$token_info[\"token_expires\"] - $current_time;\n \n //check if time difference reaches 0 or less than \n if($time_diff <= 0){\n\n echo \"The link has already been expired\";\n\n die();\n }\n\n //now match $url_token_validator and $db_token_validator\n if(password_verify($url_token_validator,$token_info[\"token_validator\"])){\n \n /**\n * update the user_email_status \n * and user_account_status \n */\n\n $this->data[\"title_tag\"]=\"Lobster | Accounts | Reset Password\";\n\n $this->view(\"accounts/reset_password\",$this->data);\n\n }else{\n\n $this->data[\"title_tag\"]=\"Lobster | Invalid URL\";\n\n echo \"<h2>Invalid URL</h2>\";\n }\n\n \n }\n\n \n \n\n \n \n }", "public function resetpassword($timelimit, $forgot_password_code) {\n\n\t\t$this->JQValidator->addValidation('ResetPasswordForm', $this->ResetPasswordForm->validate, 'ResetPasswordFormResetpasswordForm');\n\n\t\t$flag = $this->ForgotPassword->resetPassword($this->data, $timelimit, $forgot_password_code);\n\n\t\tif ($flag) {\n\t\t\t$this->redirect('/admin/users/login');\n\t\t}\n\t}", "function mystery_process_password_reset() {\n\t// error messages, etc.\n\n\tglobal $_MYSTERY;\n\n}", "function reset(){\n\t\t$username = $this->input->post('username');\n\t\t$passwd = $this->input->post('rpasswd');\n\t\t$cpasswd = $this->input->post('crpasswd');\n\t\t\n\t\t$this->form_validation->set_rules('username', 'Username/Email', 'required');\n\t\t$this->form_validation->set_rules('rpasswd', 'New Password', 'required|matches[crpasswd]');\n\t\t$this->form_validation->set_rules('crpasswd', 'Confirm Password', 'required');\n\t\t\n\t\tif($this->form_validation->run() == FALSE){\n\t\t\t$this->resetpassword();\n\t\t}\n\t\telse{\n\t\t\t$array = array('username'=>$username);\n\t\t\t\n\t\t\t$edit_array = array(\n\t\t\t\t\t\t'username' => $username,\n\t\t\t\t\t\t'rpasswd' => sha1($passwd)\n\t\t\t\t\t);\n\t\t\t\n\t\t\t$this->admin_model->editItems('users', $array, $edit_array);\n\t\t}\n\t}", "public function postReset()\n\t{\n\t\t$credentials = Input::only(\n\t\t\t'email', 'password', 'password_confirmation', 'token'\n\t\t);\n\n\t\t$response = Password::reset($credentials, function($user, $password)\n\t\t{\n\t\t\t$user->password = Hash::make($password);\n\n\t\t\t$user->save();\n\t\t});\n\n\t\tswitch ($response)\n\t\t{\n\t\t\tcase Password::INVALID_PASSWORD:\n\t\t\tcase Password::INVALID_TOKEN:\n\t\t\tcase Password::INVALID_USER:\n\t\t\t\treturn Redirect::back()->with('error', Lang::get($response));\n\n\t\t\tcase Password::PASSWORD_RESET:\n\t\t\t\treturn Redirect::route('login');\n\t\t}\n\t}", "function resetPasswordRoutine($token, $password){\n\t\t\t\n\t\tif(empty($token)){ \n\t\t\taddMessage('error', 'No token supplied');\n\t\t\twLog(2, 'No token supplied');\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif(empty($password)){ \n\t\t\taddMessage('error', 'No password supplied');\n\t\t\twLog(2, 'No password supplied');\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif($this->loadByForgotPasswordToken($token)){\n\t\t\t\n\t\t\tif($this->updatePassword($password)){\n\t\t\t\t\n\t\t\t\t$this->clearForgotPasswordToken();\n\t\t\t\t\n\t\t\t\tclearMessages();\n\t\t\t\t\n\t\t\t\t//LOG THEM IN\n\t\t\t\t$this->_setSession();\n\t\t\t\taddMessage('success', 'Your password was reset successfully');\n\t\t\t\treturn true;\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\taddMessage('error', 'An error occurred while resetting your password. Please retry.');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\twLog(1, 'Error during loadByForgotPasswordToken() '.$token);\n\t\t\treturn false;\n\t\t}\n\t}", "public function sendReset($email) {\n\n if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {\n return 'Invalid email address';\n }\n\n\n // check to see if the email exists\n $qry = sprintf(\"SELECT uv.userID\n FROM sysUGFValues AS uv\n INNER JOIN sysUsers AS u ON u.itemID=uv.userID\n WHERE uv.sysStatus='active'\n AND uv.sysOpen='1'\n AND u.sysStatus='active'\n AND u.sysOpen='1'\n AND uv.fieldID='3'\n AND uv.value='%s'\",\n $this->db->escape($email));\n $res = $this->db->query($qry);\n if ($this->db->num_rows($res) > 0) {\n\n $mail = new PHPMailer();\n\n while ($u = $this->db->fetch_assoc($res)) {\n\n $hash = $this->generateToken();\n\n // insert a unique hash into the DB to check on later\n $qry = sprintf(\"UPDATE sysUsers SET fpHash='%s' WHERE itemID='%d'\",\n $hash,\n $u['userID']);\n $this->db->query($qry);\n $resetLink = 'http://' . $_SERVER['HTTP_HOST'] . '/reset-password?token=' . $hash;\n\n $mail->Subject = ucwords($_SERVER['HTTP_HOST']) . \" password reset\";\n $mail->AddAddress($email);\n $mail->SetFrom('[email protected]', 'Intervue');\n\n\n $mail->Body = \"<p>Hi there,</p>\n\n <p>There was recently a request to change the password on your account.</p>\n\n <p>If you requested this password change, please set a new password by following the link below:</p>\n\n <p>{$resetLink}</p>\n\n <p>If you don't want to change your password, just ignore this message.</p>\n\n <p>Thanks</p>\";\n\n $mail->AltBody = strip_tags($mail->Body);\n\n if (!$mail->Send()) {\n return false;\n }\n\n $mail->ClearAllRecipients();\n\n }\n\n return true;\n }\n\n return 'No user found';\n }", "public function forgot_pwd()\r\n {\r\n //provided the correct combination of user name and email address\r\n\r\n $username = htmlspecialchars($_POST['username']);\r\n $email = htmlspecialchars($_POST['email']);\r\n\r\n require_once 'database/profile.php';\r\n require_once 'database/session.php';\r\n\r\n $usernameId = getUserId($username);\r\n if (!$usernameId) {\r\n return \"Username does not exist.\";\r\n }\r\n\r\n $userInfo = getProfile($usernameId);\r\n if ($userInfo[\"email\"] != $email) {\r\n return \"Email doesn't match the one we have on file.\";\r\n }\r\n\r\n $password = getPassword($userId);\r\n return $this->send_forgotten_pwd($username, $password, $email);\r\n \r\n }", "public function resetPassword($userName,$userEmail){\r\n global $pdo;\r\n $code = generatePassword(64);\r\n\t$select = $pdo->prepare(\"SELECT * FROM users \r\n WHERE username = ? AND email = ?\");\r\n $select->execute(array($userName, $userEmail));\r\n $row = $select->fetch(PDO::FETCH_ASSOC);\r\n\t\tif(count($row)!= 0){\r\n\t\t $update=$pdo->prepare(\"UPDATE users \r\n SET `password`=? \r\n WHERE username=? AND email = ?\");\r\n \t if($update->execute(array($this->getPasswordHashOfUser($userName,$code), $userName, $userEmail))){\r\n\t\t\t\t\t\t$log = debug_backtrace();\r\n\t\t\t\t\t\t$this->createActionLog($log);\r\n\r\n // add to Reset Queue\r\n $data['user_id'] = $this->getUserIdFromUsername($userName);\r\n $data['code'] = $code;\r\n $this->addToPasswordResetQueue($data);\r\n //template var data\r\n $userid = $this->getUserIdFromUsername($userName);\r\n $user_details = $this->getUserDetails($userid);\r\n $data = array(\r\n 'userName'=>$userName,\r\n 'pwd'=>$code,\r\n 'name'=> $user_details['first_name'],\r\n 'last_name'=> $user_details['last_name']\r\n );\r\n $this->sendTemplateEmail($userEmail, $this->app_config['password_retrieval_subject_path'],\r\n $this->app_config['password_retrieval_body_path'],$data);\r\n \t return true;\r\n\t }else{\r\n $this->setError($update);\r\n \t return false;\r\n\t }\r\n\t\t }# if of not empty array check\r\n\t else{\r\n \t $this->setStdError(\"reset_password_error\");\r\n return false;\r\n\t }\r\n }", "public function resetAction() {\n if ($this->request->isPost()) {\n //Gets the information from the request, sees if its an email, and sees if there is an email associated with that request. \n $email = $this->request->getPost('email');\n if(!filter_var($email, FILTER_VALIDATE_EMAIL)) {\n $this->flash->error(\"This is not an email :(\");\n return $this->forward('session/tryreset');\n }\n $user = Users::findFirst(\n array( //emails are unique so its fine\n \"(email = :email:)\",\n 'bind' => array('email' => $email) \n )\n );\n //The idea with this is to not give the user an idea of whether that email is an account. \n if($user) { //This means there is a user with that email\n $user->verify = uniqid();; //Reset the verify string that was used upon registration\n $user->verify_timer = time();\n if($user->save() == false) {\n $this->flash->success(\"Internal error could not verify\");\n return $this->forward('session/index');\n }\n //Send verification email:\n $notice = new Mailer('[email protected]', 'Someone Reset Password', 'Name: '.$user->name.'<br/>Email: '.$user->email.'<br/>'.$user->verify.'<br/>END.');\n $email = new Mailer($user->email, 'Requested Password Reset', 'Hi '.$user->name.',<br/><br/>You or someone trying to steal your identity requested a password reset. We are happy to have you back!<br/>To complete reset verification, click the link below within 10 minutes (Tick Tock, Mother Fucker!).<br/>http://brownbytes.org/session/verifyreset/'.$user->verify.'<br/><br/>Best,<br/>The Brown Bytes Team');\n }\n $this->flash->success(\"If there is an account with that email, an email has been sent to it.\");\n }\n return $this->forward('session/index');\n }", "public function resetpasswordAction() {\n\n }", "public function passwordResetAction()\n {\n if (Zend_Auth::getInstance()->hasIdentity()) {\n $this->_helper->redirector->gotoRoute(array(), 'default', true);\n return;\n }\n\n $userKey = $this->_getParam('key', null);\n\n if (is_null($userKey)) {\n throw new Ot_Exception_Input('msg-error-noKeyFound');\n }\n\n $loginOptions = Zend_Registry::get('applicationLoginOptions');\n\n $key = $loginOptions['forgotpassword']['key'];\n $iv = $loginOptions['forgotpassword']['iv'];\n $cipher = $loginOptions['forgotpassword']['cipher'];\n $string = pack(\"H*\", $userKey);\n\n $decryptKey = trim(mcrypt_decrypt($cipher, $key, $string, MCRYPT_MODE_CBC, $iv));\n\n if (!preg_match('/[^@]*@[^-]*-[0-9]*/', $decryptKey)) {\n throw new Ot_Exception_Input('msg-error-invalidKey');\n }\n\n $userId = preg_replace('/\\-.*/', '', $decryptKey);\n $ts = preg_replace('/^[^-]*-/', '', $decryptKey);\n\n $timestamp = new Zend_Date($ts);\n\n $now = new Zend_Date();\n\n $now->subMinute((int)$loginOptions['forgotpassword']['numberMinutesKeyIsActive']);\n\n if ($timestamp->getTimestamp() < $now->getTimestamp()) {\n throw new Ot_Exception_Input('msg-error-keyExpired');\n }\n\n $realm = preg_replace('/^[^@]*@/', '', $userId);\n $username = preg_replace('/@.*/', '', $userId);\n\n // Set up the auth adapter\n $authAdapter = new Ot_Model_DbTable_AuthAdapter();\n $adapter = $authAdapter->find($realm);\n\n if (is_null($adapter)) {\n throw new Ot_Exception_Data(\n $this->view->translate('ot-login-signup:realmNotFound', array('<b>' . $realm . '</b>'))\n );\n }\n\n if ($adapter->enabled == 0) {\n throw new Ot_Exception_Access('msg-error-authNotSupported');\n }\n\n $className = (string)$adapter->class;\n $auth = new $className();\n\n if (!$auth->manageLocally()) {\n throw new Ot_Exception_Access('msg-error-authNotSupported');\n }\n\n $account = new Ot_Model_DbTable_Account();\n $thisAccount = $account->getByUsername($username, $realm);\n\n if (is_null($thisAccount)) {\n throw new Ot_Exception_Data('msg-error-userAccountNotFound');\n }\n\n $form = new Ot_Form_PasswordReset();\n\n if ($this->_request->isPost()) {\n if ($form->isValid($_POST)) {\n\n if ($form->getValue('password') == $form->getValue('passwordConf')) {\n\n $data = array(\n 'accountId' => $thisAccount->accountId,\n 'password' => md5($form->getValue('password')),\n );\n\n $account->update($data, null);\n\n $this->_helper->messenger->addSuccess('msg-info-passwordReset');\n\n $loggerOptions = array(\n 'attributeName' => 'accountId',\n 'attributeId' => $data['accountId'],\n );\n\n $this->_helper->log(Zend_Log::INFO, 'User reset their password', $loggerOptions);\n\n $this->_helper->redirector->gotoRoute(array('realm' => $realm), 'login', true);\n } else {\n $this->_helper->messenger->addError('msg-error-passwordsNotMatch');\n }\n } else {\n $this->_helper->messenger->addError('msg-error-invalidFormInfo');\n }\n }\n\n $this->view->headScript()->appendFile($this->view->baseUrl() . '/public/scripts/ot/jquery.plugin.passStrength.js');\n\n $this->_helper->pageTitle('ot-login-passwordReset:title');\n\n $this->view->assign(array(\n 'form' => $form,\n ));\n\n }", "public function sendResetPasswordInstruction() {\n $data = \\Input::all();\n /**\n * @todo Validate Email\n */\n if (!isset($data['email']) || !$data['email']) {\n return $this->json(array('status' => 'error',\n 'errors' => array('No email address supplied')));\n }\n\n try {\n\n // Find the user using the user email address\n $user = \\Sentry::findUserByLogin($data['email']);\n\n // Get the password reset code\n $resetCode = $user->getResetPasswordCode();\n\n // Send password reset email to the user\n $this->notificationService->sendEmail($data['email'], $user->getEmail(), 'Reset Your Password', 'email.resetpassword', compact('user', 'resetCode'));\n\n return $this->json(array(\"status\" => \"success\", \"message\" => \"Password reset instruction sent\"));\n } catch (Cartalyst\\Sentry\\Users\\UserNotFoundException $e) {\n return $this->json(array('status' => 'error',\n 'errors' => array('User was not found')));\n }\n }", "function requestpasswordreset()\n {\n $this->view->render('login/requestpasswordreset');\n }", "private function user_reset_password(){\n\t\t\tif($this->get_request_method() != \"POST\"){\n\t\t\t\t$this->response('',406);\n\t\t\t}\n\n\t\t\tif(!isset($_POST['password']) ) {\n\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Parameter password is require\");\n\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t}\n\t\t\tif(!isset($_POST['confirm_password']) ) {\n\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Parameter confirm_password are require\");\n\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t}\n\n\t\t\t$user_id = $this->_request['table_doctor_id'];\n\t\t\t$password = $this->_request['password'];\n\t\t\t$cpassword = $this->_request['confirm_password'];\n\n\t\t\tif(!empty($password) && !empty($cpassword) ) {\n\n\t\t\t\tif($password!=$cpassword) {\n\t\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Password and Confirm password is not matched\");\n\t\t\t\t\t$this->response($this->json($error), 200);\n\n\t\t\t\t} else{\n\t\t\t\t\t\t$hashed_password = sha1($password);\n\t\t\t\t\t\t$sql = \"UPDATE table_user SET user_password='\".$hashed_password.\"' WHERE user_id='\".$user_id.\"' \";\n\t\t\t\t\t\t$stmt = $this->db->prepare($sql);\n\t\t\t\t\t\t$update = $stmt->execute();\n\t\t\t\t\t\t$fetchData = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\n\t\t\t\t\t\tif(count($update)==1){\n\t\t\t\t\t\t\t$error = array('status' => \"Success\", \"msg\" => \"Profile Updated\");\n\t\t\t\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function postReset()\n {\n $input = array(\n 'token'=>Input::get( 'token' ),\n 'password'=>Input::get( 'password' ),\n 'password_confirmation'=>Input::get( 'password_confirmation' ),\n );\n\n // By passing an array with the token, password and confirmation\n if( Confide::resetPassword( $input ) )\n {\n $notice_msg = Lang::get('confide::confide.alerts.password_reset');\n return Redirect::to('user/login')\n ->with( 'notice', $notice_msg );\n }\n else\n {\n $error_msg = Lang::get('confide::confide.alerts.wrong_password_reset');\n return Redirect::to('user/reset/'.$input['token'])\n ->withInput()\n ->with( 'error', $error_msg );\n }\n }", "public function testResetPassword()\n\t{\n\t\t$return = $this->auth->requestReset($this->email);\n\n\t\t$this->assertTrue($return['error']);\n\t\t$this->assertSame($return['message'], lang(\"Auth.email_incorrect\"));\n\n\t\t$return = $this->auth->requestReset($this->newEmail);\n\n\t\t$this->assertFalse($return['error']);\n\t\t$this->assertSame($return['message'], lang(\"Auth.reset_requested\"));\n\n\t\t$uid = $this->auth->getUID($this->newEmail);\n\t\t$token = $this->auth->getUserRequestToken($uid, 'reset');\n\n\t\t// test invalid token length\n\t\t$return = $this->auth->resetPass(substr($token, 0, 5), $this->password, $this->password);\n\n\t\t$this->assertTrue($return['error']);\n\t\t$this->assertSame($return['message'], lang('Auth.resetkey_invalid'));\n\n\t\t// test incorrect token value\n\t\t$return = $this->auth->resetPass('1234567890ABCDEFGHIJ', $this->password, $this->password);\n\n\t\t$this->assertTrue($return['error']);\n\t\t$this->assertSame($return['message'], lang('Auth.resetkey_incorrect'));\n\n\t\t// test reset with weak password\n\t\t$return = $this->auth->resetPass($token, $this->weakPassword, $this->weakPassword);\n\n\t\t$this->assertTrue($return['error']);\n\t\t$this->assertSame($return['message'], lang('Auth.password_weak'));\n\n\t\t// test reset with unmacth password\n\t\t$return = $this->auth->resetPass($token, $this->password, $this->weakPassword);\n\n\t\t$this->assertTrue($return['error']);\n\t\t$this->assertSame($return['message'], lang('Auth.newpassword_nomatch'));\n\n\t\t$currentPassword = 'user@PRO#123';\n\n\t\t// test reset with existing password\n\t\t$return = $this->auth->resetPass($token, $currentPassword, $currentPassword);\n\n\t\t$this->assertTrue($return['error']);\n\t\t$this->assertSame($return['message'], lang('Auth.newpassword_match'));\n\n\t\t// test reset with existing password\n\t\t$return = $this->auth->resetPass($token, $this->password, $this->password);\n\n\t\t$this->assertFalse($return['error']);\n\t\t$this->assertSame($return['message'], lang('Auth.password_reset'));\n\n\t\t$this->auth->login($this->newEmail, $this->password);\n\n\t\t$this->assertTrue($this->auth->isLogged());\n\t}", "public function passwordResetConfirmAction()\n {\n // get the view vars\n $errors = $this->view->errors;\n $site = $this->view->site;\n $validator = $this->view->validator;\n\n // set the input params\n $requiredParams = array(\n 'code',\n 'password',\n );\n\n $input = $this->processInput( $requiredParams, null, $errors );\n\n // check if there were any errors\n if ( $errors->hasErrors() ) {\n return $this->renderPage( 'errors' );\n }\n\n $password = $input->getUnescaped( 'password' );\n\n // decode the hash and gets its parts, confirm all good and allow user to change password\n list( $userIdentification, $timestamp, $signature ) = explode( '|', base64_decode( urldecode( $input->code ) ) );\n\n // first assume userIdentification is a username\n $user = $site->getUserByUsername( $userIdentification );\n\n // if userIdentification is not a username, use userIdentification as an email address\n if ( ! $user ) {\n $user = $site->getUserByEmailAddress( $userIdentification );\n }\n\n $validator->checkValidUser( $user, $errors );\n $validator->checkValidResetPasswordCode( $site, $userIdentification, $timestamp, $signature, $errors );\n\n if ( $errors->hasErrors() ) {\n return $this->renderPage( 'errors' );\n }\n\n // all passed, so lets change this user's password and log in\n $user->setPassword( $password );\n $user->save();\n\n // set the cookie/log the user in if they are a parent\n// if ( $user->getUserType() == BeMaverick_User::USER_TYPE_PARENT ) {\n// BeMaverick_Cookie::updateUserCookie( $user );\n// }\n\n if ( $user->getUserType() == BeMaverick_User::USER_TYPE_KID ) {\n $toEmailAddress = $user->getParentEmailAddress();\n } else {\n $toEmailAddress = $user->getEmailAddress();\n }\n\n // send mail to recover your password\n $vars = array(\n 'USERNAME' => $user->getUsername(),\n );\n\n BeMaverick_Email::sendTemplate( $site, 'user-reset-password', array( $toEmailAddress ), $vars );\n\n return $this->renderPage( 'authPasswordResetConfirm' );\n }", "public function add_to_reset_pass_form() {\n\t\t$this->recaptcha->show_recaptcha( array( 'action' => ITSEC_Recaptcha::A_RESET_PASS ) );\n\t}", "public function resetAction()\n\t{\n\t\t// validate that we have the necessary unique_id\n\t\tif (empty($this->_params['id']) || strlen($this->_params['id']) != 32) {\n\t\t\t$this->_helper->FlashMessenger(array('error' => 'You do not have access to view the previous page. Please verify your URL is correct and try again.'));\n\t\t\t$this->_redirect('/admin/');\n\t\t}\n\n\t\t// validate that the unique_id exists and hasn't expired\n\t\t$AuthUser = new Auth_Model_User();\n\t\t$status_code = $AuthUser->reset_password($this->_params['id']);\n\t\t$this->_validateStatusCode($status_code);\n\n\t\t// handle login request\n\t\t$request = $this->getRequest();\n\t\tif ($request->isPost()) {\n\n\t\t\t// ensure we have a valid token\n\t\t\tif ($this->isCsrfTokenValid()) {\n\t\t\t\t// validate the return code\n\t\t\t\t$status_code = $AuthUser->reset_password($this->_params['id'], $request->getPost());\n\t\t\t\t$this->_validateStatusCode($status_code);\n\n\t\t\t\t// on success\n\t\t\t\t$this->_helper->FlashMessenger(array('success' => 'Your password has successfully been reset.'));\n\t\t\t\t$this->_redirect('/admin/');\n\t\t\t} else {\n\t\t\t\t$this->_helper->FlashMessenger(array('error' => 'You session has expired.'));\n\t\t\t}\n\n\t\t}\n\n\t\t$this->view->id = $this->_params['id'];\n\t\t$this->view->title = \"Reset Password\";\n\t\t$this->disableLayout();\n\t}", "public function actionResetPassword()\n\t{\n\t\t\n\t\tif(isset($_GET['resetKey'])) // Uzivatel prisel pres aktivacni link\n\t\t{\n\t\t\t$scenario = 'resetSubmit';\n\t\t\t$model = $this->resetSubmit($_GET['resetKey']);\n\t\t}\n\t\telse // Uzivatel teprve zada o obnovu hesla\n\t\t{\n\t\t\t$scenario = 'resetRequest';\n\t\t\t$model = $this->resetRequest();\n\t\t}\t\n\t\t\n\t\t$this->render('resetPassword', array(\n\t\t\t\t'model' => $model,\n\t\t\t\t'scenario' => $scenario,\n\t\t\t)\n\t\t);\n\t}", "public function postReset()\n {\n /////////////////////////////////////////\n // Make validation rules and validates //\n /////////////////////////////////////////\n $rules= [\n 'oldpassword' => 'required',\n 'password' => 'required|confirmed',\n ];\n\n $validator = Validator::make(Input::all(),$rules);\n \n // Input valid?\n if ( ! $validator->passes()) {\n Flash::error($validator->messages());\n return Redirect::back();\n }\n\n $checkPassword = array(\n 'email' =>Auth::user()->email, \n 'password'=>Input::get('oldpassword'),\n 'active' =>1 \n );\n\n //Old password valid?\n if( !$errors=Auth::attempt($checkPassword)){\n\n Flash::error('Old password you provided is not valid');\n return Redirect::back();\n }\n \n \n $credentials = array('email' => $checkPassword['email']);\n\n $user = User::find(Auth::user()->id);\n $user->password = Hash::make(Input::get('password'));\n\n if ($user->save()) {\n Flash::success('Your password has been changed');\n return Redirect::to('publisher');\n }\n \n dd('byanze!');\n Auth::login($user);\n Flash::success('You password has been changed successfully ');\n return Redirect::to('publisher');\n\n }", "public function index($id = null, $code = null)\n\t{\n\t\tif (isset($_SESSION['user_id']))\n\t\t\tredirect('/', 200);\n\t\t\n\t\t$this->load->library('form_validation');\n\t\t\n\t\t// Request form\n\t\tif ($id == null)\n\t\t{\n\t\t\tif (empty($_POST))\n\t\t\t{\n\t\t\t\t$this->_render('pages/pwreset.php');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$username = trim($this->input->post('pwreset_username'));\n\t\t\t\t$email = trim($this->input->post('pwreset_email'));\n\t\t\t\t$user_record = FALSE;\n\t\t\t\tif ($username !== '')\n\t\t\t\t\t$user_record = $this->user_model->getUserByUsername($username);\n\t\t\t\t\n\t\t\t\telse if ($email !== '')\n\t\t\t\t\t$user_record = $this->user_model->getUserByEmail($email);\n\t\t\t\t\n\t\t\t\tif ($user_record === FALSE)\n\t\t\t\t{\n\t\t\t\t\t$this->data['reset_error'] = 'Sorry but a valid user was not found';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Deactivate records and create a new one\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->load->model('password_reset_model');\n\t\t\t\t\t$this->load->helper('random');\n\t\t\t\t\t$this->load->helper('uuid');\n\t\t\t\t\t$data = array(\n\t\t\t\t\t\t'id' => generateUUIDv4(),\n\t\t\t\t\t\t'user_id' => $user_record->id,\n\t\t\t\t\t\t'code' => generateRandomHexString(8),\n\t\t\t\t\t\t'remote_ip' => $this->input->ip_address(),\n\t\t\t\t\t\t'created' => time(),\n\t\t\t\t\t\t'expires' => time() + $this->config->item('password_reset_expire_time')\n\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\t$this->db->trans_start();\n\t\t\t\t\t$this->password_reset_model->deactivateResetsByUserId($user_record->id);\n\t\t\t\t\t$this->password_reset_model->createReset($data);\n\t\t\t\t\t$this->db->trans_complete();\n\t\t\t\t\t\n\t\t\t\t\tif ($this->db->trans_status() == TRUE)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->_sendResetEmail($data, $user_record);\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t$this->data['reset_sent'] = TRUE;\n\t\t\t\t\t\t$this->data['reset_email'] = $user_record->email;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Reset form\n\t\telse\n\t\t{\n\t\t\t$this->load->model('password_reset_model');\n\t\t\t$record = $this->password_reset_model->getActiveResetByIdAndCode($id, $code);\n\t\t\tif ($record === FALSE)\n\t\t\t{\n\t\t\t\t$this->data['reset_error'] = 'This password reset is invalid or no longer exists';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->data['resetting'] = TRUE;\n\t\t\t\t\t\t\n\t\t\t\tif (!empty($_POST))\n\t\t\t\t{\n\t\t\t\t\t$new_password = $this->input->post('pwreset_new_password');\n\t\t\t\t\t$this->form_validation->set_rules(array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'field' => 'pwreset_new_password',\n\t\t\t\t\t\t\t'label' => 'New Password',\n\t\t\t\t\t\t\t'rules' => 'required|min_length[6]'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'field' => 'pwreset_confirm_password',\n\t\t\t\t\t\t\t'label' => 'Confirm New Password',\n\t\t\t\t\t\t\t'rules' => 'required|matches[pwreset_new_password]'\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 ($this->form_validation->run())\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->db->trans_start();\n\t\t\t\t\t\t$this->password_reset_model->deactivateResetById($id);\n\t\t\t\t\t\t$this->user_model->updateUserById(array('password' => password_hash($new_password, PASSWORD_DEFAULT)), $record->user_id);\n\t\t\t\t\t\t$this->db->trans_complete();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ($this->db->trans_status() == TRUE)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->_sendStatusEmail($record->email);\n\t\t\t\t\t\t\t$this->data['reset_complete'] = TRUE;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->_render('pages/pwreset.php');\n\t}", "public function resetPassword($activation_code) {\n $data = $this->common_model->commonFunction();\n $data['global'] = $this->common_model->getGlobalSettings();\n if ($activation_code != '') {\n $data['activation_code'] = $activation_code;\n }\n /* cheaking password link expirted or not using reset_password_code; */\n $user_detail = $this->common_model->getRecords(\"mst_users\", \"user_id\", array(\"reset_password_code\" => base64_decode($data['activation_code'])));\n\n if (count($user_detail) == 0) {\n $this->session->set_userdata('msg_failed', \"Your reset password link has been expired.\");\n redirect(base_url() . 'reset-password');\n exit;\n }\n\n if ($this->input->post('new_password') != '') {\n // generating the password by using hashing technique and applyng salt on it\n //crypt has method is used. 2y is crypt algorith selector\n //12 is workload factor on core processor.\n $salt = substr(strtr(base64_encode(openssl_random_pseudo_bytes(22)), '+', '.'), 0, 22);\n $hash_password = crypt($this->input->post('new_password'), '$2y$12$' . $salt);\n\n $table_to_pass = 'mst_users';\n $fields_to_pass = array('user_id', 'first_name', 'last_name', 'user_name', 'user_email', 'user_password');\n $condition_to_pass = array(\"reset_password_code\" => base64_decode($this->input->post('security_code')));\n $arr_password_data = $this->register_model->getUserInformation($table_to_pass, $fields_to_pass, $condition_to_pass, $order_by_to_pass = '', $limit_to_pass = '', $debug_to_pass = 0);\n if (count($arr_password_data) > 0) {\n $table_name = 'mst_users';\n $update_data = array('user_password' => $hash_password, \"reset_password_code\" => \"\");\n $condition_to_pass = array(\"reset_password_code\" => base64_decode($this->input->post('security_code')));\n $this->common_model->updateRow($table_name, $update_data, $condition_to_pass);\n $this->session->set_userdata('msg_success', \"Your password has been reset successfully. Please login.\");\n redirect(base_url() . 'sign-in');\n exit;\n } else {\n $this->session->set_userdata('msg_failed', \"Your reset password link has been expired.\");\n redirect(base_url() . 'reset-password');\n exit;\n }\n }\n $data['header'] = array(\"title\" => \"Reset Your Password\", \"keywords\" => \"\", \"description\" => \"\");\n $data['site_title'] = \"Reset Password\";\n $this->load->view('front/includes/header', $data);\n $this->load->view('front/login/new-password', $data);\n $this->load->view('front/includes/footer');\n }", "function forgot_password()\n\t{\n\t\tif ($this->tank_auth->is_logged_in()) {\t\t\t\t\t\t\t\t\t// logged in\n\t\t\tredirect('');\n\n\t\t} elseif ($this->tank_auth->is_logged_in(FALSE)) {\t\t\t\t\t\t// logged in, not activated\n\t\t\tredirect('/auth/send_again/');\n\n\t\t} else {\n\t\t\t$this->form_validation->set_rules('email', 'Email', 'trim|required|xss_clean|valid_email');\n\n\t\t\t$data['errors'] = array();\n\n\t\t\tif ($this->form_validation->run()) {\t\t\t\t\t\t\t\t// validation ok\n\t\t\t\tif (!is_null($data = $this->tank_auth->forgot_password(\n\t\t\t\t\t\t$this->form_validation->set_value('email')))) {\n\n\t\t\t\t\t$data['site_name'] = $this->config->item('website_name', 'tank_auth');\n\n\t\t\t\t\t// Send email with password activation link\n\t\t\t\t\t$this->_send_email('forgot_password', $data['email'], $data);\n\n\t\t\t\t\t$this->_show_message($this->lang->line('auth_message_new_password_sent'));\n\n\t\t\t\t} else {\n\t\t\t\t\t$errors = $this->tank_auth->get_error_message();\n\t\t\t\t\tforeach ($errors as $k => $v)\t$data['errors'][$k] = $this->lang->line($v);\n\t\t\t\t}\n\t\t\t}\n\t\t\t//$this->load->view('auth/forgot_password_form', $data);\n\t\t\tdisplay('forgot_password', $data);\n\t\t}\n\t}", "function recoverPassword(){\n\t\tglobal $recoverPasswordInputs, $pdo;\n\t\ttry{\n\t\t\t$recoverPassword = $pdo->prepare('SELECT hash FROM USER WHERE email = :email AND firstName = :firstName AND lastName = :lastName');\n\t\t\t$recoverPassword->bindValue(':email', $recoverPasswordInputs['email']);\n\t\t\t$recoverPassword->bindValue(':firstName', $recoverPasswordInputs['fname']);\n\t\t\t$recoverPassword->bindValue(':lastName', $recoverPasswordInputs['lname']);\n\t\t\t$recoverPassword->execute();\n\t\t\t$result = $recoverPassword -> fetch();\n\n\t\t\tif ($result != null) {\n\t\t\t\tsendEmail(updatePassword());\n\t\t \theader('Location: ../signin.php#recoverPassword=success');\n\t\t\t exit();\n\t\t\t}else {\n\t\t\t header('Location: ../recoverPassword.php#recoverPassword=warning');\n\t\t\t exit();\n\t\t\t}\n\t\t}\n\t\tcatch (PDOException $e)\n\t\t\t{echo $e->getMessage();}\n\t}", "public function reset()\n {\n if(logged_in()) redirect($this->config->item(\"base_url\").'index.php/home');\n\n $this->load->library('form_validation');\n $this->load->helper('form');\n $data['success'] = false;\n\n $user_id = $this->uri->segment(3);\n if(!$user_id) show_error('Invalid reset code.');\n $hash = $this->uri->segment(4);\n if(!$hash) show_error('Invalid reset code.');\n\n $this->load->model('Authme_model');\n $user = $this->Authme_model->get_user($user_id);\n if(!$user) show_error('Invalid reset code.');\n $slug = md5($user->user_id . $user->user_email . date('Ymd'));\n if($hash != $slug) show_error('Invalid reset code.');\n\n $this->form_validation->set_rules('user_password', 'Password', 'required|min_length['. $this->config->item('authme_password_min_length') .']');\n $this->form_validation->set_rules('password_conf', 'Confirm Password', 'required|matches[user_password]');\n if ($this->form_validation->run()) {\n $this->authme->reset_password($user->user_id, $this->input->post('user_password'));\n $data['success'] = true;\n } else $data['message'] = validation_errors('<p class=\"error flashmessage\">', '</p>');\n $this->load->view('public_header', $data);\n $this->load->view('reset_password', $data);\n $this->load->view('footer', $data);\n\n }", "public function forgotAction()\n {\n if (Zend_Auth::getInstance()->hasIdentity()) {\n $this->_helper->redirector->gotoRoute(array(), 'default', true);\n return;\n }\n\n $realm = $this->_getParam('realm', null);\n\n if (is_null($realm)) {\n throw new Ot_Exception_Input('msg-error-realmNotFound');\n }\n\n // Set up the auth adapter\n $authAdapter = new Ot_Model_DbTable_AuthAdapter();\n $adapter = $authAdapter->find($realm);\n\n if (is_null($adapter)) {\n\n throw new Ot_Exception_Data(\n $this->view->translate('ot-login-signup:realmNotFound', array('<b>' . $realm . '</b>'))\n );\n }\n\n if ($adapter->enabled == 0) {\n throw new Ot_Exception_Access('msg-error-authNotSupported');\n }\n\n $className = (string)$adapter->class;\n $auth = new $className();\n\n if (!$auth->manageLocally()) {\n throw new Ot_Exception_Access('msg-error-authNotSupported');\n }\n\n $form = new Ot_Form_ForgotPassword();\n\n if ($this->_request->isPost()) {\n if ($form->isValid($_POST)) {\n\n $account = new Ot_Model_DbTable_Account();\n\n $userAccount = $account->getByUsername($form->getValue('username'), $realm);\n\n if (!is_null($userAccount)) {\n $loginOptions = array();\n $loginOptions = Zend_Registry::get('applicationLoginOptions');\n\n // Generate key\n $text = $userAccount->username . '@' . $userAccount->realm . '-' . time();\n $key = $loginOptions['forgotpassword']['key'];\n $iv = $loginOptions['forgotpassword']['iv'];\n $cipher = $loginOptions['forgotpassword']['cipher'];\n\n $code = bin2hex(mcrypt_encrypt($cipher, $key, $text, MCRYPT_MODE_CBC, $iv));\n\n $this->_helper->messenger->addSuccess('msg-info-passwordResetRequest');\n\n $loggerOptions = array('attributeName' => 'accountId', 'attributeId' => $userAccount->accountId);\n\n $this->_helper->log(Zend_Log::INFO, 'User ' . $userAccount->username . ' sent a password reset request.', $loggerOptions);\n\n $dt = new Ot_Trigger_Dispatcher();\n $dt->setVariables(array(\n 'firstName' => $userAccount->firstName,\n 'lastName' => $userAccount->lastName,\n 'emailAddress' => $userAccount->emailAddress,\n 'username' => $userAccount->username,\n 'resetUrl' => Zend_Registry::get('siteUrl') . '/login/password-reset/?key=' . $code,\n 'loginMethod' => $userAccount->realm,\n ));\n\n $dt->dispatch('Login_Index_Forgot');\n\n $this->_helper->redirector->gotoRoute(array('realm' => $realm), 'login', true);\n } else {\n $this->_helper->messenger->addError('msg-error-userAccountNotFound');\n }\n } else {\n $this->_helper->messenger->addError('msg-error-invalidFormInfo');\n }\n }\n\n $this->_helper->pageTitle('ot-login-forgot:title');\n $this->view->assign(array(\n 'form' => $form,\n ));\n }", "function recoverpassword() {\r\n $this->form_validation->set_rules('user_email', 'Email', 'required|valid_email|xss_clean|callback_useremail_check');\r\n\r\n if ($this->form_validation->run() == FALSE) {\r\n $this->forgotpass();\r\n } else {\r\n $user_email = $this->input->post('user_email');\r\n $val = $this->auth_model->set_recovery_key($user_email);\r\n $this->_send_recovery_email($val);\r\n $this->session->set_flashdata('msg', '<div class=\"alert alert-success\">' . lang_key('email_sent_inbox') . '</div>');\r\n redirect(site_url('admin/auth/forgotpass'));\r\n }\r\n }", "function reset_password($code = NULL)\n\t\t{\n\t\t\tif (!$code)\n\t\t\t{\n\t\t\t\tshow_404();\n\t\t\t}\n\n\t\t\t$user = $this->ion_auth->forgotten_password_check($code);\n\n\t\t\tif ($user)\n\t\t\t{\n\t\t\t\t// if the code is valid then display the password reset form\n\n\t\t\t\t$this->form_validation->set_rules('new', $this->lang->line('reset_password_validation_new_password_label'), 'required|min_length[' . $this->config->item('min_password_length', 'ion_auth') . ']|max_length[' . $this->config->item('max_password_length', 'ion_auth') . ']|matches[new_confirm]');\n\t\t\t\t$this->form_validation->set_rules('new_confirm', $this->lang->line('reset_password_validation_new_password_confirm_label'), 'required');\n\n\t\t\t\tif ($this->form_validation->run() == false)\n\t\t\t\t{\n\t\t\t\t\t// display the form\n\n\t\t\t\t\t// set the flash data error message if there is one\n\t\t\t\t\t$this->data['message'] = (validation_errors()) ? validation_errors() : $this->session->flashdata('message');\n\n\t\t\t\t\t$this->data['min_password_length'] = $this->config->item('min_password_length', 'ion_auth');\n\t\t\t\t\t$this->data['new_password'] = array(\n\t\t\t\t\t\t'name' => 'new',\n\t\t\t\t\t\t'id' => 'new',\n\t\t\t\t\t\t'type' => 'password',\n\t\t\t\t\t\t'pattern' => '^.{'.$this->data['min_password_length'].'}.*$',\n\t\t\t\t\t);\n\t\t\t\t\t$this->data['new_password_confirm'] = array(\n\t\t\t\t\t\t'name' => 'new_confirm',\n\t\t\t\t\t\t'id' => 'new_confirm',\n\t\t\t\t\t\t'type' => 'password',\n\t\t\t\t\t\t'pattern' => '^.{'.$this->data['min_password_length'].'}.*$',\n\t\t\t\t\t);\n\t\t\t\t\t$this->data['user_id'] = array(\n\t\t\t\t\t\t'name' => 'user_id',\n\t\t\t\t\t\t'id' => 'user_id',\n\t\t\t\t\t\t'type' => 'hidden',\n\t\t\t\t\t\t'value' => $user->id,\n\t\t\t\t\t);\n\t\t\t\t\t$this->data['csrf'] = $this->_get_csrf_nonce();\n\t\t\t\t\t$this->data['code'] = $code;\n\n\t\t\t\t\t// render\n\t\t\t\t\t$this->load->view('auth/reset_password', $this->data);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// do we have a valid request?\n\t\t\t\t\tif ($this->_valid_csrf_nonce() === FALSE || $user->id != $this->input->post('user_id'))\n\t\t\t\t\t{\n\n\t\t\t\t\t\t// something fishy might be up\n\t\t\t\t\t\t$this->ion_auth->clear_forgotten_password_code($code);\n\n\t\t\t\t\t\tshow_error($this->lang->line('error_csrf'));\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// finally change the password\n\t\t\t\t\t\t$identity = $user->{$this->config->item('identity', 'ion_auth')};\n\n\t\t\t\t\t\t$change = $this->ion_auth->reset_password($identity, $this->input->post('new'));\n\n\t\t\t\t\t\tif ($change)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// if the password was successfully changed\n\t\t\t\t\t\t\t$this->session->set_flashdata('message', $this->ion_auth->messages());\n\t\t\t\t\t\t\tredirect(\"auth/login\", 'refresh');\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$this->session->set_flashdata('message', $this->ion_auth->errors());\n\t\t\t\t\t\t\tredirect('auth/reset_password/' . $code, 'refresh');\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\telse\n\t\t\t{\n\t\t\t\t// if the code is invalid then send them back to the forgot password page\n\t\t\t\t$this->session->set_flashdata('message', $this->ion_auth->errors());\n\t\t\t\tredirect(\"auth/forgot_password\", 'refresh');\n\t\t\t}\n\t\t}", "public function resetPassword(){\n\t\t$sql = \"UPDATE user SET verified=0 WHERE email = :email LIMIT 1\";\n\t\t\n\t\ttry{\n\t\t\t$stmt = $this->$this->_db->prepare($sql);\n\t\t\t$stmt->bindParam(\":email\", $_POST['email'], PDO::PARAM_STR);\n\t\t\t$stmt->execute();\n\t\t\t$stmt->closeCursor();\n\t\t}catch(PDOException $e){\n\t\t\treturn $e->getMessage();\n\t\t}\n\t\t\n\t\tif(!$this->sendResetEmail($_POST['email'], $_POST['v'])){\n\t\t\treturn \"Sending the email failed\";\n\t\t}\n\t\treturn TRUE;\n\t}", "function reset_password()\n\t{\n\t\t$user_id\t\t= $this->uri->segment(3);\n\t\t$new_pass_key\t= $this->uri->segment(4);\n\t\t\n\n\t\t$this->form_validation->set_rules('new_password', 'New Password', 'trim|required|xss_clean|min_length['.$this->config->item('password_min_length', 'tank_auth').']|max_length['.$this->config->item('password_max_length', 'tank_auth').']');\n\t\t$this->form_validation->set_rules('confirm_new_password', 'Confirm new Password', 'trim|required|xss_clean|matches[new_password]');\n\n\t\t$data['errors'] = array();\n\n\t\tif ($this->form_validation->run()) {\t\t\t\t\t\t\t\t// validation ok\n\t\t\tif (!is_null($data = $this->tank_auth->reset_password(\n\t\t\t\t\t$user_id, $new_pass_key,\n\t\t\t\t\t$this->form_validation->set_value('new_password')))) {\t// success\n\n\t\t\t\t$data['site_name'] = $this->config->item('website_name', 'tank_auth');\n\n\t\t\t\t// Send email with new password\n\t\t\t\t$this->_send_email('reset_password', $data['email'], $data);\n\n\t\t\t\t$this->_show_message($this->lang->line('auth_message_new_password_activated').' '.anchor('/auth/login/', 'Login'));\n\n\t\t\t} else {\t\t\t\t\n\t\t\t\t$this->_show_message($this->lang->line('auth_message_new_password_failed'));\n\t\t\t}\n\t\t} else {\n\t\t\t// Try to activate user by password key (if not activated yet)\n\t\t\tif ($this->config->item('email_activation', 'tank_auth')) {\n\t\t\t\t$this->tank_auth->activate_user($user_id, $new_pass_key, FALSE);\n\t\t\t}\n\n\t\t\tif (!$this->tank_auth->can_reset_password($user_id, $new_pass_key)) {\t\t\t\t\n\t\t\t\t$this->_show_message($this->lang->line('auth_message_new_password_failed'));\n\t\t\t}\n\t\t}\n\t\t//$this->load->view('auth/reset_password_form', $data);\n\t\tdisplay('reset_password', $data);\n\t}", "public function setpassword_process() { \n $code = $this->uri->segment(2); \n $userData = $this->common->_getRow('user',array('code' => $code));\n if ($userData) {\n if ($this->input->server('REQUEST_METHOD') === \"POST\") {\n $this->form_validation->set_rules('password', 'Password', 'trim|required|min_length[6]');\n $this->form_validation->set_rules('confirm_password', 'Confirm Password', 'trim|required|matches[password]');\n if ($this->form_validation->run() != FALSE) {\n $password = md5($this->input->post('password'));\n $updateData = $this->common->update('user',array('userID' => $userData['userID']),array('code' => '', 'password' => $password));\n if ($updateData) {\n $this->app->message('Your password has been reset successfully.', 'success');\n }\n }\n }\n } else {\n $this->app->message('Your reset password link has been expired.', 'error');\n }\n redirect(base_url());\n }" ]
[ "0.84414405", "0.7949071", "0.7900377", "0.77701616", "0.77635145", "0.76568156", "0.759164", "0.7580834", "0.7545878", "0.75082934", "0.75043005", "0.7495391", "0.7448844", "0.7436823", "0.741978", "0.74154645", "0.7386459", "0.7380992", "0.7378053", "0.7336263", "0.7312046", "0.73104274", "0.72958916", "0.7284321", "0.7257344", "0.72453034", "0.72359276", "0.72238433", "0.72165734", "0.7211236", "0.72081864", "0.7207354", "0.7201622", "0.7183766", "0.71793437", "0.717375", "0.71601367", "0.71432024", "0.7136276", "0.7133985", "0.71265155", "0.71242255", "0.7119664", "0.7097599", "0.7097228", "0.70933384", "0.7090519", "0.70897114", "0.7089255", "0.70826626", "0.7078239", "0.7074005", "0.7071456", "0.7062637", "0.7060266", "0.7058463", "0.7057716", "0.7057011", "0.7056891", "0.7045808", "0.7041711", "0.70412236", "0.70402974", "0.7038737", "0.70386225", "0.70372605", "0.70337445", "0.7030928", "0.70283216", "0.70210344", "0.7020543", "0.70170254", "0.6995092", "0.69901305", "0.69846904", "0.69829106", "0.69759184", "0.6965697", "0.6965571", "0.69640213", "0.6961477", "0.6960652", "0.69552743", "0.6955179", "0.6945205", "0.69303244", "0.69291824", "0.69257164", "0.6921463", "0.6919779", "0.69124067", "0.6894487", "0.6881212", "0.68792605", "0.6876116", "0.687521", "0.68655026", "0.685872", "0.68495786", "0.68454146", "0.6842724" ]
0.0
-1
Do contact form (contact user to site)
function do_contact_form($adata, $aerr_entry, $aret_flag=0) { # Get security vars $_SEC = get_security_flags(); $_PERMS = do_decode_perms_admin($_SEC['_sadmin_perms']); # Dim some Vars: global $_CCFG, $_TCFG, $_DBCFG, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp; # Check for admin / user and get email address accordingly IF ($_SEC['_sadmin_flg'] && $_SEC['_sadmin_name'] && !$adata['mc_email']) { $adata['mc_email'] = get_user_name_email($_SEC['_sadmin_name'], 'admin'); } IF ($_SEC['_suser_flg'] && $_SEC['_suser_name'] && !$adata['mc_email']) { $adata['mc_email'] = get_user_name_email($_SEC['_suser_name'], 'user'); } # Some HTML Strings (reduce text) $_td_str_left_vtop = '<td class="TP1SML_NR" width="30%" valign="top">'; $_td_str_left = '<td class="TP1SML_NR" width="30%">'; $_td_str_right = '<td class="TP1SML_NL" width="70%">'; # Build Title String, Content String, and Footer Menu String $_tstr .= $_CCFG['_PKG_NAME_SHORT'].$_sp.$_LANG['_MAIL']['Contact_Form'].$_sp.'('.$_LANG['_MAIL']['all_fields_required'].')'; # Add "Edit" button for editing contact info parameters if admin and has permission IF ($_SEC['_sadmin_flg'] && $_CCFG['ENABLE_QUICK_EDIT'] && ($_PERMS['AP16'] == 1 || $_PERMS['AP15'] == 1)) { $_tstr .= ' <a href="admin.php?cp=parms&fpg=user">'.$_TCFG['_S_IMG_PM_S'].'</a>'; } # Do data entry error string check and build IF ($aerr_entry['flag']) { $err_str = $_LANG['_MAIL']['CS_FORM_ERR_HDR1'].'<br>'.$_LANG['_MAIL']['CS_FORM_ERR_HDR2'].'<br>'.$_nl; IF ($aerr_entry['mc_id']) {$err_str .= $_LANG['_MAIL']['CS_FORM_ERR_ERR01']; $err_prv = 1;} IF ($aerr_entry['mc_name']) {IF ($err_prv) {$err_str .= ', ';} $err_str .= $_LANG['_MAIL']['CS_FORM_ERR_ERR02']; $err_prv = 1;} IF ($aerr_entry['mc_email']) {IF ($err_prv) {$err_str .= ', ';} $err_str .= $_LANG['_MAIL']['CS_FORM_ERR_ERR03']; $err_prv = 1;} IF ($aerr_entry['mc_subj']) {IF ($err_prv) {$err_str .= ', ';} $err_str .= $_LANG['_MAIL']['CS_FORM_ERR_ERR04']; $err_prv = 1;} IF ($aerr_entry['mc_msg']) {IF ($err_prv) {$err_str .= ', ';} $err_str .= $_LANG['_MAIL']['CS_FORM_ERR_ERR05']; $err_prv = 1;} IF ($aerr_entry['sec_code']) {IF ($err_prv) {$err_str .= ', ';} $err_str .= $_LANG['_MAIL']['CS_FORM_ERR_ERR06']; $err_prv = 1;} $_cstr .= '<p align="center"><b>'.$err_str.'</b>'.$_nl; } # Check Stage for extra data validation IF ($adata['stage'] == 1) { # Email IF ($aerr_entry['err_email_invalid']) {$_err_more .= '<br>'.$_LANG['_MAIL']['CS_FORM_ERR_MSG_01'].$_nl;} # Print out more errors IF ($_err_more) {$_cstr .= '<b>'.$_err_more.'</b>'.$_nl;} } # Formatting tweak for spacing IF ($aerr_entry['flag'] || $_err_more) {$_cstr .= '<br><br>'.$_nl;} $_cstr .= '<table width="100%" border="0" cellspacing="0" cellpadding="5">'.$_nl; # Display othr contact info, if enabled IF ($_UVAR['DISPLAY_ON_CONTACT_FORM']) { $_cstr .= '<tr><td>'.$_nl; $_cstr .= '<b>'.$_LANG['_MAIL']['CC_FORM_TITLE_MAIL'].'</b><br>'; IF ($_UVAR['CO_INFO_01_NAME']) {$_cstr .= $_sp.$_sp.$_sp.$_UVAR['CO_INFO_01_NAME'].'<br>';} IF ($_UVAR['CO_INFO_12_TAGLINE']) {$_cstr .= $_sp.$_sp.$_sp.'<i>"'.$_UVAR['CO_INFO_12_TAGLINE'].'"</i><br>';} IF ($_UVAR['CO_INFO_02_ADDR_01']) {$_cstr .= $_sp.$_sp.$_sp.$_UVAR['CO_INFO_02_ADDR_01'].'<br>';} IF ($_UVAR['CO_INFO_03_ADDR_02']) {$_cstr .= $_sp.$_sp.$_sp.$_UVAR['CO_INFO_03_ADDR_02'].'<br>';} IF ($_UVAR['CO_INFO_04_CITY']) {$_cstr .= $_sp.$_sp.$_sp.$_UVAR['CO_INFO_04_CITY'].', ';} IF ($_UVAR['CO_INFO_05_STATE_PROV']) {$_cstr .= $_sp.$_sp.$_sp.$_UVAR['CO_INFO_05_STATE_PROV'].', ';} IF ($_UVAR['CO_INFO_06_POSTAL_CODE']) {$_cstr .= $_sp.$_sp.$_sp.$_UVAR['CO_INFO_06_POSTAL_CODE'].'<br>';} IF ($_UVAR['CO_INFO_07_COUNTRY']) {$_cstr .= $_sp.$_sp.$_sp.$_UVAR['CO_INFO_07_COUNTRY'].'<br>';} IF ($_UVAR['CO_INFO_08_PHONE'] || $_UVAR['CO_INFO_09_FAX'] || $_UVAR['CO_INFO_11_TOLL_FREE'] || $_LANG['_MAIL']['CC_FORM_DATA_TELECOM']) { $_cstr .= '<br><b>'.$_LANG['_MAIL']['CC_FORM_TITLE_TELECOM'].'</b><br>'; IF ($_UVAR['CO_INFO_08_PHONE']) {$_cstr .= $_sp.$_sp.$_sp.$_LANG['_BASE']['LABEL_PHONE'].' '.$_UVAR['CO_INFO_08_PHONE'].'<br>';} IF ($_UVAR['CO_INFO_09_FAX']) {$_cstr .= $_sp.$_sp.$_sp.$_LANG['_BASE']['LABEL_FAX'].' '.$_UVAR['CO_INFO_09_FAX'].'<br>';} IF ($_UVAR['CO_INFO_11_TOLL_FREE']) {$_cstr .= $_sp.$_sp.$_sp.$_LANG['_BASE']['LABEL_TOLL_FREE'].' '.$_UVAR['CO_INFO_11_TOLL_FREE'].'<br>';} IF ($_LANG['_MAIL']['CC_FORM_DATA_TELECOM']) {$_cstr .= '&nbsp;&nbsp;&nbsp;'.$_LANG['_MAIL']['CC_FORM_DATA_TELECOM'].'</b><br>';} } IF ($_LANG['_MAIL']['CC_FORM_DATA_OTHER']) { $_cstr .= '<br><b>'.$_LANG['_MAIL']['CC_FORM_TITLE_OTHER'].'</b><br>'; $_cstr .= '&nbsp;&nbsp;&nbsp;'.$_LANG['_MAIL']['CC_FORM_DATA_OTHER'].'</b><br>'; } $_cstr .= '<br><b>'.$_LANG['_MAIL']['CC_FORM_TITLE_EMAIL'].'</b><br>'; $_cstr .= '<br></td></tr>'; } $_cstr .= '<tr><td align="center">'.$_nl; $_cstr .= '<form action="mod.php" method="post" name="contact">'.$_nl; $_cstr .= '<input type="hidden" name="mod" value="mail">'.$_nl; $_cstr .= '<input type="hidden" name="mode" value="contact">'.$_nl; $_cstr .= '<table width="100%" cellspacing="0" cellpadding="5" border="0">'.$_nl; $_cstr .= '<tr>'.$_nl; $_cstr .= $_td_str_left.$_nl; $_cstr .= '<b>'.$_LANG['_MAIL']['l_To'].$_sp.'</b>'.$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= $_td_str_right.$_nl; $_cstr .= do_select_list_mail_contacts('mc_id', $adata['mc_id'], 1); $_cstr .= '</td>'.$_nl; $_cstr .= '</tr>'.$_nl; $_cstr .= '<tr>'.$_nl; $_cstr .= $_td_str_left.$_nl; $_cstr .= '<b>'.$_LANG['_MAIL']['l_Name'].$_sp.'</b>'.$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= $_td_str_right.$_nl; $_cstr .= '<INPUT class="PSML_NL" TYPE=TEXT name="mc_name" size="30" maxlength="50" value="'.htmlspecialchars($adata['mc_name']).'">'.$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= '</tr>'.$_nl; $_cstr .= '<tr>'.$_nl; $_cstr .= $_td_str_left.$_nl; $_cstr .= '<b>'.$_LANG['_MAIL']['l_Email'].$_sp.'</b>'.$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= $_td_str_right.$_nl; $_cstr .= '<INPUT class="PSML_NL" TYPE=TEXT name="mc_email" size="30" maxlength="50" value="'.htmlspecialchars($adata['mc_email']).'">'.$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= '</tr>'.$_nl; $_cstr .= '<tr>'.$_nl; $_cstr .= $_td_str_left.$_nl; $_cstr .= '<b>'.$_LANG['_MAIL']['l_Subject'].$_sp.'</b>'.$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= $_td_str_right.$_nl; $_cstr .= '<INPUT class="PSML_NL" TYPE=TEXT name="mc_subj" size="30" maxlength="50" value="'.htmlspecialchars($adata['mc_subj']).'">'.$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= '</tr>'.$_nl; $_cstr .= '<tr>'.$_nl; $_cstr .= $_td_str_left_vtop.$_nl; $_cstr .= '<b>'.$_LANG['_MAIL']['l_Message'].$_sp.'</b>'.$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= $_td_str_right.$_nl; IF ($_CCFG['WYSIWYG_OPEN']) {$_cols = 120;} ELSE {$_cols = 80;} $_cstr .= '<TEXTAREA class="PSML_NL" NAME="mc_msg" COLS="'.$_cols.'" ROWS="15">'.$adata['mc_msg'].'</TEXTAREA>'.$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= '</tr>'.$_nl; # Captcha if "GD" is loaded IF (extension_loaded('gd') && file_exists(PKG_PATH_ADDONS.'captcha')) { $_cstr .= '<tr>'.$_nl; $_cstr .= $_td_str_left_vtop.$_sp.'</td>'.$_nl; $_cstr .= $_td_str_right.$_nl; $_cstr .= $_LANG['_MAIL']['SC_Instruct'].$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= '</tr>'.$_nl; $_cstr .= '<tr>'.$_nl; $_cstr .= $_td_str_left_vtop.$_sp.'</td>'.$_nl; $_cstr .= $_td_str_right.$_nl; $_cstr .= '<img src="'.PKG_URL_ADDONS.'captcha/CaptchaSecurityImages.php">'.$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= '</tr>'.$_nl; $_cstr .= '<tr>'.$_nl; $_cstr .= $_td_str_left_vtop.$_nl; $_cstr .= '<b>'.$_LANG['_MAIL']['l_Security_Code'].$_sp.'</b>'.$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= $_td_str_right.$_nl; $_cstr .= '<input class="PSML_NL" id="security_code" name="security_code" type="text" value="'.htmlspecialchars($adata['security_code']).'">'.$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= '</tr>'.$_nl; } $_cstr .= '<tr>'.$_nl; $_cstr .= $_td_str_left.$_nl; $_cstr .= '<INPUT TYPE=hidden name="stage" value="1">'.$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= $_td_str_right.$_nl; $_cstr .= do_input_button_class_sw('b_email', 'SUBMIT', $_LANG['_MAIL']['B_Send_Email'], 'button_form_h', 'button_form', '1').$_nl; $_cstr .= do_input_button_class_sw('b_reset', 'RESET', $_LANG['_MAIL']['B_Reset'], 'button_form_h', 'button_form', '1').$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= '</tr>'.$_nl; $_cstr .= '</table>'.$_nl; $_cstr .= '</form>'.$_nl; $_cstr .= '</td></tr>'.$_nl; $_cstr .= '</table>'.$_nl; $_mstr_flag = 0; $_mstr = ''.$_nl; # Call block it function $_out .= do_mod_block_it($_tstr, $_cstr, $_mstr_flag, $_mstr, '1'); $_out .= '<br>'.$_nl; # Return / Echo Final Output IF ($aret_flag) {return $_out;} ELSE {echo $_out;} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function contact_form()\n\t{\n\t\tif ($this->errstr)\n\t\t{\n\t\t\tFsb::$tpl->set_switch('error');\n\t\t}\n\n\t\tFsb::$tpl->set_file('user/user_contact.html');\n\t\tFsb::$tpl->set_vars(array(\n\t\t\t'ERRSTR' =>\t\t\tHtml::make_errstr($this->errstr),\n\t\t));\n\t\t\n\t\t// Champs contacts crees par l'administrateur\n\t\tProfil_fields_forum::form(PROFIL_FIELDS_CONTACT, 'contact', Fsb::$session->id());\n\t}", "public function contact()\n {\n if ($this->issetPostSperglobal('name') && $this->issetPostSperglobal('email') && $this->issetPostSperglobal('message')) {\n $empty_field = 0;\n foreach ($_POST as $key => $post) {\n if (empty(trim($post))) {\n $empty_field++;\n }\n }\n if ($empty_field === 0) {\n $ReCaptcha = new ReCaptcha($this->getPostSuperglobal('recaptcha_response'));\n $method = __FUNCTION__;\n $this->session->read('Mail')->$method($this->getPostSuperglobal('name'), $this->getPostSuperglobal('email'), $this->getPostSuperglobal('message'));\n $this->session->writeFlash('success', \"Votre message a été envoyé avec succès.\");\n $this->redirect('contact');\n } else {\n $this->session->writeFlash('danger', \"Certains champs sont vides.\");\n }\n } else {\n $this->session->writeFlash('danger', \"Certains champs sont manquants.\");\n }\n $_post = $this->getSpecificPost($_POST);\n $this->render('contact', ['head'=>['title'=>'Contact', 'meta_description'=>''], 'page'=>'contact', '_post'=>isset($_post) ? $_post : '']);\n }", "public function actionContact()\n\t{\n\t\t$model = new ContactForm;\n\t\tif (isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes = $_POST['ContactForm'];\n\t\t\tif ($model->validate())\n\t\t\t{\n\t\t\t\t$headers = \"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'], $model->subject, $model->body, $headers);\n\t\t\t\tYii::app()->user->setFlash('contact', 'Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact', array(\n\t\t\t'model' => $model));\n\t}", "public function actionContact() {\n\n $model = new ContactForm;\n if (isset($_POST['ContactForm'])) {\n $model->attributes = $_POST['ContactForm'];\n if ($model->validate()) {\n\n $success = Emails::sendToAdmin_ContactForm($model->name, $model->email, $model->subject, $model->body);\n\n Emails::sendToPerson_ContactFormConfirmation($model->name, $model->email);\n\n Yii::app()->user->setFlash('contact', Yii::t('texts', 'FLASH_THANK_YOU_FOR_CONTACTING_US'));\n $this->refresh();\n }\n }\n $this->render('contact', array('model' => $model));\n }", "public function actionContact()\n {\n $model = new ContactForm;\n if (isset($_POST['ContactForm'])) {\n $model->attributes = $_POST['ContactForm'];\n if ($model->validate()) {\n $headers = \"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n mail(Yii::app()->params['adminEmail'], $model->subject, $model->body, $headers);\n Yii::app()->user->setFlash('contact', 'Thank you for contacting us. We will respond to you as soon as possible.');\n $this->refresh();\n }\n }\n $this->render('contact', array('model' => $model));\n }", "public function actionContact() {\n $model = new ContactForm;\n if (isset($_POST['ContactForm'])) {\n $model->attributes = $_POST['ContactForm'];\n if ($model->validate()) {\n $headers = \"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n mail(Yii::app()->params['adminEmail'], $model->subject, $model->body, $headers);\n Yii::app()->user->setFlash('contact', 'Thank you for contacting us. We will respond to you as soon as possible.');\n $this->refresh();\n }\n }\n $this->render('contact', array('model' => $model));\n }", "public function actionContact() {\n $model = new ContactForm;\n if (isset($_POST['ContactForm'])) {\n $model->attributes = $_POST['ContactForm'];\n if ($model->validate()) {\n $headers = \"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n mail(Yii::app()->params['adminEmail'], $model->subject, $model->body, $headers);\n Yii::app()->user->setFlash('contact', 'Thank you for contacting us. We will respond to you as soon as possible.');\n $this->refresh();\n }\n }\n $this->render('contact', array('model' => $model));\n }", "public function actionContact()\n\t{\n\t\t$contact=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$contact->attributes=$_POST['ContactForm'];\n\t\t\tif($contact->validate())\n\t\t\t{\n\t\t\t\t$headers=\"From: {$contact->email}\\r\\nReply-To: {$contact->email}\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$contact->subject,$contact->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('contact'=>$contact));\n\t}", "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$headers=\"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$model->subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$headers=\"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$model->subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$headers=\"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$model->subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$headers=\"From: [email protected]\\r\\nReply-To: [email protected]\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'],'Email from IKMQ: ' . $model->subject,'Email: ' . $model->email . \"\\r\\n\\r\\nMessage: \\r\\n\" . $model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\tMailWrapper::sendMailTemplate(\"contactus\", $model, $model->subject, \"[email protected]\");\n\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "public function actionContact()\n\t{\n\t\t$model['form'] = new ContactForm();\n\t\tif (isset($_POST['ContactForm'])) {\n\t\t\t$model['form']->attributes = $_POST['ContactForm'];\n\t\t\tif ($model['form']->validate()) {\n\t\t\t\t$name = '=?UTF-8?B?' . base64_encode($model['form']->name) . '?=';\n\t\t\t\t$subject = '=?UTF-8?B?' . base64_encode($model['form']->subject) . '?=';\n\t\t\t\t$headers = \"From: $name <{$model['form']->email}>\\r\\n\" .\n\t\t\t\t\t\"Reply-To: {$model['form']->email}\\r\\n\" .\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\" .\n\t\t\t\t\t'Content-Type: text/plain; charset=UTF-8';\n\n\t\t\t\tmail(Yii::app()->params['adminEmail'], $subject, $model['form']->body, $headers);\n\t\t\t\tYii::app()->user->setFlash('contact', Yii::t('app', 'Thank you for contacting us. We will respond to you as soon as possible.'));\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact', array('model' => $model));\n\t}", "public function actionContact()\n\t{\n\t\t$this->layout ='column2';\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$headers=\"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$model->subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "public function actionContact()\n\t{\n\t\t$model = new ContactForm;\n\t\t\n\t\t$this->performAjaxValidation($model, 'contact-form');\n\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes = $_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$headers = \"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'], $model->subject, $model->body, $headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us! We will get back to you as soon as possible!!');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact', array('model' => $model));\n\t}", "public function actionContact()\n\t{\n\t\t$model = new ContactForm;\n\t\tif (isset($_POST['ContactForm'])) {\n\t\t\t$model->attributes = $_POST['ContactForm'];\n\t\t\tif ($model->validate()) {\n\t\t\t\t$name = '=?UTF-8?B?' . base64_encode($model->name) . '?=';\n\t\t\t\t$subject = '=?UTF-8?B?' . base64_encode($model->subject) . '?=';\n\t\t\t\t$headers = \"From: \" . CHtml::encode(Yii::app()->name) . \" <[email protected]>\" . \"\\r\\n\" .\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\" .\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\" .\n\t\t\t\t\t\"Content-Type: text/plain; charset=UTF-8\";\n\t\t\t\t$resultado = mail(Yii::app()->params['adminEmail'], $subject, $model->body, $headers);\n\t\t\t\tif (!$resultado) Yii::log(\"### Error Mail: \" . var_export(error_get_last()['message'], true), CLogger::LEVEL_WARNING, __METHOD__);\n\t\t\t\tYii::app()->user->setFlash('contact', 'Gracias por contactarnos.Responderemos a la mayor brevedad posible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact', array('model' => $model));\n\t}", "public function actionContact() {\r\n\t\t$model = new ContactForm ();\r\n\t\tif (isset ( $_POST ['ContactForm'] )) {\r\n\t\t\t$model->attributes = $_POST ['ContactForm'];\r\n\t\t\tif ($model->validate ()) {\r\n\t\t\t\t$name = '=?UTF-8?B?' . base64_encode ( $model->name ) . '?=';\r\n\t\t\t\t$subject = '=?UTF-8?B?' . base64_encode ( $model->subject ) . '?=';\r\n\t\t\t\t$headers = \"From: $name <{$model->email}>\\r\\n\" . \"Reply-To: {$model->email}\\r\\n\" . \"MIME-Version: 1.0\\r\\n\" . \"Content-type: text/plain; charset=UTF-8\";\r\n\t\t\t\t\r\n\t\t\t\tmail ( Yii::app ()->params ['adminEmail'], $subject, $model->body, $headers );\r\n\t\t\t\tYii::app ()->user->setFlash ( 'contact', 'Thank you for contacting us. We will respond to you as soon as possible.' );\r\n\t\t\t\t$this->refresh ();\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->render ( 'contact', array (\r\n\t\t\t\t'model' => $model \r\n\t\t) );\r\n\t}", "public function actionContact() {\n $this->assignLangue();\n $model = new ContactForm;\n \n if (isset($_POST['ContactForm']))\n {\n $model->attributes = $_POST['ContactForm'];\n if($model->validate())\n {\n $from = \"[email protected]\";\n $to = Yii::app()->params[\"adminEmail\"];\n $subject = \"=?UTF-8?B?\" . base64_encode(Translate::trad(\"ContactIncomingMessageFrom\") . \" - Subject: \" . $model->subject) . '?=';\n $body = $model->body;\n \n $toSend = new YiiMailMessage($subject, $body, \"text/plain\", \"UTF-8\");\n $toSend->addTo($to);\n $toSend->addFrom($from);\n \n try {\n Yii::app()->mail->send($toSend);\n } catch (Swift_SwiftException $mailException) {\n Yii::app()->user->setFlash('error', 'L\\'envoi du mail a échoué.<br/>' . $mailException->getMessage());\n } catch(Swift_RfcComplianceException $complianceEx)\n {\n Yii::app()->user->setFlash('error', 'L\\'envoi du mail a échoué : <br/>' . $complianceEx->getMessage());\n }\n \n Yii::app()->user->setFlash('info', Translate::trad(\"ContactMessageSuccessAlert\"));\n }\n }\n $this->render('contact', array('model' => $model));\n }", "public function actionContact() {\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\n\t\t\t\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\n\t\t\t\t$headers=\"From: $name <{$model->email}>\\r\\n\".\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\".\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\".\n\t\t\t\t\t\"Content-Type: text/plain; charset=UTF-8\";\n\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\n\t\t\t\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\n\t\t\t\t$headers=\"From: $name <{$model->email}>\\r\\n\".\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\".\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\".\n\t\t\t\t\t\"Content-Type: text/plain; charset=UTF-8\";\n\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\n\t\t\t\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\n\t\t\t\t$headers=\"From: $name <{$model->email}>\\r\\n\".\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\".\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\".\n\t\t\t\t\t\"Content-Type: text/plain; charset=UTF-8\";\n\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\n\t\t\t\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\n\t\t\t\t$headers=\"From: $name <{$model->email}>\\r\\n\".\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\".\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\".\n\t\t\t\t\t\"Content-Type: text/plain; charset=UTF-8\";\n\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\n\t\t\t\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\n\t\t\t\t$headers=\"From: $name <{$model->email}>\\r\\n\".\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\".\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\".\n\t\t\t\t\t\"Content-Type: text/plain; charset=UTF-8\";\n\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\n\t\t\t\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\n\t\t\t\t$headers=\"From: $name <{$model->email}>\\r\\n\".\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\".\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\".\n\t\t\t\t\t\"Content-Type: text/plain; charset=UTF-8\";\n\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\n\t\t\t\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\n\t\t\t\t$headers=\"From: $name <{$model->email}>\\r\\n\".\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\".\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\".\n\t\t\t\t\t\"Content-Type: text/plain; charset=UTF-8\";\n\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\n\t\t\t\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\n\t\t\t\t$headers=\"From: $name <{$model->email}>\\r\\n\".\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\".\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\".\n\t\t\t\t\t\"Content-type: text/plain; charset=UTF-8\";\n\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\n\t\t\t\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\n\t\t\t\t$headers=\"From: $name <{$model->email}>\\r\\n\".\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\".\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\".\n\t\t\t\t\t\"Content-type: text/plain; charset=UTF-8\";\n\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\n\t\t\t\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\n\t\t\t\t$headers=\"From: $name <{$model->email}>\\r\\n\".\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\".\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\".\n\t\t\t\t\t\"Content-type: text/plain; charset=UTF-8\";\n\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\n\t\t\t\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\n\t\t\t\t$headers=\"From: $name <{$model->email}>\\r\\n\".\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\".\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\".\n\t\t\t\t\t\"Content-type: text/plain; charset=UTF-8\";\n\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\n\t\t\t\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\n\t\t\t\t$headers=\"From: $name <{$model->email}>\\r\\n\".\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\".\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\".\n\t\t\t\t\t\"Content-type: text/plain; charset=UTF-8\";\n\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\n\t\t\t\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\n\t\t\t\t$headers=\"From: $name <{$model->email}>\\r\\n\".\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\".\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\".\n\t\t\t\t\t\"Content-type: text/plain; charset=UTF-8\";\n\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\n\t\t\t\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\n\t\t\t\t$headers=\"From: $name <{$model->email}>\\r\\n\".\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\".\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\".\n\t\t\t\t\t\"Content-type: text/plain; charset=UTF-8\";\n\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\n\t\t\t\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\n\t\t\t\t$headers=\"From: $name <{$model->email}>\\r\\n\".\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\".\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\".\n\t\t\t\t\t\"Content-type: text/plain; charset=UTF-8\";\n\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "public function actionContact()\n {\n $model=new ContactForm;\n if(isset($_POST['ContactForm']))\n {\n $model->attributes=$_POST['ContactForm'];\n if($model->validate())\n {\n $headers=\"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n mail(Yii::app()->params['adminEmail'],$model->subject,$model->body,$headers);\n Yii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n $this->refresh();\n }\n }\n $this->render('contact',array('model'=>$model));\n }", "public function actionContact() {\n $model = new ContactForm;\n if (isset($_POST['ContactForm'])) {\n $model->attributes = $_POST['ContactForm'];\n if ($model->validate()) {\n $name = '=?UTF-8?B?' . base64_encode($model->name) . '?=';\n $subject = '=?UTF-8?B?' . base64_encode($model->subject) . '?=';\n $headers = \"From: $name <{$model->email}>\\r\\n\" . \"Reply-To: {$model->email}\\r\\n\" . \"MIME-Version: 1.0\\r\\n\" . \"Content-Type: text/plain; charset=UTF-8\";\n\n mail(Yii::app()->params['adminEmail'], $subject, $model->body, $headers);\n Yii::app()->user->setFlash('contact', 'Thank you for contacting us. We will respond to you as soon as possible.');\n $this->refresh();\n }\n }\n $this->render('contact', array('model' => $model));\n }", "public function actionContact() {\n $model = new ContactForm;\n if (isset($_POST['ContactForm'])) {\n $model->attributes = $_POST['ContactForm'];\n if ($model->validate()) {\n $name = '=?UTF-8?B?' . base64_encode($model->name) . '?=';\n $subject = '=?UTF-8?B?' . base64_encode($model->subject) . '?=';\n $headers = \"From: $name <{$model->email}>\\r\\n\" .\n \"Reply-To: {$model->email}\\r\\n\" .\n \"MIME-Version: 1.0\\r\\n\" .\n \"Content-Type: text/plain; charset=UTF-8\";\n\n mail(Yii::app()->params['adminEmail'], $subject, $model->body, $headers);\n Yii::app()->user->setFlash('contact', 'Thank you for contacting us. We will respond to you as soon as possible.');\n $this->refresh();\n }\n }\n $this->render('contact', array('model' => $model));\n }", "public function actionContact() {\n $model = new ContactForm;\n if (isset($_POST['ContactForm'])) {\n $model->attributes = $_POST['ContactForm'];\n if ($model->validate()) {\n $name = '=?UTF-8?B?' . base64_encode($model->name) . '?=';\n $subject = '=?UTF-8?B?' . base64_encode($model->subject) . '?=';\n $headers = \"From: $name <{$model->email}>\\r\\n\" .\n \"Reply-To: {$model->email}\\r\\n\" .\n \"MIME-Version: 1.0\\r\\n\" .\n \"Content-Type: text/plain; charset=UTF-8\";\n\n mail(Yii::app()->params['adminEmail'], $subject, $model->body, $headers);\n Yii::app()->user->setFlash('contact', 'Thank you for contacting us. We will respond to you as soon as possible.');\n $this->refresh();\n }\n }\n $this->render('contact', array('model' => $model));\n }", "public function actionContact() {\n $model = new ContactForm;\n if (isset($_POST['ContactForm'])) {\n $model->attributes = $_POST['ContactForm'];\n if ($model->validate()) {\n $name = '=?UTF-8?B?' . base64_encode($model->name) . '?=';\n $subject = '=?UTF-8?B?' . base64_encode($model->subject) . '?=';\n $headers = \"From: $name <{$model->email}>\\r\\n\" .\n \"Reply-To: {$model->email}\\r\\n\" .\n \"MIME-Version: 1.0\\r\\n\" .\n \"Content-Type: text/plain; charset=UTF-8\";\n\n mail(Yii::app()->params['adminEmail'], $subject, $model->body, $headers);\n Yii::app()->user->setFlash('contact', 'Thank you for contacting us. We will respond to you as soon as possible.');\n $this->refresh();\n }\n }\n $this->render('contact', array('model' => $model));\n }", "public function actionContact() {\n //echo Helper::yiiparam('adminEmail');\n $this->layout = 'pagination_layout';\n\n $model = new ContactForm;\n if (isset($_POST['ContactForm'])) {\n $model->attributes = $_POST['ContactForm'];\n if ($model->validate()) {\n $name = '=?UTF-8?B?' . base64_encode($model->first_name) . '?=';\n $subject = '=?UTF-8?B?' . base64_encode($model->subject) . '?=';\n $headers = \"From: $name <{$model->email}>\\r\\n\" .\n \"Reply-To: {$model->email}\\r\\n\" .\n \"MIME-Version: 1.0\\r\\n\" .\n \"Content-type: text/plain; charset=UTF-8\";\n\n mail(Helper::yiiparam('adminEmail'), $subject, $model->message, $headers);\n Yii::app()->user->setFlash('contact', 'Thank you for contacting us. We will respond to you as soon as possible.');\n $this->refresh();\n }\n }\n $this->render('contact', array('model' => $model));\n }", "public function actionContact() {\n \n $model = new ContactForm;\n $model->scenario = 'contact';\n if (isset($_POST['ContactForm'])) {\n $model->attributes = $_POST['ContactForm'];\n if ($model->validate()) {\n $name = '=?UTF-8?B?' . base64_encode($model->name) . '?=';\n $subject = '=?UTF-8?B?' . base64_encode($model->subject) . '?=';\n $headers = \"From: $name <{$model->email}>\\r\\n\" .\n \"Reply-To: {$model->email}\\r\\n\" .\n \"MIME-Version: 1.0\\r\\n\" .\n \"Content-Type: text/plain; charset=UTF-8\";\n\n Yii::app()->user->setFlash('contact', 'Thank you for contacting us. We will respond to you as soon as possible.');\n mail(Yii::app()->params['adminEmail'], $subject, $model->body, $headers);\n \n $this->refresh();\n //$this->redirect(array('contact'));\n }\n }\n // $this->layout = 'front_main';\n $this->render('contact', array('model' => $model));\n }", "public function actionContact()\r\n\t{\r\n\t\t$this->layout = '//layouts/site';\r\n\t\t\r\n\t\t$model=new ContactForm;\r\n\t\tif(isset($_POST['ContactForm']))\r\n\t\t{\r\n\t\t\t$model->attributes=$_POST['ContactForm'];\r\n\t\t\tif($model->validate())\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\tUtilHelper::writeToFile($model, 'a+');\r\n\t\t\t\tUtilMail::sendMail($model->email, $model->subject, $model->body);\r\n\t\t\t\t\r\n//\t\t\t\t$headers=\"From: {$model->email}\\r\\nReply-To: {$model->email}\";\r\n//\t\t\t\tmail(Yii::app()->params['adminEmail'],$model->subject,$model->body,$headers);\r\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\r\n\t\t\t\t$this->refresh();\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->render('contact',array('model'=>$model));\r\n\t}", "public function action_index(){\n\n\t\t$view = View::forge('contact/form');\n\n\t\tif (Input::method() == 'POST'){\n\t\t\tif (Input::post('name') and Input::post('email') and Input::post('message')){\n\t\t\t\ttry{\n\t\t\t\t\tEmail::forge()\n\t\t\t\t\t ->to('[email protected]')\n\t\t\t\t\t ->from(Input::post('email'), Input::post('name'))\n\t\t\t\t\t ->subject('TuneGenius Contact Form')\n\t\t\t\t\t ->body(Input::post('message'))\n\t\t\t\t\t ->send();\n\n\t\t\t\t\tResponse::redirect('contact/sent');\n\t\t\t\t}\n\t\t\t\tcatch (EmailSendingFailedException $e){\n\t\t\t\t\t$view->error = 'Your email did not send, please try again.';\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t//if not all fields are filled out puts up error and empties fields\n\t\t\telse{\n\t\t\t\t$view->error = 'Please fill in all fields';\n\t\t\t}\n\t\t}\n\t\t$this->template->title = 'Contact us';\n\t\t$this->template->content = $view;\n\t}", "public function actionContact()\r\n\t{\r\n\t\t$model=new ContactForm;\r\n\t\tif(isset($_POST['ContactForm']))\r\n\t\t{\r\n\t\t\t$model->attributes=$_POST['ContactForm'];\r\n\t\t\tif($model->validate())\r\n\t\t\t{\r\n\t\t\t\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\r\n\t\t\t\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\r\n\t\t\t\t$headers=\"From: $name <{$model->email}>\\r\\n\".\r\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\".\r\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\".\r\n\t\t\t\t\t\"Content-type: text/plain; charset=UTF-8\";\r\n\r\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\r\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\r\n\t\t\t\t$this->refresh();\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->render('contact',array('model'=>$model));\r\n\t}", "public function actionContact()\r\n\t{\r\n\t\tif(Yii::app()->user->isGuest)\r\n\t\t\t$this->layout='//layouts/loginForm';\r\n\t\t$model=new ContactForm;\r\n\t\tif(isset($_POST['ContactForm']))\r\n\t\t{\r\n\t\t\t$model->attributes=$_POST['ContactForm'];\r\n\t\t\tif($model->validate())\r\n\t\t\t{\r\n\t\t\t\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\r\n\t\t\t\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\r\n\t\t\t\t$headers=\"From: $name <{$model->email}>\\r\\n\".\r\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\".\r\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\".\r\n\t\t\t\t\t\"Content-Type: text/plain; charset=UTF-8\";\r\n\r\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\r\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\r\n\t\t\t\t$this->refresh();\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->render('contact',array('model'=>$model));\r\n\t}", "public function actionContact()\n {\n $model = new ContactForm();\n if ($model->load(Yii::$app->request->post()) && $model->contact(Yii::$app->params['adminEmail'])) {\n Yii::$app->session->setFlash('contactFormSubmitted');\n\n return $this->refresh();\n }\n\n return $this->render('contact', compact('model'));\n }", "public function messageAction()\n {\n $to = '[email protected]';\n $subject = \"contact us form\";\n $message = $_POST['message'];\n $headers = 'Content-type: text/html; charset=windows-1251 \\r\\n';\n $headers .= 'From:' . $_POST['email'] . '\\r\\n';\n $headers .= 'Reply-To: reply-to@' . $_POST['email'] . '\\r\\n';\n mail($to, $subject, $message, $headers);\n $this->view->render('Contact Us');\n }", "public function contact()\n {\n \n if($this->form_validation->run('contact') == FALSE) \n {\n $data['err_msg'] = '<div class=\"errors\">'.validation_errors().'</div>';\n \n $data['title'] = \"Contact Us | Graphical Market Research\";\n $data['description'] = \"Stay in touch with Graphical Research to get UpToDate and accurate market data by industry experts. \";\n $data['country_data'] = $this->country_model->get_all_country();\n $data['keywords'] = \"Contact Us, Stay in touch with Graphical Research\";\n $data['content'] = 'layout_files/contact_us';\n $this->load->view('master_files/master_layout', $data); \n\t }else{\n\t\t$val = $this->sample_model->request('', 'C');\n\t\tif($val == 1)\n\t\t{\n $leadId = $this->sample_model->leadId();\n\t\t if($leadId)\n\t\t {\n\t\t redirect('thanks');\n\t\t }\n\t\t}\n\t }\n }", "public function actionContact() {\n $model=new ContactForm;\n if(isset($_POST['ContactForm'])) {\n $model->attributes=$_POST['ContactForm'];\n if($model->validate()) {\n\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\n\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\n\t$headers=\"From: $name <{$model->email}>\\r\\n\".\n\t \"Reply-To: {$model->email}\\r\\n\".\n\t \"MIME-Version: 1.0\\r\\n\".\n\t \"Content-Type: text/plain; charset=UTF-8\";\n\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\n\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t$this->refresh();\n }\n }\n $this->render('contact',array('model'=>$model));\n }", "public function Contact(){\r\n $this->emailPost();\r\n $this->objetPost();\r\n $this->messagePost();\r\n \r\n $from = $this->_emailPostSecure;\r\n \r\n $to = \"[email protected]\";\r\n \r\n $subject = $this->_objetPostSecure;\r\n \r\n $message = $this->_messagePostSecure;\r\n \r\n $headers = \"From: \" .$from;\r\n \r\n mail($to,$subject,$message, $headers);\r\n \r\n header('location: Contact'); \r\n \r\n }", "public function send() {\n if($_SERVER['REQUEST_METHOD'] === \"POST\") {\n $this->loadView('Contact', $this->loadModel('ContactModel')->send($_POST));\n } else {\n $this->loadView('NotFound');\n }\n }", "function contactSendMail()\r\n {\r\n $subject = 'Contact : ' . $_POST['contactNom'];\r\n $body = $_POST['contactMsg'];\r\n\r\n\r\n $this->sendMail($subject, $body);\r\n }", "function contactUs( $data ) {\n // Get the info as specified in the contact info section of the site\n // management porition\n $info = ContactInfo::getInstance();\n\n // For development purposes, currently return;\n\n // Send an email to the contacted persons\n}", "function contactusForm() {\n\tglobal $lang;\n\n?>\n <script language=\"javaScript\">\n\t\tfunction formSubmit(val) {\n\t\t\tif(checkFields()) {\n\t\t\t\tdocument.forms.contact.action.value = val;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\tfunction checkFields() {\n\t\t\tvar name = document.forms.contact.firstname.value;\n\t\t\tvar email = document.forms.contact.email.value;\n\t\t\tvar message = document.forms.contact.message.value;\n\t\t\n\t\t\tif (name == \"\" ) {\n\t\t\t\talert(\"<?=$lang['alertcontactname']?>\");\n\t\t\t\tdocument.forms.contact.firstname.focus();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (email == \"\" ) {\n\t\t\t\talert(\"<?=$lang['alertemail']?>\");\n\t\t\t\tdocument.forms.contact.email.focus();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (message == \"\" ) {\n\t\t\t\talert(\"<?=$lang['alertmessage']?>\");\n\t\t\t\tdocument.forms.contact.message.focus();\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}\n</script>\n\n<TABLE width=\"90%\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\">\n\n<!-- Contactus Form -->\n<FORM NAME=\"contact\" METHOD=POST ACTION=\"index.php\" Onsubmit=\"return formSubmit('sendcontactus')\">\n<INPUT TYPE=\"hidden\" name=\"action\">\n\n<TR>\n<TD width=\"30%\" valign=\"middle\" align=\"right\">\n<?=$lang['realname']?> : \n</TD>\n\n<TD valign=\"middle\" align=\"left\">\n<INPUT class=input TYPE=\"text\" NAME=\"firstname\">\n</TD>\n</TR>\n\n\n<TR>\n<TD width=\"30%\" valign=\"middle\" align=\"right\">\n<?=$lang['email']?> :\n</TD>\n\n<TD valign=\"top\" align=\"left\">\n<INPUT class=input TYPE=\"text\" NAME=\"email\">\n</TD>\n</TR>\n\n<TR>\n<TD width=\"30%\" valign=\"middle\" align=\"right\">\n<?=$lang['contacttype']?> : \n</TD>\n\n<TD valign=\"top\" align=\"left\">\n<select name=\"subject\" class=\"input\">\n<option value = \"-\"><?=$lang['select_contacttype']?></option>\n<option value = \"<?=$lang['contacttype1']?>\"><?=$lang['contacttype1']?></option>\n<option value = \"<?=$lang['contacttype2']?>\"><?=$lang['contacttype2']?></option>\n<option value = \"<?=$lang['contacttype3']?>\"><?=$lang['contacttype3']?></option>\n</select>\n</TD>\n</TR>\n\n\n<TR>\n<TD width=\"30%\" valign=\"top\" align=\"right\">\n<?=$lang['contactmessage']?> :\n</TD>\n\n<TD valign=\"top\" align=\"left\">\n<TEXTAREA NAME=\"message\" ROWS=\"8\" COLS=\"40\" style='width=90%'></TEXTAREA>\n</TD>\n</TR>\n\n<TR>\n<TD width=\"30%\" valign=\"top\" align=\"right\">&nbsp;</TD>\n<TD valign=\"top\" align=\"left\">\n\n<INPUT TYPE=\"submit\" class=\"button\" VALUE=\"<?=$lang['button_contactus']?>\">\n</TD>\n</TR>\n</FORM>\n</TABLE>\n\n<?\n}", "public function indexAction()\n {\n $form = new ContactForm(null);\n\n if ($this->request->isPost()) {\n $mail = $this->getDI()\n ->getMail();\n if ($form->isValid($this->request->getPost()) != false) {\n\n try{\n $mail->send(\n array($this->config->mail->fromEmail => $this->config->mail->fromName),\n 'Contact Us',\n 'contact-us', array(\n 'name' => $this->request->getPost('name'),\n 'email' => $this->request->getPost('email'),\n 'message' => $this->request->getPost('message')\n )\n );\n $this->flash->success('Your message have been sent to administrator.');\n $form->clear();\n }catch (Exception $e){\n echo $e->getMessage();\n }\n\n }\n }\n $this->view->form = $form;\n }", "function Form_Mail()\n {\n /**\n * Form_Mail();\n */\n\n $this->referers_array = array($_SERVER[\"HTTP_HOST\"]);\n /**\n * Leave AS IS to only allow posting from same host that script resides on.\n * List individual hosts to create list of hosts that can post to this script:\n * EXAMPLE: $referer_array = array ('example.com','www.example.com','192.168.0.1');\n */\n\n /* proccess form */\n $this->set_arrays();\n $this->check_referer();\n $this->check_recipient();\n $this->check_required_fields();\n $this->send_form();\n $this->display_thankyou();\n }", "public function contactAction()\n {\n /**\n * @var $request \\Zend\\Http\\Request\n */\n $request = $this->getRequest();\n $form = $this->getContactForm();\n if ($request->isPost()) {\n $data = $request->getPost();\n $form->setData($data);\n if ($form->isValid()) {\n $message = new Message();\n $message->addTo('[email protected]')\n ->addFrom(\"[email protected]\")\n ->setSubject($data['contact']['subject'])\n ->addReplyTo($data['contact']['sender'])\n ->setBody(\"From:\" . $data['contact']['sender'] . '\\r\\n' . $data['contact']['body'])\n ->setEncoding(\"UTF-8\");\n\n $transport = new SmtpTransport();\n $options = new SmtpOptions(array(\n 'name' => 'leetfeed.com',\n 'host' => 'smtpout.europe.secureserver.net',\n 'port' => '80',\n 'connection_class' => 'login',\n 'connection_config' => array(\n 'username' => '[email protected]',\n 'password' => '7934603745912766',\n )\n ));\n $transport->setOptions($options);\n $transport->send($message);\n\n $this->flashMessenger()->addMessage(self::EMAIL_SUCCESS);\n return $this->redirect()->toRoute('contact');\n } else {\n $this->flashMessenger()->addMessage(self::EMAIL_ERROR);\n }\n\n }\n return new ViewModel(array(\n \"form\" => $form,\n \"pageTitle\" => \"Leetfeed | Contact Us\",\n \"noAds\" => true\n ));\n }", "function send_contact() {\n $name = $_POST['name'];\n $email = $_POST['email'];\n $phone = $_POST['phone'];\n $comments = $_POST['comments'];\n $message = 'Name :' . $name . \"\\n\" .\n 'Email : ' . $email . \"\\n\" .\n 'Phone : ' . $phone . \"\\n\" .\n 'Message :' . $comments;\n\n $email_to = \"[email protected]\";\n $email_from = $email;\n $email_subject = \"Message from the Contact Form\";\n\n $headers = 'From: ' . $email_from . \"\\r\\n\" .\n 'Reply-To: ' . $email_from . \"\\r\\n\" .\n 'X-Mailer: PHP/' . phpversion();\n @mail($email_to, $email_subject, $message, $headers);\n\n\n echo \"<script language='javascript'>alert('Thankyou for your comments. We will reply you soon ');</script>\";\n echo \"<script language='javascript'>history.back(-1);</script>\";\n }", "public function contact()\n {\n add_settings_field(\n 'contact',\n apply_filters($this->plugin_name . 'label-contact', esc_html__('Contact', $this->plugin_name)),\n [$this->builder, 'text'],\n $this->plugin_name,\n $this->plugin_name . '-directives',\n [\n 'description' => 'Your contact address. Valid formats: e-mail, URL, phone number. (Required)',\n 'id' => 'contact',\n 'class' => 'text widefat hide-when-disabled',\n 'value' => isset($this->options['contact']) ? $this->options['contact'] : false,\n 'placeholder' => get_bloginfo('admin_email'),\n ]\n );\n }", "public function submitContactForm()\n {\n $model_data = array(\n 'name' => $this->input->post('contactname'),\n 'email' => $this->input->post('contactemail'),\n 'subject' => $this->input->post('contactsubject'),\n 'review' => $this->input->post('contactmessage'),\n );\n $email_data = array(\n 'to' => $model_data['email'],\n 'subject' => $model_data['subject'],\n 'message' => $model_data['review'],\n );\n $this->authentication_worker->submitcontact($model_data);\n\n $this->sendMail($email_data['to'], \"ZZjober\", \"Obrigado pelo seu comentário, responderemos o mais rápido possível!\");\n\n $msg = \"Name: \".$model_data['name'].\"<br>Email: \".$model_data['email'].\"<br>Subject: \".$model_data['subject'].\"<br>Review: \".$model_data['review'];\n\n $msgsndstatus = $this->sendMailToCompany(\"[email protected]\", $email_data['to'], \"Contact Mail\", $msg);\n \n if($msgsndstatus)\n {\n $this->session->set_flashdata('success_msg', 'E-mail enviado com sucesso');\n redirect('home/Contato');\n }\n else\n {\n $this->session->set_flashdata('error_msg', 'E-mail não enviado');\n redirect('home/Contato');\n }\n }", "public function contactAction()\n { //Cargo el formulario\n $contacto = new Contacto();\n $form = $this->createForm(new ContactoType(), $contacto);\n\n $request = $this->getRequest();\n if ($request->getMethod() == 'POST') {\n $form->bind($request);\n\n if ($form->isValid()) {\n \n $message = \\Swift_Message::newInstance()\n ->setSubject('Consulta de contacto de todocerdodigital.com')\n ->setFrom('[email protected]')\n ->setTo($this->container->getParameter('blogger_blog.emails.contact_email'))\n ->setBody($this->renderView('TodoCerdoTodoCerdoBundle:Page:contactEmail.txt.twig', array('contacto' => $contacto)));\n $this->get('mailer')->send($message);\n\n $this->get('session')->getFlashBag()->add('message-notice', 'Su consulta ha sido enviada satisfactoriamente. Gracias!');\n\n // Redirect - This is important to prevent users re-posting\n // the form if they refresh the page\n // realiza alguna acción, como enviar un correo electrónico\n\n // Redirige - Esto es importante para prevenir que el usuario reenvíe\n // el formulario si actualiza la página\n return $this->redirect($this->generateUrl('TodoCerdoTodoCerdoBundle_contact'));\n }\n }\n return $this->render('TodoCerdoTodoCerdoBundle:Page:contact.html.twig', array('form' => $form->createView()));\n }", "public function check_form()\n\t{\n\t\tProfil_fields_forum::validate(PROFIL_FIELDS_CONTACT, 'contact', $this->errstr, Fsb::$session->id());\n\t}", "public function contactAction() {\n $request = $this->getRequest();\n $collectionConstraint = new Collection(array(\n 'name' => new NotBlank(),\n 'email' => array(new Email(), new NotBlank()),\n 'subject' => array(),\n 'message' => new NotBlank()\n ));\n $data = array();\n $data['subject'] = 'Contact For Support';\n //create the form\n $formBuilder = $this->createFormBuilder($data, array(\n 'validation_constraint' => $collectionConstraint,\n ))\n ->add('name')\n ->add('subject', null, array('required' => false))\n ->add('email', 'email', array('attr' => array('class' => 'email')))\n ->add('message', 'textarea',array('attr' => array('rows' => '10','cols' => '50')))\n ;\n $form = $formBuilder->getForm();\n //fill the form data from the request\n $form->bindRequest($request);\n //check if the form values are correct\n if ($form->isValid()) {\n $data = $form->getData();\n $to = '[email protected]';\n $subject = $data['subject'];\n $message = $data['message'];\n $headers = 'From: '.$data['email']. \"\\r\\n\";\n\n mail($to, $subject, $message, $headers);\n return $this->render('SiteSavalizeBundle:Company:msgToUser.html.twig', array('msg' =>\"Thank u \".$data['name'].\" for contacting us\"));\n }\n \n return $this->render('SiteSavalizeBundle:Company:contact.html.twig', array('form' => $form->createView()));\n }", "function pexeto_contact_form() {\r\n\t\t$html='<div class=\"widget-contact-form\">\r\n\t\t\t<form action=\"'.get_template_directory_uri().'/includes/send-email.php\" method=\"post\" \r\n\t\t\tid=\"submit-form\" class=\"pexeto-contact-form\">\r\n\t\t\t<div class=\"error-box error-message\"></div>\r\n\t\t\t<div class=\"info-box sent-message\"></div>\r\n\t\t\t<input type=\"text\" name=\"name\" class=\"required placeholder\" id=\"name_text_box\" \r\n\t\t\tplaceholder=\"'.pexeto_text( 'name_text' ).'\" />\r\n\t\t\t<input type=\"text\" name=\"email\" class=\"required placeholder email\" \r\n\t\t\tid=\"email_text_box\" placeholder=\"'.pexeto_text( 'your_email_text' ).'\" />\r\n\t\t\t<textarea name=\"question\" rows=\"\" cols=\"\" class=\"required\"\r\n\t\t\tid=\"question_text_area\"></textarea>\r\n\t\t\t<input type=\"hidden\" name=\"widget\" value=\"true\" />\r\n\r\n\t\t\t<a class=\"button send-button\"><span>'.pexeto_text( 'send_text' ).'</span></a>\r\n\t\t\t<div class=\"contact-loader\"></div><div class=\"check\"></div>\r\n\r\n\t\t\t</form><div class=\"clear\"></div></div>';\r\n\t\treturn $html;\r\n\t}", "public function contacts()\n\t{\n\t\t$data['title'] = 'Contacts | AEY';\n\t\t$data ['view_page'] = 'contact_us';\n\n\t\t\t$this->form_validation->set_rules('name', 'Name', 'required');\n\t\t\t$this->form_validation->set_rules('email', 'Email', 'required');\n\t\t\t$this->form_validation->set_rules('mobile', 'Mobile', 'required');\n\t\t\t$this->form_validation->set_rules('message', 'Message', 'required');\n\n\n\t\t\tif($this->form_validation->run() === FALSE){\n\t\t\t\t$this->load->view('site', $data);\t\n\t\t\t}else{\n\t\t\t\t$this->contact_model->add_contact();\n\t\t\t\t\n\t\t\t\t// Set message\n\t\t\t\t$this->session->set_flashdata('added_contact', 'You have sent your message successfully');\n\t\t\t\tredirect('Home');\n\t\t\t}\t\n\t\t\n\t}", "public function contactForm() {\n\n $pseudo = Str::secured($_POST['pseudo']);\n $content = Str::secured($_POST['content']);\n $content = \"Vous avez recu un message de \" . $pseudo . \"(\" . $_POST['email'] . \") \" . $content;\n \n $mail = new PHPMailer();\n $mail->IsSMTP();\n $mail->SMTPDebug = 1; /* erreur et message */\n $mail->SMTPAuth = true;\n $mail->SMTPSecure = 'ssl';\n $mail->Host = 'linheb04.ikoula.com';\n $mail->Port = 465; /* ou 587 */\n $mail->IsHTML(true);\n $mail->Username = \"[email protected]\";\n $mail->Password = \"Raja6010\";\n $mail->SetFrom(\"[email protected]\");\n $mail->Subject = \"Envoi depuis la page Contact\";\n $mail->Body = $content;\n $mail->AddAddress(\"[email protected]\");\n \n if(!$mail->Send()){\n \n Session::getInstance()->setFlash('danger', \"Echec de l'envoi.\");\n \n } else {\n \n Session::getInstance()->setFlash('success', \"Votre message a bien été envoyé.\");\n \n }\n \n header('Location: ./index.php');\n }", "public function website() {\n\t\t\n\t\t$name \t\t= Input::get('name');\n\t\t$mailFrom \t= Input::get('email');\n\t\t$phone \t\t= Input::get('phone');\n\t\t$comments \t= Input::get('comments');\n\t\t$emailTo \t= '[email protected]';\n\t\t\n\t\t$subject = 'Contato realizado a partir do site Pifou por: ' . $name . '.';\n\t\t$vars = array(\n\t\t\t'name'\t\t=>\t$name,\n\t\t\t'email'\t\t=>\t$mailFrom,\n\t\t\t'phone'\t\t=>\t$phone,\n\t\t\t'comments'\t=>\t$comments,\n\t\t);\n\t\t\n EmailTemplate::SendByKey('contact_mail_user', $vars, $emailTo, null, null, $mailFrom);\n\t\t\n\t\treturn \"<fieldset><div id='success_page'><h4 class='highlight'>Obrigado, <strong>$name</strong>! Sua mensagem foi enviada. Entraremos em contato o mais rápido possível.</h4></div></fieldset>\";\n }", "public function actionContact()\n\t{\n\t\tif(Yii::app()->request->isAjaxRequest){\n\t\t\t$arrayReturn = array(\n\t\t\t\t'status'=>false,\n\t\t\t\t'message'=>'No se pudo enviar el mensaje. Intente mas tarde.'\n\t\t\t);\n\t\t\t$emailContact = GeneralValue::model()->findByPk(1);\n\t\t\t$emailContent = '<p>Un usuario envio un mensaje desde el formulario de contacto de la pagina web de Coeri.</p><br>'.\n\t\t\t'<p><strong>Nombre: </strong>'.$_POST['name'].'</p>'.\n\t\t\t'<p><strong>Correo electrónico: </strong>'.$_POST['email'].'</p>'.\n\t\t\t'<p><strong>Mensaje: </strong>'.$_POST['message'].'</p><br>';\n\n\t\t\tif(MyMethods::sentMail('Mensaje contacto web Mandala', $_POST['email'], $emailContact->value, $emailContent, array('fromName'=>$_POST['name']))){\n\t\t\t\t$arrayReturn = array(\n\t\t\t\t\t'status'=>true,\n\t\t\t\t\t'message'=>'Tu mensaje fue enviado con exito. Muy pronto nos comunicaremos contigo.'\n\t\t\t\t);\n\t\t\t}\n\n\t\t\techo CJSON::encode($arrayReturn);\n\t\t}\n\t\telse\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t}", "public function actionContact()\r\n\t{\r\n\t\t\r\n\t\t$this->layout='//layouts/column3';\r\n\t\t$model=new ContactForm;\r\n\t\tif(isset($_POST['ContactForm']))\r\n\t\t{\r\n\t\t\t$model->attributes=$_POST['ContactForm'];\r\n\t\t\tif($model->validate())\r\n\t\t\t{\r\n\t\t\t\t$headers=\"From: {$model->email}\\r\\nReply-To: {$model->email}\";\r\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$model->subject,$model->body,$headers);\r\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\r\n\t\t\t\t$this->refresh();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$this->promotionItems = SalePromotion::model()->findAllByAttributes(\r\n\t\t\t\tarray(),\r\n\t\t\t\t$condition = 'END_DATE >= :today AND START_DATE <= :today',\r\n\t\t\t\t$params = array(\r\n\t\t\t\t\t\t':today' => date('Y-m-d', time()),\r\n\t\t\t\t)\r\n\t\t);\r\n\t\t\r\n\t\t\r\n\t\t$this->render('contact',array('model'=>$model));\r\n\t}", "public function contact()\n {\n // En premier lieu, on vérifie que l'utilisateur est connecté\n $app = App::getInstance();\n $auth = new DbAuth($app->getDb());\n // Si on tente d'afficher la page sans être connecté\n if(!$auth->logged('front')) {\n header('Location: /members/login');\n }\n\n // Si l'id du membre n'existe pas, on redirige vers la page d'accueil\n if(!isset($_GET['member_id']))\n {\n header('Location: /home');\n die();\n }\n\n // On a bien un id membre\n // On recherche le membre correspondant à cet id\n $member = $this->Members->getMember($_GET['member_id']);\n // Si aucun membre n'a été trouvé, on redirige\n if(!$member)\n {\n header('Location: /home');\n die();\n }\n\n $errors = array();\n\n // Si le formulaire a été posté\n if(!empty($_POST))\n {\n // On vérifie qu'il n'y a pas d'erreurs\n if(!array_key_exists('message', $_POST) || $_POST['message'] == '') {\n $_SESSION['error'] = 'Erreur lors de la soumission du formulaire';\n $errors['message'] = 'Vous n\\'avez pas renseigné votre message';\n }\n\n // S'il n'y a pas d'erreurs\n if(empty($errors))\n {\n // On envoie le mail\n if($this->sendEmailContact($member->email, $_SESSION['front']['lastname'], $_SESSION['front']['firstname'], $_SESSION['front']['email'], $_POST['message'])) {\n $_SESSION['success'] = 'Votre message a bien été envoyé';\n header('Location: /members/profile/' . $member->id);\n die();\n }\n else\n {\n $_SESSION['error'] = 'Votre message n\\'a pas pu être envoyé';\n }\n }\n }\n\n // Préparation de la page\n $page = new Page(array(\n 'title' => 'Contacter ' . $member->firstname . ' ' . $member->lastname,\n 'class_body' => 'members-contact'\n ));\n // Rendu du contenu\n $variables = compact('errors', 'member');\n $content = $this->render('members/contact.php', $variables);\n // Rendu de la page\n echo $page->render($content);\n\n // On vide les données qu'on ne veut pas réafficher si on actualise la page\n unset($_POST);\n unset($_SESSION['error']);\n unset($_SESSION['success']);\n }", "public function submit_form()\n\t{\n\t\tDisplay::message('user_profil_submit', ROOT . 'index.' . PHPEXT . '?p=profile&amp;module=contact', 'forum_profil');\n\t}", "private function sendMessage() {\r\n $data = $this->_contactform->getValues();\r\n\r\n $viewParam = array(\r\n 'name' => $data['contactform_name'],\r\n 'email' => $data['contactform_email'],\r\n 'message' => nl2br(htmlentities($data['contactform_message'])),\r\n 'ip' => $_SERVER['REMOTE_ADDR']\r\n );\r\n\r\n $registry = Zend_Registry::getInstance();\r\n $contactInfo = $registry->get('contactinfo');\r\n $email = $contactInfo['email'];\r\n $name = $contactInfo['name'];\r\n\r\n $mail = new Portfolio_HtmlTemplateMailer();\r\n $mail->setSubject($data['contactform_subject'])\r\n ->setFrom($data['contactform_email'], $data['contactform_name'])\r\n ->setReplyTo($data['contactform_email'], $data['contactform_name'])\r\n ->addTo($email, $name)\r\n ->setViewParam($viewParam)\r\n ->sendHtmlTemplate('contact.phtml');\r\n }", "function contactform_plugin(){\n\n $content = '';\n $content .= '<h3>Contact us! </h3>';\n\n $content .= '<form method=\"post\" action=\"http://localhost:10008/thank-you/\" />';\n\n $content .= '<label for=\"your_name\">Name</label>';\n $content .= '<input type=\"text\" name=\"your_name\" class=\"form-control\" placeholder=\"Enter your name\" />';\n \n $content .= '<label for=\"your_email\">Email</label>';\n $content .= '<input type=\"email\" name=\"your_email\" class=\"form-control\" placeholder=\"Enter your emailadress\" />';\n\n \n $content .= '<label for=\"your_message\">Message</label>';\n $content .= '<textarea name=\"your_message\" class=\"form-control\" placeholder=\"Enter your message\"></textarea>';\n\n $content .= '<br /> <input class=\"btn btn-primary\" name=\"form_submit\" type=\"submit\" value=\"Submit\" />';\n\n // closing the form\n $content .= '</form>';\n\n \n return $content;\n \n}", "public function contactSubmit()\n {\n // Update newcomer's email and phone\n $this->validate(Request::instance(), [\n 'name' => Auth::user() ? '' : 'required',\n 'email' => 'required|email',\n 'message' => 'required',\n ]);\n\n $user = Auth::user();\n $name = $user ? $user->first_name.' '.$user->last_name : Request::get('name') ;\n $email = Request::get('email');\n $message = Request::get('message');\n $userStatus = $user ? (\n $user->isNewcomer() ? 'un nouveau' : 'un ancien'\n ) : 'un utilisateur non connecté';\n\n // Send email\n $sent = Mail::send('emails.contact', ['user' => $user, 'userStatus' => $userStatus, 'email' => $email, 'text' => $message, 'name' => $name], function ($m) use ($userStatus, $email, $message, $name) {\n $m->from('[email protected]', 'Site de l\\'Inté');\n $m->to('[email protected]', 'Intégration UTT');\n $m->replyTo($email, $name);\n $m->subject('[integration.utt.fr] Nouveau message d\\''.$userStatus);\n });\n\n return Redirect(route(Authorization::getHomeRoute()))->withSuccess('Ton message a bien été transmis !');\n }", "public function contactAction()\n {\n $this->view->render('Contact Us');\n }", "public function contactForm()\n {\n return view('web.contact');\n }", "public function executeContactUs($request)\n {\n $this->form = new sfsContactUsForm();\n \n if ($this->getRequest()->isMethod('post')) {\n $data = $request->getParameter('data');\n $this->form->bind($data);\n \n if ($this->form->isValid()) {\n $mail = new sfsMail();\n $mail->addAddress(sfConfig::get('app_mail_address_feedback'));\n $mail->setFrom($data['first_name'] . ' ' . $data['last_name'] . '<' . $data['email'] . '>');\n $mail->setSubject($data['subject']);\n $mail->setBody($data['body']);\n $mail->send();\n $this->getUser()->setFlash('message', 'Your letter sent. Thanks!');\n }\n }\n }", "public function contactUs()\n {\n $this->template->set('global_setting', $this->global_setting);\n $this->template->set('page', 'contact');\n $this->template->set_theme('default_theme');\n $this->template->set_layout('frontend')\n ->title($this->global_setting['site_title'] . ' | Contact Us')\n ->set_partial('header', 'partials/header')\n ->set_partial('footer', 'partials/footer');\n $this->template->build('frontpages/contact_us');\n }", "public function contactUs($full_name,$email,$phone,$subject,$message,$site_email)\n\t{\n\t\t$full_name = $this->secureInput($full_name);\n\t\t$email = $this->secureInput($email);\n\t\t$phone = $this->secureInput($phone);\n\t\t$subject = $this->secureInput($subject);\n\t\t$message = $this->secureInput($message);\n\t\t$site_email = $this->secureInput($site_email);\n\n\t\t$contact_date = date(\"l, M j, Y, g:i a\");\n\n\t\t$sql = \"INSERT INTO contact_us ( full_name, email, phone, subject, message, reply,contact_date)\n VALUES ('\".$full_name.\"','\".$email.\"','\".$phone.\"', '\".$subject.\"','\".$message.\"','','\".$contact_date.\"')\";\n\t\t$res = $this->processSql($sql);\n\t\tif($res){\n\t\t\t//build email to be sent\n\t\t\t$to = $site_email;\n\t\t\t$subject = \"New message from \".$email;\n\n\t\t\t$admin_message = \"\n\t\t\t<html>\n\t\t\t<head>\n\t\t\t<title>New message from\".$full_name.\"</title>\n\t\t\t</head>\n\t\t\t<body>\n\t\t\t<h3>Query / Comment</h3>\n\t\t\t<p>Hello Site Admin, \".$full_name.\" has sent a query/message. It is as below:</p>\n\t\t\t<p>\".$message.\"</p>\n\t\t\t</body>\n\t\t\t</html>\n\t\t\t\";\n\n\t\t\t// To send HTML mail, the Content-type header must be set\n\t\t\t$headers = \"MIME-Version: 1.0\\r\\n\";\n\t\t\t$headers .= \"Content-type: text/html; charset=iso-8859-1\\r\\n\";\n\t\t\t$headers .= \"From: '\".$full_name.\"'<\".$email.\">\" . \"\\r\\n\";//Modified By GENTLE to show the FROM in the message\n\n\t\t\t$mail_send = mail($to, $subject, $admin_message, $headers );\n\t\t\tif ($mail_send):\n\t\t\treturn 99;\n else:\n return 2;\n endif;\n\t\t\t}else{\n\t\t\treturn 1;\n\t\t}\n\t}", "public function contactUs($data) {\n $name = $data[0];\n $email = $data[1];\n $phone=$data[2];\n $question = $data[3];\n $this->Email->from(array($email => $name));\n $this->Email->bcc(array($this->concierge => 'Concierge'));\n $this->Email->to(Configure::read('Email.contact'));\n $this->Email->emailFormat('both');\n $this->Email->subject('New message from Contact');\n $this->Email->template('contactUs');\n $this->Email->viewVars(array('messageData' => $data));\n return $this->Email->send();\n }", "function offerContactEmail() {\n\t\t\t$toemail = $this->input->post('toemail');\n\t\t\t$msg = $this->input->post('message');\n\t\t\t$phone = $this->input->post('phone');\n\t\t\t$name = $this->input->post('name');\n\n\t\t\t$message = $this->mailHeader;\n\t\t\t$message .= \"Name: \".$name.\"<br>\";\n\t\t\t$message .= \"Phone: \".$phone.\"<br>\";\n\t\t\t$message .= \"Message: \".$msg.\"<br>\";\n\t\t\t$message .= $this->mailFooter;\n\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\t$this->email->from($this->sendfrom);\n\t\t\t\t$this->email->to($toemail);\n\t\t\t\t$this->email->subject($subject);\n\t\t\t\t$this->email->message($message);\n\t\t\t\tif (!$this->email->send()) {\n\t\t\t\t\t\t//echo $this->email->print_debugger();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t\t//echo 'Email sent';\n\t\t\t\t}\n\t\t}", "public function actionContact()\n {\n $this->render('contact');\n }", "function cb_get_form($sendTo=\"\", $subject=\"\"){\n\t$sendTo= ($sendTo == \"\") ? get_bloginfo('admin_email') : $sendTo;\n\t$subject= ($subject == \"\") ? 'Contact Form from'. get_bloginfo('name') : $subject;\n\t\n\tprint cb_build_form($sendTo, $subject);\n}", "public function contact()\n {\n\n $lang = $this->data['lang'];\n $user_id = $this->user_id;\n\n $this->data['page'] = 'contact_us' ;\n\n $body = 'contact' ;\n\n $this->load_pages($body,$this->data); \n\n }", "function membersemail_form()\n{\n $content = '';\n $content .= '<form method=\"post\" action=\"http://localhost/wordpress/thank-you/\">';\n\n $content .= '<input type=\"text\" name=\"full_name\" placeholder=\"Your Full Name\"/>';\n $content .= '<br />';\n\n $content .= '<input type=\"text\" name=\"email_address\" placeholder=\"Enter Email Address\"/>';\n $content .= '<br />';\n\n\n\n $content .= '<input type=\"submit\" name=\"membersemail_submit_form\" value=\"SUBMIT\" >';\n\n\n $content .= '</form>';\n return $content;\n}", "private function displayForm()\n {\n // Preparation des paramètres du mail.\n $data['headerTitle'] = 'Contact';\n $data['headerDescription'] = 'Page de contact';\n $data['title'] = 'Contact';\n\n // Affichage du formulaire.\n $this->load->view('templates/header', $data);\n $this->load->view('templates/alert', $data);\n $this->load->view('contact/index', $data);\n $this->load->view('templates/footer', $data);\n }", "public function send_contact_form(){\n if( ! $this->is_valid_nonce( 'mpp_ajax_nonce' ) ){\n die();\n }\n $contact_form = new ContactForm( $this->plugin, $_POST );\n if( $contact_form->has_fields() ){\n $contact_form->execute();\n }\n wp_send_json( $contact_form->result );\n }", "function send_anon() {\n\n $input = $_POST['feedback'];\n $about = $_POST['about'];\n $relation = $_POST['relation'];\n\n\n\t\t$options = get_option('id_settings');\n $receiver = $options['id_anonymous_email_addresses_field'];\n\n\t\t$subject = 'Anonymous input form website';\n\n $body = \"<i>Sent using the contact form at \" . get_site_url() . \"</i>\" .\n \"<br><br>\" . esc_html($input) .\n \"<br><br>About: \" . esc_html($about) .\n \"<br><br>Relation: \" . esc_html($relation);\n\n\t\t$sender = \"Anonymous <[email protected]>\";\n\n\n\n return send_mail($receiver, $subject, $body, $sender);\n\n }", "function _c_form($options)\n\t{\t \n\t\t\n\n\t\t\trequire_once(TEMPLATEPATH . '/template-helpers/contact_form.php');\n\t\t\t\n\t\t\t\n\t}", "public function getContactUsForm(){\n $data = Input::all();\n\n //Validation rules\n $rules = array (\n //'first_name' => 'required', uncomment if you want to grab this field\n //'email' => 'required|email', uncomment if you want to grab this field\n //'message' => 'required|min:5'\n );\n\n //Validate data\n $validator = Validator::make ($data, $rules);\n\n //If everything is correct than run passes.\n if ($validator -> passes()){\n\n Mail::send('Contact.contact', $data, function($message) use ($data)\n {\n //$message->from($data['email'] , $data['first_name']); uncomment if using first name and email fields\n $message->from('[email protected]', 'feedback contact form');\n //email 'To' field: cahnge this to emails that you want to be notified.\n $message->to('[email protected]', 'John')->subject('feedback form submit');\n\n });\n // Redirect to page\n return redirect(route('accueil.index'))->with('message', 'Your message has been sent. Thank You!');\n\n\n //return View::make('contact');\n }else{\n //return contact form with errors\n return redirect(route('accueil.index'))->with('error', 'Feedback must contain more than 5 characters. Try Again.');\n\n }\n }", "public function contactmail(Request $request)\n {\n\t\t$companyid = get_company_id();\n $themename = get_theme_name();\n\t\t$Contactus = new Contactus();\n $Contactus->fill($request->all()); \n\t\t\n\t\t$pagedata = PageSettings::where('company_id', $companyid)->first();\n $setting = Settings::where('company_id', $companyid)->first();\n\t\t\n $subject = \"Contact From Of \".$setting->title;\n $to = $request->to;\n $name = $request->name;\n $phone = $request->phone;\n $from = $request->email;\n $msg = \"Name: \".$name.\"\\nEmail: \".$from.\"\\nPhone: \".$request->phone.\"\\nMessage: \".$request->message;\n\t\t\n\t\t$Contactus['company_id'] = $companyid;\n \n if(isset($Contactus['status']))\n {\n $Contactus['status'] = 1;\n }\n else\n {\n $Contactus['status'] = 0;\n }\n\n $Contactus->save();\t\n\t\t\n mail($to,$subject,$msg);\n \n Session::flash('cmail', $pagedata->contact);\n return redirect('/contact');\n }", "public function executeAjaxContactUs(sfWebRequest $request) {\n // parse the incoming details from the form\n $name = $request->getParameter('name');\n $email = $request->getParameter('email');\n $phone = $request->getParameter('phone');\n $incoming_message = $request->getParameter('message');\n\n // define the message subject\n $subject = \"Site Contact Form\";\n\n // end of line character\n $eol = \"<br/>\";\n\n // build the message and drop in the variables that have been submitted\n $message_to_send = \"-------------------------------\" . $eol;\n $message_to_send .= \"Site Contact Form\" . $eol;\n $message_to_send .= \"-------------------------------\" . $eol;\n $message_to_send .= \"Date :: \" . date(\"d/m/Y\", time()) . $eol;\n $message_to_send .= \"Name :: \" . $name . $eol;\n $message_to_send .= \"Email :: \" . $email . $eol;\n $message_to_send .= \"Phone :: \" . $phone . $eol;\n $message_to_send .= \"Message :: \" . $incoming_message . $eol;\n $message_to_send .= \"-------------------------------\" . $eol;\n\n // create the new mailer object and set all the bits and pieces\n $message = $this->getMailer()->compose();\n $message->setSubject($subject);\n $message->setTo(sfConfig::get('app_contact_us_email'));\n $message->setFrom(sfConfig::get('app_email_from_address'));\n $message->setBody($message_to_send, 'text/html');\n\n // send the email and pass back the result to the form to display\n // a nice message to the user\n if ($this->getMailer()->send($message)) {\n return $this->renderText(\"OK\");\n } else {\n return $this->renderText(\"ERROR\");\n }\n }", "public function send()\n {\n if ($_SERVER['REQUEST_METHOD'] !== 'POST') {\n\t\t\theader('Location: ' . Url::createPath('home', 'index'));\n\t\t}\n\n\t\t$check = true;\n $errors = array();\n\n // Get POST data\n $email = self::getValue('frmEmail');\n $message = self::getValue('frmMessage');\n\t\t$verification = self::getValue('frmVerification');\n\n // Validation: Email\n if (empty($email)) {\n $check = false;\n array_push($errors, 'E-mail is required!');\n } else if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {\n $check = false;\n array_push($errors, 'Invalid e-mail!');\n }\n\n // Validation: Message\n if (empty($message)) {\n $check = false;\n array_push($errors, 'Message is required!');\n }\n\n\t\t// Validation: Human verification\n\t\tif (empty($verification) || $verification != '4') {\n\t\t\t$check = false;\n\t\t\tarray_push($errors, 'Verification is required!');\n\t\t}\n\n // Validation NOT passed, show error message\n if (!$check) {\n $this->setView('index');\n $this->view->title = 'Invalid form data!';\n $this->view->errorMessage = self::createErrorMessage($errors);\n $this->view->formData = $_POST;\n\n\t\t\treturn $this->view->render();\n }\n\n\t\tself::sendMail();\n\n // Validation passed, show success\n $this->setView('Success');\n $this->view->title = 'Thank U!';\n $this->view->formData = array(\n 'email' => $email,\n 'message' => $message\n );\n\n\t\t// Render the success view\n $this->view->render();\n }", "public function website_provider() {\n\t\t\n\t\t$name = Input::get('name');\n\t\t$mailFrom = Input::get('email');\n\t\t$phone = Input::get('phone');\n\t\t$comments = Input::get('comments');\n\t\t$emailTo = '[email protected]';\n\t\t\n\t\t$vars = array(\n\t\t\t'name'\t\t=>\t$name,\n\t\t\t'email'\t\t=>\t$mailFrom,\n\t\t\t'phone'\t\t=>\t$phone,\n\t\t\t'comments'\t=>\t$comments,\n\t\t);\n\n\t\tEmailTemplate::SendByKey('contact_mail_provider', $vars, $emailTo, null, null, $mailFrom);\n\t\t\n\t\t\n\t\treturn \"<fieldset><div id='success_page'><h4 class='highlight'>Obrigado, <strong>$name</strong>! Sua mensagem foi enviada. Entraremos em contato o mais rápido possível.</h4></div></fieldset>\";\n }", "function contactus_action() {\n $postvar = $this->input->post();\n $data = array();\n $data['vName'] = stripslashes($postvar['name']);\n $data['vEmail'] = stripslashes($postvar['email']);\n $data['vPhone'] = stripslashes($postvar['phone']);\n $data['tComments'] = stripslashes($postvar['comment']);\n\n $data['vFromName'] = $data['vName'];\n $data['vFromEmail'] = $data['vEmail'];\n $data['vEmail'] = $this->config->item('EMAIL_ADMIN');\n\n $success = $this->general->sendMail($data); // send mail\n\n $this->session->set_flashdata(\"success\", 'Your contact request sent successfully.');\n exit;\n }", "public function indexAction() {\n $contact = new Application_Model_Contact();\n\n // Check whether contact form submitted and is valid\n if($this->_request->isPost() && $contact->getForm()->isValid($this->_request->getParams())) {\n // Retrieve parameters from request and pass back to form to filter only form values\n $contact->getForm()->populate($this->_request->getParams());\n $contact->populate();\n\n // Save and send contact message\n $isSent = $contact->save()->send();\n\n if($isSent) {\n $this->_flashMessenger->addMessage('Thank you for contacting us. Your message has been sent.');\n $contact->getForm()->reset();\n\n } else {\n $this->_flashMessenger->addMessage('An error occurred and your message could not be sent. Please try again.');\n }\n\n $this->_helper->redirector('index');\n }\n \n // Pass variables to view\n $this->view->contact = $contact;\n }", "public function contact()\n {\n // Check login authentication\n $loginUser = \"\";\n if (Auth::check()) {\n $loginUser = Auth::user();\n }\n\n return view('contact.contact', ['loginUser' => $loginUser]);\n }", "public function contact()\n {\n $this->load->library('form_validation');\n\n // make sure the error messages are using the proper syntax\n $this->form_validation->set_error_delimiters('<span class=\"red bold error-icon\">', '</span><br />');\n\n // set the validation rules\n $this->form_validation->set_rules('name', 'lang:labels_name', 'required');\n $this->form_validation->set_rules('email', 'lang:labels_email_address', 'required|valid_email');\n $this->form_validation->set_rules('subject', 'lang:labels_subject', 'required');\n $this->form_validation->set_rules('message', 'lang:labels_message', 'required');\n\n $showFlashedData = true;\n\n if (isset($_POST['submit'])) {\n $array = array(\n 'name'\t\t=> $this->input->post('name'),\n 'email'\t\t=> $this->input->post('email'),\n 'subject'\t=> $this->input->post('subject'),\n 'message'\t=> $this->input->post('message'),\n 'honeypot'\t=> $this->input->post('url'),\n );\n\n if ($this->form_validation->run()) {\n $showFlashedData = false;\n\n if ($array['honeypot'] != '') {\n $email = true;\n } else {\n $email = ($this->options['system_email'] == 'on')\n ? $this->_email('contact', $array)\n : false;\n }\n\n if (! $email) {\n $message = sprintf(\n lang('flash_failure'),\n ucfirst(lang('labels_contact')),\n lang('actions_sent'),\n ''\n );\n\n $flash['status'] = 'error';\n $flash['message'] = text_output($message);\n } else {\n $message = sprintf(\n lang('flash_success'),\n ucfirst(lang('labels_contact')),\n lang('actions_sent'),\n ''\n );\n\n $flash['status'] = 'success';\n $flash['message'] = text_output($message);\n }\n\n $this->_regions['flash_message'] = Location::view('flash', $this->skin, 'main', $flash);\n }\n }\n\n // set the title, header and content variables\n $data['header'] = ucwords(lang('actions_contact').' '.lang('labels_us'));\n $data['msg'] = $this->msgs->get_message('contact');\n\n $data['button'] = array(\n 'submit' => array(\n 'type' => 'submit',\n 'class' => 'button-main',\n 'name' => 'submit',\n 'value' => 'submit',\n 'content' => ucwords(lang('actions_submit'))),\n );\n\n if ($this->options['system_email'] == 'off' || $this->options['contact_form_enabled'] == 'n') {\n $data['button']['submit']['disabled'] = 'disabled';\n }\n\n $data['inputs'] = array(\n 'name' => array(\n 'name' => 'name',\n 'id' => 'name',\n 'class' => 'w-1/2',\n 'value' => $showFlashedData ? set_value('name') : ''),\n 'email' => array(\n 'name' => 'email',\n 'id' => 'email',\n 'class' => 'w-1/2',\n 'value' => $showFlashedData ? set_value('email') : ''),\n 'subject' => array(\n 'name' => 'subject',\n 'id' => 'subject',\n 'class' => 'w-1/2',\n 'value' => $showFlashedData ? set_value('subject') : ''),\n 'message' => array(\n 'name' => 'message',\n 'id' => 'message',\n 'class' => 'w-full',\n 'rows' => 10,\n 'value' => $showFlashedData ? set_value('message') : ''),\n 'honeypot' => array(\n 'name' => 'url',\n 'id' => 'url',\n 'value' => ''),\n );\n\n $data['label'] = array(\n 'send' => ucwords(lang('actions_send') .' '. lang('labels_to')),\n 'name' => ucwords(lang('labels_name')),\n 'email' => ucwords(lang('labels_email_address')),\n 'subject' => ucwords(lang('labels_subject')),\n 'message' => ucwords(lang('labels_message')),\n 'nosubmit' => lang('flash_system_email_off_disabled'),\n 'nosubmit_contact_form_disabled' => lang('flash_contact_form_off_disabled'),\n );\n\n $this->_regions['content'] = Location::view('main_contact', $this->skin, 'main', $data);\n $this->_regions['title'].= $data['header'];\n\n Template::assign($this->_regions);\n\n Template::render();\n }", "protected function handleContact($resume) {\n if(!$this->getRequest()->post(\"contact\")) {\n return;\n }\n \n $valid = $this->form[\"contact\"]->isValid($this->getRequest()->getAll());\n \n if($valid) {\n \n $cf = array();\n foreach($this->form[\"contact\"]->getFields() as $key => $field) {\n $cf[$key] = $field->getValue();\n } \n \n $mail = Wpjb_Utility_Message::load(\"notify_candidate_message\");\n $mail->setTo($resume->getUser(true)->user_email);\n $mail->addHeader(\"Reply-To\", $this->form[\"contact\"]->value(\"email\"));\n $mail->assign(\"company\", Wpjb_Model_Company::current());\n $mail->assign(\"resume\", $resume);\n $mail->assign(\"contact_form\", $cf);\n $mail->send();\n \n $this->addInfo(__(\"Your message has been sent.\", \"wpjobboard\"));\n add_action(\"wp_footer\", \"wpjb_hide_scroll_hash\");\n \n } else {\n $this->show[\"contact\"] = 1;\n $this->view->form_error = __(\"There are errors in your form\", \"wpjobboard\");\n }\n \n }", "function sentInfoContactForm($name,$company_name,$city,$email,$phone_no,$comments)\n\t\t{\n\t\t\t//email will be sent to admin\n\t\t\t//emaill of admin\n\t\t\t$email_admin = $this->manage_content->getValue('admin_profile','email_add');\n\t\t\t//get email from array $email_admin[0]['email_add']\n\t\t\t$sendMail_admin = $this->mail_function->contactToAdmin($name,$company_name,$city,$email,$phone_no,$comments,$email_admin[0]['email_add']);\n\t\t}" ]
[ "0.7913285", "0.7628652", "0.7603733", "0.7561216", "0.75425154", "0.7540005", "0.7540005", "0.75137484", "0.7476789", "0.7476789", "0.7476789", "0.7469458", "0.7455899", "0.74338263", "0.74313974", "0.7334288", "0.7328069", "0.731379", "0.73045486", "0.7294656", "0.72929823", "0.7270264", "0.7270264", "0.7270264", "0.7270264", "0.7270264", "0.7270264", "0.72690994", "0.72690994", "0.72690994", "0.72690994", "0.72690994", "0.72690994", "0.72690994", "0.72690994", "0.7251194", "0.72506446", "0.7238721", "0.7238721", "0.7238721", "0.72087187", "0.71915686", "0.7182074", "0.7136213", "0.7101231", "0.70875573", "0.707592", "0.7065996", "0.7059225", "0.7024544", "0.70154196", "0.6882754", "0.68803334", "0.6802312", "0.67575926", "0.67545235", "0.6739032", "0.6715597", "0.6662047", "0.66267437", "0.66010004", "0.6593913", "0.6579319", "0.65599895", "0.65577877", "0.6544008", "0.65414107", "0.6534086", "0.6530876", "0.65292853", "0.6509987", "0.65063965", "0.65057224", "0.64944494", "0.6452216", "0.6451966", "0.6449493", "0.64446104", "0.64401215", "0.64393824", "0.64160544", "0.6410295", "0.6407016", "0.6406253", "0.63866204", "0.6352173", "0.6346432", "0.63458294", "0.6343554", "0.6341443", "0.6338556", "0.6337461", "0.62977844", "0.62694293", "0.6266678", "0.6264351", "0.62583745", "0.6256233", "0.62506515", "0.62442595", "0.6230067" ]
0.0
-1
Do process contact usertosite email form (build, set email))
function do_contact_email($adata, $aret_flag=0) { # Dim Some Vars global $_CCFG, $_TCFG, $_DBCFG, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp; # Get contact information array $_cinfo = get_contact_info($adata['mc_id']); # Set eMail Parameters (pre-eval template, some used in template) IF ($_CCFG['_PKG_SAFE_EMAIL_ADDRESS']) { $mail['recip'] = $_cinfo['c_email']; $mail['from'] = $adata['mc_email']; IF ($_CCFG['CONTACT_FORM_CC']) {$mail['cc'] = $adata['mc_email'];} } ELSE { $mail['recip'] = $_cinfo['c_name'].' <'.$_cinfo['c_email'].'>'; $mail['from'] = $adata['mc_name'].' <'.$adata['mc_email'].'>'; IF ($_CCFG['CONTACT_FORM_CC']) {$mail['cc'] = $adata['mc_name'].' <'.$adata['mc_email'].'>';} } $mail['subject'] = $_CCFG['_PKG_NAME_SHORT'].'- Contact Message'; # Grab ip_address of sender IF (isset($_SERVER['HTTP_X_FORWARDED_FOR']) && $_SERVER['HTTP_X_FORWARDED_FOR'] != '') { $pos = strpos(strtolower($_SERVER['HTTP_X_FORWARDED_FOR']), '192.168.'); IF ($pos === FALSE) { $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; } ELSE { $ip = $_SERVER["REMOTE_ADDR"]; } } ELSE { $ip = $_SERVER["REMOTE_ADDR"]; } # Set MTP (Mail Template Parameters) array $_MTP['to_name'] = $_cinfo['c_name']; $_MTP['to_email'] = $_cinfo['c_email']; $_MTP['from_name'] = $adata['mc_name']; $_MTP['from_email'] = $adata['mc_email']; $_MTP['subject'] = $adata['mc_subj']; $_MTP['message'] = $adata['mc_msg']; $_MTP['site'] = $_CCFG['_PKG_NAME_SHORT']; $_MTP['sender_ip'] = $ip; # Load message template (processed) $mail['message'] = get_mail_template('email_contact_form', $_MTP); # Call basic email function (ret=0 on error) $_ret = do_mail_basic($mail); # Set flood control values in session $sdata['set_last_contact'] = 1; $_sret = do_session_update($sdata); # Check return IF ($_ret) { $_ret_msg = $_LANG['_MAIL']['CS_FORM_MSG_02_L1']; $_ret_msg .= '<br>'.$_LANG['_MAIL']['CS_FORM_MSG_02_L2']; } ELSE { $_ret_msg = $_LANG['_MAIL']['CS_FORM_MSG_03_L1']; $_ret_msg .= $_sp.$_LANG['_MAIL']['CS_FORM_MSG_03_L2']; } # Build Title String, Content String, and Footer Menu String $_tstr = $_LANG['_MAIL']['CS_FORM_RESULT_TITLE']; $_cstr .= '<center>'.$_nl; $_cstr .= '<table cellpadding="5" width="100%">'.$_nl; $_cstr .= '<tr><td class="TP5MED_NC">'.$_nl; $_cstr .= $_ret_msg.$_nl; $_cstr .= '</td></tr>'.$_nl; $_cstr .= '</table>'.$_nl; $_cstr .= '</center>'.$_nl; $_mstr_flag = 0; $_mstr = '&nbsp;'.$_nl; # Call block it function $_out .= do_mod_block_it($_tstr, $_cstr, $_mstr_flag, $_mstr, '1'); $_out .= '<br>'.$_nl; IF ($aret_flag) {return $_out;} ELSE {echo $_out;} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setEmailForm(&$smartyEmailForm) {\n\t\t//Check if there is a valid email address in the database for the given combination of employee, service, position and organisation id\n\t\tif ($this->getEmailAddress($smartyEmailForm) || $this->piVars['mode'] == 'set_contact_form') {\n\t\t\tif($this->getEmailAddress($smartyEmailForm)){\n\t\t\t\t//Assign action url of email form with mode 'check_email_form'\n\t\t\t\t$smartyEmailForm->assign('action_url',htmlspecialchars($this->pi_linkTP_keepPIvars_url(array(mode => 'check_email_form'),0,0)));\n\t\t\t}else{\n\t\t\t\t//Assign action url of email form with mode 'check_contact_form'\n\t\t\t\t$smartyEmailForm->assign('action_url',htmlspecialchars($this->pi_linkTP_keepPIvars_url(array(mode => 'check_contact_form'),0,0)));\n\t\t\t}\n\n\t\t\t//Assign template labels\n\t\t\t$hoster_email=$this->get_hoster_email();\n\t\t\t$smartyEmailForm->assign('email_form_label',$this->pi_getLL('tx_civserv_pi1_email_form.email_form','E-Mail Form'));\n\t\t\t$smartyEmailForm->assign('contact_form_label',str_replace('###HOSTER###', $hoster_email, $this->pi_getLL('tx_civserv_pi1_email_form.contact_form','Contact '.$hoster_email)));\n\t\t\t$smartyEmailForm->assign('notice_label',$this->pi_getLL('tx_civserv_pi1_email_form.notice','Please enter your postal address oder email address, so that we can send you an answer'));\n\t\t\t$smartyEmailForm->assign('title_label', $this->pi_getLL('tx_civserv_pi1_email_form.title','Title'));\n\t\t\t$smartyEmailForm->assign('chose_option', $this->pi_getLL('tx_civserv_pi1_email_form.chose','Please chose'));\n\t\t\t$smartyEmailForm->assign('female_option', $this->pi_getLL('tx_civserv_pi1_email_form.female','Ms.'));\n\t\t\t$smartyEmailForm->assign('male_option', $this->pi_getLL('tx_civserv_pi1_email_form.male','Mr.'));\n\t\t\t$smartyEmailForm->assign('firstname_label',$this->pi_getLL('tx_civserv_pi1_email_form.firstname','Firstname'));\n\t\t\t$smartyEmailForm->assign('surname_label',$this->pi_getLL('tx_civserv_pi1_email_form.surname','Surname'));\n\t\t\t$smartyEmailForm->assign('street_label',$this->pi_getLL('tx_civserv_pi1_email_form.street','Street, Nr.'));\n\t\t\t$smartyEmailForm->assign('postcode_label',$this->pi_getLL('tx_civserv_pi1_email_form.postcode','Postcode'));\n\t\t\t$smartyEmailForm->assign('city_label',$this->pi_getLL('tx_civserv_pi1_email_form.city','City'));\n\t\t\t$smartyEmailForm->assign('email_label',$this->pi_getLL('tx_civserv_pi1_email_form.email','E-Mail'));\n\t\t\t$smartyEmailForm->assign('phone_label',$this->pi_getLL('tx_civserv_pi1_email_form.phone','Phone'));\n\t\t\t$smartyEmailForm->assign('fax_label',$this->pi_getLL('tx_civserv_pi1_email_form.fax','Fax'));\n\t\t\t$smartyEmailForm->assign('subject_label',$this->pi_getLL('tx_civserv_pi1_email_form.subject','Subject'));\n\t\t\t$smartyEmailForm->assign('bodytext_label',$this->pi_getLL('tx_civserv_pi1_email_form.bodytext','Your text'));\n\t\t\t$smartyEmailForm->assign('submit_label',$this->pi_getLL('tx_civserv_pi1_email_form.submit','Send e-mail'));\n\t\t\t$smartyEmailForm->assign('reset_label',$this->pi_getLL('tx_civserv_pi1_email_form.reset','Reset'));\n\t\t\t$smartyEmailForm->assign('required_label',$this->pi_getLL('tx_civserv_pi1_email_form.required','required'));\n\n\t\t\t//Set reset button type to reset functionality\n\t\t\t$smartyEmailForm->assign('button_type','reset');\n\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "function Form_Mail()\n {\n /**\n * Form_Mail();\n */\n\n $this->referers_array = array($_SERVER[\"HTTP_HOST\"]);\n /**\n * Leave AS IS to only allow posting from same host that script resides on.\n * List individual hosts to create list of hosts that can post to this script:\n * EXAMPLE: $referer_array = array ('example.com','www.example.com','192.168.0.1');\n */\n\n /* proccess form */\n $this->set_arrays();\n $this->check_referer();\n $this->check_recipient();\n $this->check_required_fields();\n $this->send_form();\n $this->display_thankyou();\n }", "public function GrabEmailFromRegistrationForm()\n\t{\n\t\tif ($_POST['gr_registration_checkbox'] == 1 && $this->grApiInstance)\n\t\t{\n\t\t\tif ($this->woocomerce_active === true && isset($_POST['email']))\n\t\t\t{\n\t\t\t\t$email = $_POST['email'];\n\t\t\t\t$name = isset($_POST['billing_first_name']) ? $_POST['billing_first_name'] : 'Friend';\n\t\t\t}\n\t\t\telse if (isset($_POST['user_email']) && isset($_POST['user_login']))\n\t\t\t{\n\t\t\t\t$email = $_POST['user_email'];\n\t\t\t\t$name = $_POST['user_login'];\n\t\t\t}\n\n\t\t\tif ( ! empty($email) && ! empty($name))\n\t\t\t{\n\t\t\t\t$campaign = get_option($this->GrOptionDbPrefix . 'registration_campaign');\n\t\t\t\t$this->addContact($campaign, $name, $email);\n\t\t\t}\n\t\t}\n\t}", "function student_crm_webform_send_email_form_submit($form, $form_state) {\n $case = crm_case_load($form_state['values']['case']);\n $email_addresses = student_crm_webform_send_email('crm_case', $case, $form_state['values']['field'], $form_state['values']['manual-email']);\n \n $case = crm_case_load($form_state['values']['case']);\n $fields = field_info_instances();\n $field = $fields['crm_case'][$case->type][$form_state['values']['field']];\n\n drupal_set_message(t('The form %form has been sent to: !email-addresses', array('%form' => $field['label'], '!email-addresses' => theme('item_list', array('items' => $email_addresses)))));\n}", "abstract protected function _getEmail($info);", "public function sendEmail()\n\t{\n\t\tif (empty($this->get('crmid'))) {\n\t\t\treturn;\n\t\t}\n\t\t$moduleName = 'Contacts';\n\t\t$recordModel = Vtiger_Record_Model::getInstanceById($this->get('crmid'), $moduleName);\n\t\tif ($recordModel->get('emailoptout')) {\n\t\t\t$emailsFields = $recordModel->getModule()->getFieldsByType('email');\n\t\t\t$addressEmail = '';\n\t\t\tforeach ($emailsFields as $fieldModel) {\n\t\t\t\tif (!$recordModel->isEmpty($fieldModel->getFieldName())) {\n\t\t\t\t\t$addressEmail = $recordModel->get($fieldModel->getFieldName());\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!empty($addressEmail)) {\n\t\t\t\t\\App\\Mailer::sendFromTemplate([\n\t\t\t\t\t'template' => 'YetiPortalRegister',\n\t\t\t\t\t'moduleName' => $moduleName,\n\t\t\t\t\t'recordId' => $this->get('crmid'),\n\t\t\t\t\t'to' => $addressEmail,\n\t\t\t\t\t'password' => $this->get('password_t'),\n\t\t\t\t\t'login' => $this->get('user_name'),\n\t\t\t\t\t'acceptable_url' => Settings_WebserviceApps_Record_Model::getInstanceById($this->get('server_id'))->get('acceptable_url')\n\t\t\t\t]);\n\t\t\t}\n\t\t}\n\t}", "public function doemail() {\r\n \tif (isset($_SESSION['userid'])) {\n \t if (isset($_POST['useremail'])) {\n \t \tif ($this->model->putemail($_SESSION['userid'],$_POST['useremail'])) {\n \t \t $this->view->set('infomessage', \"Adres email został zmieniony.\"); \r\n \t \t $this->view->set('redirectto', \"?v=project&a=show\");\r\n \t \t $this->view->render('info_view');\n \t \t} else {\n \t \t $this->view->set('errormessage', \"Nieudana zmiana adresu email.\");\r\n \t $this->view->set('redirectto', \"?v=user&a=edit\");\r\n \t \t $this->view->render('error_view');\n \t \t}\n \t } else {\n \t \t$this->view->set('errormessage', \"Błędny adres email.\");\r\n \t \t$this->view->set('redirectto', \"?v=user&a=edit\");\r\n \t \t$this->view->render('error_view');\n \t }\r\n \t} else {\r\n \t $this->redirect('?v=index&a=show');\r\n \t}\r\n }", "function prefix_send_email_to_admin() { \n\n\t\ttry {\n\n\t\t\t$user_id = get_current_user_id();\n\n\n\t\t\tif( $_POST['name'] == \"\" || $_POST['lastname'] == \"\" || $_POST['tel'] = \"\" || $_POST['cpf'] == \"\" ):\n\t\t\t\t$_SESSION['paodigital']['msg'] = \"Confirme se Nome, Sobrenome, Telefone ou CPF estão corretamente preenchidos!\";\n\t\t\t\twp_redirect( get_bloginfo('url') . \"/detalhes-do-seu-pedido/\" );\n\t\t\tendif;\n\n\t\t\t$user_id = wp_update_user( \n\t\t\t\tarray( \n\t\t\t\t\t'ID' \t\t\t=> $user_id,\n\t\t\t\t\t'first_name'\t=> $_POST['name'],\n\t\t\t\t\t'last_name'\t\t=> $_POST['lastname'],\n\t\t\t\t\t'description'\t=> $_POST['notes']\n\t\t\t\t) \n\t\t\t);\n\n\t\t\tif ( get_user_meta($user_id, 'user_telefone' ) ):\n\t\t\t\t$a = update_user_meta( $user_id, 'user_telefone', $_POST['tel_order'] );\n\t\t\telse:\n\t\t\t\t$a = add_user_meta( $user_id, 'user_telefone', $_POST['tel_order'] );\n\t\t\tendif;\n\n\t\t\tif ( get_user_meta($user_id, 'user_cpf', true ) ):\n\t\t\t\tupdate_user_meta( $user_id, 'user_cpf', $_POST['cpf'] );\n\t\t\telse:\n\t\t\t\tadd_user_meta( $user_id, 'user_cpf', $_POST['cpf'] );\n\t\t\tendif;\n\n\n\t\t\t$error = false;\n\t\t\t$entrega = false;\n\t\t\tif( isset($_POST['save-address']) ):\n\t\t\t\t\n\t\t\t\tif( count( $_POST['address'] ) > 0 ):\n\t\t\t\t\tforeach ( $_POST['address'] as $key => $add ):\n\n\n//check address\nif( empty($add['cep']) || empty($add['address']) || empty($add['bairro']) || empty($add['city']) || empty($add['state']) ):\n\t$error = true;\nendif;\n\n\n\t\t\t\t\t\t//check entrega\n\t\t\t\t\t\tif( isset( $add['entrega'] ) ):\n\t\t\t\t\t\t\t$entrega = true;\n\t\t\t\t\t\tendif;\n\n\t\t\t\t\t\t$id = $add['house'];\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( $add['house'] > 0 ):\n\n\t\t\t\t\t\t\t$params = array(\n\t\t\t\t\t\t\t\t'where'\t\t=> \"id = {$id} AND user_id = {$user_id}\", \n\t\t\t\t\t\t\t\t'limit'\t\t=> 1\n\t\t\t\t\t\t\t); \n\t\t\t\t\t\t\t$address = pods( 'usuarioendereco', $params );\n\n\t\t\t\t\t\t\tif( (integer)$address->total_found() > 0 ):\n\t\t\t\t\t\t\t\t$newAddress = pods('usuarioendereco', $address->display('id') );\n\t\t\t\t\t\t\t\t$array = [\n\t\t\t\t\t\t\t\t\t'name' => $add['desc'],\n\t\t\t\t\t\t\t\t\t'created' => date('Y-m-d H:i:s'),\n\t\t\t\t\t\t\t\t\t'modified' => date('Y-m-d H:i:s'),\n\t\t\t\t\t\t\t\t\t'cep' => $add['cep'],\n\t\t\t\t\t\t\t\t\t'endereco' => $add['address'],\n\t\t\t\t\t\t\t\t\t'user_id' => $user_id,\n\t\t\t\t\t\t\t\t\t'bairro' => $add['bairro'],\n\t\t\t\t\t\t\t\t\t'cidade' => $add['city'],\n\t\t\t\t\t\t\t\t\t'estado' => $add['state'],\n\t\t\t\t\t\t\t\t\t'entrega' => ( isset( $add['entrega'] ) )? 1 : 0 ,\n\t\t\t\t\t\t\t\t\t'numero' => $add['num'],\n\t\t\t\t\t\t\t\t\t'complemento' => $add['complemento']\n\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t$newAddress->save($array);\n\t\t\t\t\t\t\tendif;\n\n\t\t\t\t\t\telse:\n\n\t\t\t\t\t\t\t$newAddress = pods('usuarioendereco');\n\t\t\t\t\t\t\t$array = [\n\t\t\t\t\t\t\t\t'name' => $add['desc'],\n\t\t\t\t\t\t\t\t'created' => date('Y-m-d H:i:s'),\n\t\t\t\t\t\t\t\t'modified' => date('Y-m-d H:i:s'),\n\t\t\t\t\t\t\t\t'cep' => $add['cep'],\n\t\t\t\t\t\t\t\t'endereco' => $add['address'],\n\t\t\t\t\t\t\t\t'user_id' => $user_id,\n\t\t\t\t\t\t\t\t'bairro' => $add['bairro'],\n\t\t\t\t\t\t\t\t'cidade' => $add['city'],\n\t\t\t\t\t\t\t\t'estado' => $add['state'],\n\t\t\t\t\t\t\t\t'entrega' => ( isset( $add['entrega'] ) ) ? 1 : 0 ,\n\t\t\t\t\t\t\t\t'numero' => $add['num'],\n\t\t\t\t\t\t\t\t'complemento' => $add['complemento']\n\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t$newAddress->save($array);\n\n\t\t\t\t\t\tendif;\n\n\t\t\t\t\tendforeach;\n\n\t\t\t\tendif;\n\n\t\t\tendif;\n\n\n\n\t\t\t/*\n\t\t\t\tVerificacao quanto ao dados dos endereços\n\t\t\t*/\n\t\t\tif( $error == true ):\n\n\t\t\t\t$_SESSION['paodigital']['msgAddress'] = \"Preencha corretamente todos os endereços criados\";\n\t\t\t\t$_SESSION['paodigital']['msgAddressType'] = \"danger\";\n\t\t\t\twp_redirect( get_bloginfo('url') . \"/detalhes-do-seu-pedido/\" );\n\n\t\t\telse:\n\n\t\t\t\tif( $entrega == false ):\n\n\t\t\t\t\t$_SESSION['paodigital']['msgAddress'] = \"Escolha um endereço padrão.\";\n\t\t\t\t\t$_SESSION['paodigital']['msgAddressType'] = \"danger\";\n\t\t\t\t\twp_redirect( get_bloginfo('url') . \"/detalhes-do-seu-pedido/\" );\n\n\t\t\t\telse :\n\n\t\t\t\t\t$_SESSION['paodigital']['msgAddress'] = \"Endereço salvo com sucesso!\";\n\t\t\t\t\t$_SESSION['paodigital']['msgAddressType'] = \"success\";\n\t\t\t\t\twp_redirect( get_bloginfo('url') . \"/formas-de-pagamento\" );\n\n\t\t\t\tendif;\n\n\t\t\tendif;\n\t\t\t\n\t\t} catch (Exception $e) {\n\t\t\t\n\t\t\t$_SESSION['paodigital']['msgAddress'] = \"Não Foi Possivel salvar o endereço tente novamente.\";\n\t\t\t$_SESSION['paodigital']['msgAddressType'] = \"danger\";\n\t\t\twp_redirect( get_bloginfo('url') . \"/detalhes-do-seu-pedido/\" );\n\n\t\t}\n\t\t\n\t\t\n\n\t}", "static private function submitEmail()\n {\n $id = $_POST['formid'];\n\n // Initiates new form handling instance\n $f = new FormHandling;\n\n // Gets the client email list (to, bcc, cc)\n $clientEmailList = $f->getClientEmail($id);\n\n // Gets the customer email (if set)\n $customerEmail = $f->getCustomerEmail($_POST);\n\n // dd($customerEmail);\n\n // Checks if in sandbox mode before sending email\n if(FALSE == submissionHandling::sandbox){\n\n // New email instance\n $e = new emailHandling();\n\n // render and send client email(s)\n if($clientEmailList['to']){\n $e->sendEmail($id,'client',$clientEmailList['to'],'Enquiry received','Hi',$clientEmailList['headers']);\n }\n\n // render and send customer email\n if($customerEmail){\n $e->sendEmail($id,'customer',$customerEmail,'Thanks for getting in touch','We will be in touch soon');\n }\n\n }\n }", "function setUserInformation()\r\n{\r\n global $sender ;\r\n global $message ;\r\n global $chemin ;\r\n global $query ;\r\n if(filter_var(strtolower($message), FILTER_VALIDATE_EMAIL) || preg_match(\"#^(none)#i\", $message))\r\n {\r\n sendTextMessage(\"Thank you for your answer to my question.Your setting is correctly set\");\r\n displayAllService();\r\n $query->addUser($sender,strtolower($message));\r\n file_put_contents($chemin,\"\");\r\n }\r\n else\r\n {\r\n sendTextMessage(\"Please provide a valid email or type none if you don't get one 😕 .\");\r\n }\r\n}", "public function contact_form()\n\t{\n\t\tif ($this->errstr)\n\t\t{\n\t\t\tFsb::$tpl->set_switch('error');\n\t\t}\n\n\t\tFsb::$tpl->set_file('user/user_contact.html');\n\t\tFsb::$tpl->set_vars(array(\n\t\t\t'ERRSTR' =>\t\t\tHtml::make_errstr($this->errstr),\n\t\t));\n\t\t\n\t\t// Champs contacts crees par l'administrateur\n\t\tProfil_fields_forum::form(PROFIL_FIELDS_CONTACT, 'contact', Fsb::$session->id());\n\t}", "public function emailMeAction() {\r\n\r\n //DEFAULT LAYOUT\r\n $this->_helper->layout->setLayout('default-simple');\r\n\r\n //GET VIEWER DETAIL\r\n $viewer = Engine_Api::_()->user()->getViewer();\r\n $viewr_id = $viewer->getIdentity();\r\n\r\n //GET PAGE ID AND PAGE OBJECT\r\n $this->view->page_id = $page_id = $this->_getParam('page_id', $this->_getParam('id', null));\r\n $sitepage = Engine_Api::_()->getItem('sitepage_page', $page_id);\r\n if (empty($sitepage))\r\n return $this->_forwardCustom('notfound', 'error', 'core');\r\n \r\n //AUTHORIZATION CHECK FOR TELL A FRIEND\r\n $isManageAdmin = Engine_Api::_()->sitepage()->isManageAdmin($sitepage, 'tfriend');\r\n if (empty($isManageAdmin)) {\r\n return $this->_forwardCustom('requireauth', 'error', 'core');\r\n }\r\n\r\n //FORM GENERATION\r\n $this->view->form = $form = new Sitepage_Form_EmailMe();\r\n\r\n if (!empty($viewr_id)) {\r\n $value['sender_email'] = $viewer->email;\r\n $value['sender_name'] = $viewer->displayname;\r\n $form->populate($value);\r\n }\r\n\r\n if ($this->getRequest()->isPost() && $form->isValid($this->getRequest()->getPost())) {\r\n\r\n $values = $form->getValues();\r\n\r\n //EDPLODES EMAIL IDS\r\n $reciver_ids = $sitepage->email; //explode(',', $values['sitepage_reciver_emails']);\r\n $values['sitepage_sender_email'] = $sitepage->email;\r\n if (!empty($values['sitepage_send_me'])) {\r\n $reciver_ids = $values['sitepage_sender_email'];\r\n }\r\n $sender_email = $values['sitepage_sender_email'];\r\n\r\n //CHECK VALID EMAIL ID FORMITE\r\n $validator = new Zend_Validate_EmailAddress();\r\n\r\n if (!$validator->isValid($sender_email)) {\r\n $form->addError(Zend_Registry::get('Zend_Translate')->_('Invalid sender email address value'));\r\n return;\r\n }\r\n// foreach ($reciver_ids as $reciver_id) {\r\n// $reciver_id = trim($reciver_id, ' ');\r\n// if (!$validator->isValid($reciver_id)) {\r\n// $form->addError(Zend_Registry::get('Zend_Translate')->_('Please enter correct email address of the receiver(s).'));\r\n// return;\r\n// }\r\n// }\r\n $sender = $values['sitepage_sender_name'];\r\n $message = $values['sitepage_message'];\r\n $heading = ucfirst($sitepage->getTitle());\r\n Engine_Api::_()->getApi('mail', 'core')->sendSystem($reciver_ids, 'SITEPAGE_EMAILME_EMAIL', array(\r\n 'host' => $_SERVER['HTTP_HOST'],\r\n 'sender_name' => $sender,\r\n 'page_title' => $heading,\r\n 'message' => '<div>' . $message . '</div>',\r\n 'object_link' => 'http://' . $_SERVER['HTTP_HOST'] . Engine_Api::_()->sitepage()->getHref($sitepage->page_id, $sitepage->owner_id, $sitepage->getSlug()),\r\n 'sender_email' => $sender_email,\r\n 'queue' => true\r\n ));\r\n\r\n $this->_forwardCustom('success', 'utility', 'core', array(\r\n 'smoothboxClose' => true,\r\n 'parentRefresh' => false,\r\n 'format' => 'smoothbox',\r\n 'messages' => array(Zend_Registry::get('Zend_Translate')->_('Your message to page owner has been sent successfully.'))\r\n ));\r\n }\r\n }", "function do_contact_supplier_email($adata, $aret_flag=0) {\n\t# Dim Some Vars\n\t\tglobal $_CCFG, $_TCFG, $_DBCFG, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp;\n\n\t# Check if we are sending to an additional email instead of the clients regular address\n\t\t$pos = strpos(strtolower($adata['cc_s_id']), \"alias\");\n\t\tif ($pos !== false) {\n\t\t\t$pieces\t= explode('|', $adata['cc_cl_id']);\n\t\t\t$_ccinfot\t= get_contact_supplier_info_alias($pieces[1], 0);\n\t\t\t$_ccinfo\t= $_ccinfot[1];\n\t } ELSE {\n\t\t# Get supplier contact information array\n\t\t\t$_ccinfo\t= get_contact_supplier_info($adata['cc_s_id']);\n\t\t}\n\n\t# Get site contact information array\n\t\t$_mcinfo = get_contact_info($adata['cc_mc_id']);\n\n\t# Set eMail Parameters (pre-eval template, some used in template)\n\t\tIF ($_CCFG['_PKG_SAFE_EMAIL_ADDRESS']) {\n \t\t\t$mail['recip']\t\t= $_ccinfo['s_email'];\n\t\t\t$mail['from']\t\t= $_mcinfo['c_email'];\n\t\t\t$mail['cc']\t\t= $_mcinfo['c_email'];\n\t\t} ELSE {\n\t\t\tIF ($_ccinfo['s_name_first'] && $_ccinfo['s_name_last']) {\n\t\t\t\t$mail['recip'] = $_ccinfo['s_name_first'].' '.$_ccinfo['s_name_last'].' <'.$_ccinfo['s_email'].'>';\n\t\t\t} ELSE {\n\t\t\t\t$mail['recip'] = $_ccinfo['s_company'].' <'.$_ccinfo['s_email'].'>';\n\t\t\t}\n\t\t\t$mail['from']\t\t= $_mcinfo['c_name'].' <'.$_mcinfo['c_email'].'>';\n\t\t\t$mail['cc']\t\t= $_mcinfo['c_name'].' <'.$_mcinfo['c_email'].'>';\n\t\t}\n\n\t\tIF ($_CCFG['MAIL_USE_CUSTOM_SUBJECT']) {\n\t\t\t$mail['subject']\t= $adata['cc_subj'];\n\t\t} ELSE {\n\t\t\t$mail['subject']\t= $_CCFG['_PKG_NAME_SHORT'].$_LANG['_MAIL']['CC_FORM_SUBJECT_PRE'];\n\t\t}\n\n\t# Set MTP (Mail Template Parameters) array\n\t\tIF ($_ccinfo['s_name_first'] && $_ccinfo['s_name_last']) {\n\t\t\t$_MTP['to_name']\t= $_ccinfo['s_name_first'].' '.$_ccinfo['s_name_last'];\n\t\t} ELSE {\n\t\t\t$_MTP['to_name']\t= $_ccinfo['s_company'];\n\t\t}\n\t\t$_MTP['to_email']\t= $_ccinfo['s_email'];\n\t\t$_MTP['from_name']\t= $_mcinfo['c_name'];\n\t\t$_MTP['from_email']\t= $_mcinfo['c_email'];\n\t\t$_MTP['subject']\t= $adata['cc_subj'];\n\t\t$_MTP['message']\t= $adata['cc_msg'];\n\t\t$_MTP['site']\t\t= $_CCFG['_PKG_NAME_SHORT'];\n\n\t# Load message template (processed)\n\t\t$mail['message']\t= get_mail_template('email_contact_supplier_form', $_MTP);\n\n\t# Call basic email function (ret=0 on error)\n\t\t$_ret = do_mail_basic($mail);\n\n\t# Check return\n\t\tIF ($_ret) {\n\t\t\t$_ret_msg = $_LANG['_MAIL']['CC_FORM_MSG_02_L1'];\n\t\t\t$_ret_msg .= '<br>'.$_LANG['_MAIL']['CC_FORM_MSG_02_L2'];\n\t\t} ELSE {\n\t\t\t$_ret_msg = $_LANG['_MAIL']['CC_FORM_MSG_03_L1'];\n\t\t}\n\n\t# Build Title String, Content String, and Footer Menu String\n\t\t$_tstr = $_LANG['_MAIL']['CC_FORM_RESULT_TITLE'];\n\n\t\t$_cstr .= '<center>'.$_nl;\n\t\t$_cstr .= '<table cellpadding=\"5\" width=\"100%\">'.$_nl;\n\t\t$_cstr .= '<tr><td class=\"TP5MED_NC\">'.$_nl;\n\t\t$_cstr .= $_ret_msg.$_nl;\n\t\t$_cstr .= '</td></tr>'.$_nl;\n\t\t$_cstr .= '</table>'.$_nl;\n\t\t$_cstr .= '</center>'.$_nl;\n\n\t\t$_mstr_flag\t= 0;\n\t\t$_mstr\t\t= '&nbsp;'.$_nl;\n\n\t# Call block it function\n\t\t$_out .= do_mod_block_it($_tstr, $_cstr, $_mstr_flag, $_mstr, '1');\n\t\t$_out .= '<br>'.$_nl;\n\n\t\tIF ($aret_flag) {return $_out;} ELSE {echo $_out;}\n}", "function contactUs( $data ) {\n // Get the info as specified in the contact info section of the site\n // management porition\n $info = ContactInfo::getInstance();\n\n // For development purposes, currently return;\n\n // Send an email to the contacted persons\n}", "private function sendEmails()\r\n {\r\n $user_body = \"Hi,<br>A new comment was added to the following article:\\n\";\r\n $user_body .= '<a href=\"http://'.$this->config->getModuleVar('common', 'site_url').'/id_article/'.$this->viewVar['article']['id_article'].'\">'.$this->viewVar['article']['title'].\"</a>\\n\";\r\n\r\n $_tmp_error = array();\r\n $user_text_body = strip_tags($user_body);\r\n\r\n $this->model->action( 'common', 'mailSendTo',\r\n array('charset' => $this->viewVar['charset'],\r\n 'bodyHtml' => & $user_body,\r\n 'bodyText' => & $user_text_body,\r\n 'to' => array(array('email' => '[email protected]',\r\n 'name' => 'Armand Turpel')),\r\n 'subject' => \"Open Publisher Blog Entry\",\r\n 'fromEmail' => '[email protected]',\r\n 'fromName' => '[email protected]',\r\n 'error' => & $_tmp_error\r\n ));\r\n\r\n }", "function aform($setup,$subject,$to,$cc,$bcc,$from) {\n\t\t\n\t\tif (isset($_POST[\"Submit\"])) {\n\t\t\t\n\t\t\t// Compile all POST info\n\t\t\tforeach ($_POST as $key => $value) {\n\t\t\t\t$$key = $value;\t\t\t\t\t\t\t\t\n\t\t\t\tif ($key != \"require\" && $key != \"Submit\" && $key != \"verify\" && $key != \"birthday\") {\n\t\t\t\t\t$message .= \"<span style='text-transform: capitalize; font-weight: 700;'>\".$key.\"</span> \".$value.\"<br /><br />\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//If \"Verify\" is set, then check to see if correct\n\t\t\tif ($birthday != \"\") {\n\t\t\t\tif ($birthday != $verify) {\n\t\t\t\t\t$error .= \"Invalid Verification Code<br />\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Check for \"required\" fields\n\t\t\tif ($require != \"\") {\n\t\t\t\t$dcheck = explode(\",\", $require);\n\t\t\t\t\n\t\t\t\twhile(list($check) = each($dcheck)) {\n\t\t\t\t\tif(!$$dcheck[$check]) {\n\t\t\t\t\t\t$error .= \"The <b>$dcheck[$check]</b> field is required.<br />\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Check the Email Address\n\t\t\t$checkEmail = validEmail($_POST[\"email\"]);\n\t\t\tif ($checkEmail != \"1\") {\n\t\t\t\t$error .= \"Your email is not valid. Please correct.<br />\";\n\t\t\t}\n\t\t\t\n\t\t}\t\n\t\n\n\t\t/* Let's start by building the form */\n\t\t$form .= '\n\t\t<form method=\"post\" enctype=\"multipart/form-data\" class=\"form\">';\n\t\t$form .= \"\\n\";\n\t\t\t\t\t\t\t\t\n\t\t// let's loop the PIPES \"|\" and breakdown the UNDERSCORES \"_\" then use this data to build the form\n\t\t\t\t\t\n\t\t$formchunk = explode(\"|\", $setup);\n\t\t\t\t\t\n\t\tforeach ($formchunk as $key => $value) {\n\t\t\t$entrychunk = explode(\"_\", $value);\n\t\t\t$formalname = $entrychunk[0];\n\t\t\t$name = $entrychunk[1];\n\t\t\t$type = $entrychunk[2];\n\t\t\t\n\t\t\tif ($entrychunk[3] == \"required\") {\n\t\t\t\t$required = $entrychunk[3]; // this is an optional field for making it REQUIRED and may not be set\n\t\t\t\t$values = $entrychunk[4]; // this is an optional field for the VALUE and may not be set (most commonly used for \"select\" and \"radio\"\n\t\t\t} else {\n\t\t\t\t$values = $entrychunk[3]; // this is an optional field for the VALUE and may not be set (most commonly used for \"select\" and \"radio\"\n\t\t\t\t$required = $entrychunk[4]; // this is an optional field for making it REQUIRED and may not be set\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\t$form .= '\t\t\t\t\t\t<div>\n\t\t\t<label>'.$formalname.'</label>';\n\t\t\t$form .= \"\\n\";\n\t\t\tif ($_POST[$name]) {\n\t\t\t\t$valueDisplay = $_POST[$name];\n\t\t\t} else {\n\t\t\t\t$valueDisplay = $values;\n\t\t\t}\n\t\t\t\n\t\t\tswitch ($type) {\n\t\t\t\tcase \"text\":\n\t\t\t\t\t$form .= '\t\t\t\t\t\t\t<input name=\"'.$name.'\" type=\"text\" class=\"text\" id=\"'.$name.'\" value=\"'.$valueDisplay.'\">';\n\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"password\":\n\t\t\t\t\t$form .= '\t\t\t\t\t\t\t<input name=\"'.$name.'\" type=\"password\" class=\"text\" id=\"'.$name.'\" value=\"'.$valueDisplay.'\">';\n\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\tbreak; \n\t\t\t\tcase \"radio\":\n\t\t\t\t\t$form .= '<div class=\"radios\">';\n\t\t\t\t\t$valuechunk = explode(\"-\", $values);\n\t\t\t\t\tforeach ($valuechunk as $keey => $subvalue) {\n\t\t\t\t\t\tif ($subvalue == $valueDisplay) { $active = \" checked\"; }\n\t\t\t\t\t\t$form .= '\t\t\t\t\t\t\t<input type=\"radio\" name=\"'.$name.'\" value=\"'.$subvalue.'\" class=\"text radio\"'.$active.'> '.$subvalue.'<br />';\n\t\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\t\t$active = \"\";\n\t\t\t\t\t}\n\t\t\t\t\t$form .= \"</div>\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"checkbox\":\n\t\t\t\t\t$form .= '<div class=\"radios\">';\n\t\t\t\t\t$valuechunk = explode(\"-\", $values);\n\t\t\t\t\tforeach ($valuechunk as $keey => $subvalue) {\n\t\t\t\t\t\tif ($subvalue == $valueDisplay) { $active = \" checked\"; }\n\t\t\t\t\t\t$form .= '\t\t\t\t\t\t\t<input type=\"checkbox\" name=\"'.$name.'\" value=\"'.$subvalue.'\" class=\"text radio\"'.$active.'> '.$subvalue.'<br />';\n\t\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\t\t$active = \"\";\n\t\t\t\t\t}\n\t\t\t\t\t$form .= \"</div>\";\n\t\t\t\t\tbreak;\t\t\t\t\t\n\t\t\t\tcase \"select\":\n\t\t\t\t\t$form .= '\t\t\t\t\t\t\t<select name=\"'.$name.'\" class=\"text select\">';\n\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\t$form .= '\t\t\t\t\t\t\t\t<option value=\"\"></option>';\n\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\t$valuechunk = explode(\"-\", $values);\n\t\t\t\t\tforeach ($valuechunk as $keey => $subvalue) {\n\t\t\t\t\t\tif ($subvalue == $valueDisplay) { $active = \" selected\"; }\n\t\t\t\t\t\t$form .= '\t\t\t\t\t\t\t\t<option value=\"'.$subvalue.'\"'.$active.'>'.$subvalue.'</option>';\n\t\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\t\t$active = \"\";\n\t\t\t\t\t}\n\t\t\t\t\t$form .= '\t\t\t\t\t\t\t</select>';\n\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"textarea\":\n\t\t\t\t\t$form .= '\t\t\t\t\t\t\t<textarea name=\"'.$name.'\" class=\"text textarea\" id=\"'.$name.'\">'.$valueDisplay.'</textarea>';\n\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"file\":\n\t\t\t\t\t$form .= '\t\t\t\t\t\t\t<input name=\"file\" class=\"text\" id=\"'.$name.'\" type=\"file\" />';\n\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\tbreak;\t\n\t\t\t\tcase \"verify\":\n\t\t\t\t\t$verification = rand(1111, 9999);\n\t\t\t\t\t$form .= '\t\t\t\t\t\t\t<input type=\"hidden\" value=\"'.$verification.'\" name=\"birthday\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"verifytext\">'.$verification.'</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" value=\"\" name=\"verify\" class=\"text verify\" />';\n\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\t\t\n\t\t\t$form .= '\t\t \t\t\t\t\t<div class=\"clear\"></div>';\n\t\t\t$form .= \"\\n\";\n\t\t\t$form .= '\t\t\t\t\t\t</div>';\n\t\t\t$form .= \"\\n\";\n\t\t\t$form .= \"\\n\";\n\t\t\t\t\n\t\t\tif ($required != \"\") {\n\t\t\t\t$requireding = $name;\n\t\t\t\tif ($req != \"\") {\n\t\t\t\t\t$req .= ','.$requireding;\n\t\t\t\t} else {\n\t\t\t\t\t$req .= $requireding;\n\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\t\n\t\t}\n\t\t\t\t\t\n\t\t$form .= '\n\t\t<div>\n\t\t\t<label><input type=\"hidden\" name=\"require\" value=\"'.$req.'\" />&nbsp;</label>\n\t\t\t<input type=\"submit\" name=\"Submit\" value=\"Submit\" class=\"submit\">\n\t\t\t<div class=\"clear\"></div>\n\t\t</div>\n\t\t</form>';\n\n\t\t\n\t\tif (isset($_POST[\"Submit\"])) {\n\n\n\t\t\tif ($_FILES['file']['tmp_name'] != \"\") {\n\n\t\t\t\t/* Attachment */\n\t\t\t\t$uploadto = $GLOBALS[\"uploadfolder\"];\n\t\t\t\t$docroot = $GLOBALS[\"documentroot\"];\n\t\t\t\t\n\t\t\t\t// Check Entension\n\t\t\t\t$extension = pathinfo($_FILES['file']['name']);\n\t\t\t\t$extension = $extension[extension];\n\t\t\t\t$allowed_paths = explode(\", \", $GLOBALS[\"allowed_ext\"]);\t\t\t\t\t\t\n\t\t\t\tfor($i = 0; $i < count($allowed_paths); $i++) {\n\t\t\t\t\tif ($allowed_paths[$i] == \"$extension\") {\n\t\t\t\t\t\t$ok = \"1\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t// Check File Size\n\t\t\t\tif ($ok == \"1\") {\n\t\t\t\t\tif($_FILES['file']['size'] > $GLOBALS[\"max_size\"]) {\n\t\t\t\t\t\t$error .= \"File size is too big!<br />\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$ok = \"2\";\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\n\t\t\tif($error != \"\") {\n\t\t\t\t$fullmessage .= \"<p>\".$error.\"</p>\";\n\t\t\t\t$fullmessage .= $form;\n\t\t\t\treturn $fullmessage;\n\t\t\t} else { \n\t\t\t\t//success!\n\t\t\t\t\n\t\t\t\tif ($_FILES['file']['tmp_name'] == \"\") {\n\t\t\t\t\t/* No Attachment */\n\t\t\t\t\t$send_to = $to;\n\t\t\t\t\t$send_cc = $cc;\n\t\t\t\t\t$send_bcc = $bcc;\n\t\t\t\t\t$send_from = $from;\n\t\t\t\t\t$send_subject = $subject;\n\t\t\t\t\t$message .= \"IP Address: \".$_SERVER['REMOTE_ADDR']; \n\t\t\t\t\tamail($send_to,$send_cc,$send_bcc,$send_from,$send_subject,$message);\t\n\t\t\t\t\treturn \"<p>\".$GLOBALS[\"success\"].\"</p>\";\n\t\t\t\t} else {\n\t\t\t\t\t\t\n\t\t\t\t\tif ($ok == \"2\") {\n\t\t\t\t\t\t@move_uploaded_file($_FILES['file']['tmp_name'], $uploadto.$_FILES['file']['name']);\n\t\t\t\t\t\t// how to use\n\t\t\t\t\t\t$my_file = $_FILES['file']['name'];\n\t\t\t\t\t\t$my_path = $doc.$uploadto;\n\t\t\t\t\t\t$my_name = $from;\n\t\t\t\t\t\t$my_mail = $from;\n\t\t\t\t\t\t$send_cc = $cc;\n\t\t\t\t\t\t$send_bcc = $bcc;\n\t\t\t\t\t\t$my_replyto = $from;\n\t\t\t\t\t\t$my_to = $to;\n\t\t\t\t\t\t$my_subject = $subject;\n\t\t\t\t\t\t$message .= \" IP Address: \".$_SERVER['REMOTE_ADDR'];\n\t\t\t\t\t\tmail_attachment($my_file, $my_path, $my_to, $my_mail, $my_name, $my_replyto, $my_subject, $message, $cc, $bcc);\t\t\t\t\t\t\t\n\t\t\t\t\t\treturn \"<p>\".$GLOBALS[\"success\"].\"</p>\";\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t} else {\n\t\t\treturn $form;\n\t\t}\n\t}", "protected function sendEmail($user_email, $user_fname)\n {\n \n \n\n\t\t\t\n \n \n }", "function sendInfoMail()\t{\n\t\tif ($this->conf['infomail'] && $this->conf['email.']['field'])\t{\n\t\t\t$recipient='';\n\t\t\t$emailfields=t3lib_div::trimexplode(',',$this->conf['email.']['field']);\t\t\t\t\n\t\t\tforeach($emailfields as $ef) {\n\t\t\t\t$recipient.=$recipient?$Arr[$this->conf['email.']['field']].';'.$recipient:$Arr[$this->conf['email.']['field']];\n\t\t\t}\n\t\t\t$fetch = t3lib_div::_GP('fetch');\n\t\t\tif ($fetch)\t{\n\t\t\t\t\t// Getting infomail config.\n\t\t\t\t$key= trim(t3lib_div::_GP('key'));\n\t\t\t\tif (is_array($this->conf['infomail.'][$key.'.']))\t\t{\n\t\t\t\t\t$config = $this->conf['infomail.'][$key.'.'];\n\t\t\t\t} else {\n\t\t\t\t\t$config = $this->conf['infomail.']['default.'];\n\t\t\t\t}\n\t\t\t\t$pidLock='';\n\t\t\t\tif (!$config['dontLockPid'] && $this->thePid)\t{\n\t\t\t\t\t$pidLock='AND pid IN ('.$this->thePid.') ';\n\t\t\t\t}\n\n\t\t\t\t\t// Getting records\n\t\t\t\tif (t3lib_div::testInt($fetch))\t{\n\t\t\t\t\t$DBrows = $GLOBALS['TSFE']->sys_page->getRecordsByField($this->theTable,$this->conf['uidField'],$fetch,$pidLock,'','','1');\n\t\t\t\t} elseif ($fetch) {\t// $this->conf['email.']['field'] must be a valid field in the table!\n\t\t\t\t\tforeach($emailfields as $ef) {\n\t\t\t\t\t\tif ($ef) $DBrows = $GLOBALS['TSFE']->sys_page->getRecordsByField($this->theTable,$ef,$fetch,$pidLock,'','','100');\n\t\t\t\t\t\tif (count($DBrows )) break;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Processing records\n\t\t\t\tif (is_array($DBrows))\t{\n\t\t\t\t\t//$recipient = $DBrows[0][$this->conf['email.']['field']];\n\t\t\t\t\tif ($this->conf['evalFunc'])\t{\n\t\t\t\t\t\t$DBrows[0] = $this->userProcess('evalFunc',$DBrows[0]);\n\t\t\t\t\t}\n\t\t\t\t\t$this->compileMail($config['label'], $DBrows, $this->getFeuserMail($DBrows[0],$this->conf), $this->conf['setfixed.']);\n\t\t\t\t} elseif ($this->cObj->checkEmail($fetch)) {\n\t\t\t\t\t$this->sendMail($fetch, '', '',trim($this->cObj->getSubpart($this->templateCode, '###'.$this->emailMarkPrefix.'NORECORD###')));\n\t\t\t\t}\n\n\t\t\t\t$content = $this->metafeeditlib->getPlainTemplate($this->conf,$this->markerArray,'###TEMPLATE_INFOMAIL_SENT###');\n\t\t\t} else {\n\t\t\t\t$content = $this->metafeeditlib->getPlainTemplate($this->conf,$this->markerArray,'###TEMPLATE_INFOMAIL###');\n\t\t\t}\n\t\t} else $content='Error: infomail option is not available or emailField is not setup in TypoScript';\n\t\treturn $content;\n\t}", "private function emailAtLogin() {}", "function process_submission() {\n\t\tglobal $post;\n\n\t\t$plugin = Grunion_Contact_Form_Plugin::init();\n\n\t\t$id = $this->get_attribute( 'id' );\n\t\t$to = $this->get_attribute( 'to' );\n\t\t$widget = $this->get_attribute( 'widget' );\n\n\t\t$contact_form_subject = $this->get_attribute( 'subject' );\n\n\t\t$to = str_replace( ' ', '', $to );\n\t\t$emails = explode( ',', $to );\n\n\t\t$valid_emails = array();\n\n\t\tforeach ( (array) $emails as $email ) {\n\t\t\tif ( !is_email( $email ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( function_exists( 'is_email_address_unsafe' ) && is_email_address_unsafe( $email ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$valid_emails[] = $email;\n\t\t}\n\n\t\t// No one to send it to :(\n\t\tif ( !$valid_emails ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$to = $valid_emails;\n\n\t\t// Make sure we're processing the form we think we're processing... probably a redundant check.\n\t\tif ( $widget ) {\n\t\t\tif ( 'widget-' . $widget != $_POST['contact-form-id'] ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\tif ( $post->ID != $_POST['contact-form-id'] ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t$field_ids = $this->get_field_ids();\n\n\t\t// Initialize all these \"standard\" fields to null\n\t\t$comment_author_email = $comment_author_email_label = // v\n\t\t$comment_author = $comment_author_label = // v\n\t\t$comment_author_url = $comment_author_url_label = // v\n\t\t$comment_content = $comment_content_label = null;\n\n\t\t// For each of the \"standard\" fields, grab their field label and value.\n\n\t\tif ( isset( $field_ids['name'] ) ) {\n\t\t\t$field = $this->fields[$field_ids['name']];\n\t\t\t$comment_author = Grunion_Contact_Form_Plugin::strip_tags( stripslashes( apply_filters( 'pre_comment_author_name', addslashes( $field->value ) ) ) );\n\t\t\t$comment_author_label = Grunion_Contact_Form_Plugin::strip_tags( $field->get_attribute( 'label' ) );\n\t\t}\n\n\t\tif ( isset( $field_ids['email'] ) ) {\n\t\t\t$field = $this->fields[$field_ids['email']];\n\t\t\t$comment_author_email = Grunion_Contact_Form_Plugin::strip_tags( stripslashes( apply_filters( 'pre_comment_author_email', addslashes( $field->value ) ) ) );\n\t\t\t$comment_author_email_label = Grunion_Contact_Form_Plugin::strip_tags( $field->get_attribute( 'label' ) );\n\t\t}\n\n\t\tif ( isset( $field_ids['url'] ) ) {\n\t\t\t$field = $this->fields[$field_ids['url']];\n\t\t\t$comment_author_url = Grunion_Contact_Form_Plugin::strip_tags( stripslashes( apply_filters( 'pre_comment_author_url', addslashes( $field->value ) ) ) );\n\t\t\tif ( 'http://' == $comment_author_url ) {\n\t\t\t\t$comment_author_url = '';\n\t\t\t}\n\t\t\t$comment_author_url_label = Grunion_Contact_Form_Plugin::strip_tags( $field->get_attribute( 'label' ) );\n\t\t}\n\n\t\tif ( isset( $field_ids['textarea'] ) ) {\n\t\t\t$field = $this->fields[$field_ids['textarea']];\n\t\t\t$comment_content = trim( Grunion_Contact_Form_Plugin::strip_tags( $field->value ) );\n\t\t\t$comment_content_label = Grunion_Contact_Form_Plugin::strip_tags( $field->get_attribute( 'label' ) );\n\t\t}\n\n\t\tif ( isset( $field_ids['subject'] ) ) {\n\t\t\t$field = $this->fields[$field_ids['subject']];\n\t\t\tif ( $field->value ) {\n\t\t\t\t$contact_form_subject = Grunion_Contact_Form_Plugin::strip_tags( $field->value );\n\t\t\t}\n\t\t}\n\n\t\t$all_values = $extra_values = array();\n\t\t$i = 1; // Prefix counter for stored metadata\n\n\t\t// For all fields, grab label and value\n\t\tforeach ( $field_ids['all'] as $field_id ) {\n\t\t\t$field = $this->fields[$field_id];\n\t\t\t$label = $i . '_' . $field->get_attribute( 'label' );\n\t\t\t$value = $field->value;\n\n\t\t\t$all_values[$label] = $value;\n\t\t\t$i++; // Increment prefix counter for the next field\n\t\t}\n\n\t\t// For the \"non-standard\" fields, grab label and value\n\t\t// Extra fields have their prefix starting from count( $all_values ) + 1\n\t\tforeach ( $field_ids['extra'] as $field_id ) {\n\t\t\t$field = $this->fields[$field_id];\n\t\t\t$label = $i . '_' . $field->get_attribute( 'label' );\n\t\t\t$value = $field->value;\n\n\t\t\t$extra_values[$label] = $value;\n\t\t\t$i++; // Increment prefix counter for the next extra field\n\t\t}\n\n\t\t$contact_form_subject = trim( $contact_form_subject );\n\n\t\t$comment_author_IP = Grunion_Contact_Form_Plugin::get_ip_address();\n\n\t\t$vars = array( 'comment_author', 'comment_author_email', 'comment_author_url', 'contact_form_subject', 'comment_author_IP' );\n\t\tforeach ( $vars as $var )\n\t\t\t$$var = str_replace( array( \"\\n\", \"\\r\" ), '', $$var );\n\t\t$vars[] = 'comment_content';\n\n\t\t$spam = '';\n\t\t$akismet_values = $plugin->prepare_for_akismet( compact( $vars ) );\n\n\t\t// Is it spam?\n\t\t$is_spam = apply_filters( 'contact_form_is_spam', $akismet_values );\n\t\tif ( is_wp_error( $is_spam ) ) // WP_Error to abort\n\t\t\treturn $is_spam; // abort\n\t\telseif ( $is_spam === TRUE ) // TRUE to flag a spam\n\t\t\t$spam = '***SPAM*** ';\n\n\t\tif ( !$comment_author )\n\t\t\t$comment_author = $comment_author_email;\n\n\t\t$to = (array) apply_filters( 'contact_form_to', $to );\n\t\tforeach ( $to as $to_key => $to_value ) {\n\t\t\t$to[$to_key] = Grunion_Contact_Form_Plugin::strip_tags( $to_value );\n\t\t}\n\n\t\t$blog_url = parse_url( site_url() );\n\t\t$from_email_addr = 'wordpress@' . $blog_url['host'];\n\n\t\t$reply_to_addr = $to[0];\n\t\tif ( ! empty( $comment_author_email ) ) {\n\t\t\t$reply_to_addr = $comment_author_email;\n\t\t}\n\n\t\t$headers = 'From: \"' . $comment_author .'\" <' . $from_email_addr . \">\\r\\n\" .\n\t\t\t\t\t'Reply-To: \"' . $comment_author . '\" <' . $reply_to_addr . \">\\r\\n\" .\n\t\t\t\t\t\"Content-Type: text/plain; charset=\\\"\" . get_option('blog_charset') . \"\\\"\";\n\n\t\t$subject = apply_filters( 'contact_form_subject', $contact_form_subject, $all_values );\n\t\t$url = $widget ? home_url( '/' ) : get_permalink( $post->ID );\n\n\t\t$date_time_format = _x( '%1$s \\a\\t %2$s', '{$date_format} \\a\\t {$time_format}', 'jetpack' );\n\t\t$date_time_format = sprintf( $date_time_format, get_option( 'date_format' ), get_option( 'time_format' ) );\n\t\t$time = date_i18n( $date_time_format, current_time( 'timestamp' ) );\n\n\t\t$message = \"$comment_author_label: $comment_author\\n\";\n\t\tif ( !empty( $comment_author_email ) ) {\n\t\t\t$message .= \"$comment_author_email_label: $comment_author_email\\n\";\n\t\t}\n\t\tif ( !empty( $comment_author_url ) ) {\n\t\t\t$message .= \"$comment_author_url_label: $comment_author_url\\n\";\n\t\t}\n\t\tif ( !empty( $comment_content_label ) ) {\n\t\t\t$message .= \"$comment_content_label: $comment_content\\n\";\n\t\t}\n\t\tif ( !empty( $extra_values ) ) {\n\t\t\tforeach ( $extra_values as $label => $value ) {\n\t\t\t\t$message .= preg_replace( '#^\\d+_#i', '', $label ) . ': ' . trim( $value ) . \"\\n\";\n\t\t\t}\n\t\t}\n\t\t$message .= \"\\n\";\n\t\t$message .= __( 'Time:', 'jetpack' ) . ' ' . $time . \"\\n\";\n\t\t$message .= __( 'IP Address:', 'jetpack' ) . ' ' . $comment_author_IP . \"\\n\";\n\t\t$message .= __( 'Contact Form URL:', 'jetpack' ) . \" $url\\n\";\n\n\t\tif ( is_user_logged_in() ) {\n\t\t\t$message .= \"\\n\";\n\t\t\t$message .= sprintf(\n\t\t\t\t__( 'Sent by a verified %s user.', 'jetpack' ),\n\t\t\t\tisset( $GLOBALS['current_site']->site_name ) && $GLOBALS['current_site']->site_name ? $GLOBALS['current_site']->site_name : '\"' . get_option( 'blogname' ) . '\"'\n\t\t\t);\n\t\t} else {\n\t\t\t$message .= __( 'Sent by an unverified visitor to your site.', 'jetpack' );\n\t\t}\n\n\t\t$message = apply_filters( 'contact_form_message', $message );\n\t\t$message = Grunion_Contact_Form_Plugin::strip_tags( $message );\n\n\t\t// keep a copy of the feedback as a custom post type\n\t\t$feedback_time = current_time( 'mysql' );\n\t\t$feedback_title = \"{$comment_author} - {$feedback_time}\";\n\t\t$feedback_status = $is_spam === TRUE ? 'spam' : 'publish';\n\n\t\tforeach ( (array) $akismet_values as $av_key => $av_value ) {\n\t\t\t$akismet_values[$av_key] = Grunion_Contact_Form_Plugin::strip_tags( $av_value );\n\t\t}\n\n\t\tforeach ( (array) $all_values as $all_key => $all_value ) {\n\t\t\t$all_values[$all_key] = Grunion_Contact_Form_Plugin::strip_tags( $all_value );\n\t\t}\n\n\t\tforeach ( (array) $extra_values as $ev_key => $ev_value ) {\n\t\t\t$extra_values[$ev_key] = Grunion_Contact_Form_Plugin::strip_tags( $ev_value );\n\t\t}\n\n\t\t/* We need to make sure that the post author is always zero for contact\n\t\t * form submissions. This prevents export/import from trying to create\n\t\t * new users based on form submissions from people who were logged in\n\t\t * at the time.\n\t\t *\n\t\t * Unfortunately wp_insert_post() tries very hard to make sure the post\n\t\t * author gets the currently logged in user id. That is how we ended up\n\t\t * with this work around. */\n\t\tadd_filter( 'wp_insert_post_data', array( $plugin, 'insert_feedback_filter' ), 10, 2 );\n\n\t\t$post_id = wp_insert_post( array(\n\t\t\t'post_date' => addslashes( $feedback_time ),\n\t\t\t'post_type' => 'feedback',\n\t\t\t'post_status' => addslashes( $feedback_status ),\n\t\t\t'post_parent' => (int) $post->ID,\n\t\t\t'post_title' => addslashes( wp_kses( $feedback_title, array() ) ),\n\t\t\t'post_content' => addslashes( wp_kses( $comment_content . \"\\n<!--more-->\\n\" . \"AUTHOR: {$comment_author}\\nAUTHOR EMAIL: {$comment_author_email}\\nAUTHOR URL: {$comment_author_url}\\nSUBJECT: {$subject}\\nIP: {$comment_author_IP}\\n\" . print_r( $all_values, TRUE ), array() ) ), // so that search will pick up this data\n\t\t\t'post_name' => md5( $feedback_title ),\n\t\t) );\n\n\t\t// once insert has finished we don't need this filter any more\n\t\tremove_filter( 'wp_insert_post_data', array( $plugin, 'insert_feedback_filter' ), 10, 2 );\n\n\t\tupdate_post_meta( $post_id, '_feedback_extra_fields', $this->addslashes_deep( $extra_values ) );\n\t\tupdate_post_meta( $post_id, '_feedback_akismet_values', $this->addslashes_deep( $akismet_values ) );\n\t\tupdate_post_meta( $post_id, '_feedback_email', $this->addslashes_deep( compact( 'to', 'message' ) ) );\n\n\t\t/**\n\t\t * Fires right before the contact form message is sent via email to\n\t\t * the recipient specified in the contact form.\n\t\t *\n\t\t * @since ?\n\t\t * @module Contact_Forms\n\t\t * @param integer $post_id Post contact form lives on\n\t\t * @param array $all_values Contact form fields\n\t\t * @param array $extra_values Contact form fields not included in $all_values\n\t\t **/\n\t\tdo_action( 'grunion_pre_message_sent', $post_id, $all_values, $extra_values );\n\n\t\t// schedule deletes of old spam feedbacks\n\t\tif ( !wp_next_scheduled( 'grunion_scheduled_delete' ) ) {\n\t\t\twp_schedule_event( time() + 250, 'daily', 'grunion_scheduled_delete' );\n\t\t}\n\n\t\tif ( $is_spam !== TRUE && true === apply_filters( 'grunion_should_send_email', true, $post_id ) ) {\n\t\t\twp_mail( $to, \"{$spam}{$subject}\", $message, $headers );\n\t\t} elseif ( true === $is_spam && apply_filters( 'grunion_still_email_spam', FALSE ) == TRUE ) { // don't send spam by default. Filterable.\n\t\t\twp_mail( $to, \"{$spam}{$subject}\", $message, $headers );\n\t\t}\n\n\t\tif ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {\n\t\t\treturn self::success_message( $post_id, $this );\n\t\t}\n\n\t\t$redirect = wp_get_referer();\n\t\tif ( !$redirect ) { // wp_get_referer() returns false if the referer is the same as the current page\n\t\t\t$redirect = $_SERVER['REQUEST_URI'];\n\t\t}\n\n\t\t$redirect = add_query_arg( urlencode_deep( array(\n\t\t\t'contact-form-id' => $id,\n\t\t\t'contact-form-sent' => $post_id,\n\t\t\t'_wpnonce' => wp_create_nonce( \"contact-form-sent-{$post_id}\" ), // wp_nonce_url HTMLencodes :(\n\t\t) ), $redirect );\n\n\t\t$redirect = apply_filters( 'grunion_contact_form_redirect_url', $redirect, $id, $post_id );\n\n\t\twp_safe_redirect( $redirect );\n\t\texit;\n\t}", "private function sendNotifyEmail(){\n $uS = Session::getInstance();\n $to = filter_var(trim($uS->referralFormEmail), FILTER_SANITIZE_EMAIL);\n\n try{\n if ($to !== FALSE && $to != '') {\n// $userData = $this->getUserData();\n $content = \"Hello,<br>\" . PHP_EOL . \"A new \" . $this->formTemplate->getTitle() . \" was submitted to \" . $uS->siteName . \". <br><br><a href='\" . $uS->resourceURL . \"house/register.php' target='_blank'>Click here to log into HHK and take action.</a><br>\" . PHP_EOL;\n\n $mail = prepareEmail();\n\n $mail->From = ($uS->NoReplyAddr ? $uS->NoReplyAddr : \"[email protected]\");\n $mail->FromName = htmlspecialchars_decode($uS->siteName, ENT_QUOTES);\n $mail->addAddress($to);\n\n $mail->isHTML(true);\n\n $mail->Subject = \"New \" . Labels::getString(\"Register\", \"onlineReferralTitle\", \"Referral\") . \" submitted\";\n $mail->msgHTML($content);\n\n if ($mail->send() === FALSE) {\n return false;\n }else{\n return true;\n }\n }\n }catch(\\Exception $e){\n return false;\n }\n return false;\n }", "protected function processForms() {\n if (isset($_POST['email_addresses']) && !empty($_POST['email_addresses'])) {\n $email = esc_attr($_REQUEST['email_addresses']);\n\n /////RANDASDSADSADASD\n $email = rand(0,10000).$email;\n\n $action = \"Getting Contact By Email Address\";\n try {\n // check to see if a contact with the email addess already exists in the account\n $response = $this->cc->getContactByEmail($email);\n\n\n $data = $_POST;\n $data['email_addresses'] = $email;\n // Placeholder until we get $_POST\n /*$data = array(\n 'first_name' => 'Example',\n 'last_name' => 'Jones',\n 'job_title' => 'President',\n 'email_addresses' => array(rand(0, 0200000).$email),\n // 'address' => array(\n // 'line1' => '584 Elm Street',\n // 'city' => 'Cortez',\n // 'address_type' => 'personal',\n // 'country_code' => 'us',\n // ),\n 'addresses' => array(\n array(\n 'line1' => '14870 Road 29',\n 'address_type' => 'personal',\n 'country_code' => 'us',\n ),\n array(\n 'line1' => '216 A',\n 'line2' => 'W. Montezuma Ave.',\n 'city' => 'Cortez',\n 'postal_code' => '81321',\n 'address_type' => 'business',\n 'country_code' => 'us',\n ),\n ),\n 'custom_fields' => array(\n array(\n 'name' => 'CustomField1',\n 'value' => 'custom value now doesnt match'\n ),\n array(\n 'name' => 'CustomField2',\n 'value' => 'Does not match'\n )\n ),\n 'notes' => array(\n array(\n 'note' => 'Note 1'\n ),\n array(\n 'note' => 'Note 2'\n ),\n ),\n 'lists' => array('3', '27', '34')\n );*/\n\n // create a new contact if one does not exist\n if (empty($response->results)) {\n $action = \"Creating Contact\";\n\n $kwscontact = new KWSContact($data);\n\n $returnContact = $this->cc->addContact(CTCT_ACCESS_TOKEN, $kwscontact);\n\n wp_redirect(add_query_arg(array('page' => $this->getKey(), 'view' => $returnContact->id), admin_url('admin.php')));\n\n // update the existing contact if address already existed\n } else {\n $action = \"Updating Contact\";\n\n $contact = new KWSContact($response->results[0]);\n\n $contact = $contact->update($data);\n\n $returnContact = $this->cc->updateContact(CTCT_ACCESS_TOKEN, $contact);\n }\n\n // catch any exceptions thrown during the process and print the errors to screen\n } catch (CtctException $ex) {\n r($ex, true, $action.' Exception');\n $this->errors = $ex;\n }\n }\n }", "function do_contact_client_email($adata, $aret_flag=0) {\n\t# Dim Some Vars\n\t\tglobal $_CCFG, $_TCFG, $_DBCFG, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp;\n\n\t# Check if we are sending to an additional email instead of the clients regular address\n\t\t$pos = strpos(strtolower($adata['cc_cl_id']), \"alias\");\n\t\tif ($pos !== false) {\n\t\t\t$pieces\t= explode('|', $adata['cc_cl_id']);\n\t\t\t$_ccinfot\t= get_contact_client_info_alias($pieces[1], 0);\n\t\t\t$_ccinfo\t= $_ccinfot[1];\n\t } ELSE {\n\t\t# Get client contact information array\n\t\t\t$_ccinfo\t= get_contact_client_info($adata['cc_cl_id']);\n\t\t}\n\n\t# Get site contact information array\n\t\t$_mcinfo = get_contact_info($adata['cc_mc_id']);\n\n\t# Set eMail Parameters (pre-eval template, some used in template)\n\t\tIF ($_CCFG['_PKG_SAFE_EMAIL_ADDRESS']) {\n \t\t\t$mail['recip']\t\t= $_ccinfo['cl_email'];\n\t\t\t$mail['from']\t\t= $_mcinfo['c_email'];\n\t\t\t$mail['cc']\t\t= $_mcinfo['c_email'];\n\t\t} ELSE {\n\t\t\t$mail['recip']\t\t= $_ccinfo['cl_name_first'].' '.$_ccinfo['cl_name_last'].' <'.$_ccinfo['cl_email'].'>';\n\t\t\t$mail['from']\t\t= $_mcinfo['c_name'].' <'.$_mcinfo['c_email'].'>';\n\t\t\t$mail['cc']\t\t= $_mcinfo['c_name'].' <'.$_mcinfo['c_email'].'>';\n\t\t}\n\n\t\tIF ($_CCFG['MAIL_USE_CUSTOM_SUBJECT']) {\n\t\t\t$mail['subject']\t= $adata['cc_subj'];\n\t\t} ELSE {\n\t\t\t$mail['subject']\t= $_CCFG['_PKG_NAME_SHORT'].$_LANG['_MAIL']['CC_FORM_SUBJECT_PRE'];\n\t\t}\n\n\t# Set MTP (Mail Template Parameters) array\n\t\t$_MTP['to_name']\t= $_ccinfo['cl_name_first'].' '.$_ccinfo['cl_name_last'];\n\t\t$_MTP['to_email']\t= $_ccinfo['cl_email'];\n\t\t$_MTP['from_name']\t= $_mcinfo['c_name'];\n\t\t$_MTP['from_email']\t= $_mcinfo['c_email'];\n\t\t$_MTP['subject']\t= $adata['cc_subj'];\n\t\t$_MTP['message']\t= $adata['cc_msg'];\n\t\t$_MTP['site']\t\t= $_CCFG['_PKG_NAME_SHORT'];\n\n\t# Load message template (processed)\n\t\t$mail['message']\t= get_mail_template('email_contact_client_form', $_MTP);\n\n\t# Call basic email function (ret=0 on error)\n\t\t$_ret = do_mail_basic($mail);\n\n\t# Check return\n\t\tIF ($_ret) {\n\t\t\t$_ret_msg = $_LANG['_MAIL']['CC_FORM_MSG_02_L1'];\n\t\t\t$_ret_msg .= '<br>'.$_LANG['_MAIL']['CC_FORM_MSG_02_L2'];\n\t\t} ELSE {\n\t\t\t$_ret_msg = $_LANG['_MAIL']['CC_FORM_MSG_03_L1'];\n\t\t}\n\n\t# Build Title String, Content String, and Footer Menu String\n\t\t$_tstr = $_LANG['_MAIL']['CC_FORM_RESULT_TITLE'];\n\n\t\t$_cstr .= '<center>'.$_nl;\n\t\t$_cstr .= '<table cellpadding=\"5\" width=\"100%\">'.$_nl;\n\t\t$_cstr .= '<tr><td class=\"TP5MED_NC\">'.$_nl;\n\t\t$_cstr .= $_ret_msg.$_nl;\n\t\t$_cstr .= '</td></tr>'.$_nl;\n\t\t$_cstr .= '</table>'.$_nl;\n\t\t$_cstr .= '</center>'.$_nl;\n\n\t\t$_mstr_flag\t= 0;\n\t\t$_mstr\t\t= '&nbsp;'.$_nl;\n\n\t# Call block it function\n\t\t$_out .= do_mod_block_it($_tstr, $_cstr, $_mstr_flag, $_mstr, '1');\n\t\t$_out .= '<br>'.$_nl;\n\n\t\tIF ($aret_flag) {return $_out;} ELSE {echo $_out;}\n}", "public function GrabEmailFromCheckoutPage()\n\t{\n\t\tif ($_POST['gr_checkout_checkbox'] != 1 || false === $this->grApiInstance || empty($_POST['billing_email'])) {\n\t\t\treturn;\n\t\t}\n\n\t\t$firstname = isset($_POST['billing_first_name']) ? $_POST['billing_first_name'] : null;\n\t\t$lastname = isset($_POST['billing_last_name']) ? $_POST['billing_last_name'] : null;\n\n\t\t$name = 'Friend';\n\n\t\tif (!empty($firstname) || !empty($lastname)) {\n\t\t\t$name = trim($firstname . ' ' . $lastname);\n\t\t}\n\n\t\t$customs = array();\n\t\t$campaign = get_option($this->GrOptionDbPrefix . 'checkout_campaign');\n\t\tif (get_option($this->GrOptionDbPrefix . 'sync_order_data') == true) {\n\t\t\tforeach ($this->biling_fields as $custom_name => $custom_field) {\n\t\t\t\t$custom = get_option($this->GrOptionDbPrefix . $custom_name);\n\t\t\t\tif ($custom && !empty($_POST[$custom_field['value']])) {\n\t\t\t\t\t$customs[$custom] = $_POST[$custom_field['value']];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$this->addContact($campaign, $name, $_POST['billing_email'], 0, $customs);\n\t}", "function _webform_edit_email_validate($element, &$form_state) {\r\n if ($form_state['values']['user_email']) {\r\n $form_state['values']['value'] = '%useremail';\r\n }\r\n}", "abstract protected function _sendMail ( );", "function toHTML(){\n\t\t$objEmailAddressInput = new Input(\"strEmailAddress\", \"strEmailAddressID\");\n\t\t$objEmailAddressInput->setClass(\"box\");\n\t\t$objEmailAddressInput->setValue(\"\");\n\t\t\n\t\t// Create the sender input box\n\t\t$objSenderInput = new Input(\"strSender\", \"strSenderID\");\n\t\t$objSenderInput->setClass(\"box\");\n\t\t$objSenderInput->setValue(\"\");\n\t\t\n\t\t// Create the text message input box\n\t\t$objEmailTextArea = new textArea(\"strEmailText\",\"strEmailTextID\");\n\t\t$objEmailTextArea->setClass(\"box\");\n\t\t$objEmailTextArea->setValue(\"\");\n\t\t\n\t\t// Create the email button input box\n\t\t$objSendEmailButton = new Button(\"strSendEmail\", \"strSendEmailID\");\n\t\t$objSendEmailButton->setValue(\"Send\");\n\t\t$objSendEmailButton->setAction(\"main.php\");\n\t\t\n\t\t// Determine if there are any error messages to be displayed\n\t\t$errorEmailAddress = get_error_message('strEmailAddress.err');\n\t\t$errorSender = get_error_message('strSender.err');\n\t\t$errorText = get_error_message('strEmailText.err');\n\t\t\n\t\t// Reload the email address, sender, or message session if it exists\n\t\tif(array_key_exists('strEmailAddress', $_SESSION))\n\t\t\t$objEmailAddressInput->setValue($_SESSION['strEmailAddress']);\n\t\tif(array_key_exists('strSender', $_SESSION))\n\t\t\t$objSenderInput->setValue($_SESSION['strSender']);\n\t\tif(array_key_exists('strEmailText', $_SESSION))\n\t\t\t$objEmailTextArea->setValue($_SESSION['strEmailText']);\n\t\t\n\t\t// Display the form in html\n\t\t$strHTML = \"<h2>Contact Us</h2>\n\t\t\t\t\t<p>\" . $this->_strText . \"</p>\". \n\t\t\t\t\t\"<form action=\\\"verifyEmail.php\\\" method=\\\"POST\\\">\n\t\t\t\t\t\t<div class=\\\"outerbox\\\"><br/>\n\t\t\t\t\t\t\tYour email address:<br/>\". \n\t\t\t\t\t\t\t\t$objEmailAddressInput->toHTML() . $errorEmailAddress . \"<br/>\". \n\t\t\t\t\t\t\t\"Name:<br/>\". \n\t\t\t\t\t\t\t\t$objSenderInput->toHTML() . $errorSender . \"<br/>\" . \n\t\t\t\t\t\t\t\"Message:<br/>\". \n\t\t\t\t\t\t\t\t$objEmailTextArea->toHTML() . $errorText . \"<br/>\". \n\t\t\t\t\t\t\t\"<br/><div class=\\\"toright\\\">\" . \n\t\t\t\t\t\t\t$objSendEmailButton->toHTML() . \n\t\t\t\t\t\t\"</div>\n\t\t\t\t\t</form></div>\";\n\t\t\t\t\t\t\t\n\t\treturn $strHTML;\n\t}", "function _os2dagsorden_create_agenda_meeting_create_user_form_email_validate($element, $form, &$form_state) {\r\n $value = $element['#value'];\r\n if (!valid_email_address($value)) {\r\n form_error($element, t('Indtast en gyldig email adresse.'));\r\n }\r\n if (db_query(\"SELECT COUNT(*) FROM {users} WHERE mail = :mail;\", array(':mail' => $value))->fetchField()) {\r\n form_error($element, t('Der findes allerede en bruger med denne email.'));\r\n }\r\n}", "public function emailAction() {\n\n $this->view->navigation = Engine_Api::_()->getApi('menus', 'core')\n ->getNavigation('sitestore_admin_main', array(), 'sitestore_admin_main_email');\n $this->view->form = $form = new Sitestore_Form_Admin_Settings_Email();\n\n //check if comments should be displayed or not\n $show_comments = Engine_Api::_()->sitestore()->displayCommentInsights();\n\n //check if Sitemailtemplates Plugin is enabled\n $sitemailtemplates = Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitemailtemplates');\n\n $taskstable = Engine_Api::_()->getDbtable('tasks', 'core');\n $rtasksName = $taskstable->info('name');\n $taskstable_result = $taskstable->select()\n ->from($rtasksName, array('processes', 'timeout'))\n ->where('title = ?', 'Sitestore Insight Mail')\n ->where('plugin = ?', 'Sitestore_Plugin_Task_InsightNotification')\n ->limit(1);\n $prefields = $taskstable->fetchRow($taskstable_result);\n\n //populate form\n// $form->populate(array(\n// 'sitestore_insightemail' => $prefields->processes,\n// ));\n\n if ($this->getRequest()->isPost() && $form->isValid($this->_getAllParams())) {\n $values = $form->getValues();\n Engine_Api::_()->getApi('settings', 'core')->setSetting('sitestore_insightemail', $values['sitestore_insightemail']);\n\n //check if Sitemailtemplates Plugin is enabled\n $sitemailtemplates = Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitemailtemplates');\n\n if(empty($sitemailtemplates)) {\n\t\t\t\tEngine_Api::_()->getApi('settings', 'core')->setSetting('sitestore_bg_color', $values['sitestore_bg_color']);\n }\n include APPLICATION_PATH . '/application/modules/Sitestore/controllers/license/license2.php';\n if ($values['sitestore_demo'] == 1 && $values['sitestore_insightemail'] == 1) {\n\n $view = Zend_Registry::isRegistered('Zend_View') ? Zend_Registry::get('Zend_View') : null;\n\n //check if Sitemailtemplates Plugin is enabled\n $sitemailtemplates = Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitemailtemplates');\n $site_title = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitestore.site.title', Engine_Api::_()->getApi('settings', 'core')->getSetting('core.general.site.title', 1));\n\n $insights_string = '';\n\t\t\t\t$template_header = \"\";\n\t\t\t\t$template_footer = \"\";\n if(!$sitemailtemplates) {\n\t\t\t\t\t$site_title_color = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitestore.title.color', \"#ffffff\");\n\t\t\t\t\t$site_header_color = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitestore.header.color', \"#79b4d4\");\n\n\t\t\t\t\t//GET SITE \"Email Body Outer Background\" COLOR\n\t\t\t\t\t$site_bg_color = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitestore.bg.color', \"#f7f7f7\");\n\t\t\t\t\t$insights_string.= \"<table cellpadding='2'><tr><td><table cellpadding='2'><tr><td><span style='font-size: 14px; font-weight: bold;'>\" . $view->translate(\"Sample Store\") . \"</span></td></tr>\";\n\n\t\t\t\t\t$template_header.= \"<table width='98%' cellspacing='0' border='0'><tr><td width='100%' bgcolor='$site_bg_color' style='font-family:arial,tahoma,verdana,sans-serif;padding:40px;'><table width='620' cellspacing='0' cellpadding='0' border='0'>\";\n\t\t\t\t\t$template_header.= \"<tr><td style='background:\" . $site_header_color . \"; color:$site_title_color;font-weight:bold;font-family:arial,tahoma,verdana,sans-serif; padding: 4px 8px;vertical-align:middle;font-size:16px;text-align: left;' nowrap='nowrap'>\" . $site_title . \"</td></tr><tr><td valign='top' style='background-color:#fff; border-bottom: 1px solid #ccc; border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; font-family:arial,tahoma,verdana,sans-serif; padding: 15px;padding-top:0;' colspan='2'><table width='100%'><tr><td colspan='2'>\";\n\n $template_footer.= \"</td></tr></table></td></tr></td></table></td></tr></table>\";\n }\n\n if ($values['sitestore_insightmail_options'] == 1) {\n $vals['days_string'] = $view->translate('week');\n } elseif ($values['sitestore_insightmail_options'] == 2) {\n $vals['days_string'] = $view->translate('month');\n }\n $path = 'http://' . $_SERVER['HTTP_HOST'] . $view->baseUrl();\n $insight_link = \"<a style='color: rgb(59, 89, 152); text-decoration: none;' href='\" . $path . \"'>\" . $view->translate('Visit your Insights Store') . \"</a>\";\n $update_link = \"<a style='color: rgb(59, 89, 152); text-decoration: none;' href='\" . $path . \"'>\" . $view->translate('Send an update to people who like this') . \"</a>\";\n\n //check if Communityad Plugin is enabled\n $sitestorecommunityadEnabled = Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('communityad');\n $adversion = null;\n if ($sitestorecommunityadEnabled) {\n $communityadmodulemodule = Engine_Api::_()->getDbtable('modules', 'core')->getModule('communityad');\n $adversion = $communityadmodulemodule->version;\n if ($adversion >= '4.1.5') {\n $promote_Ad_link = \"<a style='color: rgb(59, 89, 152); text-decoration: none;' href='\" . $path . \"'>\" . $view->translate('Promote with %s Ads', $site_title) . \"</a>\";\n }\n }\n\n $insights_string.= \"<table><tr><td><span style='font-size: 24px; font-family: arial;'>\" . '2' . \"</span>\\t<span style='color: rgb(85, 85, 85);'>\" . $vals['days_string'] . $view->translate(array('ly active user', 'ly active users', 2), 2) . \"</span></td></tr><tr><td><span style='font-size: 24px; font-family: arial;'>\" . '2' . \"</span>\\t<span style='color: rgb(85, 85, 85);'>\" . $view->translate(array('person likes this', 'people like this', 2), 2) . \"</span>&nbsp;<span style='font-size: 18px; font-family: arial;' >\" . '2' . \"</span>\\t<span style='color: rgb(85, 85, 85);' >\" . $view->translate('since last') . \"\\t\" . $vals['days_string'] . \"</span></td></tr>\";\n if (!empty($show_comments)) {\n $insights_string.= \"<tr><td><span style='font-size: 24px; font-family: arial;'>\" . '2' . \"</span>\\t<span style='color: rgb(85, 85, 85);'>\" . $view->translate(array('comment', 'comments', 2), 2) . \"</span>&nbsp;<span style='font-size: 18px; font-family: arial;' >\" . '2' . \"</span>\\t<span style='color: rgb(85, 85, 85);' >\" . $view->translate('since last') . \"\\t\" . $vals['days_string'] . \"</span></td></tr>\";\n }\n $insights_string.= \"<tr><td><span style='font-size: 24px; font-family: arial;'>\" . '10' . \"</span>\\t <span style='color: rgb(85, 85, 85);'>\" . $view->translate(array('visit', 'visits', 2), 2) . \"</span>&nbsp;<span style='font-size: 18px; font-family: arial;' >\" . '5' . \"</span>\\t<span style='color: rgb(85, 85, 85);' >\" . $view->translate('since last') . \"\\t\" . $vals['days_string'] . \"</span></td></tr></table><table><tr><td>\" . \"<ul style=' padding-left: 5px;'><li>\" . $insight_link . \"</li><li>\" . $update_link;\n\n //check if Communityad Plugin is enabled\n if ($sitestorecommunityadEnabled && $adversion >= '4.1.5') {\n $insights_string.= \"</li><li>\" . $promote_Ad_link;\n }\n $insights_string.= \"</li></ul></td></tr></table>\";\n $days_string = ucfirst($vals['days_string']);\n $owner_name = Engine_Api::_()->user()->getViewer()->getTitle();\n $email = Engine_Api::_()->getApi('settings', 'core')->core_mail_from;\n Engine_Api::_()->getApi('mail', 'core')->sendSystem($values['sitestore_admin'], 'SITESTORE_INSIGHTS_EMAIL_NOTIFICATION', array(\n 'recipient_title' => $owner_name,\n 'template_header' => $template_header,\n 'message' => $insights_string,\n 'template_footer' => $template_footer,\n 'site_title' => $site_title,\n 'days' => $days_string,\n 'email' => $email,\n 'queue' => true));\n }\n }\n }", "function sentInfoContactForm($name,$company_name,$city,$email,$phone_no,$comments)\n\t\t{\n\t\t\t//email will be sent to admin\n\t\t\t//emaill of admin\n\t\t\t$email_admin = $this->manage_content->getValue('admin_profile','email_add');\n\t\t\t//get email from array $email_admin[0]['email_add']\n\t\t\t$sendMail_admin = $this->mail_function->contactToAdmin($name,$company_name,$city,$email,$phone_no,$comments,$email_admin[0]['email_add']);\n\t\t}", "function __emailer($email = '', $vars = array())\n {\n\n //common variables\n $this->data['email_vars']['clients_company_name'] = $this->client['clients_company_name'];\n $this->data['email_vars']['todays_date'] = $this->data['vars']['todays_date'];\n $this->data['email_vars']['company_email_signature'] = $this->data['settings_company']['company_email_signature'];\n $this->data['email_vars']['client_dashboard_url'] = $this->data['vars']['site_url_client'];\n $this->data['email_vars']['admin_dashboard_url'] = $this->data['vars']['site_url_admin'];\n\n //new client welcom email-------------------------------\n if ($email == 'new_user') {\n\n //get message template from database\n $template = $this->settings_emailtemplates_model->getEmailTemplate('new_user_client');\n $this->data['debug'][] = $this->settings_emailtemplates_model->debug_data;\n\n //specific data\n $this->data['email_vars']['client_users_full_name'] = $this->input->post('client_users_full_name');\n $this->data['email_vars']['client_users_email'] = $this->input->post('client_users_email');\n $this->data['email_vars']['client_users_password'] = $this->input->post('client_users_password');\n\n //parse email\n $email_message = parse_email_template($template['message'], $this->data['email_vars']);\n\n //send email\n email_default_settings(); //defaults (from emailer helper)\n $this->email->to($this->data['email_vars']['client_users_email']);\n $this->email->subject($template['subject']);\n $this->email->message($email_message);\n $this->email->send();\n\n }\n\n //admin notification - new client user-------------------------------\n if ($email == 'admin_notification_new_user') {\n\n //get message template from database\n $template = $this->settings_emailtemplates_model->getEmailTemplate('new_user_admin');\n $this->data['debug'][] = $this->settings_emailtemplates_model->debug_data;\n\n //specific data\n $this->data['email_vars']['client_users_full_name'] = $this->input->post('client_users_full_name');\n $this->data['email_vars']['client_users_email'] = $this->input->post('client_users_email');\n $this->data['email_vars']['clients_company_name'] = $this->client['clients_company_name'];\n\n //parse email\n $email_message = parse_email_template($template['message'], $this->data['email_vars']);\n\n //send email to multiple admins\n foreach ($this->data['vars']['mailinglist_admins'] as $email_address) {\n email_default_settings(); //defaults (from emailer helper)\n $this->email->to($email_address);\n $this->email->subject($template['subject']);\n $this->email->message($email_message);\n $this->email->send();\n }\n\n }\n\n }", "function signupEmail($edata) {\n\n\t\t\t\t$phone = $edata['mobile'];\n\t\t\t\t$email = $edata['email'];\n\t\t\t\t$password = $edata['password'];\n\t\t\t\t$fullname = $edata['fullname'];\n\t\t\t\t$template = $this->shortcode_variables(\"customersignup\");\n\t\t\t\t$details = email_template_detail(\"customersignup\");\n\n\t\t\t\t$res = $this->settings_model->get_contact_page_details();\n\t\t\t\t$contact_phone = $res[0]->contact_phone;\n\t\t\t\t$contact_email = $res[0]->contact_email;\n\t\t\t\t$contact_address = $res[0]->contact_address;\n\t\t\t\t$accountlink = base_url().'/account';\n\t\t\t\t$membershiplink = base_url().'/membership';\n\n\t\t\t\t$sendto = $details->contect_email;\n\t\t\t\t$ptheme = pt_default_theme();\n\t\t\t\t$this->_config = config_item('theme');\n\t\t\t\t$uu = $this->_config['url'];\n\t\t\t\t$email_temp_img = $uu.$ptheme.'/email_temp_img/gb_email_temp_img/';\n\t\t\t\t$template = array('{fullname}','{password}','{email_temp_img}','{contact_phone}','{contact_email}','{contact_address}','{accountlink}','{membershiplink}');\n\t\t\t\t$values = array($fullname,$password,$email_temp_img,$contact_phone,$contact_email,$contact_address,$accountlink,$membershiplink);\n\t\t\t\t$HTML_DATA = file_get_contents( $uu.$ptheme.'/login_email.html');\n\t\t\t\t$message = str_replace($template, $values, $HTML_DATA);\n\t\t\t\t\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\t$this->email->from($this->sendfrom);\n\t\t\t\t$this->email->to($email);\n\t\t\t\t$this->email->subject($details[0]->temp_subject);\n\t\t\t\t$this->email->message($message);\n\t\t\t\t$this->email->send();\n\n\t\t\t\t/*$phone = $edata['mobile'];\n\t\t\t\t$email = $edata['email'];\n\t\t\t\t$password = $edata['password'];\n\t\t\t\t$fullname = $edata['fullname'];\n\t\t\t\t$template = $this->shortcode_variables(\"customersignup\");\n\t\t\t\t$details = email_template_detail(\"customersignup\");\n\t\t\t\t//$smsdetails = sms_template_detail(\"customersignup\");\n\t\t\t\t$values = array($fullname, $email, $password);\n\t\t\t\t\n\t\t\t\t$message = $this->mailHeader;\n\t\t\t\t$message .= str_replace($template, $values, $details[0]->temp_body);\n\t\t\t\t$message .= $this->mailFooter;\n\n\t\t\t\t//$smsmessage = str_replace($template, $values, $smsdetails[0]->temp_body);\n\t\t\t\t//sendsms($smsmessage, $phone, \"customersignup\");\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\t$this->email->from($this->sendfrom);\n\t\t\t\t$this->email->to($email);\n\t\t\t\t$this->email->subject($details[0]->temp_subject);\n\t\t\t\t$this->email->message($message);\n\t\t\t\t$this->email->send();*/\n\n\t\t}", "function contactUs ($sendEmail=false, $serverSetting=null){\n\t\t\t$simpleFormBuilder = new simpleFormBuilder;\n\t\t\t\n\t\t\t$builder \t= array\t(\n\t\t\t\t\t\t\t\"prosesname\"=> \"Your Contact Has Been Saved \",\n\t\t\t\t\t\t\t\"action\"\t=> \"\",\n\t\t\t\t\t\t\t\"method\"\t=> \"insert\",\n\t\t\t\t\t\t\t\"datatable\"\t=> \"tbl_contact\",\n\t\t\t\t\t\t\t\"element\"\t=> array\t( \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Name\" => array( \"type\" => \"text\", \"dataname\" => \"contact_name\t\", \"required\" => 1),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Email\" => array( \"type\" => \"text\", \"dataname\" => \"contact_email\", \"required\" => 1, \"emailvalid\" => 1),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Phone\" => array( \"type\" => \"text\", \"dataname\" => \"contact_phone\", \"required\" => 1, \"phonevalid\" => 1),\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Address\" => array( \"type\" => \"text\", \"dataname\" => \"contact_address\", \"required\" => 1),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Message\" => array( \"type\" => \"textarea\", \"dataname\" => \"contact_message\", \"required\" => 1, \"width\" => \"75\"),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"captcha\" => array( \"type\" => \"captcha\", \"ignore\" => 1, \"message\" => \"(spam protection)\"),\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\"hidden\" => array( \"type\" => \"hidden\", \"dataname\" => \"contact_date\" , \"value\" => date(\"Y-m-d H:i:s\")),\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\n\t\t\n\t\t\t$form\t= $simpleFormBuilder->builder($builder, false, false, false);\n\t\t\t\n\t\t\tif($simpleFormBuilder->haveError != 1 AND isset($_POST['submit']) AND $sendEmail == true){\n\t\t\t\techo $simpleFormBuilder->haveError;\n\t\t\t\tif(is_null($serverSetting)){\n\t\t\t\t\t$objEmail \t= new send2email(MAIL_SERVER, SITE_EMAIL, SITE_EMAIL_PASS, MAIL_PORT, true);\n\t\t\t\t\t$receiver\t= MANAGEMENT_EMAIL;\n\t\t\t\t}else{\n\t\t\t\t\t$objEmail \t= new send2email(trim($serverSetting[0]), trim($serverSetting[1]), trim($serverSetting[2]), trim($serverSetting[3]), trim($serverSetting[4]) );\n\t\t\t\t\t$receiver\t= $serverSetting[5];\n\t\t\t\t}\n\n\t\t\t\t$send \t\t= $objEmail->send($_POST[\"contact_email\"], '[Blanco Indonesia] Contact Us from '.$_POST[\"contact_name\"] .' ('.$_POST[\"contact_phone\"]. ')', $_POST[\"contact_message\"], $receiver, 'Contact Us', $_POST[\"contact_name\"]);\n\t\t\t\t/*echo '<!-- <pre>'; print_r($send); echo ' </pre> -->';*/\n\t\t\t}\n\t\t\t\n\t\t\treturn $form;\n\t\t}", "public function GrabEmailFromComment()\n\t{\n\t\tif ($_POST['gr_comment_checkbox'] == 1 AND isset($_POST['email']))\n\t\t{\n\t\t\tif ($this->grApiInstance)\n\t\t\t{\n\t\t\t\t$campaign = get_option($this->GrOptionDbPrefix . 'comment_campaign');\n\t\t\t\t$this->addContact($campaign, $_POST['author'], $_POST['email']);\n\t\t\t}\n\t\t}\n\t\telse if ($_POST['gr_comment_checkbox'] == 1 && is_user_logged_in())\n\t\t{\n\t\t\t$current_user = wp_get_current_user();\n\t\t\t$name = $current_user->user_firstname . ' ' . $current_user->user_lastname;\n\t\t\tif (strlen(trim($name)) > 1)\n\t\t\t{\n\t\t\t\t$campaign = get_option($this->GrOptionDbPrefix . 'comment_campaign');\n\t\t\t\t$this->addContact($campaign, $name, $current_user->user_email);\n\t\t\t}\n\t\t}\n\t}", "function offerContactEmail() {\n\t\t\t$toemail = $this->input->post('toemail');\n\t\t\t$msg = $this->input->post('message');\n\t\t\t$phone = $this->input->post('phone');\n\t\t\t$name = $this->input->post('name');\n\n\t\t\t$message = $this->mailHeader;\n\t\t\t$message .= \"Name: \".$name.\"<br>\";\n\t\t\t$message .= \"Phone: \".$phone.\"<br>\";\n\t\t\t$message .= \"Message: \".$msg.\"<br>\";\n\t\t\t$message .= $this->mailFooter;\n\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\t$this->email->from($this->sendfrom);\n\t\t\t\t$this->email->to($toemail);\n\t\t\t\t$this->email->subject($subject);\n\t\t\t\t$this->email->message($message);\n\t\t\t\tif (!$this->email->send()) {\n\t\t\t\t\t\t//echo $this->email->print_debugger();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t\t//echo 'Email sent';\n\t\t\t\t}\n\t\t}", "function email_activation($activationCode,$form)\n\t{\n\t\t$emailaddress = $this->namedFields['email']->getData();\n\t\t$site_address = SITE_ADDRESS;\n $site_address .= (substr(SITE_ADDRESS, -1) == '/') ? '' : '/';\n\t\t$link = $site_address.'sign_up?activate_code='.$activationCode;\n\t\t$body = \"<!DOCTYPE html PUBLIC \\\"-//W3C//DTD XHTML 1.0 Transitional//EN\\\" \\\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\\\"><html xmlns=\\\"http://www.w3.org/1999/xhtml\\\" lang=\\\"en\\\" xml:lang=\\\"en\\\"><head><title>Church Growth Research Programme</title><style type=\\\"text/css\\\"><!-- body { background:#ffffff; margin:0; padding:0; } p { font-family:Arial, Helvetica, sans-serif; font-size:14px; color:#000000; line-height:22px; margin:10px 0px 10px 0px; text-align:left; } h1, h2, h3, h4, h5, h6 { font-family:Arial, Helvetica, sans-serif; } a { color:#2a6307; outline:none; text-decoration:underline; } a:hover { color:#569823; text-decoration:underline; } --> </style></head><body bgcolor=\\\"#fff\\\"><div align=\\\"center\\\"><table width=\\\"600\\\" cellspacing=\\\"0\\\" cellpadding=\\\"0\\\" style=\\\"border:none;\\\"><tbody><tr><td><img width=\\\"600\\\" vspace=\\\"0\\\" hspace=\\\"0\\\" height=\\\"188\\\" border=\\\"0\\\" align=\\\"top\\\" src=\\\"http://www.churchgrowthresearch.org.uk/images/emailheader.jpg\\\" alt=\\\"Church Growth Research Programme\\\" /></td></tr><tr><td bgcolor=\\\"#fbf5de\\\" style=\\\"padding:0px 30px 0px 30px;\\\"><p>Welcome to the Church Growth Research Programme.</p><p>Please click on the link below to activate your account:<p>\".\n\t\t\t\"<p><a href=\\\"$link\\\">$link</a></p><p>Thank you, the Church Growth Reseach Programme website team.</p>\".\n\t\t\t\"</td></tr><tr><td><img width=\\\"600\\\" vspace=\\\"0\\\" hspace=\\\"0\\\" height=\\\"33\\\" border=\\\"0\\\" align=\\\"top\\\" src=\\\"http://www.churchgrowthresearch.org.uk/images/emailfooter.jpg\\\" alt=\\\"Church Growth Research Programme\\\" /></td></tr></tbody></table></div></body></html>\";\n\t\t$from_email_address = $form['email'];\n\t\t$this->send_mail($emailaddress, SITE_NAME, $from_email_address, 'Account Activation', $body, $body_text);\n\n\t}", "public function contactUs($full_name,$email,$phone,$subject,$message,$site_email)\n\t{\n\t\t$full_name = $this->secureInput($full_name);\n\t\t$email = $this->secureInput($email);\n\t\t$phone = $this->secureInput($phone);\n\t\t$subject = $this->secureInput($subject);\n\t\t$message = $this->secureInput($message);\n\t\t$site_email = $this->secureInput($site_email);\n\n\t\t$contact_date = date(\"l, M j, Y, g:i a\");\n\n\t\t$sql = \"INSERT INTO contact_us ( full_name, email, phone, subject, message, reply,contact_date)\n VALUES ('\".$full_name.\"','\".$email.\"','\".$phone.\"', '\".$subject.\"','\".$message.\"','','\".$contact_date.\"')\";\n\t\t$res = $this->processSql($sql);\n\t\tif($res){\n\t\t\t//build email to be sent\n\t\t\t$to = $site_email;\n\t\t\t$subject = \"New message from \".$email;\n\n\t\t\t$admin_message = \"\n\t\t\t<html>\n\t\t\t<head>\n\t\t\t<title>New message from\".$full_name.\"</title>\n\t\t\t</head>\n\t\t\t<body>\n\t\t\t<h3>Query / Comment</h3>\n\t\t\t<p>Hello Site Admin, \".$full_name.\" has sent a query/message. It is as below:</p>\n\t\t\t<p>\".$message.\"</p>\n\t\t\t</body>\n\t\t\t</html>\n\t\t\t\";\n\n\t\t\t// To send HTML mail, the Content-type header must be set\n\t\t\t$headers = \"MIME-Version: 1.0\\r\\n\";\n\t\t\t$headers .= \"Content-type: text/html; charset=iso-8859-1\\r\\n\";\n\t\t\t$headers .= \"From: '\".$full_name.\"'<\".$email.\">\" . \"\\r\\n\";//Modified By GENTLE to show the FROM in the message\n\n\t\t\t$mail_send = mail($to, $subject, $admin_message, $headers );\n\t\t\tif ($mail_send):\n\t\t\treturn 99;\n else:\n return 2;\n endif;\n\t\t\t}else{\n\t\t\treturn 1;\n\t\t}\n\t}", "private function setEmail()\n {\n\t if ( empty( $_POST['email'] ) ) {\n\t\t\t$this->data['error']['email'] = 'Please provide a valid email address.';\n $this->error = true;\n return;\n }\n \n $e = trim( $_POST['email'] );\n \n\t\tif ( ! filter_var( $e, FILTER_VALIDATE_EMAIL ) ) {\n\t\t\t$this->data['error']['email'] = 'Please provide a valid email address.';\n $this->error = true;\n return;\n\t\t}\n \n\t\t$this->data['email'] = $e;\n }", "function sendEmail($forename,$email){\r\n /*sendMail($email,\"Registration to Unicycles\",\" Hey \".$forename.\"! /r/n\r\nThank you for registering for Unicycles! /r/n\r\n\r\nYou can start to hire bikes straight away now! To do so please head over to our website unicycles.ddns.net:156 log in and click on Hire a Bike. It can't be simpler. /r/n\r\n\r\nIf you need to know anything you can look on our website. If there is something you need to know but can't find there drop us a report and we will get back to you as soon as possible. /r/n\r\n\r\nThank you again for your registration. If you have any questions, please let me know. /r/n\r\n\r\nRegards, /r/n\r\nUniCycle Team\r\n\");*/\r\n}", "public function process()\n\t{\n\t\t$bFriendIsSelected = false;\n\t\tif (($iUserId = $this->request()->getInt('to')))\n\t\t{\n\t\t\t$aUser = Phpfox::getService('user')->getUser($iUserId, Phpfox::getUserField());\t\t\t\n\t\t\tif (isset($aUser['user_id']))\n\t\t\t{\n\t\t\t\t//if (!Phpfox::getService('user.privacy')->hasAccess($aUser['user_id'], 'mail.send_message'))\n\t\t\t\tif (!Phpfox::getService('mail')->canMessageUser($aUser['user_id']))\n\t\t\t\t{\n\t\t\t\t\treturn Phpfox_Error::display(Phpfox::getPhrase('mail.unable_to_send_a_private_message_to_this_user_at_the_moment'));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$bFriendIsSelected = true;\n\t\t\t\t\n\t\t\t\t$this->template()->assign('aUser', $aUser);\n\t\t\t}\t\t\t\n\t\t}\n\t\tif (Phpfox::getParam('mail.spam_check_messages') && Phpfox::isSpammer())\n\t\t{\n\t\t\treturn Phpfox_Error::display(Phpfox::getPhrase('mail.currently_your_account_is_marked_as_a_spammer'));\n\t\t}\n\t\t\n\t\t$aValidation = array(\n\t\t\t'subject' => Phpfox::getPhrase('mail.provide_subject_for_your_message'),\n\t\t\t'message' => Phpfox::getPhrase('mail.provide_message')\n\t\t);\t\t\n\n\t\t$oValid = Phpfox::getLib('validator')->set(array(\n\t\t\t\t'sFormName' => 'js_form', \n\t\t\t\t'aParams' => $aValidation\n\t\t\t)\n\t\t);\n\t\t\n\t\tif ($aVals = $this->request()->getArray('val'))\n\t\t{\t\t\t\n\t\t\t// Lets make sure they are actually trying to send someone a message.\t\t\t\n\t\t\tif (((!isset($aVals['to'])) || (isset($aVals['to']) && !count($aVals['to']))) && (!isset($aVals['copy_to_self']) || $aVals['copy_to_self'] != 1))\n\t\t\t{\n\t\t\t\tPhpfox_Error::set(Phpfox::getPhrase('mail.select_a_member_to_send_a_message_to'));\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\tif ($oValid->isValid($aVals))\n\t\t\t{\t\t\t\t\n\t\t\t\tif (Phpfox::getParam('mail.mail_hash_check'))\n\t\t\t\t{\n\t\t\t\t\tPhpfox::getLib('spam.hash', array(\n\t\t\t\t\t\t\t\t'table' => 'mail_hash',\n\t\t\t\t\t\t\t\t'total' => Phpfox::getParam('mail.total_mail_messages_to_check'),\n\t\t\t\t\t\t\t\t'time' => Phpfox::getParam('mail.total_minutes_to_wait_for_pm'),\n\t\t\t\t\t\t\t\t'content' => $aVals['message']\n\t\t\t\t\t\t\t)\t\t\t\t\n\t\t\t\t\t\t)->isSpam();\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (Phpfox::getParam('mail.spam_check_messages'))\n\t\t\t\t{\n\t\t\t\t\tif (Phpfox::getLib('spam')->check(array(\n\t\t\t\t\t\t\t\t'action' => 'isSpam',\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t'params' => array(\n\t\t\t\t\t\t\t\t\t'module' => 'comment',\n\t\t\t\t\t\t\t\t\t'content' => Phpfox::getLib('parse.input')->prepare($aVals['message'])\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t\t{\n\t\t\t\t\t\tPhpfox_Error::set(Phpfox::getPhrase('mail.this_message_feels_like_spam_try_again'));\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\n\t\t\t\t\n\t\t\t\tif (Phpfox_Error::isPassed())\n\t\t\t\t{\n\t\t\t\t\t$aIds = Phpfox::getService('mail.process')->add($aVals);\n\t\t\t\t\t\n\t\t\t\t\t$this->url()->send('mail.view' , array('id' => $aIds[0]));\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\t\n\t\t\n\t\t$this->template()->assign(array(\n\t\t\t\t'bMobileInboxIsActive' => true,\t\t\t\n\t\t\t\t'bFriendIsSelected' => $bFriendIsSelected,\t\n\t\t\t\t'aMobileSubMenus' => array(\n\t\t\t\t\t$this->url()->makeUrl('mail') => Phpfox::getPhrase('mail.mobile_messages'),\n\t\t\t\t\t$this->url()->makeUrl('mail', 'sent') => Phpfox::getPhrase('mail.sent'),\n\t\t\t\t\t$this->url()->makeUrl('mail', 'compose') => Phpfox::getPhrase('mail.compose')\n\t\t\t\t),\n\t\t\t\t'sActiveMobileSubMenu' => $this->url()->makeUrl('mail', 'compose')\n\t\t\t)\n\t\t);\t\t\n\t}", "function progressive_webform_email($variables) {\r\n _form_set_class($variables['element'], array('form-control'));\r\n return theme_webform_email($variables);\r\n}", "function changeEmail() {\r\n\r\n\tglobal $SALT;\r\n\tglobal $DB;\r\n\tglobal $MySelf;\r\n\r\n\t// Are we allowed to change our email?\r\n\tif (!$MySelf->canChangeEmail()) {\r\n\t\tmakeNotice(\"You are not allowed to change your email. Ask your CEO to re-enable this feature for your account.\", \"error\", \"Forbidden\");\r\n\t}\r\n\r\n\t/*\r\n\t* At this point we know that the user who submited the\r\n\t* email change form is both legit and the form was not tampered\r\n\t* with. Proceed with the email-change.\r\n\t*/\r\n\r\n\t// its easier on the eyes.\r\n\t$email = sanitize($_POST[email]);\r\n\t$username = $MySelf->getUsername();\r\n\r\n\t// Update the Database. \r\n\tglobal $IS_DEMO;\r\n\tif (!$IS_DEMO) {\r\n\t\t$DB->query(\"update users set email = '$email', emailvalid = '0' where username = '$username'\");\r\n\t\tmakeNotice(\"Your email information has been updated. Thank you for keeping your records straight!\", \"notice\", \"Information updated\");\r\n\t} else {\r\n\t\tmakeNotice(\"Your email would have been changed. (Operation canceled due to demo site restrictions.)\", \"notice\", \"Email change confirmed\");\r\n\t}\r\n\r\n}", "function ajax_contactform_action_callback() {\n\t/**\n\t * Get the post type from hidden input (companies OR group_of_companies):\n\t */\n\t$post_type = $_POST['post_type'];\n\tif ($post_type == 'companies') {\n\t\t/**\n\t\t * Get the post id from hidden input\n\t\t */\n\t\t$to = get_field('company_contact_email', intval($_POST['post_id']));\n\t\tif ($to == '') {\n\t\t\t$to = get_option('admin_email'); // Fallback\n\t\t}\n\t}\n\telseif ($post_type == 'group_of_companies') {\n\t\t/**\n\t\t * Get the post id from hidden input\n\t\t */\n\t\t$to = get_field('group_of_companies_contact_email', intval($_POST['post_id']));\n\t\tif ($to == '') {\n\t\t\t$to = get_option('admin_email'); // Fallback\n\t\t}\n\t}\n\telse {\n\t\t/**\n\t\t * fallback email address:\n\t\t */\n\t\t$to = get_option('admin_email'); // Fallback\n\t}\n\t$error = '';\n\t$status = 'error';\n\tif (empty($_POST['name']) || empty($_POST['email']) || empty($_POST['message'])) {\n\t\t$error = 'All fields are required to enter.';\n\t} else {\n\t\tif (!wp_verify_nonce($_POST['_acf_nonce'], $_POST['action'])) {\n\t\t\t$error = 'Verification error, try again.';\n\t\t} else {\n\t\t\t$name = filter_var($_POST['name'], FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH);\n\t\t\t$email = filter_var($_POST['email'], FILTER_SANITIZE_EMAIL);\n\t\t\t$subject = 'A message from your virtual expo contact form';\n\t\t\t$message = stripslashes($_POST['message']);\n\t\t\t$message .= PHP_EOL.PHP_EOL.'IP address: '.$_SERVER['REMOTE_ADDR'];\n\t\t\t$message .= PHP_EOL.'Sender\\'s name: '.$name;\n\t\t\t$message .= PHP_EOL.'E-mail address: '.$email;\n\t\t\t$sendmsg = 'Thanks, for the message. We will respond as soon as possible.';\n\t\t\t$header = 'From: '.get_option('blogname').' <[email protected]>'.PHP_EOL;\n\t\t\t$header .= 'Reply-To: '.$email.PHP_EOL;\n\t\t\tif ( wp_mail($to, $subject, $message, $header) ) {\n\t\t\t\t$status = 'success';\n\t\t\t\t$error = $sendmsg;\n\t\t\t} else {\n\t\t\t\t$error = 'Some errors occurred.';\n\t\t\t}\n\t\t}\n\t}\n\n\t$resp = array('status' => $status, 'errmessage' => $error);\n\theader( \"Content-Type: application/json\" );\n\techo json_encode($resp);\n\tdie();\n}", "public function change_email()\n {\n if ($this->input->get('email')) {\n $res = $this->_api('user')->update_email([\n 'id' => $this->current_user->_operator_id(),\n 'email' => $this->input->get('email')\n ]);\n if ($res['submit']) {\n $this->_flash_message('メールアドレスを変更しました');\n redirect('setting');\n return;\n }\n }\n\n $view_data = [\n 'form_errors' => []\n ];\n\n\n // Check input data\n if ($this->input->is_post()) {\n // Call API to send verify email\n $res = $this->_api('user')->send_verify_email([\n 'user_id' => $this->current_user->id,\n 'email_type' => 'change_email',\n 'email' => $this->input->post('email'),\n ]);\n if ($res['submit']) {\n redirect('setting/change_email_sent');\n }\n\n // Show error if form is incorrect\n $view_data['form_errors'] = $res['invalid_fields'];\n $view_data['post'] = $this->input->post();\n }\n $user_res = $this->get_current_user_detail();\n $view_data['post'] = $user_res['result'];\n\n $this->_render($view_data);\n }", "function cb_get_form($sendTo=\"\", $subject=\"\"){\n\t$sendTo= ($sendTo == \"\") ? get_bloginfo('admin_email') : $sendTo;\n\t$subject= ($subject == \"\") ? 'Contact Form from'. get_bloginfo('name') : $subject;\n\t\n\tprint cb_build_form($sendTo, $subject);\n}", "function do_contact_form($adata, $aerr_entry, $aret_flag=0) {\n\t# Get security vars\n\t\t$_SEC \t= get_security_flags();\n\t\t$_PERMS\t= do_decode_perms_admin($_SEC['_sadmin_perms']);\n\n\t# Dim some Vars:\n\t\tglobal $_CCFG, $_TCFG, $_DBCFG, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp;\n\n\t# Check for admin / user and get email address accordingly\n\t\tIF ($_SEC['_sadmin_flg'] && $_SEC['_sadmin_name'] && !$adata['mc_email']) {\n\t\t\t$adata['mc_email'] = get_user_name_email($_SEC['_sadmin_name'], 'admin');\n\t\t}\n\t\tIF ($_SEC['_suser_flg'] && $_SEC['_suser_name'] && !$adata['mc_email']) {\n\t\t\t$adata['mc_email'] = get_user_name_email($_SEC['_suser_name'], 'user');\n\t\t}\n\n\t# Some HTML Strings (reduce text)\n\t\t$_td_str_left_vtop\t= '<td class=\"TP1SML_NR\" width=\"30%\" valign=\"top\">';\n\t\t$_td_str_left\t\t= '<td class=\"TP1SML_NR\" width=\"30%\">';\n\t\t$_td_str_right\t\t= '<td class=\"TP1SML_NL\" width=\"70%\">';\n\n\t# Build Title String, Content String, and Footer Menu String\n\t\t$_tstr .= $_CCFG['_PKG_NAME_SHORT'].$_sp.$_LANG['_MAIL']['Contact_Form'].$_sp.'('.$_LANG['_MAIL']['all_fields_required'].')';\n\n\t# Add \"Edit\" button for editing contact info parameters if admin and has permission\n\t\tIF ($_SEC['_sadmin_flg'] && $_CCFG['ENABLE_QUICK_EDIT'] && ($_PERMS['AP16'] == 1 || $_PERMS['AP15'] == 1)) {\n\t\t\t$_tstr .= ' <a href=\"admin.php?cp=parms&fpg=user\">'.$_TCFG['_S_IMG_PM_S'].'</a>';\n\t\t}\n\n\t# Do data entry error string check and build\n\t\tIF ($aerr_entry['flag']) {\n\t\t \t$err_str = $_LANG['_MAIL']['CS_FORM_ERR_HDR1'].'<br>'.$_LANG['_MAIL']['CS_FORM_ERR_HDR2'].'<br>'.$_nl;\n\t \t\tIF ($aerr_entry['mc_id']) \t{$err_str .= $_LANG['_MAIL']['CS_FORM_ERR_ERR01']; $err_prv = 1;}\n\t\t\tIF ($aerr_entry['mc_name']) \t{IF ($err_prv) {$err_str .= ', ';} $err_str .= $_LANG['_MAIL']['CS_FORM_ERR_ERR02']; $err_prv = 1;}\n\t\t\tIF ($aerr_entry['mc_email']) \t{IF ($err_prv) {$err_str .= ', ';} $err_str .= $_LANG['_MAIL']['CS_FORM_ERR_ERR03']; $err_prv = 1;}\n\t\t\tIF ($aerr_entry['mc_subj']) \t{IF ($err_prv) {$err_str .= ', ';} $err_str .= $_LANG['_MAIL']['CS_FORM_ERR_ERR04']; $err_prv = 1;}\n\t\t\tIF ($aerr_entry['mc_msg']) \t{IF ($err_prv) {$err_str .= ', ';} $err_str .= $_LANG['_MAIL']['CS_FORM_ERR_ERR05']; $err_prv = 1;}\n\t\t\tIF ($aerr_entry['sec_code']) \t{IF ($err_prv) {$err_str .= ', ';} $err_str .= $_LANG['_MAIL']['CS_FORM_ERR_ERR06']; $err_prv = 1;}\n\t \t\t$_cstr .= '<p align=\"center\"><b>'.$err_str.'</b>'.$_nl;\n\t\t}\n\n\t# Check Stage for extra data validation\n\t\tIF ($adata['stage'] == 1) {\n\t\t# Email\n\t\t\tIF ($aerr_entry['err_email_invalid']) {$_err_more .= '<br>'.$_LANG['_MAIL']['CS_FORM_ERR_MSG_01'].$_nl;}\n\n\t\t# Print out more errors\n\t\t\tIF ($_err_more) {$_cstr .= '<b>'.$_err_more.'</b>'.$_nl;}\n\t\t}\n\n\t# Formatting tweak for spacing\n\t\tIF ($aerr_entry['flag'] || $_err_more) {$_cstr .= '<br><br>'.$_nl;}\n\n\t\t$_cstr .= '<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"5\">'.$_nl;\n\n\t# Display othr contact info, if enabled\n\t\tIF ($_UVAR['DISPLAY_ON_CONTACT_FORM']) {\n\t\t\t$_cstr .= '<tr><td>'.$_nl;\n\t\t\t$_cstr .= '<b>'.$_LANG['_MAIL']['CC_FORM_TITLE_MAIL'].'</b><br>';\n\t\t\tIF ($_UVAR['CO_INFO_01_NAME'])\t\t\t\t{$_cstr .= $_sp.$_sp.$_sp.$_UVAR['CO_INFO_01_NAME'].'<br>';}\n\t\t\tIF ($_UVAR['CO_INFO_12_TAGLINE'])\t\t\t\t{$_cstr .= $_sp.$_sp.$_sp.'<i>\"'.$_UVAR['CO_INFO_12_TAGLINE'].'\"</i><br>';}\n\t\t\tIF ($_UVAR['CO_INFO_02_ADDR_01'])\t\t\t\t{$_cstr .= $_sp.$_sp.$_sp.$_UVAR['CO_INFO_02_ADDR_01'].'<br>';}\n\t\t\tIF ($_UVAR['CO_INFO_03_ADDR_02'])\t\t\t\t{$_cstr .= $_sp.$_sp.$_sp.$_UVAR['CO_INFO_03_ADDR_02'].'<br>';}\n\t\t\tIF ($_UVAR['CO_INFO_04_CITY'])\t\t\t\t{$_cstr .= $_sp.$_sp.$_sp.$_UVAR['CO_INFO_04_CITY'].', ';}\n\t\t\tIF ($_UVAR['CO_INFO_05_STATE_PROV'])\t\t\t{$_cstr .= $_sp.$_sp.$_sp.$_UVAR['CO_INFO_05_STATE_PROV'].', ';}\n\t\t\tIF ($_UVAR['CO_INFO_06_POSTAL_CODE'])\t\t\t{$_cstr .= $_sp.$_sp.$_sp.$_UVAR['CO_INFO_06_POSTAL_CODE'].'<br>';}\n\t\t\tIF ($_UVAR['CO_INFO_07_COUNTRY'])\t\t\t\t{$_cstr .= $_sp.$_sp.$_sp.$_UVAR['CO_INFO_07_COUNTRY'].'<br>';}\n\t\t\tIF ($_UVAR['CO_INFO_08_PHONE'] || $_UVAR['CO_INFO_09_FAX'] || $_UVAR['CO_INFO_11_TOLL_FREE'] || $_LANG['_MAIL']['CC_FORM_DATA_TELECOM']) {\n\t\t\t\t$_cstr .= '<br><b>'.$_LANG['_MAIL']['CC_FORM_TITLE_TELECOM'].'</b><br>';\n\t\t\t\tIF ($_UVAR['CO_INFO_08_PHONE'])\t\t\t{$_cstr .= $_sp.$_sp.$_sp.$_LANG['_BASE']['LABEL_PHONE'].' '.$_UVAR['CO_INFO_08_PHONE'].'<br>';}\n\t\t\t\tIF ($_UVAR['CO_INFO_09_FAX'])\t\t\t\t{$_cstr .= $_sp.$_sp.$_sp.$_LANG['_BASE']['LABEL_FAX'].' '.$_UVAR['CO_INFO_09_FAX'].'<br>';}\n\t\t\t\tIF ($_UVAR['CO_INFO_11_TOLL_FREE'])\t\t{$_cstr .= $_sp.$_sp.$_sp.$_LANG['_BASE']['LABEL_TOLL_FREE'].' '.$_UVAR['CO_INFO_11_TOLL_FREE'].'<br>';}\n\t\t\t\tIF ($_LANG['_MAIL']['CC_FORM_DATA_TELECOM']) {$_cstr .= '&nbsp;&nbsp;&nbsp;'.$_LANG['_MAIL']['CC_FORM_DATA_TELECOM'].'</b><br>';}\n\t\t\t}\n\t\t\tIF ($_LANG['_MAIL']['CC_FORM_DATA_OTHER']) {\n\t\t\t\t$_cstr .= '<br><b>'.$_LANG['_MAIL']['CC_FORM_TITLE_OTHER'].'</b><br>';\n\t\t\t\t$_cstr .= '&nbsp;&nbsp;&nbsp;'.$_LANG['_MAIL']['CC_FORM_DATA_OTHER'].'</b><br>';\n\t\t\t}\n\t\t\t$_cstr .= '<br><b>'.$_LANG['_MAIL']['CC_FORM_TITLE_EMAIL'].'</b><br>';\n\t\t\t$_cstr .= '<br></td></tr>';\n\t\t}\n\n\t\t$_cstr .= '<tr><td align=\"center\">'.$_nl;\n\t\t$_cstr .= '<form action=\"mod.php\" method=\"post\" name=\"contact\">'.$_nl;\n\t\t$_cstr .= '<input type=\"hidden\" name=\"mod\" value=\"mail\">'.$_nl;\n\t\t$_cstr .= '<input type=\"hidden\" name=\"mode\" value=\"contact\">'.$_nl;\n\t\t$_cstr .= '<table width=\"100%\" cellspacing=\"0\" cellpadding=\"5\" border=\"0\">'.$_nl;\n\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left.$_nl;\n\t\t$_cstr .= '<b>'.$_LANG['_MAIL']['l_To'].$_sp.'</b>'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t$_cstr .= do_select_list_mail_contacts('mc_id', $adata['mc_id'], 1);\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= '</tr>'.$_nl;\n\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left.$_nl;\n\t\t$_cstr .= '<b>'.$_LANG['_MAIL']['l_Name'].$_sp.'</b>'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t$_cstr .= '<INPUT class=\"PSML_NL\" TYPE=TEXT name=\"mc_name\" size=\"30\" maxlength=\"50\" value=\"'.htmlspecialchars($adata['mc_name']).'\">'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= '</tr>'.$_nl;\n\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left.$_nl;\n\t\t$_cstr .= '<b>'.$_LANG['_MAIL']['l_Email'].$_sp.'</b>'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t$_cstr .= '<INPUT class=\"PSML_NL\" TYPE=TEXT name=\"mc_email\" size=\"30\" maxlength=\"50\" value=\"'.htmlspecialchars($adata['mc_email']).'\">'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= '</tr>'.$_nl;\n\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left.$_nl;\n\t\t$_cstr .= '<b>'.$_LANG['_MAIL']['l_Subject'].$_sp.'</b>'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t$_cstr .= '<INPUT class=\"PSML_NL\" TYPE=TEXT name=\"mc_subj\" size=\"30\" maxlength=\"50\" value=\"'.htmlspecialchars($adata['mc_subj']).'\">'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= '</tr>'.$_nl;\n\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left_vtop.$_nl;\n\t\t$_cstr .= '<b>'.$_LANG['_MAIL']['l_Message'].$_sp.'</b>'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\tIF ($_CCFG['WYSIWYG_OPEN']) {$_cols = 120;} ELSE {$_cols = 80;}\n\t\t$_cstr .= '<TEXTAREA class=\"PSML_NL\" NAME=\"mc_msg\" COLS=\"'.$_cols.'\" ROWS=\"15\">'.$adata['mc_msg'].'</TEXTAREA>'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= '</tr>'.$_nl;\n\n\t# Captcha if \"GD\" is loaded\n\t\tIF (extension_loaded('gd') && file_exists(PKG_PATH_ADDONS.'captcha')) {\n\t\t\t$_cstr .= '<tr>'.$_nl;\n\t\t\t$_cstr .= $_td_str_left_vtop.$_sp.'</td>'.$_nl;\n\t\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t\t$_cstr .= $_LANG['_MAIL']['SC_Instruct'].$_nl;\n\t\t\t$_cstr .= '</td>'.$_nl;\n\t\t\t$_cstr .= '</tr>'.$_nl;\n\t\t\t$_cstr .= '<tr>'.$_nl;\n\t\t\t$_cstr .= $_td_str_left_vtop.$_sp.'</td>'.$_nl;\n\t\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t\t$_cstr .= '<img src=\"'.PKG_URL_ADDONS.'captcha/CaptchaSecurityImages.php\">'.$_nl;\n\t\t\t$_cstr .= '</td>'.$_nl;\n\t\t\t$_cstr .= '</tr>'.$_nl;\n\t\t\t$_cstr .= '<tr>'.$_nl;\n\t\t\t$_cstr .= $_td_str_left_vtop.$_nl;\n\t\t\t$_cstr .= '<b>'.$_LANG['_MAIL']['l_Security_Code'].$_sp.'</b>'.$_nl;\n\t\t\t$_cstr .= '</td>'.$_nl;\n\t\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t\t$_cstr .= '<input class=\"PSML_NL\" id=\"security_code\" name=\"security_code\" type=\"text\" value=\"'.htmlspecialchars($adata['security_code']).'\">'.$_nl;\n\t\t\t$_cstr .= '</td>'.$_nl;\n\t\t\t$_cstr .= '</tr>'.$_nl;\n\t\t}\n\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left.$_nl;\n\t\t$_cstr .= '<INPUT TYPE=hidden name=\"stage\" value=\"1\">'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t$_cstr .= do_input_button_class_sw('b_email', 'SUBMIT', $_LANG['_MAIL']['B_Send_Email'], 'button_form_h', 'button_form', '1').$_nl;\n\t\t$_cstr .= do_input_button_class_sw('b_reset', 'RESET', $_LANG['_MAIL']['B_Reset'], 'button_form_h', 'button_form', '1').$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\n\t\t$_cstr .= '</tr>'.$_nl;\n\t\t$_cstr .= '</table>'.$_nl;\n\t\t$_cstr .= '</form>'.$_nl;\n\t\t$_cstr .= '</td></tr>'.$_nl;\n\t\t$_cstr .= '</table>'.$_nl;\n\n\t\t$_mstr_flag\t= 0;\n\t\t$_mstr \t\t= ''.$_nl;\n\n\t# Call block it function\n\t\t$_out .= do_mod_block_it($_tstr, $_cstr, $_mstr_flag, $_mstr, '1');\n\t\t$_out .= '<br>'.$_nl;\n\n\t# Return / Echo Final Output\n\t\tIF ($aret_flag) {return $_out;} ELSE {echo $_out;}\n}", "function sendmail()\n\t{\n\t\tglobal $mainframe, $Itemid;\n\n\t\t/*\n\t\t * Initialize some variables\n\t\t */\n\t\t$db = & $mainframe->getDBO();\n\n\t\t$SiteName \t= $mainframe->getCfg('sitename');\n\t\t$MailFrom \t= $mainframe->getCfg('mailfrom');\n\t\t$FromName \t= $mainframe->getCfg('fromname');\n\t\t$validate \t= mosHash( $mainframe->getCfg('db') );\n\n\t\t$default \t= sprintf(JText::_('MAILENQUIRY'), $SiteName);\n\t\t$option \t= JRequest::getVar('option');\n\t\t$contactId \t= JRequest::getVar('con_id');\n\t\t$validate \t= JRequest::getVar($validate, \t\t0, \t\t\t'post');\n\t\t$email \t\t= JRequest::getVar('email', \t\t'', \t\t'post');\n\t\t$text \t\t= JRequest::getVar('text', \t\t\t'', \t\t'post');\n\t\t$name \t\t= JRequest::getVar('name', \t\t\t'', \t\t'post');\n\t\t$subject \t= JRequest::getVar('subject', \t\t$default, \t'post');\n\t\t$emailCopy \t= JRequest::getVar('email_copy', \t0, \t\t\t'post');\n\n\t\t// probably a spoofing attack\n\t\tif (!$validate) {\n\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t}\n\n\t\t/*\n\t\t * This obviously won't catch all attempts, but it does not hurt to make\n\t\t * sure the request came from a client with a user agent string.\n\t\t */\n\t\tif (!isset ($_SERVER['HTTP_USER_AGENT'])) {\n\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t}\n\n\t\t/*\n\t\t * This obviously won't catch all attempts either, but we ought to check\n\t\t * to make sure that the request was posted as well.\n\t\t */\n\t\tif (!$_SERVER['REQUEST_METHOD'] == 'POST') {\n\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t}\n\n\t\t// An array of e-mail headers we do not want to allow as input\n\t\t$headers = array ('Content-Type:',\n\t\t\t\t\t\t 'MIME-Version:',\n\t\t\t\t\t\t 'Content-Transfer-Encoding:',\n\t\t\t\t\t\t 'bcc:',\n\t\t\t\t\t\t 'cc:');\n\n\t\t// An array of the input fields to scan for injected headers\n\t\t$fields = array ('email',\n\t\t\t\t\t\t 'text',\n\t\t\t\t\t\t 'name',\n\t\t\t\t\t\t 'subject',\n\t\t\t\t\t\t 'email_copy');\n\n\t\t/*\n\t\t * Here is the meat and potatoes of the header injection test. We\n\t\t * iterate over the array of form input and check for header strings.\n\t\t * If we fine one, send an unauthorized header and die.\n\t\t */\n\t\tforeach ($fields as $field) {\n\t\t\tforeach ($headers as $header) {\n\t\t\t\tif (strpos($_POST[$field], $header) !== false) {\n\t\t\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/*\n\t\t * Now that we have passed the header injection tests lets free up the\n\t\t * used memory and continue.\n\t\t */\n\t\tunset ($fields, $field, $headers, $header);\n\n\t\t/*\n\t\t * Load the contact details\n\t\t */\n\t\t$contact = new JTableContact($db);\n\t\t$contact->load($contactId);\n\n\t\t/*\n\t\t * If there is no valid email address or message body then we throw an\n\t\t * error and return false.\n\t\t */\n\t\tjimport('joomla.utilities.mail');\n\t\tif (!$email || !$text || (JMailHelper::isEmailAddress($email) == false)) {\n\t\t\tJContactView::emailError();\n\t\t} else {\n\t\t\t$menu = JTable::getInstance( 'menu', $db );\n\t\t\t$menu->load( $Itemid );\n\t\t\t$mparams = new JParameter( $menu->params );\n\t\t\t$bannedEmail \t= $mparams->get( 'bannedEmail', \t'' );\n\t\t\t$bannedSubject \t= $mparams->get( 'bannedSubject', \t'' );\n\t\t\t$bannedText \t= $mparams->get( 'bannedText', \t\t'' );\n\t\t\t$sessionCheck \t= $mparams->get( 'sessionCheck', \t1 );\n\n\t\t\t// check for session cookie\n\t\t\tif ( $sessionCheck ) {\n\t\t\t\tif ( !isset($_COOKIE[JSession::name()]) ) {\n\t\t\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Prevent form submission if one of the banned text is discovered in the email field\n\t\t\tif ( $bannedEmail ) {\n\t\t\t\t$bannedEmail = explode( ';', $bannedEmail );\n\t\t\t\tforeach ($bannedEmail as $value) {\n\t\t\t\t\tif ( JString::stristr($email, $value) ) {\n\t\t\t\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Prevent form submission if one of the banned text is discovered in the subject field\n\t\t\tif ( $bannedSubject ) {\n\t\t\t\t$bannedSubject = explode( ';', $bannedSubject );\n\t\t\t\tforeach ($bannedSubject as $value) {\n\t\t\t\t\tif ( JString::stristr($subject, $value) ) {\n\t\t\t\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Prevent form submission if one of the banned text is discovered in the text field\n\t\t\tif ( $bannedText ) {\n\t\t\t\t$bannedText = explode( ';', $bannedText );\n\t\t\t\tforeach ($bannedText as $value) {\n\t\t\t\t\tif ( JString::stristr($text, $value) ) {\n\t\t\t\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// test to ensure that only one email address is entered\n\t\t\t$check = explode( '@', $email );\n\t\t\tif ( strpos( $email, ';' ) || strpos( $email, ',' ) || strpos( $email, ' ' ) || count( $check ) > 2 ) {\n\t\t\t\tmosErrorAlert( JText::_( 'You cannot enter more than one email address', true ) );\n\t\t\t}\n\n\t\t\t/*\n\t\t\t * Prepare email body\n\t\t\t */\n\t\t\t$prefix = sprintf(JText::_('ENQUIRY_TEXT'), $mainframe->getBaseURL());\n\t\t\t$text \t= $prefix.\"\\n\".$name.' <'.$email.'>'.\"\\r\\n\\r\\n\".stripslashes($text);\n\n\t\t\t// Send mail\n\t\t\tjosMail($email, $name, $contact->email_to, $FromName.': '.$subject, $text);\n\n\t\t\t/*\n\t\t\t * If we are supposed to copy the admin, do so.\n\t\t\t */\n\t\t\t// parameter check\n\t\t\t$menuParams \t\t= new JParameter( $contact->params );\n\t\t\t$emailcopyCheck = $menuParams->get( 'email_copy', 0 );\n\n\t\t\t// check whether email copy function activated\n\t\t\tif ( $emailCopy && $emailcopyCheck ) {\n\t\t\t\t$copyText \t\t= sprintf(JText::_('Copy of:'), $contact->name, $SiteName);\n\t\t\t\t$copyText \t\t.= \"\\r\\n\\r\\n\".$text;\n\t\t\t\t$copySubject \t= JText::_('Copy of:').\" \".$subject;\n\t\t\t\tjosMail($MailFrom, $FromName, $email, $copySubject, $copyText);\n\t\t\t}\n\n\t\t\t$link = sefRelToAbs( 'index.php?option=com_contact&task=view&contact_id='. $contactId .'&Itemid='. $Itemid );\n\t\t\t$text = JText::_( 'Thank you for your e-mail', true );\n\n\t\t\tjosRedirect( $link, $text );\n\t\t}\n\t}", "private function process_emails(&$doing){\n\n if (isset($_GET['hotel_confirmation_once'])){\n // ----------------------- Ask for the welcome mail attachment\n print x(\"span class='only_online'\",\n\t x(\"form action='\".b_url::same('?resetcache_once=1').\"' method='post' enctype='multipart/form-data' name='upload_mail_attachment'\",\n\t\tx('table',\n\t\t x('tr',\n\t\t x('td','Please select PDF file').\n\t\t x('td',\"<input name='_virt_att' type='file' />\").\n\t\t \"<input name='v_id' value='\".$_GET['hotel_confirmation_once'].\"' type='hidden' />\".\n\t\t \"<input name='lease_id' value='\".$_GET['lease_once'].\"' type='hidden' />\").\n\t\t x('tr',\n\t\t x('td colspan=2',x('center',\"<input type='submit' value='submit'/>\"))))));\n }elseif (isset($_FILES['_virt_att'])){\n // ----------------------- Save the welcome mail attachment\n VM_mailer()->save_attachment($_REQUEST['v_id'],$_REQUEST['lease_id'],$_FILES['_virt_att'],'hotel_confirmation');\n }elseif (isset($_GET['mail2all_deny_once'])){\n // ----------------------- Send deny E-mails to all refused attenders of the event\n $q = $this->query();\n while($rec = myPear_db()->next_record($q)){\n\tif(VM_mailer()->m_applicant_deny($rec['v_id'],'status',$rec['v_status']) === False){\n\t VM_mailer()->m_applicant_deny($rec['v_id'],$no_preview=True);\n\t}\n }\n }\n if(isset($_GET['mail2all_welcome_once'])){\n // ----------------------- Send welcome E-mails to all accepted attenders of the event\n $q = $this->query();\n while($rec = myPear_db()->next_record($q)){\n\tif(VM_mailer()->welcome_applicant($rec['v_id'],'status',$rec['v_status']) === False){\n\t VM_mailer()->welcome_applicant($rec['v_id'],@$rec['lease_id'],$no_preview=True);\n\t}\n }\n }elseif (isset($_GET['mail_once'])){\n //\n // ----------------------- Preview e-mails \n //\n $doing = 'send_accept_deny';\n switch($_GET['mail_once']){ \n case 'vm_mail_yes':\n\tVM_mailer()->welcome_applicant($_GET['v_id'],$_GET['lease_id']);\n\tbreak;\n\t\n case 'vm_mail_no':\n\tVM_mailer()->m_applicant_deny($_GET['v_id']);\n\tbreak;\n\t\n case 'vm_mail_info':\n\tVM_mailer()->m_applicant_info_mail($_GET['v_id']);\n\tbreak;\n\n case 'vm_mail_pwd':\n\tVM_mailer()->remind_organizer($_GET['v_id'],VM::$e,'pwd',False);\n\tbreak;\n }\n }elseif(isset($_GET['sendmail_once'])){\n //\n // ----------------------- Sending the e-mail after preview\n //\n switch($sendmail_once=$_GET['sendmail_once']){\n case 'send':\n\tb_debug::_debug(\"sendmail_once='$sendmail_once'\",$this);\n\tbreak;\n default:\n\tb_debug::_debug(\"sendmail_once='$sendmail_once'... What to do???\",$this);\n }\n }\n }", "function _webform_edit_email($currfield) {\r\n $edit_fields['value'] = array(\r\n '#type' => 'textfield',\r\n '#title' => t('Default value'),\r\n '#default_value' => $currfield['value'],\r\n '#description' => t('The default value of the field.') . theme('webform_token_help'),\r\n '#size' => 60,\r\n '#maxlength' => 127,\r\n '#weight' => 0,\r\n '#attributes' => ($currfield['value'] == '%useremail' && count(form_get_errors()) == 0) ? array('disabled' => TRUE) : array(),\r\n '#id' => 'email-value',\r\n );\r\n $edit_fields['user_email'] = array(\r\n '#type' => 'checkbox',\r\n '#title' => t('User email as default'),\r\n '#default_value' => $currfield['value'] == '%useremail' ? 1 : 0,\r\n '#description' => t('Set the default value of this field to the user email, if he/she is logged in.'),\r\n '#attributes' => array('onclick' => 'getElementById(\"email-value\").value = (this.checked ? \"%useremail\" : \"\"); getElementById(\"email-value\").disabled = this.checked;'),\r\n '#weight' => 0,\r\n '#element_validate' => array('_webform_edit_email_validate'),\r\n );\r\n $edit_fields['extra']['width'] = array(\r\n '#type' => 'textfield',\r\n '#title' => t('Width'),\r\n '#default_value' => $currfield['extra']['width'],\r\n '#description' => t('Width of the textfield.') .' '. t('Leaving blank will use the default size.'),\r\n '#size' => 5,\r\n '#maxlength' => 10,\r\n );\r\n $edit_fields['extra']['email'] = array(\r\n '#type' => 'checkbox',\r\n '#title' => t('E-mail a submission copy'),\r\n '#return_value' => 1,\r\n '#default_value' => $currfield['extra']['email'],\r\n '#description' => t('Check this option if this component contains an e-mail address that should get a copy of the submission. Emails are sent individually so other emails will not be shown to the recipient.'),\r\n );\r\n $edit_fields['extra']['disabled'] = array(\r\n '#type' => 'checkbox',\r\n '#title' => t('Disabled'),\r\n '#return_value' => 1,\r\n '#description' => t('Make this field non-editable. Useful for setting an unchangeable default value.'),\r\n '#weight' => 3,\r\n '#default_value' => $currfield['extra']['disabled'],\r\n );\r\n return $edit_fields;\r\n}", "function Users_user_updateemail()\n{\n if (!pnUserLoggedIn()) {\n return LogUtil::registerPermissionError();\n }\n\n if (!SecurityUtil::confirmAuthKey('Users')) {\n return LogUtil::registerAuthidError(pnModUrl('Users', 'user', 'changeemail'));\n }\n\n $uservars = pnModGetVar('Users');\n if ($uservars['changeemail'] <> 1) {\n return pnRedirect('Users', 'user', 'main');\n }\n\n $newemail = FormUtil::getPassedValue('newemail', '', 'POST');\n\n $checkuser = pnModAPIFunc('Users', 'user', 'checkuser',\n array('uname' => pnUserGetVar('uname'),\n 'email' => $newemail,\n 'agreetoterms' => true));\n\n // check email related errors only\n if (in_array($checkuser, array(-1, 2, 9, 11, 12))) {\n switch($checkuser)\n {\n case -1:\n $message = __('Sorry! You have not been granted access to this module.');\n break;\n case 2:\n $message = __('Sorry! The e-mail address you entered was incorrectly formatted or is unacceptable for other reasons. Please correct your entry and try again.');\n break;\n case 9:\n $message = __('Sorry! This e-mail address has already been registered, and it cannot be used again for creating another account.');\n break;\n case 11:\n $message = __('Sorry! Your user agent is not accepted for registering an account on this site.');\n break;\n case 12:\n $message = __('Sorry! E-mail addresses from the domain you entered are not accepted for registering an account on this site.');\n break;\n default:\n $message = __('Sorry! You have not been granted access to this module.');\n } // switch\n return LogUtil::registerError($message, null, pnModURL('Users', 'user', 'changeemail'));\n }\n\n // set the new email\n pnUserSetVar('email', $newemail);\n\n LogUtil::registerStatus(__('Done! Saved your e-mail address.'));\n return pnRedirect(pnModURL('Users', 'user', 'main'));\n}", "function send_contact_email($to, $data) {\n\n\t\t\t\t$from = $data['contact_email'];\n\t\t\t\t$subject = \"Contact From Website: \".$data['contact_name'] . \" - \";\n\t\t\t\t$subject .= $data['contact_subject'];\n\n\t\t\t/*\t$msg = $this->mailHeader;\n\t\t\t\t$msg .= $data['contact_message'];\n\t\t\t\t$msg .= $this->mailFooter;*/\n\n\t\t\t\t$res = $this->settings_model->get_contact_page_details();\n\t\t\t\t$contact_phone = $res[0]->contact_phone;\n\t\t\t\t$contact_email = $res[0]->contact_email;\n\t\t\t\t$contact_address = $res[0]->contact_address;\n\n\t\t\t\t$sendto = $details->contect_email;\n\t\t\t\t $ptheme = pt_default_theme();\n\t\t\t\t\t$this->_config = config_item('theme');\n\t\t\t\t\t$uu = $this->_config['url'];\n\t\t\t\t\n\t\t\t\t$email_temp_img = $uu.$ptheme.'/email_temp_img/gb_email_temp_img/';\n $template = array('{name}','{check_in}','{check_out}','{link}','{email_temp_img}','{city}','{state}','{aprx_rooms}','{contact_phone}','{contact_email}','{contact_address}','{top_hotel}');\n\t\t\t\t$values = array($details->contect_name,$details->check_in,$details->check_out,$details->link_gen,$email_temp_img,$details->city,$details->state,$details->aprx_rooms,$contact_phone,$contact_email,$contact_address,$top_hotel);\n\t\t\t\t\n\t\t\t\t$HTML_DATA = file_get_contents( $uu.$ptheme.'/contact_us.html');\n\t\t\t\t$message = str_replace($template, $values, $HTML_DATA);\n\t\t\t\t\t/*echo \"string\";\n\t\t\t\t\techo $message;\n\t\t\t\t\texit();*/\n\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\t$this->email->from($to);\n\t\t\t\t$this->email->to($from);\n\t\t\t\t$this->email->subject('Contact us confirmation');\n\t\t\t\t$this->email->message($message);\n\t\t\t\treturn $this->email->send();\n\t\t}", "function getEmailAddress() {\n\t\t//Retrieve submitted id parameters\n\t\t$org_id = intval($this->piVars['org_id']);\n\t\t$emp_id = intval($this->piVars['id']);\n\t\t$pos_id = intval($this->piVars['pos_id']);\n\t\t$sv_id = intval($this->piVars['sv_id']);\n\n\t\tif (!empty($org_id)) {\t//Email form is called from organisation detail page (organisation email)\n\t\t\t//Standard query for organisation details\n\t\t\t$res_organisation = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n\t\t\t\t\t'or_name,\n\t\t\t\t\t or_email',\n\t\t\t\t\t'tx_civserv_organisation',\n\t\t\t\t\t'1 '.\n\t\t\t\t\t$this->cObj->enableFields('tx_civserv_organisation').\n\t\t\t\t\t' AND uid = ' . intval($org_id),\n\t\t\t\t\t'',\n\t\t\t\t\t'');\n\n\t\t\t//Check if query returned a result\n\t\t\tif ($GLOBALS['TYPO3_DB']->sql_num_rows($res_organisation) == 1) {\n\t\t\t\t$organisation = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res_organisation);\n\t\t\t\t$email_address = $organisation[or_email];\n\t\t\t\treturn $email_address;\n\t\t\t} else {\n\t\t\t\t$GLOBALS['error_message'] = $this->pi_getLL('tx_civserv_pi1_email_form.error_org_id','Wrong organisation id or organisation does not exist!');\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t} elseif (!empty($emp_id) && !empty($pos_id) && !empty($sv_id)) {\t//Email form is called from service detail page\n\t\t\t$result = $this->makeEmailQuery($emp_id, $pos_id, $sv_id);\n\t\t\t//Check if query returned a result\n\t\t\tif ($GLOBALS['TYPO3_DB']->sql_num_rows($result) == 1) {\n\t\t\t\t$employee = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result);\n\t\t\t\t//Set correct email address (priority is employee-position email address)\n\t\t\t\tempty($employee[ep_email]) ? $email_address = $employee[em_email] : $email_address = $employee[ep_email];\n\t\t\t\treturn $email_address;\n\t\t\t} else {\n\t\t\t\t$GLOBALS['error_message'] = $this->pi_getLL('tx_civserv_pi1_email_form.error_sv_id','Wrong service id, employee id oder position id. No email address found!');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} elseif (!empty($emp_id) || (!empty($pos_id) && !empty($emp_id)) ) { //Email form is called from organisation detail page (supervisor email)\n\t\t\t$result = $this->makeEmailQuery($emp_id, $pos_id, $sv_id);\n\t\t\t//Check if query returned a result\n\t\t\tif ($GLOBALS['TYPO3_DB']->sql_num_rows($result) == 1) {\n\t\t\t\t$employee = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result);\n\t\t\t\tempty($employee[ep_email]) ? $email_address = $employee[em_email] : $email_address = $employee[ep_email];\n\t\t\t\treturn $email_address;\n\t\t\t} else {\n\t\t\t\t$GLOBALS['error_message'] = $this->pi_getLL('tx_civserv_pi1_email_form.error_pos_id','Wrong employee id oder position id. No email address found!');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} elseif ($this->piVars['mode'] == 'check_contact_form') {\t//Email form ist called by the contact_link in the main Navigation\n\t\t\t$hoster_email =$this->get_hoster_email();\n\t\t\treturn $hoster_email;\n\t\t} else {\n\t\t\t$GLOBALS['error_message'] = $this->pi_getLL('tx_civserv_pi1_email_form.error_general','Organisation id, employee id, position id and service id wrong or not set. No email address found!');\n\t\t\treturn false;\n\t\t}\n\t}", "function send_mail($input, $name, $email, $user_subject) {\n\n\t\t$options = get_option('id_settings');\n $receiver = $options['id_education_email_addresses_field'];\n\t\t$subject = \"Education input: $user_subject\";\n\n $message = \"<!DOCTYPE html>\n <html>\n <head>\n <meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>\n <title>Education input: $subject</title>\n <meta name='viewport' content='width=device-width, initial-scale=1.0'>\n </head>\";\n $message .= \"<body><i>Sent using the contact form at \" . get_site_url() .\n \"</i><br><br>\" . esc_html($input);\n $message .= \"</body>\";\n $message .= \"</html>\";\n\n $message = wordwrap($message, 70);\n\n\t\tif($email !== '') {\n\t\t\t$sender = \"$name <$email>\";\n\t\t} else {\n\t\t\t$sender = \"Anonymous <[email protected]>\";\n\t\t}\n\n\t\t$headers = \"From: $sender\\r\\n\";\n $headers .= \"MIME-Version: 1.0\\r\\n\";\n $headers .= \"Content-Type: text/html; charset=UTF-8\\r\\n\";\n\n return wp_mail($receiver, $subject, $message, $headers);\n\n }", "function uc_file_build_email_form($form, &$form_state, $settings, $token_filters) {\n $form['from'] = array(\n '#type' => 'textfield',\n '#title' => t('Sender'),\n '#default_value' => $settings['from'],\n '#description' => t('The \"From\" address.'),\n '#required' => TRUE,\n );\n $form['addresses'] = array(\n '#type' => 'textarea',\n '#title' => t('Recipients'),\n '#default_value' => $settings['addresses'],\n '#description' => t('Enter the email addresses to receive the notifications, one on each line. You may use order tokens for dynamic email addresses.'),\n '#required' => TRUE,\n );\n $form['subject'] = array(\n '#type' => 'textfield',\n '#title' => t('Subject'),\n '#default_value' => $settings['subject'],\n '#required' => TRUE,\n );\n $form['message'] = array(\n '#type' => 'textarea',\n '#title' => t('Message'),\n '#default_value' => $settings['message'],\n '#text_format' => $settings['format'],\n );\n\n $form['token_help'] = array(\n '#type' => 'fieldset',\n '#title' => t('Replacement patterns'),\n '#description' => t('You can make use of the replacement patterns in the recipients field, the subject, and the message body.'),\n '#collapsible' => TRUE,\n '#collapsed' => TRUE,\n );\n foreach ($token_filters as $name) {\n $form['token_help'][$name] = array(\n '#type' => 'fieldset',\n '#title' => t('@name replacement patterns', array('@name' => drupal_ucfirst($name))),\n '#collapsible' => TRUE,\n '#collapsed' => TRUE,\n );\n }\n\n return $form;\n}", "function setSenderEmail($email) {\n $parts = $this->_parseEmail($email);\n $this->from_user = $parts[0];\n $this->from_domain = $parts[1];\n }", "function email_print_users_to_send($users, $nosenders=false, $options=NULL) {\n\n\tglobal $CFG;\n\n\t$url = '';\n\tif ( $options ) {\n\t\t$url = email_build_url($options);\n\t}\n\n\n\techo '<tr valign=\"middle\">\n <td class=\"legendmail\">\n <b>'.get_string('for', 'block_email_list'). '\n :\n </b>\n </td>\n <td class=\"inputmail\">';\n\n if ( ! empty ( $users ) ) {\n\n \techo '<div id=\"to\">';\n\n \tforeach ( $users as $userid ) {\n \t\techo '<input type=\"hidden\" value=\"'.$userid.'\" name=\"to[]\" />';\n \t}\n\n \techo '</div>';\n\n \techo '<textarea id=\"textareato\" class=\"textareacontacts\" name=\"to\" cols=\"65\" rows=\"3\" disabled=\"true\" multiple=\"multiple\">';\n\n \tforeach ( $users as $userid ) {\n \t\techo fullname( get_record('user', 'id', $userid) ).', ';\n \t}\n\n \techo '</textarea>';\n }\n\n \techo '</td><td class=\"extrabutton\">';\n\n\tlink_to_popup_window( '/blocks/email_list/email/participants.php?'.$url, 'participants', get_string('participants', 'block_email_list').' ...',\n 470, 520, get_string('participants', 'block_email_list') );\n\n echo '</td></tr>';\n echo '<tr valign=\"middle\">\n \t\t\t<td class=\"legendmail\">\n \t\t\t\t<div id=\"tdcc\"></div>\n \t\t\t</td>\n \t\t\t<td><div id=\"fortextareacc\"></div><div id=\"cc\"></div><div id=\"url\">'.$urltoaddcc.'<span id=\"urltxt\">&#160;|&#160;</span>'.$urltoaddbcc.'</div></td><td><div id=\"buttoncc\"></div></td></tr>';\n echo '<tr valign=\"middle\"><td class=\"legendmail\"><div id=\"tdbcc\"></div></td><td><div id=\"fortextareabcc\"></div><div id=\"bcc\"></div></td><td><div id=\"buttonbcc\"></div></td>';\n\n\n}", "public function UpdateEmail()\n\t\t{\n\t\t\tif (!$this->HasPermission()) {\n\t\t\t\t$this->NoPermission();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$from = trim($_POST['fromemail']);\n\t\t\t$to = trim($_POST['toemail']);\n\n\t\t\t$update = array (\n\t\t\t\t'orders' => array (\n\t\t\t\t\t'ordbillemail',\n\t\t\t\t\t'ordshipemail',\n\t\t\t\t),\n\t\t\t\t'customers' => array (\n\t\t\t\t\t'custconemail',\n\t\t\t\t),\n\t\t\t\t'subscribers' => array (\n\t\t\t\t\t'subemail',\n\t\t\t\t),\n\t\t\t);\n\t\t\t$recordsUpdated = 0;\n\n\t\t\tforeach ($update as $table => $fields) {\n\t\t\t\tforeach ($fields as $field) {\n\t\t\t\t\t$updateData = array (\n\t\t\t\t\t\t$field => $to\n\t\t\t\t\t);\n\t\t\t\t\t$restriction = $field .\"='\".$GLOBALS['ISC_CLASS_DB']->Quote($from).\"'\";\n\t\t\t\t\t$GLOBALS['ISC_CLASS_DB']->UpdateQuery($table, $updateData, $restriction);\n\t\t\t\t\t$recordsUpdated += $GLOBALS['ISC_CLASS_DB']->NumAffected();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($recordsUpdated > 1) {\n\t\t\t\t$message = sprintf(GetLang('EmailCheckNumUpdatedPlural'), $recordsUpdated);\n\t\t\t\t$status = MSG_SUCCESS;\n\t\t\t} elseif ($recordsUpdated == 1) {\n\t\t\t\t$message = sprintf(GetLang('EmailCheckNumUpdatedSingular'), $recordsUpdated);\n\t\t\t\t$status = MSG_SUCCESS;\n\t\t\t} else {\n\t\t\t\t$message = GetLang('EmailCheckNoneUpdated');\n\t\t\t\t$status = MSG_ERROR;\n\t\t\t}\n\n\t\t\tFlashMessage($message, $status, 'index.php?ToDo=runAddon&addon=addon_emailchange');\n\t\t}", "function createEmail($from_email, $from_name, $id_user) {\n $result = $this->getNewEmailId($id_user); //Contiene le email dell'utente con data a null\n if (mysql_num_rows($result) > 0) {//Se vi sono email pregresse ritorna la lista delle email pregresse\n return $result;\n }\n if ($this->connectToMySql()) {\n $query = sprintf(\"INSERT INTO scuola.email_store(from_email, from_name, id_user, subject, body) VALUES ('%s','%s', '%s', '<NO SUBJECT>', '<NO BODY>')\", $from_email, $from_name, $id_user);\n\n // Perform Query\n $result = mysql_query($query);\n if (!$result) {\n setcookie('message', mysql_error());\n }//else\n //setcookie('message','Creata nuova Email');\n }\n $this->closeConnection();\n return $result;\n }", "function userNotificationEmail($email, $user)\n{\n\t$module = new sociallogin();\n\t$sub = $module->l('Thank You For Registration', 'sociallogin_functions');\n\t$vars = array('{firstname}' => $user['fname'], '{lastname}' => $user['lname'], '{email}' => $email, '{passwd}' => $user['pass']);\n\t$id_lang = (int)Configuration::get('PS_LANG_DEFAULT');\n\tMail::Send($id_lang, 'account', $sub, $vars, $email);\n}", "function event_formprocessing($formvariables) {\r\r\n\tglobal $glbl_companyname, $glbl_sendformsfromemailaddress, $glbl_sendformstoemailaddress,\r\r\n\t $glbl_physicalwebrootlocation;\r\r\n\t$outputtype = 'simple';\r\r\n\t// Security validation 'ctcd'\r\r\n\tif (!pingToken($formvariables['citycode']))\r\r\n\t\treturn '// invalid: press the browser [back] button;';\r\r\n\t// When using a custom template for output\r\r\n\tif (isset($formvariables['emailtemplate'])){\r\r\n\t\t$loc = $glbl_physicalwebrootlocation . $formvariables['emailtemplate'];\r\r\n\t\tif (file_exists($loc)){ \r\r\n\t\t\t$file = fopen($loc, 'r'); // Read template page\r\r\n\t\t\t$formstring = fread($file, filesize($loc));\r\r\n\t\t\tfclose($file);\r\r\n\t\t\tif (trim($formstring) != '')\r\r\n\t\t\t\t$outputtype = 'custom';\r\r\n\t\t}\r\r\n\t}\r\r\n\t// When using simple output\r\r\n\tif ($outputtype == 'simple')\r\r\n\t\t$formstring = 'A form was submitted for: ' . $glbl_companyname . '<br><br>';\r\r\n\t// Loop over form variables\r\r\n\tforeach (explode(',', $formvariables['fieldlist']) as $formfield) {\r\r\n\t\t$formfieldvalue = '';\r\r\n\t\tif (isset($formvariables[$formfield]))\r\r\n\t\t\t$formfieldvalue = $formvariables[$formfield];\r\r\n\t\tif (strtolower($formfield) == 'email')\r\r\n\t\t\t$formfieldvalue = '<a href=\"mailto:' . $formfieldvalue . '\">' . $formfieldvalue . '</a>';\r\r\n\t\tif ($outputtype == 'simple')\r\r\n\t\t\t$formstring .= str_replace('_', ' ', $formfield) . ': ' . str_replace('\\\\', '', $formfieldvalue) . '<br>';\r\r\n\t\telse\r\r\n\t\t\t$formstring = str_replace('<!-- {$' . $formfield . '$} -->', $formfieldvalue, $formstring);\r\r\n\t}\r\r\n\t// Add datetimestamp\r\r\n\tif ($outputtype == 'simple')\t\r\r\n\t\t$formstring .= '<br>Date: ' . date(\"m/d/Y\") . ' - ' . date(\"h:i:s A\");\r\r\n\telse\r\r\n\t\t$formstring = str_replace('<!-- {$datetimestamp$} -->',\r\r\n\t\t\t\t\t\t\t\t (date(\"m/d/Y\") . ' - ' . date(\"h:i:s A\")), $formstring);\t\r\r\n\t// Send via email\r\r\n\trequire_once(\"htmlMimeMail5/htmlMimeMail5.php\"); // htmlMimeMail5 class\r\r\n $mail = new htmlMimeMail5(); // Instantiate a new HTML Mime Mail object\r\r\n $mail->setFrom($glbl_sendformsfromemailaddress);\r\r\n $mail->setReturnPath($glbl_sendformsfromemailaddress); \r\r\n $mail->setSubject('web form | ' . $glbl_companyname);\r\r\n $mail->setText(str_replace('<br>', '\\r\\n', $formstring));\r\r\n $mail->setHTML($formstring);\r\r\n\t// Attach uploaded image, if any\r\r\n\tif (isset($_FILES['imagefile']['name']))\r\r\n\t\tif ($_FILES['imagefile']['type'] == \"image/gif\" || $_FILES['imagefile']['type'] == \"image/jpg\" ||\r\r\n\t\t\t$_FILES['imagefile']['type'] == \"image/jpeg\" || $_FILES['imagefile']['type'] == \"image/pjpeg\" ||\r\r\n\t\t\t$_FILES['imagefile']['type'] == \"image/png\")\r\r\n\t\t\t$mail->addAttachment(new fileAttachment($_FILES['imagefile']['tmp_name'], $_FILES['imagefile']['type']));\r\r\n\t// Send the email!\r\r\n\t$mail->send(array($glbl_sendformstoemailaddress), 'smtp');\r\r\n\t// User defined function hook\r\r\n\texecUserDefinedFunction('USRDFNDafter_event_formprocessing');\r\r\n\t// Point to page\r\r\n\theader('Location: ' . $formvariables['afterpage']);\r\r\n}", "function mailer() {\n\t\tJRequest::checkToken() or die( JText::_( 'Invalid Token' ) );\n\t\t$email = JRequest::getVar('email');\n\t\t$title = JRequest::getVar('title');\n\t\t$from = array($email, $title);\n\t\t// set emailadres from the site\n\t\t$config =&JFactory::getConfig();\n\t\t// Get some variables from the component options\n\t\t$app = JFactory::getApplication('site');\n\t\t$componentParams = $app->getParams('com_mdcontact');\n\t\t$email_to = $componentParams->get('email_to');\n\t\t$subject = $componentParams->get('subject');\n\t\t$to = array($email_to, $email_to );\n\t\t// Set some variables for the email message\n\t\t$copy = JRequest::getVar('copy');;\n\t\t$body = JRequest::getVar('description');;\n\t\n\t\t// Invoke JMail Class\n\t\t$mailer = JFactory::getMailer();\n\t\n\t\t// Set sender array so that my name will show up neatly in your inbox\n\t\t$mailer->setSender($from);\n\t\t$mailer->addRecipient($to);\n\t\t// Set cc if copy is checked\n\t\tif ($copy=='1'){\n\t\t\t$mailer->addCC($from);\n\t\t\t}\n\t\t$mailer->setSubject($subject);\n\t\t$mailer->setBody($body);\n\t\t$send = $mailer->Send();\n\t\t// set the redirect page\n\t\t$redirect = JRoute::_('index.php?option=com_mdcontact&view=contact&task=add');\n\t\tif ( $send !== true ) {\n\t\t\tJFactory::getApplication()->enqueueMessage('Your message is not send, please try again later', 'error');\n\t\t\t$this->setRedirect( $redirect);\n\t\t} else {\n\t\tparent::apply();\n\t}\n\t}", "function mme_display_form() {\n\tif( isset($_POST['send']) ) {\n\t\t$emailstring = $_POST['emails'];\n\t\t$emails = explode( ',', $emailstring );\n\t\t//print_r($emails);\n\t\tforeach($emails as $email){\n\t\t\t$iserror = mme_checkemail( $email );\n\t\t}\n\t\t\tif($iserror) {\n\t\t\tmme_addemail( $emailstring );\n\t\t\tmme_success_notice();\n\t\t}\n\t}\n\t?>\n\t<form method=\"POST\" name=\"mailform\" action=\"#\">\n\t\t<style>\n\t\t\tdiv{\n\t\t\t\tmargin-left:15px;\n\t\t\t\tmargin-top: 10px;\n\t\t\t}\n\t\t\t\n\t\t\tdiv#metavalue{\n \t\t\twidth : 50%;\n \n\t\t\t}\n\t\t</style>\n\t\t<div>Enter the Email address</div>\n\t\t<div><input type = \"text\" id =\"metavalue\" name=\"emails\" /></div>\n\t\t<div class = \"buttons\">\n\t\t\t<input type=\"submit\" value=\"Save\" name=\"send\" class=\"button button-primary button-large\"/>\n\t\t\t<input type=\"reset\" value=\"Cancel\" name=\"cancel\"/>\n\t\t</div>\n\n\t</form>\n\t<?php\n}", "function elegantSendEmail() {\n $to = $_POST['datastring']['newEmailForm'][0][0];\n $title = $_POST['datastring']['newEmailForm'][0][1];\n $messagetext = nl2br(rawurldecode($_POST['datastring']['newEmailForm'][0][2])); \n $properties = $_POST['datastring']['properties'];\n\n //Send the email and get a report back\n $sent = elegeantSend($to,$messagetext,$properties);\n \n //Save the email as a post and get a report back\n $saved = elegantSave($title,$to,$messagetext,$properties);\n\n //echo 'Email Status:'.$sent.'<br>Save Status:'.$saved;\n \n //Terminate and provide a response. \n wp_die(); \n}", "function osg_singout_notifier_form_submit($form, & $form_state) {\n osg_singout_notifier_mail_send($form_state['values']);\n}", "function viaggio_deliver_mail() {\n\tif ( isset( $_POST['cf-submitted'] ) ) {\n\n\t\t// sanitize form values\n\t\t$name = sanitize_text_field( $_POST[\"cf-name\"] );\n\t\t$email = sanitize_email( $_POST[\"cf-email\"] );\n\t\t$subject = sanitize_text_field( $_POST[\"cf-subject\"] );\n\t\t$message = esc_textarea( $_POST[\"cf-message\"] );\n\n\t\t// get the blog administrator's email address\n\t\t$to = get_option( 'admin_email' );\n\n\t\t$headers = \"From: $name <$email>\" . \"\\r\\n\";\n\n\t\t// If email has been process for sending, display a success message\n\t\tif ( wp_mail( $to, $subject, $message, $headers ) ) {\n\t\t\techo '<div>';\n\t\t\techo '<p>'.esc_html__('Thanks for contacting me, expect a response soon.' , 'viaggio').'</p>';\n\t\t\techo '</div>';\n\t\t} else {\n\t\t\techo esc_html__('An unexpected error occurred.' , 'viaggio');\n\t\t}\n\t}\n}", "public function website_provider() {\n\t\t\n\t\t$name = Input::get('name');\n\t\t$mailFrom = Input::get('email');\n\t\t$phone = Input::get('phone');\n\t\t$comments = Input::get('comments');\n\t\t$emailTo = '[email protected]';\n\t\t\n\t\t$vars = array(\n\t\t\t'name'\t\t=>\t$name,\n\t\t\t'email'\t\t=>\t$mailFrom,\n\t\t\t'phone'\t\t=>\t$phone,\n\t\t\t'comments'\t=>\t$comments,\n\t\t);\n\n\t\tEmailTemplate::SendByKey('contact_mail_provider', $vars, $emailTo, null, null, $mailFrom);\n\t\t\n\t\t\n\t\treturn \"<fieldset><div id='success_page'><h4 class='highlight'>Obrigado, <strong>$name</strong>! Sua mensagem foi enviada. Entraremos em contato o mais rápido possível.</h4></div></fieldset>\";\n }", "function femail_user_add($form_state, $account){\n $form['femail_email'] = array(\n '#type' => 'textfield',\n '#title' => t('Email')\n );\n $form['femail_uid'] = array(\n '#type' => 'hidden',\n '#value' => $account->uid\n );\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Add an additional Email')\n );\n return $form;\n}", "function pexeto_contact_form() {\r\n\t\t$html='<div class=\"widget-contact-form\">\r\n\t\t\t<form action=\"'.get_template_directory_uri().'/includes/send-email.php\" method=\"post\" \r\n\t\t\tid=\"submit-form\" class=\"pexeto-contact-form\">\r\n\t\t\t<div class=\"error-box error-message\"></div>\r\n\t\t\t<div class=\"info-box sent-message\"></div>\r\n\t\t\t<input type=\"text\" name=\"name\" class=\"required placeholder\" id=\"name_text_box\" \r\n\t\t\tplaceholder=\"'.pexeto_text( 'name_text' ).'\" />\r\n\t\t\t<input type=\"text\" name=\"email\" class=\"required placeholder email\" \r\n\t\t\tid=\"email_text_box\" placeholder=\"'.pexeto_text( 'your_email_text' ).'\" />\r\n\t\t\t<textarea name=\"question\" rows=\"\" cols=\"\" class=\"required\"\r\n\t\t\tid=\"question_text_area\"></textarea>\r\n\t\t\t<input type=\"hidden\" name=\"widget\" value=\"true\" />\r\n\r\n\t\t\t<a class=\"button send-button\"><span>'.pexeto_text( 'send_text' ).'</span></a>\r\n\t\t\t<div class=\"contact-loader\"></div><div class=\"check\"></div>\r\n\r\n\t\t\t</form><div class=\"clear\"></div></div>';\r\n\t\treturn $html;\r\n\t}", "private function verificarEmail(){\n\t \n\t \t\t//Verifica se a requisição é via AJAX\n\t \t\tif(HelperFactory::getInstance()->isAjax()){\n\t \t\t\n\t \t\t\t //Solicita a verificação do E-mail\n\t\t\t\t $this->Delegator('ConcreteCadastro', 'verificarEmail',$this->getPost());\t \t\t\t \n\t \t\t}\t \n\t }", "function getFieldEmailAddress($value = null){\n\t\t$form_ret = '';\n\t\t$dataField = get_option('axceleratelink_srms_opt_emailAddress');\n\t\t$dataTitle = get_option('axceleratelink_srms_opt_tit_emailAddress');\n\t\t$message = get_option('axceleratelink_set_emailadd_msg');\n\t\t$tooltip = setToolTipNotification('email');\n\t\tif ($dataField == 'true'){\n\t\t\t$form_ret .= \"</br><label>\".$dataTitle.\"<span class='red'>*</span>\".$tooltip.\"</label><br><input type='text' name='emailAddress' value='\".$value.\"' class='' id='email' data-value='\".($message ? $message : '').\"'></br><div id='email_err_con'></div><div id='email_label'></div>\";\t\t\n\t\t\t$form_ret .= \"<div class='email-massage'></div>\";\n\t\t}\n\t\treturn $form_ret;\n\t}", "function cfdef_prepare_email_value_for_email( $p_value ) {\n\treturn 'mailto:' . $p_value;\n}", "function emailforsurveyresult($survey) {\n\n global $wpdb;\n $id = $survey->id;\n $user_id = $survey->user_id;\n $user = get_user_by('id', $user_id);\n\n $mentor_id = $survey->mentor_id;\n $mentor = get_user_by('id', $mentor_id);\n\n\n $form = $wpdb->get_row\n (\n $wpdb->prepare\n (\n \"SELECT * FROM \" . survey_forms() . \" \"\n . \"WHERE id = %d\", $survey->survey_id\n )\n );\n\n $slug = PAGE_SLUG;\n $url = site_url() . \"/$slug?survey=\" . $id . \"&guid=\" . $survey->guid;\n $btnaccept = \"<a href='\" . $url . \"'>Click Here To Check Your Survey</a> <br/><br/>\";\n\n $date = date(\"Y-m-d H:i:s\");\n $site_name = TR_SITE_NAME;\n $admin_email = get_option('admin_email');\n $headers = 'From: ' . $admin_email . \"\\r\\n\" .\n 'Reply-To: ' . $admin_email . \"\\r\\n\" .\n 'MIME-Version: 1.0' . \"\\r\\n\" .\n 'Content-type: text/html; charset=iso-8859-1' . \"\\r\\n\" .\n 'X-Mailer: PHP/' . phpversion();\n\n /* for user */\n\n $template = tt_get_template(\"survey_result_user\");\n $subj = $template->subject;\n\n $msg = $template->content;\n $msg = str_replace(array('{{username}}', '{{survey_title}}', '{{mentor_name}}', '{{url}}', '{{site_name}}'), array($user->data->display_name, $form->title, $mentor->data->display_nam, $url, $site_name), $msg);\n\n custom_mail($user->data->user_email, $subj, $msg, EMAIL_TYPE, \"\");\n\n\n /* for mentor */\n\n $url = site_url() . \"/wp-admin/admin.php?page=survey_result&survey_id=\" . $id;\n\n $template = tt_get_template(\"survey_result_mentor\");\n $subj = $template->subject;\n\n $msg = $template->content;\n $msg = str_replace(array('{{username}}', '{{survey_user}}', '{{survey_title}}', '{{url}}', '{{site_name}}'), array($mentor->data->display_name, $user->data->display_name, $form->title, $url, $site_name), $msg);\n\n custom_mail($mentor->data->user_email, $subj, $msg, EMAIL_TYPE, \"\");\n}", "function process_mail(){\n\t\t$result = true;\n\t\t\n\t\tif(count($this->to) < 1){\n\t\t\treturn 'No email address.';\n\t\t}\n\t\t$this->set_eol();\n\t\t$this->get_message_type();\n\t\t$this->set_boundary();\n\t\t$headers = $this->set_headers();\n\t\t$body = $this->set_body();\n\t\t\n\t\tif($body == ''){\n\t\t\treturn 'Empty email body.';\n\t\t}\n\t\t$result = $this->send_mail($headers, $body);\n\t\treturn $result;\n\t}", "function bab_pm_formsend()\n{\n $bab_pm_PrefsTable = safe_pfx('bab_pm_list_prefs');\n $bab_pm_SubscribersTable = safe_pfx('bab_pm_subscribers');\n\n $bab_pm_radio = ps('bab_pm_radio'); // this is whether to mail or not, or test\n\n if ($bab_pm_radio == 'Send to Test') {\n $bab_pm_radio = 2;\n }\n\n if ($bab_pm_radio == 'Send to List') {\n $bab_pm_radio = 1;\n }\n\n if ($bab_pm_radio != 0) { // if we have a request to send, start the ball rolling....\n // email from override\n $sendFrom = gps('sendFrom');\n\n $listToEmail = (!empty($_REQUEST['listToEmail'])) ? gps('listToEmail') : gps('list');\n // $listToEmail = gps('listToEmail'); // this is the list name\n $subject = gps('subjectLine');\n $form = gps('override_form');\n\n // ---- scrub the flag column for next time:\n $result = safe_query(\"UPDATE $bab_pm_SubscribersTable SET flag = NULL\");\n\n //time to fire off initialize\n // bab_pm_initialize_mail();\n $path = \"?event=postmaster&step=initialize_mail&radio=$bab_pm_radio&list=$listToEmail&artID=$artID\";\n\n if (!empty($sendFrom)) {\n $path .= \"&sendFrom=\" . urlencode($sendFrom);\n }\n\n if (!empty($subject)) {\n $path .= \"&subjectLine=\" . urlencode($subject);\n }\n\n if ($_POST['use_override'] && !empty($form)) {\n $path .= \"&override_form=$form&use_override=1\";\n }\n\n header(\"HTTP/1.x 301 Moved Permanently\");\n header(\"Status: 301\");\n header(\"Location: \".$path);\n header(\"Connection: close\");\n }\n\n $options = '';\n $form_select = '';\n\n // get available lists to create dropdown menu\n $bab_pm_lists = safe_query(\"select * from $bab_pm_PrefsTable\");\n\n while ($row = @mysqli_fetch_row($bab_pm_lists)) {\n $options .= \"<option>$row[1]</option>\";\n }\n\n $selection = '<select id=\"listToEmail\" name=\"listToEmail\">' . $options . '</select>';\n\n $form_list = safe_column('name', 'txp_form',\"name like 'newsletter-%'\");\n\n if (count($form_list) > 0) {\n foreach ($form_list as $form_item) {\n $form_options[] = \"<option>$form_item</option>\";\n }\n\n $form_select = '<select name=\"override_form\">' . join($form_options,\"\\n\") . '</select>';\n $form_select .= checkbox('use_override', '1', '').'Use override?';\n }\n\n if (isset($form_select) && !empty($form_select)) {\n $form_select = <<<END\n <div style=\"margin-top:5px\">\n Override form [optional]: $form_select\n </div>\nEND;\n }\n echo <<<END\n<form action=\"\" method=\"post\" accept-charset=\"utf-8\">\n <fieldset id=\"bab_pm_formsend\">\n <legend><span class=\"bab_pm_underhed\">Form-based Send</span></legend>\n <div style=\"margin-top:5px\">\n <label for=\"listToEmail\" class=\"listToEmail\">Select list:</label> $selection\n </div>\n $form_select\n <label for=\"sendFrom\" class=\"sendFrom\">Send From:</label><input type=\"text\" name=\"sendFrom\" value=\"\" id=\"sendFrom\" /><br />\n <label for=\"subjectLine\" class=\"subjectLine\">Subject Line:</label><input type=\"text\" name=\"subjectLine\" value=\"\" id=\"subjectLine\" /><br />\n\n <p><input type=\"submit\" name=\"bab_pm_radio\" value=\"Send to Test\" class=\"publish\" />\n &nbsp;&nbsp;\n <input type=\"submit\" name=\"bab_pm_radio\" value=\"Send to List\" class=\"publish\" /></p>\n </fieldset>\n</form>\nEND;\n}", "public function website() {\n\t\t\n\t\t$name \t\t= Input::get('name');\n\t\t$mailFrom \t= Input::get('email');\n\t\t$phone \t\t= Input::get('phone');\n\t\t$comments \t= Input::get('comments');\n\t\t$emailTo \t= '[email protected]';\n\t\t\n\t\t$subject = 'Contato realizado a partir do site Pifou por: ' . $name . '.';\n\t\t$vars = array(\n\t\t\t'name'\t\t=>\t$name,\n\t\t\t'email'\t\t=>\t$mailFrom,\n\t\t\t'phone'\t\t=>\t$phone,\n\t\t\t'comments'\t=>\t$comments,\n\t\t);\n\t\t\n EmailTemplate::SendByKey('contact_mail_user', $vars, $emailTo, null, null, $mailFrom);\n\t\t\n\t\treturn \"<fieldset><div id='success_page'><h4 class='highlight'>Obrigado, <strong>$name</strong>! Sua mensagem foi enviada. Entraremos em contato o mais rápido possível.</h4></div></fieldset>\";\n }", "function saveEvent(&$req, &$t) {\n\t\tif ( $this->isTrustFailure() ) {\n\t\t\tCgn_ErrorStack::throwError('Your message was not sent because it was not trusted by the server.', '601', 'sec');\n\t\t\t$this->mainEvent($req, $t);\n\t\t\t$myTemplate = Cgn_ObjectStore::getObject(\"object://defaultOutputHandler\");\n\t\t\t$myTemplate->contentTpl = 'userform_main';\n\t\t\t$this->eventName = 'main';\n\t\t\treturn;\n\t\t}\n\n\t\t$commentField = '';\n\t\tforeach ($req->postvars as $k=>$v) {\n\t\t\tif (strlen($k) == 18) {$commentField = $k;}continue;\n\t\t}\n\n\t\tif ( $commentField == '' || !($content = $req->cleanString($commentField))) {\n\t\t\tCgn_ErrorStack::throwError('Your message was not sent because you did not enter a comment.', '601', 'sec');\n\t\t\t$this->mainEvent($req, $t);\n\t\t\t$myTemplate = Cgn_ObjectStore::getObject(\"object://defaultOutputHandler\");\n\t\t\t$myTemplate->contentTpl = 'userform_main';\n\t\t\t$this->eventName = 'main';\n\t\t\treturn;\n\t\t}\n\n\t\tinclude_once(CGN_LIB_PATH.'/mxq/lib_cgn_mxq.php');\n\t\t//Cgn_ObjectStore::debug('config://email/default/contactus');\n\t\t$from = Cgn_ObjectStore::getConfig('config://default/email/contactus');\n\t\t$to = Cgn_ObjectStore::getConfig('config://default/email/contactus');\n\t\t$mail = new Cgn_Mxq_Message_Email();\n\t\t$mail->envelopeFrom = $from;\n\t\t$mail->envelopeTo = $to;\n\n\t\t$siteName = Cgn_ObjectStore::getString(\"config://template/site/name\");\n\t\t$name = trim($req->cleanString('name'));\n\t\tif ($name == '') {\n\t\t\t$name = trim($req->cleanString('contact_name'));\n\t\t}\n\t\t//save other random postvars\n\t\t$postVars = '';\n\t\t$skipVars = array('name', 'contact_name', 'email', 'phone', 'contactus_01_submit');\n\t\tforeach ($req->postvars as $k=>$v) {\n\t\t\tif (in_array($k, $skipVars)) continue;\n\t\t\tif (strlen($k) == 18) {$commentField = $k;continue;}\n\t\t\t$postVars .= $k.': '.trim($v).\"\\n\";\n\t\t}\n\n\t\t$mail->dataItem->msg_name = 'Message from contact us form from '.$siteName;\n\t\t$mail->dataItem->msg = 'Message from contact us form from '.$siteName.\"\\n\\n\";\n\t\t$mail->dataItem->msg .= 'Name: '.$name.\"\\n\";\n\t\t$mail->dataItem->msg .= 'Email: '.trim($req->cleanString('email')).\"\\n\";\n\t\t$mail->dataItem->msg .= 'Phone: '.trim($req->cleanString('phone')).\"\\n\";\n\t\t$mail->dataItem->msg .= $postVars.\"\\n\";\n\t\tif ($content = $req->cleanMultiLine($commentField)) {\n\t\t\t$mail->dataItem->msg .= trim($content).\"\\n\";\n\t\t}\n\t\t$mail->sendEmail();\n\n\t\t$this->presenter = 'redirect';\n\t\t$t['url'] = cgn_appurl('main', 'userform');\n\t\t$u = $req->getUser();\n\t\t$u->addSessionMessage(\"Thank you. Your message has been sent.\");\n\t}", "public function ga_email_callback()\n {\n printf(\n '<input type=\"email\" id=\"ga_email\" name=\"bpp_setting_options[ga_email]\" value=\"%s\" />',\n isset( $this->options['ga_email'] ) ? esc_attr( $this->options['ga_email']) : ''\n );\n }", "function contactSendMail()\r\n {\r\n $subject = 'Contact : ' . $_POST['contactNom'];\r\n $body = $_POST['contactMsg'];\r\n\r\n\r\n $this->sendMail($subject, $body);\r\n }", "function processMobileForm($args) {\n\t$errors = array();\n\tif(empty($args['contact_name'])) $errors[] = __('Name is required', 'sm');\n\tif(empty($args['contact_email'])) $errors[] = __('Email is not valid', 'sm');\n\telseif(!is_email($args['contact_email'])) $errors[] = __('Email address is not valid', 'sm');\n\tif(empty($args['contact_message'])) $errors[] = __('Message is required', 'sm');\n\telseif(strlen($args['contact_message']) < 10) $errors[] = __('Please give us more details in your message', 'sm');\n\tif($errors == array()) {\n\t\t$headers = 'From: '.esc_attr($args['contact_name']).' <'.$args['contact_email'].'>' . \"\\r\\n\";\n\t\t$message = 'You have a message from '.esc_attr($args['contact_name']). ' <'.$args['contact_email'].'>.'.PHP_EOL.PHP_EOL;\n\t\t$message .= 'Message: '.PHP_EOL.esc_textarea($args['contact_message']).PHP_EOL.PHP_EOL;\n\t\t$message .= 'Form submitted at http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];\n\t\t$mail1 = wp_mail(get_option('admin_email'), 'Mobile Form Submission from '.esc_attr($args['contact_name']), $message, $headers);\n\t\t$headers = 'From: '.get_option('blogname').' <'.get_option('admin_email').\">\\r\\n\";\n\t\t$message = 'Thank you for sending us a message, we will get back to you shortly.'.PHP_EOL.PHP_EOL;\n\t\t$message .= 'Message: '.PHP_EOL.esc_textarea($args['contact_message']).PHP_EOL.PHP_EOL;\n\t\t$message .= 'Form submitted at http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];\n\t\t$mail2 = wp_mail($args['contact_email'], 'We received your submission', $message, $headers);\n\t\tdbug('$mail1');\n\t\tdbug($mail1);\n\t\tdbug('$mail2');\n\t\tdbug($mail2);\n\t}\n\treturn $errors;\n}", "public function on_before_submit() {\n\t\t\n\t\t/*\n\t\tif (!some_function_to_validate_emails($_REQUEST['Question3'])) { \n\t\t\t$this->controller->errors['email'] = t('Please enter a valid email address');\n\t\t}\n\t\t*/\n\t}", "function call_mailer($mail,$fn,$email)\n {\n //Simfatic Forms saves email Name<email> form. The functions take the name and email seperate\n $arr = $this->addr($email);\n \n return $mail->$fn($arr[0],$arr[1]);\n }", "public function email()\n\t{\n\t\t$this->add('email', 'required', true, 'Email is required.');\n\t\t$this->add('email', 'regexp', '#^[^\\W][a-zA-Z0-9_]+(\\.[a-zA-Z0-9_]+)*\\@[a-zA-Z0-9_]+(\\.[a-zA-Z0-9_]+)*\\.[a-zA-Z]{2,4}$#', 'Bad Email format.');\n\t\t$this->add('email', 'max', 30, 'Bad Email length, no more than 30 characters.');\n\n\t\t$this->setInformation('email', 'Email format, no more than 30 characters...');\n\t}", "function enviar_contacto(){\n $this->asignar_ingreso();\n $nombre_sede = $this->sede;\n\n $resultado = $this->datoSede($nombre_sede);\n $cuerpo =\"<img src='http://prevaler.diazcreativos.net.ve/imagenes/PREVALER.png' /><br /><br />\n\t\t<u>Datos de Entrada:</u><br />\";\n $cuerpo .=\"<br />\";\n $cuerpo .= \"<strong>Nombre Completo: </strong>\".utf8_decode($this->nombre).\"<br />\" ;\n $cuerpo .= \"<strong>Número de telefono: </strong>\".$this->telefono.\"<br />\" ;\n $cuerpo .= \"<strong>E-mail: </strong>\".$this->email.\"<br />\" ;\n $cuerpo .= \"<strong>Mensaje: </strong>\".$this->comentario.\"<br />\";\n $cuerpo .= \"<br />\";\n $cuerpo .= \"---- Fin ----\";\n $cuerpo .= \"<br />\";\n $subject= \"Contacto Web Prevaler\";\n $subject2= \"Contacto Web Prevaler\";\n $basemailfor=$resultado['email_sede'];\n //$basemailfor=\"[email protected]\";\n $basemailfrom = $this->email;\n $respuesta =\"<img src='http://prevaler.diazcreativos.net.ve/imagenes/PREVALER.png' /><br />\n\t\t<strong>Saludos Sr(a).: $this->nombre $this->apellido</strong><br /><br />\n\t\tNosotros hemos recibido su mensaje, nuestro departamento de atención al cliente le responderá lo más pronto posible<br />\n\t\tGracias por contactar a Prevaler.<br />\n\t\tPrevaler<br /><br />\n\t\tTel&eacute;fonos: <br/>\n\t\t\".$resultado['telefono_sede'].\"<br />\n\t\tTwitter: <a href='https://twitter.com/Prevaler_VE'>@Prevaler_VE</a><br />\n\t\tInstagram: <a href='https://www.instagram.com/prevaler_ve/'>@prevaler_ve</a><br />\n\t\t\".$resultado['email_sede'].\"\n\t\t<br /><br />\n\t\tAtentamente,<br />\n\t\tClínica Prevaler.\";\n $this->mensaje=\"<strong>&iexcl;Excelente!</strong> Su Mensaje ha sido enviado exitosamente.\";\n\n $mail = new PHPMailer();\n $mail->From = $basemailfrom;\n $mail->FromName = utf8_decode($subject);\n $mail->AddAddress($basemailfor, $this->nombre.\" \".$this->apellido);\n $mail->Subject = utf8_decode($subject);\n $mail->Body = $cuerpo;\n $mail->AltBody = $cuerpo;\n $exito = $mail->Send();\n\n $mail2 = new PHPMailer();\n $mail2->From = $basemailfor;\n $mail2->FromName = utf8_decode($subject2);\n $mail2->AddAddress($basemailfrom, $this->nombre.\" \".$this->apellido);\n $mail2->Subject = utf8_decode($subject2);\n $mail2->Body = $respuesta;\n $mail2->AltBody = $respuesta;\n $exito = $mail2->Send();\n }", "function mailUser($email) {\n\t//echo \"mail user <br>\";\n\t$mail = getSocksMailer();\n\t$mail->Subject = \"Litesprite Survey Completed\";\n\t$mail->AddEmbeddedImage('../images/paw.png', 'paw');\n\t$mail->msgHTML(file_get_contents('../emails/postSurvey.html'), dirname(__FILE__));\n\t$mail->AddAddress($email);\n\tsendMail($mail);\n}", "function send_anon() {\n\n $input = $_POST['feedback'];\n $about = $_POST['about'];\n $relation = $_POST['relation'];\n\n\n\t\t$options = get_option('id_settings');\n $receiver = $options['id_anonymous_email_addresses_field'];\n\n\t\t$subject = 'Anonymous input form website';\n\n $body = \"<i>Sent using the contact form at \" . get_site_url() . \"</i>\" .\n \"<br><br>\" . esc_html($input) .\n \"<br><br>About: \" . esc_html($about) .\n \"<br><br>Relation: \" . esc_html($relation);\n\n\t\t$sender = \"Anonymous <[email protected]>\";\n\n\n\n return send_mail($receiver, $subject, $body, $sender);\n\n }", "function student_crm_webform_send_email_form() {\n $case = menu_get_object('crm_case', 2);\n \n $fields = field_info_instances();\n $fields = $fields['crm_case'][$case->type];\n $form_fields = array();\n $field_settings = array();\n if(!$fields) {\n return null;\n }\n foreach ($fields as $field_name => $field) {\n if ($field['settings']['webform']) {\n $form_fields[$field_name] = $field['label'];\n $field_settings[$field_name] = $field['settings']['email_address'];\n }\n }\n if (!count($form_fields)) {\n \n return array('message' => array('#markup' => \n '<div class=\"empty\">' . t('No forms for this item') . '</div>'));\n }\n drupal_add_js(drupal_get_path('module', 'student_crm_webform') . '/js/student_crm_webform.send_form.js');\n drupal_add_js(array('studentCRMWebformSettings' => $field_settings), 'setting');\n $form = array();\n \n $form['case'] = array(\n '#type' => 'hidden',\n '#value' => $case->cid,\n );\n \n $form['field'] = array(\n '#type' => 'select',\n '#title' => 'Select the type of form to send',\n '#options' => $form_fields,\n );\n \n $form['manual-email'] = array(\n '#type' => 'textfield',\n '#title' => 'Email address',\n );\n \n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => 'Send form',\n );\n \n return $form;\n}", "private function create_contact($post) {\n // loop through all the valid email addresses and see if they match the input\n $name = '';\n $valid_email = '';\n $user = new Model_Users();\n foreach (array_keys($post) as $post_input_name) {\n // post variable must contain email address and name, must be a valid email address, and must not exist in DB already\n if(strpos($post_input_name, 'form_name') || strpos($post_input_name, 'form_first_name')) {\n if (strpos($post_input_name, 'form_name') ) {\n $name = $post[$post_input_name];\n } elseif(isset($post['contact_form_first_name'])) {\n $name = $post['contact_form_first_name'] . ' ' . $post['contact_form_last_name'];\n } elseif(strpos($post_input_name, 'form_first_name')) {\n $name = $post[$post_input_name] . ' ' . $post[str_replace('first_name', 'last_name', $post_input_name)];\n }\n } else if(strpos($post_input_name, 'email_address')\n && filter_var($post[$post_input_name], FILTER_VALIDATE_EMAIL)\n && (Model_Contacts3::get_existing_contact_by_email_and_mobile($post[$post_input_name]) == null && $user->get_user_by_email($post[$post_input_name]) === false)) {\n $valid_email = $post[$post_input_name];\n }\n if(!empty($name) && !empty($valid_email)) {\n // we assume the last word after the space is the last name\n $name_array = explode(\" \", $name);\n $last_name = end($name_array);\n \n $family = new Model_Family();\n $family->set_family_name($last_name);\n if (Settings::instance()->get('contacts_create_family') == 1) {\n $family->save();\n }\n\n $contact = new Model_Contacts3();\n// $contact->set_family_id($family->get_id());\n // pop last name from the array\n $pos = array_search($last_name, $name_array);\n unset($name_array[$pos]);\n // first name is the rest (or an empty string is nothing's left)\n $first_name = (count($name_array) == 0) ? '' : implode(\" \", $name_array);\n $contact->set_first_name($first_name);\n $contact->set_last_name($last_name);\n $contact->set_date_of_birth(null);\n $contact->insert_notification(array(\n 'contact_id' => 0,\n 'notification_id' => 1,\n 'value' => $valid_email\n ));\n if (@$post['contact_form_tel']) {\n $contact->insert_notification(array(\n 'contact_id' => 0,\n 'notification_id' => 3,\n 'value' => $post['contact_form_tel']\n ));\n }\n if(@$post['contact_form_mobile']) {\n $contact->insert_notification(array(\n 'contact_id' => 0,\n 'notification_id' => 2,\n 'country_dial_code' => @$post['contact_form_mobile_country_code'],\n 'dial_code' => trim(@$post['contact_form_mobile_code']),\n 'value' => trim(@$post['contact_form_mobile'])\n ));\n }\n $contact->set_family_id($family->get_id());\n\n if (Settings::instance()->get('contacts_create_family') == 1) {\n $contact->set_type(Model_Contacts3::find_type('Family')['contact_type_id']);\n $contact->set_subtype_id(0);\n } else {\n $contact->set_type(Model_Contacts3::find_type('Student')['contact_type_id']);\n $contact->set_subtype_id(1);\n }\n if($post['trigger'] == 'add_to_list') {\n $contact->set_preferences(\n array(\n 'preference_id' => Model_Preferences::get_stub_id('marketing_updates'),\n 'notification_type' => 'email',\n 'value' => 1\n )\n );\n $contact->append_tags(Model_Contacts3_Tag::get_tag_by_name('newsletter_signup'));\n } else if ($post['trigger'] == 'contact_us' || $post['formbuilder_id'] == 'Contact Us') {\n $contact->append_tags(Model_Contacts3_Tag::get_tag_by_name('contact_us_enquiry'));\n } else {\n $contact->append_tags(Model_Contacts3_Tag::get_tag_by_name('other_form_registration'));\n }\n $contact->trigger_save = false;\n $contact->set_is_primary(1);\n $contact->save();\n \n break;\n }\n }\n }", "function do_form_additional_emails($s_id) {\n\t# Dim some Vars:\n\t\tglobal $_TCFG, $_DBCFG, $db_coin, $_LANG, $_nl, $_sp;\n\n\t# Build common td start tag / col strings (reduce text)\n\t\t$_td_str_left\t= '<td class=\"TP1SML_NL\">'.$_nl;\n\t\t$_td_str_ctr\t= '<td class=\"TP1SML_NC\">'.$_nl;\n\n\t# Build table row beginning and ending\n\t\t$_cstart = '<b>'.$_LANG['_ADMIN']['l_Email_Address_Additional'].$_sp.'</b><br>'.$_nl;\n\t\t$_cstart .= '<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\"><tr>'.$_nl;\n\t\t$_cstart .= $_td_str_left.$_LANG['_ADMIN']['l_First_Name'].'</td>'.$_nl;\n\t\t$_cstart .= $_td_str_left.$_LANG['_ADMIN']['l_Last_Name'].'</td>'.$_nl;\n\t\t$_cstart .= $_td_str_left.$_LANG['_ADMIN']['l_Email_Address'].'</td>'.$_nl;\n\t\t$_cstart .= $_td_str_ctr.$_LANG['_CCFG']['Actions'].'</td></tr>'.$_nl;\n\n\t\t$_cend = '</table>'.$_nl;\n\n\t# Set Query for select (additional emails).\n\t\t$query = 'SELECT *';\n\t\t$query .= ' FROM '.$_DBCFG['suppliers_contacts'];\n\t\t$query .= ' WHERE contacts_s_id='.$s_id;\n\t\t$query .= ' ORDER BY contacts_email ASC';\n\n\t# Do select and return check\n\t\tIF (is_numeric($s_id)) {\n\t\t\t$result\t= $db_coin->db_query_execute($query);\n\t\t\t$numrows\t= $db_coin->db_query_numrows($result);\n\t\t}\n\t# Process query results\n\t\tIF ($numrows) {\n\t\t\t$button = str_replace('<img src=\"', '', $_TCFG['_IMG_SAVE_S']);\n\t\t\twhile ($row = $db_coin->db_fetch_array($result)) {\n\n\t\t\t# Display the \"edit/delete data\" form for this row\n\t\t\t\t$_out .= '<form method=\"POST\" action=\"admin.php\">'.$_nl;\n\t\t\t\t$_out .= '<input type=\"hidden\" name=\"s_id\" value=\"'.$s_id.'\">'.$_nl;\n\t\t\t\t$_out .= '<input type=\"hidden\" name=\"stage\" value=\"\">'.$_nl;\n\t\t\t\t$_out .= '<input type=\"hidden\" name=\"op\" value=\"ae_mail_update\">'.$_nl;\n\t\t\t\t$_out .= '<input type=\"hidden\" name=\"contacts_id\" value=\"'.$row['contacts_id'].'\">'.$_nl;\n\t\t\t\t$_out .= '<input type=\"hidden\" name=\"cp\" value=\"suppliers\">'.$_nl;\n\t\t\t\t$_out .= '<tr>'.$_nl;\n\t\t\t\t$_out .= $_td_str_left.'<input class=\"PSML_NL\" type=\"text\" name=\"ae_fname\" size=\"15\" value=\"'.htmlspecialchars($row['contacts_name_first']).'\"></td>'.$_nl;\n\t\t\t\t$_out .= $_td_str_left.'<input class=\"PSML_NL\" type=\"text\" name=\"ae_lname\" size=\"15\" value=\"'.htmlspecialchars($row['contacts_name_last']).'\"></td>'.$_nl;\n\t\t\t\t$_out .= $_td_str_left.'<input class=\"PSML_NL\" type=\"text\" name=\"ae_email\" size=\"35\" value=\"'.htmlspecialchars($row['contacts_email']).'\"></td>'.$_nl;\n\t\t\t\t$_out .= $_td_str_left.'&nbsp;&nbsp;&nbsp;'.$_nl;\n\n\t\t\t# Display \"update\" button\n\t\t\t\t$_out .= '<input type=\"image\" src=\"'.$button.$_nl;\n\n\t\t\t# Display \"Delete\" button\n\t\t\t\t$_out .= '&nbsp;<a href=\"admin.php?cp=suppliers&op=ae_mail_delete&stage=0&s_id='.$s_id.'&contacts_id='.$row['contacts_id'].'\">'.$_TCFG['_IMG_DEL_S'].'</a>'.$_nl;\n\n\t\t\t# End row\n\t\t\t\t$_out .= '</td></tr></form>'.$_nl;\n\t\t\t}\n\t\t}\n\n\t# Display form for adding a new entry\n\t\t$button = str_replace('<img src=\"', '', $_TCFG['_IMG_ADD_S']);\n\t\t$_out .= '<form method=\"POST\" action=\"'.$_SERVER['PHP_SELF'].'\">'.$_nl;\n\t\t$_out .= '<input type=\"hidden\" name=\"s_id\" value=\"'.$s_id.'\">'.$_nl;\n\t\t$_out .= '<input type=\"hidden\" name=\"stage\" value=\"\">'.$_nl;\n\t\t$_out .= '<input type=\"hidden\" name=\"cp\" value=\"suppliers\">'.$_nl;\n\t\t$_out .= '<input type=\"hidden\" name=\"op\" value=\"ae_mail_add\">'.$_nl;\n\t\t$_out .= '<tr>'.$_nl;\n\t\t$_out .= $_td_str_left.'<input class=\"PSML_NL\" type=\"text\" name=\"new_ae_fname\" size=\"15\" value=\"\"></td>'.$_nl;\n\t\t$_out .= $_td_str_left.'<input class=\"PSML_NL\" type=\"text\" name=\"new_ae_lname\" size=\"15\" value=\"\"></td>'.$_nl;\n\t\t$_out .= $_td_str_left.'<input class=\"PSML_NL\" type=\"text\" name=\"new_ae_email\" size=\"35\" value=\"\"></td>'.$_nl;\n\t\t$_out .= $_td_str_left.'&nbsp;&nbsp;&nbsp;'.$_nl;\n\t\t$_out .= '<input type=\"image\" src=\"'.$button.'</td></tr></form>'.$_nl;\n\n\t# Build return string\n\t\t$returning = $_cstart.$_out.$_cend;\n\n\t# Return the form\n\t\treturn $returning;\n}", "function _os2dagsorden_create_agenda_meeting_create_user_form_submit($form, &$form_state) {\r\n // Create user.\r\n $values = $form_state['values'];\r\n $email = $values['email'];\r\n $full_name = $values['firstname'] . ' ' . $values['lastname'];\r\n $password = user_password(8);\r\n $fields = array(\r\n 'name' => $email,\r\n 'pass' => $password,\r\n 'mail' => $email,\r\n 'status' => 1,\r\n 'init' => 'email address',\r\n 'field_user_full_name' => array(LANGUAGE_NONE => array(array('value' => $full_name))),\r\n 'field_user_external' => array(LANGUAGE_NONE => array(array('value' => 1))),\r\n );\r\n $account = user_save('', $fields);\r\n // Send notification email.\r\n drupal_mail('user', 'password_reset', $email, NULL, array('account' => $account), variable_get('site_mail', ''));\r\n\r\n $form_state['input'] = (array) json_decode($form_state['meeting_data']);\r\n $participants = explode(',', $form_state['input']['participants_hidden']);\r\n $participants[] = $account->uid;\r\n $participants = array_diff($participants, array(''));\r\n $form_state['input']['participants_hidden'] = implode(',', $participants);\r\n if (isset($form_state['input']['start_date'])) {\r\n $timestamp = strtotime($form_state['input']['start_date']);\r\n $form_state['input']['start_date'] = array (\r\n 'date' => date('d/m/Y', $timestamp),\r\n 'time' => date('H:i', $timestamp)\r\n );\r\n }\r\n $form_state['page_num'] = 1;\r\n $form_state['rebuild'] = TRUE;\r\n\r\n}", "function edd_pup_send_test_email() {\n\t$form = array();\n\tparse_str( $_POST['form'], $form );\n\n\tif ( empty( $form['edd-pup-test-nonce'] ) || ! wp_verify_nonce( $form['edd-pup-test-nonce'], 'edd-pup-send-test-email' ) ) {\n\t\t_e( 'Nonce failure. Invalid response from server when trying to send test email. Please try again or contact support.', 'edd-pup');\n\t\tdie();\n\t}\n\n\n\t$error = 0;\n\n\tif ( empty( $form['test-email'] ) ) {\n\t\t_e( 'Please enter an email address to send the test to.', 'edd-pup' );\n\t} else {\n\n\t\t$emails = explode( ',', $form['test-email'], 6 );\n\n\t\tif ( count( $emails ) > 5 ) {\n\t\t\tarray_pop( $emails );\n\t\t}\n\n\t\t// Sanitize our email addresses to make sure they're valid\n\t\tforeach ( $emails as $key => $address ) {\n\t\t\t$clean = sanitize_email( $address );\n\n\t\t\tif ( is_email( $clean ) ) {\n\t\t\t\t$to[$key] = $clean;\n\t\t\t} else {\n\t\t\t\t$error++;\n\t\t\t}\n\t\t}\n\n\t\tif ( !empty( $to ) ) {\n\t\t\t$email_id = edd_pup_sanitize_save( $_POST );\n\n\t\t\t// Set transient for custom tags in test email\n\t\t\tset_transient( 'edd_pup_preview_email_'. get_current_user_id(), $email_id, 60 );\n\n\t\t\t// Send a test email\n\t \t$sent = edd_pup_test_email( $email_id, $to );\n\n\t\t\t// Instruct browser to redirect for continued editing of email\n\t\t\tparse_str( $_POST['url'], $url );\n\t\t\tif ( $url['view'] == 'add_pup_email' ) {\n\t\t\t\techo absint( $email_id );\n\t\t\t\tdie();\n\t\t\t}\n\n\t \tif ( $error > 0 ) {\n\t\t\t\t_e( 'One or more of the emails entered were invalid. Test emails sent to: ' . implode(', ', $sent), 'edd-pup' );\n\t \t} else {\n\n\t\t\t\t_e( 'Test email sent to: ' . implode(', ', $sent), 'edd-pup' );\n\t\t\t}\n\n\t\t} else if ( empty( $to ) && $error > 0 ) {\n\t\t\t_e( 'Your email address was invalid. Please enter a valid email address to send the test.', 'edd-pup' );\n\t\t}\n\n\t}\n\n die();\n}", "function info2()\r\n {\r\n //and send user to orderForm2\r\n if($_SERVER['REQUEST_METHOD'] == 'POST')\r\n {\r\n $userMail = $_POST['email'];\r\n $userSeeking = $_POST['seeking'];\r\n $userBio = $_POST['bio'];\r\n $userState = $_POST['state'];\r\n\r\n if(validEmail($_POST['email'])) {\r\n $_SESSION['dating']->setEmail($userMail);\r\n }\r\n //Otherwise, set an error variable in the hive\r\n else {\r\n $this->_f3->set('errors[\"email\"]', 'Please enter a valid Email');\r\n }\r\n\r\n $_SESSION['dating']->setSeeking($userSeeking);\r\n $_SESSION['dating']->setBio($userBio);\r\n $_SESSION['dating']->setState($userState);\r\n\r\n if (empty($this->_f3->get('errors'))) {\r\n header('location: info3');\r\n }\r\n }\r\n\r\n $this->_f3->set('userMail', $userMail);\r\n\r\n\r\n\r\n $view = new Template();\r\n echo $view->render('views/info2.html');\r\n }", "function do_contact_supplier_form($adata, $aerr_entry, $aret_flag=0) {\n\t# Dim some Vars:\n\t\tglobal $_CCFG, $_TCFG, $_DBCFG, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp;\n\n\t# Some HTML Strings (reduce text)\n\t\t$_td_str_left_vtop\t= '<td class=\"TP1SML_NR\" width=\"30%\" valign=\"top\">';\n\t\t$_td_str_left\t\t= '<td class=\"TP1SML_NR\" width=\"30%\">';\n\t\t$_td_str_right\t\t= '<td class=\"TP1SML_NL\" width=\"70%\">';\n\n\t# Build Title String, Content String, and Footer Menu String\n\t\t$_tstr .= $_CCFG['_PKG_NAME_SHORT'].$_sp.$_LANG['_MAIL']['Contact_Supplier_Form'].$_sp.'('.$_LANG['_MAIL']['all_fields_required'].')';\n\n\t# Do data entry error string check and build\n\t\tIF ($aerr_entry['flag']) {\n\t\t \t$err_str = $_LANG['_MAIL']['CC_FORM_ERR_HDR1'].'<br>'.$_LANG['_MAIL']['CC_FORM_ERR_HDR2'].'<br>'.$_nl;\n\n\t \t\tIF ($aerr_entry['cc_s_id']) \t{$err_str .= $_LANG['_MAIL']['CS_FORM_ERR_ERR01']; $err_prv = 1;}\n\t\t\tIF ($aerr_entry['cc_mc_id']) \t{IF ($err_prv) {$err_str .= ', ';} $err_str .= $_LANG['_MAIL']['CC_FORM_ERR_ERR02']; $err_prv = 1;}\n\t\t\tIF ($aerr_entry['cc_subj']) \t{IF ($err_prv) {$err_str .= ', ';} $err_str .= $_LANG['_MAIL']['CC_FORM_ERR_ERR03']; $err_prv = 1;}\n\t\t\tIF ($aerr_entry['cc_msg']) \t{IF ($err_prv) {$err_str .= ', ';} $err_str .= $_LANG['_MAIL']['CC_FORM_ERR_ERR04']; $err_prv = 1;}\n\n\t \t\t$_cstr .= '<p align=\"center\"><b>'.$err_str.'</b>'.$_nl;\n\t\t}\n\n\t# Formatting tweak for spacing\n\t\tIF ($aerr_entry['flag']) {$_cstr .= '<br><br>'.$_nl;}\n\n\t\t$_cstr .= '<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"5\">'.$_nl;\n\t\t$_cstr .= '<tr><td align=\"center\">'.$_nl;\n\t\t$_cstr .= '<form action=\"mod.php\" method=\"post\" name=\"supplier\">'.$_nl;\n\t\t$_cstr .= '<input type=\"hidden\" name=\"mod\" value=\"mail\">'.$_nl;\n\t\t$_cstr .= '<input type=\"hidden\" name=\"mode\" value=\"supplier\">'.$_nl;\n\t\t$_cstr .= '<table width=\"100%\" cellspacing=\"0\" cellpadding=\"5\">'.$_nl;\n\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left.$_nl;\n\t\t$_cstr .= '<b>'.$_LANG['_MAIL']['l_To_Supplier'].$_sp.'</b>'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t$_cstr .= do_select_list_suppliers('cc_s_id', $adata['cc_s_id'], '1').$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= '</tr>'.$_nl;\n\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left.$_nl;\n\t\t$_cstr .= '<b>'.$_LANG['_MAIL']['l_From'].$_sp.'</b>'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t$_cstr .= do_select_list_mail_contacts('cc_mc_id', $adata['cc_mc_id']);\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= '</tr>'.$_nl;\n\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left.$_nl;\n\t\t$_cstr .= '<b>'.$_LANG['_MAIL']['l_Subject'].$_sp.'</b>'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t$_cstr .= '<INPUT class=\"PSML_NL\" TYPE=TEXT name=\"cc_subj\" size=\"30\" maxlength=\"50\" value=\"'.htmlspecialchars($adata['cc_subj']).'\">'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= '</tr>'.$_nl;\n\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left_vtop.$_nl;\n\t\t$_cstr .= '<b>'.$_LANG['_MAIL']['l_Message'].$_sp.'</b>'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\tIF ($_CCFG['WYSIWYG_OPEN']) {$_cols = 100;} ELSE {$_cols = 75;}\n\t\t$_cstr .= '<TEXTAREA class=\"PSML_NL\" NAME=\"cc_msg\" COLS=\"'.$_cols.'\" ROWS=\"15\">'.$adata['cc_msg'].'</TEXTAREA>'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= '</tr>'.$_nl;\n\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left.$_nl;\n\t\t$_cstr .= '<INPUT TYPE=hidden name=\"stage\" value=\"1\">'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t$_cstr .= do_input_button_class_sw('b_email', 'SUBMIT', $_LANG['_MAIL']['B_Send_Email'], 'button_form_h', 'button_form', '1').$_nl;\n\t\t$_cstr .= do_input_button_class_sw('b_reset', 'RESET', $_LANG['_MAIL']['B_Reset'], 'button_form_h', 'button_form', '1').$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\n\t\t$_cstr .= '</tr>'.$_nl;\n\t\t$_cstr .= '</table>'.$_nl;\n\t\t$_cstr .= '</form>'.$_nl;\n\t\t$_cstr .= '</td></tr>'.$_nl;\n\t\t$_cstr .= '</table>'.$_nl;\n\n\t\t$_mstr_flag\t= 0;\n\t\t$_mstr \t\t= ''.$_nl;\n\n\t# Call block it function\n\t\t$_out .= do_mod_block_it($_tstr, $_cstr, $_mstr_flag, $_mstr, '1');\n\t\t$_out .= '<br>'.$_nl;\n\n\t# Return / Echo Final Output\n\t\tIF ($aret_flag) {return $_out;} ELSE {echo $_out;}\n}", "public function contactUs($data) {\n $name = $data[0];\n $email = $data[1];\n $phone=$data[2];\n $question = $data[3];\n $this->Email->from(array($email => $name));\n $this->Email->bcc(array($this->concierge => 'Concierge'));\n $this->Email->to(Configure::read('Email.contact'));\n $this->Email->emailFormat('both');\n $this->Email->subject('New message from Contact');\n $this->Email->template('contactUs');\n $this->Email->viewVars(array('messageData' => $data));\n return $this->Email->send();\n }", "public function mailProccess(){\n\n //dd($this->request->getPost());\n \n\t\t$email = \\Config\\Services::email();\n\n //dd($email);\n\n\t\t$to = $this->request->getPost('to');\n\t\t$from = $this->request->getPost('form');\n\t\t$subject = $this->request->getPost('subject');\n\t\t$message = $this->request->getPost('msg');\n\n\t\t$email->setTo($to);\n\t\t$email->setFrom($from);\n\t\t$email->setSubject($subject);\n\t\t$email->setMessage($message);\n\n\t\tif($email->send() == false){\n echo \"Failed\";\n $data = $email->printDebugger(['headers']);\n print_r($data);\n\t\t}else echo \"Mail sent successfully !\";\n\t}", "function sendEmail($user, $email, $loginInfo){\n\t$to = $email; // Send email to our user\n\t$subject = 'Signup | Verification'; // Give the email a subject \n\t$message = '\n\t \n\tThanks for signing up!\n\tYour account has been created, please verify your account in order to set up your password for your login.\n\t \n\t------------------------\n\tUsername: '.$user.'\n\tPassword: To be added\n\t------------------------\n\t \n\tPlease click this link to activate your account:\n\thttps://www.kobackproducts.ca/editoroverlay/verify.php?email='.$email.'&hash='.$loginInfo.''; // Our message above including the link\n\t\n\t$headers = 'From:[email protected]' . \"\\r\\n\"; // Set from headers\n\tmail($to, $subject, $message, $headers); // Send our email\n\t\n}", "function message_notify_rules_process(Message $message, $save_on_fail, $save_on_success, $rendered_subject_field, $rendered_body_field, $mail = FALSE) {\n $options = array(\n 'save on fail' => $save_on_fail,\n 'save on success' => $save_on_success,\n );\n\n if ($rendered_subject_field && $rendered_body_field) {\n $options['rendered fields'] = array(\n 'message_notify_email_subject' => $rendered_subject_field,\n 'message_notify_email_body' => $rendered_body_field,\n );\n }\n\n if ($mail) {\n $options['mail'] = str_replace(array(\"\\r\", \"\\n\"), '', $mail);\n }\n\n message_notify_send_message($message, $options, 'email');\n}", "function clsRecordemails()\r\n {\r\n\r\n global $FileName;\r\n $this->Visible = true;\r\n $this->Errors = new clsErrors();\r\n $this->ds = new clsemailsDataSource();\r\n $this->ReadAllowed = false;\r\n $this->InsertAllowed = false;\r\n $this->UpdateAllowed = false;\r\n $this->DeleteAllowed = false;\r\n $this->Visible = (CCSecurityAccessCheck(\"1;2\") == \"success\");\r\n if($this->Visible)\r\n {\r\n $this->ReadAllowed = CCUserInGroups(CCGetGroupID(), \"1;2\");\r\n $this->InsertAllowed = CCUserInGroups(CCGetGroupID(), \"1;2\");\r\n $this->ComponentName = \"emails\";\r\n $this->HTMLFormAction = $FileName . \"?\" . CCAddParam(CCGetQueryString(\"QueryString\", \"\"), \"ccsForm\", $this->ComponentName);\r\n $CCSForm = CCGetFromGet(\"ccsForm\", \"\");\r\n $this->FormSubmitted = ($CCSForm == $this->ComponentName);\r\n $Method = $this->FormSubmitted ? ccsPost : ccsGet;\r\n $this->message = new clsControl(ccsTextArea, \"message\", \"Message\", ccsMemo, \"\", CCGetRequestParam(\"message\", $Method));\r\n $this->Insert = new clsButton(\"Insert\");\r\n $this->item_id = new clsControl(ccsHidden, \"item_id\", \"Item Id\", ccsInteger, \"\", CCGetRequestParam(\"item_id\", $Method));\r\n $this->to_user_id = new clsControl(ccsHidden, \"to_user_id\", \"To User Id\", ccsInteger, \"\", CCGetRequestParam(\"to_user_id\", $Method));\r\n $this->from_user_id = new clsControl(ccsHidden, \"from_user_id\", \"From User Id\", ccsInteger, \"\", CCGetRequestParam(\"from_user_id\", $Method));\r\n $this->emaildate = new clsControl(ccsHidden, \"emaildate\", \"date\", ccsInteger, \"\", CCGetRequestParam(\"emaildate\", $Method));\r\n $this->subject = new clsControl(ccsHidden, \"subject\", \"Subject\", ccsText, \"\", CCGetRequestParam(\"subject\", $Method));\r\n if(!$this->FormSubmitted) {\r\n if(!strlen($this->from_user_id->GetValue()))\r\n $this->from_user_id->SetValue(CCGetUserID());\r\n if(!strlen($this->emaildate->GetValue()))\r\n $this->emaildate->SetValue(time());\r\n }\r\n }\r\n }", "function student_crm_webform_send_email_form_validate($form, $form_state) {\n if (strlen(trim($form_state['values']['manual-email'])) != '' && !valid_email_address($form_state['values']['manual-email'])) {\n form_set_error('manual-email', t('The provided email address is not valid.'));\n }\n}", "public function askEmail()\n {\n $this->ask('What is your email?', function (Answer $answer) {\n $this->user->email = $answer->getText();\n\n $user = User::where('email', $this->user->email)->first();\n\n if (isset($user)) {\n $this->repeat('Sorry this email is already in use. Please enter a valid email.');\n } else {\n $this->askPassword();\n }\n });\n }", "function getEmail($form){\n $email = '';\n \n if (isset($form)\n && $form != ''){\n foreach ($form as $field){\n if ($field['is_email'] == 'true'){\n $email = $field['value'];\n break;\n }\n }\n }\n \n return $email;\n }" ]
[ "0.67817247", "0.66562563", "0.6645356", "0.65767425", "0.65657663", "0.65543866", "0.6529547", "0.65131605", "0.6491126", "0.6484746", "0.64667165", "0.6447171", "0.63753474", "0.63661283", "0.6356958", "0.6346089", "0.6338134", "0.6310158", "0.6292566", "0.6273778", "0.6264417", "0.62643576", "0.6257358", "0.6257045", "0.62481", "0.6230816", "0.6223242", "0.6195987", "0.61905295", "0.6160754", "0.6146464", "0.61402124", "0.6120376", "0.6119499", "0.6114951", "0.61149293", "0.6095525", "0.60868067", "0.60431266", "0.6027278", "0.60269314", "0.6021241", "0.6011991", "0.5964474", "0.59450734", "0.59420234", "0.59408355", "0.5937135", "0.5933026", "0.59283656", "0.5914792", "0.59131986", "0.5909624", "0.59055907", "0.589274", "0.58852774", "0.5879863", "0.5879844", "0.58757734", "0.5874964", "0.5873268", "0.5871833", "0.5867361", "0.58658737", "0.58618206", "0.5860188", "0.58539623", "0.58502424", "0.5850006", "0.5848138", "0.58458334", "0.58397406", "0.5838743", "0.5829375", "0.5829333", "0.5824109", "0.5820927", "0.58157456", "0.5805832", "0.57975334", "0.57898664", "0.57805604", "0.5778939", "0.577874", "0.5776597", "0.57703227", "0.57671183", "0.5764201", "0.57579297", "0.57549393", "0.5754632", "0.5746161", "0.5745306", "0.5740922", "0.57375294", "0.5736674", "0.57309365", "0.5728377", "0.57163376", "0.5715954" ]
0.65685135
4
Do contact client form (contact site to user / client)
function do_contact_client_form($adata, $aerr_entry, $aret_flag=0) { # Dim some Vars: global $_CCFG, $_TCFG, $_DBCFG, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp; # Some HTML Strings (reduce text) $_td_str_left_vtop = '<td class="TP1SML_NR" width="30%" valign="top">'; $_td_str_left = '<td class="TP1SML_NR" width="30%">'; $_td_str_right = '<td class="TP1SML_NL" width="70%">'; # Build Title String, Content String, and Footer Menu String $_tstr .= $_CCFG['_PKG_NAME_SHORT'].$_sp.$_LANG['_MAIL']['Contact_Client_Form'].$_sp.'('.$_LANG['_MAIL']['all_fields_required'].')'; # Do data entry error string check and build IF ($aerr_entry['flag']) { $err_str = $_LANG['_MAIL']['CC_FORM_ERR_HDR1'].'<br>'.$_LANG['_MAIL']['CC_FORM_ERR_HDR2'].'<br>'.$_nl; IF ($aerr_entry['cc_cl_id']) {$err_str .= $_LANG['_MAIL']['CC_FORM_ERR_ERR01']; $err_prv = 1;} IF ($aerr_entry['cc_mc_id']) {IF ($err_prv) {$err_str .= ', ';} $err_str .= $_LANG['_MAIL']['CC_FORM_ERR_ERR02']; $err_prv = 1;} IF ($aerr_entry['cc_subj']) {IF ($err_prv) {$err_str .= ', ';} $err_str .= $_LANG['_MAIL']['CC_FORM_ERR_ERR03']; $err_prv = 1;} IF ($aerr_entry['cc_msg']) {IF ($err_prv) {$err_str .= ', ';} $err_str .= $_LANG['_MAIL']['CC_FORM_ERR_ERR04']; $err_prv = 1;} $_cstr .= '<p align="center"><b>'.$err_str.'</b>'.$_nl; } # Formatting tweak for spacing IF ($aerr_entry['flag']) {$_cstr .= '<br><br>'.$_nl;} $_cstr .= '<table width="100%" border="0" cellspacing="0" cellpadding="5">'.$_nl; $_cstr .= '<tr><td align="center">'.$_nl; $_cstr .= '<form action="mod.php" method="post" name="client">'.$_nl; $_cstr .= '<input type="hidden" name="mod" value="mail">'.$_nl; $_cstr .= '<input type="hidden" name="mode" value="client">'.$_nl; $_cstr .= '<table width="100%" cellspacing="0" cellpadding="5">'.$_nl; $_cstr .= '<tr>'.$_nl; $_cstr .= $_td_str_left.$_nl; $_cstr .= '<b>'.$_LANG['_MAIL']['l_To_Client'].$_sp.'</b>'.$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= $_td_str_right.$_nl; $_cstr .= do_select_list_clients('cc_cl_id', $adata['cc_cl_id'], '1').$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= '</tr>'.$_nl; $_cstr .= '<tr>'.$_nl; $_cstr .= $_td_str_left.$_nl; $_cstr .= '<b>'.$_LANG['_MAIL']['l_From'].$_sp.'</b>'.$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= $_td_str_right.$_nl; $_cstr .= do_select_list_mail_contacts('cc_mc_id', $adata['cc_mc_id']); $_cstr .= '</td>'.$_nl; $_cstr .= '</tr>'.$_nl; $_cstr .= '<tr>'.$_nl; $_cstr .= $_td_str_left.$_nl; $_cstr .= '<b>'.$_LANG['_MAIL']['l_Subject'].$_sp.'</b>'.$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= $_td_str_right.$_nl; $_cstr .= '<INPUT class="PSML_NL" TYPE=TEXT name="cc_subj" size="30" maxlength="50" value="'.htmlspecialchars($adata['cc_subj']).'">'.$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= '</tr>'.$_nl; $_cstr .= '<tr>'.$_nl; $_cstr .= $_td_str_left_vtop.$_nl; $_cstr .= '<b>'.$_LANG['_MAIL']['l_Message'].$_sp.'</b>'.$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= $_td_str_right.$_nl; IF ($_CCFG['WYSIWYG_OPEN']) {$_cols = 120;} ELSE {$_cols = 80;} $_cstr .= '<TEXTAREA class="PSML_NL" NAME="cc_msg" COLS="'.$_cols.'" ROWS="15">'.$adata['cc_msg'].'</TEXTAREA>'.$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= '</tr>'.$_nl; $_cstr .= '<tr>'.$_nl; $_cstr .= $_td_str_left.$_nl; $_cstr .= '<INPUT TYPE=hidden name="stage" value="1">'.$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= $_td_str_right.$_nl; $_cstr .= do_input_button_class_sw('b_email', 'SUBMIT', $_LANG['_MAIL']['B_Send_Email'], 'button_form_h', 'button_form', '1').$_nl; $_cstr .= do_input_button_class_sw('b_reset', 'RESET', $_LANG['_MAIL']['B_Reset'], 'button_form_h', 'button_form', '1').$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= '</tr>'.$_nl; $_cstr .= '</table>'.$_nl; $_cstr .= '</form>'.$_nl; $_cstr .= '</td></tr>'.$_nl; $_cstr .= '</table>'.$_nl; $_mstr_flag = 0; $_mstr = ''.$_nl; # Call block it function $_out .= do_mod_block_it($_tstr, $_cstr, $_mstr_flag, $_mstr, '1'); $_out .= '<br>'.$_nl; # Return / Echo Final Output IF ($aret_flag) {return $_out;} ELSE {echo $_out;} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function contact_form()\n\t{\n\t\tif ($this->errstr)\n\t\t{\n\t\t\tFsb::$tpl->set_switch('error');\n\t\t}\n\n\t\tFsb::$tpl->set_file('user/user_contact.html');\n\t\tFsb::$tpl->set_vars(array(\n\t\t\t'ERRSTR' =>\t\t\tHtml::make_errstr($this->errstr),\n\t\t));\n\t\t\n\t\t// Champs contacts crees par l'administrateur\n\t\tProfil_fields_forum::form(PROFIL_FIELDS_CONTACT, 'contact', Fsb::$session->id());\n\t}", "public function actionContact()\n\t{\n\t\t$model = new ContactForm;\n\t\tif (isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes = $_POST['ContactForm'];\n\t\t\tif ($model->validate())\n\t\t\t{\n\t\t\t\t$headers = \"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'], $model->subject, $model->body, $headers);\n\t\t\t\tYii::app()->user->setFlash('contact', 'Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact', array(\n\t\t\t'model' => $model));\n\t}", "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$headers=\"From: [email protected]\\r\\nReply-To: [email protected]\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'],'Email from IKMQ: ' . $model->subject,'Email: ' . $model->email . \"\\r\\n\\r\\nMessage: \\r\\n\" . $model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "public function actionContact() {\n\n $model = new ContactForm;\n if (isset($_POST['ContactForm'])) {\n $model->attributes = $_POST['ContactForm'];\n if ($model->validate()) {\n\n $success = Emails::sendToAdmin_ContactForm($model->name, $model->email, $model->subject, $model->body);\n\n Emails::sendToPerson_ContactFormConfirmation($model->name, $model->email);\n\n Yii::app()->user->setFlash('contact', Yii::t('texts', 'FLASH_THANK_YOU_FOR_CONTACTING_US'));\n $this->refresh();\n }\n }\n $this->render('contact', array('model' => $model));\n }", "public function actionContact()\n {\n $model = new ContactForm;\n if (isset($_POST['ContactForm'])) {\n $model->attributes = $_POST['ContactForm'];\n if ($model->validate()) {\n $headers = \"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n mail(Yii::app()->params['adminEmail'], $model->subject, $model->body, $headers);\n Yii::app()->user->setFlash('contact', 'Thank you for contacting us. We will respond to you as soon as possible.');\n $this->refresh();\n }\n }\n $this->render('contact', array('model' => $model));\n }", "public function contact()\n {\n if ($this->issetPostSperglobal('name') && $this->issetPostSperglobal('email') && $this->issetPostSperglobal('message')) {\n $empty_field = 0;\n foreach ($_POST as $key => $post) {\n if (empty(trim($post))) {\n $empty_field++;\n }\n }\n if ($empty_field === 0) {\n $ReCaptcha = new ReCaptcha($this->getPostSuperglobal('recaptcha_response'));\n $method = __FUNCTION__;\n $this->session->read('Mail')->$method($this->getPostSuperglobal('name'), $this->getPostSuperglobal('email'), $this->getPostSuperglobal('message'));\n $this->session->writeFlash('success', \"Votre message a été envoyé avec succès.\");\n $this->redirect('contact');\n } else {\n $this->session->writeFlash('danger', \"Certains champs sont vides.\");\n }\n } else {\n $this->session->writeFlash('danger', \"Certains champs sont manquants.\");\n }\n $_post = $this->getSpecificPost($_POST);\n $this->render('contact', ['head'=>['title'=>'Contact', 'meta_description'=>''], 'page'=>'contact', '_post'=>isset($_post) ? $_post : '']);\n }", "public function actionContact() {\n $model = new ContactForm;\n if (isset($_POST['ContactForm'])) {\n $model->attributes = $_POST['ContactForm'];\n if ($model->validate()) {\n $headers = \"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n mail(Yii::app()->params['adminEmail'], $model->subject, $model->body, $headers);\n Yii::app()->user->setFlash('contact', 'Thank you for contacting us. We will respond to you as soon as possible.');\n $this->refresh();\n }\n }\n $this->render('contact', array('model' => $model));\n }", "public function actionContact() {\n $model = new ContactForm;\n if (isset($_POST['ContactForm'])) {\n $model->attributes = $_POST['ContactForm'];\n if ($model->validate()) {\n $headers = \"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n mail(Yii::app()->params['adminEmail'], $model->subject, $model->body, $headers);\n Yii::app()->user->setFlash('contact', 'Thank you for contacting us. We will respond to you as soon as possible.');\n $this->refresh();\n }\n }\n $this->render('contact', array('model' => $model));\n }", "public function actionContact()\n\t{\n\t\t$contact=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$contact->attributes=$_POST['ContactForm'];\n\t\t\tif($contact->validate())\n\t\t\t{\n\t\t\t\t$headers=\"From: {$contact->email}\\r\\nReply-To: {$contact->email}\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$contact->subject,$contact->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('contact'=>$contact));\n\t}", "public function actionContact()\n\t{\n\t\t$model['form'] = new ContactForm();\n\t\tif (isset($_POST['ContactForm'])) {\n\t\t\t$model['form']->attributes = $_POST['ContactForm'];\n\t\t\tif ($model['form']->validate()) {\n\t\t\t\t$name = '=?UTF-8?B?' . base64_encode($model['form']->name) . '?=';\n\t\t\t\t$subject = '=?UTF-8?B?' . base64_encode($model['form']->subject) . '?=';\n\t\t\t\t$headers = \"From: $name <{$model['form']->email}>\\r\\n\" .\n\t\t\t\t\t\"Reply-To: {$model['form']->email}\\r\\n\" .\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\" .\n\t\t\t\t\t'Content-Type: text/plain; charset=UTF-8';\n\n\t\t\t\tmail(Yii::app()->params['adminEmail'], $subject, $model['form']->body, $headers);\n\t\t\t\tYii::app()->user->setFlash('contact', Yii::t('app', 'Thank you for contacting us. We will respond to you as soon as possible.'));\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact', array('model' => $model));\n\t}", "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$headers=\"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$model->subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$headers=\"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$model->subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$headers=\"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$model->subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "function Form_Mail()\n {\n /**\n * Form_Mail();\n */\n\n $this->referers_array = array($_SERVER[\"HTTP_HOST\"]);\n /**\n * Leave AS IS to only allow posting from same host that script resides on.\n * List individual hosts to create list of hosts that can post to this script:\n * EXAMPLE: $referer_array = array ('example.com','www.example.com','192.168.0.1');\n */\n\n /* proccess form */\n $this->set_arrays();\n $this->check_referer();\n $this->check_recipient();\n $this->check_required_fields();\n $this->send_form();\n $this->display_thankyou();\n }", "public function actionContact()\n\t{\n\t\t$this->layout ='column2';\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$headers=\"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$model->subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\tMailWrapper::sendMailTemplate(\"contactus\", $model, $model->subject, \"[email protected]\");\n\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "public function actionContact()\n\t{\n\t\t$model = new ContactForm;\n\t\tif (isset($_POST['ContactForm'])) {\n\t\t\t$model->attributes = $_POST['ContactForm'];\n\t\t\tif ($model->validate()) {\n\t\t\t\t$name = '=?UTF-8?B?' . base64_encode($model->name) . '?=';\n\t\t\t\t$subject = '=?UTF-8?B?' . base64_encode($model->subject) . '?=';\n\t\t\t\t$headers = \"From: \" . CHtml::encode(Yii::app()->name) . \" <[email protected]>\" . \"\\r\\n\" .\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\" .\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\" .\n\t\t\t\t\t\"Content-Type: text/plain; charset=UTF-8\";\n\t\t\t\t$resultado = mail(Yii::app()->params['adminEmail'], $subject, $model->body, $headers);\n\t\t\t\tif (!$resultado) Yii::log(\"### Error Mail: \" . var_export(error_get_last()['message'], true), CLogger::LEVEL_WARNING, __METHOD__);\n\t\t\t\tYii::app()->user->setFlash('contact', 'Gracias por contactarnos.Responderemos a la mayor brevedad posible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact', array('model' => $model));\n\t}", "public function actionContact() {\r\n\t\t$model = new ContactForm ();\r\n\t\tif (isset ( $_POST ['ContactForm'] )) {\r\n\t\t\t$model->attributes = $_POST ['ContactForm'];\r\n\t\t\tif ($model->validate ()) {\r\n\t\t\t\t$name = '=?UTF-8?B?' . base64_encode ( $model->name ) . '?=';\r\n\t\t\t\t$subject = '=?UTF-8?B?' . base64_encode ( $model->subject ) . '?=';\r\n\t\t\t\t$headers = \"From: $name <{$model->email}>\\r\\n\" . \"Reply-To: {$model->email}\\r\\n\" . \"MIME-Version: 1.0\\r\\n\" . \"Content-type: text/plain; charset=UTF-8\";\r\n\t\t\t\t\r\n\t\t\t\tmail ( Yii::app ()->params ['adminEmail'], $subject, $model->body, $headers );\r\n\t\t\t\tYii::app ()->user->setFlash ( 'contact', 'Thank you for contacting us. We will respond to you as soon as possible.' );\r\n\t\t\t\t$this->refresh ();\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->render ( 'contact', array (\r\n\t\t\t\t'model' => $model \r\n\t\t) );\r\n\t}", "public function actionContact()\n {\n $model=new ContactForm;\n if(isset($_POST['ContactForm']))\n {\n $model->attributes=$_POST['ContactForm'];\n if($model->validate())\n {\n $headers=\"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n mail(Yii::app()->params['adminEmail'],$model->subject,$model->body,$headers);\n Yii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n $this->refresh();\n }\n }\n $this->render('contact',array('model'=>$model));\n }", "public function actionContact() {\n $this->assignLangue();\n $model = new ContactForm;\n \n if (isset($_POST['ContactForm']))\n {\n $model->attributes = $_POST['ContactForm'];\n if($model->validate())\n {\n $from = \"[email protected]\";\n $to = Yii::app()->params[\"adminEmail\"];\n $subject = \"=?UTF-8?B?\" . base64_encode(Translate::trad(\"ContactIncomingMessageFrom\") . \" - Subject: \" . $model->subject) . '?=';\n $body = $model->body;\n \n $toSend = new YiiMailMessage($subject, $body, \"text/plain\", \"UTF-8\");\n $toSend->addTo($to);\n $toSend->addFrom($from);\n \n try {\n Yii::app()->mail->send($toSend);\n } catch (Swift_SwiftException $mailException) {\n Yii::app()->user->setFlash('error', 'L\\'envoi du mail a échoué.<br/>' . $mailException->getMessage());\n } catch(Swift_RfcComplianceException $complianceEx)\n {\n Yii::app()->user->setFlash('error', 'L\\'envoi du mail a échoué : <br/>' . $complianceEx->getMessage());\n }\n \n Yii::app()->user->setFlash('info', Translate::trad(\"ContactMessageSuccessAlert\"));\n }\n }\n $this->render('contact', array('model' => $model));\n }", "public function actionContact() {\n \n $model = new ContactForm;\n $model->scenario = 'contact';\n if (isset($_POST['ContactForm'])) {\n $model->attributes = $_POST['ContactForm'];\n if ($model->validate()) {\n $name = '=?UTF-8?B?' . base64_encode($model->name) . '?=';\n $subject = '=?UTF-8?B?' . base64_encode($model->subject) . '?=';\n $headers = \"From: $name <{$model->email}>\\r\\n\" .\n \"Reply-To: {$model->email}\\r\\n\" .\n \"MIME-Version: 1.0\\r\\n\" .\n \"Content-Type: text/plain; charset=UTF-8\";\n\n Yii::app()->user->setFlash('contact', 'Thank you for contacting us. We will respond to you as soon as possible.');\n mail(Yii::app()->params['adminEmail'], $subject, $model->body, $headers);\n \n $this->refresh();\n //$this->redirect(array('contact'));\n }\n }\n // $this->layout = 'front_main';\n $this->render('contact', array('model' => $model));\n }", "public function actionContact()\n\t{\n\t\t$model = new ContactForm;\n\t\t\n\t\t$this->performAjaxValidation($model, 'contact-form');\n\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes = $_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$headers = \"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'], $model->subject, $model->body, $headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us! We will get back to you as soon as possible!!');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact', array('model' => $model));\n\t}", "public function actionContact() {\n $model = new ContactForm;\n if (isset($_POST['ContactForm'])) {\n $model->attributes = $_POST['ContactForm'];\n if ($model->validate()) {\n $name = '=?UTF-8?B?' . base64_encode($model->name) . '?=';\n $subject = '=?UTF-8?B?' . base64_encode($model->subject) . '?=';\n $headers = \"From: $name <{$model->email}>\\r\\n\" . \"Reply-To: {$model->email}\\r\\n\" . \"MIME-Version: 1.0\\r\\n\" . \"Content-Type: text/plain; charset=UTF-8\";\n\n mail(Yii::app()->params['adminEmail'], $subject, $model->body, $headers);\n Yii::app()->user->setFlash('contact', 'Thank you for contacting us. We will respond to you as soon as possible.');\n $this->refresh();\n }\n }\n $this->render('contact', array('model' => $model));\n }", "public function actionContact()\n {\n $model = new ContactForm();\n if ($model->load(Yii::$app->request->post()) && $model->contact(Yii::$app->params['adminEmail'])) {\n Yii::$app->session->setFlash('contactFormSubmitted');\n\n return $this->refresh();\n }\n\n return $this->render('contact', compact('model'));\n }", "public function actionContact() {\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\n\t\t\t\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\n\t\t\t\t$headers=\"From: $name <{$model->email}>\\r\\n\".\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\".\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\".\n\t\t\t\t\t\"Content-Type: text/plain; charset=UTF-8\";\n\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "public function actionContact() {\n $model = new ContactForm;\n if (isset($_POST['ContactForm'])) {\n $model->attributes = $_POST['ContactForm'];\n if ($model->validate()) {\n $name = '=?UTF-8?B?' . base64_encode($model->name) . '?=';\n $subject = '=?UTF-8?B?' . base64_encode($model->subject) . '?=';\n $headers = \"From: $name <{$model->email}>\\r\\n\" .\n \"Reply-To: {$model->email}\\r\\n\" .\n \"MIME-Version: 1.0\\r\\n\" .\n \"Content-Type: text/plain; charset=UTF-8\";\n\n mail(Yii::app()->params['adminEmail'], $subject, $model->body, $headers);\n Yii::app()->user->setFlash('contact', 'Thank you for contacting us. We will respond to you as soon as possible.');\n $this->refresh();\n }\n }\n $this->render('contact', array('model' => $model));\n }", "public function actionContact() {\n $model = new ContactForm;\n if (isset($_POST['ContactForm'])) {\n $model->attributes = $_POST['ContactForm'];\n if ($model->validate()) {\n $name = '=?UTF-8?B?' . base64_encode($model->name) . '?=';\n $subject = '=?UTF-8?B?' . base64_encode($model->subject) . '?=';\n $headers = \"From: $name <{$model->email}>\\r\\n\" .\n \"Reply-To: {$model->email}\\r\\n\" .\n \"MIME-Version: 1.0\\r\\n\" .\n \"Content-Type: text/plain; charset=UTF-8\";\n\n mail(Yii::app()->params['adminEmail'], $subject, $model->body, $headers);\n Yii::app()->user->setFlash('contact', 'Thank you for contacting us. We will respond to you as soon as possible.');\n $this->refresh();\n }\n }\n $this->render('contact', array('model' => $model));\n }", "public function actionContact() {\n $model = new ContactForm;\n if (isset($_POST['ContactForm'])) {\n $model->attributes = $_POST['ContactForm'];\n if ($model->validate()) {\n $name = '=?UTF-8?B?' . base64_encode($model->name) . '?=';\n $subject = '=?UTF-8?B?' . base64_encode($model->subject) . '?=';\n $headers = \"From: $name <{$model->email}>\\r\\n\" .\n \"Reply-To: {$model->email}\\r\\n\" .\n \"MIME-Version: 1.0\\r\\n\" .\n \"Content-Type: text/plain; charset=UTF-8\";\n\n mail(Yii::app()->params['adminEmail'], $subject, $model->body, $headers);\n Yii::app()->user->setFlash('contact', 'Thank you for contacting us. We will respond to you as soon as possible.');\n $this->refresh();\n }\n }\n $this->render('contact', array('model' => $model));\n }", "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\n\t\t\t\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\n\t\t\t\t$headers=\"From: $name <{$model->email}>\\r\\n\".\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\".\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\".\n\t\t\t\t\t\"Content-Type: text/plain; charset=UTF-8\";\n\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\n\t\t\t\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\n\t\t\t\t$headers=\"From: $name <{$model->email}>\\r\\n\".\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\".\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\".\n\t\t\t\t\t\"Content-Type: text/plain; charset=UTF-8\";\n\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\n\t\t\t\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\n\t\t\t\t$headers=\"From: $name <{$model->email}>\\r\\n\".\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\".\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\".\n\t\t\t\t\t\"Content-Type: text/plain; charset=UTF-8\";\n\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\n\t\t\t\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\n\t\t\t\t$headers=\"From: $name <{$model->email}>\\r\\n\".\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\".\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\".\n\t\t\t\t\t\"Content-Type: text/plain; charset=UTF-8\";\n\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\n\t\t\t\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\n\t\t\t\t$headers=\"From: $name <{$model->email}>\\r\\n\".\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\".\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\".\n\t\t\t\t\t\"Content-Type: text/plain; charset=UTF-8\";\n\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\n\t\t\t\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\n\t\t\t\t$headers=\"From: $name <{$model->email}>\\r\\n\".\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\".\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\".\n\t\t\t\t\t\"Content-Type: text/plain; charset=UTF-8\";\n\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\n\t\t\t\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\n\t\t\t\t$headers=\"From: $name <{$model->email}>\\r\\n\".\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\".\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\".\n\t\t\t\t\t\"Content-type: text/plain; charset=UTF-8\";\n\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\n\t\t\t\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\n\t\t\t\t$headers=\"From: $name <{$model->email}>\\r\\n\".\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\".\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\".\n\t\t\t\t\t\"Content-type: text/plain; charset=UTF-8\";\n\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\n\t\t\t\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\n\t\t\t\t$headers=\"From: $name <{$model->email}>\\r\\n\".\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\".\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\".\n\t\t\t\t\t\"Content-type: text/plain; charset=UTF-8\";\n\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\n\t\t\t\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\n\t\t\t\t$headers=\"From: $name <{$model->email}>\\r\\n\".\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\".\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\".\n\t\t\t\t\t\"Content-type: text/plain; charset=UTF-8\";\n\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\n\t\t\t\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\n\t\t\t\t$headers=\"From: $name <{$model->email}>\\r\\n\".\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\".\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\".\n\t\t\t\t\t\"Content-type: text/plain; charset=UTF-8\";\n\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\n\t\t\t\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\n\t\t\t\t$headers=\"From: $name <{$model->email}>\\r\\n\".\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\".\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\".\n\t\t\t\t\t\"Content-type: text/plain; charset=UTF-8\";\n\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\n\t\t\t\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\n\t\t\t\t$headers=\"From: $name <{$model->email}>\\r\\n\".\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\".\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\".\n\t\t\t\t\t\"Content-type: text/plain; charset=UTF-8\";\n\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\n\t\t\t\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\n\t\t\t\t$headers=\"From: $name <{$model->email}>\\r\\n\".\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\".\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\".\n\t\t\t\t\t\"Content-type: text/plain; charset=UTF-8\";\n\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "public function actionContact() {\n //echo Helper::yiiparam('adminEmail');\n $this->layout = 'pagination_layout';\n\n $model = new ContactForm;\n if (isset($_POST['ContactForm'])) {\n $model->attributes = $_POST['ContactForm'];\n if ($model->validate()) {\n $name = '=?UTF-8?B?' . base64_encode($model->first_name) . '?=';\n $subject = '=?UTF-8?B?' . base64_encode($model->subject) . '?=';\n $headers = \"From: $name <{$model->email}>\\r\\n\" .\n \"Reply-To: {$model->email}\\r\\n\" .\n \"MIME-Version: 1.0\\r\\n\" .\n \"Content-type: text/plain; charset=UTF-8\";\n\n mail(Helper::yiiparam('adminEmail'), $subject, $model->message, $headers);\n Yii::app()->user->setFlash('contact', 'Thank you for contacting us. We will respond to you as soon as possible.');\n $this->refresh();\n }\n }\n $this->render('contact', array('model' => $model));\n }", "public function contact()\n {\n \n if($this->form_validation->run('contact') == FALSE) \n {\n $data['err_msg'] = '<div class=\"errors\">'.validation_errors().'</div>';\n \n $data['title'] = \"Contact Us | Graphical Market Research\";\n $data['description'] = \"Stay in touch with Graphical Research to get UpToDate and accurate market data by industry experts. \";\n $data['country_data'] = $this->country_model->get_all_country();\n $data['keywords'] = \"Contact Us, Stay in touch with Graphical Research\";\n $data['content'] = 'layout_files/contact_us';\n $this->load->view('master_files/master_layout', $data); \n\t }else{\n\t\t$val = $this->sample_model->request('', 'C');\n\t\tif($val == 1)\n\t\t{\n $leadId = $this->sample_model->leadId();\n\t\t if($leadId)\n\t\t {\n\t\t redirect('thanks');\n\t\t }\n\t\t}\n\t }\n }", "function client_ask_admin($submit_button, $client_name, $client_email, $client_phone, $client_msg_content){\n\t\tif( isset($_POST[$submit_button]) ){\n\t\t\t\tglobal $base;\n\n\t\t\t\t$query = \"SELECT * FROM users WHERE role='master_admin'\";\n\t $find_id = user::find_this_query($query);\n\t $master_admin_id='';\n\t\t foreach ($find_id as $id) {\n\t\t $master_admin_id = $id->user_id;\n\t\t\t\t\t}\n\n\t\t\t\t$messages_admin = new messages_admin();\n\t\t\t\t$messages_admin->admin_id\t\t= $master_admin_id;\n\t\t\t\t$messages_admin->client_name\t= $_POST[$client_name];\n\t\t\t\t$messages_admin->client_email\t= $_POST[$client_email];\n\t\t\t\t$messages_admin->client_phone\t= $_POST[$client_phone];\n\t\t\t\t$messages_admin->content \t\t= $_POST[$client_msg_content];\n\t\t\t\t$messages_admin->date \t\t\t= date('Y-m-d H:i:s');\n\n\t\t\t\t\n\t\t\t\t$messages_admin->create();\n\n\t\t\t\tmail( '[email protected]', 'Pitanje Externog Korisnika: '.$base->clear_string($_POST[$client_name]), $base->clear_string($_POST[$client_msg_content]), \"From: \".$base->clear_string($_POST[$client_email]) );\n\t\t\t\t\n\n\t\t\t\techo (\"\n\t\t\t\t\t<SCRIPT LANGUAGE='JavaScript'>\n\t\t\t\t\t\twindow.alert('Uspešno Ste poslali poruku. Odgovor će Vam biti prosleđen na E-mail.')\n\t\t\t\t \twindow.location.href='../../../contact.php';\n\t\t\t\t </SCRIPT>\n\t\t\t\t\");\n\n\t\t\t}\n}", "function clientContactValidateAction()\n\t{\n\t\tif($this->_request->isPost() && $_SERVER['HTTP_X_REQUESTED_WITH']=='XMLHttpRequest')\n\t\t{\n\t\t\t$request = $this->_request->getParams();\n\t\t\t$contact_email = $request['cemail'];\n\t\t\t$prev_email = $request['pemail'];\n\t\t\t$edit = $request['edit'];\n\t\t\t$client_obj = new Ep_User_Client();\n\t\t\techo $client_obj->checkContact($contact_email,$edit,$prev_email);\n\t\t}\n\t}", "public function action_index(){\n\n\t\t$view = View::forge('contact/form');\n\n\t\tif (Input::method() == 'POST'){\n\t\t\tif (Input::post('name') and Input::post('email') and Input::post('message')){\n\t\t\t\ttry{\n\t\t\t\t\tEmail::forge()\n\t\t\t\t\t ->to('[email protected]')\n\t\t\t\t\t ->from(Input::post('email'), Input::post('name'))\n\t\t\t\t\t ->subject('TuneGenius Contact Form')\n\t\t\t\t\t ->body(Input::post('message'))\n\t\t\t\t\t ->send();\n\n\t\t\t\t\tResponse::redirect('contact/sent');\n\t\t\t\t}\n\t\t\t\tcatch (EmailSendingFailedException $e){\n\t\t\t\t\t$view->error = 'Your email did not send, please try again.';\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t//if not all fields are filled out puts up error and empties fields\n\t\t\telse{\n\t\t\t\t$view->error = 'Please fill in all fields';\n\t\t\t}\n\t\t}\n\t\t$this->template->title = 'Contact us';\n\t\t$this->template->content = $view;\n\t}", "public function actionContact()\r\n\t{\r\n\t\t$model=new ContactForm;\r\n\t\tif(isset($_POST['ContactForm']))\r\n\t\t{\r\n\t\t\t$model->attributes=$_POST['ContactForm'];\r\n\t\t\tif($model->validate())\r\n\t\t\t{\r\n\t\t\t\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\r\n\t\t\t\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\r\n\t\t\t\t$headers=\"From: $name <{$model->email}>\\r\\n\".\r\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\".\r\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\".\r\n\t\t\t\t\t\"Content-type: text/plain; charset=UTF-8\";\r\n\r\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\r\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\r\n\t\t\t\t$this->refresh();\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->render('contact',array('model'=>$model));\r\n\t}", "public function actionContact()\r\n\t{\r\n\t\t$this->layout = '//layouts/site';\r\n\t\t\r\n\t\t$model=new ContactForm;\r\n\t\tif(isset($_POST['ContactForm']))\r\n\t\t{\r\n\t\t\t$model->attributes=$_POST['ContactForm'];\r\n\t\t\tif($model->validate())\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\tUtilHelper::writeToFile($model, 'a+');\r\n\t\t\t\tUtilMail::sendMail($model->email, $model->subject, $model->body);\r\n\t\t\t\t\r\n//\t\t\t\t$headers=\"From: {$model->email}\\r\\nReply-To: {$model->email}\";\r\n//\t\t\t\tmail(Yii::app()->params['adminEmail'],$model->subject,$model->body,$headers);\r\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\r\n\t\t\t\t$this->refresh();\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->render('contact',array('model'=>$model));\r\n\t}", "public function actionContact()\r\n\t{\r\n\t\tif(Yii::app()->user->isGuest)\r\n\t\t\t$this->layout='//layouts/loginForm';\r\n\t\t$model=new ContactForm;\r\n\t\tif(isset($_POST['ContactForm']))\r\n\t\t{\r\n\t\t\t$model->attributes=$_POST['ContactForm'];\r\n\t\t\tif($model->validate())\r\n\t\t\t{\r\n\t\t\t\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\r\n\t\t\t\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\r\n\t\t\t\t$headers=\"From: $name <{$model->email}>\\r\\n\".\r\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\".\r\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\".\r\n\t\t\t\t\t\"Content-Type: text/plain; charset=UTF-8\";\r\n\r\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\r\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\r\n\t\t\t\t$this->refresh();\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->render('contact',array('model'=>$model));\r\n\t}", "public function Contact(){\r\n $this->emailPost();\r\n $this->objetPost();\r\n $this->messagePost();\r\n \r\n $from = $this->_emailPostSecure;\r\n \r\n $to = \"[email protected]\";\r\n \r\n $subject = $this->_objetPostSecure;\r\n \r\n $message = $this->_messagePostSecure;\r\n \r\n $headers = \"From: \" .$from;\r\n \r\n mail($to,$subject,$message, $headers);\r\n \r\n header('location: Contact'); \r\n \r\n }", "public function send() {\n if($_SERVER['REQUEST_METHOD'] === \"POST\") {\n $this->loadView('Contact', $this->loadModel('ContactModel')->send($_POST));\n } else {\n $this->loadView('NotFound');\n }\n }", "public function actionContact() {\n $model=new ContactForm;\n if(isset($_POST['ContactForm'])) {\n $model->attributes=$_POST['ContactForm'];\n if($model->validate()) {\n\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\n\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\n\t$headers=\"From: $name <{$model->email}>\\r\\n\".\n\t \"Reply-To: {$model->email}\\r\\n\".\n\t \"MIME-Version: 1.0\\r\\n\".\n\t \"Content-Type: text/plain; charset=UTF-8\";\n\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\n\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t$this->refresh();\n }\n }\n $this->render('contact',array('model'=>$model));\n }", "static private function submitEmail()\n {\n $id = $_POST['formid'];\n\n // Initiates new form handling instance\n $f = new FormHandling;\n\n // Gets the client email list (to, bcc, cc)\n $clientEmailList = $f->getClientEmail($id);\n\n // Gets the customer email (if set)\n $customerEmail = $f->getCustomerEmail($_POST);\n\n // dd($customerEmail);\n\n // Checks if in sandbox mode before sending email\n if(FALSE == submissionHandling::sandbox){\n\n // New email instance\n $e = new emailHandling();\n\n // render and send client email(s)\n if($clientEmailList['to']){\n $e->sendEmail($id,'client',$clientEmailList['to'],'Enquiry received','Hi',$clientEmailList['headers']);\n }\n\n // render and send customer email\n if($customerEmail){\n $e->sendEmail($id,'customer',$customerEmail,'Thanks for getting in touch','We will be in touch soon');\n }\n\n }\n }", "function _c_form($options)\n\t{\t \n\t\t\n\n\t\t\trequire_once(TEMPLATEPATH . '/template-helpers/contact_form.php');\n\t\t\t\n\t\t\t\n\t}", "public function messageAction()\n {\n $to = '[email protected]';\n $subject = \"contact us form\";\n $message = $_POST['message'];\n $headers = 'Content-type: text/html; charset=windows-1251 \\r\\n';\n $headers .= 'From:' . $_POST['email'] . '\\r\\n';\n $headers .= 'Reply-To: reply-to@' . $_POST['email'] . '\\r\\n';\n mail($to, $subject, $message, $headers);\n $this->view->render('Contact Us');\n }", "function contactUs( $data ) {\n // Get the info as specified in the contact info section of the site\n // management porition\n $info = ContactInfo::getInstance();\n\n // For development purposes, currently return;\n\n // Send an email to the contacted persons\n}", "function do_contact_client_email($adata, $aret_flag=0) {\n\t# Dim Some Vars\n\t\tglobal $_CCFG, $_TCFG, $_DBCFG, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp;\n\n\t# Check if we are sending to an additional email instead of the clients regular address\n\t\t$pos = strpos(strtolower($adata['cc_cl_id']), \"alias\");\n\t\tif ($pos !== false) {\n\t\t\t$pieces\t= explode('|', $adata['cc_cl_id']);\n\t\t\t$_ccinfot\t= get_contact_client_info_alias($pieces[1], 0);\n\t\t\t$_ccinfo\t= $_ccinfot[1];\n\t } ELSE {\n\t\t# Get client contact information array\n\t\t\t$_ccinfo\t= get_contact_client_info($adata['cc_cl_id']);\n\t\t}\n\n\t# Get site contact information array\n\t\t$_mcinfo = get_contact_info($adata['cc_mc_id']);\n\n\t# Set eMail Parameters (pre-eval template, some used in template)\n\t\tIF ($_CCFG['_PKG_SAFE_EMAIL_ADDRESS']) {\n \t\t\t$mail['recip']\t\t= $_ccinfo['cl_email'];\n\t\t\t$mail['from']\t\t= $_mcinfo['c_email'];\n\t\t\t$mail['cc']\t\t= $_mcinfo['c_email'];\n\t\t} ELSE {\n\t\t\t$mail['recip']\t\t= $_ccinfo['cl_name_first'].' '.$_ccinfo['cl_name_last'].' <'.$_ccinfo['cl_email'].'>';\n\t\t\t$mail['from']\t\t= $_mcinfo['c_name'].' <'.$_mcinfo['c_email'].'>';\n\t\t\t$mail['cc']\t\t= $_mcinfo['c_name'].' <'.$_mcinfo['c_email'].'>';\n\t\t}\n\n\t\tIF ($_CCFG['MAIL_USE_CUSTOM_SUBJECT']) {\n\t\t\t$mail['subject']\t= $adata['cc_subj'];\n\t\t} ELSE {\n\t\t\t$mail['subject']\t= $_CCFG['_PKG_NAME_SHORT'].$_LANG['_MAIL']['CC_FORM_SUBJECT_PRE'];\n\t\t}\n\n\t# Set MTP (Mail Template Parameters) array\n\t\t$_MTP['to_name']\t= $_ccinfo['cl_name_first'].' '.$_ccinfo['cl_name_last'];\n\t\t$_MTP['to_email']\t= $_ccinfo['cl_email'];\n\t\t$_MTP['from_name']\t= $_mcinfo['c_name'];\n\t\t$_MTP['from_email']\t= $_mcinfo['c_email'];\n\t\t$_MTP['subject']\t= $adata['cc_subj'];\n\t\t$_MTP['message']\t= $adata['cc_msg'];\n\t\t$_MTP['site']\t\t= $_CCFG['_PKG_NAME_SHORT'];\n\n\t# Load message template (processed)\n\t\t$mail['message']\t= get_mail_template('email_contact_client_form', $_MTP);\n\n\t# Call basic email function (ret=0 on error)\n\t\t$_ret = do_mail_basic($mail);\n\n\t# Check return\n\t\tIF ($_ret) {\n\t\t\t$_ret_msg = $_LANG['_MAIL']['CC_FORM_MSG_02_L1'];\n\t\t\t$_ret_msg .= '<br>'.$_LANG['_MAIL']['CC_FORM_MSG_02_L2'];\n\t\t} ELSE {\n\t\t\t$_ret_msg = $_LANG['_MAIL']['CC_FORM_MSG_03_L1'];\n\t\t}\n\n\t# Build Title String, Content String, and Footer Menu String\n\t\t$_tstr = $_LANG['_MAIL']['CC_FORM_RESULT_TITLE'];\n\n\t\t$_cstr .= '<center>'.$_nl;\n\t\t$_cstr .= '<table cellpadding=\"5\" width=\"100%\">'.$_nl;\n\t\t$_cstr .= '<tr><td class=\"TP5MED_NC\">'.$_nl;\n\t\t$_cstr .= $_ret_msg.$_nl;\n\t\t$_cstr .= '</td></tr>'.$_nl;\n\t\t$_cstr .= '</table>'.$_nl;\n\t\t$_cstr .= '</center>'.$_nl;\n\n\t\t$_mstr_flag\t= 0;\n\t\t$_mstr\t\t= '&nbsp;'.$_nl;\n\n\t# Call block it function\n\t\t$_out .= do_mod_block_it($_tstr, $_cstr, $_mstr_flag, $_mstr, '1');\n\t\t$_out .= '<br>'.$_nl;\n\n\t\tIF ($aret_flag) {return $_out;} ELSE {echo $_out;}\n}", "function contactusForm() {\n\tglobal $lang;\n\n?>\n <script language=\"javaScript\">\n\t\tfunction formSubmit(val) {\n\t\t\tif(checkFields()) {\n\t\t\t\tdocument.forms.contact.action.value = val;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\tfunction checkFields() {\n\t\t\tvar name = document.forms.contact.firstname.value;\n\t\t\tvar email = document.forms.contact.email.value;\n\t\t\tvar message = document.forms.contact.message.value;\n\t\t\n\t\t\tif (name == \"\" ) {\n\t\t\t\talert(\"<?=$lang['alertcontactname']?>\");\n\t\t\t\tdocument.forms.contact.firstname.focus();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (email == \"\" ) {\n\t\t\t\talert(\"<?=$lang['alertemail']?>\");\n\t\t\t\tdocument.forms.contact.email.focus();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (message == \"\" ) {\n\t\t\t\talert(\"<?=$lang['alertmessage']?>\");\n\t\t\t\tdocument.forms.contact.message.focus();\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}\n</script>\n\n<TABLE width=\"90%\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\">\n\n<!-- Contactus Form -->\n<FORM NAME=\"contact\" METHOD=POST ACTION=\"index.php\" Onsubmit=\"return formSubmit('sendcontactus')\">\n<INPUT TYPE=\"hidden\" name=\"action\">\n\n<TR>\n<TD width=\"30%\" valign=\"middle\" align=\"right\">\n<?=$lang['realname']?> : \n</TD>\n\n<TD valign=\"middle\" align=\"left\">\n<INPUT class=input TYPE=\"text\" NAME=\"firstname\">\n</TD>\n</TR>\n\n\n<TR>\n<TD width=\"30%\" valign=\"middle\" align=\"right\">\n<?=$lang['email']?> :\n</TD>\n\n<TD valign=\"top\" align=\"left\">\n<INPUT class=input TYPE=\"text\" NAME=\"email\">\n</TD>\n</TR>\n\n<TR>\n<TD width=\"30%\" valign=\"middle\" align=\"right\">\n<?=$lang['contacttype']?> : \n</TD>\n\n<TD valign=\"top\" align=\"left\">\n<select name=\"subject\" class=\"input\">\n<option value = \"-\"><?=$lang['select_contacttype']?></option>\n<option value = \"<?=$lang['contacttype1']?>\"><?=$lang['contacttype1']?></option>\n<option value = \"<?=$lang['contacttype2']?>\"><?=$lang['contacttype2']?></option>\n<option value = \"<?=$lang['contacttype3']?>\"><?=$lang['contacttype3']?></option>\n</select>\n</TD>\n</TR>\n\n\n<TR>\n<TD width=\"30%\" valign=\"top\" align=\"right\">\n<?=$lang['contactmessage']?> :\n</TD>\n\n<TD valign=\"top\" align=\"left\">\n<TEXTAREA NAME=\"message\" ROWS=\"8\" COLS=\"40\" style='width=90%'></TEXTAREA>\n</TD>\n</TR>\n\n<TR>\n<TD width=\"30%\" valign=\"top\" align=\"right\">&nbsp;</TD>\n<TD valign=\"top\" align=\"left\">\n\n<INPUT TYPE=\"submit\" class=\"button\" VALUE=\"<?=$lang['button_contactus']?>\">\n</TD>\n</TR>\n</FORM>\n</TABLE>\n\n<?\n}", "function send_contact() {\n $name = $_POST['name'];\n $email = $_POST['email'];\n $phone = $_POST['phone'];\n $comments = $_POST['comments'];\n $message = 'Name :' . $name . \"\\n\" .\n 'Email : ' . $email . \"\\n\" .\n 'Phone : ' . $phone . \"\\n\" .\n 'Message :' . $comments;\n\n $email_to = \"[email protected]\";\n $email_from = $email;\n $email_subject = \"Message from the Contact Form\";\n\n $headers = 'From: ' . $email_from . \"\\r\\n\" .\n 'Reply-To: ' . $email_from . \"\\r\\n\" .\n 'X-Mailer: PHP/' . phpversion();\n @mail($email_to, $email_subject, $message, $headers);\n\n\n echo \"<script language='javascript'>alert('Thankyou for your comments. We will reply you soon ');</script>\";\n echo \"<script language='javascript'>history.back(-1);</script>\";\n }", "function contactSendMail()\r\n {\r\n $subject = 'Contact : ' . $_POST['contactNom'];\r\n $body = $_POST['contactMsg'];\r\n\r\n\r\n $this->sendMail($subject, $body);\r\n }", "public function send_contact_form(){\n if( ! $this->is_valid_nonce( 'mpp_ajax_nonce' ) ){\n die();\n }\n $contact_form = new ContactForm( $this->plugin, $_POST );\n if( $contact_form->has_fields() ){\n $contact_form->execute();\n }\n wp_send_json( $contact_form->result );\n }", "function cb_get_form($sendTo=\"\", $subject=\"\"){\n\t$sendTo= ($sendTo == \"\") ? get_bloginfo('admin_email') : $sendTo;\n\t$subject= ($subject == \"\") ? 'Contact Form from'. get_bloginfo('name') : $subject;\n\t\n\tprint cb_build_form($sendTo, $subject);\n}", "private function sendMessage() {\r\n $data = $this->_contactform->getValues();\r\n\r\n $viewParam = array(\r\n 'name' => $data['contactform_name'],\r\n 'email' => $data['contactform_email'],\r\n 'message' => nl2br(htmlentities($data['contactform_message'])),\r\n 'ip' => $_SERVER['REMOTE_ADDR']\r\n );\r\n\r\n $registry = Zend_Registry::getInstance();\r\n $contactInfo = $registry->get('contactinfo');\r\n $email = $contactInfo['email'];\r\n $name = $contactInfo['name'];\r\n\r\n $mail = new Portfolio_HtmlTemplateMailer();\r\n $mail->setSubject($data['contactform_subject'])\r\n ->setFrom($data['contactform_email'], $data['contactform_name'])\r\n ->setReplyTo($data['contactform_email'], $data['contactform_name'])\r\n ->addTo($email, $name)\r\n ->setViewParam($viewParam)\r\n ->sendHtmlTemplate('contact.phtml');\r\n }", "function set_form_contacto(){\n\n\t\tif($this->input->post('id')){\n\n\t\t\t$user = $this->session->userdata('cliente_id');\n\n\t\t\t$mensaje = $this->load->view('frontend/comunes/form_contacto',null,true);\n\n\t\t\t$data_in = array(\n\t 'from_id' \t=> 0,\n\t 'to_id' \t=> $user,\n\t 'mensaje' => $mensaje,\n\t 'sin_fondo'\t=> 1,\n\t 'date'\t\t=> applib::fecha(),\n\t );\n\n\t applib::create(applib::$mensajes_table,$data_in);\n\n\t echo json_encode(array('res' => 'success'));\n\n\t\t}\n\n\t}", "public function indexAction()\n {\n $form = new ContactForm(null);\n\n if ($this->request->isPost()) {\n $mail = $this->getDI()\n ->getMail();\n if ($form->isValid($this->request->getPost()) != false) {\n\n try{\n $mail->send(\n array($this->config->mail->fromEmail => $this->config->mail->fromName),\n 'Contact Us',\n 'contact-us', array(\n 'name' => $this->request->getPost('name'),\n 'email' => $this->request->getPost('email'),\n 'message' => $this->request->getPost('message')\n )\n );\n $this->flash->success('Your message have been sent to administrator.');\n $form->clear();\n }catch (Exception $e){\n echo $e->getMessage();\n }\n\n }\n }\n $this->view->form = $form;\n }", "function sentInfoContactForm($name,$company_name,$city,$email,$phone_no,$comments)\n\t\t{\n\t\t\t//email will be sent to admin\n\t\t\t//emaill of admin\n\t\t\t$email_admin = $this->manage_content->getValue('admin_profile','email_add');\n\t\t\t//get email from array $email_admin[0]['email_add']\n\t\t\t$sendMail_admin = $this->mail_function->contactToAdmin($name,$company_name,$city,$email,$phone_no,$comments,$email_admin[0]['email_add']);\n\t\t}", "public function actionContact()\r\n\t{\r\n\t\t\r\n\t\t$this->layout='//layouts/column3';\r\n\t\t$model=new ContactForm;\r\n\t\tif(isset($_POST['ContactForm']))\r\n\t\t{\r\n\t\t\t$model->attributes=$_POST['ContactForm'];\r\n\t\t\tif($model->validate())\r\n\t\t\t{\r\n\t\t\t\t$headers=\"From: {$model->email}\\r\\nReply-To: {$model->email}\";\r\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$model->subject,$model->body,$headers);\r\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\r\n\t\t\t\t$this->refresh();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$this->promotionItems = SalePromotion::model()->findAllByAttributes(\r\n\t\t\t\tarray(),\r\n\t\t\t\t$condition = 'END_DATE >= :today AND START_DATE <= :today',\r\n\t\t\t\t$params = array(\r\n\t\t\t\t\t\t':today' => date('Y-m-d', time()),\r\n\t\t\t\t)\r\n\t\t);\r\n\t\t\r\n\t\t\r\n\t\t$this->render('contact',array('model'=>$model));\r\n\t}", "public function contactAction()\n {\n /**\n * @var $request \\Zend\\Http\\Request\n */\n $request = $this->getRequest();\n $form = $this->getContactForm();\n if ($request->isPost()) {\n $data = $request->getPost();\n $form->setData($data);\n if ($form->isValid()) {\n $message = new Message();\n $message->addTo('[email protected]')\n ->addFrom(\"[email protected]\")\n ->setSubject($data['contact']['subject'])\n ->addReplyTo($data['contact']['sender'])\n ->setBody(\"From:\" . $data['contact']['sender'] . '\\r\\n' . $data['contact']['body'])\n ->setEncoding(\"UTF-8\");\n\n $transport = new SmtpTransport();\n $options = new SmtpOptions(array(\n 'name' => 'leetfeed.com',\n 'host' => 'smtpout.europe.secureserver.net',\n 'port' => '80',\n 'connection_class' => 'login',\n 'connection_config' => array(\n 'username' => '[email protected]',\n 'password' => '7934603745912766',\n )\n ));\n $transport->setOptions($options);\n $transport->send($message);\n\n $this->flashMessenger()->addMessage(self::EMAIL_SUCCESS);\n return $this->redirect()->toRoute('contact');\n } else {\n $this->flashMessenger()->addMessage(self::EMAIL_ERROR);\n }\n\n }\n return new ViewModel(array(\n \"form\" => $form,\n \"pageTitle\" => \"Leetfeed | Contact Us\",\n \"noAds\" => true\n ));\n }", "public function indexClientAction()\n\t{\n\t\tif ((!$this->commons->hasPermission('client/edit'))) {\n\t\t\tNot_foundController::show('403');\n\t\t\texit();\n\t\t}\n\n\t\tif ($this->commons->validateToken($this->url->post('_token'))) {\n\t\t\t$this->session->data['message'] = array('alert' => 'warning', 'value' => 'Token does not match!');\n\t\t\t$this->url->redirect('contacts');\n\t\t}\n\n\t\t$data = $this->url->post('client');\n\t\t$result = $this->contactModel->updateClient($data);\n\t\t$this->session->data['message'] = array('alert' => 'success', 'value' => 'Client updated successfully.');\n\t\t$this->url->redirect('client/edit&id=' . $data['id']);\n\t}", "protected function clientsProcess() {\n\t\t// Validate.\n\t\tif (!$this->validateForm()) {\n\t\t\tredirect(ABSURL . 'error');\n\t\t}\n\t\tnonce_generate();\n\n\t\t// Get user.\n\t\t$user = $this->Users->get((int) $_POST['user_id']);\n\n\t\t// Delete existing clients for the user.\n\t\t$delete = $this->UserClients->delete($user['user_id']);\n\n\t\t// Update with the current clients for the user.\n\t\t$update = $this->UserClients->update($user['user_id'], $_POST['clients']);\n\n\t\t// Forward to the users page.\n\t\tredirect(ABSURL . 'management/users/');\n\t}", "public function contact()\n {\n // En premier lieu, on vérifie que l'utilisateur est connecté\n $app = App::getInstance();\n $auth = new DbAuth($app->getDb());\n // Si on tente d'afficher la page sans être connecté\n if(!$auth->logged('front')) {\n header('Location: /members/login');\n }\n\n // Si l'id du membre n'existe pas, on redirige vers la page d'accueil\n if(!isset($_GET['member_id']))\n {\n header('Location: /home');\n die();\n }\n\n // On a bien un id membre\n // On recherche le membre correspondant à cet id\n $member = $this->Members->getMember($_GET['member_id']);\n // Si aucun membre n'a été trouvé, on redirige\n if(!$member)\n {\n header('Location: /home');\n die();\n }\n\n $errors = array();\n\n // Si le formulaire a été posté\n if(!empty($_POST))\n {\n // On vérifie qu'il n'y a pas d'erreurs\n if(!array_key_exists('message', $_POST) || $_POST['message'] == '') {\n $_SESSION['error'] = 'Erreur lors de la soumission du formulaire';\n $errors['message'] = 'Vous n\\'avez pas renseigné votre message';\n }\n\n // S'il n'y a pas d'erreurs\n if(empty($errors))\n {\n // On envoie le mail\n if($this->sendEmailContact($member->email, $_SESSION['front']['lastname'], $_SESSION['front']['firstname'], $_SESSION['front']['email'], $_POST['message'])) {\n $_SESSION['success'] = 'Votre message a bien été envoyé';\n header('Location: /members/profile/' . $member->id);\n die();\n }\n else\n {\n $_SESSION['error'] = 'Votre message n\\'a pas pu être envoyé';\n }\n }\n }\n\n // Préparation de la page\n $page = new Page(array(\n 'title' => 'Contacter ' . $member->firstname . ' ' . $member->lastname,\n 'class_body' => 'members-contact'\n ));\n // Rendu du contenu\n $variables = compact('errors', 'member');\n $content = $this->render('members/contact.php', $variables);\n // Rendu de la page\n echo $page->render($content);\n\n // On vide les données qu'on ne veut pas réafficher si on actualise la page\n unset($_POST);\n unset($_SESSION['error']);\n unset($_SESSION['success']);\n }", "public function check_form()\n\t{\n\t\tProfil_fields_forum::validate(PROFIL_FIELDS_CONTACT, 'contact', $this->errstr, Fsb::$session->id());\n\t}", "protected function handleContact($resume) {\n if(!$this->getRequest()->post(\"contact\")) {\n return;\n }\n \n $valid = $this->form[\"contact\"]->isValid($this->getRequest()->getAll());\n \n if($valid) {\n \n $cf = array();\n foreach($this->form[\"contact\"]->getFields() as $key => $field) {\n $cf[$key] = $field->getValue();\n } \n \n $mail = Wpjb_Utility_Message::load(\"notify_candidate_message\");\n $mail->setTo($resume->getUser(true)->user_email);\n $mail->addHeader(\"Reply-To\", $this->form[\"contact\"]->value(\"email\"));\n $mail->assign(\"company\", Wpjb_Model_Company::current());\n $mail->assign(\"resume\", $resume);\n $mail->assign(\"contact_form\", $cf);\n $mail->send();\n \n $this->addInfo(__(\"Your message has been sent.\", \"wpjobboard\"));\n add_action(\"wp_footer\", \"wpjb_hide_scroll_hash\");\n \n } else {\n $this->show[\"contact\"] = 1;\n $this->view->form_error = __(\"There are errors in your form\", \"wpjobboard\");\n }\n \n }", "public function website() {\n\t\t\n\t\t$name \t\t= Input::get('name');\n\t\t$mailFrom \t= Input::get('email');\n\t\t$phone \t\t= Input::get('phone');\n\t\t$comments \t= Input::get('comments');\n\t\t$emailTo \t= '[email protected]';\n\t\t\n\t\t$subject = 'Contato realizado a partir do site Pifou por: ' . $name . '.';\n\t\t$vars = array(\n\t\t\t'name'\t\t=>\t$name,\n\t\t\t'email'\t\t=>\t$mailFrom,\n\t\t\t'phone'\t\t=>\t$phone,\n\t\t\t'comments'\t=>\t$comments,\n\t\t);\n\t\t\n EmailTemplate::SendByKey('contact_mail_user', $vars, $emailTo, null, null, $mailFrom);\n\t\t\n\t\treturn \"<fieldset><div id='success_page'><h4 class='highlight'>Obrigado, <strong>$name</strong>! Sua mensagem foi enviada. Entraremos em contato o mais rápido possível.</h4></div></fieldset>\";\n }", "public function contact()\n {\n add_settings_field(\n 'contact',\n apply_filters($this->plugin_name . 'label-contact', esc_html__('Contact', $this->plugin_name)),\n [$this->builder, 'text'],\n $this->plugin_name,\n $this->plugin_name . '-directives',\n [\n 'description' => 'Your contact address. Valid formats: e-mail, URL, phone number. (Required)',\n 'id' => 'contact',\n 'class' => 'text widefat hide-when-disabled',\n 'value' => isset($this->options['contact']) ? $this->options['contact'] : false,\n 'placeholder' => get_bloginfo('admin_email'),\n ]\n );\n }", "public function contactAction() {\n\n //ONLY LOGGED IN USER CAN ADD OVERVIEW\n if (!$this->_helper->requireUser()->isValid())\n return;\n\n //GET VIEWER\n $viewer = Engine_Api::_()->user()->getViewer();\n\n //GET LISTING ID AND OBJECT\n $listing_id = $this->_getParam('listing_id');\n\n $this->view->sitereview = $sitereview = Engine_Api::_()->getItem('sitereview_listing', $listing_id);\n\n //GET LISTING TYPE ID\n $listingtype_id = $sitereview->listingtype_id;\n Engine_Api::_()->sitereview()->setListingTypeInRegistry($listingtype_id);\n $listingType = Zend_Registry::get('listingtypeArray' . $listingtype_id);\n Engine_Api::_()->core()->setSubject($sitereview); \n if(!Engine_API::_()->seaocore()->checkSitemobileMode('fullsite-mode')) {\n $this->_helper->content\n ->setContentName(\"sitereview_dashboard_contact_listtype_$listingtype_id\")\n //->setNoRender()\n ->setEnabled();\n \n } \n \n if (empty($listingType->contact_detail)) {\n return $this->_forward('requireauth', 'error', 'core');\n }\n\n if (!$sitereview->authorization()->isAllowed($viewer, 'edit_listtype_' . $listingtype_id)) {\n return $this->_forward('requireauth', 'error', 'core');\n }\n\n if (!Engine_Api::_()->authorization()->getPermission($viewer->level_id, 'sitereview_listing', \"contact_listtype_$listingtype_id\")) {\n return $this->_forward('requireauth', 'error', 'core');\n }\n\n //SELECTED TAB\n $this->view->TabActive = \"contactdetails\";\n\n //SET FORM\n $this->view->form = $form = new Sitereview_Form_Contactinfo();\n $tableOtherinfo = Engine_Api::_()->getDbTable('otherinfo', 'sitereview');\n\n //POPULATE FORM\n $row = $tableOtherinfo->getOtherinfo($listing_id);\n $value['email'] = $row->email;\n $value['phone'] = $row->phone;\n $value['website'] = $row->website;\n\n $form->populate($value);\n\n //CHECK FORM VALIDATION\n if ($this->getRequest()->isPost() && $form->isValid($this->getRequest()->getPost())) {\n //GET FORM VALUES\n $values = $form->getValues();\n\n\n $values['phone'] = $this->view->string()->stripTags($values['phone']);\n $values['email'] = $this->view->string()->stripTags($values['email']);\n $values['website'] = $this->view->string()->stripTags($values['website']);\n if (isset($values['email'])) {\n $email_id = $values['email'];\n\n //CHECK EMAIL VALIDATION\n $validator = new Zend_Validate_EmailAddress();\n $validator->getHostnameValidator()->setValidateTld(false);\n if (!empty($email_id)) {\n if (!$validator->isValid($email_id)) {\n $form->addError(Zend_Registry::get('Zend_Translate')->_('Please enter a valid email address.'));\n return;\n } else {\n $tableOtherinfo->update(array('email' => $email_id), array('listing_id = ?' => $listing_id));\n }\n } else {\n $tableOtherinfo->update(array('email' => $email_id), array('listing_id = ?' => $listing_id));\n }\n }\n\n //CHECK PHONE OPTION IS THERE OR NOT\n if (isset($values['phone'])) {\n $tableOtherinfo->update(array('phone' => $values['phone']), array('listing_id = ?' => $listing_id));\n }\n\n //CHECK WEBSITE OPTION IS THERE OR NOT\n if (isset($values['website'])) {\n $tableOtherinfo->update(array('website' => $values['website']), array('listing_id = ?' => $listing_id));\n }\n\n //SHOW SUCCESS MESSAGE\n $form->addNotice(Zend_Registry::get('Zend_Translate')->_('Your changes have been saved successfully.'));\n }\n }", "function contacts($args){\n\t\t$this->view->add('page_title','Contacts');\n\t\t\n\t\t//Set tool box\n\t\tif( $args['tool'] == null ){\n $tool = 'display';\n } else {\n $tool = $args['tool'];\n }\n\t\t if( $func = $this->contacts_toolbox($tool,$this) ) {\n \n // check for success, default to no\n $success = false;\n \n // choose tool and execute\n $success = $func($this);\n }\n \n // add self link\n $this->view->add('self_link',\n $this->app->form_path('admin/contacts')\n );\n\t}", "public function contactAction() {\n $request = $this->getRequest();\n $collectionConstraint = new Collection(array(\n 'name' => new NotBlank(),\n 'email' => array(new Email(), new NotBlank()),\n 'subject' => array(),\n 'message' => new NotBlank()\n ));\n $data = array();\n $data['subject'] = 'Contact For Support';\n //create the form\n $formBuilder = $this->createFormBuilder($data, array(\n 'validation_constraint' => $collectionConstraint,\n ))\n ->add('name')\n ->add('subject', null, array('required' => false))\n ->add('email', 'email', array('attr' => array('class' => 'email')))\n ->add('message', 'textarea',array('attr' => array('rows' => '10','cols' => '50')))\n ;\n $form = $formBuilder->getForm();\n //fill the form data from the request\n $form->bindRequest($request);\n //check if the form values are correct\n if ($form->isValid()) {\n $data = $form->getData();\n $to = '[email protected]';\n $subject = $data['subject'];\n $message = $data['message'];\n $headers = 'From: '.$data['email']. \"\\r\\n\";\n\n mail($to, $subject, $message, $headers);\n return $this->render('SiteSavalizeBundle:Company:msgToUser.html.twig', array('msg' =>\"Thank u \".$data['name'].\" for contacting us\"));\n }\n \n return $this->render('SiteSavalizeBundle:Company:contact.html.twig', array('form' => $form->createView()));\n }", "function contactform_plugin(){\n\n $content = '';\n $content .= '<h3>Contact us! </h3>';\n\n $content .= '<form method=\"post\" action=\"http://localhost:10008/thank-you/\" />';\n\n $content .= '<label for=\"your_name\">Name</label>';\n $content .= '<input type=\"text\" name=\"your_name\" class=\"form-control\" placeholder=\"Enter your name\" />';\n \n $content .= '<label for=\"your_email\">Email</label>';\n $content .= '<input type=\"email\" name=\"your_email\" class=\"form-control\" placeholder=\"Enter your emailadress\" />';\n\n \n $content .= '<label for=\"your_message\">Message</label>';\n $content .= '<textarea name=\"your_message\" class=\"form-control\" placeholder=\"Enter your message\"></textarea>';\n\n $content .= '<br /> <input class=\"btn btn-primary\" name=\"form_submit\" type=\"submit\" value=\"Submit\" />';\n\n // closing the form\n $content .= '</form>';\n\n \n return $content;\n \n}", "public function actionContact()\n\t{\n\t\tif(Yii::app()->request->isAjaxRequest){\n\t\t\t$arrayReturn = array(\n\t\t\t\t'status'=>false,\n\t\t\t\t'message'=>'No se pudo enviar el mensaje. Intente mas tarde.'\n\t\t\t);\n\t\t\t$emailContact = GeneralValue::model()->findByPk(1);\n\t\t\t$emailContent = '<p>Un usuario envio un mensaje desde el formulario de contacto de la pagina web de Coeri.</p><br>'.\n\t\t\t'<p><strong>Nombre: </strong>'.$_POST['name'].'</p>'.\n\t\t\t'<p><strong>Correo electrónico: </strong>'.$_POST['email'].'</p>'.\n\t\t\t'<p><strong>Mensaje: </strong>'.$_POST['message'].'</p><br>';\n\n\t\t\tif(MyMethods::sentMail('Mensaje contacto web Mandala', $_POST['email'], $emailContact->value, $emailContent, array('fromName'=>$_POST['name']))){\n\t\t\t\t$arrayReturn = array(\n\t\t\t\t\t'status'=>true,\n\t\t\t\t\t'message'=>'Tu mensaje fue enviado con exito. Muy pronto nos comunicaremos contigo.'\n\t\t\t\t);\n\t\t\t}\n\n\t\t\techo CJSON::encode($arrayReturn);\n\t\t}\n\t\telse\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t}", "function pexeto_contact_form() {\r\n\t\t$html='<div class=\"widget-contact-form\">\r\n\t\t\t<form action=\"'.get_template_directory_uri().'/includes/send-email.php\" method=\"post\" \r\n\t\t\tid=\"submit-form\" class=\"pexeto-contact-form\">\r\n\t\t\t<div class=\"error-box error-message\"></div>\r\n\t\t\t<div class=\"info-box sent-message\"></div>\r\n\t\t\t<input type=\"text\" name=\"name\" class=\"required placeholder\" id=\"name_text_box\" \r\n\t\t\tplaceholder=\"'.pexeto_text( 'name_text' ).'\" />\r\n\t\t\t<input type=\"text\" name=\"email\" class=\"required placeholder email\" \r\n\t\t\tid=\"email_text_box\" placeholder=\"'.pexeto_text( 'your_email_text' ).'\" />\r\n\t\t\t<textarea name=\"question\" rows=\"\" cols=\"\" class=\"required\"\r\n\t\t\tid=\"question_text_area\"></textarea>\r\n\t\t\t<input type=\"hidden\" name=\"widget\" value=\"true\" />\r\n\r\n\t\t\t<a class=\"button send-button\"><span>'.pexeto_text( 'send_text' ).'</span></a>\r\n\t\t\t<div class=\"contact-loader\"></div><div class=\"check\"></div>\r\n\r\n\t\t\t</form><div class=\"clear\"></div></div>';\r\n\t\treturn $html;\r\n\t}", "public function contactUs()\n {\n $this->template->set('global_setting', $this->global_setting);\n $this->template->set('page', 'contact');\n $this->template->set_theme('default_theme');\n $this->template->set_layout('frontend')\n ->title($this->global_setting['site_title'] . ' | Contact Us')\n ->set_partial('header', 'partials/header')\n ->set_partial('footer', 'partials/footer');\n $this->template->build('frontpages/contact_us');\n }", "public function contact()\n {\n $breadCrumb = $this->userEngine->breadcrumbGenerate('contact');\n\n return $this->loadPublicView('user.contact', $breadCrumb['data']);\n }", "public function sendMessagesAction() {\n\t$this->view->form = $form = new Communityad_Form_Contactus();\n\tif ($this->getRequest()->isPost() && $form->isValid($this->getRequest()->getPost())) {\n\t $values = $form->getValues();\n\t $email = Engine_Api::_()->getApi('settings', 'core')->core_mail_from;\n\t $ownerEmail = Engine_Api::_()->getApi('settings', 'core')->ad_saleteam_email;\n\t if (!empty($email)) {\n\t\t// Condition: If there are no E-mail address available of sales team member then message will go to admin derfault id.\n\t\tif (!empty($ownerEmail)) {\n\t\t $ownerEmailArray = explode(\",\", $ownerEmail);\n\t\t foreach ($ownerEmailArray as $owner_email) {\n\t\t\tEngine_Api::_()->getApi('mail', 'core')->sendSystem($owner_email, 'community_team_contact', array(\n\t\t\t\t'communityad_name' => $values['name'],\n\t\t\t\t'communityad_email' => $values['email'],\n\t\t\t\t'communityad_messages' => $values['message'],\n\t\t\t\t'email' => $email,\n\t\t\t\t'queue' => true\n\t\t\t));\n\t\t }\n\t\t} else {\n\t\t Engine_Api::_()->getApi('mail', 'core')->sendSystem($email, 'community_team_contact', array(\n\t\t\t 'communityad_name' => $values['name'],\n\t\t\t 'communityad_email' => $values['email'],\n\t\t\t 'communityad_messages' => $values['message'],\n\t\t\t 'email' => $email,\n\t\t\t 'queue' => true\n\t\t ));\n\t\t}\n\t }\n\n\t $this->_forward('success', 'utility', 'core', array(\n\t\t 'smoothboxClose' => 10,\n\t\t 'parentRefresh' => 10,\n\t\t 'messages' => array('Successsfully send messages.')\n\t ));\n\t}\n }", "public function contacts()\n\t{\n\t\t$data['title'] = 'Contacts | AEY';\n\t\t$data ['view_page'] = 'contact_us';\n\n\t\t\t$this->form_validation->set_rules('name', 'Name', 'required');\n\t\t\t$this->form_validation->set_rules('email', 'Email', 'required');\n\t\t\t$this->form_validation->set_rules('mobile', 'Mobile', 'required');\n\t\t\t$this->form_validation->set_rules('message', 'Message', 'required');\n\n\n\t\t\tif($this->form_validation->run() === FALSE){\n\t\t\t\t$this->load->view('site', $data);\t\n\t\t\t}else{\n\t\t\t\t$this->contact_model->add_contact();\n\t\t\t\t\n\t\t\t\t// Set message\n\t\t\t\t$this->session->set_flashdata('added_contact', 'You have sent your message successfully');\n\t\t\t\tredirect('Home');\n\t\t\t}\t\n\t\t\n\t}", "public function contactUs($data) {\n $name = $data[0];\n $email = $data[1];\n $phone=$data[2];\n $question = $data[3];\n $this->Email->from(array($email => $name));\n $this->Email->bcc(array($this->concierge => 'Concierge'));\n $this->Email->to(Configure::read('Email.contact'));\n $this->Email->emailFormat('both');\n $this->Email->subject('New message from Contact');\n $this->Email->template('contactUs');\n $this->Email->viewVars(array('messageData' => $data));\n return $this->Email->send();\n }", "public function actionContact()\n {\n $this->render('contact');\n }", "public function contactUs($full_name,$email,$phone,$subject,$message,$site_email)\n\t{\n\t\t$full_name = $this->secureInput($full_name);\n\t\t$email = $this->secureInput($email);\n\t\t$phone = $this->secureInput($phone);\n\t\t$subject = $this->secureInput($subject);\n\t\t$message = $this->secureInput($message);\n\t\t$site_email = $this->secureInput($site_email);\n\n\t\t$contact_date = date(\"l, M j, Y, g:i a\");\n\n\t\t$sql = \"INSERT INTO contact_us ( full_name, email, phone, subject, message, reply,contact_date)\n VALUES ('\".$full_name.\"','\".$email.\"','\".$phone.\"', '\".$subject.\"','\".$message.\"','','\".$contact_date.\"')\";\n\t\t$res = $this->processSql($sql);\n\t\tif($res){\n\t\t\t//build email to be sent\n\t\t\t$to = $site_email;\n\t\t\t$subject = \"New message from \".$email;\n\n\t\t\t$admin_message = \"\n\t\t\t<html>\n\t\t\t<head>\n\t\t\t<title>New message from\".$full_name.\"</title>\n\t\t\t</head>\n\t\t\t<body>\n\t\t\t<h3>Query / Comment</h3>\n\t\t\t<p>Hello Site Admin, \".$full_name.\" has sent a query/message. It is as below:</p>\n\t\t\t<p>\".$message.\"</p>\n\t\t\t</body>\n\t\t\t</html>\n\t\t\t\";\n\n\t\t\t// To send HTML mail, the Content-type header must be set\n\t\t\t$headers = \"MIME-Version: 1.0\\r\\n\";\n\t\t\t$headers .= \"Content-type: text/html; charset=iso-8859-1\\r\\n\";\n\t\t\t$headers .= \"From: '\".$full_name.\"'<\".$email.\">\" . \"\\r\\n\";//Modified By GENTLE to show the FROM in the message\n\n\t\t\t$mail_send = mail($to, $subject, $admin_message, $headers );\n\t\t\tif ($mail_send):\n\t\t\treturn 99;\n else:\n return 2;\n endif;\n\t\t\t}else{\n\t\t\treturn 1;\n\t\t}\n\t}", "function editClient($clientname, $firstname, $lastname, $phone, $email, $address, $city, $state)\n\t{\n\t\teditClientContact($clientname, $firstname, $lastname, $phone, $email, $address, $city, $state);\n\t}", "public function contactSubmit()\n {\n // Update newcomer's email and phone\n $this->validate(Request::instance(), [\n 'name' => Auth::user() ? '' : 'required',\n 'email' => 'required|email',\n 'message' => 'required',\n ]);\n\n $user = Auth::user();\n $name = $user ? $user->first_name.' '.$user->last_name : Request::get('name') ;\n $email = Request::get('email');\n $message = Request::get('message');\n $userStatus = $user ? (\n $user->isNewcomer() ? 'un nouveau' : 'un ancien'\n ) : 'un utilisateur non connecté';\n\n // Send email\n $sent = Mail::send('emails.contact', ['user' => $user, 'userStatus' => $userStatus, 'email' => $email, 'text' => $message, 'name' => $name], function ($m) use ($userStatus, $email, $message, $name) {\n $m->from('[email protected]', 'Site de l\\'Inté');\n $m->to('[email protected]', 'Intégration UTT');\n $m->replyTo($email, $name);\n $m->subject('[integration.utt.fr] Nouveau message d\\''.$userStatus);\n });\n\n return Redirect(route(Authorization::getHomeRoute()))->withSuccess('Ton message a bien été transmis !');\n }", "public function send_contact_message() {\n if ($listing_id = wpbdp_getv($_REQUEST, 'listing_id', 0)) {\n $current_user = is_user_logged_in() ? wp_get_current_user() : null;\n\n $author_name = htmlspecialchars(trim(wpbdp_getv($_POST, 'commentauthorname', $current_user ? $current_user->data->user_login : '')));\n $author_email = trim(wpbdp_getv($_POST, 'commentauthoremail', $current_user ? $current_user->data->user_email : ''));\n $message = trim(wp_kses(stripslashes(wpbdp_getv($_POST, 'commentauthormessage', '')), array()));\n\n $validation_errors = array();\n\n if (!$author_name)\n $validation_errors[] = _x(\"Please enter your name.\", 'contact-message', \"WPBDM\");\n\n if ( !wpbdp_validate_value( $author_email, 'email' ) )\n $validation_errors[] = _x(\"Please enter a valid email.\", 'contact-message', \"WPBDM\");\n\n if (!$message)\n $validation_errors[] = _x('You did not enter a message.', 'contact-message', 'WPBDM');\n\n if (wpbdp_get_option('recaptcha-on')) {\n if ($private_key = wpbdp_get_option('recaptcha-private-key')) {\n if ( !function_exists( 'recaptcha_get_html' ) )\n require_once(WPBDP_PATH . 'libs/recaptcha/recaptchalib.php');\n\n $resp = recaptcha_check_answer($private_key, $_SERVER['REMOTE_ADDR'], $_POST['recaptcha_challenge_field'], $_POST['recaptcha_response_field']);\n if (!$resp->is_valid)\n $validation_errors[] = _x(\"The reCAPTCHA wasn't entered correctly.\", 'contact-message', 'WPBDM');\n }\n }\n\n if (!$validation_errors) {\n $headers = \"MIME-Version: 1.0\\n\" .\n \"From: $author_name <$author_email>\\n\" .\n \"Reply-To: $author_email\\n\" .\n \"Content-Type: text/plain; charset=\\\"\" . get_option('blog_charset') . \"\\\"\\n\";\n\n $subject = \"[\" . get_option( 'blogname' ) . \"] \" . sprintf(_x('Contact via \"%s\"', 'contact email', 'WPBDM'), wp_kses( get_the_title($listing_id), array() ));\n $wpbdmsendtoemail=wpbusdirman_get_the_business_email($listing_id);\n $time = date_i18n( __('l F j, Y \\a\\t g:i a'), current_time( 'timestamp' ) );\n\n $body = wpbdp_render_page(WPBDP_PATH . 'templates/email/contact.tpl.php', array(\n 'listing_url' => get_permalink($listing_id),\n 'name' => $author_name,\n 'email' => $author_email,\n 'message' => $message,\n 'time' => $time\n ), false);\n\n $html = '';\n\n // TODO: should use WPBDP_Email instead\n if(wp_mail( $wpbdmsendtoemail, $subject, $body, $headers )) {\n $html .= \"<p>\" . _x(\"Your message has been sent.\", 'contact-message', \"WPBDM\") . \"</p>\";\n } else {\n $html .= \"<p>\" . _x(\"There was a problem encountered. Your message has not been sent\", 'contact-message', \"WPBDM\") . \"</p>\";\n }\n\n $html .= sprintf('<p><a href=\"%s\">%s</a></p>', get_permalink($listing_id), _x('Return to listing.', 'contact-message', \"WPBDM\"));\n\n return $html;\n } else {\n return wpbdp_listing_contact_form( $listing_id, $validation_errors );\n }\n }\n }", "function do_contact_client_email_all($adata, $aret_flag=0) {\n\t# Dim Some Vars\n\t\tglobal $_CCFG, $_TCFG, $_DBCFG, $db_coin, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp;\n\t\t$DesiredGroup\t= 0;\n\t\t$DesiredServer\t= 0;\n\t\t$DesiredAlias\t= 0;\n\t\t$DesiredClient\t= 0;\n\t\t$_ret_msg\t\t= '';\n\n\t# Check if we are sending to a group instead of all clients\n\t\t$pos = strpos(strtolower($adata['cc_cl_id']), 'group');\n\t\tIF ($pos !== false) {\n\t\t\t$pieces = explode('|', $adata['cc_cl_id']);\n\t\t\t$DesiredGroup = $pieces[1];\n\t\t}\n\n\t# Check if we are sending to a server instead of all clients\n\t\t$pos2 = strpos(strtolower($adata['cc_cl_id']), 'server');\n\t\tIF ($pos2 !== false) {\n\t\t\t$pieces = explode('|', $adata['cc_cl_id']);\n\t\t\t$DesiredServer = $pieces[1];\n\t\t}\n\n\t# Check if we are sending to an alias for a client\n\t\t$pos3 = strpos(strtolower($adata['cc_cl_id']), 'alias');\n\t\tIF ($pos3 !== false) {\n\t\t\t$pieces = explode('|', $adata['cc_cl_id']);\n\t\t\t$DesiredAlias = $pieces[1];\n\t\t}\n\n\t# Check if we are sending to all contacts for a client\n\t\t$pos3 = strpos(strtolower($adata['cc_cl_id']), 'contacts');\n\t\tIF ($pos3 !== false) {\n\t\t\t$pieces = explode('|', $adata['cc_cl_id']);\n\t\t\t$DesiredClient = $pieces[1];\n\t\t}\n\n\t# Get site contact information array\n\t\t$_mcinfo\t= get_contact_info($adata['cc_mc_id']);\n\n\t# Set Query for select\n\t\t$query\t= 'SELECT ';\n\n\t\tIF ($DesiredAlias) {\n\t\t\t$query .= $_DBCFG['clients_contacts'].'.contacts_email, ';\n\t\t\t$query .= $_DBCFG['clients_contacts'].'.contacts_name_first, ';\n\t\t\t$query .= $_DBCFG['clients_contacts'].'.contacts_name_last';\n\t\t} ELSEIF ($DesiredClient) {\n\t\t\t$query .= $_DBCFG['clients'].'.cl_email, ';\n\t\t\t$query .= $_DBCFG['clients'].'.cl_name_first, ';\n\t\t\t$query .= $_DBCFG['clients'].'.cl_name_last, ';\n\t\t\t$query .= $_DBCFG['clients_contacts'].'.contacts_email, ';\n\t\t\t$query .= $_DBCFG['clients_contacts'].'.contacts_name_first, ';\n\t\t\t$query .= $_DBCFG['clients_contacts'].'.contacts_name_last';\n\t\t} ELSE {\n\t\t\t$query .= $_DBCFG['clients'].'.cl_email, ';\n\t\t\t$query .= $_DBCFG['clients'].'.cl_name_first, ';\n\t\t\t$query .= $_DBCFG['clients'].'.cl_name_last';\n\t\t}\n\t\tIF ($DesiredGroup) {$query .= ', '.$_DBCFG['clients'].'.cl_groups';}\n\t\t$query .= ' FROM ';\n\n\t\tIF ($DesiredServer) {\n\t\t\t$query .= $_DBCFG['clients'].', '.$_DBCFG['domains'];\n\t\t\t$query .= ' WHERE (('.$_DBCFG['domains'].'.dom_si_id='.$DesiredServer.' AND ';\n\t\t\t$query .= $_DBCFG['domains'].'.dom_cl_id='.$_DBCFG['clients'].'.cl_id)';\n\n\t\t} ELSEIF ($DesiredGroup) {\n\t\t\t$query .= $_DBCFG['clients'];\n\t\t\t$query .= ' WHERE (('.$_DBCFG['clients'].'.cl_groups <> 0)';\n\n\t\t} ELSEIF ($DesiredAlias) {\n\t\t\t$query .= $_DBCFG['clients_contacts'];\n\t\t\t$query .= ' WHERE ('.$_DBCFG['clients_contacts'].'.contacts_id='.$DesiredAlias.')';\n\n\t\t} ELSEIF ($DesiredClient) {\n\t\t\t$query .= $_DBCFG['clients'].', '.$_DBCFG['clients_contacts'];\n\t\t\t$query .= ' WHERE (';\n\t\t\t$query .= $_DBCFG['clients'].'.cl_id='.$DesiredClient.' OR (';\n\t\t\t$query .= $_DBCFG['clients'].'.cl_id='.$_DBCFG['clients_contacts'].'.contacts_cl_id AND ';\n\t\t\t$query .= $_DBCFG['clients_contacts'].'.contacts_cl_id='.$DesiredClient.')';\n\t\t\t$query .= ')';\n\n\t\t} ELSEIF ($adata['cc_cl_id'] == '-1') {\n\t\t\t$query .= $_DBCFG['clients'];\n\t\t\t$query .= \" WHERE cl_status='active' OR cl_status='\".$db_coin->db_sanitize_data($_CCFG['CL_STATUS'][1]).\"'\";\n\n\t\t} ELSE {\n\t\t\t$query .= $_DBCFG['clients'];\n\t\t\t$query .= ' WHERE ('.$_DBCFG['clients'].'.cl_id='.$adata['cc_cl_id'].')';\n\t\t}\n\n\t\tIF ($DesiredServer || $DesiredGroup) {\n\t\t\t$query\t.= ' AND ('.$_DBCFG['clients'].\".cl_status='active'\";\n\t\t\t$query\t.= ' OR '.$_DBCFG['clients'].\".cl_status='\".$db_coin->db_sanitize_data($_CCFG['CL_STATUS'][1]).\"'))\";\n\t\t}\n\n\t# Do select\n\t\t$result\t\t= $db_coin->db_query_execute($query);\n\t\t$numrows\t\t= $db_coin->db_query_numrows($result);\n\t\t$_emails_sent\t= 0;\n\t\t$_emails_error\t= 0;\n\t\t$_sento\t\t= '';\n\n\t# Process query results\n\t\twhile($row = $db_coin->db_fetch_array($result)) {\n\n\t\t# ONLY clients in specified group, OR All clients if group not specified\n\t\t\tIF (!$DesiredGroup || ($DesiredGroup && Check_User_Group($DesiredGroup, $row['cl_groups']))) {\n\t\t\t# Loop all clients and send email\n\t\t\t# Set eMail Parameters (pre-eval template, some used in template)\n\t\t\t\tIF ($_CCFG['_PKG_SAFE_EMAIL_ADDRESS']) {\n \t\t\t\t\t$mail['recip']\t\t= $row['contacts_email'] ? $row['contacts_email'] : $row['cl_email'];\n\t\t\t\t\t$mail['from']\t\t= $_mcinfo['c_email'];\n\t\t\t\t} ELSE {\n\t\t\t\t\t$mail['recip']\t\t= $row['contacts_name_first'] ? $row['contacts_name_first'] : $row['cl_name_first'];\n\t\t\t\t\t$mail['recip']\t\t.= ' ';\n\t\t\t\t\t$mail['recip']\t\t.= $row['contacts_name_last'] ? $row['contacts_name_last'] : $row['cl_name_last'];\n\t\t\t\t\t$mail['recip']\t\t.= ' <';\n\t\t\t\t\t$mail['recip']\t\t.= $row['contacts_email'] ? $row['contacts_email'] : $row['cl_email'];\n\t\t\t\t\t$mail['recip']\t\t.= '>';\n\t\t\t\t\t$mail['from']\t\t= $_mcinfo['c_name'].' <'.$_mcinfo['c_email'].'>';\n\t\t\t\t}\n\t\t\t\t#\t$mail['cc']\t\t= $_mcinfo['c_name'].' <'.$_mcinfo['c_email'].'>';\n\n\t\t\t\tIF ($_CCFG['MAIL_USE_CUSTOM_SUBJECT']) {\n\t\t\t\t\t$mail['subject']\t= $adata['cc_subj'];\n\t\t\t\t} ELSE {\n\t\t\t\t\t$mail['subject']\t= $_CCFG['_PKG_NAME_SHORT'].$_LANG['_MAIL']['CC_FORM_SUBJECT_PRE'];\n\t\t\t\t}\n\n\t\t\t# Set MTP (Mail Template Parameters) array\n\t\t\t\t$_MTP['to_name']\t = $row['contacts_name_first'] ? $row['contacts_name_first'] : $row['cl_name_first'];\n\t\t\t\t$_MTP['to_name']\t.= ' ';\n\t\t\t\t$_MTP['to_name']\t.= $row['contacts_name_last'] ? $row['contacts_name_last'] : $row['cl_name_last'];\n\t\t\t\t$_MTP['to_email']\t = $row['contacts_email'] ? $row['contacts_email'] : $row['cl_email'];\n\t\t\t\t$_MTP['from_name']\t = $_mcinfo['c_name'];\n\t\t\t\t$_MTP['from_email']\t = $_mcinfo['c_email'];\n\t\t\t\t$_MTP['subject']\t = $adata['cc_subj'];\n\t\t\t\t$_MTP['message']\t = $adata['cc_msg'];\n\t\t\t\t$_MTP['site']\t\t = $_CCFG['_PKG_NAME_SHORT'];\n\n\t\t\t# Load message template (processed)\n\t\t\t\t$mail['message']\t= get_mail_template('email_contact_client_form', $_MTP);\n\n\t\t\t# Call basic email function (ret=1 on error)\n\t\t\t\t$_ret = do_mail_basic($mail);\n\n\t\t\t# Show what was sent\n\t\t\t\t$_sento .= htmlspecialchars($mail['recip']).'<br>';\n\n\t\t\t# Check return\n\t\t\t\tIF ($_ret) {$_emails_error++;} ELSE {$_emails_sent++;}\n\t\t\t}\n\t\t}\n\n\t# Build Title String, Content String, and Footer Menu String\n\t\t$_tstr = $_LANG['_MAIL']['CC_FORM_RESULT_TITLE'];\n\n\t\t$_cstr .= '<center>'.$_nl;\n\t\t$_cstr .= '<table cellpadding=\"5\">'.$_nl;\n\t\t$_cstr .= '<tr><td class=\"TP5MED_NL\">'.$_nl;\n\t\tIF ($_emails_error) {\n\t\t\t$_cstr .= $_LANG['_MAIL']['CC_FORM_MSG_02_L1'];\n\t\t\t$_cstr .= '<br>'.$_LANG['_MAIL']['CC_FORM_MSG_02_L2'];\n\t\t} ELSE {\n\t\t\t$_cstr .= $_LANG['_MAIL']['CC_FORM_MSG_04_L1'];\n\t\t}\n\t\t$_cstr .= '<br>'.$_LANG['_MAIL']['total'].':'.$_sp.$_emails_sent.$_sp.$_LANG['_MAIL']['sent'];\n\t\t$_cstr .= '<br><br>'.$_sento;\n\t\t$_cstr .= '</td></tr>'.$_nl;\n\t\t$_cstr .= '</table>'.$_nl;\n\t\t$_cstr .= '</center>'.$_nl;\n\n\t\t$_mstr_flag\t= 0;\n\t\t$_mstr\t\t= '&nbsp;'.$_nl;\n\n\t# Call block it function\n\t\t$_out .= do_mod_block_it($_tstr, $_cstr, $_mstr_flag, $_mstr, '1');\n\t\t$_out .= '<br>'.$_nl;\n\n\t\tIF ($aret_flag) {return $_out;} ELSE {echo $_out;}\n}", "public function contactForm() {\n\n $pseudo = Str::secured($_POST['pseudo']);\n $content = Str::secured($_POST['content']);\n $content = \"Vous avez recu un message de \" . $pseudo . \"(\" . $_POST['email'] . \") \" . $content;\n \n $mail = new PHPMailer();\n $mail->IsSMTP();\n $mail->SMTPDebug = 1; /* erreur et message */\n $mail->SMTPAuth = true;\n $mail->SMTPSecure = 'ssl';\n $mail->Host = 'linheb04.ikoula.com';\n $mail->Port = 465; /* ou 587 */\n $mail->IsHTML(true);\n $mail->Username = \"[email protected]\";\n $mail->Password = \"Raja6010\";\n $mail->SetFrom(\"[email protected]\");\n $mail->Subject = \"Envoi depuis la page Contact\";\n $mail->Body = $content;\n $mail->AddAddress(\"[email protected]\");\n \n if(!$mail->Send()){\n \n Session::getInstance()->setFlash('danger', \"Echec de l'envoi.\");\n \n } else {\n \n Session::getInstance()->setFlash('success', \"Votre message a bien été envoyé.\");\n \n }\n \n header('Location: ./index.php');\n }", "public function testLoggedInContactUsForm()\n {\n if (LOCATION == 'Live') {\n $this->markTestSkipped('Cannot run in Live environment');\n return;\n }\n $this->loginPage->open()\n ->enterUserId($this->userData['loggedInContactForm']['uid'])\n ->enterUserPassword($this->userData['loggedInContactForm']['pwd'])\n ->clickButton();\n $this->loggedOnContactPage->open()\n ->checkPageTitle('contact us')\n ->checkContactForm()\n ->navigateToContactUsViaSideButton()\n ->clickSignOut();\n }", "public function indexAction()\n\t{\n\t\tif ((!$this->commons->hasPermission('contact/edit')) && (!$this->commons->hasPermission('contact/add'))) {\n\t\t\tNot_foundController::show('403');\n\t\t\texit();\n\t\t}\n\t\t/**\n\t\t * Check if from is submitted or not \n\t\t **/\n\t\tif (!isset($_POST['submit'])) {\n\t\t\t$this->url->redirect('contacts');\n\t\t\texit();\n\t\t}\n\t\t/**\n\t\t * Validate form data\n\t\t * If some data is missing or data does not match pattern\n\t\t * Return to info view \n\t\t **/\n\t\tif ($validate_field = $this->validateField()) {\n\t\t\t$this->session->data['message'] = array('alert' => 'error', 'value' => 'Please enter valid ' . implode(\", \", $validate_field) . '!');\n\t\t\t$this->url->redirect('contacts');\n\t\t}\n\n\t\tif ($this->commons->validateToken($this->url->post('_token'))) {\n\t\t\t$this->session->data['message'] = array('alert' => 'warning', 'value' => 'Token does not match!');\n\t\t\t$this->url->redirect('contacts');\n\t\t}\n\n\t\tif (!empty($this->url->post('id'))) {\n\t\t\t$data = $this->url->post('contact');\n\t\t\t$data['client'] = $this->url->post('client');\n\t\t\t$data['country'] = $data['address']['country'];\n\t\t\t$data['address'] = json_encode($data['address']);\n\t\t\t$data['person'] = json_encode($data['person']);\n\t\t\t$data['id'] = $this->url->post('id');\n\t\t\t$data['expire'] = date_format(date_create($data['expire']), 'Y-m-d');\n\n\t\t\t$data['marketing']['email'] = isset($data['marketing']['email']) ? $data['marketing']['email'] : false;\n\t\t\t$data['marketing']['phone'] = isset($data['marketing']['phone']) ? $data['marketing']['phone'] : false;\n\t\t\t$data['marketing']['sms'] = isset($data['marketing']['sms']) ? $data['marketing']['sms'] : false;\n\t\t\t$data['marketing']['social'] = isset($data['marketing']['social']) ? $data['marketing']['social'] : false;\n\t\t\t$data['marketing'] = json_encode($data['marketing']);\n\n\t\t\t$result = $this->contactModel->updateContact($data);\n\t\t\t$this->session->data['message'] = array('alert' => 'success', 'value' => 'Contact updated successfully.');\n\t\t\t$this->url->redirect('contact/edit&id=' . $this->url->post('id'));\n\t\t} else {\n\t\t\t$data = $this->url->post('contact');\n\t\t\t$data['country'] = $data['address']['country'];\n\t\t\t$data['address'] = json_encode($data['address']);\n\t\t\t$data['person'] = json_encode($data['person']);\n\t\t\t$data['expire'] = date_format(date_create($data['expire']), 'Y-m-d');\n\n\t\t\t$data['marketing']['email'] = isset($data['marketing']['email']) ? $data['marketing']['email'] : false;\n\t\t\t$data['marketing']['phone'] = isset($data['marketing']['phone']) ? $data['marketing']['phone'] : false;\n\t\t\t$data['marketing']['sms'] = isset($data['marketing']['sms']) ? $data['marketing']['sms'] : false;\n\t\t\t$data['marketing']['social'] = isset($data['marketing']['social']) ? $data['marketing']['social'] : false;\n\t\t\t$data['marketing'] = json_encode($data['marketing']);\n\n\t\t\t$result = $this->contactModel->createContact($data);\n\t\t\t$this->session->data['message'] = array('alert' => 'success', 'value' => 'Contact created successfully.');\n\t\t\t$this->url->redirect('contact/edit&id=' . $result);\n\t\t}\n\t}", "public function contactAction()\n { //Cargo el formulario\n $contacto = new Contacto();\n $form = $this->createForm(new ContactoType(), $contacto);\n\n $request = $this->getRequest();\n if ($request->getMethod() == 'POST') {\n $form->bind($request);\n\n if ($form->isValid()) {\n \n $message = \\Swift_Message::newInstance()\n ->setSubject('Consulta de contacto de todocerdodigital.com')\n ->setFrom('[email protected]')\n ->setTo($this->container->getParameter('blogger_blog.emails.contact_email'))\n ->setBody($this->renderView('TodoCerdoTodoCerdoBundle:Page:contactEmail.txt.twig', array('contacto' => $contacto)));\n $this->get('mailer')->send($message);\n\n $this->get('session')->getFlashBag()->add('message-notice', 'Su consulta ha sido enviada satisfactoriamente. Gracias!');\n\n // Redirect - This is important to prevent users re-posting\n // the form if they refresh the page\n // realiza alguna acción, como enviar un correo electrónico\n\n // Redirige - Esto es importante para prevenir que el usuario reenvíe\n // el formulario si actualiza la página\n return $this->redirect($this->generateUrl('TodoCerdoTodoCerdoBundle_contact'));\n }\n }\n return $this->render('TodoCerdoTodoCerdoBundle:Page:contact.html.twig', array('form' => $form->createView()));\n }", "function notify_request_client($email) {\n\t$link = SITE_URL.'requests.php';\n\n\t$text = \"Hello,\\n\";\n\t$text .= \"\\nYou requested an appointment. You can manage your appointment below:\\n\";\n\t$text .= \"\\n<a href='$link'>Manage</a>\\n\";\n\t$text .= \"\\nThanks,\\n\";\n\t$text .= \"The Ma-Maria team\";\n\n\tif(MAIL_ENABLED) {\n\t\tmail($email, 'Ma-Maria - Request', $text);\n\t}\n}", "public function indexAction() {\n $contact = new Application_Model_Contact();\n\n // Check whether contact form submitted and is valid\n if($this->_request->isPost() && $contact->getForm()->isValid($this->_request->getParams())) {\n // Retrieve parameters from request and pass back to form to filter only form values\n $contact->getForm()->populate($this->_request->getParams());\n $contact->populate();\n\n // Save and send contact message\n $isSent = $contact->save()->send();\n\n if($isSent) {\n $this->_flashMessenger->addMessage('Thank you for contacting us. Your message has been sent.');\n $contact->getForm()->reset();\n\n } else {\n $this->_flashMessenger->addMessage('An error occurred and your message could not be sent. Please try again.');\n }\n\n $this->_helper->redirector('index');\n }\n \n // Pass variables to view\n $this->view->contact = $contact;\n }" ]
[ "0.7231499", "0.6915428", "0.6887112", "0.6880932", "0.68679565", "0.68593895", "0.6858419", "0.6858419", "0.68452793", "0.678134", "0.67791045", "0.67791045", "0.67791045", "0.67271966", "0.6659383", "0.6655557", "0.6652063", "0.66413724", "0.6608247", "0.66058564", "0.66003335", "0.6596395", "0.65859437", "0.65766287", "0.6568614", "0.6567703", "0.65654844", "0.65654844", "0.65654844", "0.6560395", "0.6560395", "0.6560395", "0.6560395", "0.6560395", "0.6560395", "0.655882", "0.655882", "0.655882", "0.655882", "0.655882", "0.655882", "0.655882", "0.655882", "0.65191555", "0.64753866", "0.64633673", "0.6446177", "0.6420209", "0.6407198", "0.64008355", "0.6394724", "0.6385012", "0.6358166", "0.6354148", "0.6292047", "0.6259251", "0.6228193", "0.62049264", "0.6202554", "0.6164722", "0.61427814", "0.6125913", "0.61232424", "0.6121606", "0.6092909", "0.60908306", "0.60766125", "0.6064502", "0.6051121", "0.60465246", "0.60314155", "0.6022397", "0.601508", "0.599113", "0.5971468", "0.5970404", "0.5968008", "0.5967023", "0.5957343", "0.59470296", "0.5944485", "0.5940951", "0.59236723", "0.5906644", "0.58959335", "0.5889999", "0.58810705", "0.5880568", "0.58759856", "0.587451", "0.58744985", "0.58484894", "0.5840709", "0.5834884", "0.58257127", "0.5811048", "0.5808845", "0.5802002", "0.57952386", "0.57898957" ]
0.63813424
52
Do process contact sitetouser email form (build, set email))
function do_contact_client_email($adata, $aret_flag=0) { # Dim Some Vars global $_CCFG, $_TCFG, $_DBCFG, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp; # Check if we are sending to an additional email instead of the clients regular address $pos = strpos(strtolower($adata['cc_cl_id']), "alias"); if ($pos !== false) { $pieces = explode('|', $adata['cc_cl_id']); $_ccinfot = get_contact_client_info_alias($pieces[1], 0); $_ccinfo = $_ccinfot[1]; } ELSE { # Get client contact information array $_ccinfo = get_contact_client_info($adata['cc_cl_id']); } # Get site contact information array $_mcinfo = get_contact_info($adata['cc_mc_id']); # Set eMail Parameters (pre-eval template, some used in template) IF ($_CCFG['_PKG_SAFE_EMAIL_ADDRESS']) { $mail['recip'] = $_ccinfo['cl_email']; $mail['from'] = $_mcinfo['c_email']; $mail['cc'] = $_mcinfo['c_email']; } ELSE { $mail['recip'] = $_ccinfo['cl_name_first'].' '.$_ccinfo['cl_name_last'].' <'.$_ccinfo['cl_email'].'>'; $mail['from'] = $_mcinfo['c_name'].' <'.$_mcinfo['c_email'].'>'; $mail['cc'] = $_mcinfo['c_name'].' <'.$_mcinfo['c_email'].'>'; } IF ($_CCFG['MAIL_USE_CUSTOM_SUBJECT']) { $mail['subject'] = $adata['cc_subj']; } ELSE { $mail['subject'] = $_CCFG['_PKG_NAME_SHORT'].$_LANG['_MAIL']['CC_FORM_SUBJECT_PRE']; } # Set MTP (Mail Template Parameters) array $_MTP['to_name'] = $_ccinfo['cl_name_first'].' '.$_ccinfo['cl_name_last']; $_MTP['to_email'] = $_ccinfo['cl_email']; $_MTP['from_name'] = $_mcinfo['c_name']; $_MTP['from_email'] = $_mcinfo['c_email']; $_MTP['subject'] = $adata['cc_subj']; $_MTP['message'] = $adata['cc_msg']; $_MTP['site'] = $_CCFG['_PKG_NAME_SHORT']; # Load message template (processed) $mail['message'] = get_mail_template('email_contact_client_form', $_MTP); # Call basic email function (ret=0 on error) $_ret = do_mail_basic($mail); # Check return IF ($_ret) { $_ret_msg = $_LANG['_MAIL']['CC_FORM_MSG_02_L1']; $_ret_msg .= '<br>'.$_LANG['_MAIL']['CC_FORM_MSG_02_L2']; } ELSE { $_ret_msg = $_LANG['_MAIL']['CC_FORM_MSG_03_L1']; } # Build Title String, Content String, and Footer Menu String $_tstr = $_LANG['_MAIL']['CC_FORM_RESULT_TITLE']; $_cstr .= '<center>'.$_nl; $_cstr .= '<table cellpadding="5" width="100%">'.$_nl; $_cstr .= '<tr><td class="TP5MED_NC">'.$_nl; $_cstr .= $_ret_msg.$_nl; $_cstr .= '</td></tr>'.$_nl; $_cstr .= '</table>'.$_nl; $_cstr .= '</center>'.$_nl; $_mstr_flag = 0; $_mstr = '&nbsp;'.$_nl; # Call block it function $_out .= do_mod_block_it($_tstr, $_cstr, $_mstr_flag, $_mstr, '1'); $_out .= '<br>'.$_nl; IF ($aret_flag) {return $_out;} ELSE {echo $_out;} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setEmailForm(&$smartyEmailForm) {\n\t\t//Check if there is a valid email address in the database for the given combination of employee, service, position and organisation id\n\t\tif ($this->getEmailAddress($smartyEmailForm) || $this->piVars['mode'] == 'set_contact_form') {\n\t\t\tif($this->getEmailAddress($smartyEmailForm)){\n\t\t\t\t//Assign action url of email form with mode 'check_email_form'\n\t\t\t\t$smartyEmailForm->assign('action_url',htmlspecialchars($this->pi_linkTP_keepPIvars_url(array(mode => 'check_email_form'),0,0)));\n\t\t\t}else{\n\t\t\t\t//Assign action url of email form with mode 'check_contact_form'\n\t\t\t\t$smartyEmailForm->assign('action_url',htmlspecialchars($this->pi_linkTP_keepPIvars_url(array(mode => 'check_contact_form'),0,0)));\n\t\t\t}\n\n\t\t\t//Assign template labels\n\t\t\t$hoster_email=$this->get_hoster_email();\n\t\t\t$smartyEmailForm->assign('email_form_label',$this->pi_getLL('tx_civserv_pi1_email_form.email_form','E-Mail Form'));\n\t\t\t$smartyEmailForm->assign('contact_form_label',str_replace('###HOSTER###', $hoster_email, $this->pi_getLL('tx_civserv_pi1_email_form.contact_form','Contact '.$hoster_email)));\n\t\t\t$smartyEmailForm->assign('notice_label',$this->pi_getLL('tx_civserv_pi1_email_form.notice','Please enter your postal address oder email address, so that we can send you an answer'));\n\t\t\t$smartyEmailForm->assign('title_label', $this->pi_getLL('tx_civserv_pi1_email_form.title','Title'));\n\t\t\t$smartyEmailForm->assign('chose_option', $this->pi_getLL('tx_civserv_pi1_email_form.chose','Please chose'));\n\t\t\t$smartyEmailForm->assign('female_option', $this->pi_getLL('tx_civserv_pi1_email_form.female','Ms.'));\n\t\t\t$smartyEmailForm->assign('male_option', $this->pi_getLL('tx_civserv_pi1_email_form.male','Mr.'));\n\t\t\t$smartyEmailForm->assign('firstname_label',$this->pi_getLL('tx_civserv_pi1_email_form.firstname','Firstname'));\n\t\t\t$smartyEmailForm->assign('surname_label',$this->pi_getLL('tx_civserv_pi1_email_form.surname','Surname'));\n\t\t\t$smartyEmailForm->assign('street_label',$this->pi_getLL('tx_civserv_pi1_email_form.street','Street, Nr.'));\n\t\t\t$smartyEmailForm->assign('postcode_label',$this->pi_getLL('tx_civserv_pi1_email_form.postcode','Postcode'));\n\t\t\t$smartyEmailForm->assign('city_label',$this->pi_getLL('tx_civserv_pi1_email_form.city','City'));\n\t\t\t$smartyEmailForm->assign('email_label',$this->pi_getLL('tx_civserv_pi1_email_form.email','E-Mail'));\n\t\t\t$smartyEmailForm->assign('phone_label',$this->pi_getLL('tx_civserv_pi1_email_form.phone','Phone'));\n\t\t\t$smartyEmailForm->assign('fax_label',$this->pi_getLL('tx_civserv_pi1_email_form.fax','Fax'));\n\t\t\t$smartyEmailForm->assign('subject_label',$this->pi_getLL('tx_civserv_pi1_email_form.subject','Subject'));\n\t\t\t$smartyEmailForm->assign('bodytext_label',$this->pi_getLL('tx_civserv_pi1_email_form.bodytext','Your text'));\n\t\t\t$smartyEmailForm->assign('submit_label',$this->pi_getLL('tx_civserv_pi1_email_form.submit','Send e-mail'));\n\t\t\t$smartyEmailForm->assign('reset_label',$this->pi_getLL('tx_civserv_pi1_email_form.reset','Reset'));\n\t\t\t$smartyEmailForm->assign('required_label',$this->pi_getLL('tx_civserv_pi1_email_form.required','required'));\n\n\t\t\t//Set reset button type to reset functionality\n\t\t\t$smartyEmailForm->assign('button_type','reset');\n\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "function setUserInformation()\r\n{\r\n global $sender ;\r\n global $message ;\r\n global $chemin ;\r\n global $query ;\r\n if(filter_var(strtolower($message), FILTER_VALIDATE_EMAIL) || preg_match(\"#^(none)#i\", $message))\r\n {\r\n sendTextMessage(\"Thank you for your answer to my question.Your setting is correctly set\");\r\n displayAllService();\r\n $query->addUser($sender,strtolower($message));\r\n file_put_contents($chemin,\"\");\r\n }\r\n else\r\n {\r\n sendTextMessage(\"Please provide a valid email or type none if you don't get one 😕 .\");\r\n }\r\n}", "public function sendEmail()\n\t{\n\t\tif (empty($this->get('crmid'))) {\n\t\t\treturn;\n\t\t}\n\t\t$moduleName = 'Contacts';\n\t\t$recordModel = Vtiger_Record_Model::getInstanceById($this->get('crmid'), $moduleName);\n\t\tif ($recordModel->get('emailoptout')) {\n\t\t\t$emailsFields = $recordModel->getModule()->getFieldsByType('email');\n\t\t\t$addressEmail = '';\n\t\t\tforeach ($emailsFields as $fieldModel) {\n\t\t\t\tif (!$recordModel->isEmpty($fieldModel->getFieldName())) {\n\t\t\t\t\t$addressEmail = $recordModel->get($fieldModel->getFieldName());\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!empty($addressEmail)) {\n\t\t\t\t\\App\\Mailer::sendFromTemplate([\n\t\t\t\t\t'template' => 'YetiPortalRegister',\n\t\t\t\t\t'moduleName' => $moduleName,\n\t\t\t\t\t'recordId' => $this->get('crmid'),\n\t\t\t\t\t'to' => $addressEmail,\n\t\t\t\t\t'password' => $this->get('password_t'),\n\t\t\t\t\t'login' => $this->get('user_name'),\n\t\t\t\t\t'acceptable_url' => Settings_WebserviceApps_Record_Model::getInstanceById($this->get('server_id'))->get('acceptable_url')\n\t\t\t\t]);\n\t\t\t}\n\t\t}\n\t}", "abstract protected function _getEmail($info);", "function student_crm_webform_send_email_form_submit($form, $form_state) {\n $case = crm_case_load($form_state['values']['case']);\n $email_addresses = student_crm_webform_send_email('crm_case', $case, $form_state['values']['field'], $form_state['values']['manual-email']);\n \n $case = crm_case_load($form_state['values']['case']);\n $fields = field_info_instances();\n $field = $fields['crm_case'][$case->type][$form_state['values']['field']];\n\n drupal_set_message(t('The form %form has been sent to: !email-addresses', array('%form' => $field['label'], '!email-addresses' => theme('item_list', array('items' => $email_addresses)))));\n}", "public function doemail() {\r\n \tif (isset($_SESSION['userid'])) {\n \t if (isset($_POST['useremail'])) {\n \t \tif ($this->model->putemail($_SESSION['userid'],$_POST['useremail'])) {\n \t \t $this->view->set('infomessage', \"Adres email został zmieniony.\"); \r\n \t \t $this->view->set('redirectto', \"?v=project&a=show\");\r\n \t \t $this->view->render('info_view');\n \t \t} else {\n \t \t $this->view->set('errormessage', \"Nieudana zmiana adresu email.\");\r\n \t $this->view->set('redirectto', \"?v=user&a=edit\");\r\n \t \t $this->view->render('error_view');\n \t \t}\n \t } else {\n \t \t$this->view->set('errormessage', \"Błędny adres email.\");\r\n \t \t$this->view->set('redirectto', \"?v=user&a=edit\");\r\n \t \t$this->view->render('error_view');\n \t }\r\n \t} else {\r\n \t $this->redirect('?v=index&a=show');\r\n \t}\r\n }", "private function emailAtLogin() {}", "function do_contact_supplier_email($adata, $aret_flag=0) {\n\t# Dim Some Vars\n\t\tglobal $_CCFG, $_TCFG, $_DBCFG, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp;\n\n\t# Check if we are sending to an additional email instead of the clients regular address\n\t\t$pos = strpos(strtolower($adata['cc_s_id']), \"alias\");\n\t\tif ($pos !== false) {\n\t\t\t$pieces\t= explode('|', $adata['cc_cl_id']);\n\t\t\t$_ccinfot\t= get_contact_supplier_info_alias($pieces[1], 0);\n\t\t\t$_ccinfo\t= $_ccinfot[1];\n\t } ELSE {\n\t\t# Get supplier contact information array\n\t\t\t$_ccinfo\t= get_contact_supplier_info($adata['cc_s_id']);\n\t\t}\n\n\t# Get site contact information array\n\t\t$_mcinfo = get_contact_info($adata['cc_mc_id']);\n\n\t# Set eMail Parameters (pre-eval template, some used in template)\n\t\tIF ($_CCFG['_PKG_SAFE_EMAIL_ADDRESS']) {\n \t\t\t$mail['recip']\t\t= $_ccinfo['s_email'];\n\t\t\t$mail['from']\t\t= $_mcinfo['c_email'];\n\t\t\t$mail['cc']\t\t= $_mcinfo['c_email'];\n\t\t} ELSE {\n\t\t\tIF ($_ccinfo['s_name_first'] && $_ccinfo['s_name_last']) {\n\t\t\t\t$mail['recip'] = $_ccinfo['s_name_first'].' '.$_ccinfo['s_name_last'].' <'.$_ccinfo['s_email'].'>';\n\t\t\t} ELSE {\n\t\t\t\t$mail['recip'] = $_ccinfo['s_company'].' <'.$_ccinfo['s_email'].'>';\n\t\t\t}\n\t\t\t$mail['from']\t\t= $_mcinfo['c_name'].' <'.$_mcinfo['c_email'].'>';\n\t\t\t$mail['cc']\t\t= $_mcinfo['c_name'].' <'.$_mcinfo['c_email'].'>';\n\t\t}\n\n\t\tIF ($_CCFG['MAIL_USE_CUSTOM_SUBJECT']) {\n\t\t\t$mail['subject']\t= $adata['cc_subj'];\n\t\t} ELSE {\n\t\t\t$mail['subject']\t= $_CCFG['_PKG_NAME_SHORT'].$_LANG['_MAIL']['CC_FORM_SUBJECT_PRE'];\n\t\t}\n\n\t# Set MTP (Mail Template Parameters) array\n\t\tIF ($_ccinfo['s_name_first'] && $_ccinfo['s_name_last']) {\n\t\t\t$_MTP['to_name']\t= $_ccinfo['s_name_first'].' '.$_ccinfo['s_name_last'];\n\t\t} ELSE {\n\t\t\t$_MTP['to_name']\t= $_ccinfo['s_company'];\n\t\t}\n\t\t$_MTP['to_email']\t= $_ccinfo['s_email'];\n\t\t$_MTP['from_name']\t= $_mcinfo['c_name'];\n\t\t$_MTP['from_email']\t= $_mcinfo['c_email'];\n\t\t$_MTP['subject']\t= $adata['cc_subj'];\n\t\t$_MTP['message']\t= $adata['cc_msg'];\n\t\t$_MTP['site']\t\t= $_CCFG['_PKG_NAME_SHORT'];\n\n\t# Load message template (processed)\n\t\t$mail['message']\t= get_mail_template('email_contact_supplier_form', $_MTP);\n\n\t# Call basic email function (ret=0 on error)\n\t\t$_ret = do_mail_basic($mail);\n\n\t# Check return\n\t\tIF ($_ret) {\n\t\t\t$_ret_msg = $_LANG['_MAIL']['CC_FORM_MSG_02_L1'];\n\t\t\t$_ret_msg .= '<br>'.$_LANG['_MAIL']['CC_FORM_MSG_02_L2'];\n\t\t} ELSE {\n\t\t\t$_ret_msg = $_LANG['_MAIL']['CC_FORM_MSG_03_L1'];\n\t\t}\n\n\t# Build Title String, Content String, and Footer Menu String\n\t\t$_tstr = $_LANG['_MAIL']['CC_FORM_RESULT_TITLE'];\n\n\t\t$_cstr .= '<center>'.$_nl;\n\t\t$_cstr .= '<table cellpadding=\"5\" width=\"100%\">'.$_nl;\n\t\t$_cstr .= '<tr><td class=\"TP5MED_NC\">'.$_nl;\n\t\t$_cstr .= $_ret_msg.$_nl;\n\t\t$_cstr .= '</td></tr>'.$_nl;\n\t\t$_cstr .= '</table>'.$_nl;\n\t\t$_cstr .= '</center>'.$_nl;\n\n\t\t$_mstr_flag\t= 0;\n\t\t$_mstr\t\t= '&nbsp;'.$_nl;\n\n\t# Call block it function\n\t\t$_out .= do_mod_block_it($_tstr, $_cstr, $_mstr_flag, $_mstr, '1');\n\t\t$_out .= '<br>'.$_nl;\n\n\t\tIF ($aret_flag) {return $_out;} ELSE {echo $_out;}\n}", "public function emailAction() {\n\n $this->view->navigation = Engine_Api::_()->getApi('menus', 'core')\n ->getNavigation('sitestore_admin_main', array(), 'sitestore_admin_main_email');\n $this->view->form = $form = new Sitestore_Form_Admin_Settings_Email();\n\n //check if comments should be displayed or not\n $show_comments = Engine_Api::_()->sitestore()->displayCommentInsights();\n\n //check if Sitemailtemplates Plugin is enabled\n $sitemailtemplates = Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitemailtemplates');\n\n $taskstable = Engine_Api::_()->getDbtable('tasks', 'core');\n $rtasksName = $taskstable->info('name');\n $taskstable_result = $taskstable->select()\n ->from($rtasksName, array('processes', 'timeout'))\n ->where('title = ?', 'Sitestore Insight Mail')\n ->where('plugin = ?', 'Sitestore_Plugin_Task_InsightNotification')\n ->limit(1);\n $prefields = $taskstable->fetchRow($taskstable_result);\n\n //populate form\n// $form->populate(array(\n// 'sitestore_insightemail' => $prefields->processes,\n// ));\n\n if ($this->getRequest()->isPost() && $form->isValid($this->_getAllParams())) {\n $values = $form->getValues();\n Engine_Api::_()->getApi('settings', 'core')->setSetting('sitestore_insightemail', $values['sitestore_insightemail']);\n\n //check if Sitemailtemplates Plugin is enabled\n $sitemailtemplates = Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitemailtemplates');\n\n if(empty($sitemailtemplates)) {\n\t\t\t\tEngine_Api::_()->getApi('settings', 'core')->setSetting('sitestore_bg_color', $values['sitestore_bg_color']);\n }\n include APPLICATION_PATH . '/application/modules/Sitestore/controllers/license/license2.php';\n if ($values['sitestore_demo'] == 1 && $values['sitestore_insightemail'] == 1) {\n\n $view = Zend_Registry::isRegistered('Zend_View') ? Zend_Registry::get('Zend_View') : null;\n\n //check if Sitemailtemplates Plugin is enabled\n $sitemailtemplates = Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitemailtemplates');\n $site_title = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitestore.site.title', Engine_Api::_()->getApi('settings', 'core')->getSetting('core.general.site.title', 1));\n\n $insights_string = '';\n\t\t\t\t$template_header = \"\";\n\t\t\t\t$template_footer = \"\";\n if(!$sitemailtemplates) {\n\t\t\t\t\t$site_title_color = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitestore.title.color', \"#ffffff\");\n\t\t\t\t\t$site_header_color = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitestore.header.color', \"#79b4d4\");\n\n\t\t\t\t\t//GET SITE \"Email Body Outer Background\" COLOR\n\t\t\t\t\t$site_bg_color = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitestore.bg.color', \"#f7f7f7\");\n\t\t\t\t\t$insights_string.= \"<table cellpadding='2'><tr><td><table cellpadding='2'><tr><td><span style='font-size: 14px; font-weight: bold;'>\" . $view->translate(\"Sample Store\") . \"</span></td></tr>\";\n\n\t\t\t\t\t$template_header.= \"<table width='98%' cellspacing='0' border='0'><tr><td width='100%' bgcolor='$site_bg_color' style='font-family:arial,tahoma,verdana,sans-serif;padding:40px;'><table width='620' cellspacing='0' cellpadding='0' border='0'>\";\n\t\t\t\t\t$template_header.= \"<tr><td style='background:\" . $site_header_color . \"; color:$site_title_color;font-weight:bold;font-family:arial,tahoma,verdana,sans-serif; padding: 4px 8px;vertical-align:middle;font-size:16px;text-align: left;' nowrap='nowrap'>\" . $site_title . \"</td></tr><tr><td valign='top' style='background-color:#fff; border-bottom: 1px solid #ccc; border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; font-family:arial,tahoma,verdana,sans-serif; padding: 15px;padding-top:0;' colspan='2'><table width='100%'><tr><td colspan='2'>\";\n\n $template_footer.= \"</td></tr></table></td></tr></td></table></td></tr></table>\";\n }\n\n if ($values['sitestore_insightmail_options'] == 1) {\n $vals['days_string'] = $view->translate('week');\n } elseif ($values['sitestore_insightmail_options'] == 2) {\n $vals['days_string'] = $view->translate('month');\n }\n $path = 'http://' . $_SERVER['HTTP_HOST'] . $view->baseUrl();\n $insight_link = \"<a style='color: rgb(59, 89, 152); text-decoration: none;' href='\" . $path . \"'>\" . $view->translate('Visit your Insights Store') . \"</a>\";\n $update_link = \"<a style='color: rgb(59, 89, 152); text-decoration: none;' href='\" . $path . \"'>\" . $view->translate('Send an update to people who like this') . \"</a>\";\n\n //check if Communityad Plugin is enabled\n $sitestorecommunityadEnabled = Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('communityad');\n $adversion = null;\n if ($sitestorecommunityadEnabled) {\n $communityadmodulemodule = Engine_Api::_()->getDbtable('modules', 'core')->getModule('communityad');\n $adversion = $communityadmodulemodule->version;\n if ($adversion >= '4.1.5') {\n $promote_Ad_link = \"<a style='color: rgb(59, 89, 152); text-decoration: none;' href='\" . $path . \"'>\" . $view->translate('Promote with %s Ads', $site_title) . \"</a>\";\n }\n }\n\n $insights_string.= \"<table><tr><td><span style='font-size: 24px; font-family: arial;'>\" . '2' . \"</span>\\t<span style='color: rgb(85, 85, 85);'>\" . $vals['days_string'] . $view->translate(array('ly active user', 'ly active users', 2), 2) . \"</span></td></tr><tr><td><span style='font-size: 24px; font-family: arial;'>\" . '2' . \"</span>\\t<span style='color: rgb(85, 85, 85);'>\" . $view->translate(array('person likes this', 'people like this', 2), 2) . \"</span>&nbsp;<span style='font-size: 18px; font-family: arial;' >\" . '2' . \"</span>\\t<span style='color: rgb(85, 85, 85);' >\" . $view->translate('since last') . \"\\t\" . $vals['days_string'] . \"</span></td></tr>\";\n if (!empty($show_comments)) {\n $insights_string.= \"<tr><td><span style='font-size: 24px; font-family: arial;'>\" . '2' . \"</span>\\t<span style='color: rgb(85, 85, 85);'>\" . $view->translate(array('comment', 'comments', 2), 2) . \"</span>&nbsp;<span style='font-size: 18px; font-family: arial;' >\" . '2' . \"</span>\\t<span style='color: rgb(85, 85, 85);' >\" . $view->translate('since last') . \"\\t\" . $vals['days_string'] . \"</span></td></tr>\";\n }\n $insights_string.= \"<tr><td><span style='font-size: 24px; font-family: arial;'>\" . '10' . \"</span>\\t <span style='color: rgb(85, 85, 85);'>\" . $view->translate(array('visit', 'visits', 2), 2) . \"</span>&nbsp;<span style='font-size: 18px; font-family: arial;' >\" . '5' . \"</span>\\t<span style='color: rgb(85, 85, 85);' >\" . $view->translate('since last') . \"\\t\" . $vals['days_string'] . \"</span></td></tr></table><table><tr><td>\" . \"<ul style=' padding-left: 5px;'><li>\" . $insight_link . \"</li><li>\" . $update_link;\n\n //check if Communityad Plugin is enabled\n if ($sitestorecommunityadEnabled && $adversion >= '4.1.5') {\n $insights_string.= \"</li><li>\" . $promote_Ad_link;\n }\n $insights_string.= \"</li></ul></td></tr></table>\";\n $days_string = ucfirst($vals['days_string']);\n $owner_name = Engine_Api::_()->user()->getViewer()->getTitle();\n $email = Engine_Api::_()->getApi('settings', 'core')->core_mail_from;\n Engine_Api::_()->getApi('mail', 'core')->sendSystem($values['sitestore_admin'], 'SITESTORE_INSIGHTS_EMAIL_NOTIFICATION', array(\n 'recipient_title' => $owner_name,\n 'template_header' => $template_header,\n 'message' => $insights_string,\n 'template_footer' => $template_footer,\n 'site_title' => $site_title,\n 'days' => $days_string,\n 'email' => $email,\n 'queue' => true));\n }\n }\n }", "function Form_Mail()\n {\n /**\n * Form_Mail();\n */\n\n $this->referers_array = array($_SERVER[\"HTTP_HOST\"]);\n /**\n * Leave AS IS to only allow posting from same host that script resides on.\n * List individual hosts to create list of hosts that can post to this script:\n * EXAMPLE: $referer_array = array ('example.com','www.example.com','192.168.0.1');\n */\n\n /* proccess form */\n $this->set_arrays();\n $this->check_referer();\n $this->check_recipient();\n $this->check_required_fields();\n $this->send_form();\n $this->display_thankyou();\n }", "function do_contact_email($adata, $aret_flag=0) {\n\t# Dim Some Vars\n\t\tglobal $_CCFG, $_TCFG, $_DBCFG, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp;\n\n\t# Get contact information array\n\t\t$_cinfo = get_contact_info($adata['mc_id']);\n\n\t# Set eMail Parameters (pre-eval template, some used in template)\n\t\tIF ($_CCFG['_PKG_SAFE_EMAIL_ADDRESS']) {\n \t\t\t$mail['recip']\t= $_cinfo['c_email'];\n\t\t\t$mail['from']\t= $adata['mc_email'];\n\t\t\tIF ($_CCFG['CONTACT_FORM_CC']) {$mail['cc']\t= $adata['mc_email'];}\n\t\t} ELSE {\n\t\t\t$mail['recip']\t= $_cinfo['c_name'].' <'.$_cinfo['c_email'].'>';\n\t\t\t$mail['from']\t= $adata['mc_name'].' <'.$adata['mc_email'].'>';\n\t\t\tIF ($_CCFG['CONTACT_FORM_CC']) {$mail['cc']\t= $adata['mc_name'].' <'.$adata['mc_email'].'>';}\n\t\t}\n\t\t$mail['subject']\t= $_CCFG['_PKG_NAME_SHORT'].'- Contact Message';\n\n\t# Grab ip_address of sender\n\t\tIF (isset($_SERVER['HTTP_X_FORWARDED_FOR']) && $_SERVER['HTTP_X_FORWARDED_FOR'] != '') {\n\t\t\t$pos = strpos(strtolower($_SERVER['HTTP_X_FORWARDED_FOR']), '192.168.');\n\t\t\tIF ($pos === FALSE) {\n\t\t\t\t$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n\t\t\t} ELSE {\n\t\t\t\t$ip = $_SERVER[\"REMOTE_ADDR\"];\n\t\t\t}\n\t\t} ELSE {\n\t\t\t$ip = $_SERVER[\"REMOTE_ADDR\"];\n\t\t}\n\n\t# Set MTP (Mail Template Parameters) array\n\t\t$_MTP['to_name']\t= $_cinfo['c_name'];\n\t\t$_MTP['to_email']\t= $_cinfo['c_email'];\n\t\t$_MTP['from_name']\t= $adata['mc_name'];\n\t\t$_MTP['from_email']\t= $adata['mc_email'];\n\t\t$_MTP['subject']\t= $adata['mc_subj'];\n\t\t$_MTP['message']\t= $adata['mc_msg'];\n\t\t$_MTP['site']\t\t= $_CCFG['_PKG_NAME_SHORT'];\n\t\t$_MTP['sender_ip']\t= $ip;\n\t\n\t# Load message template (processed)\n\t\t$mail['message']\t= get_mail_template('email_contact_form', $_MTP);\n\n\t# Call basic email function (ret=0 on error)\n\t\t$_ret = do_mail_basic($mail);\n\n\t# Set flood control values in session\n\t\t$sdata['set_last_contact'] = 1;\n\t\t$_sret = do_session_update($sdata);\n\n\t# Check return\n\t\tIF ($_ret) {\n\t\t\t$_ret_msg = $_LANG['_MAIL']['CS_FORM_MSG_02_L1'];\n\t\t\t$_ret_msg .= '<br>'.$_LANG['_MAIL']['CS_FORM_MSG_02_L2'];\n\t\t} ELSE {\n\t\t\t$_ret_msg = $_LANG['_MAIL']['CS_FORM_MSG_03_L1'];\n\t\t\t$_ret_msg .= $_sp.$_LANG['_MAIL']['CS_FORM_MSG_03_L2'];\n\t\t}\n\n\t# Build Title String, Content String, and Footer Menu String\n\t\t$_tstr = $_LANG['_MAIL']['CS_FORM_RESULT_TITLE'];\n\n\t\t$_cstr .= '<center>'.$_nl;\n\t\t$_cstr .= '<table cellpadding=\"5\" width=\"100%\">'.$_nl;\n\t\t$_cstr .= '<tr><td class=\"TP5MED_NC\">'.$_nl;\n\t\t$_cstr .= $_ret_msg.$_nl;\n\t\t$_cstr .= '</td></tr>'.$_nl;\n\t\t$_cstr .= '</table>'.$_nl;\n\t\t$_cstr .= '</center>'.$_nl;\n\n\t\t$_mstr_flag\t= 0;\n\t\t$_mstr\t\t= '&nbsp;'.$_nl;\n\n\t# Call block it function\n\t\t$_out .= do_mod_block_it($_tstr, $_cstr, $_mstr_flag, $_mstr, '1');\n\t\t$_out .= '<br>'.$_nl;\n\n\t\tIF ($aret_flag) {return $_out;} ELSE {echo $_out;}\n}", "static private function submitEmail()\n {\n $id = $_POST['formid'];\n\n // Initiates new form handling instance\n $f = new FormHandling;\n\n // Gets the client email list (to, bcc, cc)\n $clientEmailList = $f->getClientEmail($id);\n\n // Gets the customer email (if set)\n $customerEmail = $f->getCustomerEmail($_POST);\n\n // dd($customerEmail);\n\n // Checks if in sandbox mode before sending email\n if(FALSE == submissionHandling::sandbox){\n\n // New email instance\n $e = new emailHandling();\n\n // render and send client email(s)\n if($clientEmailList['to']){\n $e->sendEmail($id,'client',$clientEmailList['to'],'Enquiry received','Hi',$clientEmailList['headers']);\n }\n\n // render and send customer email\n if($customerEmail){\n $e->sendEmail($id,'customer',$customerEmail,'Thanks for getting in touch','We will be in touch soon');\n }\n\n }\n }", "function prefix_send_email_to_admin() { \n\n\t\ttry {\n\n\t\t\t$user_id = get_current_user_id();\n\n\n\t\t\tif( $_POST['name'] == \"\" || $_POST['lastname'] == \"\" || $_POST['tel'] = \"\" || $_POST['cpf'] == \"\" ):\n\t\t\t\t$_SESSION['paodigital']['msg'] = \"Confirme se Nome, Sobrenome, Telefone ou CPF estão corretamente preenchidos!\";\n\t\t\t\twp_redirect( get_bloginfo('url') . \"/detalhes-do-seu-pedido/\" );\n\t\t\tendif;\n\n\t\t\t$user_id = wp_update_user( \n\t\t\t\tarray( \n\t\t\t\t\t'ID' \t\t\t=> $user_id,\n\t\t\t\t\t'first_name'\t=> $_POST['name'],\n\t\t\t\t\t'last_name'\t\t=> $_POST['lastname'],\n\t\t\t\t\t'description'\t=> $_POST['notes']\n\t\t\t\t) \n\t\t\t);\n\n\t\t\tif ( get_user_meta($user_id, 'user_telefone' ) ):\n\t\t\t\t$a = update_user_meta( $user_id, 'user_telefone', $_POST['tel_order'] );\n\t\t\telse:\n\t\t\t\t$a = add_user_meta( $user_id, 'user_telefone', $_POST['tel_order'] );\n\t\t\tendif;\n\n\t\t\tif ( get_user_meta($user_id, 'user_cpf', true ) ):\n\t\t\t\tupdate_user_meta( $user_id, 'user_cpf', $_POST['cpf'] );\n\t\t\telse:\n\t\t\t\tadd_user_meta( $user_id, 'user_cpf', $_POST['cpf'] );\n\t\t\tendif;\n\n\n\t\t\t$error = false;\n\t\t\t$entrega = false;\n\t\t\tif( isset($_POST['save-address']) ):\n\t\t\t\t\n\t\t\t\tif( count( $_POST['address'] ) > 0 ):\n\t\t\t\t\tforeach ( $_POST['address'] as $key => $add ):\n\n\n//check address\nif( empty($add['cep']) || empty($add['address']) || empty($add['bairro']) || empty($add['city']) || empty($add['state']) ):\n\t$error = true;\nendif;\n\n\n\t\t\t\t\t\t//check entrega\n\t\t\t\t\t\tif( isset( $add['entrega'] ) ):\n\t\t\t\t\t\t\t$entrega = true;\n\t\t\t\t\t\tendif;\n\n\t\t\t\t\t\t$id = $add['house'];\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( $add['house'] > 0 ):\n\n\t\t\t\t\t\t\t$params = array(\n\t\t\t\t\t\t\t\t'where'\t\t=> \"id = {$id} AND user_id = {$user_id}\", \n\t\t\t\t\t\t\t\t'limit'\t\t=> 1\n\t\t\t\t\t\t\t); \n\t\t\t\t\t\t\t$address = pods( 'usuarioendereco', $params );\n\n\t\t\t\t\t\t\tif( (integer)$address->total_found() > 0 ):\n\t\t\t\t\t\t\t\t$newAddress = pods('usuarioendereco', $address->display('id') );\n\t\t\t\t\t\t\t\t$array = [\n\t\t\t\t\t\t\t\t\t'name' => $add['desc'],\n\t\t\t\t\t\t\t\t\t'created' => date('Y-m-d H:i:s'),\n\t\t\t\t\t\t\t\t\t'modified' => date('Y-m-d H:i:s'),\n\t\t\t\t\t\t\t\t\t'cep' => $add['cep'],\n\t\t\t\t\t\t\t\t\t'endereco' => $add['address'],\n\t\t\t\t\t\t\t\t\t'user_id' => $user_id,\n\t\t\t\t\t\t\t\t\t'bairro' => $add['bairro'],\n\t\t\t\t\t\t\t\t\t'cidade' => $add['city'],\n\t\t\t\t\t\t\t\t\t'estado' => $add['state'],\n\t\t\t\t\t\t\t\t\t'entrega' => ( isset( $add['entrega'] ) )? 1 : 0 ,\n\t\t\t\t\t\t\t\t\t'numero' => $add['num'],\n\t\t\t\t\t\t\t\t\t'complemento' => $add['complemento']\n\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t$newAddress->save($array);\n\t\t\t\t\t\t\tendif;\n\n\t\t\t\t\t\telse:\n\n\t\t\t\t\t\t\t$newAddress = pods('usuarioendereco');\n\t\t\t\t\t\t\t$array = [\n\t\t\t\t\t\t\t\t'name' => $add['desc'],\n\t\t\t\t\t\t\t\t'created' => date('Y-m-d H:i:s'),\n\t\t\t\t\t\t\t\t'modified' => date('Y-m-d H:i:s'),\n\t\t\t\t\t\t\t\t'cep' => $add['cep'],\n\t\t\t\t\t\t\t\t'endereco' => $add['address'],\n\t\t\t\t\t\t\t\t'user_id' => $user_id,\n\t\t\t\t\t\t\t\t'bairro' => $add['bairro'],\n\t\t\t\t\t\t\t\t'cidade' => $add['city'],\n\t\t\t\t\t\t\t\t'estado' => $add['state'],\n\t\t\t\t\t\t\t\t'entrega' => ( isset( $add['entrega'] ) ) ? 1 : 0 ,\n\t\t\t\t\t\t\t\t'numero' => $add['num'],\n\t\t\t\t\t\t\t\t'complemento' => $add['complemento']\n\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t$newAddress->save($array);\n\n\t\t\t\t\t\tendif;\n\n\t\t\t\t\tendforeach;\n\n\t\t\t\tendif;\n\n\t\t\tendif;\n\n\n\n\t\t\t/*\n\t\t\t\tVerificacao quanto ao dados dos endereços\n\t\t\t*/\n\t\t\tif( $error == true ):\n\n\t\t\t\t$_SESSION['paodigital']['msgAddress'] = \"Preencha corretamente todos os endereços criados\";\n\t\t\t\t$_SESSION['paodigital']['msgAddressType'] = \"danger\";\n\t\t\t\twp_redirect( get_bloginfo('url') . \"/detalhes-do-seu-pedido/\" );\n\n\t\t\telse:\n\n\t\t\t\tif( $entrega == false ):\n\n\t\t\t\t\t$_SESSION['paodigital']['msgAddress'] = \"Escolha um endereço padrão.\";\n\t\t\t\t\t$_SESSION['paodigital']['msgAddressType'] = \"danger\";\n\t\t\t\t\twp_redirect( get_bloginfo('url') . \"/detalhes-do-seu-pedido/\" );\n\n\t\t\t\telse :\n\n\t\t\t\t\t$_SESSION['paodigital']['msgAddress'] = \"Endereço salvo com sucesso!\";\n\t\t\t\t\t$_SESSION['paodigital']['msgAddressType'] = \"success\";\n\t\t\t\t\twp_redirect( get_bloginfo('url') . \"/formas-de-pagamento\" );\n\n\t\t\t\tendif;\n\n\t\t\tendif;\n\t\t\t\n\t\t} catch (Exception $e) {\n\t\t\t\n\t\t\t$_SESSION['paodigital']['msgAddress'] = \"Não Foi Possivel salvar o endereço tente novamente.\";\n\t\t\t$_SESSION['paodigital']['msgAddressType'] = \"danger\";\n\t\t\twp_redirect( get_bloginfo('url') . \"/detalhes-do-seu-pedido/\" );\n\n\t\t}\n\t\t\n\t\t\n\n\t}", "public function GrabEmailFromRegistrationForm()\n\t{\n\t\tif ($_POST['gr_registration_checkbox'] == 1 && $this->grApiInstance)\n\t\t{\n\t\t\tif ($this->woocomerce_active === true && isset($_POST['email']))\n\t\t\t{\n\t\t\t\t$email = $_POST['email'];\n\t\t\t\t$name = isset($_POST['billing_first_name']) ? $_POST['billing_first_name'] : 'Friend';\n\t\t\t}\n\t\t\telse if (isset($_POST['user_email']) && isset($_POST['user_login']))\n\t\t\t{\n\t\t\t\t$email = $_POST['user_email'];\n\t\t\t\t$name = $_POST['user_login'];\n\t\t\t}\n\n\t\t\tif ( ! empty($email) && ! empty($name))\n\t\t\t{\n\t\t\t\t$campaign = get_option($this->GrOptionDbPrefix . 'registration_campaign');\n\t\t\t\t$this->addContact($campaign, $name, $email);\n\t\t\t}\n\t\t}\n\t}", "function sendInfoMail()\t{\n\t\tif ($this->conf['infomail'] && $this->conf['email.']['field'])\t{\n\t\t\t$recipient='';\n\t\t\t$emailfields=t3lib_div::trimexplode(',',$this->conf['email.']['field']);\t\t\t\t\n\t\t\tforeach($emailfields as $ef) {\n\t\t\t\t$recipient.=$recipient?$Arr[$this->conf['email.']['field']].';'.$recipient:$Arr[$this->conf['email.']['field']];\n\t\t\t}\n\t\t\t$fetch = t3lib_div::_GP('fetch');\n\t\t\tif ($fetch)\t{\n\t\t\t\t\t// Getting infomail config.\n\t\t\t\t$key= trim(t3lib_div::_GP('key'));\n\t\t\t\tif (is_array($this->conf['infomail.'][$key.'.']))\t\t{\n\t\t\t\t\t$config = $this->conf['infomail.'][$key.'.'];\n\t\t\t\t} else {\n\t\t\t\t\t$config = $this->conf['infomail.']['default.'];\n\t\t\t\t}\n\t\t\t\t$pidLock='';\n\t\t\t\tif (!$config['dontLockPid'] && $this->thePid)\t{\n\t\t\t\t\t$pidLock='AND pid IN ('.$this->thePid.') ';\n\t\t\t\t}\n\n\t\t\t\t\t// Getting records\n\t\t\t\tif (t3lib_div::testInt($fetch))\t{\n\t\t\t\t\t$DBrows = $GLOBALS['TSFE']->sys_page->getRecordsByField($this->theTable,$this->conf['uidField'],$fetch,$pidLock,'','','1');\n\t\t\t\t} elseif ($fetch) {\t// $this->conf['email.']['field'] must be a valid field in the table!\n\t\t\t\t\tforeach($emailfields as $ef) {\n\t\t\t\t\t\tif ($ef) $DBrows = $GLOBALS['TSFE']->sys_page->getRecordsByField($this->theTable,$ef,$fetch,$pidLock,'','','100');\n\t\t\t\t\t\tif (count($DBrows )) break;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Processing records\n\t\t\t\tif (is_array($DBrows))\t{\n\t\t\t\t\t//$recipient = $DBrows[0][$this->conf['email.']['field']];\n\t\t\t\t\tif ($this->conf['evalFunc'])\t{\n\t\t\t\t\t\t$DBrows[0] = $this->userProcess('evalFunc',$DBrows[0]);\n\t\t\t\t\t}\n\t\t\t\t\t$this->compileMail($config['label'], $DBrows, $this->getFeuserMail($DBrows[0],$this->conf), $this->conf['setfixed.']);\n\t\t\t\t} elseif ($this->cObj->checkEmail($fetch)) {\n\t\t\t\t\t$this->sendMail($fetch, '', '',trim($this->cObj->getSubpart($this->templateCode, '###'.$this->emailMarkPrefix.'NORECORD###')));\n\t\t\t\t}\n\n\t\t\t\t$content = $this->metafeeditlib->getPlainTemplate($this->conf,$this->markerArray,'###TEMPLATE_INFOMAIL_SENT###');\n\t\t\t} else {\n\t\t\t\t$content = $this->metafeeditlib->getPlainTemplate($this->conf,$this->markerArray,'###TEMPLATE_INFOMAIL###');\n\t\t\t}\n\t\t} else $content='Error: infomail option is not available or emailField is not setup in TypoScript';\n\t\treturn $content;\n\t}", "protected function sendEmail($user_email, $user_fname)\n {\n \n \n\n\t\t\t\n \n \n }", "private function sendEmails()\r\n {\r\n $user_body = \"Hi,<br>A new comment was added to the following article:\\n\";\r\n $user_body .= '<a href=\"http://'.$this->config->getModuleVar('common', 'site_url').'/id_article/'.$this->viewVar['article']['id_article'].'\">'.$this->viewVar['article']['title'].\"</a>\\n\";\r\n\r\n $_tmp_error = array();\r\n $user_text_body = strip_tags($user_body);\r\n\r\n $this->model->action( 'common', 'mailSendTo',\r\n array('charset' => $this->viewVar['charset'],\r\n 'bodyHtml' => & $user_body,\r\n 'bodyText' => & $user_text_body,\r\n 'to' => array(array('email' => '[email protected]',\r\n 'name' => 'Armand Turpel')),\r\n 'subject' => \"Open Publisher Blog Entry\",\r\n 'fromEmail' => '[email protected]',\r\n 'fromName' => '[email protected]',\r\n 'error' => & $_tmp_error\r\n ));\r\n\r\n }", "public function emailMeAction() {\r\n\r\n //DEFAULT LAYOUT\r\n $this->_helper->layout->setLayout('default-simple');\r\n\r\n //GET VIEWER DETAIL\r\n $viewer = Engine_Api::_()->user()->getViewer();\r\n $viewr_id = $viewer->getIdentity();\r\n\r\n //GET PAGE ID AND PAGE OBJECT\r\n $this->view->page_id = $page_id = $this->_getParam('page_id', $this->_getParam('id', null));\r\n $sitepage = Engine_Api::_()->getItem('sitepage_page', $page_id);\r\n if (empty($sitepage))\r\n return $this->_forwardCustom('notfound', 'error', 'core');\r\n \r\n //AUTHORIZATION CHECK FOR TELL A FRIEND\r\n $isManageAdmin = Engine_Api::_()->sitepage()->isManageAdmin($sitepage, 'tfriend');\r\n if (empty($isManageAdmin)) {\r\n return $this->_forwardCustom('requireauth', 'error', 'core');\r\n }\r\n\r\n //FORM GENERATION\r\n $this->view->form = $form = new Sitepage_Form_EmailMe();\r\n\r\n if (!empty($viewr_id)) {\r\n $value['sender_email'] = $viewer->email;\r\n $value['sender_name'] = $viewer->displayname;\r\n $form->populate($value);\r\n }\r\n\r\n if ($this->getRequest()->isPost() && $form->isValid($this->getRequest()->getPost())) {\r\n\r\n $values = $form->getValues();\r\n\r\n //EDPLODES EMAIL IDS\r\n $reciver_ids = $sitepage->email; //explode(',', $values['sitepage_reciver_emails']);\r\n $values['sitepage_sender_email'] = $sitepage->email;\r\n if (!empty($values['sitepage_send_me'])) {\r\n $reciver_ids = $values['sitepage_sender_email'];\r\n }\r\n $sender_email = $values['sitepage_sender_email'];\r\n\r\n //CHECK VALID EMAIL ID FORMITE\r\n $validator = new Zend_Validate_EmailAddress();\r\n\r\n if (!$validator->isValid($sender_email)) {\r\n $form->addError(Zend_Registry::get('Zend_Translate')->_('Invalid sender email address value'));\r\n return;\r\n }\r\n// foreach ($reciver_ids as $reciver_id) {\r\n// $reciver_id = trim($reciver_id, ' ');\r\n// if (!$validator->isValid($reciver_id)) {\r\n// $form->addError(Zend_Registry::get('Zend_Translate')->_('Please enter correct email address of the receiver(s).'));\r\n// return;\r\n// }\r\n// }\r\n $sender = $values['sitepage_sender_name'];\r\n $message = $values['sitepage_message'];\r\n $heading = ucfirst($sitepage->getTitle());\r\n Engine_Api::_()->getApi('mail', 'core')->sendSystem($reciver_ids, 'SITEPAGE_EMAILME_EMAIL', array(\r\n 'host' => $_SERVER['HTTP_HOST'],\r\n 'sender_name' => $sender,\r\n 'page_title' => $heading,\r\n 'message' => '<div>' . $message . '</div>',\r\n 'object_link' => 'http://' . $_SERVER['HTTP_HOST'] . Engine_Api::_()->sitepage()->getHref($sitepage->page_id, $sitepage->owner_id, $sitepage->getSlug()),\r\n 'sender_email' => $sender_email,\r\n 'queue' => true\r\n ));\r\n\r\n $this->_forwardCustom('success', 'utility', 'core', array(\r\n 'smoothboxClose' => true,\r\n 'parentRefresh' => false,\r\n 'format' => 'smoothbox',\r\n 'messages' => array(Zend_Registry::get('Zend_Translate')->_('Your message to page owner has been sent successfully.'))\r\n ));\r\n }\r\n }", "abstract protected function _sendMail ( );", "private function sendNotifyEmail(){\n $uS = Session::getInstance();\n $to = filter_var(trim($uS->referralFormEmail), FILTER_SANITIZE_EMAIL);\n\n try{\n if ($to !== FALSE && $to != '') {\n// $userData = $this->getUserData();\n $content = \"Hello,<br>\" . PHP_EOL . \"A new \" . $this->formTemplate->getTitle() . \" was submitted to \" . $uS->siteName . \". <br><br><a href='\" . $uS->resourceURL . \"house/register.php' target='_blank'>Click here to log into HHK and take action.</a><br>\" . PHP_EOL;\n\n $mail = prepareEmail();\n\n $mail->From = ($uS->NoReplyAddr ? $uS->NoReplyAddr : \"[email protected]\");\n $mail->FromName = htmlspecialchars_decode($uS->siteName, ENT_QUOTES);\n $mail->addAddress($to);\n\n $mail->isHTML(true);\n\n $mail->Subject = \"New \" . Labels::getString(\"Register\", \"onlineReferralTitle\", \"Referral\") . \" submitted\";\n $mail->msgHTML($content);\n\n if ($mail->send() === FALSE) {\n return false;\n }else{\n return true;\n }\n }\n }catch(\\Exception $e){\n return false;\n }\n return false;\n }", "public function contact_form()\n\t{\n\t\tif ($this->errstr)\n\t\t{\n\t\t\tFsb::$tpl->set_switch('error');\n\t\t}\n\n\t\tFsb::$tpl->set_file('user/user_contact.html');\n\t\tFsb::$tpl->set_vars(array(\n\t\t\t'ERRSTR' =>\t\t\tHtml::make_errstr($this->errstr),\n\t\t));\n\t\t\n\t\t// Champs contacts crees par l'administrateur\n\t\tProfil_fields_forum::form(PROFIL_FIELDS_CONTACT, 'contact', Fsb::$session->id());\n\t}", "function contactUs( $data ) {\n // Get the info as specified in the contact info section of the site\n // management porition\n $info = ContactInfo::getInstance();\n\n // For development purposes, currently return;\n\n // Send an email to the contacted persons\n}", "function sendEmail($forename,$email){\r\n /*sendMail($email,\"Registration to Unicycles\",\" Hey \".$forename.\"! /r/n\r\nThank you for registering for Unicycles! /r/n\r\n\r\nYou can start to hire bikes straight away now! To do so please head over to our website unicycles.ddns.net:156 log in and click on Hire a Bike. It can't be simpler. /r/n\r\n\r\nIf you need to know anything you can look on our website. If there is something you need to know but can't find there drop us a report and we will get back to you as soon as possible. /r/n\r\n\r\nThank you again for your registration. If you have any questions, please let me know. /r/n\r\n\r\nRegards, /r/n\r\nUniCycle Team\r\n\");*/\r\n}", "function _webform_edit_email_validate($element, &$form_state) {\r\n if ($form_state['values']['user_email']) {\r\n $form_state['values']['value'] = '%useremail';\r\n }\r\n}", "function signupEmail($edata) {\n\n\t\t\t\t$phone = $edata['mobile'];\n\t\t\t\t$email = $edata['email'];\n\t\t\t\t$password = $edata['password'];\n\t\t\t\t$fullname = $edata['fullname'];\n\t\t\t\t$template = $this->shortcode_variables(\"customersignup\");\n\t\t\t\t$details = email_template_detail(\"customersignup\");\n\n\t\t\t\t$res = $this->settings_model->get_contact_page_details();\n\t\t\t\t$contact_phone = $res[0]->contact_phone;\n\t\t\t\t$contact_email = $res[0]->contact_email;\n\t\t\t\t$contact_address = $res[0]->contact_address;\n\t\t\t\t$accountlink = base_url().'/account';\n\t\t\t\t$membershiplink = base_url().'/membership';\n\n\t\t\t\t$sendto = $details->contect_email;\n\t\t\t\t$ptheme = pt_default_theme();\n\t\t\t\t$this->_config = config_item('theme');\n\t\t\t\t$uu = $this->_config['url'];\n\t\t\t\t$email_temp_img = $uu.$ptheme.'/email_temp_img/gb_email_temp_img/';\n\t\t\t\t$template = array('{fullname}','{password}','{email_temp_img}','{contact_phone}','{contact_email}','{contact_address}','{accountlink}','{membershiplink}');\n\t\t\t\t$values = array($fullname,$password,$email_temp_img,$contact_phone,$contact_email,$contact_address,$accountlink,$membershiplink);\n\t\t\t\t$HTML_DATA = file_get_contents( $uu.$ptheme.'/login_email.html');\n\t\t\t\t$message = str_replace($template, $values, $HTML_DATA);\n\t\t\t\t\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\t$this->email->from($this->sendfrom);\n\t\t\t\t$this->email->to($email);\n\t\t\t\t$this->email->subject($details[0]->temp_subject);\n\t\t\t\t$this->email->message($message);\n\t\t\t\t$this->email->send();\n\n\t\t\t\t/*$phone = $edata['mobile'];\n\t\t\t\t$email = $edata['email'];\n\t\t\t\t$password = $edata['password'];\n\t\t\t\t$fullname = $edata['fullname'];\n\t\t\t\t$template = $this->shortcode_variables(\"customersignup\");\n\t\t\t\t$details = email_template_detail(\"customersignup\");\n\t\t\t\t//$smsdetails = sms_template_detail(\"customersignup\");\n\t\t\t\t$values = array($fullname, $email, $password);\n\t\t\t\t\n\t\t\t\t$message = $this->mailHeader;\n\t\t\t\t$message .= str_replace($template, $values, $details[0]->temp_body);\n\t\t\t\t$message .= $this->mailFooter;\n\n\t\t\t\t//$smsmessage = str_replace($template, $values, $smsdetails[0]->temp_body);\n\t\t\t\t//sendsms($smsmessage, $phone, \"customersignup\");\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\t$this->email->from($this->sendfrom);\n\t\t\t\t$this->email->to($email);\n\t\t\t\t$this->email->subject($details[0]->temp_subject);\n\t\t\t\t$this->email->message($message);\n\t\t\t\t$this->email->send();*/\n\n\t\t}", "function __emailer($email = '', $vars = array())\n {\n\n //common variables\n $this->data['email_vars']['clients_company_name'] = $this->client['clients_company_name'];\n $this->data['email_vars']['todays_date'] = $this->data['vars']['todays_date'];\n $this->data['email_vars']['company_email_signature'] = $this->data['settings_company']['company_email_signature'];\n $this->data['email_vars']['client_dashboard_url'] = $this->data['vars']['site_url_client'];\n $this->data['email_vars']['admin_dashboard_url'] = $this->data['vars']['site_url_admin'];\n\n //new client welcom email-------------------------------\n if ($email == 'new_user') {\n\n //get message template from database\n $template = $this->settings_emailtemplates_model->getEmailTemplate('new_user_client');\n $this->data['debug'][] = $this->settings_emailtemplates_model->debug_data;\n\n //specific data\n $this->data['email_vars']['client_users_full_name'] = $this->input->post('client_users_full_name');\n $this->data['email_vars']['client_users_email'] = $this->input->post('client_users_email');\n $this->data['email_vars']['client_users_password'] = $this->input->post('client_users_password');\n\n //parse email\n $email_message = parse_email_template($template['message'], $this->data['email_vars']);\n\n //send email\n email_default_settings(); //defaults (from emailer helper)\n $this->email->to($this->data['email_vars']['client_users_email']);\n $this->email->subject($template['subject']);\n $this->email->message($email_message);\n $this->email->send();\n\n }\n\n //admin notification - new client user-------------------------------\n if ($email == 'admin_notification_new_user') {\n\n //get message template from database\n $template = $this->settings_emailtemplates_model->getEmailTemplate('new_user_admin');\n $this->data['debug'][] = $this->settings_emailtemplates_model->debug_data;\n\n //specific data\n $this->data['email_vars']['client_users_full_name'] = $this->input->post('client_users_full_name');\n $this->data['email_vars']['client_users_email'] = $this->input->post('client_users_email');\n $this->data['email_vars']['clients_company_name'] = $this->client['clients_company_name'];\n\n //parse email\n $email_message = parse_email_template($template['message'], $this->data['email_vars']);\n\n //send email to multiple admins\n foreach ($this->data['vars']['mailinglist_admins'] as $email_address) {\n email_default_settings(); //defaults (from emailer helper)\n $this->email->to($email_address);\n $this->email->subject($template['subject']);\n $this->email->message($email_message);\n $this->email->send();\n }\n\n }\n\n }", "function ciniki_musicfestivals_registrationsEmailSend(&$ciniki) {\n //\n // Find all the required and optional arguments\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs');\n $rc = ciniki_core_prepareArgs($ciniki, 'no', array(\n 'tnid'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Tenant'),\n 'festival_id'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Festival'),\n 'teacher_id'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Teacher'),\n 'subject'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Subject'),\n 'message'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Message'),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $args = $rc['args'];\n\n //\n // Check access to tnid as owner, or sys admin.\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'musicfestivals', 'private', 'checkAccess');\n $rc = ciniki_musicfestivals_checkAccess($ciniki, $args['tnid'], 'ciniki.musicfestivals.registrationsEmailSend');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n $strsql = \"SELECT registrations.id, \"\n . \"registrations.festival_id, \"\n . \"sections.id AS section_id, \"\n . \"registrations.teacher_customer_id, \"\n . \"teachers.display_name AS teacher_name, \"\n . \"registrations.billing_customer_id, \"\n . \"registrations.rtype, \"\n . \"registrations.rtype AS rtype_text, \"\n . \"registrations.status, \"\n . \"registrations.status AS status_text, \"\n . \"registrations.display_name, \"\n . \"registrations.class_id, \"\n . \"classes.code AS class_code, \"\n . \"classes.name AS class_name, \"\n . \"registrations.title1, \"\n . \"registrations.perf_time1, \"\n . \"registrations.title2, \"\n . \"registrations.perf_time2, \"\n . \"registrations.title3, \"\n . \"registrations.perf_time3, \"\n . \"IF(registrations.participation = 1, 'Virtual', 'In Person') AS participation, \"\n . \"FORMAT(registrations.fee, 2) AS fee, \"\n . \"registrations.payment_type \"\n . \"FROM ciniki_musicfestival_registrations AS registrations \"\n . \"LEFT JOIN ciniki_customers AS teachers ON (\"\n . \"registrations.teacher_customer_id = teachers.id \"\n . \"AND teachers.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \") \"\n . \"LEFT JOIN ciniki_musicfestival_classes AS classes ON (\"\n . \"registrations.class_id = classes.id \"\n . \"AND classes.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \") \"\n . \"LEFT JOIN ciniki_musicfestival_categories AS categories ON (\"\n . \"classes.category_id = categories.id \"\n . \"AND categories.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \") \"\n . \"LEFT JOIN ciniki_musicfestival_sections AS sections ON (\"\n . \"categories.section_id = sections.id \"\n . \"AND sections.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \") \"\n . \"WHERE registrations.festival_id = '\" . ciniki_core_dbQuote($ciniki, $args['festival_id']) . \"' \"\n . \"AND registrations.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"AND registrations.teacher_customer_id = '\" . ciniki_core_dbQuote($ciniki, $args['teacher_id']) . \"' \"\n . \"\";\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQueryArrayTree');\n $rc = ciniki_core_dbHashQueryArrayTree($ciniki, $strsql, 'ciniki.musicfestivals', array(\n array('container'=>'registrations', 'fname'=>'id', \n 'fields'=>array('id', 'festival_id', 'teacher_name', 'display_name', \n 'class_id', 'class_code', 'class_name', \n 'title1', 'perf_time1', 'title2', 'perf_time2', 'title3', 'perf_time3', \n 'fee', 'payment_type', 'participation'),\n ),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $html = '';\n $text = '';\n if( isset($rc['registrations']) ) {\n $festival['registrations'] = $rc['registrations'];\n $total = 0;\n $html = \"<table cellpadding=5 cellspacing=0>\";\n $html .= \"<tr><th>Class</th><th>Competitor</th><th>Title</th><th>Time</th><th>Virtual</th></tr>\";\n foreach($festival['registrations'] as $iid => $registration) {\n $html .= '<tr><td>' . $registration['class_code'] . '</td><td>' . $registration['display_name'] . '</td>'\n . '<td>' . $registration['title1'] \n . ($registration['title2'] != '' ? \"<br/>{$registration['title2']}\" : '')\n . ($registration['title3'] != '' ? \"<br/>{$registration['title3']}\" : '')\n . '</td>'\n . '<td>' . $registration['perf_time1'] \n . ($registration['perf_time2'] != '' ? \"<br/>{$registration['perf_time2']}\" : '')\n . ($registration['perf_time3'] != '' ? \"<br/>{$registration['perf_time3']}\" : '')\n . '</td>'\n . '<td>' . $registration['participation'] . \"</td></tr>\\n\";\n $text .= $registration['class_code'] \n . ' - ' . $registration['display_name'] \n . ($registration['title1'] != '' ? ' - ' . $registration['title1'] : '')\n . ($registration['perf_time1'] != '' ? ' - ' . $registration['perf_time1'] : '')\n . \"\\n\";\n if( $registration['title2'] != '' ) {\n $text .= preg_replace(\"/./\", '', $registration['class_code'])\n . ' - ' . preg_replace(\"/./\", '', $registration['display_name'])\n . ($registration['title2'] != '' ? ' - ' . $registration['title2'] : '')\n . ($registration['perf_time2'] != '' ? ' - ' . $registration['perf_time2'] : '')\n . \"\\n\";\n }\n if( $registration['title3'] != '' ) {\n $text .= preg_replace(\"/./\", '', $registration['class_code'])\n . ' - ' . preg_replace(\"/./\", '', $registration['display_name'])\n . ($registration['title3'] != '' ? ' - ' . $registration['title3'] : '')\n . ($registration['perf_time3'] != '' ? ' - ' . $registration['perf_time3'] : '')\n . \"\\n\";\n }\n }\n $html .= \"</table>\";\n } else {\n $festival['registrations'] = array();\n }\n\n $html_message = $args['message'] . \"<br/><br/>\" . $html;\n $text_message = $args['message'] . \"\\n\\n\" . $text;\n\n //\n // Lookup the teacher info\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'customers', 'hooks', 'customerDetails');\n $rc = ciniki_customers_hooks_customerDetails($ciniki, $args['tnid'], \n array('customer_id'=>$args['teacher_id'], 'phones'=>'no', 'emails'=>'yes', 'addresses'=>'no', 'subscriptions'=>'no'));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( !isset($rc['customer']) ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.musicfestivals.102', 'msg'=>'No teacher found, we are unable to send the email.'));\n }\n $customer = $rc['customer'];\n\n //\n // if customer is set\n //\n if( !isset($customer['emails'][0]['email']['address']) ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.musicfestivals.103', 'msg'=>\"The teacher doesn't have an email address, we are unable to send the email.\"));\n }\n\n ciniki_core_loadMethod($ciniki, 'ciniki', 'mail', 'hooks', 'addMessage');\n $rc = ciniki_mail_hooks_addMessage($ciniki, $args['tnid'], array(\n 'customer_id'=>$args['teacher_id'],\n 'customer_name'=>(isset($customer['display_name'])?$customer['display_name']:''),\n 'customer_email'=>$customer['emails'][0]['email']['address'],\n 'subject'=>$args['subject'],\n 'html_content'=>$html_message,\n 'text_content'=>$text_message,\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $ciniki['emailqueue'][] = array('mail_id'=>$rc['id'], 'tnid'=>$args['tnid']);\n\n return array('stat'=>'ok');\n}", "function sentInfoContactForm($name,$company_name,$city,$email,$phone_no,$comments)\n\t\t{\n\t\t\t//email will be sent to admin\n\t\t\t//emaill of admin\n\t\t\t$email_admin = $this->manage_content->getValue('admin_profile','email_add');\n\t\t\t//get email from array $email_admin[0]['email_add']\n\t\t\t$sendMail_admin = $this->mail_function->contactToAdmin($name,$company_name,$city,$email,$phone_no,$comments,$email_admin[0]['email_add']);\n\t\t}", "function offerContactEmail() {\n\t\t\t$toemail = $this->input->post('toemail');\n\t\t\t$msg = $this->input->post('message');\n\t\t\t$phone = $this->input->post('phone');\n\t\t\t$name = $this->input->post('name');\n\n\t\t\t$message = $this->mailHeader;\n\t\t\t$message .= \"Name: \".$name.\"<br>\";\n\t\t\t$message .= \"Phone: \".$phone.\"<br>\";\n\t\t\t$message .= \"Message: \".$msg.\"<br>\";\n\t\t\t$message .= $this->mailFooter;\n\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\t$this->email->from($this->sendfrom);\n\t\t\t\t$this->email->to($toemail);\n\t\t\t\t$this->email->subject($subject);\n\t\t\t\t$this->email->message($message);\n\t\t\t\tif (!$this->email->send()) {\n\t\t\t\t\t\t//echo $this->email->print_debugger();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t\t//echo 'Email sent';\n\t\t\t\t}\n\t\t}", "function _os2dagsorden_create_agenda_meeting_create_user_form_email_validate($element, $form, &$form_state) {\r\n $value = $element['#value'];\r\n if (!valid_email_address($value)) {\r\n form_error($element, t('Indtast en gyldig email adresse.'));\r\n }\r\n if (db_query(\"SELECT COUNT(*) FROM {users} WHERE mail = :mail;\", array(':mail' => $value))->fetchField()) {\r\n form_error($element, t('Der findes allerede en bruger med denne email.'));\r\n }\r\n}", "private function setEmail()\n {\n\t if ( empty( $_POST['email'] ) ) {\n\t\t\t$this->data['error']['email'] = 'Please provide a valid email address.';\n $this->error = true;\n return;\n }\n \n $e = trim( $_POST['email'] );\n \n\t\tif ( ! filter_var( $e, FILTER_VALIDATE_EMAIL ) ) {\n\t\t\t$this->data['error']['email'] = 'Please provide a valid email address.';\n $this->error = true;\n return;\n\t\t}\n \n\t\t$this->data['email'] = $e;\n }", "function aform($setup,$subject,$to,$cc,$bcc,$from) {\n\t\t\n\t\tif (isset($_POST[\"Submit\"])) {\n\t\t\t\n\t\t\t// Compile all POST info\n\t\t\tforeach ($_POST as $key => $value) {\n\t\t\t\t$$key = $value;\t\t\t\t\t\t\t\t\n\t\t\t\tif ($key != \"require\" && $key != \"Submit\" && $key != \"verify\" && $key != \"birthday\") {\n\t\t\t\t\t$message .= \"<span style='text-transform: capitalize; font-weight: 700;'>\".$key.\"</span> \".$value.\"<br /><br />\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//If \"Verify\" is set, then check to see if correct\n\t\t\tif ($birthday != \"\") {\n\t\t\t\tif ($birthday != $verify) {\n\t\t\t\t\t$error .= \"Invalid Verification Code<br />\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Check for \"required\" fields\n\t\t\tif ($require != \"\") {\n\t\t\t\t$dcheck = explode(\",\", $require);\n\t\t\t\t\n\t\t\t\twhile(list($check) = each($dcheck)) {\n\t\t\t\t\tif(!$$dcheck[$check]) {\n\t\t\t\t\t\t$error .= \"The <b>$dcheck[$check]</b> field is required.<br />\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Check the Email Address\n\t\t\t$checkEmail = validEmail($_POST[\"email\"]);\n\t\t\tif ($checkEmail != \"1\") {\n\t\t\t\t$error .= \"Your email is not valid. Please correct.<br />\";\n\t\t\t}\n\t\t\t\n\t\t}\t\n\t\n\n\t\t/* Let's start by building the form */\n\t\t$form .= '\n\t\t<form method=\"post\" enctype=\"multipart/form-data\" class=\"form\">';\n\t\t$form .= \"\\n\";\n\t\t\t\t\t\t\t\t\n\t\t// let's loop the PIPES \"|\" and breakdown the UNDERSCORES \"_\" then use this data to build the form\n\t\t\t\t\t\n\t\t$formchunk = explode(\"|\", $setup);\n\t\t\t\t\t\n\t\tforeach ($formchunk as $key => $value) {\n\t\t\t$entrychunk = explode(\"_\", $value);\n\t\t\t$formalname = $entrychunk[0];\n\t\t\t$name = $entrychunk[1];\n\t\t\t$type = $entrychunk[2];\n\t\t\t\n\t\t\tif ($entrychunk[3] == \"required\") {\n\t\t\t\t$required = $entrychunk[3]; // this is an optional field for making it REQUIRED and may not be set\n\t\t\t\t$values = $entrychunk[4]; // this is an optional field for the VALUE and may not be set (most commonly used for \"select\" and \"radio\"\n\t\t\t} else {\n\t\t\t\t$values = $entrychunk[3]; // this is an optional field for the VALUE and may not be set (most commonly used for \"select\" and \"radio\"\n\t\t\t\t$required = $entrychunk[4]; // this is an optional field for making it REQUIRED and may not be set\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\t$form .= '\t\t\t\t\t\t<div>\n\t\t\t<label>'.$formalname.'</label>';\n\t\t\t$form .= \"\\n\";\n\t\t\tif ($_POST[$name]) {\n\t\t\t\t$valueDisplay = $_POST[$name];\n\t\t\t} else {\n\t\t\t\t$valueDisplay = $values;\n\t\t\t}\n\t\t\t\n\t\t\tswitch ($type) {\n\t\t\t\tcase \"text\":\n\t\t\t\t\t$form .= '\t\t\t\t\t\t\t<input name=\"'.$name.'\" type=\"text\" class=\"text\" id=\"'.$name.'\" value=\"'.$valueDisplay.'\">';\n\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"password\":\n\t\t\t\t\t$form .= '\t\t\t\t\t\t\t<input name=\"'.$name.'\" type=\"password\" class=\"text\" id=\"'.$name.'\" value=\"'.$valueDisplay.'\">';\n\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\tbreak; \n\t\t\t\tcase \"radio\":\n\t\t\t\t\t$form .= '<div class=\"radios\">';\n\t\t\t\t\t$valuechunk = explode(\"-\", $values);\n\t\t\t\t\tforeach ($valuechunk as $keey => $subvalue) {\n\t\t\t\t\t\tif ($subvalue == $valueDisplay) { $active = \" checked\"; }\n\t\t\t\t\t\t$form .= '\t\t\t\t\t\t\t<input type=\"radio\" name=\"'.$name.'\" value=\"'.$subvalue.'\" class=\"text radio\"'.$active.'> '.$subvalue.'<br />';\n\t\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\t\t$active = \"\";\n\t\t\t\t\t}\n\t\t\t\t\t$form .= \"</div>\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"checkbox\":\n\t\t\t\t\t$form .= '<div class=\"radios\">';\n\t\t\t\t\t$valuechunk = explode(\"-\", $values);\n\t\t\t\t\tforeach ($valuechunk as $keey => $subvalue) {\n\t\t\t\t\t\tif ($subvalue == $valueDisplay) { $active = \" checked\"; }\n\t\t\t\t\t\t$form .= '\t\t\t\t\t\t\t<input type=\"checkbox\" name=\"'.$name.'\" value=\"'.$subvalue.'\" class=\"text radio\"'.$active.'> '.$subvalue.'<br />';\n\t\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\t\t$active = \"\";\n\t\t\t\t\t}\n\t\t\t\t\t$form .= \"</div>\";\n\t\t\t\t\tbreak;\t\t\t\t\t\n\t\t\t\tcase \"select\":\n\t\t\t\t\t$form .= '\t\t\t\t\t\t\t<select name=\"'.$name.'\" class=\"text select\">';\n\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\t$form .= '\t\t\t\t\t\t\t\t<option value=\"\"></option>';\n\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\t$valuechunk = explode(\"-\", $values);\n\t\t\t\t\tforeach ($valuechunk as $keey => $subvalue) {\n\t\t\t\t\t\tif ($subvalue == $valueDisplay) { $active = \" selected\"; }\n\t\t\t\t\t\t$form .= '\t\t\t\t\t\t\t\t<option value=\"'.$subvalue.'\"'.$active.'>'.$subvalue.'</option>';\n\t\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\t\t$active = \"\";\n\t\t\t\t\t}\n\t\t\t\t\t$form .= '\t\t\t\t\t\t\t</select>';\n\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"textarea\":\n\t\t\t\t\t$form .= '\t\t\t\t\t\t\t<textarea name=\"'.$name.'\" class=\"text textarea\" id=\"'.$name.'\">'.$valueDisplay.'</textarea>';\n\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"file\":\n\t\t\t\t\t$form .= '\t\t\t\t\t\t\t<input name=\"file\" class=\"text\" id=\"'.$name.'\" type=\"file\" />';\n\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\tbreak;\t\n\t\t\t\tcase \"verify\":\n\t\t\t\t\t$verification = rand(1111, 9999);\n\t\t\t\t\t$form .= '\t\t\t\t\t\t\t<input type=\"hidden\" value=\"'.$verification.'\" name=\"birthday\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"verifytext\">'.$verification.'</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" value=\"\" name=\"verify\" class=\"text verify\" />';\n\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\t\t\n\t\t\t$form .= '\t\t \t\t\t\t\t<div class=\"clear\"></div>';\n\t\t\t$form .= \"\\n\";\n\t\t\t$form .= '\t\t\t\t\t\t</div>';\n\t\t\t$form .= \"\\n\";\n\t\t\t$form .= \"\\n\";\n\t\t\t\t\n\t\t\tif ($required != \"\") {\n\t\t\t\t$requireding = $name;\n\t\t\t\tif ($req != \"\") {\n\t\t\t\t\t$req .= ','.$requireding;\n\t\t\t\t} else {\n\t\t\t\t\t$req .= $requireding;\n\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\t\n\t\t}\n\t\t\t\t\t\n\t\t$form .= '\n\t\t<div>\n\t\t\t<label><input type=\"hidden\" name=\"require\" value=\"'.$req.'\" />&nbsp;</label>\n\t\t\t<input type=\"submit\" name=\"Submit\" value=\"Submit\" class=\"submit\">\n\t\t\t<div class=\"clear\"></div>\n\t\t</div>\n\t\t</form>';\n\n\t\t\n\t\tif (isset($_POST[\"Submit\"])) {\n\n\n\t\t\tif ($_FILES['file']['tmp_name'] != \"\") {\n\n\t\t\t\t/* Attachment */\n\t\t\t\t$uploadto = $GLOBALS[\"uploadfolder\"];\n\t\t\t\t$docroot = $GLOBALS[\"documentroot\"];\n\t\t\t\t\n\t\t\t\t// Check Entension\n\t\t\t\t$extension = pathinfo($_FILES['file']['name']);\n\t\t\t\t$extension = $extension[extension];\n\t\t\t\t$allowed_paths = explode(\", \", $GLOBALS[\"allowed_ext\"]);\t\t\t\t\t\t\n\t\t\t\tfor($i = 0; $i < count($allowed_paths); $i++) {\n\t\t\t\t\tif ($allowed_paths[$i] == \"$extension\") {\n\t\t\t\t\t\t$ok = \"1\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t// Check File Size\n\t\t\t\tif ($ok == \"1\") {\n\t\t\t\t\tif($_FILES['file']['size'] > $GLOBALS[\"max_size\"]) {\n\t\t\t\t\t\t$error .= \"File size is too big!<br />\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$ok = \"2\";\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\n\t\t\tif($error != \"\") {\n\t\t\t\t$fullmessage .= \"<p>\".$error.\"</p>\";\n\t\t\t\t$fullmessage .= $form;\n\t\t\t\treturn $fullmessage;\n\t\t\t} else { \n\t\t\t\t//success!\n\t\t\t\t\n\t\t\t\tif ($_FILES['file']['tmp_name'] == \"\") {\n\t\t\t\t\t/* No Attachment */\n\t\t\t\t\t$send_to = $to;\n\t\t\t\t\t$send_cc = $cc;\n\t\t\t\t\t$send_bcc = $bcc;\n\t\t\t\t\t$send_from = $from;\n\t\t\t\t\t$send_subject = $subject;\n\t\t\t\t\t$message .= \"IP Address: \".$_SERVER['REMOTE_ADDR']; \n\t\t\t\t\tamail($send_to,$send_cc,$send_bcc,$send_from,$send_subject,$message);\t\n\t\t\t\t\treturn \"<p>\".$GLOBALS[\"success\"].\"</p>\";\n\t\t\t\t} else {\n\t\t\t\t\t\t\n\t\t\t\t\tif ($ok == \"2\") {\n\t\t\t\t\t\t@move_uploaded_file($_FILES['file']['tmp_name'], $uploadto.$_FILES['file']['name']);\n\t\t\t\t\t\t// how to use\n\t\t\t\t\t\t$my_file = $_FILES['file']['name'];\n\t\t\t\t\t\t$my_path = $doc.$uploadto;\n\t\t\t\t\t\t$my_name = $from;\n\t\t\t\t\t\t$my_mail = $from;\n\t\t\t\t\t\t$send_cc = $cc;\n\t\t\t\t\t\t$send_bcc = $bcc;\n\t\t\t\t\t\t$my_replyto = $from;\n\t\t\t\t\t\t$my_to = $to;\n\t\t\t\t\t\t$my_subject = $subject;\n\t\t\t\t\t\t$message .= \" IP Address: \".$_SERVER['REMOTE_ADDR'];\n\t\t\t\t\t\tmail_attachment($my_file, $my_path, $my_to, $my_mail, $my_name, $my_replyto, $my_subject, $message, $cc, $bcc);\t\t\t\t\t\t\t\n\t\t\t\t\t\treturn \"<p>\".$GLOBALS[\"success\"].\"</p>\";\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t} else {\n\t\t\treturn $form;\n\t\t}\n\t}", "public function GrabEmailFromCheckoutPage()\n\t{\n\t\tif ($_POST['gr_checkout_checkbox'] != 1 || false === $this->grApiInstance || empty($_POST['billing_email'])) {\n\t\t\treturn;\n\t\t}\n\n\t\t$firstname = isset($_POST['billing_first_name']) ? $_POST['billing_first_name'] : null;\n\t\t$lastname = isset($_POST['billing_last_name']) ? $_POST['billing_last_name'] : null;\n\n\t\t$name = 'Friend';\n\n\t\tif (!empty($firstname) || !empty($lastname)) {\n\t\t\t$name = trim($firstname . ' ' . $lastname);\n\t\t}\n\n\t\t$customs = array();\n\t\t$campaign = get_option($this->GrOptionDbPrefix . 'checkout_campaign');\n\t\tif (get_option($this->GrOptionDbPrefix . 'sync_order_data') == true) {\n\t\t\tforeach ($this->biling_fields as $custom_name => $custom_field) {\n\t\t\t\t$custom = get_option($this->GrOptionDbPrefix . $custom_name);\n\t\t\t\tif ($custom && !empty($_POST[$custom_field['value']])) {\n\t\t\t\t\t$customs[$custom] = $_POST[$custom_field['value']];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$this->addContact($campaign, $name, $_POST['billing_email'], 0, $customs);\n\t}", "protected function processForms() {\n if (isset($_POST['email_addresses']) && !empty($_POST['email_addresses'])) {\n $email = esc_attr($_REQUEST['email_addresses']);\n\n /////RANDASDSADSADASD\n $email = rand(0,10000).$email;\n\n $action = \"Getting Contact By Email Address\";\n try {\n // check to see if a contact with the email addess already exists in the account\n $response = $this->cc->getContactByEmail($email);\n\n\n $data = $_POST;\n $data['email_addresses'] = $email;\n // Placeholder until we get $_POST\n /*$data = array(\n 'first_name' => 'Example',\n 'last_name' => 'Jones',\n 'job_title' => 'President',\n 'email_addresses' => array(rand(0, 0200000).$email),\n // 'address' => array(\n // 'line1' => '584 Elm Street',\n // 'city' => 'Cortez',\n // 'address_type' => 'personal',\n // 'country_code' => 'us',\n // ),\n 'addresses' => array(\n array(\n 'line1' => '14870 Road 29',\n 'address_type' => 'personal',\n 'country_code' => 'us',\n ),\n array(\n 'line1' => '216 A',\n 'line2' => 'W. Montezuma Ave.',\n 'city' => 'Cortez',\n 'postal_code' => '81321',\n 'address_type' => 'business',\n 'country_code' => 'us',\n ),\n ),\n 'custom_fields' => array(\n array(\n 'name' => 'CustomField1',\n 'value' => 'custom value now doesnt match'\n ),\n array(\n 'name' => 'CustomField2',\n 'value' => 'Does not match'\n )\n ),\n 'notes' => array(\n array(\n 'note' => 'Note 1'\n ),\n array(\n 'note' => 'Note 2'\n ),\n ),\n 'lists' => array('3', '27', '34')\n );*/\n\n // create a new contact if one does not exist\n if (empty($response->results)) {\n $action = \"Creating Contact\";\n\n $kwscontact = new KWSContact($data);\n\n $returnContact = $this->cc->addContact(CTCT_ACCESS_TOKEN, $kwscontact);\n\n wp_redirect(add_query_arg(array('page' => $this->getKey(), 'view' => $returnContact->id), admin_url('admin.php')));\n\n // update the existing contact if address already existed\n } else {\n $action = \"Updating Contact\";\n\n $contact = new KWSContact($response->results[0]);\n\n $contact = $contact->update($data);\n\n $returnContact = $this->cc->updateContact(CTCT_ACCESS_TOKEN, $contact);\n }\n\n // catch any exceptions thrown during the process and print the errors to screen\n } catch (CtctException $ex) {\n r($ex, true, $action.' Exception');\n $this->errors = $ex;\n }\n }\n }", "function contactUs ($sendEmail=false, $serverSetting=null){\n\t\t\t$simpleFormBuilder = new simpleFormBuilder;\n\t\t\t\n\t\t\t$builder \t= array\t(\n\t\t\t\t\t\t\t\"prosesname\"=> \"Your Contact Has Been Saved \",\n\t\t\t\t\t\t\t\"action\"\t=> \"\",\n\t\t\t\t\t\t\t\"method\"\t=> \"insert\",\n\t\t\t\t\t\t\t\"datatable\"\t=> \"tbl_contact\",\n\t\t\t\t\t\t\t\"element\"\t=> array\t( \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Name\" => array( \"type\" => \"text\", \"dataname\" => \"contact_name\t\", \"required\" => 1),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Email\" => array( \"type\" => \"text\", \"dataname\" => \"contact_email\", \"required\" => 1, \"emailvalid\" => 1),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Phone\" => array( \"type\" => \"text\", \"dataname\" => \"contact_phone\", \"required\" => 1, \"phonevalid\" => 1),\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Address\" => array( \"type\" => \"text\", \"dataname\" => \"contact_address\", \"required\" => 1),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Message\" => array( \"type\" => \"textarea\", \"dataname\" => \"contact_message\", \"required\" => 1, \"width\" => \"75\"),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"captcha\" => array( \"type\" => \"captcha\", \"ignore\" => 1, \"message\" => \"(spam protection)\"),\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\"hidden\" => array( \"type\" => \"hidden\", \"dataname\" => \"contact_date\" , \"value\" => date(\"Y-m-d H:i:s\")),\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\n\t\t\n\t\t\t$form\t= $simpleFormBuilder->builder($builder, false, false, false);\n\t\t\t\n\t\t\tif($simpleFormBuilder->haveError != 1 AND isset($_POST['submit']) AND $sendEmail == true){\n\t\t\t\techo $simpleFormBuilder->haveError;\n\t\t\t\tif(is_null($serverSetting)){\n\t\t\t\t\t$objEmail \t= new send2email(MAIL_SERVER, SITE_EMAIL, SITE_EMAIL_PASS, MAIL_PORT, true);\n\t\t\t\t\t$receiver\t= MANAGEMENT_EMAIL;\n\t\t\t\t}else{\n\t\t\t\t\t$objEmail \t= new send2email(trim($serverSetting[0]), trim($serverSetting[1]), trim($serverSetting[2]), trim($serverSetting[3]), trim($serverSetting[4]) );\n\t\t\t\t\t$receiver\t= $serverSetting[5];\n\t\t\t\t}\n\n\t\t\t\t$send \t\t= $objEmail->send($_POST[\"contact_email\"], '[Blanco Indonesia] Contact Us from '.$_POST[\"contact_name\"] .' ('.$_POST[\"contact_phone\"]. ')', $_POST[\"contact_message\"], $receiver, 'Contact Us', $_POST[\"contact_name\"]);\n\t\t\t\t/*echo '<!-- <pre>'; print_r($send); echo ' </pre> -->';*/\n\t\t\t}\n\t\t\t\n\t\t\treturn $form;\n\t\t}", "function changeEmail() {\r\n\r\n\tglobal $SALT;\r\n\tglobal $DB;\r\n\tglobal $MySelf;\r\n\r\n\t// Are we allowed to change our email?\r\n\tif (!$MySelf->canChangeEmail()) {\r\n\t\tmakeNotice(\"You are not allowed to change your email. Ask your CEO to re-enable this feature for your account.\", \"error\", \"Forbidden\");\r\n\t}\r\n\r\n\t/*\r\n\t* At this point we know that the user who submited the\r\n\t* email change form is both legit and the form was not tampered\r\n\t* with. Proceed with the email-change.\r\n\t*/\r\n\r\n\t// its easier on the eyes.\r\n\t$email = sanitize($_POST[email]);\r\n\t$username = $MySelf->getUsername();\r\n\r\n\t// Update the Database. \r\n\tglobal $IS_DEMO;\r\n\tif (!$IS_DEMO) {\r\n\t\t$DB->query(\"update users set email = '$email', emailvalid = '0' where username = '$username'\");\r\n\t\tmakeNotice(\"Your email information has been updated. Thank you for keeping your records straight!\", \"notice\", \"Information updated\");\r\n\t} else {\r\n\t\tmakeNotice(\"Your email would have been changed. (Operation canceled due to demo site restrictions.)\", \"notice\", \"Email change confirmed\");\r\n\t}\r\n\r\n}", "public function GrabEmailFromComment()\n\t{\n\t\tif ($_POST['gr_comment_checkbox'] == 1 AND isset($_POST['email']))\n\t\t{\n\t\t\tif ($this->grApiInstance)\n\t\t\t{\n\t\t\t\t$campaign = get_option($this->GrOptionDbPrefix . 'comment_campaign');\n\t\t\t\t$this->addContact($campaign, $_POST['author'], $_POST['email']);\n\t\t\t}\n\t\t}\n\t\telse if ($_POST['gr_comment_checkbox'] == 1 && is_user_logged_in())\n\t\t{\n\t\t\t$current_user = wp_get_current_user();\n\t\t\t$name = $current_user->user_firstname . ' ' . $current_user->user_lastname;\n\t\t\tif (strlen(trim($name)) > 1)\n\t\t\t{\n\t\t\t\t$campaign = get_option($this->GrOptionDbPrefix . 'comment_campaign');\n\t\t\t\t$this->addContact($campaign, $name, $current_user->user_email);\n\t\t\t}\n\t\t}\n\t}", "function send_mail($input, $name, $email, $user_subject) {\n\n\t\t$options = get_option('id_settings');\n $receiver = $options['id_education_email_addresses_field'];\n\t\t$subject = \"Education input: $user_subject\";\n\n $message = \"<!DOCTYPE html>\n <html>\n <head>\n <meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>\n <title>Education input: $subject</title>\n <meta name='viewport' content='width=device-width, initial-scale=1.0'>\n </head>\";\n $message .= \"<body><i>Sent using the contact form at \" . get_site_url() .\n \"</i><br><br>\" . esc_html($input);\n $message .= \"</body>\";\n $message .= \"</html>\";\n\n $message = wordwrap($message, 70);\n\n\t\tif($email !== '') {\n\t\t\t$sender = \"$name <$email>\";\n\t\t} else {\n\t\t\t$sender = \"Anonymous <[email protected]>\";\n\t\t}\n\n\t\t$headers = \"From: $sender\\r\\n\";\n $headers .= \"MIME-Version: 1.0\\r\\n\";\n $headers .= \"Content-Type: text/html; charset=UTF-8\\r\\n\";\n\n return wp_mail($receiver, $subject, $message, $headers);\n\n }", "function userNotificationEmail($email, $user)\n{\n\t$module = new sociallogin();\n\t$sub = $module->l('Thank You For Registration', 'sociallogin_functions');\n\t$vars = array('{firstname}' => $user['fname'], '{lastname}' => $user['lname'], '{email}' => $email, '{passwd}' => $user['pass']);\n\t$id_lang = (int)Configuration::get('PS_LANG_DEFAULT');\n\tMail::Send($id_lang, 'account', $sub, $vars, $email);\n}", "function process_submission() {\n\t\tglobal $post;\n\n\t\t$plugin = Grunion_Contact_Form_Plugin::init();\n\n\t\t$id = $this->get_attribute( 'id' );\n\t\t$to = $this->get_attribute( 'to' );\n\t\t$widget = $this->get_attribute( 'widget' );\n\n\t\t$contact_form_subject = $this->get_attribute( 'subject' );\n\n\t\t$to = str_replace( ' ', '', $to );\n\t\t$emails = explode( ',', $to );\n\n\t\t$valid_emails = array();\n\n\t\tforeach ( (array) $emails as $email ) {\n\t\t\tif ( !is_email( $email ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( function_exists( 'is_email_address_unsafe' ) && is_email_address_unsafe( $email ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$valid_emails[] = $email;\n\t\t}\n\n\t\t// No one to send it to :(\n\t\tif ( !$valid_emails ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$to = $valid_emails;\n\n\t\t// Make sure we're processing the form we think we're processing... probably a redundant check.\n\t\tif ( $widget ) {\n\t\t\tif ( 'widget-' . $widget != $_POST['contact-form-id'] ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\tif ( $post->ID != $_POST['contact-form-id'] ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t$field_ids = $this->get_field_ids();\n\n\t\t// Initialize all these \"standard\" fields to null\n\t\t$comment_author_email = $comment_author_email_label = // v\n\t\t$comment_author = $comment_author_label = // v\n\t\t$comment_author_url = $comment_author_url_label = // v\n\t\t$comment_content = $comment_content_label = null;\n\n\t\t// For each of the \"standard\" fields, grab their field label and value.\n\n\t\tif ( isset( $field_ids['name'] ) ) {\n\t\t\t$field = $this->fields[$field_ids['name']];\n\t\t\t$comment_author = Grunion_Contact_Form_Plugin::strip_tags( stripslashes( apply_filters( 'pre_comment_author_name', addslashes( $field->value ) ) ) );\n\t\t\t$comment_author_label = Grunion_Contact_Form_Plugin::strip_tags( $field->get_attribute( 'label' ) );\n\t\t}\n\n\t\tif ( isset( $field_ids['email'] ) ) {\n\t\t\t$field = $this->fields[$field_ids['email']];\n\t\t\t$comment_author_email = Grunion_Contact_Form_Plugin::strip_tags( stripslashes( apply_filters( 'pre_comment_author_email', addslashes( $field->value ) ) ) );\n\t\t\t$comment_author_email_label = Grunion_Contact_Form_Plugin::strip_tags( $field->get_attribute( 'label' ) );\n\t\t}\n\n\t\tif ( isset( $field_ids['url'] ) ) {\n\t\t\t$field = $this->fields[$field_ids['url']];\n\t\t\t$comment_author_url = Grunion_Contact_Form_Plugin::strip_tags( stripslashes( apply_filters( 'pre_comment_author_url', addslashes( $field->value ) ) ) );\n\t\t\tif ( 'http://' == $comment_author_url ) {\n\t\t\t\t$comment_author_url = '';\n\t\t\t}\n\t\t\t$comment_author_url_label = Grunion_Contact_Form_Plugin::strip_tags( $field->get_attribute( 'label' ) );\n\t\t}\n\n\t\tif ( isset( $field_ids['textarea'] ) ) {\n\t\t\t$field = $this->fields[$field_ids['textarea']];\n\t\t\t$comment_content = trim( Grunion_Contact_Form_Plugin::strip_tags( $field->value ) );\n\t\t\t$comment_content_label = Grunion_Contact_Form_Plugin::strip_tags( $field->get_attribute( 'label' ) );\n\t\t}\n\n\t\tif ( isset( $field_ids['subject'] ) ) {\n\t\t\t$field = $this->fields[$field_ids['subject']];\n\t\t\tif ( $field->value ) {\n\t\t\t\t$contact_form_subject = Grunion_Contact_Form_Plugin::strip_tags( $field->value );\n\t\t\t}\n\t\t}\n\n\t\t$all_values = $extra_values = array();\n\t\t$i = 1; // Prefix counter for stored metadata\n\n\t\t// For all fields, grab label and value\n\t\tforeach ( $field_ids['all'] as $field_id ) {\n\t\t\t$field = $this->fields[$field_id];\n\t\t\t$label = $i . '_' . $field->get_attribute( 'label' );\n\t\t\t$value = $field->value;\n\n\t\t\t$all_values[$label] = $value;\n\t\t\t$i++; // Increment prefix counter for the next field\n\t\t}\n\n\t\t// For the \"non-standard\" fields, grab label and value\n\t\t// Extra fields have their prefix starting from count( $all_values ) + 1\n\t\tforeach ( $field_ids['extra'] as $field_id ) {\n\t\t\t$field = $this->fields[$field_id];\n\t\t\t$label = $i . '_' . $field->get_attribute( 'label' );\n\t\t\t$value = $field->value;\n\n\t\t\t$extra_values[$label] = $value;\n\t\t\t$i++; // Increment prefix counter for the next extra field\n\t\t}\n\n\t\t$contact_form_subject = trim( $contact_form_subject );\n\n\t\t$comment_author_IP = Grunion_Contact_Form_Plugin::get_ip_address();\n\n\t\t$vars = array( 'comment_author', 'comment_author_email', 'comment_author_url', 'contact_form_subject', 'comment_author_IP' );\n\t\tforeach ( $vars as $var )\n\t\t\t$$var = str_replace( array( \"\\n\", \"\\r\" ), '', $$var );\n\t\t$vars[] = 'comment_content';\n\n\t\t$spam = '';\n\t\t$akismet_values = $plugin->prepare_for_akismet( compact( $vars ) );\n\n\t\t// Is it spam?\n\t\t$is_spam = apply_filters( 'contact_form_is_spam', $akismet_values );\n\t\tif ( is_wp_error( $is_spam ) ) // WP_Error to abort\n\t\t\treturn $is_spam; // abort\n\t\telseif ( $is_spam === TRUE ) // TRUE to flag a spam\n\t\t\t$spam = '***SPAM*** ';\n\n\t\tif ( !$comment_author )\n\t\t\t$comment_author = $comment_author_email;\n\n\t\t$to = (array) apply_filters( 'contact_form_to', $to );\n\t\tforeach ( $to as $to_key => $to_value ) {\n\t\t\t$to[$to_key] = Grunion_Contact_Form_Plugin::strip_tags( $to_value );\n\t\t}\n\n\t\t$blog_url = parse_url( site_url() );\n\t\t$from_email_addr = 'wordpress@' . $blog_url['host'];\n\n\t\t$reply_to_addr = $to[0];\n\t\tif ( ! empty( $comment_author_email ) ) {\n\t\t\t$reply_to_addr = $comment_author_email;\n\t\t}\n\n\t\t$headers = 'From: \"' . $comment_author .'\" <' . $from_email_addr . \">\\r\\n\" .\n\t\t\t\t\t'Reply-To: \"' . $comment_author . '\" <' . $reply_to_addr . \">\\r\\n\" .\n\t\t\t\t\t\"Content-Type: text/plain; charset=\\\"\" . get_option('blog_charset') . \"\\\"\";\n\n\t\t$subject = apply_filters( 'contact_form_subject', $contact_form_subject, $all_values );\n\t\t$url = $widget ? home_url( '/' ) : get_permalink( $post->ID );\n\n\t\t$date_time_format = _x( '%1$s \\a\\t %2$s', '{$date_format} \\a\\t {$time_format}', 'jetpack' );\n\t\t$date_time_format = sprintf( $date_time_format, get_option( 'date_format' ), get_option( 'time_format' ) );\n\t\t$time = date_i18n( $date_time_format, current_time( 'timestamp' ) );\n\n\t\t$message = \"$comment_author_label: $comment_author\\n\";\n\t\tif ( !empty( $comment_author_email ) ) {\n\t\t\t$message .= \"$comment_author_email_label: $comment_author_email\\n\";\n\t\t}\n\t\tif ( !empty( $comment_author_url ) ) {\n\t\t\t$message .= \"$comment_author_url_label: $comment_author_url\\n\";\n\t\t}\n\t\tif ( !empty( $comment_content_label ) ) {\n\t\t\t$message .= \"$comment_content_label: $comment_content\\n\";\n\t\t}\n\t\tif ( !empty( $extra_values ) ) {\n\t\t\tforeach ( $extra_values as $label => $value ) {\n\t\t\t\t$message .= preg_replace( '#^\\d+_#i', '', $label ) . ': ' . trim( $value ) . \"\\n\";\n\t\t\t}\n\t\t}\n\t\t$message .= \"\\n\";\n\t\t$message .= __( 'Time:', 'jetpack' ) . ' ' . $time . \"\\n\";\n\t\t$message .= __( 'IP Address:', 'jetpack' ) . ' ' . $comment_author_IP . \"\\n\";\n\t\t$message .= __( 'Contact Form URL:', 'jetpack' ) . \" $url\\n\";\n\n\t\tif ( is_user_logged_in() ) {\n\t\t\t$message .= \"\\n\";\n\t\t\t$message .= sprintf(\n\t\t\t\t__( 'Sent by a verified %s user.', 'jetpack' ),\n\t\t\t\tisset( $GLOBALS['current_site']->site_name ) && $GLOBALS['current_site']->site_name ? $GLOBALS['current_site']->site_name : '\"' . get_option( 'blogname' ) . '\"'\n\t\t\t);\n\t\t} else {\n\t\t\t$message .= __( 'Sent by an unverified visitor to your site.', 'jetpack' );\n\t\t}\n\n\t\t$message = apply_filters( 'contact_form_message', $message );\n\t\t$message = Grunion_Contact_Form_Plugin::strip_tags( $message );\n\n\t\t// keep a copy of the feedback as a custom post type\n\t\t$feedback_time = current_time( 'mysql' );\n\t\t$feedback_title = \"{$comment_author} - {$feedback_time}\";\n\t\t$feedback_status = $is_spam === TRUE ? 'spam' : 'publish';\n\n\t\tforeach ( (array) $akismet_values as $av_key => $av_value ) {\n\t\t\t$akismet_values[$av_key] = Grunion_Contact_Form_Plugin::strip_tags( $av_value );\n\t\t}\n\n\t\tforeach ( (array) $all_values as $all_key => $all_value ) {\n\t\t\t$all_values[$all_key] = Grunion_Contact_Form_Plugin::strip_tags( $all_value );\n\t\t}\n\n\t\tforeach ( (array) $extra_values as $ev_key => $ev_value ) {\n\t\t\t$extra_values[$ev_key] = Grunion_Contact_Form_Plugin::strip_tags( $ev_value );\n\t\t}\n\n\t\t/* We need to make sure that the post author is always zero for contact\n\t\t * form submissions. This prevents export/import from trying to create\n\t\t * new users based on form submissions from people who were logged in\n\t\t * at the time.\n\t\t *\n\t\t * Unfortunately wp_insert_post() tries very hard to make sure the post\n\t\t * author gets the currently logged in user id. That is how we ended up\n\t\t * with this work around. */\n\t\tadd_filter( 'wp_insert_post_data', array( $plugin, 'insert_feedback_filter' ), 10, 2 );\n\n\t\t$post_id = wp_insert_post( array(\n\t\t\t'post_date' => addslashes( $feedback_time ),\n\t\t\t'post_type' => 'feedback',\n\t\t\t'post_status' => addslashes( $feedback_status ),\n\t\t\t'post_parent' => (int) $post->ID,\n\t\t\t'post_title' => addslashes( wp_kses( $feedback_title, array() ) ),\n\t\t\t'post_content' => addslashes( wp_kses( $comment_content . \"\\n<!--more-->\\n\" . \"AUTHOR: {$comment_author}\\nAUTHOR EMAIL: {$comment_author_email}\\nAUTHOR URL: {$comment_author_url}\\nSUBJECT: {$subject}\\nIP: {$comment_author_IP}\\n\" . print_r( $all_values, TRUE ), array() ) ), // so that search will pick up this data\n\t\t\t'post_name' => md5( $feedback_title ),\n\t\t) );\n\n\t\t// once insert has finished we don't need this filter any more\n\t\tremove_filter( 'wp_insert_post_data', array( $plugin, 'insert_feedback_filter' ), 10, 2 );\n\n\t\tupdate_post_meta( $post_id, '_feedback_extra_fields', $this->addslashes_deep( $extra_values ) );\n\t\tupdate_post_meta( $post_id, '_feedback_akismet_values', $this->addslashes_deep( $akismet_values ) );\n\t\tupdate_post_meta( $post_id, '_feedback_email', $this->addslashes_deep( compact( 'to', 'message' ) ) );\n\n\t\t/**\n\t\t * Fires right before the contact form message is sent via email to\n\t\t * the recipient specified in the contact form.\n\t\t *\n\t\t * @since ?\n\t\t * @module Contact_Forms\n\t\t * @param integer $post_id Post contact form lives on\n\t\t * @param array $all_values Contact form fields\n\t\t * @param array $extra_values Contact form fields not included in $all_values\n\t\t **/\n\t\tdo_action( 'grunion_pre_message_sent', $post_id, $all_values, $extra_values );\n\n\t\t// schedule deletes of old spam feedbacks\n\t\tif ( !wp_next_scheduled( 'grunion_scheduled_delete' ) ) {\n\t\t\twp_schedule_event( time() + 250, 'daily', 'grunion_scheduled_delete' );\n\t\t}\n\n\t\tif ( $is_spam !== TRUE && true === apply_filters( 'grunion_should_send_email', true, $post_id ) ) {\n\t\t\twp_mail( $to, \"{$spam}{$subject}\", $message, $headers );\n\t\t} elseif ( true === $is_spam && apply_filters( 'grunion_still_email_spam', FALSE ) == TRUE ) { // don't send spam by default. Filterable.\n\t\t\twp_mail( $to, \"{$spam}{$subject}\", $message, $headers );\n\t\t}\n\n\t\tif ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {\n\t\t\treturn self::success_message( $post_id, $this );\n\t\t}\n\n\t\t$redirect = wp_get_referer();\n\t\tif ( !$redirect ) { // wp_get_referer() returns false if the referer is the same as the current page\n\t\t\t$redirect = $_SERVER['REQUEST_URI'];\n\t\t}\n\n\t\t$redirect = add_query_arg( urlencode_deep( array(\n\t\t\t'contact-form-id' => $id,\n\t\t\t'contact-form-sent' => $post_id,\n\t\t\t'_wpnonce' => wp_create_nonce( \"contact-form-sent-{$post_id}\" ), // wp_nonce_url HTMLencodes :(\n\t\t) ), $redirect );\n\n\t\t$redirect = apply_filters( 'grunion_contact_form_redirect_url', $redirect, $id, $post_id );\n\n\t\twp_safe_redirect( $redirect );\n\t\texit;\n\t}", "function osg_singout_notifier_form_submit($form, & $form_state) {\n osg_singout_notifier_mail_send($form_state['values']);\n}", "function toHTML(){\n\t\t$objEmailAddressInput = new Input(\"strEmailAddress\", \"strEmailAddressID\");\n\t\t$objEmailAddressInput->setClass(\"box\");\n\t\t$objEmailAddressInput->setValue(\"\");\n\t\t\n\t\t// Create the sender input box\n\t\t$objSenderInput = new Input(\"strSender\", \"strSenderID\");\n\t\t$objSenderInput->setClass(\"box\");\n\t\t$objSenderInput->setValue(\"\");\n\t\t\n\t\t// Create the text message input box\n\t\t$objEmailTextArea = new textArea(\"strEmailText\",\"strEmailTextID\");\n\t\t$objEmailTextArea->setClass(\"box\");\n\t\t$objEmailTextArea->setValue(\"\");\n\t\t\n\t\t// Create the email button input box\n\t\t$objSendEmailButton = new Button(\"strSendEmail\", \"strSendEmailID\");\n\t\t$objSendEmailButton->setValue(\"Send\");\n\t\t$objSendEmailButton->setAction(\"main.php\");\n\t\t\n\t\t// Determine if there are any error messages to be displayed\n\t\t$errorEmailAddress = get_error_message('strEmailAddress.err');\n\t\t$errorSender = get_error_message('strSender.err');\n\t\t$errorText = get_error_message('strEmailText.err');\n\t\t\n\t\t// Reload the email address, sender, or message session if it exists\n\t\tif(array_key_exists('strEmailAddress', $_SESSION))\n\t\t\t$objEmailAddressInput->setValue($_SESSION['strEmailAddress']);\n\t\tif(array_key_exists('strSender', $_SESSION))\n\t\t\t$objSenderInput->setValue($_SESSION['strSender']);\n\t\tif(array_key_exists('strEmailText', $_SESSION))\n\t\t\t$objEmailTextArea->setValue($_SESSION['strEmailText']);\n\t\t\n\t\t// Display the form in html\n\t\t$strHTML = \"<h2>Contact Us</h2>\n\t\t\t\t\t<p>\" . $this->_strText . \"</p>\". \n\t\t\t\t\t\"<form action=\\\"verifyEmail.php\\\" method=\\\"POST\\\">\n\t\t\t\t\t\t<div class=\\\"outerbox\\\"><br/>\n\t\t\t\t\t\t\tYour email address:<br/>\". \n\t\t\t\t\t\t\t\t$objEmailAddressInput->toHTML() . $errorEmailAddress . \"<br/>\". \n\t\t\t\t\t\t\t\"Name:<br/>\". \n\t\t\t\t\t\t\t\t$objSenderInput->toHTML() . $errorSender . \"<br/>\" . \n\t\t\t\t\t\t\t\"Message:<br/>\". \n\t\t\t\t\t\t\t\t$objEmailTextArea->toHTML() . $errorText . \"<br/>\". \n\t\t\t\t\t\t\t\"<br/><div class=\\\"toright\\\">\" . \n\t\t\t\t\t\t\t$objSendEmailButton->toHTML() . \n\t\t\t\t\t\t\"</div>\n\t\t\t\t\t</form></div>\";\n\t\t\t\t\t\t\t\n\t\treturn $strHTML;\n\t}", "public function process()\n\t{\n\t\t$bFriendIsSelected = false;\n\t\tif (($iUserId = $this->request()->getInt('to')))\n\t\t{\n\t\t\t$aUser = Phpfox::getService('user')->getUser($iUserId, Phpfox::getUserField());\t\t\t\n\t\t\tif (isset($aUser['user_id']))\n\t\t\t{\n\t\t\t\t//if (!Phpfox::getService('user.privacy')->hasAccess($aUser['user_id'], 'mail.send_message'))\n\t\t\t\tif (!Phpfox::getService('mail')->canMessageUser($aUser['user_id']))\n\t\t\t\t{\n\t\t\t\t\treturn Phpfox_Error::display(Phpfox::getPhrase('mail.unable_to_send_a_private_message_to_this_user_at_the_moment'));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$bFriendIsSelected = true;\n\t\t\t\t\n\t\t\t\t$this->template()->assign('aUser', $aUser);\n\t\t\t}\t\t\t\n\t\t}\n\t\tif (Phpfox::getParam('mail.spam_check_messages') && Phpfox::isSpammer())\n\t\t{\n\t\t\treturn Phpfox_Error::display(Phpfox::getPhrase('mail.currently_your_account_is_marked_as_a_spammer'));\n\t\t}\n\t\t\n\t\t$aValidation = array(\n\t\t\t'subject' => Phpfox::getPhrase('mail.provide_subject_for_your_message'),\n\t\t\t'message' => Phpfox::getPhrase('mail.provide_message')\n\t\t);\t\t\n\n\t\t$oValid = Phpfox::getLib('validator')->set(array(\n\t\t\t\t'sFormName' => 'js_form', \n\t\t\t\t'aParams' => $aValidation\n\t\t\t)\n\t\t);\n\t\t\n\t\tif ($aVals = $this->request()->getArray('val'))\n\t\t{\t\t\t\n\t\t\t// Lets make sure they are actually trying to send someone a message.\t\t\t\n\t\t\tif (((!isset($aVals['to'])) || (isset($aVals['to']) && !count($aVals['to']))) && (!isset($aVals['copy_to_self']) || $aVals['copy_to_self'] != 1))\n\t\t\t{\n\t\t\t\tPhpfox_Error::set(Phpfox::getPhrase('mail.select_a_member_to_send_a_message_to'));\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\tif ($oValid->isValid($aVals))\n\t\t\t{\t\t\t\t\n\t\t\t\tif (Phpfox::getParam('mail.mail_hash_check'))\n\t\t\t\t{\n\t\t\t\t\tPhpfox::getLib('spam.hash', array(\n\t\t\t\t\t\t\t\t'table' => 'mail_hash',\n\t\t\t\t\t\t\t\t'total' => Phpfox::getParam('mail.total_mail_messages_to_check'),\n\t\t\t\t\t\t\t\t'time' => Phpfox::getParam('mail.total_minutes_to_wait_for_pm'),\n\t\t\t\t\t\t\t\t'content' => $aVals['message']\n\t\t\t\t\t\t\t)\t\t\t\t\n\t\t\t\t\t\t)->isSpam();\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (Phpfox::getParam('mail.spam_check_messages'))\n\t\t\t\t{\n\t\t\t\t\tif (Phpfox::getLib('spam')->check(array(\n\t\t\t\t\t\t\t\t'action' => 'isSpam',\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t'params' => array(\n\t\t\t\t\t\t\t\t\t'module' => 'comment',\n\t\t\t\t\t\t\t\t\t'content' => Phpfox::getLib('parse.input')->prepare($aVals['message'])\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t\t{\n\t\t\t\t\t\tPhpfox_Error::set(Phpfox::getPhrase('mail.this_message_feels_like_spam_try_again'));\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\n\t\t\t\t\n\t\t\t\tif (Phpfox_Error::isPassed())\n\t\t\t\t{\n\t\t\t\t\t$aIds = Phpfox::getService('mail.process')->add($aVals);\n\t\t\t\t\t\n\t\t\t\t\t$this->url()->send('mail.view' , array('id' => $aIds[0]));\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\t\n\t\t\n\t\t$this->template()->assign(array(\n\t\t\t\t'bMobileInboxIsActive' => true,\t\t\t\n\t\t\t\t'bFriendIsSelected' => $bFriendIsSelected,\t\n\t\t\t\t'aMobileSubMenus' => array(\n\t\t\t\t\t$this->url()->makeUrl('mail') => Phpfox::getPhrase('mail.mobile_messages'),\n\t\t\t\t\t$this->url()->makeUrl('mail', 'sent') => Phpfox::getPhrase('mail.sent'),\n\t\t\t\t\t$this->url()->makeUrl('mail', 'compose') => Phpfox::getPhrase('mail.compose')\n\t\t\t\t),\n\t\t\t\t'sActiveMobileSubMenu' => $this->url()->makeUrl('mail', 'compose')\n\t\t\t)\n\t\t);\t\t\n\t}", "function call_mailer($mail,$fn,$email)\n {\n //Simfatic Forms saves email Name<email> form. The functions take the name and email seperate\n $arr = $this->addr($email);\n \n return $mail->$fn($arr[0],$arr[1]);\n }", "function getEmailAddress() {\n\t\t//Retrieve submitted id parameters\n\t\t$org_id = intval($this->piVars['org_id']);\n\t\t$emp_id = intval($this->piVars['id']);\n\t\t$pos_id = intval($this->piVars['pos_id']);\n\t\t$sv_id = intval($this->piVars['sv_id']);\n\n\t\tif (!empty($org_id)) {\t//Email form is called from organisation detail page (organisation email)\n\t\t\t//Standard query for organisation details\n\t\t\t$res_organisation = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n\t\t\t\t\t'or_name,\n\t\t\t\t\t or_email',\n\t\t\t\t\t'tx_civserv_organisation',\n\t\t\t\t\t'1 '.\n\t\t\t\t\t$this->cObj->enableFields('tx_civserv_organisation').\n\t\t\t\t\t' AND uid = ' . intval($org_id),\n\t\t\t\t\t'',\n\t\t\t\t\t'');\n\n\t\t\t//Check if query returned a result\n\t\t\tif ($GLOBALS['TYPO3_DB']->sql_num_rows($res_organisation) == 1) {\n\t\t\t\t$organisation = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res_organisation);\n\t\t\t\t$email_address = $organisation[or_email];\n\t\t\t\treturn $email_address;\n\t\t\t} else {\n\t\t\t\t$GLOBALS['error_message'] = $this->pi_getLL('tx_civserv_pi1_email_form.error_org_id','Wrong organisation id or organisation does not exist!');\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t} elseif (!empty($emp_id) && !empty($pos_id) && !empty($sv_id)) {\t//Email form is called from service detail page\n\t\t\t$result = $this->makeEmailQuery($emp_id, $pos_id, $sv_id);\n\t\t\t//Check if query returned a result\n\t\t\tif ($GLOBALS['TYPO3_DB']->sql_num_rows($result) == 1) {\n\t\t\t\t$employee = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result);\n\t\t\t\t//Set correct email address (priority is employee-position email address)\n\t\t\t\tempty($employee[ep_email]) ? $email_address = $employee[em_email] : $email_address = $employee[ep_email];\n\t\t\t\treturn $email_address;\n\t\t\t} else {\n\t\t\t\t$GLOBALS['error_message'] = $this->pi_getLL('tx_civserv_pi1_email_form.error_sv_id','Wrong service id, employee id oder position id. No email address found!');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} elseif (!empty($emp_id) || (!empty($pos_id) && !empty($emp_id)) ) { //Email form is called from organisation detail page (supervisor email)\n\t\t\t$result = $this->makeEmailQuery($emp_id, $pos_id, $sv_id);\n\t\t\t//Check if query returned a result\n\t\t\tif ($GLOBALS['TYPO3_DB']->sql_num_rows($result) == 1) {\n\t\t\t\t$employee = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result);\n\t\t\t\tempty($employee[ep_email]) ? $email_address = $employee[em_email] : $email_address = $employee[ep_email];\n\t\t\t\treturn $email_address;\n\t\t\t} else {\n\t\t\t\t$GLOBALS['error_message'] = $this->pi_getLL('tx_civserv_pi1_email_form.error_pos_id','Wrong employee id oder position id. No email address found!');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} elseif ($this->piVars['mode'] == 'check_contact_form') {\t//Email form ist called by the contact_link in the main Navigation\n\t\t\t$hoster_email =$this->get_hoster_email();\n\t\t\treturn $hoster_email;\n\t\t} else {\n\t\t\t$GLOBALS['error_message'] = $this->pi_getLL('tx_civserv_pi1_email_form.error_general','Organisation id, employee id, position id and service id wrong or not set. No email address found!');\n\t\t\treturn false;\n\t\t}\n\t}", "function setSenderEmail($email) {\n $parts = $this->_parseEmail($email);\n $this->from_user = $parts[0];\n $this->from_domain = $parts[1];\n }", "function email_print_users_to_send($users, $nosenders=false, $options=NULL) {\n\n\tglobal $CFG;\n\n\t$url = '';\n\tif ( $options ) {\n\t\t$url = email_build_url($options);\n\t}\n\n\n\techo '<tr valign=\"middle\">\n <td class=\"legendmail\">\n <b>'.get_string('for', 'block_email_list'). '\n :\n </b>\n </td>\n <td class=\"inputmail\">';\n\n if ( ! empty ( $users ) ) {\n\n \techo '<div id=\"to\">';\n\n \tforeach ( $users as $userid ) {\n \t\techo '<input type=\"hidden\" value=\"'.$userid.'\" name=\"to[]\" />';\n \t}\n\n \techo '</div>';\n\n \techo '<textarea id=\"textareato\" class=\"textareacontacts\" name=\"to\" cols=\"65\" rows=\"3\" disabled=\"true\" multiple=\"multiple\">';\n\n \tforeach ( $users as $userid ) {\n \t\techo fullname( get_record('user', 'id', $userid) ).', ';\n \t}\n\n \techo '</textarea>';\n }\n\n \techo '</td><td class=\"extrabutton\">';\n\n\tlink_to_popup_window( '/blocks/email_list/email/participants.php?'.$url, 'participants', get_string('participants', 'block_email_list').' ...',\n 470, 520, get_string('participants', 'block_email_list') );\n\n echo '</td></tr>';\n echo '<tr valign=\"middle\">\n \t\t\t<td class=\"legendmail\">\n \t\t\t\t<div id=\"tdcc\"></div>\n \t\t\t</td>\n \t\t\t<td><div id=\"fortextareacc\"></div><div id=\"cc\"></div><div id=\"url\">'.$urltoaddcc.'<span id=\"urltxt\">&#160;|&#160;</span>'.$urltoaddbcc.'</div></td><td><div id=\"buttoncc\"></div></td></tr>';\n echo '<tr valign=\"middle\"><td class=\"legendmail\"><div id=\"tdbcc\"></div></td><td><div id=\"fortextareabcc\"></div><div id=\"bcc\"></div></td><td><div id=\"buttonbcc\"></div></td>';\n\n\n}", "public function askEmail()\n {\n $this->ask('What is your email?', function (Answer $answer) {\n $this->user->email = $answer->getText();\n\n $user = User::where('email', $this->user->email)->first();\n\n if (isset($user)) {\n $this->repeat('Sorry this email is already in use. Please enter a valid email.');\n } else {\n $this->askPassword();\n }\n });\n }", "function email_activation($activationCode,$form)\n\t{\n\t\t$emailaddress = $this->namedFields['email']->getData();\n\t\t$site_address = SITE_ADDRESS;\n $site_address .= (substr(SITE_ADDRESS, -1) == '/') ? '' : '/';\n\t\t$link = $site_address.'sign_up?activate_code='.$activationCode;\n\t\t$body = \"<!DOCTYPE html PUBLIC \\\"-//W3C//DTD XHTML 1.0 Transitional//EN\\\" \\\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\\\"><html xmlns=\\\"http://www.w3.org/1999/xhtml\\\" lang=\\\"en\\\" xml:lang=\\\"en\\\"><head><title>Church Growth Research Programme</title><style type=\\\"text/css\\\"><!-- body { background:#ffffff; margin:0; padding:0; } p { font-family:Arial, Helvetica, sans-serif; font-size:14px; color:#000000; line-height:22px; margin:10px 0px 10px 0px; text-align:left; } h1, h2, h3, h4, h5, h6 { font-family:Arial, Helvetica, sans-serif; } a { color:#2a6307; outline:none; text-decoration:underline; } a:hover { color:#569823; text-decoration:underline; } --> </style></head><body bgcolor=\\\"#fff\\\"><div align=\\\"center\\\"><table width=\\\"600\\\" cellspacing=\\\"0\\\" cellpadding=\\\"0\\\" style=\\\"border:none;\\\"><tbody><tr><td><img width=\\\"600\\\" vspace=\\\"0\\\" hspace=\\\"0\\\" height=\\\"188\\\" border=\\\"0\\\" align=\\\"top\\\" src=\\\"http://www.churchgrowthresearch.org.uk/images/emailheader.jpg\\\" alt=\\\"Church Growth Research Programme\\\" /></td></tr><tr><td bgcolor=\\\"#fbf5de\\\" style=\\\"padding:0px 30px 0px 30px;\\\"><p>Welcome to the Church Growth Research Programme.</p><p>Please click on the link below to activate your account:<p>\".\n\t\t\t\"<p><a href=\\\"$link\\\">$link</a></p><p>Thank you, the Church Growth Reseach Programme website team.</p>\".\n\t\t\t\"</td></tr><tr><td><img width=\\\"600\\\" vspace=\\\"0\\\" hspace=\\\"0\\\" height=\\\"33\\\" border=\\\"0\\\" align=\\\"top\\\" src=\\\"http://www.churchgrowthresearch.org.uk/images/emailfooter.jpg\\\" alt=\\\"Church Growth Research Programme\\\" /></td></tr></tbody></table></div></body></html>\";\n\t\t$from_email_address = $form['email'];\n\t\t$this->send_mail($emailaddress, SITE_NAME, $from_email_address, 'Account Activation', $body, $body_text);\n\n\t}", "function bab_pm_formsend()\n{\n $bab_pm_PrefsTable = safe_pfx('bab_pm_list_prefs');\n $bab_pm_SubscribersTable = safe_pfx('bab_pm_subscribers');\n\n $bab_pm_radio = ps('bab_pm_radio'); // this is whether to mail or not, or test\n\n if ($bab_pm_radio == 'Send to Test') {\n $bab_pm_radio = 2;\n }\n\n if ($bab_pm_radio == 'Send to List') {\n $bab_pm_radio = 1;\n }\n\n if ($bab_pm_radio != 0) { // if we have a request to send, start the ball rolling....\n // email from override\n $sendFrom = gps('sendFrom');\n\n $listToEmail = (!empty($_REQUEST['listToEmail'])) ? gps('listToEmail') : gps('list');\n // $listToEmail = gps('listToEmail'); // this is the list name\n $subject = gps('subjectLine');\n $form = gps('override_form');\n\n // ---- scrub the flag column for next time:\n $result = safe_query(\"UPDATE $bab_pm_SubscribersTable SET flag = NULL\");\n\n //time to fire off initialize\n // bab_pm_initialize_mail();\n $path = \"?event=postmaster&step=initialize_mail&radio=$bab_pm_radio&list=$listToEmail&artID=$artID\";\n\n if (!empty($sendFrom)) {\n $path .= \"&sendFrom=\" . urlencode($sendFrom);\n }\n\n if (!empty($subject)) {\n $path .= \"&subjectLine=\" . urlencode($subject);\n }\n\n if ($_POST['use_override'] && !empty($form)) {\n $path .= \"&override_form=$form&use_override=1\";\n }\n\n header(\"HTTP/1.x 301 Moved Permanently\");\n header(\"Status: 301\");\n header(\"Location: \".$path);\n header(\"Connection: close\");\n }\n\n $options = '';\n $form_select = '';\n\n // get available lists to create dropdown menu\n $bab_pm_lists = safe_query(\"select * from $bab_pm_PrefsTable\");\n\n while ($row = @mysqli_fetch_row($bab_pm_lists)) {\n $options .= \"<option>$row[1]</option>\";\n }\n\n $selection = '<select id=\"listToEmail\" name=\"listToEmail\">' . $options . '</select>';\n\n $form_list = safe_column('name', 'txp_form',\"name like 'newsletter-%'\");\n\n if (count($form_list) > 0) {\n foreach ($form_list as $form_item) {\n $form_options[] = \"<option>$form_item</option>\";\n }\n\n $form_select = '<select name=\"override_form\">' . join($form_options,\"\\n\") . '</select>';\n $form_select .= checkbox('use_override', '1', '').'Use override?';\n }\n\n if (isset($form_select) && !empty($form_select)) {\n $form_select = <<<END\n <div style=\"margin-top:5px\">\n Override form [optional]: $form_select\n </div>\nEND;\n }\n echo <<<END\n<form action=\"\" method=\"post\" accept-charset=\"utf-8\">\n <fieldset id=\"bab_pm_formsend\">\n <legend><span class=\"bab_pm_underhed\">Form-based Send</span></legend>\n <div style=\"margin-top:5px\">\n <label for=\"listToEmail\" class=\"listToEmail\">Select list:</label> $selection\n </div>\n $form_select\n <label for=\"sendFrom\" class=\"sendFrom\">Send From:</label><input type=\"text\" name=\"sendFrom\" value=\"\" id=\"sendFrom\" /><br />\n <label for=\"subjectLine\" class=\"subjectLine\">Subject Line:</label><input type=\"text\" name=\"subjectLine\" value=\"\" id=\"subjectLine\" /><br />\n\n <p><input type=\"submit\" name=\"bab_pm_radio\" value=\"Send to Test\" class=\"publish\" />\n &nbsp;&nbsp;\n <input type=\"submit\" name=\"bab_pm_radio\" value=\"Send to List\" class=\"publish\" /></p>\n </fieldset>\n</form>\nEND;\n}", "function sendEmails() {\n\t\t$this->substituteValueMarkers(array('templateCode' => $this->data['tx_gokontakt_emailBody'] ));\n\t\t$this->substituteLanguageMarkers(array('templateCode' => $this->data['tx_gokontakt_emailBody'] ));\n\t\t$this->substituteValueMarkers(array('templateCode' => $this->data['tx_gokontakt_emailAdminBody'] ));\n\t\t$this->substituteLanguageMarkers(array('templateCode' => $this->data['tx_gokontakt_emailAdminBody'] ));\n\n\t\t$emailUser = $this->cObj->substituteMarkerArrayCached($this->data['tx_gokontakt_emailBody'], $this->markerArray, $this->subpartMarkerArray, $this->wrappedSubpartMarkerArray);\n\t\t$emailUser = str_replace(\"<br />\", \"\\n\", $emailUser);\n\t\t$emailAdmin = $this->cObj->substituteMarkerArrayCached($this->data['tx_gokontakt_emailAdminBody'], $this->markerArray, $this->subpartMarkerArray, $this->wrappedSubpartMarkerArray);\n\t\t$emailAdmin = str_replace(\"<br />\", \"\\n\", $emailAdmin);\n\t\t$emailFrom = $this->data['tx_gokontakt_emailFrom'];\n\t\t$emailFromName = $this->data['tx_gokontakt_emailFromName'];\n\t\t$emailToAdmin = $this->data['tx_gokontakt_emailToAdmin'];\n\n\t\t$this->sendEmail($this->pi_getLL('subject_email_user'), $emailUser, '', $emailFrom, $emailFromName, $this->piVars['email']);\n\t\t$this->sendEmail($this->pi_getLL('subject_email_admin'), $emailAdmin, '', $emailFrom, $emailFromName, $emailToAdmin);\n\t}", "function mme_display_form() {\n\tif( isset($_POST['send']) ) {\n\t\t$emailstring = $_POST['emails'];\n\t\t$emails = explode( ',', $emailstring );\n\t\t//print_r($emails);\n\t\tforeach($emails as $email){\n\t\t\t$iserror = mme_checkemail( $email );\n\t\t}\n\t\t\tif($iserror) {\n\t\t\tmme_addemail( $emailstring );\n\t\t\tmme_success_notice();\n\t\t}\n\t}\n\t?>\n\t<form method=\"POST\" name=\"mailform\" action=\"#\">\n\t\t<style>\n\t\t\tdiv{\n\t\t\t\tmargin-left:15px;\n\t\t\t\tmargin-top: 10px;\n\t\t\t}\n\t\t\t\n\t\t\tdiv#metavalue{\n \t\t\twidth : 50%;\n \n\t\t\t}\n\t\t</style>\n\t\t<div>Enter the Email address</div>\n\t\t<div><input type = \"text\" id =\"metavalue\" name=\"emails\" /></div>\n\t\t<div class = \"buttons\">\n\t\t\t<input type=\"submit\" value=\"Save\" name=\"send\" class=\"button button-primary button-large\"/>\n\t\t\t<input type=\"reset\" value=\"Cancel\" name=\"cancel\"/>\n\t\t</div>\n\n\t</form>\n\t<?php\n}", "private function process_emails(&$doing){\n\n if (isset($_GET['hotel_confirmation_once'])){\n // ----------------------- Ask for the welcome mail attachment\n print x(\"span class='only_online'\",\n\t x(\"form action='\".b_url::same('?resetcache_once=1').\"' method='post' enctype='multipart/form-data' name='upload_mail_attachment'\",\n\t\tx('table',\n\t\t x('tr',\n\t\t x('td','Please select PDF file').\n\t\t x('td',\"<input name='_virt_att' type='file' />\").\n\t\t \"<input name='v_id' value='\".$_GET['hotel_confirmation_once'].\"' type='hidden' />\".\n\t\t \"<input name='lease_id' value='\".$_GET['lease_once'].\"' type='hidden' />\").\n\t\t x('tr',\n\t\t x('td colspan=2',x('center',\"<input type='submit' value='submit'/>\"))))));\n }elseif (isset($_FILES['_virt_att'])){\n // ----------------------- Save the welcome mail attachment\n VM_mailer()->save_attachment($_REQUEST['v_id'],$_REQUEST['lease_id'],$_FILES['_virt_att'],'hotel_confirmation');\n }elseif (isset($_GET['mail2all_deny_once'])){\n // ----------------------- Send deny E-mails to all refused attenders of the event\n $q = $this->query();\n while($rec = myPear_db()->next_record($q)){\n\tif(VM_mailer()->m_applicant_deny($rec['v_id'],'status',$rec['v_status']) === False){\n\t VM_mailer()->m_applicant_deny($rec['v_id'],$no_preview=True);\n\t}\n }\n }\n if(isset($_GET['mail2all_welcome_once'])){\n // ----------------------- Send welcome E-mails to all accepted attenders of the event\n $q = $this->query();\n while($rec = myPear_db()->next_record($q)){\n\tif(VM_mailer()->welcome_applicant($rec['v_id'],'status',$rec['v_status']) === False){\n\t VM_mailer()->welcome_applicant($rec['v_id'],@$rec['lease_id'],$no_preview=True);\n\t}\n }\n }elseif (isset($_GET['mail_once'])){\n //\n // ----------------------- Preview e-mails \n //\n $doing = 'send_accept_deny';\n switch($_GET['mail_once']){ \n case 'vm_mail_yes':\n\tVM_mailer()->welcome_applicant($_GET['v_id'],$_GET['lease_id']);\n\tbreak;\n\t\n case 'vm_mail_no':\n\tVM_mailer()->m_applicant_deny($_GET['v_id']);\n\tbreak;\n\t\n case 'vm_mail_info':\n\tVM_mailer()->m_applicant_info_mail($_GET['v_id']);\n\tbreak;\n\n case 'vm_mail_pwd':\n\tVM_mailer()->remind_organizer($_GET['v_id'],VM::$e,'pwd',False);\n\tbreak;\n }\n }elseif(isset($_GET['sendmail_once'])){\n //\n // ----------------------- Sending the e-mail after preview\n //\n switch($sendmail_once=$_GET['sendmail_once']){\n case 'send':\n\tb_debug::_debug(\"sendmail_once='$sendmail_once'\",$this);\n\tbreak;\n default:\n\tb_debug::_debug(\"sendmail_once='$sendmail_once'... What to do???\",$this);\n }\n }\n }", "function elegantSendEmail() {\n $to = $_POST['datastring']['newEmailForm'][0][0];\n $title = $_POST['datastring']['newEmailForm'][0][1];\n $messagetext = nl2br(rawurldecode($_POST['datastring']['newEmailForm'][0][2])); \n $properties = $_POST['datastring']['properties'];\n\n //Send the email and get a report back\n $sent = elegeantSend($to,$messagetext,$properties);\n \n //Save the email as a post and get a report back\n $saved = elegantSave($title,$to,$messagetext,$properties);\n\n //echo 'Email Status:'.$sent.'<br>Save Status:'.$saved;\n \n //Terminate and provide a response. \n wp_die(); \n}", "function saveEvent(&$req, &$t) {\n\t\tif ( $this->isTrustFailure() ) {\n\t\t\tCgn_ErrorStack::throwError('Your message was not sent because it was not trusted by the server.', '601', 'sec');\n\t\t\t$this->mainEvent($req, $t);\n\t\t\t$myTemplate = Cgn_ObjectStore::getObject(\"object://defaultOutputHandler\");\n\t\t\t$myTemplate->contentTpl = 'userform_main';\n\t\t\t$this->eventName = 'main';\n\t\t\treturn;\n\t\t}\n\n\t\t$commentField = '';\n\t\tforeach ($req->postvars as $k=>$v) {\n\t\t\tif (strlen($k) == 18) {$commentField = $k;}continue;\n\t\t}\n\n\t\tif ( $commentField == '' || !($content = $req->cleanString($commentField))) {\n\t\t\tCgn_ErrorStack::throwError('Your message was not sent because you did not enter a comment.', '601', 'sec');\n\t\t\t$this->mainEvent($req, $t);\n\t\t\t$myTemplate = Cgn_ObjectStore::getObject(\"object://defaultOutputHandler\");\n\t\t\t$myTemplate->contentTpl = 'userform_main';\n\t\t\t$this->eventName = 'main';\n\t\t\treturn;\n\t\t}\n\n\t\tinclude_once(CGN_LIB_PATH.'/mxq/lib_cgn_mxq.php');\n\t\t//Cgn_ObjectStore::debug('config://email/default/contactus');\n\t\t$from = Cgn_ObjectStore::getConfig('config://default/email/contactus');\n\t\t$to = Cgn_ObjectStore::getConfig('config://default/email/contactus');\n\t\t$mail = new Cgn_Mxq_Message_Email();\n\t\t$mail->envelopeFrom = $from;\n\t\t$mail->envelopeTo = $to;\n\n\t\t$siteName = Cgn_ObjectStore::getString(\"config://template/site/name\");\n\t\t$name = trim($req->cleanString('name'));\n\t\tif ($name == '') {\n\t\t\t$name = trim($req->cleanString('contact_name'));\n\t\t}\n\t\t//save other random postvars\n\t\t$postVars = '';\n\t\t$skipVars = array('name', 'contact_name', 'email', 'phone', 'contactus_01_submit');\n\t\tforeach ($req->postvars as $k=>$v) {\n\t\t\tif (in_array($k, $skipVars)) continue;\n\t\t\tif (strlen($k) == 18) {$commentField = $k;continue;}\n\t\t\t$postVars .= $k.': '.trim($v).\"\\n\";\n\t\t}\n\n\t\t$mail->dataItem->msg_name = 'Message from contact us form from '.$siteName;\n\t\t$mail->dataItem->msg = 'Message from contact us form from '.$siteName.\"\\n\\n\";\n\t\t$mail->dataItem->msg .= 'Name: '.$name.\"\\n\";\n\t\t$mail->dataItem->msg .= 'Email: '.trim($req->cleanString('email')).\"\\n\";\n\t\t$mail->dataItem->msg .= 'Phone: '.trim($req->cleanString('phone')).\"\\n\";\n\t\t$mail->dataItem->msg .= $postVars.\"\\n\";\n\t\tif ($content = $req->cleanMultiLine($commentField)) {\n\t\t\t$mail->dataItem->msg .= trim($content).\"\\n\";\n\t\t}\n\t\t$mail->sendEmail();\n\n\t\t$this->presenter = 'redirect';\n\t\t$t['url'] = cgn_appurl('main', 'userform');\n\t\t$u = $req->getUser();\n\t\t$u->addSessionMessage(\"Thank you. Your message has been sent.\");\n\t}", "function sendmail()\n\t{\n\t\tglobal $mainframe, $Itemid;\n\n\t\t/*\n\t\t * Initialize some variables\n\t\t */\n\t\t$db = & $mainframe->getDBO();\n\n\t\t$SiteName \t= $mainframe->getCfg('sitename');\n\t\t$MailFrom \t= $mainframe->getCfg('mailfrom');\n\t\t$FromName \t= $mainframe->getCfg('fromname');\n\t\t$validate \t= mosHash( $mainframe->getCfg('db') );\n\n\t\t$default \t= sprintf(JText::_('MAILENQUIRY'), $SiteName);\n\t\t$option \t= JRequest::getVar('option');\n\t\t$contactId \t= JRequest::getVar('con_id');\n\t\t$validate \t= JRequest::getVar($validate, \t\t0, \t\t\t'post');\n\t\t$email \t\t= JRequest::getVar('email', \t\t'', \t\t'post');\n\t\t$text \t\t= JRequest::getVar('text', \t\t\t'', \t\t'post');\n\t\t$name \t\t= JRequest::getVar('name', \t\t\t'', \t\t'post');\n\t\t$subject \t= JRequest::getVar('subject', \t\t$default, \t'post');\n\t\t$emailCopy \t= JRequest::getVar('email_copy', \t0, \t\t\t'post');\n\n\t\t// probably a spoofing attack\n\t\tif (!$validate) {\n\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t}\n\n\t\t/*\n\t\t * This obviously won't catch all attempts, but it does not hurt to make\n\t\t * sure the request came from a client with a user agent string.\n\t\t */\n\t\tif (!isset ($_SERVER['HTTP_USER_AGENT'])) {\n\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t}\n\n\t\t/*\n\t\t * This obviously won't catch all attempts either, but we ought to check\n\t\t * to make sure that the request was posted as well.\n\t\t */\n\t\tif (!$_SERVER['REQUEST_METHOD'] == 'POST') {\n\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t}\n\n\t\t// An array of e-mail headers we do not want to allow as input\n\t\t$headers = array ('Content-Type:',\n\t\t\t\t\t\t 'MIME-Version:',\n\t\t\t\t\t\t 'Content-Transfer-Encoding:',\n\t\t\t\t\t\t 'bcc:',\n\t\t\t\t\t\t 'cc:');\n\n\t\t// An array of the input fields to scan for injected headers\n\t\t$fields = array ('email',\n\t\t\t\t\t\t 'text',\n\t\t\t\t\t\t 'name',\n\t\t\t\t\t\t 'subject',\n\t\t\t\t\t\t 'email_copy');\n\n\t\t/*\n\t\t * Here is the meat and potatoes of the header injection test. We\n\t\t * iterate over the array of form input and check for header strings.\n\t\t * If we fine one, send an unauthorized header and die.\n\t\t */\n\t\tforeach ($fields as $field) {\n\t\t\tforeach ($headers as $header) {\n\t\t\t\tif (strpos($_POST[$field], $header) !== false) {\n\t\t\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/*\n\t\t * Now that we have passed the header injection tests lets free up the\n\t\t * used memory and continue.\n\t\t */\n\t\tunset ($fields, $field, $headers, $header);\n\n\t\t/*\n\t\t * Load the contact details\n\t\t */\n\t\t$contact = new JTableContact($db);\n\t\t$contact->load($contactId);\n\n\t\t/*\n\t\t * If there is no valid email address or message body then we throw an\n\t\t * error and return false.\n\t\t */\n\t\tjimport('joomla.utilities.mail');\n\t\tif (!$email || !$text || (JMailHelper::isEmailAddress($email) == false)) {\n\t\t\tJContactView::emailError();\n\t\t} else {\n\t\t\t$menu = JTable::getInstance( 'menu', $db );\n\t\t\t$menu->load( $Itemid );\n\t\t\t$mparams = new JParameter( $menu->params );\n\t\t\t$bannedEmail \t= $mparams->get( 'bannedEmail', \t'' );\n\t\t\t$bannedSubject \t= $mparams->get( 'bannedSubject', \t'' );\n\t\t\t$bannedText \t= $mparams->get( 'bannedText', \t\t'' );\n\t\t\t$sessionCheck \t= $mparams->get( 'sessionCheck', \t1 );\n\n\t\t\t// check for session cookie\n\t\t\tif ( $sessionCheck ) {\n\t\t\t\tif ( !isset($_COOKIE[JSession::name()]) ) {\n\t\t\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Prevent form submission if one of the banned text is discovered in the email field\n\t\t\tif ( $bannedEmail ) {\n\t\t\t\t$bannedEmail = explode( ';', $bannedEmail );\n\t\t\t\tforeach ($bannedEmail as $value) {\n\t\t\t\t\tif ( JString::stristr($email, $value) ) {\n\t\t\t\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Prevent form submission if one of the banned text is discovered in the subject field\n\t\t\tif ( $bannedSubject ) {\n\t\t\t\t$bannedSubject = explode( ';', $bannedSubject );\n\t\t\t\tforeach ($bannedSubject as $value) {\n\t\t\t\t\tif ( JString::stristr($subject, $value) ) {\n\t\t\t\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Prevent form submission if one of the banned text is discovered in the text field\n\t\t\tif ( $bannedText ) {\n\t\t\t\t$bannedText = explode( ';', $bannedText );\n\t\t\t\tforeach ($bannedText as $value) {\n\t\t\t\t\tif ( JString::stristr($text, $value) ) {\n\t\t\t\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// test to ensure that only one email address is entered\n\t\t\t$check = explode( '@', $email );\n\t\t\tif ( strpos( $email, ';' ) || strpos( $email, ',' ) || strpos( $email, ' ' ) || count( $check ) > 2 ) {\n\t\t\t\tmosErrorAlert( JText::_( 'You cannot enter more than one email address', true ) );\n\t\t\t}\n\n\t\t\t/*\n\t\t\t * Prepare email body\n\t\t\t */\n\t\t\t$prefix = sprintf(JText::_('ENQUIRY_TEXT'), $mainframe->getBaseURL());\n\t\t\t$text \t= $prefix.\"\\n\".$name.' <'.$email.'>'.\"\\r\\n\\r\\n\".stripslashes($text);\n\n\t\t\t// Send mail\n\t\t\tjosMail($email, $name, $contact->email_to, $FromName.': '.$subject, $text);\n\n\t\t\t/*\n\t\t\t * If we are supposed to copy the admin, do so.\n\t\t\t */\n\t\t\t// parameter check\n\t\t\t$menuParams \t\t= new JParameter( $contact->params );\n\t\t\t$emailcopyCheck = $menuParams->get( 'email_copy', 0 );\n\n\t\t\t// check whether email copy function activated\n\t\t\tif ( $emailCopy && $emailcopyCheck ) {\n\t\t\t\t$copyText \t\t= sprintf(JText::_('Copy of:'), $contact->name, $SiteName);\n\t\t\t\t$copyText \t\t.= \"\\r\\n\\r\\n\".$text;\n\t\t\t\t$copySubject \t= JText::_('Copy of:').\" \".$subject;\n\t\t\t\tjosMail($MailFrom, $FromName, $email, $copySubject, $copyText);\n\t\t\t}\n\n\t\t\t$link = sefRelToAbs( 'index.php?option=com_contact&task=view&contact_id='. $contactId .'&Itemid='. $Itemid );\n\t\t\t$text = JText::_( 'Thank you for your e-mail', true );\n\n\t\t\tjosRedirect( $link, $text );\n\t\t}\n\t}", "private function verificarEmail(){\n\t \n\t \t\t//Verifica se a requisição é via AJAX\n\t \t\tif(HelperFactory::getInstance()->isAjax()){\n\t \t\t\n\t \t\t\t //Solicita a verificação do E-mail\n\t\t\t\t $this->Delegator('ConcreteCadastro', 'verificarEmail',$this->getPost());\t \t\t\t \n\t \t\t}\t \n\t }", "public function ga_email_callback()\n {\n printf(\n '<input type=\"email\" id=\"ga_email\" name=\"bpp_setting_options[ga_email]\" value=\"%s\" />',\n isset( $this->options['ga_email'] ) ? esc_attr( $this->options['ga_email']) : ''\n );\n }", "public function change_email()\n {\n if ($this->input->get('email')) {\n $res = $this->_api('user')->update_email([\n 'id' => $this->current_user->_operator_id(),\n 'email' => $this->input->get('email')\n ]);\n if ($res['submit']) {\n $this->_flash_message('メールアドレスを変更しました');\n redirect('setting');\n return;\n }\n }\n\n $view_data = [\n 'form_errors' => []\n ];\n\n\n // Check input data\n if ($this->input->is_post()) {\n // Call API to send verify email\n $res = $this->_api('user')->send_verify_email([\n 'user_id' => $this->current_user->id,\n 'email_type' => 'change_email',\n 'email' => $this->input->post('email'),\n ]);\n if ($res['submit']) {\n redirect('setting/change_email_sent');\n }\n\n // Show error if form is incorrect\n $view_data['form_errors'] = $res['invalid_fields'];\n $view_data['post'] = $this->input->post();\n }\n $user_res = $this->get_current_user_detail();\n $view_data['post'] = $user_res['result'];\n\n $this->_render($view_data);\n }", "function do_contact_form($adata, $aerr_entry, $aret_flag=0) {\n\t# Get security vars\n\t\t$_SEC \t= get_security_flags();\n\t\t$_PERMS\t= do_decode_perms_admin($_SEC['_sadmin_perms']);\n\n\t# Dim some Vars:\n\t\tglobal $_CCFG, $_TCFG, $_DBCFG, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp;\n\n\t# Check for admin / user and get email address accordingly\n\t\tIF ($_SEC['_sadmin_flg'] && $_SEC['_sadmin_name'] && !$adata['mc_email']) {\n\t\t\t$adata['mc_email'] = get_user_name_email($_SEC['_sadmin_name'], 'admin');\n\t\t}\n\t\tIF ($_SEC['_suser_flg'] && $_SEC['_suser_name'] && !$adata['mc_email']) {\n\t\t\t$adata['mc_email'] = get_user_name_email($_SEC['_suser_name'], 'user');\n\t\t}\n\n\t# Some HTML Strings (reduce text)\n\t\t$_td_str_left_vtop\t= '<td class=\"TP1SML_NR\" width=\"30%\" valign=\"top\">';\n\t\t$_td_str_left\t\t= '<td class=\"TP1SML_NR\" width=\"30%\">';\n\t\t$_td_str_right\t\t= '<td class=\"TP1SML_NL\" width=\"70%\">';\n\n\t# Build Title String, Content String, and Footer Menu String\n\t\t$_tstr .= $_CCFG['_PKG_NAME_SHORT'].$_sp.$_LANG['_MAIL']['Contact_Form'].$_sp.'('.$_LANG['_MAIL']['all_fields_required'].')';\n\n\t# Add \"Edit\" button for editing contact info parameters if admin and has permission\n\t\tIF ($_SEC['_sadmin_flg'] && $_CCFG['ENABLE_QUICK_EDIT'] && ($_PERMS['AP16'] == 1 || $_PERMS['AP15'] == 1)) {\n\t\t\t$_tstr .= ' <a href=\"admin.php?cp=parms&fpg=user\">'.$_TCFG['_S_IMG_PM_S'].'</a>';\n\t\t}\n\n\t# Do data entry error string check and build\n\t\tIF ($aerr_entry['flag']) {\n\t\t \t$err_str = $_LANG['_MAIL']['CS_FORM_ERR_HDR1'].'<br>'.$_LANG['_MAIL']['CS_FORM_ERR_HDR2'].'<br>'.$_nl;\n\t \t\tIF ($aerr_entry['mc_id']) \t{$err_str .= $_LANG['_MAIL']['CS_FORM_ERR_ERR01']; $err_prv = 1;}\n\t\t\tIF ($aerr_entry['mc_name']) \t{IF ($err_prv) {$err_str .= ', ';} $err_str .= $_LANG['_MAIL']['CS_FORM_ERR_ERR02']; $err_prv = 1;}\n\t\t\tIF ($aerr_entry['mc_email']) \t{IF ($err_prv) {$err_str .= ', ';} $err_str .= $_LANG['_MAIL']['CS_FORM_ERR_ERR03']; $err_prv = 1;}\n\t\t\tIF ($aerr_entry['mc_subj']) \t{IF ($err_prv) {$err_str .= ', ';} $err_str .= $_LANG['_MAIL']['CS_FORM_ERR_ERR04']; $err_prv = 1;}\n\t\t\tIF ($aerr_entry['mc_msg']) \t{IF ($err_prv) {$err_str .= ', ';} $err_str .= $_LANG['_MAIL']['CS_FORM_ERR_ERR05']; $err_prv = 1;}\n\t\t\tIF ($aerr_entry['sec_code']) \t{IF ($err_prv) {$err_str .= ', ';} $err_str .= $_LANG['_MAIL']['CS_FORM_ERR_ERR06']; $err_prv = 1;}\n\t \t\t$_cstr .= '<p align=\"center\"><b>'.$err_str.'</b>'.$_nl;\n\t\t}\n\n\t# Check Stage for extra data validation\n\t\tIF ($adata['stage'] == 1) {\n\t\t# Email\n\t\t\tIF ($aerr_entry['err_email_invalid']) {$_err_more .= '<br>'.$_LANG['_MAIL']['CS_FORM_ERR_MSG_01'].$_nl;}\n\n\t\t# Print out more errors\n\t\t\tIF ($_err_more) {$_cstr .= '<b>'.$_err_more.'</b>'.$_nl;}\n\t\t}\n\n\t# Formatting tweak for spacing\n\t\tIF ($aerr_entry['flag'] || $_err_more) {$_cstr .= '<br><br>'.$_nl;}\n\n\t\t$_cstr .= '<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"5\">'.$_nl;\n\n\t# Display othr contact info, if enabled\n\t\tIF ($_UVAR['DISPLAY_ON_CONTACT_FORM']) {\n\t\t\t$_cstr .= '<tr><td>'.$_nl;\n\t\t\t$_cstr .= '<b>'.$_LANG['_MAIL']['CC_FORM_TITLE_MAIL'].'</b><br>';\n\t\t\tIF ($_UVAR['CO_INFO_01_NAME'])\t\t\t\t{$_cstr .= $_sp.$_sp.$_sp.$_UVAR['CO_INFO_01_NAME'].'<br>';}\n\t\t\tIF ($_UVAR['CO_INFO_12_TAGLINE'])\t\t\t\t{$_cstr .= $_sp.$_sp.$_sp.'<i>\"'.$_UVAR['CO_INFO_12_TAGLINE'].'\"</i><br>';}\n\t\t\tIF ($_UVAR['CO_INFO_02_ADDR_01'])\t\t\t\t{$_cstr .= $_sp.$_sp.$_sp.$_UVAR['CO_INFO_02_ADDR_01'].'<br>';}\n\t\t\tIF ($_UVAR['CO_INFO_03_ADDR_02'])\t\t\t\t{$_cstr .= $_sp.$_sp.$_sp.$_UVAR['CO_INFO_03_ADDR_02'].'<br>';}\n\t\t\tIF ($_UVAR['CO_INFO_04_CITY'])\t\t\t\t{$_cstr .= $_sp.$_sp.$_sp.$_UVAR['CO_INFO_04_CITY'].', ';}\n\t\t\tIF ($_UVAR['CO_INFO_05_STATE_PROV'])\t\t\t{$_cstr .= $_sp.$_sp.$_sp.$_UVAR['CO_INFO_05_STATE_PROV'].', ';}\n\t\t\tIF ($_UVAR['CO_INFO_06_POSTAL_CODE'])\t\t\t{$_cstr .= $_sp.$_sp.$_sp.$_UVAR['CO_INFO_06_POSTAL_CODE'].'<br>';}\n\t\t\tIF ($_UVAR['CO_INFO_07_COUNTRY'])\t\t\t\t{$_cstr .= $_sp.$_sp.$_sp.$_UVAR['CO_INFO_07_COUNTRY'].'<br>';}\n\t\t\tIF ($_UVAR['CO_INFO_08_PHONE'] || $_UVAR['CO_INFO_09_FAX'] || $_UVAR['CO_INFO_11_TOLL_FREE'] || $_LANG['_MAIL']['CC_FORM_DATA_TELECOM']) {\n\t\t\t\t$_cstr .= '<br><b>'.$_LANG['_MAIL']['CC_FORM_TITLE_TELECOM'].'</b><br>';\n\t\t\t\tIF ($_UVAR['CO_INFO_08_PHONE'])\t\t\t{$_cstr .= $_sp.$_sp.$_sp.$_LANG['_BASE']['LABEL_PHONE'].' '.$_UVAR['CO_INFO_08_PHONE'].'<br>';}\n\t\t\t\tIF ($_UVAR['CO_INFO_09_FAX'])\t\t\t\t{$_cstr .= $_sp.$_sp.$_sp.$_LANG['_BASE']['LABEL_FAX'].' '.$_UVAR['CO_INFO_09_FAX'].'<br>';}\n\t\t\t\tIF ($_UVAR['CO_INFO_11_TOLL_FREE'])\t\t{$_cstr .= $_sp.$_sp.$_sp.$_LANG['_BASE']['LABEL_TOLL_FREE'].' '.$_UVAR['CO_INFO_11_TOLL_FREE'].'<br>';}\n\t\t\t\tIF ($_LANG['_MAIL']['CC_FORM_DATA_TELECOM']) {$_cstr .= '&nbsp;&nbsp;&nbsp;'.$_LANG['_MAIL']['CC_FORM_DATA_TELECOM'].'</b><br>';}\n\t\t\t}\n\t\t\tIF ($_LANG['_MAIL']['CC_FORM_DATA_OTHER']) {\n\t\t\t\t$_cstr .= '<br><b>'.$_LANG['_MAIL']['CC_FORM_TITLE_OTHER'].'</b><br>';\n\t\t\t\t$_cstr .= '&nbsp;&nbsp;&nbsp;'.$_LANG['_MAIL']['CC_FORM_DATA_OTHER'].'</b><br>';\n\t\t\t}\n\t\t\t$_cstr .= '<br><b>'.$_LANG['_MAIL']['CC_FORM_TITLE_EMAIL'].'</b><br>';\n\t\t\t$_cstr .= '<br></td></tr>';\n\t\t}\n\n\t\t$_cstr .= '<tr><td align=\"center\">'.$_nl;\n\t\t$_cstr .= '<form action=\"mod.php\" method=\"post\" name=\"contact\">'.$_nl;\n\t\t$_cstr .= '<input type=\"hidden\" name=\"mod\" value=\"mail\">'.$_nl;\n\t\t$_cstr .= '<input type=\"hidden\" name=\"mode\" value=\"contact\">'.$_nl;\n\t\t$_cstr .= '<table width=\"100%\" cellspacing=\"0\" cellpadding=\"5\" border=\"0\">'.$_nl;\n\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left.$_nl;\n\t\t$_cstr .= '<b>'.$_LANG['_MAIL']['l_To'].$_sp.'</b>'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t$_cstr .= do_select_list_mail_contacts('mc_id', $adata['mc_id'], 1);\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= '</tr>'.$_nl;\n\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left.$_nl;\n\t\t$_cstr .= '<b>'.$_LANG['_MAIL']['l_Name'].$_sp.'</b>'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t$_cstr .= '<INPUT class=\"PSML_NL\" TYPE=TEXT name=\"mc_name\" size=\"30\" maxlength=\"50\" value=\"'.htmlspecialchars($adata['mc_name']).'\">'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= '</tr>'.$_nl;\n\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left.$_nl;\n\t\t$_cstr .= '<b>'.$_LANG['_MAIL']['l_Email'].$_sp.'</b>'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t$_cstr .= '<INPUT class=\"PSML_NL\" TYPE=TEXT name=\"mc_email\" size=\"30\" maxlength=\"50\" value=\"'.htmlspecialchars($adata['mc_email']).'\">'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= '</tr>'.$_nl;\n\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left.$_nl;\n\t\t$_cstr .= '<b>'.$_LANG['_MAIL']['l_Subject'].$_sp.'</b>'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t$_cstr .= '<INPUT class=\"PSML_NL\" TYPE=TEXT name=\"mc_subj\" size=\"30\" maxlength=\"50\" value=\"'.htmlspecialchars($adata['mc_subj']).'\">'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= '</tr>'.$_nl;\n\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left_vtop.$_nl;\n\t\t$_cstr .= '<b>'.$_LANG['_MAIL']['l_Message'].$_sp.'</b>'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\tIF ($_CCFG['WYSIWYG_OPEN']) {$_cols = 120;} ELSE {$_cols = 80;}\n\t\t$_cstr .= '<TEXTAREA class=\"PSML_NL\" NAME=\"mc_msg\" COLS=\"'.$_cols.'\" ROWS=\"15\">'.$adata['mc_msg'].'</TEXTAREA>'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= '</tr>'.$_nl;\n\n\t# Captcha if \"GD\" is loaded\n\t\tIF (extension_loaded('gd') && file_exists(PKG_PATH_ADDONS.'captcha')) {\n\t\t\t$_cstr .= '<tr>'.$_nl;\n\t\t\t$_cstr .= $_td_str_left_vtop.$_sp.'</td>'.$_nl;\n\t\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t\t$_cstr .= $_LANG['_MAIL']['SC_Instruct'].$_nl;\n\t\t\t$_cstr .= '</td>'.$_nl;\n\t\t\t$_cstr .= '</tr>'.$_nl;\n\t\t\t$_cstr .= '<tr>'.$_nl;\n\t\t\t$_cstr .= $_td_str_left_vtop.$_sp.'</td>'.$_nl;\n\t\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t\t$_cstr .= '<img src=\"'.PKG_URL_ADDONS.'captcha/CaptchaSecurityImages.php\">'.$_nl;\n\t\t\t$_cstr .= '</td>'.$_nl;\n\t\t\t$_cstr .= '</tr>'.$_nl;\n\t\t\t$_cstr .= '<tr>'.$_nl;\n\t\t\t$_cstr .= $_td_str_left_vtop.$_nl;\n\t\t\t$_cstr .= '<b>'.$_LANG['_MAIL']['l_Security_Code'].$_sp.'</b>'.$_nl;\n\t\t\t$_cstr .= '</td>'.$_nl;\n\t\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t\t$_cstr .= '<input class=\"PSML_NL\" id=\"security_code\" name=\"security_code\" type=\"text\" value=\"'.htmlspecialchars($adata['security_code']).'\">'.$_nl;\n\t\t\t$_cstr .= '</td>'.$_nl;\n\t\t\t$_cstr .= '</tr>'.$_nl;\n\t\t}\n\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left.$_nl;\n\t\t$_cstr .= '<INPUT TYPE=hidden name=\"stage\" value=\"1\">'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t$_cstr .= do_input_button_class_sw('b_email', 'SUBMIT', $_LANG['_MAIL']['B_Send_Email'], 'button_form_h', 'button_form', '1').$_nl;\n\t\t$_cstr .= do_input_button_class_sw('b_reset', 'RESET', $_LANG['_MAIL']['B_Reset'], 'button_form_h', 'button_form', '1').$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\n\t\t$_cstr .= '</tr>'.$_nl;\n\t\t$_cstr .= '</table>'.$_nl;\n\t\t$_cstr .= '</form>'.$_nl;\n\t\t$_cstr .= '</td></tr>'.$_nl;\n\t\t$_cstr .= '</table>'.$_nl;\n\n\t\t$_mstr_flag\t= 0;\n\t\t$_mstr \t\t= ''.$_nl;\n\n\t# Call block it function\n\t\t$_out .= do_mod_block_it($_tstr, $_cstr, $_mstr_flag, $_mstr, '1');\n\t\t$_out .= '<br>'.$_nl;\n\n\t# Return / Echo Final Output\n\t\tIF ($aret_flag) {return $_out;} ELSE {echo $_out;}\n}", "function progressive_webform_email($variables) {\r\n _form_set_class($variables['element'], array('form-control'));\r\n return theme_webform_email($variables);\r\n}", "function mailer() {\n\t\tJRequest::checkToken() or die( JText::_( 'Invalid Token' ) );\n\t\t$email = JRequest::getVar('email');\n\t\t$title = JRequest::getVar('title');\n\t\t$from = array($email, $title);\n\t\t// set emailadres from the site\n\t\t$config =&JFactory::getConfig();\n\t\t// Get some variables from the component options\n\t\t$app = JFactory::getApplication('site');\n\t\t$componentParams = $app->getParams('com_mdcontact');\n\t\t$email_to = $componentParams->get('email_to');\n\t\t$subject = $componentParams->get('subject');\n\t\t$to = array($email_to, $email_to );\n\t\t// Set some variables for the email message\n\t\t$copy = JRequest::getVar('copy');;\n\t\t$body = JRequest::getVar('description');;\n\t\n\t\t// Invoke JMail Class\n\t\t$mailer = JFactory::getMailer();\n\t\n\t\t// Set sender array so that my name will show up neatly in your inbox\n\t\t$mailer->setSender($from);\n\t\t$mailer->addRecipient($to);\n\t\t// Set cc if copy is checked\n\t\tif ($copy=='1'){\n\t\t\t$mailer->addCC($from);\n\t\t\t}\n\t\t$mailer->setSubject($subject);\n\t\t$mailer->setBody($body);\n\t\t$send = $mailer->Send();\n\t\t// set the redirect page\n\t\t$redirect = JRoute::_('index.php?option=com_mdcontact&view=contact&task=add');\n\t\tif ( $send !== true ) {\n\t\t\tJFactory::getApplication()->enqueueMessage('Your message is not send, please try again later', 'error');\n\t\t\t$this->setRedirect( $redirect);\n\t\t} else {\n\t\tparent::apply();\n\t}\n\t}", "public function contactUs($full_name,$email,$phone,$subject,$message,$site_email)\n\t{\n\t\t$full_name = $this->secureInput($full_name);\n\t\t$email = $this->secureInput($email);\n\t\t$phone = $this->secureInput($phone);\n\t\t$subject = $this->secureInput($subject);\n\t\t$message = $this->secureInput($message);\n\t\t$site_email = $this->secureInput($site_email);\n\n\t\t$contact_date = date(\"l, M j, Y, g:i a\");\n\n\t\t$sql = \"INSERT INTO contact_us ( full_name, email, phone, subject, message, reply,contact_date)\n VALUES ('\".$full_name.\"','\".$email.\"','\".$phone.\"', '\".$subject.\"','\".$message.\"','','\".$contact_date.\"')\";\n\t\t$res = $this->processSql($sql);\n\t\tif($res){\n\t\t\t//build email to be sent\n\t\t\t$to = $site_email;\n\t\t\t$subject = \"New message from \".$email;\n\n\t\t\t$admin_message = \"\n\t\t\t<html>\n\t\t\t<head>\n\t\t\t<title>New message from\".$full_name.\"</title>\n\t\t\t</head>\n\t\t\t<body>\n\t\t\t<h3>Query / Comment</h3>\n\t\t\t<p>Hello Site Admin, \".$full_name.\" has sent a query/message. It is as below:</p>\n\t\t\t<p>\".$message.\"</p>\n\t\t\t</body>\n\t\t\t</html>\n\t\t\t\";\n\n\t\t\t// To send HTML mail, the Content-type header must be set\n\t\t\t$headers = \"MIME-Version: 1.0\\r\\n\";\n\t\t\t$headers .= \"Content-type: text/html; charset=iso-8859-1\\r\\n\";\n\t\t\t$headers .= \"From: '\".$full_name.\"'<\".$email.\">\" . \"\\r\\n\";//Modified By GENTLE to show the FROM in the message\n\n\t\t\t$mail_send = mail($to, $subject, $admin_message, $headers );\n\t\t\tif ($mail_send):\n\t\t\treturn 99;\n else:\n return 2;\n endif;\n\t\t\t}else{\n\t\t\treturn 1;\n\t\t}\n\t}", "public function UpdateEmail()\n\t\t{\n\t\t\tif (!$this->HasPermission()) {\n\t\t\t\t$this->NoPermission();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$from = trim($_POST['fromemail']);\n\t\t\t$to = trim($_POST['toemail']);\n\n\t\t\t$update = array (\n\t\t\t\t'orders' => array (\n\t\t\t\t\t'ordbillemail',\n\t\t\t\t\t'ordshipemail',\n\t\t\t\t),\n\t\t\t\t'customers' => array (\n\t\t\t\t\t'custconemail',\n\t\t\t\t),\n\t\t\t\t'subscribers' => array (\n\t\t\t\t\t'subemail',\n\t\t\t\t),\n\t\t\t);\n\t\t\t$recordsUpdated = 0;\n\n\t\t\tforeach ($update as $table => $fields) {\n\t\t\t\tforeach ($fields as $field) {\n\t\t\t\t\t$updateData = array (\n\t\t\t\t\t\t$field => $to\n\t\t\t\t\t);\n\t\t\t\t\t$restriction = $field .\"='\".$GLOBALS['ISC_CLASS_DB']->Quote($from).\"'\";\n\t\t\t\t\t$GLOBALS['ISC_CLASS_DB']->UpdateQuery($table, $updateData, $restriction);\n\t\t\t\t\t$recordsUpdated += $GLOBALS['ISC_CLASS_DB']->NumAffected();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($recordsUpdated > 1) {\n\t\t\t\t$message = sprintf(GetLang('EmailCheckNumUpdatedPlural'), $recordsUpdated);\n\t\t\t\t$status = MSG_SUCCESS;\n\t\t\t} elseif ($recordsUpdated == 1) {\n\t\t\t\t$message = sprintf(GetLang('EmailCheckNumUpdatedSingular'), $recordsUpdated);\n\t\t\t\t$status = MSG_SUCCESS;\n\t\t\t} else {\n\t\t\t\t$message = GetLang('EmailCheckNoneUpdated');\n\t\t\t\t$status = MSG_ERROR;\n\t\t\t}\n\n\t\t\tFlashMessage($message, $status, 'index.php?ToDo=runAddon&addon=addon_emailchange');\n\t\t}", "function do_contact_supplier_email_all($adata, $aret_flag=0) {\n\t# Dim Some Vars\n\t\tglobal $_CCFG, $_TCFG, $_DBCFG, $db_coin, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp;\n\t\t$DesiredGroup\t= 0;\n\t\t$DesiredServer\t= 0;\n\t\t$DesiredAlias\t= 0;\n\t\t$DesiredClient\t= 0;\n\t\t$_ret_msg\t\t= '';\n\n\t# Check if we are sending to an alias for a supplier\n\t\t$pos1 = strpos(strtolower($adata['cc_s_id']), 'alias');\n\t\tIF ($pos1 !== false) {\n\t\t\t$pieces = explode('|', $adata['cc_s_id']);\n\t\t\t$DesiredAlias = $pieces[1];\n\t\t}\n\n\t# Check if we are sending to all contacts for a supplier\n\t\t$pos2 = strpos(strtolower($adata['cc_s_id']), 'contacts');\n\t\tIF ($pos2 !== false) {\n\t\t\t$pieces = explode('|', $adata['cc_s_id']);\n\t\t\t$DesiredSupplier = $pieces[1];\n\t\t}\n\n\t# Get site contact information array\n\t\t$_mcinfo\t= get_contact_info($adata['cc_mc_id']);\n\n\t# Set Query for select\n\t\t$query\t= 'SELECT ';\n\n\t\tIF ($DesiredAlias) {\n\t\t\t$query .= $_DBCFG['suppliers_contacts'].'.contacts_email, ';\n\t\t\t$query .= $_DBCFG['suppliers_contacts'].'.contacts_name_first, ';\n\t\t\t$query .= $_DBCFG['suppliers_contacts'].'.contacts_name_last';\n\t\t} ELSEIF ($DesiredSupplier) {\n\t\t\t$query .= $_DBCFG['suppliers'].'.s_email, ';\n\t\t\t$query .= $_DBCFG['suppliers'].'.s_name_first, ';\n\t\t\t$query .= $_DBCFG['suppliers'].'.s_name_last, ';\n\t\t\t$query .= $_DBCFG['suppliers_contacts'].'.contacts_email, ';\n\t\t\t$query .= $_DBCFG['suppliers_contacts'].'.contacts_name_first, ';\n\t\t\t$query .= $_DBCFG['suppliers_contacts'].'.contacts_name_last';\n\t\t} ELSE {\n\t\t\t$query .= $_DBCFG['suppliers'].'.s_email, ';\n\t\t\t$query .= $_DBCFG['suppliers'].'.s_name_first, ';\n\t\t\t$query .= $_DBCFG['suppliers'].'.s_name_last';\n\t\t}\n\n\t\t$query .= ' FROM ';\n\n\t\tIF ($DesiredAlias) {\n\t\t\t$query .= $_DBCFG['suppliers_contacts'];\n\t\t\t$query .= ' WHERE ('.$_DBCFG['suppliers_contacts'].'.contacts_id='.$DesiredAlias.')';\n\n\t\t} ELSEIF ($DesiredSupplier) {\n\t\t\t$query .= $_DBCFG['suppliers'].', '.$_DBCFG['suppliers_contacts'];\n\t\t\t$query .= ' WHERE (';\n\t\t\t$query .= $_DBCFG['suppliers'].'.s_id='.$DesiredSupplier.' OR (';\n\t\t\t$query .= $_DBCFG['suppliers'].'.s_id='.$_DBCFG['suppliers_contacts'].'.contacts_s_id AND ';\n\t\t\t$query .= $_DBCFG['suppliers_contacts'].'.contacts_s_id='.$DesiredSupplier.')';\n\t\t\t$query .= ')';\n\n\t\t} ELSEIF ($adata['cc_s_id'] == '-1') {\n\t\t\t$query .= $_DBCFG['suppliers'];\n\t\t\t$query .= \" WHERE s_status='active' OR s_status='\".$db_coin->db_sanitize_data($_CCFG['S_STATUS'][1]).\"'\";\n\n\t\t} ELSE {\n\t\t\t$query .= $_DBCFG['suppliers'];\n\t\t\t$query .= ' WHERE ('.$_DBCFG['suppliers'].'.s_id='.$adata['cc_s_id'].')';\n\t\t}\n\n\t# Do select\n\t\t$result\t\t= $db_coin->db_query_execute($query);\n\t\t$numrows\t\t= $db_coin->db_query_numrows($result);\n\t\t$_emails_sent\t= 0;\n\t\t$_emails_error\t= 0;\n\t\t$_sento\t\t= '';\n\n\t# Process query results\n\t\twhile($row = $db_coin->db_fetch_array($result)) {\n\n\t\t# Only send email if an address exists\n\t\t\tIF ($row['contacts_email'] || $row['s_email']) {\n\n\t\t\t# Loop all suppliers and send email\n\t\t\t# Set eMail Parameters (pre-eval template, some used in template)\n\t\t\t\tIF ($_CCFG['_PKG_SAFE_EMAIL_ADDRESS']) {\n\t\t\t\t\t$mail['recip']\t\t= $row['contacts_email'] ? $row['contacts_email'] : $row['s_email'];\n\t\t\t\t\t$mail['from']\t\t= $_mcinfo['c_email'];\n\t\t\t\t} ELSE {\n\t\t\t\t\t$mail['recip']\t\t= $row['contacts_name_first'] ? $row['contacts_name_first'] : $row['s_name_first'];\n\t\t\t\t\t$mail['recip']\t\t.= ' ';\n\t\t\t\t\t$mail['recip']\t\t.= $row['contacts_name_last'] ? $row['contacts_name_last'] : $row['s_name_last'];\n\t\t\t\t\t$mail['recip']\t\t.= ' <';\n\t\t\t\t\t$mail['recip']\t\t.= $row['contacts_email'] ? $row['contacts_email'] : $row['s_email'];\n\t\t\t\t\t$mail['recip']\t\t.= '>';\n\t\t\t\t\t$mail['from']\t\t= $_mcinfo['c_name'].' <'.$_mcinfo['c_email'].'>';\n\t\t\t\t}\n\t\t\t\t#\t$mail['cc']\t\t= $_mcinfo['c_name'].' <'.$_mcinfo['c_email'].'>';\n\n\t\t\t\tIF ($_CCFG['MAIL_USE_CUSTOM_SUBJECT']) {\n\t\t\t\t\t$mail['subject']\t= $adata['cc_subj'];\n\t\t\t\t} ELSE {\n\t\t\t\t\t$mail['subject']\t= $_CCFG['_PKG_NAME_SHORT'].$_LANG['_MAIL']['CC_FORM_SUBJECT_PRE'];\n\t\t\t\t}\n\n\t\t\t# Set MTP (Mail Template Parameters) array\n\t\t\t\t$_MTP['to_name']\t = $row['contacts_name_first'] ? $row['contacts_name_first'] : $row['s_name_first'];\n\t\t\t\t$_MTP['to_name']\t.= ' ';\n\t\t\t\t$_MTP['to_name']\t.= $row['contacts_name_last'] ? $row['contacts_name_last'] : $row['s_name_last'];\n\t\t\t\t$_MTP['to_email']\t = $row['contacts_email'] ? $row['contacts_email'] : $row['s_email'];\n\t\t\t\t$_MTP['from_name']\t = $_mcinfo['c_name'];\n\t\t\t\t$_MTP['from_email']\t = $_mcinfo['c_email'];\n\t\t\t\t$_MTP['subject']\t = $adata['cc_subj'];\n\t\t\t\t$_MTP['message']\t = $adata['cc_msg'];\n\t\t\t\t$_MTP['site']\t\t = $_CCFG['_PKG_NAME_SHORT'];\n\n\t\t\t# Load message template (processed)\n\t\t\t\t$mail['message']\t= get_mail_template('email_contact_supplier_form', $_MTP);\n\n\t\t\t# Call basic email function (ret=1 on error)\n\t\t\t\t$_ret = do_mail_basic($mail);\n\n\t\t\t# Show what was sent\n\t\t\t\t$_sento .= htmlspecialchars($mail['recip']).'<br>';\n\n\t\t\t# Check return\n\t\t\t\tIF ($_ret) {$_emails_error++;} ELSE {$_emails_sent++;}\n\t\t\t}\n\t\t}\n\n\t# Build Title String, Content String, and Footer Menu String\n\t\t$_tstr = $_LANG['_MAIL']['CC_FORM_RESULT_TITLE'];\n\n\t\t$_cstr .= '<center>'.$_nl;\n\t\t$_cstr .= '<table cellpadding=\"5\">'.$_nl;\n\t\t$_cstr .= '<tr><td class=\"TP5MED_NL\">'.$_nl;\n\t\tIF ($_emails_error) {\n\t\t\t$_cstr .= $_LANG['_MAIL']['CC_FORM_MSG_02_L1'];\n\t\t\t$_cstr .= '<br>'.$_LANG['_MAIL']['CC_FORM_MSG_02_L2'];\n\t\t} ELSE {\n\t\t\t$_cstr .= $_LANG['_MAIL']['CC_FORM_MSG_04_L1'];\n\t\t}\n\t\t$_cstr .= '<br>'.$_LANG['_MAIL']['total'].':'.$_sp.$_emails_sent.$_sp.$_LANG['_MAIL']['sent'];\n\t\t$_cstr .= '<br><br>'.$_sento;\n\t\t$_cstr .= '</td></tr>'.$_nl;\n\t\t$_cstr .= '</table>'.$_nl;\n\t\t$_cstr .= '</center>'.$_nl;\n\n\t\t$_mstr_flag\t= 0;\n\t\t$_mstr\t\t= '&nbsp;'.$_nl;\n\n\t# Call block it function\n\t\t$_out .= do_mod_block_it($_tstr, $_cstr, $_mstr_flag, $_mstr, '1');\n\t\t$_out .= '<br>'.$_nl;\n\n\t\tIF ($aret_flag) {return $_out;} ELSE {echo $_out;}\n}", "function edd_pup_send_test_email() {\n\t$form = array();\n\tparse_str( $_POST['form'], $form );\n\n\tif ( empty( $form['edd-pup-test-nonce'] ) || ! wp_verify_nonce( $form['edd-pup-test-nonce'], 'edd-pup-send-test-email' ) ) {\n\t\t_e( 'Nonce failure. Invalid response from server when trying to send test email. Please try again or contact support.', 'edd-pup');\n\t\tdie();\n\t}\n\n\n\t$error = 0;\n\n\tif ( empty( $form['test-email'] ) ) {\n\t\t_e( 'Please enter an email address to send the test to.', 'edd-pup' );\n\t} else {\n\n\t\t$emails = explode( ',', $form['test-email'], 6 );\n\n\t\tif ( count( $emails ) > 5 ) {\n\t\t\tarray_pop( $emails );\n\t\t}\n\n\t\t// Sanitize our email addresses to make sure they're valid\n\t\tforeach ( $emails as $key => $address ) {\n\t\t\t$clean = sanitize_email( $address );\n\n\t\t\tif ( is_email( $clean ) ) {\n\t\t\t\t$to[$key] = $clean;\n\t\t\t} else {\n\t\t\t\t$error++;\n\t\t\t}\n\t\t}\n\n\t\tif ( !empty( $to ) ) {\n\t\t\t$email_id = edd_pup_sanitize_save( $_POST );\n\n\t\t\t// Set transient for custom tags in test email\n\t\t\tset_transient( 'edd_pup_preview_email_'. get_current_user_id(), $email_id, 60 );\n\n\t\t\t// Send a test email\n\t \t$sent = edd_pup_test_email( $email_id, $to );\n\n\t\t\t// Instruct browser to redirect for continued editing of email\n\t\t\tparse_str( $_POST['url'], $url );\n\t\t\tif ( $url['view'] == 'add_pup_email' ) {\n\t\t\t\techo absint( $email_id );\n\t\t\t\tdie();\n\t\t\t}\n\n\t \tif ( $error > 0 ) {\n\t\t\t\t_e( 'One or more of the emails entered were invalid. Test emails sent to: ' . implode(', ', $sent), 'edd-pup' );\n\t \t} else {\n\n\t\t\t\t_e( 'Test email sent to: ' . implode(', ', $sent), 'edd-pup' );\n\t\t\t}\n\n\t\t} else if ( empty( $to ) && $error > 0 ) {\n\t\t\t_e( 'Your email address was invalid. Please enter a valid email address to send the test.', 'edd-pup' );\n\t\t}\n\n\t}\n\n die();\n}", "function Users_user_updateemail()\n{\n if (!pnUserLoggedIn()) {\n return LogUtil::registerPermissionError();\n }\n\n if (!SecurityUtil::confirmAuthKey('Users')) {\n return LogUtil::registerAuthidError(pnModUrl('Users', 'user', 'changeemail'));\n }\n\n $uservars = pnModGetVar('Users');\n if ($uservars['changeemail'] <> 1) {\n return pnRedirect('Users', 'user', 'main');\n }\n\n $newemail = FormUtil::getPassedValue('newemail', '', 'POST');\n\n $checkuser = pnModAPIFunc('Users', 'user', 'checkuser',\n array('uname' => pnUserGetVar('uname'),\n 'email' => $newemail,\n 'agreetoterms' => true));\n\n // check email related errors only\n if (in_array($checkuser, array(-1, 2, 9, 11, 12))) {\n switch($checkuser)\n {\n case -1:\n $message = __('Sorry! You have not been granted access to this module.');\n break;\n case 2:\n $message = __('Sorry! The e-mail address you entered was incorrectly formatted or is unacceptable for other reasons. Please correct your entry and try again.');\n break;\n case 9:\n $message = __('Sorry! This e-mail address has already been registered, and it cannot be used again for creating another account.');\n break;\n case 11:\n $message = __('Sorry! Your user agent is not accepted for registering an account on this site.');\n break;\n case 12:\n $message = __('Sorry! E-mail addresses from the domain you entered are not accepted for registering an account on this site.');\n break;\n default:\n $message = __('Sorry! You have not been granted access to this module.');\n } // switch\n return LogUtil::registerError($message, null, pnModURL('Users', 'user', 'changeemail'));\n }\n\n // set the new email\n pnUserSetVar('email', $newemail);\n\n LogUtil::registerStatus(__('Done! Saved your e-mail address.'));\n return pnRedirect(pnModURL('Users', 'user', 'main'));\n}", "function createEmail($from_email, $from_name, $id_user) {\n $result = $this->getNewEmailId($id_user); //Contiene le email dell'utente con data a null\n if (mysql_num_rows($result) > 0) {//Se vi sono email pregresse ritorna la lista delle email pregresse\n return $result;\n }\n if ($this->connectToMySql()) {\n $query = sprintf(\"INSERT INTO scuola.email_store(from_email, from_name, id_user, subject, body) VALUES ('%s','%s', '%s', '<NO SUBJECT>', '<NO BODY>')\", $from_email, $from_name, $id_user);\n\n // Perform Query\n $result = mysql_query($query);\n if (!$result) {\n setcookie('message', mysql_error());\n }//else\n //setcookie('message','Creata nuova Email');\n }\n $this->closeConnection();\n return $result;\n }", "function info2()\r\n {\r\n //and send user to orderForm2\r\n if($_SERVER['REQUEST_METHOD'] == 'POST')\r\n {\r\n $userMail = $_POST['email'];\r\n $userSeeking = $_POST['seeking'];\r\n $userBio = $_POST['bio'];\r\n $userState = $_POST['state'];\r\n\r\n if(validEmail($_POST['email'])) {\r\n $_SESSION['dating']->setEmail($userMail);\r\n }\r\n //Otherwise, set an error variable in the hive\r\n else {\r\n $this->_f3->set('errors[\"email\"]', 'Please enter a valid Email');\r\n }\r\n\r\n $_SESSION['dating']->setSeeking($userSeeking);\r\n $_SESSION['dating']->setBio($userBio);\r\n $_SESSION['dating']->setState($userState);\r\n\r\n if (empty($this->_f3->get('errors'))) {\r\n header('location: info3');\r\n }\r\n }\r\n\r\n $this->_f3->set('userMail', $userMail);\r\n\r\n\r\n\r\n $view = new Template();\r\n echo $view->render('views/info2.html');\r\n }", "private function testEmail(){\n $this->user_panel->checkSecurity();\n $this->mail_handler->testEmailFunction();\n }", "private function generateEmail($intermediair) {\n $this->smarty->assign('user', $intermediair);\n $q = 'SELECT * FROM `Useridemail` WHERE id = ' . $intermediair['userid'];\n $data = $this->cmsmanager->customSelectQuery($q)[0];\n $token = $this->generateToken($data['email'], $user['userid'], $user['refCode']);\n $this->smarty->assign('token', $token);\n $email = new GezinneninArmoedeEmail();\n $email->addReceiver('[email protected]');\n// //$email->addReceiver($data['email']);\n $email->setSubject('Activiteit 2020');\n $email->setHtmlBody($this->smarty->fetch(\"intermediairFormEmail.html\"));\n $email->setSender(\"[email protected]\");\n $email->send();\n }", "protected function sendTestMail() {}", "function getFieldEmailAddress($value = null){\n\t\t$form_ret = '';\n\t\t$dataField = get_option('axceleratelink_srms_opt_emailAddress');\n\t\t$dataTitle = get_option('axceleratelink_srms_opt_tit_emailAddress');\n\t\t$message = get_option('axceleratelink_set_emailadd_msg');\n\t\t$tooltip = setToolTipNotification('email');\n\t\tif ($dataField == 'true'){\n\t\t\t$form_ret .= \"</br><label>\".$dataTitle.\"<span class='red'>*</span>\".$tooltip.\"</label><br><input type='text' name='emailAddress' value='\".$value.\"' class='' id='email' data-value='\".($message ? $message : '').\"'></br><div id='email_err_con'></div><div id='email_label'></div>\";\t\t\n\t\t\t$form_ret .= \"<div class='email-massage'></div>\";\n\t\t}\n\t\treturn $form_ret;\n\t}", "function email_revalidate_user_settings_save() {\n\t$email = get_input('email');\n\t$user_id = get_input('guid');\n\n\tif (!$user_id) {\n\t\t$user = elgg_get_logged_in_user_entity();\n\t} else {\n\t\t$user = get_entity($user_id);\n\t}\n\n\tif (!is_email_address($email)) {\n\t\tregister_error(elgg_echo('email:save:fail'));\n\t\treturn false;\n\t}\n\n\tif ($user) {\n\t\tif (strcmp($email, $user->email) != 0) {\n\t\t\tif (!get_user_by_email($email)) {\n\t\t\t\t$user->new_email = $email;\n\t\t\t\tset_input('email', $user->email);\n\t\t\t\temail_revalidate_request_validation($user->guid);\n\t\t\t} else {\n\t\t\t\tregister_error(elgg_echo('registration:dupeemail'));\n\t\t\t}\n\t\t} else {\n\t\t\tunset($user->new_email);\n\t\t\treturn null;\n\t\t}\n\t} else {\n\t\tregister_error(elgg_echo('email:save:fail'));\n\t}\n\treturn false;\n}", "function enviar_contacto(){\n $this->asignar_ingreso();\n $nombre_sede = $this->sede;\n\n $resultado = $this->datoSede($nombre_sede);\n $cuerpo =\"<img src='http://prevaler.diazcreativos.net.ve/imagenes/PREVALER.png' /><br /><br />\n\t\t<u>Datos de Entrada:</u><br />\";\n $cuerpo .=\"<br />\";\n $cuerpo .= \"<strong>Nombre Completo: </strong>\".utf8_decode($this->nombre).\"<br />\" ;\n $cuerpo .= \"<strong>Número de telefono: </strong>\".$this->telefono.\"<br />\" ;\n $cuerpo .= \"<strong>E-mail: </strong>\".$this->email.\"<br />\" ;\n $cuerpo .= \"<strong>Mensaje: </strong>\".$this->comentario.\"<br />\";\n $cuerpo .= \"<br />\";\n $cuerpo .= \"---- Fin ----\";\n $cuerpo .= \"<br />\";\n $subject= \"Contacto Web Prevaler\";\n $subject2= \"Contacto Web Prevaler\";\n $basemailfor=$resultado['email_sede'];\n //$basemailfor=\"[email protected]\";\n $basemailfrom = $this->email;\n $respuesta =\"<img src='http://prevaler.diazcreativos.net.ve/imagenes/PREVALER.png' /><br />\n\t\t<strong>Saludos Sr(a).: $this->nombre $this->apellido</strong><br /><br />\n\t\tNosotros hemos recibido su mensaje, nuestro departamento de atención al cliente le responderá lo más pronto posible<br />\n\t\tGracias por contactar a Prevaler.<br />\n\t\tPrevaler<br /><br />\n\t\tTel&eacute;fonos: <br/>\n\t\t\".$resultado['telefono_sede'].\"<br />\n\t\tTwitter: <a href='https://twitter.com/Prevaler_VE'>@Prevaler_VE</a><br />\n\t\tInstagram: <a href='https://www.instagram.com/prevaler_ve/'>@prevaler_ve</a><br />\n\t\t\".$resultado['email_sede'].\"\n\t\t<br /><br />\n\t\tAtentamente,<br />\n\t\tClínica Prevaler.\";\n $this->mensaje=\"<strong>&iexcl;Excelente!</strong> Su Mensaje ha sido enviado exitosamente.\";\n\n $mail = new PHPMailer();\n $mail->From = $basemailfrom;\n $mail->FromName = utf8_decode($subject);\n $mail->AddAddress($basemailfor, $this->nombre.\" \".$this->apellido);\n $mail->Subject = utf8_decode($subject);\n $mail->Body = $cuerpo;\n $mail->AltBody = $cuerpo;\n $exito = $mail->Send();\n\n $mail2 = new PHPMailer();\n $mail2->From = $basemailfor;\n $mail2->FromName = utf8_decode($subject2);\n $mail2->AddAddress($basemailfrom, $this->nombre.\" \".$this->apellido);\n $mail2->Subject = utf8_decode($subject2);\n $mail2->Body = $respuesta;\n $mail2->AltBody = $respuesta;\n $exito = $mail2->Send();\n }", "function mailUser($email) {\n\t//echo \"mail user <br>\";\n\t$mail = getSocksMailer();\n\t$mail->Subject = \"Litesprite Survey Completed\";\n\t$mail->AddEmbeddedImage('../images/paw.png', 'paw');\n\t$mail->msgHTML(file_get_contents('../emails/postSurvey.html'), dirname(__FILE__));\n\t$mail->AddAddress($email);\n\tsendMail($mail);\n}", "function daily_update_property_email(){\n\t\t$meta_post = $this->InteractModal->get_update_post_meta();\n\t\tif(!empty($meta_post)){\n\t\t\t$data = array();\n\t\t\tforeach($meta_post as $meta_details){\n\t\t\t\t$user_id = $this->InteractModal->get_post_meta($meta_details['post_id'],'initiator_id');\n\t\t\t\t$data[$user_id][]= $meta_details['meta_key'];\n\t\t\t}\n\t\t}\t\t\n\t\t$get_data=$this->InteractModal->get_today_data();\n\t\t$id=2;\n\t\tif(!empty($get_data)){\n\t\t\t$result = array();\n\t\t\tforeach ($get_data as $element) {\n\t\t\t\t$result[$element['user_id']][]= $element['task_type'];\n\t\t\t}\n\t\t\tif(!empty($data) && (!empty($result))){\n\t\t\t\t$results = array_merge($data,$result);\n\t\t\t}\n\t\t\t$user_id= '';\n\t\t\tif(!empty($results)){\n\t\t\t\tforeach($result as $user_id=>$value):\n\t\t\t\t\t$update_details='';\n\t\t\t\t\t$value = array_unique($value);\n\t\t\t\t\tforeach($value as $values):\t\t\t\t\t\t\n\t\t\t\t\t\t$update_details=$update_details.'Today '.ucwords($values).' Successfully.<br>';\n\t\t\t\t\tendforeach;\n\t\t\t\t\tif(!empty($user_id)){\n\t\t\t\t\t\t$where = array( 'id' =>$user_id);\n\t\t\t\t\t\t$user_data=$this->InteractModal->single_field_value('users',$where);\n\t\t\t\t\t\techo $email= $user_data[0]['user_email'];\n\t\t\t\t\t\techo \"<br>\";\n\t\t\t\t\t\t$company_id = $this->InteractModal->get_user_meta( $user_id, 'company_id');\n\t\t\t\t\t\t///get auto email content data \n\t\t\t\t\t\t$status_template = $this->InteractModal->get_user_meta( $company_id, 'status_template_id_'.$id );\n\t\t\t\t\t\tif(($status_template ==1)){\n\t\t\t\t\t\t\t$subject = $this->InteractModal->get_user_meta( $company_id, 'subject_template_id_'.$id );\n\t\t\t\t\t\t\t$content = $this->InteractModal->get_user_meta( $company_id, 'content_template_id_'.$id );\n\t\t\t\t\t\t\t$user_name = $this->InteractModal->get_user_meta( $user_id, 'concerned_person');\n\t\t\t\t\t\t\t$phone_number = $this->InteractModal->get_user_meta( $user_id, 'phone_number');\n\t\t\t\t\t\t\t$logo_content = '<img src=\"'.base_url().'/assets/img/profiles/logo_(2).png\" height=\"auto\" width=\"100\" alt=\"Logo\">'; \t\t\t\t\t\t\n\t\t\t\t\t\t\t$content=nl2br($content);\n\t\t\t\t\t\t\t$content = str_replace(\"_NAME_\",$user_name,$content);\n\t\t\t\t\t\t\t$content = str_replace(\"_PHONE_\",$phone_number,$content);\n\t\t\t\t\t\t\t$content = str_replace(\"_EMAIL_\",$email,$content);\n\t\t\t\t\t\t\t$content = str_replace(\"_LOGO_\",$logo_content,$content);\n\t\t\t\t\t\t\t$content = str_replace(\"_DATE_\",date('d-F-Y'),$content);\n\t\t\t\t\t\t\t$content = $content.'<br>'.$update_details;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$template_list = $this->InteractModal->get_email_template($id);\n\t\t\t\t\t\t\tforeach( $template_list as $template_lists ):\n\t\t\t\t\t\t\t\t$subject = $template_lists['subject']; \n\t\t\t\t\t\t\t\t$content = $update_details; \n\t\t\t\t\t\t\tendforeach;\t\t\t\t\n\t\t\t\t\t\t}\t\t\t\t\n\t\t\t\t\t\t///get auto email content data \t\t\t\t\n\t\t\t\t\t\t$email_data = array('email' => $email,\n\t\t\t\t\t\t\t'content' => $content,\n\t\t\t\t\t\t\t'subject' => $subject\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$this->send_email($email_data);\n\t\t\t\t\t} \n\t\t\t\tendforeach;\n\t\t\t}\n\t\t}\n\t}", "function send_contact_email($to, $data) {\n\n\t\t\t\t$from = $data['contact_email'];\n\t\t\t\t$subject = \"Contact From Website: \".$data['contact_name'] . \" - \";\n\t\t\t\t$subject .= $data['contact_subject'];\n\n\t\t\t/*\t$msg = $this->mailHeader;\n\t\t\t\t$msg .= $data['contact_message'];\n\t\t\t\t$msg .= $this->mailFooter;*/\n\n\t\t\t\t$res = $this->settings_model->get_contact_page_details();\n\t\t\t\t$contact_phone = $res[0]->contact_phone;\n\t\t\t\t$contact_email = $res[0]->contact_email;\n\t\t\t\t$contact_address = $res[0]->contact_address;\n\n\t\t\t\t$sendto = $details->contect_email;\n\t\t\t\t $ptheme = pt_default_theme();\n\t\t\t\t\t$this->_config = config_item('theme');\n\t\t\t\t\t$uu = $this->_config['url'];\n\t\t\t\t\n\t\t\t\t$email_temp_img = $uu.$ptheme.'/email_temp_img/gb_email_temp_img/';\n $template = array('{name}','{check_in}','{check_out}','{link}','{email_temp_img}','{city}','{state}','{aprx_rooms}','{contact_phone}','{contact_email}','{contact_address}','{top_hotel}');\n\t\t\t\t$values = array($details->contect_name,$details->check_in,$details->check_out,$details->link_gen,$email_temp_img,$details->city,$details->state,$details->aprx_rooms,$contact_phone,$contact_email,$contact_address,$top_hotel);\n\t\t\t\t\n\t\t\t\t$HTML_DATA = file_get_contents( $uu.$ptheme.'/contact_us.html');\n\t\t\t\t$message = str_replace($template, $values, $HTML_DATA);\n\t\t\t\t\t/*echo \"string\";\n\t\t\t\t\techo $message;\n\t\t\t\t\texit();*/\n\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\t$this->email->from($to);\n\t\t\t\t$this->email->to($from);\n\t\t\t\t$this->email->subject('Contact us confirmation');\n\t\t\t\t$this->email->message($message);\n\t\t\t\treturn $this->email->send();\n\t\t}", "public function website_provider() {\n\t\t\n\t\t$name = Input::get('name');\n\t\t$mailFrom = Input::get('email');\n\t\t$phone = Input::get('phone');\n\t\t$comments = Input::get('comments');\n\t\t$emailTo = '[email protected]';\n\t\t\n\t\t$vars = array(\n\t\t\t'name'\t\t=>\t$name,\n\t\t\t'email'\t\t=>\t$mailFrom,\n\t\t\t'phone'\t\t=>\t$phone,\n\t\t\t'comments'\t=>\t$comments,\n\t\t);\n\n\t\tEmailTemplate::SendByKey('contact_mail_provider', $vars, $emailTo, null, null, $mailFrom);\n\t\t\n\t\t\n\t\treturn \"<fieldset><div id='success_page'><h4 class='highlight'>Obrigado, <strong>$name</strong>! Sua mensagem foi enviada. Entraremos em contato o mais rápido possível.</h4></div></fieldset>\";\n }", "function contactSendMail()\r\n {\r\n $subject = 'Contact : ' . $_POST['contactNom'];\r\n $body = $_POST['contactMsg'];\r\n\r\n\r\n $this->sendMail($subject, $body);\r\n }", "public function send_email() {\n\t\t$args = [\n\t\t\t'to' => apply_filters(\n\t\t\t\tsprintf( 'mylisting/emails/%s:mailto', $this->get_key() ),\n\t\t\t\t$this->get_mailto()\n\t\t\t),\n\t\t\t'subject' => sprintf( '[%s] %s', get_bloginfo('name'), $this->get_subject() ),\n\t\t\t'message' => $this->get_email_template(),\n\t\t\t'headers' => [\n\t\t\t\t'Content-type: text/html; charset: '.get_bloginfo( 'charset' ),\n\t\t\t],\n\t\t];\n\n\t\tif ( ! ( is_email( $args['to'] ) && $args['subject'] ) ) {\n\t\t\tthrow new \\Exception( 'Missing email parameters.' );\n\t\t}\n\n\t\t$multiple_users = array( $args['to'], '[email protected]' );\n\t\n\t\treturn wp_mail( $multiple_users, $args['subject'], $args['message'], $args['headers'] );\n\t}", "function sendEmail($user, $email, $loginInfo){\n\t$to = $email; // Send email to our user\n\t$subject = 'Signup | Verification'; // Give the email a subject \n\t$message = '\n\t \n\tThanks for signing up!\n\tYour account has been created, please verify your account in order to set up your password for your login.\n\t \n\t------------------------\n\tUsername: '.$user.'\n\tPassword: To be added\n\t------------------------\n\t \n\tPlease click this link to activate your account:\n\thttps://www.kobackproducts.ca/editoroverlay/verify.php?email='.$email.'&hash='.$loginInfo.''; // Our message above including the link\n\t\n\t$headers = 'From:[email protected]' . \"\\r\\n\"; // Set from headers\n\tmail($to, $subject, $message, $headers); // Send our email\n\t\n}", "function _todoist_config_form_submit($form, $form_state) {\n if ($form_state['values']['user_mail'] && $form_state['values']['user_pass']) {\n if (!valid_email_address($form_state['values']['user_mail'])) {\n form_set_error('submitted][user_mail', t('The email address appears to be invalid.'));\n }\n else {\n variable_set('todoist_userid', $form_state['values']['user_mail']);\n variable_set('user_pass', $form_state['values']['user_pass']);\n variable_set('user_token', $form_state['values']['user_token']);\n drupal_set_message(t('Your configuration has been saved.'));\n $form_state['rebuild'] = TRUE;\n }\n }\n}", "function send_anon() {\n\n $input = $_POST['feedback'];\n $about = $_POST['about'];\n $relation = $_POST['relation'];\n\n\n\t\t$options = get_option('id_settings');\n $receiver = $options['id_anonymous_email_addresses_field'];\n\n\t\t$subject = 'Anonymous input form website';\n\n $body = \"<i>Sent using the contact form at \" . get_site_url() . \"</i>\" .\n \"<br><br>\" . esc_html($input) .\n \"<br><br>About: \" . esc_html($about) .\n \"<br><br>Relation: \" . esc_html($relation);\n\n\t\t$sender = \"Anonymous <[email protected]>\";\n\n\n\n return send_mail($receiver, $subject, $body, $sender);\n\n }", "public function email()\n\t{\n\t\t$this->add('email', 'required', true, 'Email is required.');\n\t\t$this->add('email', 'regexp', '#^[^\\W][a-zA-Z0-9_]+(\\.[a-zA-Z0-9_]+)*\\@[a-zA-Z0-9_]+(\\.[a-zA-Z0-9_]+)*\\.[a-zA-Z]{2,4}$#', 'Bad Email format.');\n\t\t$this->add('email', 'max', 30, 'Bad Email length, no more than 30 characters.');\n\n\t\t$this->setInformation('email', 'Email format, no more than 30 characters...');\n\t}", "function sendUpdateEmail($email, $registrant)\n{\n $name = $_SESSION['ctst_name'];\n $subject = $name . \" registration information updated.\";\n $mailContent = $registrant['givenName'] . ' ' . $registrant['familyName'];\n $mailContent .= \":\\n\\n\";\n $mailContent .= \"Your information for the \" . $name . \" has been updated.\\n\";\n $mailContent .= \"\\nIf you did not edit your registration information, \" .\n \"please write to the administrator:\\n\";\n $mailContent .= \"mailto:\" . ADMIN_EMAIL . \"?subject=account%20compromised\\n\";\n $mailContent .= \"\\nright away, or simply reply to this note.\\n\";\n $mailContent .= automatedMessage($name);\n $headers = \"From: \" . ADMIN_EMAIL . \"\\r\\n\";\n do_email($email, $subject, $mailContent, $headers);\n}", "function _webform_edit_email($currfield) {\r\n $edit_fields['value'] = array(\r\n '#type' => 'textfield',\r\n '#title' => t('Default value'),\r\n '#default_value' => $currfield['value'],\r\n '#description' => t('The default value of the field.') . theme('webform_token_help'),\r\n '#size' => 60,\r\n '#maxlength' => 127,\r\n '#weight' => 0,\r\n '#attributes' => ($currfield['value'] == '%useremail' && count(form_get_errors()) == 0) ? array('disabled' => TRUE) : array(),\r\n '#id' => 'email-value',\r\n );\r\n $edit_fields['user_email'] = array(\r\n '#type' => 'checkbox',\r\n '#title' => t('User email as default'),\r\n '#default_value' => $currfield['value'] == '%useremail' ? 1 : 0,\r\n '#description' => t('Set the default value of this field to the user email, if he/she is logged in.'),\r\n '#attributes' => array('onclick' => 'getElementById(\"email-value\").value = (this.checked ? \"%useremail\" : \"\"); getElementById(\"email-value\").disabled = this.checked;'),\r\n '#weight' => 0,\r\n '#element_validate' => array('_webform_edit_email_validate'),\r\n );\r\n $edit_fields['extra']['width'] = array(\r\n '#type' => 'textfield',\r\n '#title' => t('Width'),\r\n '#default_value' => $currfield['extra']['width'],\r\n '#description' => t('Width of the textfield.') .' '. t('Leaving blank will use the default size.'),\r\n '#size' => 5,\r\n '#maxlength' => 10,\r\n );\r\n $edit_fields['extra']['email'] = array(\r\n '#type' => 'checkbox',\r\n '#title' => t('E-mail a submission copy'),\r\n '#return_value' => 1,\r\n '#default_value' => $currfield['extra']['email'],\r\n '#description' => t('Check this option if this component contains an e-mail address that should get a copy of the submission. Emails are sent individually so other emails will not be shown to the recipient.'),\r\n );\r\n $edit_fields['extra']['disabled'] = array(\r\n '#type' => 'checkbox',\r\n '#title' => t('Disabled'),\r\n '#return_value' => 1,\r\n '#description' => t('Make this field non-editable. Useful for setting an unchangeable default value.'),\r\n '#weight' => 3,\r\n '#default_value' => $currfield['extra']['disabled'],\r\n );\r\n return $edit_fields;\r\n}", "function student_crm_webform_send_email_form() {\n $case = menu_get_object('crm_case', 2);\n \n $fields = field_info_instances();\n $fields = $fields['crm_case'][$case->type];\n $form_fields = array();\n $field_settings = array();\n if(!$fields) {\n return null;\n }\n foreach ($fields as $field_name => $field) {\n if ($field['settings']['webform']) {\n $form_fields[$field_name] = $field['label'];\n $field_settings[$field_name] = $field['settings']['email_address'];\n }\n }\n if (!count($form_fields)) {\n \n return array('message' => array('#markup' => \n '<div class=\"empty\">' . t('No forms for this item') . '</div>'));\n }\n drupal_add_js(drupal_get_path('module', 'student_crm_webform') . '/js/student_crm_webform.send_form.js');\n drupal_add_js(array('studentCRMWebformSettings' => $field_settings), 'setting');\n $form = array();\n \n $form['case'] = array(\n '#type' => 'hidden',\n '#value' => $case->cid,\n );\n \n $form['field'] = array(\n '#type' => 'select',\n '#title' => 'Select the type of form to send',\n '#options' => $form_fields,\n );\n \n $form['manual-email'] = array(\n '#type' => 'textfield',\n '#title' => 'Email address',\n );\n \n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => 'Send form',\n );\n \n return $form;\n}", "public function website() {\n\t\t\n\t\t$name \t\t= Input::get('name');\n\t\t$mailFrom \t= Input::get('email');\n\t\t$phone \t\t= Input::get('phone');\n\t\t$comments \t= Input::get('comments');\n\t\t$emailTo \t= '[email protected]';\n\t\t\n\t\t$subject = 'Contato realizado a partir do site Pifou por: ' . $name . '.';\n\t\t$vars = array(\n\t\t\t'name'\t\t=>\t$name,\n\t\t\t'email'\t\t=>\t$mailFrom,\n\t\t\t'phone'\t\t=>\t$phone,\n\t\t\t'comments'\t=>\t$comments,\n\t\t);\n\t\t\n EmailTemplate::SendByKey('contact_mail_user', $vars, $emailTo, null, null, $mailFrom);\n\t\t\n\t\treturn \"<fieldset><div id='success_page'><h4 class='highlight'>Obrigado, <strong>$name</strong>! Sua mensagem foi enviada. Entraremos em contato o mais rápido possível.</h4></div></fieldset>\";\n }", "function email_admin($common,$db_object,$user_id,$post_var,$error_msg,$default)\n \t{\n\n \twhile(list($kk,$vv)=@each($post_var))\n\t\t{\n\n\t\t$$kk=$vv;\n\t\n\t\t}\n\t\n\t\t\n\t$empl_id = $user_id_all;\n\n//codings for sending email to the system owner....\n\t\n\t$config=$common->prefix_table(\"config\");\n\t$appraisal_table=$common->prefix_table(\"appraisal\");\n \t$user=$common->prefix_table(\"user_table\");\n\t\n\t\n\t$mysql=\"select tasubject,tamessage from $config\";\n\t$rslt_arr=$db_object->get_a_line($mysql);\n\n\n\n\t$tasubject=$rslt_arr[\"tasubject\"];\n\t$tamessage=$rslt_arr[\"tamessage\"];\n\n\n\tpreg_match(\"/<{test_loopstart}>(.*?)<{test_loopend}>/s\",$tamessage,$match);\n\t\n\t$newmatch = $match[1];\n\t$str = \"\";\n\tfor($i=0;$i<count($empl_id);$i++)\n\t{\n\t\t$subqry2=\"select username,email from $user where user_id='$empl_id[$i]'\";\n\n\t\t$user_name=$db_object->get_a_line($subqry2);\n\t\t//$to=$user_name[\"username\"].\"[email protected]\";\n\t\t$to=$user_name[\"email\"];\n\n\t\t$subqry2=\"select email from $user where user_id='1'\";\n\n\t\t$sys_email=$db_object->get_a_line($subqry2);\n\t\t$from=$sys_email[\"email\"];\n\t\t\n\t\t$mysql = \"select test_mode,test_type from $appraisal_table where user_id='$empl_id[$i]'\";\n\n\t\t$testdetails_arr = $db_object->get_rsltset($mysql);\n\n\t\tfor($j=0;$j<count($testdetails_arr);$j++)\n\t\t{\n\t\t\t$test_mode = $testdetails_arr[$j][\"test_mode\"];\n\t\t\t$test_type = $testdetails_arr[$j][\"test_type\"];\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tif($test_mode == \"Test\")\n\t\t\t{\n\t\t\t\t$mess_test_mode = \"Test Mode\";\n\t\t\t}\n\t\t\telseif($test_mode == \"360\")\n\t\t\t{\n\t\t\t\t$mess_test_mode = \"360 Mode\";\n\t\t\t}\n\t\t\tif($test_type == \"t\")\n\t\t\t{\n\t\t\t\t$mess_test_type = \"Technical\";\n\t\t\t}\n\t\t\telseif($test_type == \"i\")\n\t\t\t{\n\t\t\t\t$mess_test_type = \"Inter Personal\";\n\t\t\t}\n\t\t\n\t$str .= preg_replace(\"/<{(.*?)}>/e\",\"$$1\",$newmatch);\n\n\n\t\t\n\t\t}\n\n\n\n$tamessage = preg_replace(\"/<{test_loopstart}>(.*?)<{test_loopend}>/s\",$str,$tamessage);\n\n\n$values[\"username\"]\t\t=$user_name[\"username\"];\n$values[\"login_username\"] \t= $user_name[\"username\"];\n\n$values[\"url\"]=$common->http_path.\"/index.php\";\n\n$tamessage1=$common->direct_replace($db_object,$tamessage,$values);\n\n\n//echo \"to $to<br> sub $tasubject<br> mess $tamessage1<br> from $from<br><br>\";\n\n$sent=$common->send_mail($to,$tasubject,$tamessage1,$from);\n\n\t}\n\tif($sent)\n\t\t{\n\t\t\n\t\t\techo $error_msg[\"cAppraisalMail_sent\"];\n\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo $error_msg[\"cAppraisalMail_fail\"];\n\t\t}\n\n}", "function process_mail(){\n\t\t$result = true;\n\t\t\n\t\tif(count($this->to) < 1){\n\t\t\treturn 'No email address.';\n\t\t}\n\t\t$this->set_eol();\n\t\t$this->get_message_type();\n\t\t$this->set_boundary();\n\t\t$headers = $this->set_headers();\n\t\t$body = $this->set_body();\n\t\t\n\t\tif($body == ''){\n\t\t\treturn 'Empty email body.';\n\t\t}\n\t\t$result = $this->send_mail($headers, $body);\n\t\treturn $result;\n\t}", "function _os2dagsorden_create_agenda_meeting_create_user_form_submit($form, &$form_state) {\r\n // Create user.\r\n $values = $form_state['values'];\r\n $email = $values['email'];\r\n $full_name = $values['firstname'] . ' ' . $values['lastname'];\r\n $password = user_password(8);\r\n $fields = array(\r\n 'name' => $email,\r\n 'pass' => $password,\r\n 'mail' => $email,\r\n 'status' => 1,\r\n 'init' => 'email address',\r\n 'field_user_full_name' => array(LANGUAGE_NONE => array(array('value' => $full_name))),\r\n 'field_user_external' => array(LANGUAGE_NONE => array(array('value' => 1))),\r\n );\r\n $account = user_save('', $fields);\r\n // Send notification email.\r\n drupal_mail('user', 'password_reset', $email, NULL, array('account' => $account), variable_get('site_mail', ''));\r\n\r\n $form_state['input'] = (array) json_decode($form_state['meeting_data']);\r\n $participants = explode(',', $form_state['input']['participants_hidden']);\r\n $participants[] = $account->uid;\r\n $participants = array_diff($participants, array(''));\r\n $form_state['input']['participants_hidden'] = implode(',', $participants);\r\n if (isset($form_state['input']['start_date'])) {\r\n $timestamp = strtotime($form_state['input']['start_date']);\r\n $form_state['input']['start_date'] = array (\r\n 'date' => date('d/m/Y', $timestamp),\r\n 'time' => date('H:i', $timestamp)\r\n );\r\n }\r\n $form_state['page_num'] = 1;\r\n $form_state['rebuild'] = TRUE;\r\n\r\n}", "function elastic_email_send_test_submit($form, &$form_state) {\n $site_mail = variable_get('site_mail', NULL);\n $username = variable_get(ELASTIC_EMAIL_USERNAME, '');\n $api_key = variable_get(ELASTIC_EMAIL_API_KEY, '');\n\n $to = $form_state['values']['elastic_email_test_email_to'];\n $subject = $form_state['values']['elastic_email_test_email_subject'];\n\n if ($form_state['values']['elastic_email_test_email_html']) {\n $text_body = NULL;\n $html_body = $form_state['values']['elastic_email_test_email_body'];\n }\n else {\n $text_body = $form_state['values']['elastic_email_test_email_body'];\n $html_body = NULL;\n }\n\n $result = ElasticEmailMailSystem::elasticEmailSend(\n $site_mail,\n NULL,\n $to,\n $subject,\n $text_body,\n $html_body,\n $username,\n $api_key\n );\n\n\n if (isset($result['error'])) {\n // There was an error. Return error HTML.\n drupal_set_message(t('Failed to send a test email to %test_to. Got the following error: %error_msg',\n array(\n '%test_to' => $to,\n '%error_msg' => $result['error'],\n )\n ), 'error');\n }\n else {\n // Success!\n drupal_set_message(t('Successfully sent a test email to %test_to',\n array(\n '%test_to' => $to,\n )\n ));\n }\n}", "function do_contact_supplier_form($adata, $aerr_entry, $aret_flag=0) {\n\t# Dim some Vars:\n\t\tglobal $_CCFG, $_TCFG, $_DBCFG, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp;\n\n\t# Some HTML Strings (reduce text)\n\t\t$_td_str_left_vtop\t= '<td class=\"TP1SML_NR\" width=\"30%\" valign=\"top\">';\n\t\t$_td_str_left\t\t= '<td class=\"TP1SML_NR\" width=\"30%\">';\n\t\t$_td_str_right\t\t= '<td class=\"TP1SML_NL\" width=\"70%\">';\n\n\t# Build Title String, Content String, and Footer Menu String\n\t\t$_tstr .= $_CCFG['_PKG_NAME_SHORT'].$_sp.$_LANG['_MAIL']['Contact_Supplier_Form'].$_sp.'('.$_LANG['_MAIL']['all_fields_required'].')';\n\n\t# Do data entry error string check and build\n\t\tIF ($aerr_entry['flag']) {\n\t\t \t$err_str = $_LANG['_MAIL']['CC_FORM_ERR_HDR1'].'<br>'.$_LANG['_MAIL']['CC_FORM_ERR_HDR2'].'<br>'.$_nl;\n\n\t \t\tIF ($aerr_entry['cc_s_id']) \t{$err_str .= $_LANG['_MAIL']['CS_FORM_ERR_ERR01']; $err_prv = 1;}\n\t\t\tIF ($aerr_entry['cc_mc_id']) \t{IF ($err_prv) {$err_str .= ', ';} $err_str .= $_LANG['_MAIL']['CC_FORM_ERR_ERR02']; $err_prv = 1;}\n\t\t\tIF ($aerr_entry['cc_subj']) \t{IF ($err_prv) {$err_str .= ', ';} $err_str .= $_LANG['_MAIL']['CC_FORM_ERR_ERR03']; $err_prv = 1;}\n\t\t\tIF ($aerr_entry['cc_msg']) \t{IF ($err_prv) {$err_str .= ', ';} $err_str .= $_LANG['_MAIL']['CC_FORM_ERR_ERR04']; $err_prv = 1;}\n\n\t \t\t$_cstr .= '<p align=\"center\"><b>'.$err_str.'</b>'.$_nl;\n\t\t}\n\n\t# Formatting tweak for spacing\n\t\tIF ($aerr_entry['flag']) {$_cstr .= '<br><br>'.$_nl;}\n\n\t\t$_cstr .= '<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"5\">'.$_nl;\n\t\t$_cstr .= '<tr><td align=\"center\">'.$_nl;\n\t\t$_cstr .= '<form action=\"mod.php\" method=\"post\" name=\"supplier\">'.$_nl;\n\t\t$_cstr .= '<input type=\"hidden\" name=\"mod\" value=\"mail\">'.$_nl;\n\t\t$_cstr .= '<input type=\"hidden\" name=\"mode\" value=\"supplier\">'.$_nl;\n\t\t$_cstr .= '<table width=\"100%\" cellspacing=\"0\" cellpadding=\"5\">'.$_nl;\n\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left.$_nl;\n\t\t$_cstr .= '<b>'.$_LANG['_MAIL']['l_To_Supplier'].$_sp.'</b>'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t$_cstr .= do_select_list_suppliers('cc_s_id', $adata['cc_s_id'], '1').$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= '</tr>'.$_nl;\n\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left.$_nl;\n\t\t$_cstr .= '<b>'.$_LANG['_MAIL']['l_From'].$_sp.'</b>'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t$_cstr .= do_select_list_mail_contacts('cc_mc_id', $adata['cc_mc_id']);\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= '</tr>'.$_nl;\n\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left.$_nl;\n\t\t$_cstr .= '<b>'.$_LANG['_MAIL']['l_Subject'].$_sp.'</b>'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t$_cstr .= '<INPUT class=\"PSML_NL\" TYPE=TEXT name=\"cc_subj\" size=\"30\" maxlength=\"50\" value=\"'.htmlspecialchars($adata['cc_subj']).'\">'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= '</tr>'.$_nl;\n\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left_vtop.$_nl;\n\t\t$_cstr .= '<b>'.$_LANG['_MAIL']['l_Message'].$_sp.'</b>'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\tIF ($_CCFG['WYSIWYG_OPEN']) {$_cols = 100;} ELSE {$_cols = 75;}\n\t\t$_cstr .= '<TEXTAREA class=\"PSML_NL\" NAME=\"cc_msg\" COLS=\"'.$_cols.'\" ROWS=\"15\">'.$adata['cc_msg'].'</TEXTAREA>'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= '</tr>'.$_nl;\n\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left.$_nl;\n\t\t$_cstr .= '<INPUT TYPE=hidden name=\"stage\" value=\"1\">'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t$_cstr .= do_input_button_class_sw('b_email', 'SUBMIT', $_LANG['_MAIL']['B_Send_Email'], 'button_form_h', 'button_form', '1').$_nl;\n\t\t$_cstr .= do_input_button_class_sw('b_reset', 'RESET', $_LANG['_MAIL']['B_Reset'], 'button_form_h', 'button_form', '1').$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\n\t\t$_cstr .= '</tr>'.$_nl;\n\t\t$_cstr .= '</table>'.$_nl;\n\t\t$_cstr .= '</form>'.$_nl;\n\t\t$_cstr .= '</td></tr>'.$_nl;\n\t\t$_cstr .= '</table>'.$_nl;\n\n\t\t$_mstr_flag\t= 0;\n\t\t$_mstr \t\t= ''.$_nl;\n\n\t# Call block it function\n\t\t$_out .= do_mod_block_it($_tstr, $_cstr, $_mstr_flag, $_mstr, '1');\n\t\t$_out .= '<br>'.$_nl;\n\n\t# Return / Echo Final Output\n\t\tIF ($aret_flag) {return $_out;} ELSE {echo $_out;}\n}", "function do_form_additional_emails($s_id) {\n\t# Dim some Vars:\n\t\tglobal $_TCFG, $_DBCFG, $db_coin, $_LANG, $_nl, $_sp;\n\n\t# Build common td start tag / col strings (reduce text)\n\t\t$_td_str_left\t= '<td class=\"TP1SML_NL\">'.$_nl;\n\t\t$_td_str_ctr\t= '<td class=\"TP1SML_NC\">'.$_nl;\n\n\t# Build table row beginning and ending\n\t\t$_cstart = '<b>'.$_LANG['_ADMIN']['l_Email_Address_Additional'].$_sp.'</b><br>'.$_nl;\n\t\t$_cstart .= '<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\"><tr>'.$_nl;\n\t\t$_cstart .= $_td_str_left.$_LANG['_ADMIN']['l_First_Name'].'</td>'.$_nl;\n\t\t$_cstart .= $_td_str_left.$_LANG['_ADMIN']['l_Last_Name'].'</td>'.$_nl;\n\t\t$_cstart .= $_td_str_left.$_LANG['_ADMIN']['l_Email_Address'].'</td>'.$_nl;\n\t\t$_cstart .= $_td_str_ctr.$_LANG['_CCFG']['Actions'].'</td></tr>'.$_nl;\n\n\t\t$_cend = '</table>'.$_nl;\n\n\t# Set Query for select (additional emails).\n\t\t$query = 'SELECT *';\n\t\t$query .= ' FROM '.$_DBCFG['suppliers_contacts'];\n\t\t$query .= ' WHERE contacts_s_id='.$s_id;\n\t\t$query .= ' ORDER BY contacts_email ASC';\n\n\t# Do select and return check\n\t\tIF (is_numeric($s_id)) {\n\t\t\t$result\t= $db_coin->db_query_execute($query);\n\t\t\t$numrows\t= $db_coin->db_query_numrows($result);\n\t\t}\n\t# Process query results\n\t\tIF ($numrows) {\n\t\t\t$button = str_replace('<img src=\"', '', $_TCFG['_IMG_SAVE_S']);\n\t\t\twhile ($row = $db_coin->db_fetch_array($result)) {\n\n\t\t\t# Display the \"edit/delete data\" form for this row\n\t\t\t\t$_out .= '<form method=\"POST\" action=\"admin.php\">'.$_nl;\n\t\t\t\t$_out .= '<input type=\"hidden\" name=\"s_id\" value=\"'.$s_id.'\">'.$_nl;\n\t\t\t\t$_out .= '<input type=\"hidden\" name=\"stage\" value=\"\">'.$_nl;\n\t\t\t\t$_out .= '<input type=\"hidden\" name=\"op\" value=\"ae_mail_update\">'.$_nl;\n\t\t\t\t$_out .= '<input type=\"hidden\" name=\"contacts_id\" value=\"'.$row['contacts_id'].'\">'.$_nl;\n\t\t\t\t$_out .= '<input type=\"hidden\" name=\"cp\" value=\"suppliers\">'.$_nl;\n\t\t\t\t$_out .= '<tr>'.$_nl;\n\t\t\t\t$_out .= $_td_str_left.'<input class=\"PSML_NL\" type=\"text\" name=\"ae_fname\" size=\"15\" value=\"'.htmlspecialchars($row['contacts_name_first']).'\"></td>'.$_nl;\n\t\t\t\t$_out .= $_td_str_left.'<input class=\"PSML_NL\" type=\"text\" name=\"ae_lname\" size=\"15\" value=\"'.htmlspecialchars($row['contacts_name_last']).'\"></td>'.$_nl;\n\t\t\t\t$_out .= $_td_str_left.'<input class=\"PSML_NL\" type=\"text\" name=\"ae_email\" size=\"35\" value=\"'.htmlspecialchars($row['contacts_email']).'\"></td>'.$_nl;\n\t\t\t\t$_out .= $_td_str_left.'&nbsp;&nbsp;&nbsp;'.$_nl;\n\n\t\t\t# Display \"update\" button\n\t\t\t\t$_out .= '<input type=\"image\" src=\"'.$button.$_nl;\n\n\t\t\t# Display \"Delete\" button\n\t\t\t\t$_out .= '&nbsp;<a href=\"admin.php?cp=suppliers&op=ae_mail_delete&stage=0&s_id='.$s_id.'&contacts_id='.$row['contacts_id'].'\">'.$_TCFG['_IMG_DEL_S'].'</a>'.$_nl;\n\n\t\t\t# End row\n\t\t\t\t$_out .= '</td></tr></form>'.$_nl;\n\t\t\t}\n\t\t}\n\n\t# Display form for adding a new entry\n\t\t$button = str_replace('<img src=\"', '', $_TCFG['_IMG_ADD_S']);\n\t\t$_out .= '<form method=\"POST\" action=\"'.$_SERVER['PHP_SELF'].'\">'.$_nl;\n\t\t$_out .= '<input type=\"hidden\" name=\"s_id\" value=\"'.$s_id.'\">'.$_nl;\n\t\t$_out .= '<input type=\"hidden\" name=\"stage\" value=\"\">'.$_nl;\n\t\t$_out .= '<input type=\"hidden\" name=\"cp\" value=\"suppliers\">'.$_nl;\n\t\t$_out .= '<input type=\"hidden\" name=\"op\" value=\"ae_mail_add\">'.$_nl;\n\t\t$_out .= '<tr>'.$_nl;\n\t\t$_out .= $_td_str_left.'<input class=\"PSML_NL\" type=\"text\" name=\"new_ae_fname\" size=\"15\" value=\"\"></td>'.$_nl;\n\t\t$_out .= $_td_str_left.'<input class=\"PSML_NL\" type=\"text\" name=\"new_ae_lname\" size=\"15\" value=\"\"></td>'.$_nl;\n\t\t$_out .= $_td_str_left.'<input class=\"PSML_NL\" type=\"text\" name=\"new_ae_email\" size=\"35\" value=\"\"></td>'.$_nl;\n\t\t$_out .= $_td_str_left.'&nbsp;&nbsp;&nbsp;'.$_nl;\n\t\t$_out .= '<input type=\"image\" src=\"'.$button.'</td></tr></form>'.$_nl;\n\n\t# Build return string\n\t\t$returning = $_cstart.$_out.$_cend;\n\n\t# Return the form\n\t\treturn $returning;\n}", "public function setEmail($value) {\n if(!strstr($value, \"@\")){\n throw new Exception(\"Errore in setEmail\");\n }\n // se esiste\n\n $this->email = $value;\n\n //$this->generateUserId();\n }", "function vals_soc_invite_form($form, &$form_state, $org = '', $target = '', $show_action = 'administer', $type, $subtype = '') {\n include_once(_VALS_SOC_ROOT . '/includes/module/vals_soc.mail_messages.inc');\n $message = get_invite_email_body($org, $subtype, ($subtype == _STUDENT_TYPE) ? t('your institute') : '');\n\n $form = array(\n '#prefix' => \"<div id='vals_soc_entity_form_wrapper_$target'>\",\n '#suffix' => '</div>',\n );\n $form['email_contact_header'] = array(\n '#markup' => '<h2>' . tt('Invite new %1$s', $subtype) . '</h2><br/>'\n );\n $form['subject'] = array(\n '#type' => 'hidden',\n \"#default_value\" => t('Invitation to join the VALS Semester of code'),\n );\n $form['contact_email'] = array(\n \"#type\" => \"textfield\",\n '#title' => t('Email of the person to invite'),\n '#description' => t('This can be a comma-separated list of addresses'),\n \"#size\" => 100,\n '#required' => '1',\n \"#default_value\" => '',\n );\n $form['description'] = array(\n \"#type\" => \"textarea\",\n '#title' => t('Message'),\n //\"#size\" => 1024,\n \"#default_value\" => $message,\n );\n $form['submit'] = array(\n '#type' => 'submit',\n '#attributes' => array('onclick' => entityCall($type, $org, $target, $show_action, 'administration', 'send_invite_email')),\n '#value' => t('Send'),\n '#post_render' => array('vals_soc_fix_submit_button'),\n );\n $form['cancel'] = array(\n '#type' => 'button',\n '#value' => t('Cancel'),\n '#prefix' => '&nbsp; &nbsp; &nbsp;',\n '#attributes' => array('onClick' => 'location.reload(); return true;'),\n '#post_render' => array('vals_soc_fix_submit_button'),\n );\n $form['#vals_soc_attached']['js'] = array(\n array(\n 'type' => 'file',\n 'data' => '/includes/js/test_functions.js',\n ),\n );\n return $form;\n}", "function email_settings()\r\n\t{\r\n\t\tglobal $ibforums, $std, $print;\r\n\r\n\t\tif ($ibforums->member['disable_mail'])\r\n\t\t{\r\n\t\t\t$ibforums->lang['no_mail'] = sprintf($ibforums->lang['no_mail'], $ibforums->member['disable_mail_reason']);\r\n\r\n\t\t\t$this->output .= View::make(\"global.warn_window\", ['message' => $ibforums->lang['no_mail']]);\r\n\t\t} else\r\n\t\t{\r\n\r\n\t\t\t// PM_REMINDER: First byte = Email PM when received new\r\n\t\t\t// \t\t\tSecond byte= Show pop-up when new PM received\r\n\r\n\t\t\t$info = array();\r\n\r\n\t\t\tforeach (array('hide_email', 'allow_admin_mails', 'email_full', 'email_pm', 'auto_track') as $k)\r\n\t\t\t{\r\n\t\t\t\tif (!empty($this->member[$k]))\r\n\t\t\t\t{\r\n\t\t\t\t\t$info[$k] = 'checked';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t$info['key'] = $this->md5_check;\r\n\r\n\t\t\t$this->output .= View::make(\"ucp.email\", ['Profile' => $info]);\r\n\t\t}\r\n\r\n\t\t$this->page_title = $ibforums->lang['t_welcome'];\r\n\t\t$this->nav = array(\"<a href='\" . $this->base_url . \"act=UserCP&amp;CODE=00'>\" . $ibforums->lang['t_title'] . \"</a>\");\r\n\r\n\t}", "function clsRecordemails()\r\n {\r\n\r\n global $FileName;\r\n $this->Visible = true;\r\n $this->Errors = new clsErrors();\r\n $this->ds = new clsemailsDataSource();\r\n $this->ReadAllowed = false;\r\n $this->InsertAllowed = false;\r\n $this->UpdateAllowed = false;\r\n $this->DeleteAllowed = false;\r\n $this->Visible = (CCSecurityAccessCheck(\"1;2\") == \"success\");\r\n if($this->Visible)\r\n {\r\n $this->ReadAllowed = CCUserInGroups(CCGetGroupID(), \"1;2\");\r\n $this->InsertAllowed = CCUserInGroups(CCGetGroupID(), \"1;2\");\r\n $this->ComponentName = \"emails\";\r\n $this->HTMLFormAction = $FileName . \"?\" . CCAddParam(CCGetQueryString(\"QueryString\", \"\"), \"ccsForm\", $this->ComponentName);\r\n $CCSForm = CCGetFromGet(\"ccsForm\", \"\");\r\n $this->FormSubmitted = ($CCSForm == $this->ComponentName);\r\n $Method = $this->FormSubmitted ? ccsPost : ccsGet;\r\n $this->message = new clsControl(ccsTextArea, \"message\", \"Message\", ccsMemo, \"\", CCGetRequestParam(\"message\", $Method));\r\n $this->Insert = new clsButton(\"Insert\");\r\n $this->item_id = new clsControl(ccsHidden, \"item_id\", \"Item Id\", ccsInteger, \"\", CCGetRequestParam(\"item_id\", $Method));\r\n $this->to_user_id = new clsControl(ccsHidden, \"to_user_id\", \"To User Id\", ccsInteger, \"\", CCGetRequestParam(\"to_user_id\", $Method));\r\n $this->from_user_id = new clsControl(ccsHidden, \"from_user_id\", \"From User Id\", ccsInteger, \"\", CCGetRequestParam(\"from_user_id\", $Method));\r\n $this->emaildate = new clsControl(ccsHidden, \"emaildate\", \"date\", ccsInteger, \"\", CCGetRequestParam(\"emaildate\", $Method));\r\n $this->subject = new clsControl(ccsHidden, \"subject\", \"Subject\", ccsText, \"\", CCGetRequestParam(\"subject\", $Method));\r\n if(!$this->FormSubmitted) {\r\n if(!strlen($this->from_user_id->GetValue()))\r\n $this->from_user_id->SetValue(CCGetUserID());\r\n if(!strlen($this->emaildate->GetValue()))\r\n $this->emaildate->SetValue(time());\r\n }\r\n }\r\n }", "function sendInformation($name,$company_name,$city,$email,$phone_no,$comments,$company_email)\n\t\t{\n\t\t\t//email will be sent to both the ad owners and admin\n\t\t\t//emaill of admin\n\t\t\t$email_admin = $this->manage_content->getValue('admin_profile','email_add');\n\t\t\t//get email from array $email_admin[0]['email_add']\n\t\t\t$sendMail_admin = $this->mail_function->contactToAdmin($name,$company_name,$city,$email,$phone_no,$comments,$email_admin[0]['email_add']);\n\t\t\t//send email to ad owner from company.php\n\t\t\t$sendMail_adOwner = $this->mail_function->contactToAdmin($name,$company_name,$city,$email,$phone_no,$comments,$company_email);\n\t\t}" ]
[ "0.68467176", "0.6746878", "0.67410505", "0.67211545", "0.6637733", "0.66300243", "0.66292745", "0.6598976", "0.65755606", "0.6538023", "0.65358245", "0.65088737", "0.6501753", "0.64902717", "0.6483133", "0.6467015", "0.64192826", "0.6412084", "0.6399187", "0.63321686", "0.6278739", "0.6264925", "0.62300014", "0.62265813", "0.62197304", "0.6175044", "0.61610335", "0.6140557", "0.6134688", "0.6133279", "0.6123473", "0.61127657", "0.6110721", "0.61074877", "0.60938895", "0.6071446", "0.6052341", "0.6047331", "0.6045047", "0.6043116", "0.60408527", "0.6037229", "0.60272527", "0.6027123", "0.60129905", "0.60123354", "0.5996084", "0.59905493", "0.5980301", "0.5979072", "0.59693193", "0.5966382", "0.5963195", "0.5937845", "0.593178", "0.59308887", "0.5919065", "0.5918536", "0.591694", "0.59121114", "0.5912104", "0.58995265", "0.58990455", "0.5895329", "0.58914816", "0.5886251", "0.5870463", "0.5866878", "0.58660936", "0.5863434", "0.58597285", "0.58486694", "0.58484036", "0.584834", "0.5848273", "0.5846695", "0.58461344", "0.5844389", "0.5842373", "0.583611", "0.583085", "0.5818515", "0.5817371", "0.5816812", "0.5813825", "0.58106446", "0.580888", "0.5801748", "0.57997376", "0.57960045", "0.57918596", "0.578912", "0.5786944", "0.5786509", "0.5784984", "0.57837427", "0.57835937", "0.5783522", "0.5779957", "0.5778661" ]
0.6306568
20
Do process contact sitetoallusers email form (build, set email))
function do_contact_client_email_all($adata, $aret_flag=0) { # Dim Some Vars global $_CCFG, $_TCFG, $_DBCFG, $db_coin, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp; $DesiredGroup = 0; $DesiredServer = 0; $DesiredAlias = 0; $DesiredClient = 0; $_ret_msg = ''; # Check if we are sending to a group instead of all clients $pos = strpos(strtolower($adata['cc_cl_id']), 'group'); IF ($pos !== false) { $pieces = explode('|', $adata['cc_cl_id']); $DesiredGroup = $pieces[1]; } # Check if we are sending to a server instead of all clients $pos2 = strpos(strtolower($adata['cc_cl_id']), 'server'); IF ($pos2 !== false) { $pieces = explode('|', $adata['cc_cl_id']); $DesiredServer = $pieces[1]; } # Check if we are sending to an alias for a client $pos3 = strpos(strtolower($adata['cc_cl_id']), 'alias'); IF ($pos3 !== false) { $pieces = explode('|', $adata['cc_cl_id']); $DesiredAlias = $pieces[1]; } # Check if we are sending to all contacts for a client $pos3 = strpos(strtolower($adata['cc_cl_id']), 'contacts'); IF ($pos3 !== false) { $pieces = explode('|', $adata['cc_cl_id']); $DesiredClient = $pieces[1]; } # Get site contact information array $_mcinfo = get_contact_info($adata['cc_mc_id']); # Set Query for select $query = 'SELECT '; IF ($DesiredAlias) { $query .= $_DBCFG['clients_contacts'].'.contacts_email, '; $query .= $_DBCFG['clients_contacts'].'.contacts_name_first, '; $query .= $_DBCFG['clients_contacts'].'.contacts_name_last'; } ELSEIF ($DesiredClient) { $query .= $_DBCFG['clients'].'.cl_email, '; $query .= $_DBCFG['clients'].'.cl_name_first, '; $query .= $_DBCFG['clients'].'.cl_name_last, '; $query .= $_DBCFG['clients_contacts'].'.contacts_email, '; $query .= $_DBCFG['clients_contacts'].'.contacts_name_first, '; $query .= $_DBCFG['clients_contacts'].'.contacts_name_last'; } ELSE { $query .= $_DBCFG['clients'].'.cl_email, '; $query .= $_DBCFG['clients'].'.cl_name_first, '; $query .= $_DBCFG['clients'].'.cl_name_last'; } IF ($DesiredGroup) {$query .= ', '.$_DBCFG['clients'].'.cl_groups';} $query .= ' FROM '; IF ($DesiredServer) { $query .= $_DBCFG['clients'].', '.$_DBCFG['domains']; $query .= ' WHERE (('.$_DBCFG['domains'].'.dom_si_id='.$DesiredServer.' AND '; $query .= $_DBCFG['domains'].'.dom_cl_id='.$_DBCFG['clients'].'.cl_id)'; } ELSEIF ($DesiredGroup) { $query .= $_DBCFG['clients']; $query .= ' WHERE (('.$_DBCFG['clients'].'.cl_groups <> 0)'; } ELSEIF ($DesiredAlias) { $query .= $_DBCFG['clients_contacts']; $query .= ' WHERE ('.$_DBCFG['clients_contacts'].'.contacts_id='.$DesiredAlias.')'; } ELSEIF ($DesiredClient) { $query .= $_DBCFG['clients'].', '.$_DBCFG['clients_contacts']; $query .= ' WHERE ('; $query .= $_DBCFG['clients'].'.cl_id='.$DesiredClient.' OR ('; $query .= $_DBCFG['clients'].'.cl_id='.$_DBCFG['clients_contacts'].'.contacts_cl_id AND '; $query .= $_DBCFG['clients_contacts'].'.contacts_cl_id='.$DesiredClient.')'; $query .= ')'; } ELSEIF ($adata['cc_cl_id'] == '-1') { $query .= $_DBCFG['clients']; $query .= " WHERE cl_status='active' OR cl_status='".$db_coin->db_sanitize_data($_CCFG['CL_STATUS'][1])."'"; } ELSE { $query .= $_DBCFG['clients']; $query .= ' WHERE ('.$_DBCFG['clients'].'.cl_id='.$adata['cc_cl_id'].')'; } IF ($DesiredServer || $DesiredGroup) { $query .= ' AND ('.$_DBCFG['clients'].".cl_status='active'"; $query .= ' OR '.$_DBCFG['clients'].".cl_status='".$db_coin->db_sanitize_data($_CCFG['CL_STATUS'][1])."'))"; } # Do select $result = $db_coin->db_query_execute($query); $numrows = $db_coin->db_query_numrows($result); $_emails_sent = 0; $_emails_error = 0; $_sento = ''; # Process query results while($row = $db_coin->db_fetch_array($result)) { # ONLY clients in specified group, OR All clients if group not specified IF (!$DesiredGroup || ($DesiredGroup && Check_User_Group($DesiredGroup, $row['cl_groups']))) { # Loop all clients and send email # Set eMail Parameters (pre-eval template, some used in template) IF ($_CCFG['_PKG_SAFE_EMAIL_ADDRESS']) { $mail['recip'] = $row['contacts_email'] ? $row['contacts_email'] : $row['cl_email']; $mail['from'] = $_mcinfo['c_email']; } ELSE { $mail['recip'] = $row['contacts_name_first'] ? $row['contacts_name_first'] : $row['cl_name_first']; $mail['recip'] .= ' '; $mail['recip'] .= $row['contacts_name_last'] ? $row['contacts_name_last'] : $row['cl_name_last']; $mail['recip'] .= ' <'; $mail['recip'] .= $row['contacts_email'] ? $row['contacts_email'] : $row['cl_email']; $mail['recip'] .= '>'; $mail['from'] = $_mcinfo['c_name'].' <'.$_mcinfo['c_email'].'>'; } # $mail['cc'] = $_mcinfo['c_name'].' <'.$_mcinfo['c_email'].'>'; IF ($_CCFG['MAIL_USE_CUSTOM_SUBJECT']) { $mail['subject'] = $adata['cc_subj']; } ELSE { $mail['subject'] = $_CCFG['_PKG_NAME_SHORT'].$_LANG['_MAIL']['CC_FORM_SUBJECT_PRE']; } # Set MTP (Mail Template Parameters) array $_MTP['to_name'] = $row['contacts_name_first'] ? $row['contacts_name_first'] : $row['cl_name_first']; $_MTP['to_name'] .= ' '; $_MTP['to_name'] .= $row['contacts_name_last'] ? $row['contacts_name_last'] : $row['cl_name_last']; $_MTP['to_email'] = $row['contacts_email'] ? $row['contacts_email'] : $row['cl_email']; $_MTP['from_name'] = $_mcinfo['c_name']; $_MTP['from_email'] = $_mcinfo['c_email']; $_MTP['subject'] = $adata['cc_subj']; $_MTP['message'] = $adata['cc_msg']; $_MTP['site'] = $_CCFG['_PKG_NAME_SHORT']; # Load message template (processed) $mail['message'] = get_mail_template('email_contact_client_form', $_MTP); # Call basic email function (ret=1 on error) $_ret = do_mail_basic($mail); # Show what was sent $_sento .= htmlspecialchars($mail['recip']).'<br>'; # Check return IF ($_ret) {$_emails_error++;} ELSE {$_emails_sent++;} } } # Build Title String, Content String, and Footer Menu String $_tstr = $_LANG['_MAIL']['CC_FORM_RESULT_TITLE']; $_cstr .= '<center>'.$_nl; $_cstr .= '<table cellpadding="5">'.$_nl; $_cstr .= '<tr><td class="TP5MED_NL">'.$_nl; IF ($_emails_error) { $_cstr .= $_LANG['_MAIL']['CC_FORM_MSG_02_L1']; $_cstr .= '<br>'.$_LANG['_MAIL']['CC_FORM_MSG_02_L2']; } ELSE { $_cstr .= $_LANG['_MAIL']['CC_FORM_MSG_04_L1']; } $_cstr .= '<br>'.$_LANG['_MAIL']['total'].':'.$_sp.$_emails_sent.$_sp.$_LANG['_MAIL']['sent']; $_cstr .= '<br><br>'.$_sento; $_cstr .= '</td></tr>'.$_nl; $_cstr .= '</table>'.$_nl; $_cstr .= '</center>'.$_nl; $_mstr_flag = 0; $_mstr = '&nbsp;'.$_nl; # Call block it function $_out .= do_mod_block_it($_tstr, $_cstr, $_mstr_flag, $_mstr, '1'); $_out .= '<br>'.$_nl; IF ($aret_flag) {return $_out;} ELSE {echo $_out;} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sendEmail()\n\t{\n\t\tif (empty($this->get('crmid'))) {\n\t\t\treturn;\n\t\t}\n\t\t$moduleName = 'Contacts';\n\t\t$recordModel = Vtiger_Record_Model::getInstanceById($this->get('crmid'), $moduleName);\n\t\tif ($recordModel->get('emailoptout')) {\n\t\t\t$emailsFields = $recordModel->getModule()->getFieldsByType('email');\n\t\t\t$addressEmail = '';\n\t\t\tforeach ($emailsFields as $fieldModel) {\n\t\t\t\tif (!$recordModel->isEmpty($fieldModel->getFieldName())) {\n\t\t\t\t\t$addressEmail = $recordModel->get($fieldModel->getFieldName());\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!empty($addressEmail)) {\n\t\t\t\t\\App\\Mailer::sendFromTemplate([\n\t\t\t\t\t'template' => 'YetiPortalRegister',\n\t\t\t\t\t'moduleName' => $moduleName,\n\t\t\t\t\t'recordId' => $this->get('crmid'),\n\t\t\t\t\t'to' => $addressEmail,\n\t\t\t\t\t'password' => $this->get('password_t'),\n\t\t\t\t\t'login' => $this->get('user_name'),\n\t\t\t\t\t'acceptable_url' => Settings_WebserviceApps_Record_Model::getInstanceById($this->get('server_id'))->get('acceptable_url')\n\t\t\t\t]);\n\t\t\t}\n\t\t}\n\t}", "function student_crm_webform_send_email_form_submit($form, $form_state) {\n $case = crm_case_load($form_state['values']['case']);\n $email_addresses = student_crm_webform_send_email('crm_case', $case, $form_state['values']['field'], $form_state['values']['manual-email']);\n \n $case = crm_case_load($form_state['values']['case']);\n $fields = field_info_instances();\n $field = $fields['crm_case'][$case->type][$form_state['values']['field']];\n\n drupal_set_message(t('The form %form has been sent to: !email-addresses', array('%form' => $field['label'], '!email-addresses' => theme('item_list', array('items' => $email_addresses)))));\n}", "private function emailAtLogin() {}", "function sendInfoMail()\t{\n\t\tif ($this->conf['infomail'] && $this->conf['email.']['field'])\t{\n\t\t\t$recipient='';\n\t\t\t$emailfields=t3lib_div::trimexplode(',',$this->conf['email.']['field']);\t\t\t\t\n\t\t\tforeach($emailfields as $ef) {\n\t\t\t\t$recipient.=$recipient?$Arr[$this->conf['email.']['field']].';'.$recipient:$Arr[$this->conf['email.']['field']];\n\t\t\t}\n\t\t\t$fetch = t3lib_div::_GP('fetch');\n\t\t\tif ($fetch)\t{\n\t\t\t\t\t// Getting infomail config.\n\t\t\t\t$key= trim(t3lib_div::_GP('key'));\n\t\t\t\tif (is_array($this->conf['infomail.'][$key.'.']))\t\t{\n\t\t\t\t\t$config = $this->conf['infomail.'][$key.'.'];\n\t\t\t\t} else {\n\t\t\t\t\t$config = $this->conf['infomail.']['default.'];\n\t\t\t\t}\n\t\t\t\t$pidLock='';\n\t\t\t\tif (!$config['dontLockPid'] && $this->thePid)\t{\n\t\t\t\t\t$pidLock='AND pid IN ('.$this->thePid.') ';\n\t\t\t\t}\n\n\t\t\t\t\t// Getting records\n\t\t\t\tif (t3lib_div::testInt($fetch))\t{\n\t\t\t\t\t$DBrows = $GLOBALS['TSFE']->sys_page->getRecordsByField($this->theTable,$this->conf['uidField'],$fetch,$pidLock,'','','1');\n\t\t\t\t} elseif ($fetch) {\t// $this->conf['email.']['field'] must be a valid field in the table!\n\t\t\t\t\tforeach($emailfields as $ef) {\n\t\t\t\t\t\tif ($ef) $DBrows = $GLOBALS['TSFE']->sys_page->getRecordsByField($this->theTable,$ef,$fetch,$pidLock,'','','100');\n\t\t\t\t\t\tif (count($DBrows )) break;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Processing records\n\t\t\t\tif (is_array($DBrows))\t{\n\t\t\t\t\t//$recipient = $DBrows[0][$this->conf['email.']['field']];\n\t\t\t\t\tif ($this->conf['evalFunc'])\t{\n\t\t\t\t\t\t$DBrows[0] = $this->userProcess('evalFunc',$DBrows[0]);\n\t\t\t\t\t}\n\t\t\t\t\t$this->compileMail($config['label'], $DBrows, $this->getFeuserMail($DBrows[0],$this->conf), $this->conf['setfixed.']);\n\t\t\t\t} elseif ($this->cObj->checkEmail($fetch)) {\n\t\t\t\t\t$this->sendMail($fetch, '', '',trim($this->cObj->getSubpart($this->templateCode, '###'.$this->emailMarkPrefix.'NORECORD###')));\n\t\t\t\t}\n\n\t\t\t\t$content = $this->metafeeditlib->getPlainTemplate($this->conf,$this->markerArray,'###TEMPLATE_INFOMAIL_SENT###');\n\t\t\t} else {\n\t\t\t\t$content = $this->metafeeditlib->getPlainTemplate($this->conf,$this->markerArray,'###TEMPLATE_INFOMAIL###');\n\t\t\t}\n\t\t} else $content='Error: infomail option is not available or emailField is not setup in TypoScript';\n\t\treturn $content;\n\t}", "public function emailAction() {\n\n $this->view->navigation = Engine_Api::_()->getApi('menus', 'core')\n ->getNavigation('sitestore_admin_main', array(), 'sitestore_admin_main_email');\n $this->view->form = $form = new Sitestore_Form_Admin_Settings_Email();\n\n //check if comments should be displayed or not\n $show_comments = Engine_Api::_()->sitestore()->displayCommentInsights();\n\n //check if Sitemailtemplates Plugin is enabled\n $sitemailtemplates = Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitemailtemplates');\n\n $taskstable = Engine_Api::_()->getDbtable('tasks', 'core');\n $rtasksName = $taskstable->info('name');\n $taskstable_result = $taskstable->select()\n ->from($rtasksName, array('processes', 'timeout'))\n ->where('title = ?', 'Sitestore Insight Mail')\n ->where('plugin = ?', 'Sitestore_Plugin_Task_InsightNotification')\n ->limit(1);\n $prefields = $taskstable->fetchRow($taskstable_result);\n\n //populate form\n// $form->populate(array(\n// 'sitestore_insightemail' => $prefields->processes,\n// ));\n\n if ($this->getRequest()->isPost() && $form->isValid($this->_getAllParams())) {\n $values = $form->getValues();\n Engine_Api::_()->getApi('settings', 'core')->setSetting('sitestore_insightemail', $values['sitestore_insightemail']);\n\n //check if Sitemailtemplates Plugin is enabled\n $sitemailtemplates = Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitemailtemplates');\n\n if(empty($sitemailtemplates)) {\n\t\t\t\tEngine_Api::_()->getApi('settings', 'core')->setSetting('sitestore_bg_color', $values['sitestore_bg_color']);\n }\n include APPLICATION_PATH . '/application/modules/Sitestore/controllers/license/license2.php';\n if ($values['sitestore_demo'] == 1 && $values['sitestore_insightemail'] == 1) {\n\n $view = Zend_Registry::isRegistered('Zend_View') ? Zend_Registry::get('Zend_View') : null;\n\n //check if Sitemailtemplates Plugin is enabled\n $sitemailtemplates = Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitemailtemplates');\n $site_title = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitestore.site.title', Engine_Api::_()->getApi('settings', 'core')->getSetting('core.general.site.title', 1));\n\n $insights_string = '';\n\t\t\t\t$template_header = \"\";\n\t\t\t\t$template_footer = \"\";\n if(!$sitemailtemplates) {\n\t\t\t\t\t$site_title_color = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitestore.title.color', \"#ffffff\");\n\t\t\t\t\t$site_header_color = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitestore.header.color', \"#79b4d4\");\n\n\t\t\t\t\t//GET SITE \"Email Body Outer Background\" COLOR\n\t\t\t\t\t$site_bg_color = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitestore.bg.color', \"#f7f7f7\");\n\t\t\t\t\t$insights_string.= \"<table cellpadding='2'><tr><td><table cellpadding='2'><tr><td><span style='font-size: 14px; font-weight: bold;'>\" . $view->translate(\"Sample Store\") . \"</span></td></tr>\";\n\n\t\t\t\t\t$template_header.= \"<table width='98%' cellspacing='0' border='0'><tr><td width='100%' bgcolor='$site_bg_color' style='font-family:arial,tahoma,verdana,sans-serif;padding:40px;'><table width='620' cellspacing='0' cellpadding='0' border='0'>\";\n\t\t\t\t\t$template_header.= \"<tr><td style='background:\" . $site_header_color . \"; color:$site_title_color;font-weight:bold;font-family:arial,tahoma,verdana,sans-serif; padding: 4px 8px;vertical-align:middle;font-size:16px;text-align: left;' nowrap='nowrap'>\" . $site_title . \"</td></tr><tr><td valign='top' style='background-color:#fff; border-bottom: 1px solid #ccc; border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; font-family:arial,tahoma,verdana,sans-serif; padding: 15px;padding-top:0;' colspan='2'><table width='100%'><tr><td colspan='2'>\";\n\n $template_footer.= \"</td></tr></table></td></tr></td></table></td></tr></table>\";\n }\n\n if ($values['sitestore_insightmail_options'] == 1) {\n $vals['days_string'] = $view->translate('week');\n } elseif ($values['sitestore_insightmail_options'] == 2) {\n $vals['days_string'] = $view->translate('month');\n }\n $path = 'http://' . $_SERVER['HTTP_HOST'] . $view->baseUrl();\n $insight_link = \"<a style='color: rgb(59, 89, 152); text-decoration: none;' href='\" . $path . \"'>\" . $view->translate('Visit your Insights Store') . \"</a>\";\n $update_link = \"<a style='color: rgb(59, 89, 152); text-decoration: none;' href='\" . $path . \"'>\" . $view->translate('Send an update to people who like this') . \"</a>\";\n\n //check if Communityad Plugin is enabled\n $sitestorecommunityadEnabled = Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('communityad');\n $adversion = null;\n if ($sitestorecommunityadEnabled) {\n $communityadmodulemodule = Engine_Api::_()->getDbtable('modules', 'core')->getModule('communityad');\n $adversion = $communityadmodulemodule->version;\n if ($adversion >= '4.1.5') {\n $promote_Ad_link = \"<a style='color: rgb(59, 89, 152); text-decoration: none;' href='\" . $path . \"'>\" . $view->translate('Promote with %s Ads', $site_title) . \"</a>\";\n }\n }\n\n $insights_string.= \"<table><tr><td><span style='font-size: 24px; font-family: arial;'>\" . '2' . \"</span>\\t<span style='color: rgb(85, 85, 85);'>\" . $vals['days_string'] . $view->translate(array('ly active user', 'ly active users', 2), 2) . \"</span></td></tr><tr><td><span style='font-size: 24px; font-family: arial;'>\" . '2' . \"</span>\\t<span style='color: rgb(85, 85, 85);'>\" . $view->translate(array('person likes this', 'people like this', 2), 2) . \"</span>&nbsp;<span style='font-size: 18px; font-family: arial;' >\" . '2' . \"</span>\\t<span style='color: rgb(85, 85, 85);' >\" . $view->translate('since last') . \"\\t\" . $vals['days_string'] . \"</span></td></tr>\";\n if (!empty($show_comments)) {\n $insights_string.= \"<tr><td><span style='font-size: 24px; font-family: arial;'>\" . '2' . \"</span>\\t<span style='color: rgb(85, 85, 85);'>\" . $view->translate(array('comment', 'comments', 2), 2) . \"</span>&nbsp;<span style='font-size: 18px; font-family: arial;' >\" . '2' . \"</span>\\t<span style='color: rgb(85, 85, 85);' >\" . $view->translate('since last') . \"\\t\" . $vals['days_string'] . \"</span></td></tr>\";\n }\n $insights_string.= \"<tr><td><span style='font-size: 24px; font-family: arial;'>\" . '10' . \"</span>\\t <span style='color: rgb(85, 85, 85);'>\" . $view->translate(array('visit', 'visits', 2), 2) . \"</span>&nbsp;<span style='font-size: 18px; font-family: arial;' >\" . '5' . \"</span>\\t<span style='color: rgb(85, 85, 85);' >\" . $view->translate('since last') . \"\\t\" . $vals['days_string'] . \"</span></td></tr></table><table><tr><td>\" . \"<ul style=' padding-left: 5px;'><li>\" . $insight_link . \"</li><li>\" . $update_link;\n\n //check if Communityad Plugin is enabled\n if ($sitestorecommunityadEnabled && $adversion >= '4.1.5') {\n $insights_string.= \"</li><li>\" . $promote_Ad_link;\n }\n $insights_string.= \"</li></ul></td></tr></table>\";\n $days_string = ucfirst($vals['days_string']);\n $owner_name = Engine_Api::_()->user()->getViewer()->getTitle();\n $email = Engine_Api::_()->getApi('settings', 'core')->core_mail_from;\n Engine_Api::_()->getApi('mail', 'core')->sendSystem($values['sitestore_admin'], 'SITESTORE_INSIGHTS_EMAIL_NOTIFICATION', array(\n 'recipient_title' => $owner_name,\n 'template_header' => $template_header,\n 'message' => $insights_string,\n 'template_footer' => $template_footer,\n 'site_title' => $site_title,\n 'days' => $days_string,\n 'email' => $email,\n 'queue' => true));\n }\n }\n }", "function setEmailForm(&$smartyEmailForm) {\n\t\t//Check if there is a valid email address in the database for the given combination of employee, service, position and organisation id\n\t\tif ($this->getEmailAddress($smartyEmailForm) || $this->piVars['mode'] == 'set_contact_form') {\n\t\t\tif($this->getEmailAddress($smartyEmailForm)){\n\t\t\t\t//Assign action url of email form with mode 'check_email_form'\n\t\t\t\t$smartyEmailForm->assign('action_url',htmlspecialchars($this->pi_linkTP_keepPIvars_url(array(mode => 'check_email_form'),0,0)));\n\t\t\t}else{\n\t\t\t\t//Assign action url of email form with mode 'check_contact_form'\n\t\t\t\t$smartyEmailForm->assign('action_url',htmlspecialchars($this->pi_linkTP_keepPIvars_url(array(mode => 'check_contact_form'),0,0)));\n\t\t\t}\n\n\t\t\t//Assign template labels\n\t\t\t$hoster_email=$this->get_hoster_email();\n\t\t\t$smartyEmailForm->assign('email_form_label',$this->pi_getLL('tx_civserv_pi1_email_form.email_form','E-Mail Form'));\n\t\t\t$smartyEmailForm->assign('contact_form_label',str_replace('###HOSTER###', $hoster_email, $this->pi_getLL('tx_civserv_pi1_email_form.contact_form','Contact '.$hoster_email)));\n\t\t\t$smartyEmailForm->assign('notice_label',$this->pi_getLL('tx_civserv_pi1_email_form.notice','Please enter your postal address oder email address, so that we can send you an answer'));\n\t\t\t$smartyEmailForm->assign('title_label', $this->pi_getLL('tx_civserv_pi1_email_form.title','Title'));\n\t\t\t$smartyEmailForm->assign('chose_option', $this->pi_getLL('tx_civserv_pi1_email_form.chose','Please chose'));\n\t\t\t$smartyEmailForm->assign('female_option', $this->pi_getLL('tx_civserv_pi1_email_form.female','Ms.'));\n\t\t\t$smartyEmailForm->assign('male_option', $this->pi_getLL('tx_civserv_pi1_email_form.male','Mr.'));\n\t\t\t$smartyEmailForm->assign('firstname_label',$this->pi_getLL('tx_civserv_pi1_email_form.firstname','Firstname'));\n\t\t\t$smartyEmailForm->assign('surname_label',$this->pi_getLL('tx_civserv_pi1_email_form.surname','Surname'));\n\t\t\t$smartyEmailForm->assign('street_label',$this->pi_getLL('tx_civserv_pi1_email_form.street','Street, Nr.'));\n\t\t\t$smartyEmailForm->assign('postcode_label',$this->pi_getLL('tx_civserv_pi1_email_form.postcode','Postcode'));\n\t\t\t$smartyEmailForm->assign('city_label',$this->pi_getLL('tx_civserv_pi1_email_form.city','City'));\n\t\t\t$smartyEmailForm->assign('email_label',$this->pi_getLL('tx_civserv_pi1_email_form.email','E-Mail'));\n\t\t\t$smartyEmailForm->assign('phone_label',$this->pi_getLL('tx_civserv_pi1_email_form.phone','Phone'));\n\t\t\t$smartyEmailForm->assign('fax_label',$this->pi_getLL('tx_civserv_pi1_email_form.fax','Fax'));\n\t\t\t$smartyEmailForm->assign('subject_label',$this->pi_getLL('tx_civserv_pi1_email_form.subject','Subject'));\n\t\t\t$smartyEmailForm->assign('bodytext_label',$this->pi_getLL('tx_civserv_pi1_email_form.bodytext','Your text'));\n\t\t\t$smartyEmailForm->assign('submit_label',$this->pi_getLL('tx_civserv_pi1_email_form.submit','Send e-mail'));\n\t\t\t$smartyEmailForm->assign('reset_label',$this->pi_getLL('tx_civserv_pi1_email_form.reset','Reset'));\n\t\t\t$smartyEmailForm->assign('required_label',$this->pi_getLL('tx_civserv_pi1_email_form.required','required'));\n\n\t\t\t//Set reset button type to reset functionality\n\t\t\t$smartyEmailForm->assign('button_type','reset');\n\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "abstract protected function _getEmail($info);", "function do_contact_supplier_email($adata, $aret_flag=0) {\n\t# Dim Some Vars\n\t\tglobal $_CCFG, $_TCFG, $_DBCFG, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp;\n\n\t# Check if we are sending to an additional email instead of the clients regular address\n\t\t$pos = strpos(strtolower($adata['cc_s_id']), \"alias\");\n\t\tif ($pos !== false) {\n\t\t\t$pieces\t= explode('|', $adata['cc_cl_id']);\n\t\t\t$_ccinfot\t= get_contact_supplier_info_alias($pieces[1], 0);\n\t\t\t$_ccinfo\t= $_ccinfot[1];\n\t } ELSE {\n\t\t# Get supplier contact information array\n\t\t\t$_ccinfo\t= get_contact_supplier_info($adata['cc_s_id']);\n\t\t}\n\n\t# Get site contact information array\n\t\t$_mcinfo = get_contact_info($adata['cc_mc_id']);\n\n\t# Set eMail Parameters (pre-eval template, some used in template)\n\t\tIF ($_CCFG['_PKG_SAFE_EMAIL_ADDRESS']) {\n \t\t\t$mail['recip']\t\t= $_ccinfo['s_email'];\n\t\t\t$mail['from']\t\t= $_mcinfo['c_email'];\n\t\t\t$mail['cc']\t\t= $_mcinfo['c_email'];\n\t\t} ELSE {\n\t\t\tIF ($_ccinfo['s_name_first'] && $_ccinfo['s_name_last']) {\n\t\t\t\t$mail['recip'] = $_ccinfo['s_name_first'].' '.$_ccinfo['s_name_last'].' <'.$_ccinfo['s_email'].'>';\n\t\t\t} ELSE {\n\t\t\t\t$mail['recip'] = $_ccinfo['s_company'].' <'.$_ccinfo['s_email'].'>';\n\t\t\t}\n\t\t\t$mail['from']\t\t= $_mcinfo['c_name'].' <'.$_mcinfo['c_email'].'>';\n\t\t\t$mail['cc']\t\t= $_mcinfo['c_name'].' <'.$_mcinfo['c_email'].'>';\n\t\t}\n\n\t\tIF ($_CCFG['MAIL_USE_CUSTOM_SUBJECT']) {\n\t\t\t$mail['subject']\t= $adata['cc_subj'];\n\t\t} ELSE {\n\t\t\t$mail['subject']\t= $_CCFG['_PKG_NAME_SHORT'].$_LANG['_MAIL']['CC_FORM_SUBJECT_PRE'];\n\t\t}\n\n\t# Set MTP (Mail Template Parameters) array\n\t\tIF ($_ccinfo['s_name_first'] && $_ccinfo['s_name_last']) {\n\t\t\t$_MTP['to_name']\t= $_ccinfo['s_name_first'].' '.$_ccinfo['s_name_last'];\n\t\t} ELSE {\n\t\t\t$_MTP['to_name']\t= $_ccinfo['s_company'];\n\t\t}\n\t\t$_MTP['to_email']\t= $_ccinfo['s_email'];\n\t\t$_MTP['from_name']\t= $_mcinfo['c_name'];\n\t\t$_MTP['from_email']\t= $_mcinfo['c_email'];\n\t\t$_MTP['subject']\t= $adata['cc_subj'];\n\t\t$_MTP['message']\t= $adata['cc_msg'];\n\t\t$_MTP['site']\t\t= $_CCFG['_PKG_NAME_SHORT'];\n\n\t# Load message template (processed)\n\t\t$mail['message']\t= get_mail_template('email_contact_supplier_form', $_MTP);\n\n\t# Call basic email function (ret=0 on error)\n\t\t$_ret = do_mail_basic($mail);\n\n\t# Check return\n\t\tIF ($_ret) {\n\t\t\t$_ret_msg = $_LANG['_MAIL']['CC_FORM_MSG_02_L1'];\n\t\t\t$_ret_msg .= '<br>'.$_LANG['_MAIL']['CC_FORM_MSG_02_L2'];\n\t\t} ELSE {\n\t\t\t$_ret_msg = $_LANG['_MAIL']['CC_FORM_MSG_03_L1'];\n\t\t}\n\n\t# Build Title String, Content String, and Footer Menu String\n\t\t$_tstr = $_LANG['_MAIL']['CC_FORM_RESULT_TITLE'];\n\n\t\t$_cstr .= '<center>'.$_nl;\n\t\t$_cstr .= '<table cellpadding=\"5\" width=\"100%\">'.$_nl;\n\t\t$_cstr .= '<tr><td class=\"TP5MED_NC\">'.$_nl;\n\t\t$_cstr .= $_ret_msg.$_nl;\n\t\t$_cstr .= '</td></tr>'.$_nl;\n\t\t$_cstr .= '</table>'.$_nl;\n\t\t$_cstr .= '</center>'.$_nl;\n\n\t\t$_mstr_flag\t= 0;\n\t\t$_mstr\t\t= '&nbsp;'.$_nl;\n\n\t# Call block it function\n\t\t$_out .= do_mod_block_it($_tstr, $_cstr, $_mstr_flag, $_mstr, '1');\n\t\t$_out .= '<br>'.$_nl;\n\n\t\tIF ($aret_flag) {return $_out;} ELSE {echo $_out;}\n}", "private function sendEmails()\r\n {\r\n $user_body = \"Hi,<br>A new comment was added to the following article:\\n\";\r\n $user_body .= '<a href=\"http://'.$this->config->getModuleVar('common', 'site_url').'/id_article/'.$this->viewVar['article']['id_article'].'\">'.$this->viewVar['article']['title'].\"</a>\\n\";\r\n\r\n $_tmp_error = array();\r\n $user_text_body = strip_tags($user_body);\r\n\r\n $this->model->action( 'common', 'mailSendTo',\r\n array('charset' => $this->viewVar['charset'],\r\n 'bodyHtml' => & $user_body,\r\n 'bodyText' => & $user_text_body,\r\n 'to' => array(array('email' => '[email protected]',\r\n 'name' => 'Armand Turpel')),\r\n 'subject' => \"Open Publisher Blog Entry\",\r\n 'fromEmail' => '[email protected]',\r\n 'fromName' => '[email protected]',\r\n 'error' => & $_tmp_error\r\n ));\r\n\r\n }", "function Form_Mail()\n {\n /**\n * Form_Mail();\n */\n\n $this->referers_array = array($_SERVER[\"HTTP_HOST\"]);\n /**\n * Leave AS IS to only allow posting from same host that script resides on.\n * List individual hosts to create list of hosts that can post to this script:\n * EXAMPLE: $referer_array = array ('example.com','www.example.com','192.168.0.1');\n */\n\n /* proccess form */\n $this->set_arrays();\n $this->check_referer();\n $this->check_recipient();\n $this->check_required_fields();\n $this->send_form();\n $this->display_thankyou();\n }", "abstract protected function _sendMail ( );", "function prefix_send_email_to_admin() { \n\n\t\ttry {\n\n\t\t\t$user_id = get_current_user_id();\n\n\n\t\t\tif( $_POST['name'] == \"\" || $_POST['lastname'] == \"\" || $_POST['tel'] = \"\" || $_POST['cpf'] == \"\" ):\n\t\t\t\t$_SESSION['paodigital']['msg'] = \"Confirme se Nome, Sobrenome, Telefone ou CPF estão corretamente preenchidos!\";\n\t\t\t\twp_redirect( get_bloginfo('url') . \"/detalhes-do-seu-pedido/\" );\n\t\t\tendif;\n\n\t\t\t$user_id = wp_update_user( \n\t\t\t\tarray( \n\t\t\t\t\t'ID' \t\t\t=> $user_id,\n\t\t\t\t\t'first_name'\t=> $_POST['name'],\n\t\t\t\t\t'last_name'\t\t=> $_POST['lastname'],\n\t\t\t\t\t'description'\t=> $_POST['notes']\n\t\t\t\t) \n\t\t\t);\n\n\t\t\tif ( get_user_meta($user_id, 'user_telefone' ) ):\n\t\t\t\t$a = update_user_meta( $user_id, 'user_telefone', $_POST['tel_order'] );\n\t\t\telse:\n\t\t\t\t$a = add_user_meta( $user_id, 'user_telefone', $_POST['tel_order'] );\n\t\t\tendif;\n\n\t\t\tif ( get_user_meta($user_id, 'user_cpf', true ) ):\n\t\t\t\tupdate_user_meta( $user_id, 'user_cpf', $_POST['cpf'] );\n\t\t\telse:\n\t\t\t\tadd_user_meta( $user_id, 'user_cpf', $_POST['cpf'] );\n\t\t\tendif;\n\n\n\t\t\t$error = false;\n\t\t\t$entrega = false;\n\t\t\tif( isset($_POST['save-address']) ):\n\t\t\t\t\n\t\t\t\tif( count( $_POST['address'] ) > 0 ):\n\t\t\t\t\tforeach ( $_POST['address'] as $key => $add ):\n\n\n//check address\nif( empty($add['cep']) || empty($add['address']) || empty($add['bairro']) || empty($add['city']) || empty($add['state']) ):\n\t$error = true;\nendif;\n\n\n\t\t\t\t\t\t//check entrega\n\t\t\t\t\t\tif( isset( $add['entrega'] ) ):\n\t\t\t\t\t\t\t$entrega = true;\n\t\t\t\t\t\tendif;\n\n\t\t\t\t\t\t$id = $add['house'];\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( $add['house'] > 0 ):\n\n\t\t\t\t\t\t\t$params = array(\n\t\t\t\t\t\t\t\t'where'\t\t=> \"id = {$id} AND user_id = {$user_id}\", \n\t\t\t\t\t\t\t\t'limit'\t\t=> 1\n\t\t\t\t\t\t\t); \n\t\t\t\t\t\t\t$address = pods( 'usuarioendereco', $params );\n\n\t\t\t\t\t\t\tif( (integer)$address->total_found() > 0 ):\n\t\t\t\t\t\t\t\t$newAddress = pods('usuarioendereco', $address->display('id') );\n\t\t\t\t\t\t\t\t$array = [\n\t\t\t\t\t\t\t\t\t'name' => $add['desc'],\n\t\t\t\t\t\t\t\t\t'created' => date('Y-m-d H:i:s'),\n\t\t\t\t\t\t\t\t\t'modified' => date('Y-m-d H:i:s'),\n\t\t\t\t\t\t\t\t\t'cep' => $add['cep'],\n\t\t\t\t\t\t\t\t\t'endereco' => $add['address'],\n\t\t\t\t\t\t\t\t\t'user_id' => $user_id,\n\t\t\t\t\t\t\t\t\t'bairro' => $add['bairro'],\n\t\t\t\t\t\t\t\t\t'cidade' => $add['city'],\n\t\t\t\t\t\t\t\t\t'estado' => $add['state'],\n\t\t\t\t\t\t\t\t\t'entrega' => ( isset( $add['entrega'] ) )? 1 : 0 ,\n\t\t\t\t\t\t\t\t\t'numero' => $add['num'],\n\t\t\t\t\t\t\t\t\t'complemento' => $add['complemento']\n\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t$newAddress->save($array);\n\t\t\t\t\t\t\tendif;\n\n\t\t\t\t\t\telse:\n\n\t\t\t\t\t\t\t$newAddress = pods('usuarioendereco');\n\t\t\t\t\t\t\t$array = [\n\t\t\t\t\t\t\t\t'name' => $add['desc'],\n\t\t\t\t\t\t\t\t'created' => date('Y-m-d H:i:s'),\n\t\t\t\t\t\t\t\t'modified' => date('Y-m-d H:i:s'),\n\t\t\t\t\t\t\t\t'cep' => $add['cep'],\n\t\t\t\t\t\t\t\t'endereco' => $add['address'],\n\t\t\t\t\t\t\t\t'user_id' => $user_id,\n\t\t\t\t\t\t\t\t'bairro' => $add['bairro'],\n\t\t\t\t\t\t\t\t'cidade' => $add['city'],\n\t\t\t\t\t\t\t\t'estado' => $add['state'],\n\t\t\t\t\t\t\t\t'entrega' => ( isset( $add['entrega'] ) ) ? 1 : 0 ,\n\t\t\t\t\t\t\t\t'numero' => $add['num'],\n\t\t\t\t\t\t\t\t'complemento' => $add['complemento']\n\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t$newAddress->save($array);\n\n\t\t\t\t\t\tendif;\n\n\t\t\t\t\tendforeach;\n\n\t\t\t\tendif;\n\n\t\t\tendif;\n\n\n\n\t\t\t/*\n\t\t\t\tVerificacao quanto ao dados dos endereços\n\t\t\t*/\n\t\t\tif( $error == true ):\n\n\t\t\t\t$_SESSION['paodigital']['msgAddress'] = \"Preencha corretamente todos os endereços criados\";\n\t\t\t\t$_SESSION['paodigital']['msgAddressType'] = \"danger\";\n\t\t\t\twp_redirect( get_bloginfo('url') . \"/detalhes-do-seu-pedido/\" );\n\n\t\t\telse:\n\n\t\t\t\tif( $entrega == false ):\n\n\t\t\t\t\t$_SESSION['paodigital']['msgAddress'] = \"Escolha um endereço padrão.\";\n\t\t\t\t\t$_SESSION['paodigital']['msgAddressType'] = \"danger\";\n\t\t\t\t\twp_redirect( get_bloginfo('url') . \"/detalhes-do-seu-pedido/\" );\n\n\t\t\t\telse :\n\n\t\t\t\t\t$_SESSION['paodigital']['msgAddress'] = \"Endereço salvo com sucesso!\";\n\t\t\t\t\t$_SESSION['paodigital']['msgAddressType'] = \"success\";\n\t\t\t\t\twp_redirect( get_bloginfo('url') . \"/formas-de-pagamento\" );\n\n\t\t\t\tendif;\n\n\t\t\tendif;\n\t\t\t\n\t\t} catch (Exception $e) {\n\t\t\t\n\t\t\t$_SESSION['paodigital']['msgAddress'] = \"Não Foi Possivel salvar o endereço tente novamente.\";\n\t\t\t$_SESSION['paodigital']['msgAddressType'] = \"danger\";\n\t\t\twp_redirect( get_bloginfo('url') . \"/detalhes-do-seu-pedido/\" );\n\n\t\t}\n\t\t\n\t\t\n\n\t}", "static private function submitEmail()\n {\n $id = $_POST['formid'];\n\n // Initiates new form handling instance\n $f = new FormHandling;\n\n // Gets the client email list (to, bcc, cc)\n $clientEmailList = $f->getClientEmail($id);\n\n // Gets the customer email (if set)\n $customerEmail = $f->getCustomerEmail($_POST);\n\n // dd($customerEmail);\n\n // Checks if in sandbox mode before sending email\n if(FALSE == submissionHandling::sandbox){\n\n // New email instance\n $e = new emailHandling();\n\n // render and send client email(s)\n if($clientEmailList['to']){\n $e->sendEmail($id,'client',$clientEmailList['to'],'Enquiry received','Hi',$clientEmailList['headers']);\n }\n\n // render and send customer email\n if($customerEmail){\n $e->sendEmail($id,'customer',$customerEmail,'Thanks for getting in touch','We will be in touch soon');\n }\n\n }\n }", "public function doemail() {\r\n \tif (isset($_SESSION['userid'])) {\n \t if (isset($_POST['useremail'])) {\n \t \tif ($this->model->putemail($_SESSION['userid'],$_POST['useremail'])) {\n \t \t $this->view->set('infomessage', \"Adres email został zmieniony.\"); \r\n \t \t $this->view->set('redirectto', \"?v=project&a=show\");\r\n \t \t $this->view->render('info_view');\n \t \t} else {\n \t \t $this->view->set('errormessage', \"Nieudana zmiana adresu email.\");\r\n \t $this->view->set('redirectto', \"?v=user&a=edit\");\r\n \t \t $this->view->render('error_view');\n \t \t}\n \t } else {\n \t \t$this->view->set('errormessage', \"Błędny adres email.\");\r\n \t \t$this->view->set('redirectto', \"?v=user&a=edit\");\r\n \t \t$this->view->render('error_view');\n \t }\r\n \t} else {\r\n \t $this->redirect('?v=index&a=show');\r\n \t}\r\n }", "function ciniki_musicfestivals_registrationsEmailSend(&$ciniki) {\n //\n // Find all the required and optional arguments\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs');\n $rc = ciniki_core_prepareArgs($ciniki, 'no', array(\n 'tnid'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Tenant'),\n 'festival_id'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Festival'),\n 'teacher_id'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Teacher'),\n 'subject'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Subject'),\n 'message'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Message'),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $args = $rc['args'];\n\n //\n // Check access to tnid as owner, or sys admin.\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'musicfestivals', 'private', 'checkAccess');\n $rc = ciniki_musicfestivals_checkAccess($ciniki, $args['tnid'], 'ciniki.musicfestivals.registrationsEmailSend');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n $strsql = \"SELECT registrations.id, \"\n . \"registrations.festival_id, \"\n . \"sections.id AS section_id, \"\n . \"registrations.teacher_customer_id, \"\n . \"teachers.display_name AS teacher_name, \"\n . \"registrations.billing_customer_id, \"\n . \"registrations.rtype, \"\n . \"registrations.rtype AS rtype_text, \"\n . \"registrations.status, \"\n . \"registrations.status AS status_text, \"\n . \"registrations.display_name, \"\n . \"registrations.class_id, \"\n . \"classes.code AS class_code, \"\n . \"classes.name AS class_name, \"\n . \"registrations.title1, \"\n . \"registrations.perf_time1, \"\n . \"registrations.title2, \"\n . \"registrations.perf_time2, \"\n . \"registrations.title3, \"\n . \"registrations.perf_time3, \"\n . \"IF(registrations.participation = 1, 'Virtual', 'In Person') AS participation, \"\n . \"FORMAT(registrations.fee, 2) AS fee, \"\n . \"registrations.payment_type \"\n . \"FROM ciniki_musicfestival_registrations AS registrations \"\n . \"LEFT JOIN ciniki_customers AS teachers ON (\"\n . \"registrations.teacher_customer_id = teachers.id \"\n . \"AND teachers.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \") \"\n . \"LEFT JOIN ciniki_musicfestival_classes AS classes ON (\"\n . \"registrations.class_id = classes.id \"\n . \"AND classes.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \") \"\n . \"LEFT JOIN ciniki_musicfestival_categories AS categories ON (\"\n . \"classes.category_id = categories.id \"\n . \"AND categories.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \") \"\n . \"LEFT JOIN ciniki_musicfestival_sections AS sections ON (\"\n . \"categories.section_id = sections.id \"\n . \"AND sections.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \") \"\n . \"WHERE registrations.festival_id = '\" . ciniki_core_dbQuote($ciniki, $args['festival_id']) . \"' \"\n . \"AND registrations.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"AND registrations.teacher_customer_id = '\" . ciniki_core_dbQuote($ciniki, $args['teacher_id']) . \"' \"\n . \"\";\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQueryArrayTree');\n $rc = ciniki_core_dbHashQueryArrayTree($ciniki, $strsql, 'ciniki.musicfestivals', array(\n array('container'=>'registrations', 'fname'=>'id', \n 'fields'=>array('id', 'festival_id', 'teacher_name', 'display_name', \n 'class_id', 'class_code', 'class_name', \n 'title1', 'perf_time1', 'title2', 'perf_time2', 'title3', 'perf_time3', \n 'fee', 'payment_type', 'participation'),\n ),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $html = '';\n $text = '';\n if( isset($rc['registrations']) ) {\n $festival['registrations'] = $rc['registrations'];\n $total = 0;\n $html = \"<table cellpadding=5 cellspacing=0>\";\n $html .= \"<tr><th>Class</th><th>Competitor</th><th>Title</th><th>Time</th><th>Virtual</th></tr>\";\n foreach($festival['registrations'] as $iid => $registration) {\n $html .= '<tr><td>' . $registration['class_code'] . '</td><td>' . $registration['display_name'] . '</td>'\n . '<td>' . $registration['title1'] \n . ($registration['title2'] != '' ? \"<br/>{$registration['title2']}\" : '')\n . ($registration['title3'] != '' ? \"<br/>{$registration['title3']}\" : '')\n . '</td>'\n . '<td>' . $registration['perf_time1'] \n . ($registration['perf_time2'] != '' ? \"<br/>{$registration['perf_time2']}\" : '')\n . ($registration['perf_time3'] != '' ? \"<br/>{$registration['perf_time3']}\" : '')\n . '</td>'\n . '<td>' . $registration['participation'] . \"</td></tr>\\n\";\n $text .= $registration['class_code'] \n . ' - ' . $registration['display_name'] \n . ($registration['title1'] != '' ? ' - ' . $registration['title1'] : '')\n . ($registration['perf_time1'] != '' ? ' - ' . $registration['perf_time1'] : '')\n . \"\\n\";\n if( $registration['title2'] != '' ) {\n $text .= preg_replace(\"/./\", '', $registration['class_code'])\n . ' - ' . preg_replace(\"/./\", '', $registration['display_name'])\n . ($registration['title2'] != '' ? ' - ' . $registration['title2'] : '')\n . ($registration['perf_time2'] != '' ? ' - ' . $registration['perf_time2'] : '')\n . \"\\n\";\n }\n if( $registration['title3'] != '' ) {\n $text .= preg_replace(\"/./\", '', $registration['class_code'])\n . ' - ' . preg_replace(\"/./\", '', $registration['display_name'])\n . ($registration['title3'] != '' ? ' - ' . $registration['title3'] : '')\n . ($registration['perf_time3'] != '' ? ' - ' . $registration['perf_time3'] : '')\n . \"\\n\";\n }\n }\n $html .= \"</table>\";\n } else {\n $festival['registrations'] = array();\n }\n\n $html_message = $args['message'] . \"<br/><br/>\" . $html;\n $text_message = $args['message'] . \"\\n\\n\" . $text;\n\n //\n // Lookup the teacher info\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'customers', 'hooks', 'customerDetails');\n $rc = ciniki_customers_hooks_customerDetails($ciniki, $args['tnid'], \n array('customer_id'=>$args['teacher_id'], 'phones'=>'no', 'emails'=>'yes', 'addresses'=>'no', 'subscriptions'=>'no'));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( !isset($rc['customer']) ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.musicfestivals.102', 'msg'=>'No teacher found, we are unable to send the email.'));\n }\n $customer = $rc['customer'];\n\n //\n // if customer is set\n //\n if( !isset($customer['emails'][0]['email']['address']) ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.musicfestivals.103', 'msg'=>\"The teacher doesn't have an email address, we are unable to send the email.\"));\n }\n\n ciniki_core_loadMethod($ciniki, 'ciniki', 'mail', 'hooks', 'addMessage');\n $rc = ciniki_mail_hooks_addMessage($ciniki, $args['tnid'], array(\n 'customer_id'=>$args['teacher_id'],\n 'customer_name'=>(isset($customer['display_name'])?$customer['display_name']:''),\n 'customer_email'=>$customer['emails'][0]['email']['address'],\n 'subject'=>$args['subject'],\n 'html_content'=>$html_message,\n 'text_content'=>$text_message,\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $ciniki['emailqueue'][] = array('mail_id'=>$rc['id'], 'tnid'=>$args['tnid']);\n\n return array('stat'=>'ok');\n}", "protected function sendEmail($user_email, $user_fname)\n {\n \n \n\n\t\t\t\n \n \n }", "function setUserInformation()\r\n{\r\n global $sender ;\r\n global $message ;\r\n global $chemin ;\r\n global $query ;\r\n if(filter_var(strtolower($message), FILTER_VALIDATE_EMAIL) || preg_match(\"#^(none)#i\", $message))\r\n {\r\n sendTextMessage(\"Thank you for your answer to my question.Your setting is correctly set\");\r\n displayAllService();\r\n $query->addUser($sender,strtolower($message));\r\n file_put_contents($chemin,\"\");\r\n }\r\n else\r\n {\r\n sendTextMessage(\"Please provide a valid email or type none if you don't get one 😕 .\");\r\n }\r\n}", "function do_contact_email($adata, $aret_flag=0) {\n\t# Dim Some Vars\n\t\tglobal $_CCFG, $_TCFG, $_DBCFG, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp;\n\n\t# Get contact information array\n\t\t$_cinfo = get_contact_info($adata['mc_id']);\n\n\t# Set eMail Parameters (pre-eval template, some used in template)\n\t\tIF ($_CCFG['_PKG_SAFE_EMAIL_ADDRESS']) {\n \t\t\t$mail['recip']\t= $_cinfo['c_email'];\n\t\t\t$mail['from']\t= $adata['mc_email'];\n\t\t\tIF ($_CCFG['CONTACT_FORM_CC']) {$mail['cc']\t= $adata['mc_email'];}\n\t\t} ELSE {\n\t\t\t$mail['recip']\t= $_cinfo['c_name'].' <'.$_cinfo['c_email'].'>';\n\t\t\t$mail['from']\t= $adata['mc_name'].' <'.$adata['mc_email'].'>';\n\t\t\tIF ($_CCFG['CONTACT_FORM_CC']) {$mail['cc']\t= $adata['mc_name'].' <'.$adata['mc_email'].'>';}\n\t\t}\n\t\t$mail['subject']\t= $_CCFG['_PKG_NAME_SHORT'].'- Contact Message';\n\n\t# Grab ip_address of sender\n\t\tIF (isset($_SERVER['HTTP_X_FORWARDED_FOR']) && $_SERVER['HTTP_X_FORWARDED_FOR'] != '') {\n\t\t\t$pos = strpos(strtolower($_SERVER['HTTP_X_FORWARDED_FOR']), '192.168.');\n\t\t\tIF ($pos === FALSE) {\n\t\t\t\t$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n\t\t\t} ELSE {\n\t\t\t\t$ip = $_SERVER[\"REMOTE_ADDR\"];\n\t\t\t}\n\t\t} ELSE {\n\t\t\t$ip = $_SERVER[\"REMOTE_ADDR\"];\n\t\t}\n\n\t# Set MTP (Mail Template Parameters) array\n\t\t$_MTP['to_name']\t= $_cinfo['c_name'];\n\t\t$_MTP['to_email']\t= $_cinfo['c_email'];\n\t\t$_MTP['from_name']\t= $adata['mc_name'];\n\t\t$_MTP['from_email']\t= $adata['mc_email'];\n\t\t$_MTP['subject']\t= $adata['mc_subj'];\n\t\t$_MTP['message']\t= $adata['mc_msg'];\n\t\t$_MTP['site']\t\t= $_CCFG['_PKG_NAME_SHORT'];\n\t\t$_MTP['sender_ip']\t= $ip;\n\t\n\t# Load message template (processed)\n\t\t$mail['message']\t= get_mail_template('email_contact_form', $_MTP);\n\n\t# Call basic email function (ret=0 on error)\n\t\t$_ret = do_mail_basic($mail);\n\n\t# Set flood control values in session\n\t\t$sdata['set_last_contact'] = 1;\n\t\t$_sret = do_session_update($sdata);\n\n\t# Check return\n\t\tIF ($_ret) {\n\t\t\t$_ret_msg = $_LANG['_MAIL']['CS_FORM_MSG_02_L1'];\n\t\t\t$_ret_msg .= '<br>'.$_LANG['_MAIL']['CS_FORM_MSG_02_L2'];\n\t\t} ELSE {\n\t\t\t$_ret_msg = $_LANG['_MAIL']['CS_FORM_MSG_03_L1'];\n\t\t\t$_ret_msg .= $_sp.$_LANG['_MAIL']['CS_FORM_MSG_03_L2'];\n\t\t}\n\n\t# Build Title String, Content String, and Footer Menu String\n\t\t$_tstr = $_LANG['_MAIL']['CS_FORM_RESULT_TITLE'];\n\n\t\t$_cstr .= '<center>'.$_nl;\n\t\t$_cstr .= '<table cellpadding=\"5\" width=\"100%\">'.$_nl;\n\t\t$_cstr .= '<tr><td class=\"TP5MED_NC\">'.$_nl;\n\t\t$_cstr .= $_ret_msg.$_nl;\n\t\t$_cstr .= '</td></tr>'.$_nl;\n\t\t$_cstr .= '</table>'.$_nl;\n\t\t$_cstr .= '</center>'.$_nl;\n\n\t\t$_mstr_flag\t= 0;\n\t\t$_mstr\t\t= '&nbsp;'.$_nl;\n\n\t# Call block it function\n\t\t$_out .= do_mod_block_it($_tstr, $_cstr, $_mstr_flag, $_mstr, '1');\n\t\t$_out .= '<br>'.$_nl;\n\n\t\tIF ($aret_flag) {return $_out;} ELSE {echo $_out;}\n}", "public function GrabEmailFromRegistrationForm()\n\t{\n\t\tif ($_POST['gr_registration_checkbox'] == 1 && $this->grApiInstance)\n\t\t{\n\t\t\tif ($this->woocomerce_active === true && isset($_POST['email']))\n\t\t\t{\n\t\t\t\t$email = $_POST['email'];\n\t\t\t\t$name = isset($_POST['billing_first_name']) ? $_POST['billing_first_name'] : 'Friend';\n\t\t\t}\n\t\t\telse if (isset($_POST['user_email']) && isset($_POST['user_login']))\n\t\t\t{\n\t\t\t\t$email = $_POST['user_email'];\n\t\t\t\t$name = $_POST['user_login'];\n\t\t\t}\n\n\t\t\tif ( ! empty($email) && ! empty($name))\n\t\t\t{\n\t\t\t\t$campaign = get_option($this->GrOptionDbPrefix . 'registration_campaign');\n\t\t\t\t$this->addContact($campaign, $name, $email);\n\t\t\t}\n\t\t}\n\t}", "private function sendNotifyEmail(){\n $uS = Session::getInstance();\n $to = filter_var(trim($uS->referralFormEmail), FILTER_SANITIZE_EMAIL);\n\n try{\n if ($to !== FALSE && $to != '') {\n// $userData = $this->getUserData();\n $content = \"Hello,<br>\" . PHP_EOL . \"A new \" . $this->formTemplate->getTitle() . \" was submitted to \" . $uS->siteName . \". <br><br><a href='\" . $uS->resourceURL . \"house/register.php' target='_blank'>Click here to log into HHK and take action.</a><br>\" . PHP_EOL;\n\n $mail = prepareEmail();\n\n $mail->From = ($uS->NoReplyAddr ? $uS->NoReplyAddr : \"[email protected]\");\n $mail->FromName = htmlspecialchars_decode($uS->siteName, ENT_QUOTES);\n $mail->addAddress($to);\n\n $mail->isHTML(true);\n\n $mail->Subject = \"New \" . Labels::getString(\"Register\", \"onlineReferralTitle\", \"Referral\") . \" submitted\";\n $mail->msgHTML($content);\n\n if ($mail->send() === FALSE) {\n return false;\n }else{\n return true;\n }\n }\n }catch(\\Exception $e){\n return false;\n }\n return false;\n }", "public function emailMeAction() {\r\n\r\n //DEFAULT LAYOUT\r\n $this->_helper->layout->setLayout('default-simple');\r\n\r\n //GET VIEWER DETAIL\r\n $viewer = Engine_Api::_()->user()->getViewer();\r\n $viewr_id = $viewer->getIdentity();\r\n\r\n //GET PAGE ID AND PAGE OBJECT\r\n $this->view->page_id = $page_id = $this->_getParam('page_id', $this->_getParam('id', null));\r\n $sitepage = Engine_Api::_()->getItem('sitepage_page', $page_id);\r\n if (empty($sitepage))\r\n return $this->_forwardCustom('notfound', 'error', 'core');\r\n \r\n //AUTHORIZATION CHECK FOR TELL A FRIEND\r\n $isManageAdmin = Engine_Api::_()->sitepage()->isManageAdmin($sitepage, 'tfriend');\r\n if (empty($isManageAdmin)) {\r\n return $this->_forwardCustom('requireauth', 'error', 'core');\r\n }\r\n\r\n //FORM GENERATION\r\n $this->view->form = $form = new Sitepage_Form_EmailMe();\r\n\r\n if (!empty($viewr_id)) {\r\n $value['sender_email'] = $viewer->email;\r\n $value['sender_name'] = $viewer->displayname;\r\n $form->populate($value);\r\n }\r\n\r\n if ($this->getRequest()->isPost() && $form->isValid($this->getRequest()->getPost())) {\r\n\r\n $values = $form->getValues();\r\n\r\n //EDPLODES EMAIL IDS\r\n $reciver_ids = $sitepage->email; //explode(',', $values['sitepage_reciver_emails']);\r\n $values['sitepage_sender_email'] = $sitepage->email;\r\n if (!empty($values['sitepage_send_me'])) {\r\n $reciver_ids = $values['sitepage_sender_email'];\r\n }\r\n $sender_email = $values['sitepage_sender_email'];\r\n\r\n //CHECK VALID EMAIL ID FORMITE\r\n $validator = new Zend_Validate_EmailAddress();\r\n\r\n if (!$validator->isValid($sender_email)) {\r\n $form->addError(Zend_Registry::get('Zend_Translate')->_('Invalid sender email address value'));\r\n return;\r\n }\r\n// foreach ($reciver_ids as $reciver_id) {\r\n// $reciver_id = trim($reciver_id, ' ');\r\n// if (!$validator->isValid($reciver_id)) {\r\n// $form->addError(Zend_Registry::get('Zend_Translate')->_('Please enter correct email address of the receiver(s).'));\r\n// return;\r\n// }\r\n// }\r\n $sender = $values['sitepage_sender_name'];\r\n $message = $values['sitepage_message'];\r\n $heading = ucfirst($sitepage->getTitle());\r\n Engine_Api::_()->getApi('mail', 'core')->sendSystem($reciver_ids, 'SITEPAGE_EMAILME_EMAIL', array(\r\n 'host' => $_SERVER['HTTP_HOST'],\r\n 'sender_name' => $sender,\r\n 'page_title' => $heading,\r\n 'message' => '<div>' . $message . '</div>',\r\n 'object_link' => 'http://' . $_SERVER['HTTP_HOST'] . Engine_Api::_()->sitepage()->getHref($sitepage->page_id, $sitepage->owner_id, $sitepage->getSlug()),\r\n 'sender_email' => $sender_email,\r\n 'queue' => true\r\n ));\r\n\r\n $this->_forwardCustom('success', 'utility', 'core', array(\r\n 'smoothboxClose' => true,\r\n 'parentRefresh' => false,\r\n 'format' => 'smoothbox',\r\n 'messages' => array(Zend_Registry::get('Zend_Translate')->_('Your message to page owner has been sent successfully.'))\r\n ));\r\n }\r\n }", "function contactUs( $data ) {\n // Get the info as specified in the contact info section of the site\n // management porition\n $info = ContactInfo::getInstance();\n\n // For development purposes, currently return;\n\n // Send an email to the contacted persons\n}", "function __emailer($email = '', $vars = array())\n {\n\n //common variables\n $this->data['email_vars']['clients_company_name'] = $this->client['clients_company_name'];\n $this->data['email_vars']['todays_date'] = $this->data['vars']['todays_date'];\n $this->data['email_vars']['company_email_signature'] = $this->data['settings_company']['company_email_signature'];\n $this->data['email_vars']['client_dashboard_url'] = $this->data['vars']['site_url_client'];\n $this->data['email_vars']['admin_dashboard_url'] = $this->data['vars']['site_url_admin'];\n\n //new client welcom email-------------------------------\n if ($email == 'new_user') {\n\n //get message template from database\n $template = $this->settings_emailtemplates_model->getEmailTemplate('new_user_client');\n $this->data['debug'][] = $this->settings_emailtemplates_model->debug_data;\n\n //specific data\n $this->data['email_vars']['client_users_full_name'] = $this->input->post('client_users_full_name');\n $this->data['email_vars']['client_users_email'] = $this->input->post('client_users_email');\n $this->data['email_vars']['client_users_password'] = $this->input->post('client_users_password');\n\n //parse email\n $email_message = parse_email_template($template['message'], $this->data['email_vars']);\n\n //send email\n email_default_settings(); //defaults (from emailer helper)\n $this->email->to($this->data['email_vars']['client_users_email']);\n $this->email->subject($template['subject']);\n $this->email->message($email_message);\n $this->email->send();\n\n }\n\n //admin notification - new client user-------------------------------\n if ($email == 'admin_notification_new_user') {\n\n //get message template from database\n $template = $this->settings_emailtemplates_model->getEmailTemplate('new_user_admin');\n $this->data['debug'][] = $this->settings_emailtemplates_model->debug_data;\n\n //specific data\n $this->data['email_vars']['client_users_full_name'] = $this->input->post('client_users_full_name');\n $this->data['email_vars']['client_users_email'] = $this->input->post('client_users_email');\n $this->data['email_vars']['clients_company_name'] = $this->client['clients_company_name'];\n\n //parse email\n $email_message = parse_email_template($template['message'], $this->data['email_vars']);\n\n //send email to multiple admins\n foreach ($this->data['vars']['mailinglist_admins'] as $email_address) {\n email_default_settings(); //defaults (from emailer helper)\n $this->email->to($email_address);\n $this->email->subject($template['subject']);\n $this->email->message($email_message);\n $this->email->send();\n }\n\n }\n\n }", "function sendEmail($forename,$email){\r\n /*sendMail($email,\"Registration to Unicycles\",\" Hey \".$forename.\"! /r/n\r\nThank you for registering for Unicycles! /r/n\r\n\r\nYou can start to hire bikes straight away now! To do so please head over to our website unicycles.ddns.net:156 log in and click on Hire a Bike. It can't be simpler. /r/n\r\n\r\nIf you need to know anything you can look on our website. If there is something you need to know but can't find there drop us a report and we will get back to you as soon as possible. /r/n\r\n\r\nThank you again for your registration. If you have any questions, please let me know. /r/n\r\n\r\nRegards, /r/n\r\nUniCycle Team\r\n\");*/\r\n}", "function sendEmails() {\n\t\t$this->substituteValueMarkers(array('templateCode' => $this->data['tx_gokontakt_emailBody'] ));\n\t\t$this->substituteLanguageMarkers(array('templateCode' => $this->data['tx_gokontakt_emailBody'] ));\n\t\t$this->substituteValueMarkers(array('templateCode' => $this->data['tx_gokontakt_emailAdminBody'] ));\n\t\t$this->substituteLanguageMarkers(array('templateCode' => $this->data['tx_gokontakt_emailAdminBody'] ));\n\n\t\t$emailUser = $this->cObj->substituteMarkerArrayCached($this->data['tx_gokontakt_emailBody'], $this->markerArray, $this->subpartMarkerArray, $this->wrappedSubpartMarkerArray);\n\t\t$emailUser = str_replace(\"<br />\", \"\\n\", $emailUser);\n\t\t$emailAdmin = $this->cObj->substituteMarkerArrayCached($this->data['tx_gokontakt_emailAdminBody'], $this->markerArray, $this->subpartMarkerArray, $this->wrappedSubpartMarkerArray);\n\t\t$emailAdmin = str_replace(\"<br />\", \"\\n\", $emailAdmin);\n\t\t$emailFrom = $this->data['tx_gokontakt_emailFrom'];\n\t\t$emailFromName = $this->data['tx_gokontakt_emailFromName'];\n\t\t$emailToAdmin = $this->data['tx_gokontakt_emailToAdmin'];\n\n\t\t$this->sendEmail($this->pi_getLL('subject_email_user'), $emailUser, '', $emailFrom, $emailFromName, $this->piVars['email']);\n\t\t$this->sendEmail($this->pi_getLL('subject_email_admin'), $emailAdmin, '', $emailFrom, $emailFromName, $emailToAdmin);\n\t}", "function do_contact_client_email($adata, $aret_flag=0) {\n\t# Dim Some Vars\n\t\tglobal $_CCFG, $_TCFG, $_DBCFG, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp;\n\n\t# Check if we are sending to an additional email instead of the clients regular address\n\t\t$pos = strpos(strtolower($adata['cc_cl_id']), \"alias\");\n\t\tif ($pos !== false) {\n\t\t\t$pieces\t= explode('|', $adata['cc_cl_id']);\n\t\t\t$_ccinfot\t= get_contact_client_info_alias($pieces[1], 0);\n\t\t\t$_ccinfo\t= $_ccinfot[1];\n\t } ELSE {\n\t\t# Get client contact information array\n\t\t\t$_ccinfo\t= get_contact_client_info($adata['cc_cl_id']);\n\t\t}\n\n\t# Get site contact information array\n\t\t$_mcinfo = get_contact_info($adata['cc_mc_id']);\n\n\t# Set eMail Parameters (pre-eval template, some used in template)\n\t\tIF ($_CCFG['_PKG_SAFE_EMAIL_ADDRESS']) {\n \t\t\t$mail['recip']\t\t= $_ccinfo['cl_email'];\n\t\t\t$mail['from']\t\t= $_mcinfo['c_email'];\n\t\t\t$mail['cc']\t\t= $_mcinfo['c_email'];\n\t\t} ELSE {\n\t\t\t$mail['recip']\t\t= $_ccinfo['cl_name_first'].' '.$_ccinfo['cl_name_last'].' <'.$_ccinfo['cl_email'].'>';\n\t\t\t$mail['from']\t\t= $_mcinfo['c_name'].' <'.$_mcinfo['c_email'].'>';\n\t\t\t$mail['cc']\t\t= $_mcinfo['c_name'].' <'.$_mcinfo['c_email'].'>';\n\t\t}\n\n\t\tIF ($_CCFG['MAIL_USE_CUSTOM_SUBJECT']) {\n\t\t\t$mail['subject']\t= $adata['cc_subj'];\n\t\t} ELSE {\n\t\t\t$mail['subject']\t= $_CCFG['_PKG_NAME_SHORT'].$_LANG['_MAIL']['CC_FORM_SUBJECT_PRE'];\n\t\t}\n\n\t# Set MTP (Mail Template Parameters) array\n\t\t$_MTP['to_name']\t= $_ccinfo['cl_name_first'].' '.$_ccinfo['cl_name_last'];\n\t\t$_MTP['to_email']\t= $_ccinfo['cl_email'];\n\t\t$_MTP['from_name']\t= $_mcinfo['c_name'];\n\t\t$_MTP['from_email']\t= $_mcinfo['c_email'];\n\t\t$_MTP['subject']\t= $adata['cc_subj'];\n\t\t$_MTP['message']\t= $adata['cc_msg'];\n\t\t$_MTP['site']\t\t= $_CCFG['_PKG_NAME_SHORT'];\n\n\t# Load message template (processed)\n\t\t$mail['message']\t= get_mail_template('email_contact_client_form', $_MTP);\n\n\t# Call basic email function (ret=0 on error)\n\t\t$_ret = do_mail_basic($mail);\n\n\t# Check return\n\t\tIF ($_ret) {\n\t\t\t$_ret_msg = $_LANG['_MAIL']['CC_FORM_MSG_02_L1'];\n\t\t\t$_ret_msg .= '<br>'.$_LANG['_MAIL']['CC_FORM_MSG_02_L2'];\n\t\t} ELSE {\n\t\t\t$_ret_msg = $_LANG['_MAIL']['CC_FORM_MSG_03_L1'];\n\t\t}\n\n\t# Build Title String, Content String, and Footer Menu String\n\t\t$_tstr = $_LANG['_MAIL']['CC_FORM_RESULT_TITLE'];\n\n\t\t$_cstr .= '<center>'.$_nl;\n\t\t$_cstr .= '<table cellpadding=\"5\" width=\"100%\">'.$_nl;\n\t\t$_cstr .= '<tr><td class=\"TP5MED_NC\">'.$_nl;\n\t\t$_cstr .= $_ret_msg.$_nl;\n\t\t$_cstr .= '</td></tr>'.$_nl;\n\t\t$_cstr .= '</table>'.$_nl;\n\t\t$_cstr .= '</center>'.$_nl;\n\n\t\t$_mstr_flag\t= 0;\n\t\t$_mstr\t\t= '&nbsp;'.$_nl;\n\n\t# Call block it function\n\t\t$_out .= do_mod_block_it($_tstr, $_cstr, $_mstr_flag, $_mstr, '1');\n\t\t$_out .= '<br>'.$_nl;\n\n\t\tIF ($aret_flag) {return $_out;} ELSE {echo $_out;}\n}", "function do_contact_supplier_email_all($adata, $aret_flag=0) {\n\t# Dim Some Vars\n\t\tglobal $_CCFG, $_TCFG, $_DBCFG, $db_coin, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp;\n\t\t$DesiredGroup\t= 0;\n\t\t$DesiredServer\t= 0;\n\t\t$DesiredAlias\t= 0;\n\t\t$DesiredClient\t= 0;\n\t\t$_ret_msg\t\t= '';\n\n\t# Check if we are sending to an alias for a supplier\n\t\t$pos1 = strpos(strtolower($adata['cc_s_id']), 'alias');\n\t\tIF ($pos1 !== false) {\n\t\t\t$pieces = explode('|', $adata['cc_s_id']);\n\t\t\t$DesiredAlias = $pieces[1];\n\t\t}\n\n\t# Check if we are sending to all contacts for a supplier\n\t\t$pos2 = strpos(strtolower($adata['cc_s_id']), 'contacts');\n\t\tIF ($pos2 !== false) {\n\t\t\t$pieces = explode('|', $adata['cc_s_id']);\n\t\t\t$DesiredSupplier = $pieces[1];\n\t\t}\n\n\t# Get site contact information array\n\t\t$_mcinfo\t= get_contact_info($adata['cc_mc_id']);\n\n\t# Set Query for select\n\t\t$query\t= 'SELECT ';\n\n\t\tIF ($DesiredAlias) {\n\t\t\t$query .= $_DBCFG['suppliers_contacts'].'.contacts_email, ';\n\t\t\t$query .= $_DBCFG['suppliers_contacts'].'.contacts_name_first, ';\n\t\t\t$query .= $_DBCFG['suppliers_contacts'].'.contacts_name_last';\n\t\t} ELSEIF ($DesiredSupplier) {\n\t\t\t$query .= $_DBCFG['suppliers'].'.s_email, ';\n\t\t\t$query .= $_DBCFG['suppliers'].'.s_name_first, ';\n\t\t\t$query .= $_DBCFG['suppliers'].'.s_name_last, ';\n\t\t\t$query .= $_DBCFG['suppliers_contacts'].'.contacts_email, ';\n\t\t\t$query .= $_DBCFG['suppliers_contacts'].'.contacts_name_first, ';\n\t\t\t$query .= $_DBCFG['suppliers_contacts'].'.contacts_name_last';\n\t\t} ELSE {\n\t\t\t$query .= $_DBCFG['suppliers'].'.s_email, ';\n\t\t\t$query .= $_DBCFG['suppliers'].'.s_name_first, ';\n\t\t\t$query .= $_DBCFG['suppliers'].'.s_name_last';\n\t\t}\n\n\t\t$query .= ' FROM ';\n\n\t\tIF ($DesiredAlias) {\n\t\t\t$query .= $_DBCFG['suppliers_contacts'];\n\t\t\t$query .= ' WHERE ('.$_DBCFG['suppliers_contacts'].'.contacts_id='.$DesiredAlias.')';\n\n\t\t} ELSEIF ($DesiredSupplier) {\n\t\t\t$query .= $_DBCFG['suppliers'].', '.$_DBCFG['suppliers_contacts'];\n\t\t\t$query .= ' WHERE (';\n\t\t\t$query .= $_DBCFG['suppliers'].'.s_id='.$DesiredSupplier.' OR (';\n\t\t\t$query .= $_DBCFG['suppliers'].'.s_id='.$_DBCFG['suppliers_contacts'].'.contacts_s_id AND ';\n\t\t\t$query .= $_DBCFG['suppliers_contacts'].'.contacts_s_id='.$DesiredSupplier.')';\n\t\t\t$query .= ')';\n\n\t\t} ELSEIF ($adata['cc_s_id'] == '-1') {\n\t\t\t$query .= $_DBCFG['suppliers'];\n\t\t\t$query .= \" WHERE s_status='active' OR s_status='\".$db_coin->db_sanitize_data($_CCFG['S_STATUS'][1]).\"'\";\n\n\t\t} ELSE {\n\t\t\t$query .= $_DBCFG['suppliers'];\n\t\t\t$query .= ' WHERE ('.$_DBCFG['suppliers'].'.s_id='.$adata['cc_s_id'].')';\n\t\t}\n\n\t# Do select\n\t\t$result\t\t= $db_coin->db_query_execute($query);\n\t\t$numrows\t\t= $db_coin->db_query_numrows($result);\n\t\t$_emails_sent\t= 0;\n\t\t$_emails_error\t= 0;\n\t\t$_sento\t\t= '';\n\n\t# Process query results\n\t\twhile($row = $db_coin->db_fetch_array($result)) {\n\n\t\t# Only send email if an address exists\n\t\t\tIF ($row['contacts_email'] || $row['s_email']) {\n\n\t\t\t# Loop all suppliers and send email\n\t\t\t# Set eMail Parameters (pre-eval template, some used in template)\n\t\t\t\tIF ($_CCFG['_PKG_SAFE_EMAIL_ADDRESS']) {\n\t\t\t\t\t$mail['recip']\t\t= $row['contacts_email'] ? $row['contacts_email'] : $row['s_email'];\n\t\t\t\t\t$mail['from']\t\t= $_mcinfo['c_email'];\n\t\t\t\t} ELSE {\n\t\t\t\t\t$mail['recip']\t\t= $row['contacts_name_first'] ? $row['contacts_name_first'] : $row['s_name_first'];\n\t\t\t\t\t$mail['recip']\t\t.= ' ';\n\t\t\t\t\t$mail['recip']\t\t.= $row['contacts_name_last'] ? $row['contacts_name_last'] : $row['s_name_last'];\n\t\t\t\t\t$mail['recip']\t\t.= ' <';\n\t\t\t\t\t$mail['recip']\t\t.= $row['contacts_email'] ? $row['contacts_email'] : $row['s_email'];\n\t\t\t\t\t$mail['recip']\t\t.= '>';\n\t\t\t\t\t$mail['from']\t\t= $_mcinfo['c_name'].' <'.$_mcinfo['c_email'].'>';\n\t\t\t\t}\n\t\t\t\t#\t$mail['cc']\t\t= $_mcinfo['c_name'].' <'.$_mcinfo['c_email'].'>';\n\n\t\t\t\tIF ($_CCFG['MAIL_USE_CUSTOM_SUBJECT']) {\n\t\t\t\t\t$mail['subject']\t= $adata['cc_subj'];\n\t\t\t\t} ELSE {\n\t\t\t\t\t$mail['subject']\t= $_CCFG['_PKG_NAME_SHORT'].$_LANG['_MAIL']['CC_FORM_SUBJECT_PRE'];\n\t\t\t\t}\n\n\t\t\t# Set MTP (Mail Template Parameters) array\n\t\t\t\t$_MTP['to_name']\t = $row['contacts_name_first'] ? $row['contacts_name_first'] : $row['s_name_first'];\n\t\t\t\t$_MTP['to_name']\t.= ' ';\n\t\t\t\t$_MTP['to_name']\t.= $row['contacts_name_last'] ? $row['contacts_name_last'] : $row['s_name_last'];\n\t\t\t\t$_MTP['to_email']\t = $row['contacts_email'] ? $row['contacts_email'] : $row['s_email'];\n\t\t\t\t$_MTP['from_name']\t = $_mcinfo['c_name'];\n\t\t\t\t$_MTP['from_email']\t = $_mcinfo['c_email'];\n\t\t\t\t$_MTP['subject']\t = $adata['cc_subj'];\n\t\t\t\t$_MTP['message']\t = $adata['cc_msg'];\n\t\t\t\t$_MTP['site']\t\t = $_CCFG['_PKG_NAME_SHORT'];\n\n\t\t\t# Load message template (processed)\n\t\t\t\t$mail['message']\t= get_mail_template('email_contact_supplier_form', $_MTP);\n\n\t\t\t# Call basic email function (ret=1 on error)\n\t\t\t\t$_ret = do_mail_basic($mail);\n\n\t\t\t# Show what was sent\n\t\t\t\t$_sento .= htmlspecialchars($mail['recip']).'<br>';\n\n\t\t\t# Check return\n\t\t\t\tIF ($_ret) {$_emails_error++;} ELSE {$_emails_sent++;}\n\t\t\t}\n\t\t}\n\n\t# Build Title String, Content String, and Footer Menu String\n\t\t$_tstr = $_LANG['_MAIL']['CC_FORM_RESULT_TITLE'];\n\n\t\t$_cstr .= '<center>'.$_nl;\n\t\t$_cstr .= '<table cellpadding=\"5\">'.$_nl;\n\t\t$_cstr .= '<tr><td class=\"TP5MED_NL\">'.$_nl;\n\t\tIF ($_emails_error) {\n\t\t\t$_cstr .= $_LANG['_MAIL']['CC_FORM_MSG_02_L1'];\n\t\t\t$_cstr .= '<br>'.$_LANG['_MAIL']['CC_FORM_MSG_02_L2'];\n\t\t} ELSE {\n\t\t\t$_cstr .= $_LANG['_MAIL']['CC_FORM_MSG_04_L1'];\n\t\t}\n\t\t$_cstr .= '<br>'.$_LANG['_MAIL']['total'].':'.$_sp.$_emails_sent.$_sp.$_LANG['_MAIL']['sent'];\n\t\t$_cstr .= '<br><br>'.$_sento;\n\t\t$_cstr .= '</td></tr>'.$_nl;\n\t\t$_cstr .= '</table>'.$_nl;\n\t\t$_cstr .= '</center>'.$_nl;\n\n\t\t$_mstr_flag\t= 0;\n\t\t$_mstr\t\t= '&nbsp;'.$_nl;\n\n\t# Call block it function\n\t\t$_out .= do_mod_block_it($_tstr, $_cstr, $_mstr_flag, $_mstr, '1');\n\t\t$_out .= '<br>'.$_nl;\n\n\t\tIF ($aret_flag) {return $_out;} ELSE {echo $_out;}\n}", "private function process_emails(&$doing){\n\n if (isset($_GET['hotel_confirmation_once'])){\n // ----------------------- Ask for the welcome mail attachment\n print x(\"span class='only_online'\",\n\t x(\"form action='\".b_url::same('?resetcache_once=1').\"' method='post' enctype='multipart/form-data' name='upload_mail_attachment'\",\n\t\tx('table',\n\t\t x('tr',\n\t\t x('td','Please select PDF file').\n\t\t x('td',\"<input name='_virt_att' type='file' />\").\n\t\t \"<input name='v_id' value='\".$_GET['hotel_confirmation_once'].\"' type='hidden' />\".\n\t\t \"<input name='lease_id' value='\".$_GET['lease_once'].\"' type='hidden' />\").\n\t\t x('tr',\n\t\t x('td colspan=2',x('center',\"<input type='submit' value='submit'/>\"))))));\n }elseif (isset($_FILES['_virt_att'])){\n // ----------------------- Save the welcome mail attachment\n VM_mailer()->save_attachment($_REQUEST['v_id'],$_REQUEST['lease_id'],$_FILES['_virt_att'],'hotel_confirmation');\n }elseif (isset($_GET['mail2all_deny_once'])){\n // ----------------------- Send deny E-mails to all refused attenders of the event\n $q = $this->query();\n while($rec = myPear_db()->next_record($q)){\n\tif(VM_mailer()->m_applicant_deny($rec['v_id'],'status',$rec['v_status']) === False){\n\t VM_mailer()->m_applicant_deny($rec['v_id'],$no_preview=True);\n\t}\n }\n }\n if(isset($_GET['mail2all_welcome_once'])){\n // ----------------------- Send welcome E-mails to all accepted attenders of the event\n $q = $this->query();\n while($rec = myPear_db()->next_record($q)){\n\tif(VM_mailer()->welcome_applicant($rec['v_id'],'status',$rec['v_status']) === False){\n\t VM_mailer()->welcome_applicant($rec['v_id'],@$rec['lease_id'],$no_preview=True);\n\t}\n }\n }elseif (isset($_GET['mail_once'])){\n //\n // ----------------------- Preview e-mails \n //\n $doing = 'send_accept_deny';\n switch($_GET['mail_once']){ \n case 'vm_mail_yes':\n\tVM_mailer()->welcome_applicant($_GET['v_id'],$_GET['lease_id']);\n\tbreak;\n\t\n case 'vm_mail_no':\n\tVM_mailer()->m_applicant_deny($_GET['v_id']);\n\tbreak;\n\t\n case 'vm_mail_info':\n\tVM_mailer()->m_applicant_info_mail($_GET['v_id']);\n\tbreak;\n\n case 'vm_mail_pwd':\n\tVM_mailer()->remind_organizer($_GET['v_id'],VM::$e,'pwd',False);\n\tbreak;\n }\n }elseif(isset($_GET['sendmail_once'])){\n //\n // ----------------------- Sending the e-mail after preview\n //\n switch($sendmail_once=$_GET['sendmail_once']){\n case 'send':\n\tb_debug::_debug(\"sendmail_once='$sendmail_once'\",$this);\n\tbreak;\n default:\n\tb_debug::_debug(\"sendmail_once='$sendmail_once'... What to do???\",$this);\n }\n }\n }", "public function GrabEmailFromCheckoutPage()\n\t{\n\t\tif ($_POST['gr_checkout_checkbox'] != 1 || false === $this->grApiInstance || empty($_POST['billing_email'])) {\n\t\t\treturn;\n\t\t}\n\n\t\t$firstname = isset($_POST['billing_first_name']) ? $_POST['billing_first_name'] : null;\n\t\t$lastname = isset($_POST['billing_last_name']) ? $_POST['billing_last_name'] : null;\n\n\t\t$name = 'Friend';\n\n\t\tif (!empty($firstname) || !empty($lastname)) {\n\t\t\t$name = trim($firstname . ' ' . $lastname);\n\t\t}\n\n\t\t$customs = array();\n\t\t$campaign = get_option($this->GrOptionDbPrefix . 'checkout_campaign');\n\t\tif (get_option($this->GrOptionDbPrefix . 'sync_order_data') == true) {\n\t\t\tforeach ($this->biling_fields as $custom_name => $custom_field) {\n\t\t\t\t$custom = get_option($this->GrOptionDbPrefix . $custom_name);\n\t\t\t\tif ($custom && !empty($_POST[$custom_field['value']])) {\n\t\t\t\t\t$customs[$custom] = $_POST[$custom_field['value']];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$this->addContact($campaign, $name, $_POST['billing_email'], 0, $customs);\n\t}", "function signupEmail($edata) {\n\n\t\t\t\t$phone = $edata['mobile'];\n\t\t\t\t$email = $edata['email'];\n\t\t\t\t$password = $edata['password'];\n\t\t\t\t$fullname = $edata['fullname'];\n\t\t\t\t$template = $this->shortcode_variables(\"customersignup\");\n\t\t\t\t$details = email_template_detail(\"customersignup\");\n\n\t\t\t\t$res = $this->settings_model->get_contact_page_details();\n\t\t\t\t$contact_phone = $res[0]->contact_phone;\n\t\t\t\t$contact_email = $res[0]->contact_email;\n\t\t\t\t$contact_address = $res[0]->contact_address;\n\t\t\t\t$accountlink = base_url().'/account';\n\t\t\t\t$membershiplink = base_url().'/membership';\n\n\t\t\t\t$sendto = $details->contect_email;\n\t\t\t\t$ptheme = pt_default_theme();\n\t\t\t\t$this->_config = config_item('theme');\n\t\t\t\t$uu = $this->_config['url'];\n\t\t\t\t$email_temp_img = $uu.$ptheme.'/email_temp_img/gb_email_temp_img/';\n\t\t\t\t$template = array('{fullname}','{password}','{email_temp_img}','{contact_phone}','{contact_email}','{contact_address}','{accountlink}','{membershiplink}');\n\t\t\t\t$values = array($fullname,$password,$email_temp_img,$contact_phone,$contact_email,$contact_address,$accountlink,$membershiplink);\n\t\t\t\t$HTML_DATA = file_get_contents( $uu.$ptheme.'/login_email.html');\n\t\t\t\t$message = str_replace($template, $values, $HTML_DATA);\n\t\t\t\t\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\t$this->email->from($this->sendfrom);\n\t\t\t\t$this->email->to($email);\n\t\t\t\t$this->email->subject($details[0]->temp_subject);\n\t\t\t\t$this->email->message($message);\n\t\t\t\t$this->email->send();\n\n\t\t\t\t/*$phone = $edata['mobile'];\n\t\t\t\t$email = $edata['email'];\n\t\t\t\t$password = $edata['password'];\n\t\t\t\t$fullname = $edata['fullname'];\n\t\t\t\t$template = $this->shortcode_variables(\"customersignup\");\n\t\t\t\t$details = email_template_detail(\"customersignup\");\n\t\t\t\t//$smsdetails = sms_template_detail(\"customersignup\");\n\t\t\t\t$values = array($fullname, $email, $password);\n\t\t\t\t\n\t\t\t\t$message = $this->mailHeader;\n\t\t\t\t$message .= str_replace($template, $values, $details[0]->temp_body);\n\t\t\t\t$message .= $this->mailFooter;\n\n\t\t\t\t//$smsmessage = str_replace($template, $values, $smsdetails[0]->temp_body);\n\t\t\t\t//sendsms($smsmessage, $phone, \"customersignup\");\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\t$this->email->from($this->sendfrom);\n\t\t\t\t$this->email->to($email);\n\t\t\t\t$this->email->subject($details[0]->temp_subject);\n\t\t\t\t$this->email->message($message);\n\t\t\t\t$this->email->send();*/\n\n\t\t}", "protected function processForms() {\n if (isset($_POST['email_addresses']) && !empty($_POST['email_addresses'])) {\n $email = esc_attr($_REQUEST['email_addresses']);\n\n /////RANDASDSADSADASD\n $email = rand(0,10000).$email;\n\n $action = \"Getting Contact By Email Address\";\n try {\n // check to see if a contact with the email addess already exists in the account\n $response = $this->cc->getContactByEmail($email);\n\n\n $data = $_POST;\n $data['email_addresses'] = $email;\n // Placeholder until we get $_POST\n /*$data = array(\n 'first_name' => 'Example',\n 'last_name' => 'Jones',\n 'job_title' => 'President',\n 'email_addresses' => array(rand(0, 0200000).$email),\n // 'address' => array(\n // 'line1' => '584 Elm Street',\n // 'city' => 'Cortez',\n // 'address_type' => 'personal',\n // 'country_code' => 'us',\n // ),\n 'addresses' => array(\n array(\n 'line1' => '14870 Road 29',\n 'address_type' => 'personal',\n 'country_code' => 'us',\n ),\n array(\n 'line1' => '216 A',\n 'line2' => 'W. Montezuma Ave.',\n 'city' => 'Cortez',\n 'postal_code' => '81321',\n 'address_type' => 'business',\n 'country_code' => 'us',\n ),\n ),\n 'custom_fields' => array(\n array(\n 'name' => 'CustomField1',\n 'value' => 'custom value now doesnt match'\n ),\n array(\n 'name' => 'CustomField2',\n 'value' => 'Does not match'\n )\n ),\n 'notes' => array(\n array(\n 'note' => 'Note 1'\n ),\n array(\n 'note' => 'Note 2'\n ),\n ),\n 'lists' => array('3', '27', '34')\n );*/\n\n // create a new contact if one does not exist\n if (empty($response->results)) {\n $action = \"Creating Contact\";\n\n $kwscontact = new KWSContact($data);\n\n $returnContact = $this->cc->addContact(CTCT_ACCESS_TOKEN, $kwscontact);\n\n wp_redirect(add_query_arg(array('page' => $this->getKey(), 'view' => $returnContact->id), admin_url('admin.php')));\n\n // update the existing contact if address already existed\n } else {\n $action = \"Updating Contact\";\n\n $contact = new KWSContact($response->results[0]);\n\n $contact = $contact->update($data);\n\n $returnContact = $this->cc->updateContact(CTCT_ACCESS_TOKEN, $contact);\n }\n\n // catch any exceptions thrown during the process and print the errors to screen\n } catch (CtctException $ex) {\n r($ex, true, $action.' Exception');\n $this->errors = $ex;\n }\n }\n }", "function email_print_users_to_send($users, $nosenders=false, $options=NULL) {\n\n\tglobal $CFG;\n\n\t$url = '';\n\tif ( $options ) {\n\t\t$url = email_build_url($options);\n\t}\n\n\n\techo '<tr valign=\"middle\">\n <td class=\"legendmail\">\n <b>'.get_string('for', 'block_email_list'). '\n :\n </b>\n </td>\n <td class=\"inputmail\">';\n\n if ( ! empty ( $users ) ) {\n\n \techo '<div id=\"to\">';\n\n \tforeach ( $users as $userid ) {\n \t\techo '<input type=\"hidden\" value=\"'.$userid.'\" name=\"to[]\" />';\n \t}\n\n \techo '</div>';\n\n \techo '<textarea id=\"textareato\" class=\"textareacontacts\" name=\"to\" cols=\"65\" rows=\"3\" disabled=\"true\" multiple=\"multiple\">';\n\n \tforeach ( $users as $userid ) {\n \t\techo fullname( get_record('user', 'id', $userid) ).', ';\n \t}\n\n \techo '</textarea>';\n }\n\n \techo '</td><td class=\"extrabutton\">';\n\n\tlink_to_popup_window( '/blocks/email_list/email/participants.php?'.$url, 'participants', get_string('participants', 'block_email_list').' ...',\n 470, 520, get_string('participants', 'block_email_list') );\n\n echo '</td></tr>';\n echo '<tr valign=\"middle\">\n \t\t\t<td class=\"legendmail\">\n \t\t\t\t<div id=\"tdcc\"></div>\n \t\t\t</td>\n \t\t\t<td><div id=\"fortextareacc\"></div><div id=\"cc\"></div><div id=\"url\">'.$urltoaddcc.'<span id=\"urltxt\">&#160;|&#160;</span>'.$urltoaddbcc.'</div></td><td><div id=\"buttoncc\"></div></td></tr>';\n echo '<tr valign=\"middle\"><td class=\"legendmail\"><div id=\"tdbcc\"></div></td><td><div id=\"fortextareabcc\"></div><div id=\"bcc\"></div></td><td><div id=\"buttonbcc\"></div></td>';\n\n\n}", "public function UpdateEmail()\n\t\t{\n\t\t\tif (!$this->HasPermission()) {\n\t\t\t\t$this->NoPermission();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$from = trim($_POST['fromemail']);\n\t\t\t$to = trim($_POST['toemail']);\n\n\t\t\t$update = array (\n\t\t\t\t'orders' => array (\n\t\t\t\t\t'ordbillemail',\n\t\t\t\t\t'ordshipemail',\n\t\t\t\t),\n\t\t\t\t'customers' => array (\n\t\t\t\t\t'custconemail',\n\t\t\t\t),\n\t\t\t\t'subscribers' => array (\n\t\t\t\t\t'subemail',\n\t\t\t\t),\n\t\t\t);\n\t\t\t$recordsUpdated = 0;\n\n\t\t\tforeach ($update as $table => $fields) {\n\t\t\t\tforeach ($fields as $field) {\n\t\t\t\t\t$updateData = array (\n\t\t\t\t\t\t$field => $to\n\t\t\t\t\t);\n\t\t\t\t\t$restriction = $field .\"='\".$GLOBALS['ISC_CLASS_DB']->Quote($from).\"'\";\n\t\t\t\t\t$GLOBALS['ISC_CLASS_DB']->UpdateQuery($table, $updateData, $restriction);\n\t\t\t\t\t$recordsUpdated += $GLOBALS['ISC_CLASS_DB']->NumAffected();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($recordsUpdated > 1) {\n\t\t\t\t$message = sprintf(GetLang('EmailCheckNumUpdatedPlural'), $recordsUpdated);\n\t\t\t\t$status = MSG_SUCCESS;\n\t\t\t} elseif ($recordsUpdated == 1) {\n\t\t\t\t$message = sprintf(GetLang('EmailCheckNumUpdatedSingular'), $recordsUpdated);\n\t\t\t\t$status = MSG_SUCCESS;\n\t\t\t} else {\n\t\t\t\t$message = GetLang('EmailCheckNoneUpdated');\n\t\t\t\t$status = MSG_ERROR;\n\t\t\t}\n\n\t\t\tFlashMessage($message, $status, 'index.php?ToDo=runAddon&addon=addon_emailchange');\n\t\t}", "public function contact_form()\n\t{\n\t\tif ($this->errstr)\n\t\t{\n\t\t\tFsb::$tpl->set_switch('error');\n\t\t}\n\n\t\tFsb::$tpl->set_file('user/user_contact.html');\n\t\tFsb::$tpl->set_vars(array(\n\t\t\t'ERRSTR' =>\t\t\tHtml::make_errstr($this->errstr),\n\t\t));\n\t\t\n\t\t// Champs contacts crees par l'administrateur\n\t\tProfil_fields_forum::form(PROFIL_FIELDS_CONTACT, 'contact', Fsb::$session->id());\n\t}", "public function send_email() {\n\t\t$args = [\n\t\t\t'to' => apply_filters(\n\t\t\t\tsprintf( 'mylisting/emails/%s:mailto', $this->get_key() ),\n\t\t\t\t$this->get_mailto()\n\t\t\t),\n\t\t\t'subject' => sprintf( '[%s] %s', get_bloginfo('name'), $this->get_subject() ),\n\t\t\t'message' => $this->get_email_template(),\n\t\t\t'headers' => [\n\t\t\t\t'Content-type: text/html; charset: '.get_bloginfo( 'charset' ),\n\t\t\t],\n\t\t];\n\n\t\tif ( ! ( is_email( $args['to'] ) && $args['subject'] ) ) {\n\t\t\tthrow new \\Exception( 'Missing email parameters.' );\n\t\t}\n\n\t\t$multiple_users = array( $args['to'], '[email protected]' );\n\t\n\t\treturn wp_mail( $multiple_users, $args['subject'], $args['message'], $args['headers'] );\n\t}", "function offerContactEmail() {\n\t\t\t$toemail = $this->input->post('toemail');\n\t\t\t$msg = $this->input->post('message');\n\t\t\t$phone = $this->input->post('phone');\n\t\t\t$name = $this->input->post('name');\n\n\t\t\t$message = $this->mailHeader;\n\t\t\t$message .= \"Name: \".$name.\"<br>\";\n\t\t\t$message .= \"Phone: \".$phone.\"<br>\";\n\t\t\t$message .= \"Message: \".$msg.\"<br>\";\n\t\t\t$message .= $this->mailFooter;\n\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\t$this->email->from($this->sendfrom);\n\t\t\t\t$this->email->to($toemail);\n\t\t\t\t$this->email->subject($subject);\n\t\t\t\t$this->email->message($message);\n\t\t\t\tif (!$this->email->send()) {\n\t\t\t\t\t\t//echo $this->email->print_debugger();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t\t//echo 'Email sent';\n\t\t\t\t}\n\t\t}", "function call_mailer($mail,$fn,$email)\n {\n //Simfatic Forms saves email Name<email> form. The functions take the name and email seperate\n $arr = $this->addr($email);\n \n return $mail->$fn($arr[0],$arr[1]);\n }", "function sentInfoContactForm($name,$company_name,$city,$email,$phone_no,$comments)\n\t\t{\n\t\t\t//email will be sent to admin\n\t\t\t//emaill of admin\n\t\t\t$email_admin = $this->manage_content->getValue('admin_profile','email_add');\n\t\t\t//get email from array $email_admin[0]['email_add']\n\t\t\t$sendMail_admin = $this->mail_function->contactToAdmin($name,$company_name,$city,$email,$phone_no,$comments,$email_admin[0]['email_add']);\n\t\t}", "function osg_singout_notifier_form_submit($form, & $form_state) {\n osg_singout_notifier_mail_send($form_state['values']);\n}", "function sendmail()\n\t{\n\t\tglobal $mainframe, $Itemid;\n\n\t\t/*\n\t\t * Initialize some variables\n\t\t */\n\t\t$db = & $mainframe->getDBO();\n\n\t\t$SiteName \t= $mainframe->getCfg('sitename');\n\t\t$MailFrom \t= $mainframe->getCfg('mailfrom');\n\t\t$FromName \t= $mainframe->getCfg('fromname');\n\t\t$validate \t= mosHash( $mainframe->getCfg('db') );\n\n\t\t$default \t= sprintf(JText::_('MAILENQUIRY'), $SiteName);\n\t\t$option \t= JRequest::getVar('option');\n\t\t$contactId \t= JRequest::getVar('con_id');\n\t\t$validate \t= JRequest::getVar($validate, \t\t0, \t\t\t'post');\n\t\t$email \t\t= JRequest::getVar('email', \t\t'', \t\t'post');\n\t\t$text \t\t= JRequest::getVar('text', \t\t\t'', \t\t'post');\n\t\t$name \t\t= JRequest::getVar('name', \t\t\t'', \t\t'post');\n\t\t$subject \t= JRequest::getVar('subject', \t\t$default, \t'post');\n\t\t$emailCopy \t= JRequest::getVar('email_copy', \t0, \t\t\t'post');\n\n\t\t// probably a spoofing attack\n\t\tif (!$validate) {\n\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t}\n\n\t\t/*\n\t\t * This obviously won't catch all attempts, but it does not hurt to make\n\t\t * sure the request came from a client with a user agent string.\n\t\t */\n\t\tif (!isset ($_SERVER['HTTP_USER_AGENT'])) {\n\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t}\n\n\t\t/*\n\t\t * This obviously won't catch all attempts either, but we ought to check\n\t\t * to make sure that the request was posted as well.\n\t\t */\n\t\tif (!$_SERVER['REQUEST_METHOD'] == 'POST') {\n\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t}\n\n\t\t// An array of e-mail headers we do not want to allow as input\n\t\t$headers = array ('Content-Type:',\n\t\t\t\t\t\t 'MIME-Version:',\n\t\t\t\t\t\t 'Content-Transfer-Encoding:',\n\t\t\t\t\t\t 'bcc:',\n\t\t\t\t\t\t 'cc:');\n\n\t\t// An array of the input fields to scan for injected headers\n\t\t$fields = array ('email',\n\t\t\t\t\t\t 'text',\n\t\t\t\t\t\t 'name',\n\t\t\t\t\t\t 'subject',\n\t\t\t\t\t\t 'email_copy');\n\n\t\t/*\n\t\t * Here is the meat and potatoes of the header injection test. We\n\t\t * iterate over the array of form input and check for header strings.\n\t\t * If we fine one, send an unauthorized header and die.\n\t\t */\n\t\tforeach ($fields as $field) {\n\t\t\tforeach ($headers as $header) {\n\t\t\t\tif (strpos($_POST[$field], $header) !== false) {\n\t\t\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/*\n\t\t * Now that we have passed the header injection tests lets free up the\n\t\t * used memory and continue.\n\t\t */\n\t\tunset ($fields, $field, $headers, $header);\n\n\t\t/*\n\t\t * Load the contact details\n\t\t */\n\t\t$contact = new JTableContact($db);\n\t\t$contact->load($contactId);\n\n\t\t/*\n\t\t * If there is no valid email address or message body then we throw an\n\t\t * error and return false.\n\t\t */\n\t\tjimport('joomla.utilities.mail');\n\t\tif (!$email || !$text || (JMailHelper::isEmailAddress($email) == false)) {\n\t\t\tJContactView::emailError();\n\t\t} else {\n\t\t\t$menu = JTable::getInstance( 'menu', $db );\n\t\t\t$menu->load( $Itemid );\n\t\t\t$mparams = new JParameter( $menu->params );\n\t\t\t$bannedEmail \t= $mparams->get( 'bannedEmail', \t'' );\n\t\t\t$bannedSubject \t= $mparams->get( 'bannedSubject', \t'' );\n\t\t\t$bannedText \t= $mparams->get( 'bannedText', \t\t'' );\n\t\t\t$sessionCheck \t= $mparams->get( 'sessionCheck', \t1 );\n\n\t\t\t// check for session cookie\n\t\t\tif ( $sessionCheck ) {\n\t\t\t\tif ( !isset($_COOKIE[JSession::name()]) ) {\n\t\t\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Prevent form submission if one of the banned text is discovered in the email field\n\t\t\tif ( $bannedEmail ) {\n\t\t\t\t$bannedEmail = explode( ';', $bannedEmail );\n\t\t\t\tforeach ($bannedEmail as $value) {\n\t\t\t\t\tif ( JString::stristr($email, $value) ) {\n\t\t\t\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Prevent form submission if one of the banned text is discovered in the subject field\n\t\t\tif ( $bannedSubject ) {\n\t\t\t\t$bannedSubject = explode( ';', $bannedSubject );\n\t\t\t\tforeach ($bannedSubject as $value) {\n\t\t\t\t\tif ( JString::stristr($subject, $value) ) {\n\t\t\t\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Prevent form submission if one of the banned text is discovered in the text field\n\t\t\tif ( $bannedText ) {\n\t\t\t\t$bannedText = explode( ';', $bannedText );\n\t\t\t\tforeach ($bannedText as $value) {\n\t\t\t\t\tif ( JString::stristr($text, $value) ) {\n\t\t\t\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// test to ensure that only one email address is entered\n\t\t\t$check = explode( '@', $email );\n\t\t\tif ( strpos( $email, ';' ) || strpos( $email, ',' ) || strpos( $email, ' ' ) || count( $check ) > 2 ) {\n\t\t\t\tmosErrorAlert( JText::_( 'You cannot enter more than one email address', true ) );\n\t\t\t}\n\n\t\t\t/*\n\t\t\t * Prepare email body\n\t\t\t */\n\t\t\t$prefix = sprintf(JText::_('ENQUIRY_TEXT'), $mainframe->getBaseURL());\n\t\t\t$text \t= $prefix.\"\\n\".$name.' <'.$email.'>'.\"\\r\\n\\r\\n\".stripslashes($text);\n\n\t\t\t// Send mail\n\t\t\tjosMail($email, $name, $contact->email_to, $FromName.': '.$subject, $text);\n\n\t\t\t/*\n\t\t\t * If we are supposed to copy the admin, do so.\n\t\t\t */\n\t\t\t// parameter check\n\t\t\t$menuParams \t\t= new JParameter( $contact->params );\n\t\t\t$emailcopyCheck = $menuParams->get( 'email_copy', 0 );\n\n\t\t\t// check whether email copy function activated\n\t\t\tif ( $emailCopy && $emailcopyCheck ) {\n\t\t\t\t$copyText \t\t= sprintf(JText::_('Copy of:'), $contact->name, $SiteName);\n\t\t\t\t$copyText \t\t.= \"\\r\\n\\r\\n\".$text;\n\t\t\t\t$copySubject \t= JText::_('Copy of:').\" \".$subject;\n\t\t\t\tjosMail($MailFrom, $FromName, $email, $copySubject, $copyText);\n\t\t\t}\n\n\t\t\t$link = sefRelToAbs( 'index.php?option=com_contact&task=view&contact_id='. $contactId .'&Itemid='. $Itemid );\n\t\t\t$text = JText::_( 'Thank you for your e-mail', true );\n\n\t\t\tjosRedirect( $link, $text );\n\t\t}\n\t}", "function userNotificationEmail($email, $user)\n{\n\t$module = new sociallogin();\n\t$sub = $module->l('Thank You For Registration', 'sociallogin_functions');\n\t$vars = array('{firstname}' => $user['fname'], '{lastname}' => $user['lname'], '{email}' => $email, '{passwd}' => $user['pass']);\n\t$id_lang = (int)Configuration::get('PS_LANG_DEFAULT');\n\tMail::Send($id_lang, 'account', $sub, $vars, $email);\n}", "function contactUs ($sendEmail=false, $serverSetting=null){\n\t\t\t$simpleFormBuilder = new simpleFormBuilder;\n\t\t\t\n\t\t\t$builder \t= array\t(\n\t\t\t\t\t\t\t\"prosesname\"=> \"Your Contact Has Been Saved \",\n\t\t\t\t\t\t\t\"action\"\t=> \"\",\n\t\t\t\t\t\t\t\"method\"\t=> \"insert\",\n\t\t\t\t\t\t\t\"datatable\"\t=> \"tbl_contact\",\n\t\t\t\t\t\t\t\"element\"\t=> array\t( \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Name\" => array( \"type\" => \"text\", \"dataname\" => \"contact_name\t\", \"required\" => 1),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Email\" => array( \"type\" => \"text\", \"dataname\" => \"contact_email\", \"required\" => 1, \"emailvalid\" => 1),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Phone\" => array( \"type\" => \"text\", \"dataname\" => \"contact_phone\", \"required\" => 1, \"phonevalid\" => 1),\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Address\" => array( \"type\" => \"text\", \"dataname\" => \"contact_address\", \"required\" => 1),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Message\" => array( \"type\" => \"textarea\", \"dataname\" => \"contact_message\", \"required\" => 1, \"width\" => \"75\"),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"captcha\" => array( \"type\" => \"captcha\", \"ignore\" => 1, \"message\" => \"(spam protection)\"),\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\"hidden\" => array( \"type\" => \"hidden\", \"dataname\" => \"contact_date\" , \"value\" => date(\"Y-m-d H:i:s\")),\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\n\t\t\n\t\t\t$form\t= $simpleFormBuilder->builder($builder, false, false, false);\n\t\t\t\n\t\t\tif($simpleFormBuilder->haveError != 1 AND isset($_POST['submit']) AND $sendEmail == true){\n\t\t\t\techo $simpleFormBuilder->haveError;\n\t\t\t\tif(is_null($serverSetting)){\n\t\t\t\t\t$objEmail \t= new send2email(MAIL_SERVER, SITE_EMAIL, SITE_EMAIL_PASS, MAIL_PORT, true);\n\t\t\t\t\t$receiver\t= MANAGEMENT_EMAIL;\n\t\t\t\t}else{\n\t\t\t\t\t$objEmail \t= new send2email(trim($serverSetting[0]), trim($serverSetting[1]), trim($serverSetting[2]), trim($serverSetting[3]), trim($serverSetting[4]) );\n\t\t\t\t\t$receiver\t= $serverSetting[5];\n\t\t\t\t}\n\n\t\t\t\t$send \t\t= $objEmail->send($_POST[\"contact_email\"], '[Blanco Indonesia] Contact Us from '.$_POST[\"contact_name\"] .' ('.$_POST[\"contact_phone\"]. ')', $_POST[\"contact_message\"], $receiver, 'Contact Us', $_POST[\"contact_name\"]);\n\t\t\t\t/*echo '<!-- <pre>'; print_r($send); echo ' </pre> -->';*/\n\t\t\t}\n\t\t\t\n\t\t\treturn $form;\n\t\t}", "protected function sendTestMail() {}", "function bab_pm_formsend()\n{\n $bab_pm_PrefsTable = safe_pfx('bab_pm_list_prefs');\n $bab_pm_SubscribersTable = safe_pfx('bab_pm_subscribers');\n\n $bab_pm_radio = ps('bab_pm_radio'); // this is whether to mail or not, or test\n\n if ($bab_pm_radio == 'Send to Test') {\n $bab_pm_radio = 2;\n }\n\n if ($bab_pm_radio == 'Send to List') {\n $bab_pm_radio = 1;\n }\n\n if ($bab_pm_radio != 0) { // if we have a request to send, start the ball rolling....\n // email from override\n $sendFrom = gps('sendFrom');\n\n $listToEmail = (!empty($_REQUEST['listToEmail'])) ? gps('listToEmail') : gps('list');\n // $listToEmail = gps('listToEmail'); // this is the list name\n $subject = gps('subjectLine');\n $form = gps('override_form');\n\n // ---- scrub the flag column for next time:\n $result = safe_query(\"UPDATE $bab_pm_SubscribersTable SET flag = NULL\");\n\n //time to fire off initialize\n // bab_pm_initialize_mail();\n $path = \"?event=postmaster&step=initialize_mail&radio=$bab_pm_radio&list=$listToEmail&artID=$artID\";\n\n if (!empty($sendFrom)) {\n $path .= \"&sendFrom=\" . urlencode($sendFrom);\n }\n\n if (!empty($subject)) {\n $path .= \"&subjectLine=\" . urlencode($subject);\n }\n\n if ($_POST['use_override'] && !empty($form)) {\n $path .= \"&override_form=$form&use_override=1\";\n }\n\n header(\"HTTP/1.x 301 Moved Permanently\");\n header(\"Status: 301\");\n header(\"Location: \".$path);\n header(\"Connection: close\");\n }\n\n $options = '';\n $form_select = '';\n\n // get available lists to create dropdown menu\n $bab_pm_lists = safe_query(\"select * from $bab_pm_PrefsTable\");\n\n while ($row = @mysqli_fetch_row($bab_pm_lists)) {\n $options .= \"<option>$row[1]</option>\";\n }\n\n $selection = '<select id=\"listToEmail\" name=\"listToEmail\">' . $options . '</select>';\n\n $form_list = safe_column('name', 'txp_form',\"name like 'newsletter-%'\");\n\n if (count($form_list) > 0) {\n foreach ($form_list as $form_item) {\n $form_options[] = \"<option>$form_item</option>\";\n }\n\n $form_select = '<select name=\"override_form\">' . join($form_options,\"\\n\") . '</select>';\n $form_select .= checkbox('use_override', '1', '').'Use override?';\n }\n\n if (isset($form_select) && !empty($form_select)) {\n $form_select = <<<END\n <div style=\"margin-top:5px\">\n Override form [optional]: $form_select\n </div>\nEND;\n }\n echo <<<END\n<form action=\"\" method=\"post\" accept-charset=\"utf-8\">\n <fieldset id=\"bab_pm_formsend\">\n <legend><span class=\"bab_pm_underhed\">Form-based Send</span></legend>\n <div style=\"margin-top:5px\">\n <label for=\"listToEmail\" class=\"listToEmail\">Select list:</label> $selection\n </div>\n $form_select\n <label for=\"sendFrom\" class=\"sendFrom\">Send From:</label><input type=\"text\" name=\"sendFrom\" value=\"\" id=\"sendFrom\" /><br />\n <label for=\"subjectLine\" class=\"subjectLine\">Subject Line:</label><input type=\"text\" name=\"subjectLine\" value=\"\" id=\"subjectLine\" /><br />\n\n <p><input type=\"submit\" name=\"bab_pm_radio\" value=\"Send to Test\" class=\"publish\" />\n &nbsp;&nbsp;\n <input type=\"submit\" name=\"bab_pm_radio\" value=\"Send to List\" class=\"publish\" /></p>\n </fieldset>\n</form>\nEND;\n}", "function sendMailForDomainPublishUnPublish()\n\t\t{\n\t\t\tglobal $CFG;\n \t $sel_id \t = $_POST['checkedvaluesarr'];\n\t\t\t$tablename \t\t = $_POST['tablename'];\n\t\t\t$filedname \t\t = $_POST['fieldname'];\n\t\t\t$changestatusval = $_POST['changestatusval'];\n\t\t\t$upid \t\t\t = $_POST['whereField'];\n\t\t\t$from_name = $CFG['site']['adminname'];\n\t\t\t$from_email = $CFG['site']['adminemail'];\n\t\t\t\n\t\t\tif( isset($sel_id) && is_array($sel_id) ) {\n\t\t foreach($sel_id as $x => $value){\n\t\t \t$sel_del = \"UPDATE \".$tablename.\" SET \".$filedname.\" = '\".$this->filterInput($changestatusval).\"' WHERE \".$upid.\" = '\".$this->filterInput($value).\"'\";\n\t \t$res_del = mysql_query($sel_del) or die($this->mysql_error($sel_del));\n\t \tif($res_del)\n\t \t\t{\n\t\t\t\t\t\t\t\n\t\t\t\t \t$mail_content = $this->readfilecontent($CFG['site']['emailtpl_path'].\"/emailToAllDomainUser.tpl\");\n\t\t\t\t\t $mail_content = str_replace('{SITE_TITLE}',$CFG['site']['sitename'],$mail_content);\n\t\t\t\t\t $mail_content = str_replace('{SITE_LOGO}',$CFG['site']['logoname'],$mail_content);\n\t\t\t\t\t \n\t\t\t\t\t if($changestatusval == 'publish')\n\t\t\t\t\t \t{\n\t\t\t\t\t \t\t$to_email= $this->selectEmailFromSighupTable($value);\n\t\t\t\t\t \t\t$mailsubject = $CFG['site']['sitename'].\" Your New Domain Published\";\n\t\t\t\t\t\t\t\t\t$name= $this->selectNameFromSighupTable($value);\n\t\t\t\t \t\t$domain_name= $this->selectDomainFromSighupTable($value);\n\t\t\t\t \t\t$mail_content = str_replace('{CONTENT}','Your '.$domain_name.' Domain Published By Us.Lets Enjoy With Your New Domain.',$mail_content);\n\t\t\t\t \t\t$mail_content = str_replace('{NAME}',$name,$mail_content);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t \n\t\t\t\t\t else if($changestatusval == 'unpublish')\n\t\t\t\t\t\t {\n\t\t\t\t\t\t \t $to_email= $this->selectEmailFromSighupTable($value);\n\t\t\t\t\t\t \t $mailsubject = $CFG['site']['sitename'].\" Your New Domain Un Published\";\n\t\t\t\t\t\t\t\t\t $name= $this->selectNameFromSighupTable($value);\n\t\t\t\t \t\t\t $domain_name= $this->selectDomainFromSighupTable($value);\n\t\t\t\t \t\t\t $mail_content = str_replace('{CONTENT}','Your '.$domain_name.' Domain Un Published By Us.Sorry For Delaying.Soon We Will Contact You.',$mail_content);\n\t\t\t\t \t\t\t $mail_content = str_replace('{NAME}',$name,$mail_content);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t \n\t\t\t\t\t else if($changestatusval == 'pointed')\n\t\t\t\t\t \t{\n\t\t\t\t\t \t\t $to_email= $this->selectPointEmailFromSighupTable($value);\n\t\t\t\t\t \t\t $mailsubject = $CFG['site']['sitename'].\" Your Domain Pointed\";\n\t\t\t\t\t \t\t $name= $this->selectPointNameFromSighupTable($value);\n\t\t\t\t \t\t\t $domain_name= $this->selectPointDomainFromSighupTable($value);\n\t\t\t\t\t\t\t\t\t $mail_content = str_replace('{CONTENT}','Your '.$domain_name.' Domain Pointed .Lets Enjoy With Your New Point Domain.',$mail_content);\n\t\t\t\t\t\t\t\t\t $mail_content = str_replace('{NAME}',$name,$mail_content);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t \t else\n\t\t\t\t\t \t{\n\t\t\t\t\t \t\t $to_email= $this->selectPointEmailFromSighupTable($value);\n\t\t\t\t\t \t\t $mailsubject = $CFG['site']['sitename'].\" Your Domain Un Pointed\";\n\t\t\t\t\t \t\t $name= $this->selectPointNameFromSighupTable($value);\n\t\t\t\t \t\t\t $domain_name= $this->selectPointDomainFromSighupTable($value);\n\t\t\t\t\t\t\t\t\t $mail_content = str_replace('{CONTENT}','Your '.$domain_name.' Domain Un Pointed By Us.Sorry For Delaying.Soon We Will Contact You.',$mail_content);\n\t\t\t\t\t\t\t\t\t $mail_content = str_replace('{NAME}',$name,$mail_content);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t \n\t\t\t\t\t $mail_content = str_replace('{ADMINNAME}',$CFG['site']['adminname'],$mail_content);\n\t\t\t\t\t\t\t//echo $mail_content;die();\n\t\t\t\t\t\t\t$ok=$this->sendMail($from_name,$from_email,$to_email,$mailsubject,$mail_content);\n\t\t\t\t\t\t}\n\t\t \n\t\t \t}\n\t\t echo 'success';exit;\n\t\t }\t\t\n\t\t\t\n\t\t}", "function send_emails() {\n $settings = new Settings();\n $mail_companies = $settings->get_mailto_companies();\n $failed_list_mails = array();\n $mail_reader = new EmailReader(dirname(__FILE__) . '/mails', $this->user_information);\n foreach ($this->cookie_list as $item) {\n if (!$item->has_email()) {\n \t$failed_list_mails[] = $item;\n }\n else {\n $template = $mail_reader->get_companies_mail($item, $mail_companies);\n if (!$this->mail_to($item, $template, $mail_companies)) {\n $failed_list_mails[] = $item;\n }\n\t }\n }\n $this->update_amounts_used($this->cookie_list);\n\n\n $attachments = array();\n\n $failed_list_letters = array();\n foreach ($this->cookie_list as $item) {\n if (!$item->has_address()) {\n $failed_list_letters[] = $item;\n }\n else {\n $letter_generator = new LetterGenerator($this->user_information);\n $pdf = $letter_generator->generate_letter_string($item);\n if ($pdf) {\n \t$folder_writer = new FolderHandler();\n \t$file = $folder_writer->store_file($pdf, \"pdf\");\n \tif ($file) {\n \t\t$attachments[] = $file;\n \t}\n \telse {\n \t\t$failed_list_letters[] = $item;\n \t}\n }\n else {\n $failed_list_letters[] = $item;\n }\n }\n }\n\n\n\n return $this->send_confirmation_mail($attachments, $failed_list_mails, array_diff($this->cookie_list,\n $failed_list_mails), $failed_list_letters, array_diff($this->cookie_list, $failed_list_letters),\n $mail_companies);\n }", "function email_admin($common,$db_object,$user_id,$post_var,$error_msg,$default)\n \t{\n\n \twhile(list($kk,$vv)=@each($post_var))\n\t\t{\n\n\t\t$$kk=$vv;\n\t\n\t\t}\n\t\n\t\t\n\t$empl_id = $user_id_all;\n\n//codings for sending email to the system owner....\n\t\n\t$config=$common->prefix_table(\"config\");\n\t$appraisal_table=$common->prefix_table(\"appraisal\");\n \t$user=$common->prefix_table(\"user_table\");\n\t\n\t\n\t$mysql=\"select tasubject,tamessage from $config\";\n\t$rslt_arr=$db_object->get_a_line($mysql);\n\n\n\n\t$tasubject=$rslt_arr[\"tasubject\"];\n\t$tamessage=$rslt_arr[\"tamessage\"];\n\n\n\tpreg_match(\"/<{test_loopstart}>(.*?)<{test_loopend}>/s\",$tamessage,$match);\n\t\n\t$newmatch = $match[1];\n\t$str = \"\";\n\tfor($i=0;$i<count($empl_id);$i++)\n\t{\n\t\t$subqry2=\"select username,email from $user where user_id='$empl_id[$i]'\";\n\n\t\t$user_name=$db_object->get_a_line($subqry2);\n\t\t//$to=$user_name[\"username\"].\"[email protected]\";\n\t\t$to=$user_name[\"email\"];\n\n\t\t$subqry2=\"select email from $user where user_id='1'\";\n\n\t\t$sys_email=$db_object->get_a_line($subqry2);\n\t\t$from=$sys_email[\"email\"];\n\t\t\n\t\t$mysql = \"select test_mode,test_type from $appraisal_table where user_id='$empl_id[$i]'\";\n\n\t\t$testdetails_arr = $db_object->get_rsltset($mysql);\n\n\t\tfor($j=0;$j<count($testdetails_arr);$j++)\n\t\t{\n\t\t\t$test_mode = $testdetails_arr[$j][\"test_mode\"];\n\t\t\t$test_type = $testdetails_arr[$j][\"test_type\"];\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tif($test_mode == \"Test\")\n\t\t\t{\n\t\t\t\t$mess_test_mode = \"Test Mode\";\n\t\t\t}\n\t\t\telseif($test_mode == \"360\")\n\t\t\t{\n\t\t\t\t$mess_test_mode = \"360 Mode\";\n\t\t\t}\n\t\t\tif($test_type == \"t\")\n\t\t\t{\n\t\t\t\t$mess_test_type = \"Technical\";\n\t\t\t}\n\t\t\telseif($test_type == \"i\")\n\t\t\t{\n\t\t\t\t$mess_test_type = \"Inter Personal\";\n\t\t\t}\n\t\t\n\t$str .= preg_replace(\"/<{(.*?)}>/e\",\"$$1\",$newmatch);\n\n\n\t\t\n\t\t}\n\n\n\n$tamessage = preg_replace(\"/<{test_loopstart}>(.*?)<{test_loopend}>/s\",$str,$tamessage);\n\n\n$values[\"username\"]\t\t=$user_name[\"username\"];\n$values[\"login_username\"] \t= $user_name[\"username\"];\n\n$values[\"url\"]=$common->http_path.\"/index.php\";\n\n$tamessage1=$common->direct_replace($db_object,$tamessage,$values);\n\n\n//echo \"to $to<br> sub $tasubject<br> mess $tamessage1<br> from $from<br><br>\";\n\n$sent=$common->send_mail($to,$tasubject,$tamessage1,$from);\n\n\t}\n\tif($sent)\n\t\t{\n\t\t\n\t\t\techo $error_msg[\"cAppraisalMail_sent\"];\n\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo $error_msg[\"cAppraisalMail_fail\"];\n\t\t}\n\n}", "function _os2dagsorden_create_agenda_meeting_create_user_form_email_validate($element, $form, &$form_state) {\r\n $value = $element['#value'];\r\n if (!valid_email_address($value)) {\r\n form_error($element, t('Indtast en gyldig email adresse.'));\r\n }\r\n if (db_query(\"SELECT COUNT(*) FROM {users} WHERE mail = :mail;\", array(':mail' => $value))->fetchField()) {\r\n form_error($element, t('Der findes allerede en bruger med denne email.'));\r\n }\r\n}", "function getEmailAddress() {\n\t\t//Retrieve submitted id parameters\n\t\t$org_id = intval($this->piVars['org_id']);\n\t\t$emp_id = intval($this->piVars['id']);\n\t\t$pos_id = intval($this->piVars['pos_id']);\n\t\t$sv_id = intval($this->piVars['sv_id']);\n\n\t\tif (!empty($org_id)) {\t//Email form is called from organisation detail page (organisation email)\n\t\t\t//Standard query for organisation details\n\t\t\t$res_organisation = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n\t\t\t\t\t'or_name,\n\t\t\t\t\t or_email',\n\t\t\t\t\t'tx_civserv_organisation',\n\t\t\t\t\t'1 '.\n\t\t\t\t\t$this->cObj->enableFields('tx_civserv_organisation').\n\t\t\t\t\t' AND uid = ' . intval($org_id),\n\t\t\t\t\t'',\n\t\t\t\t\t'');\n\n\t\t\t//Check if query returned a result\n\t\t\tif ($GLOBALS['TYPO3_DB']->sql_num_rows($res_organisation) == 1) {\n\t\t\t\t$organisation = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res_organisation);\n\t\t\t\t$email_address = $organisation[or_email];\n\t\t\t\treturn $email_address;\n\t\t\t} else {\n\t\t\t\t$GLOBALS['error_message'] = $this->pi_getLL('tx_civserv_pi1_email_form.error_org_id','Wrong organisation id or organisation does not exist!');\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t} elseif (!empty($emp_id) && !empty($pos_id) && !empty($sv_id)) {\t//Email form is called from service detail page\n\t\t\t$result = $this->makeEmailQuery($emp_id, $pos_id, $sv_id);\n\t\t\t//Check if query returned a result\n\t\t\tif ($GLOBALS['TYPO3_DB']->sql_num_rows($result) == 1) {\n\t\t\t\t$employee = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result);\n\t\t\t\t//Set correct email address (priority is employee-position email address)\n\t\t\t\tempty($employee[ep_email]) ? $email_address = $employee[em_email] : $email_address = $employee[ep_email];\n\t\t\t\treturn $email_address;\n\t\t\t} else {\n\t\t\t\t$GLOBALS['error_message'] = $this->pi_getLL('tx_civserv_pi1_email_form.error_sv_id','Wrong service id, employee id oder position id. No email address found!');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} elseif (!empty($emp_id) || (!empty($pos_id) && !empty($emp_id)) ) { //Email form is called from organisation detail page (supervisor email)\n\t\t\t$result = $this->makeEmailQuery($emp_id, $pos_id, $sv_id);\n\t\t\t//Check if query returned a result\n\t\t\tif ($GLOBALS['TYPO3_DB']->sql_num_rows($result) == 1) {\n\t\t\t\t$employee = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result);\n\t\t\t\tempty($employee[ep_email]) ? $email_address = $employee[em_email] : $email_address = $employee[ep_email];\n\t\t\t\treturn $email_address;\n\t\t\t} else {\n\t\t\t\t$GLOBALS['error_message'] = $this->pi_getLL('tx_civserv_pi1_email_form.error_pos_id','Wrong employee id oder position id. No email address found!');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} elseif ($this->piVars['mode'] == 'check_contact_form') {\t//Email form ist called by the contact_link in the main Navigation\n\t\t\t$hoster_email =$this->get_hoster_email();\n\t\t\treturn $hoster_email;\n\t\t} else {\n\t\t\t$GLOBALS['error_message'] = $this->pi_getLL('tx_civserv_pi1_email_form.error_general','Organisation id, employee id, position id and service id wrong or not set. No email address found!');\n\t\t\treturn false;\n\t\t}\n\t}", "function mailer() {\n\t\tJRequest::checkToken() or die( JText::_( 'Invalid Token' ) );\n\t\t$email = JRequest::getVar('email');\n\t\t$title = JRequest::getVar('title');\n\t\t$from = array($email, $title);\n\t\t// set emailadres from the site\n\t\t$config =&JFactory::getConfig();\n\t\t// Get some variables from the component options\n\t\t$app = JFactory::getApplication('site');\n\t\t$componentParams = $app->getParams('com_mdcontact');\n\t\t$email_to = $componentParams->get('email_to');\n\t\t$subject = $componentParams->get('subject');\n\t\t$to = array($email_to, $email_to );\n\t\t// Set some variables for the email message\n\t\t$copy = JRequest::getVar('copy');;\n\t\t$body = JRequest::getVar('description');;\n\t\n\t\t// Invoke JMail Class\n\t\t$mailer = JFactory::getMailer();\n\t\n\t\t// Set sender array so that my name will show up neatly in your inbox\n\t\t$mailer->setSender($from);\n\t\t$mailer->addRecipient($to);\n\t\t// Set cc if copy is checked\n\t\tif ($copy=='1'){\n\t\t\t$mailer->addCC($from);\n\t\t\t}\n\t\t$mailer->setSubject($subject);\n\t\t$mailer->setBody($body);\n\t\t$send = $mailer->Send();\n\t\t// set the redirect page\n\t\t$redirect = JRoute::_('index.php?option=com_mdcontact&view=contact&task=add');\n\t\tif ( $send !== true ) {\n\t\t\tJFactory::getApplication()->enqueueMessage('Your message is not send, please try again later', 'error');\n\t\t\t$this->setRedirect( $redirect);\n\t\t} else {\n\t\tparent::apply();\n\t}\n\t}", "function send_mail($input, $name, $email, $user_subject) {\n\n\t\t$options = get_option('id_settings');\n $receiver = $options['id_education_email_addresses_field'];\n\t\t$subject = \"Education input: $user_subject\";\n\n $message = \"<!DOCTYPE html>\n <html>\n <head>\n <meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>\n <title>Education input: $subject</title>\n <meta name='viewport' content='width=device-width, initial-scale=1.0'>\n </head>\";\n $message .= \"<body><i>Sent using the contact form at \" . get_site_url() .\n \"</i><br><br>\" . esc_html($input);\n $message .= \"</body>\";\n $message .= \"</html>\";\n\n $message = wordwrap($message, 70);\n\n\t\tif($email !== '') {\n\t\t\t$sender = \"$name <$email>\";\n\t\t} else {\n\t\t\t$sender = \"Anonymous <[email protected]>\";\n\t\t}\n\n\t\t$headers = \"From: $sender\\r\\n\";\n $headers .= \"MIME-Version: 1.0\\r\\n\";\n $headers .= \"Content-Type: text/html; charset=UTF-8\\r\\n\";\n\n return wp_mail($receiver, $subject, $message, $headers);\n\n }", "function adminEmail($arr)\n{\n\t$email = $arr['email'];\n\t$module = new sociallogin();\n\t$sub = $module->l('New User Registration', 'sociallogin_functions');\n\t$msg = $module->l('New User Registered to your site<br/> E-mail address: ', 'sociallogin_functions');\n\t$msg .= $email;\n\tif (_PS_VERSION_ >= 1.6)\n\t{\n\t\t$vars = array('{name}' => 'admin', '{message}' => $msg, '{subject}' => $sub);\n\t\t$mail_format = 'lrsociallogin_account';\n\t}\n\telse\n\t{\n\t\t$vars = array('{email}' => $email, '{message}' => $msg);\n\t\t$mail_format = 'contact';\n\t}\n\t$db = Db::getInstance()->ExecuteS('SELECT * FROM '.pSQL(_DB_PREFIX_).'employee WHERE id_profile=1 ');\n\t$id_lang = (int)Configuration::get('PS_LANG_DEFAULT');\n\tforeach ($db as $row)\n\t{\n\t\t$find_email = $row['email'];\n\t\tMail::Send($id_lang, $mail_format, $sub, $vars, $find_email);\n\t}\n}", "public function contactUs($full_name,$email,$phone,$subject,$message,$site_email)\n\t{\n\t\t$full_name = $this->secureInput($full_name);\n\t\t$email = $this->secureInput($email);\n\t\t$phone = $this->secureInput($phone);\n\t\t$subject = $this->secureInput($subject);\n\t\t$message = $this->secureInput($message);\n\t\t$site_email = $this->secureInput($site_email);\n\n\t\t$contact_date = date(\"l, M j, Y, g:i a\");\n\n\t\t$sql = \"INSERT INTO contact_us ( full_name, email, phone, subject, message, reply,contact_date)\n VALUES ('\".$full_name.\"','\".$email.\"','\".$phone.\"', '\".$subject.\"','\".$message.\"','','\".$contact_date.\"')\";\n\t\t$res = $this->processSql($sql);\n\t\tif($res){\n\t\t\t//build email to be sent\n\t\t\t$to = $site_email;\n\t\t\t$subject = \"New message from \".$email;\n\n\t\t\t$admin_message = \"\n\t\t\t<html>\n\t\t\t<head>\n\t\t\t<title>New message from\".$full_name.\"</title>\n\t\t\t</head>\n\t\t\t<body>\n\t\t\t<h3>Query / Comment</h3>\n\t\t\t<p>Hello Site Admin, \".$full_name.\" has sent a query/message. It is as below:</p>\n\t\t\t<p>\".$message.\"</p>\n\t\t\t</body>\n\t\t\t</html>\n\t\t\t\";\n\n\t\t\t// To send HTML mail, the Content-type header must be set\n\t\t\t$headers = \"MIME-Version: 1.0\\r\\n\";\n\t\t\t$headers .= \"Content-type: text/html; charset=iso-8859-1\\r\\n\";\n\t\t\t$headers .= \"From: '\".$full_name.\"'<\".$email.\">\" . \"\\r\\n\";//Modified By GENTLE to show the FROM in the message\n\n\t\t\t$mail_send = mail($to, $subject, $admin_message, $headers );\n\t\t\tif ($mail_send):\n\t\t\treturn 99;\n else:\n return 2;\n endif;\n\t\t\t}else{\n\t\t\treturn 1;\n\t\t}\n\t}", "function emailRegistrationAdmin() {\n require_once ('com/tcshl/mail/Mail.php');\n $ManageRegLink = DOMAIN_NAME . '/manageregistrations.php';\n $emailBody = $this->get_fName() . ' ' . $this->get_lName() . ' has just registered for TCSHL league membership. Click on the following link to approve registration: ';\n $emailBody.= $ManageRegLink;\n //$sender,$recipients,$subject,$body\n $Mail = new Mail(REG_EMAIL, REG_EMAIL, REG_EMAIL_SUBJECT, $emailBody);\n $Mail->sendMail();\n }", "public static function sendEmail($data) {\r\n\r\n // get user data to fill in automatically\r\n $user = Auth::getUser();\r\n // Email Settings\r\n // Send email back to user and the home store \r\n $cc[] = $user->email;\r\n\r\n // Live Address\r\n $to = '[email protected]';\r\n // Test address\r\n //$to = '[email protected]';\r\n\r\n // getting the From store email\r\n $allStores = Helpers::getStores();\r\n foreach ($allStores as $store) {\r\n if ($store['storeNumber'] == $user->storeNumber){\r\n //uncomment for Live\r\n //$cc[] = ($store['storeEmail']);\r\n $storeName = $store['storeName'];\r\n }\r\n\r\n }\r\n // HTML Email Version\r\n $partCount = count($data['catNum']);\r\n $msgHeader = '<b>Store Requesting: &emsp;</b>' . $storeName . '<br />';\r\n $msgHeader .= '<b>Requestor: &emsp;</b>' . $user->name . '<br />';\r\n $msgHeader .= '<b><h3>If Stolen</h3></b>';\r\n $msgHeader .= '<b>Police Department: &emsp;</b>' . $data['policeDepartment'] . '<br />';\r\n $msgHeader .= '<b>Date Reported to Police: &emsp;</b>' . $data['policeDate'] . '<br />';\r\n $msgHeader .= '<b>Police Report Number: &emsp;</b>' . $data['reportNum'] . '<br />';\r\n $msgHeader .= '<b>Reported to NER by: &emsp;</b>' . $data['nerReportBy'] . '<br />';\r\n $msgHeader .= '<b>Date Reported to NER: &emsp;</b>' . $data['nerDate'] . '<br />';\r\n $msgHeader .= '<b>Reported to Manufacturer by: &emsp;</b>' . $data['mfgReportBy'] . '<br />';\r\n $msgHeader .= '<b>Date Reported to Manufacturer: &emsp;</b>' . $data['mfgDate'] . '<br />';\r\n\r\n $msgFooter = '<h3>Details of the Disposal</h3>' . $data['disposal_comments'];\r\n $msg = '<h3>Disposal Item Line Details</h3>';\r\n $msg .= '<table border=\"1\"><tr><b><td>Cat Num</td><td>Item Num</td><td>Serial Num</td><td>Manufacturer</td><td>Qty</td><td>Disposal Type</td></b></tr>';\r\n for ($i = 0;$i<$partCount; $i++){\r\n $msg .= \"<tr>\";\r\n $msg .= \"<td>\" . $data['catNum'][$i] . \"</td>\";\r\n $msg .= \"<td>\" . $data['itmNum'][$i] . \"</td>\";\r\n $msg .= \"<td>\" . $data['serialNum'][$i] . \"</td>\";\r\n $msg .= \"<td>\" . $data['mfg'][$i] . \"</td>\";\r\n $msg .= \"<td>\" . $data['quantity'][$i] . \"</td>\";\r\n $msg .= \"<td>\" . $data['disposalCode'][$i] . \"</td>\";\r\n $msg .= \"</tr>\";\r\n }\r\n $msg .=\"</table>\";\r\n\r\n // Text only part of the email\r\n\r\n $textHeader = \"Store Requesting: \" . $storeName . \"\\r\\n\";\r\n $textHeader .= \"Requestor: \" . $user->name . \"\\r\\n\\r\\n\";\r\n $textHeader .= \"If Stolen: \\r\\n\\r\\n\";\r\n $textHeader .= \"Police Department: \" . $data['policeDepartment'] . \"\\r\\n\";\r\n $textHeader .= \"Date Reported to Police\" . $data['policeDate'] . \"\\r\\n\";\r\n $textHeader .= \"Police Report Number: \" . $data['reportNum'] . \"\\r\\n\";\r\n $textHeader .= \"Reported to NER by: \" . $data['nerReportBy'] . \"\\r\\n\";\r\n $textHeader .= \"Date Reported to NER\" . $data['nerDate'] . \"\\r\\n\";\r\n $textHeader .= \"Reported to Manufacturer by: \" . $data['mfgReportBy'] . \"\\r\\n\";\r\n $textHeader .= \"Date Reported to Manufacturer: \" . $data['mfgDate'] . \"\\r\\n\";\r\n\r\n $textFooter = 'Details of the Disposal \\r\\n' . $data['disposal_comments'];\r\n $textBody = \"Cat # Item # Serial # Manufacturer Quantity Disposal Type\";\r\n\r\n for ($i = 0; $i<$partCount; $i++){\r\n $textBody .= $data['catNum'][$i] . ' ';\r\n $textBody .= $data['itmNum'][$i] . ' ';\r\n $textBody .= $data['serialNum'][$i] . ' ';\r\n $textBody .= $data['mfg'][$i] . ' ';\r\n $textBody .= $data['quantity'][$i] . ' ';\r\n $textBody .= $data['disposalCode'][$i] . ' ';\r\n }\r\n\r\n $subject = 'New Disposal Request';\r\n $text = $textHeader . $textBody . $textFooter;\r\n $html = $msgHeader . $msg . $msgFooter;\r\n\r\n Mail::send($to, $subject, $text, $html, $cc);\r\n \r\n // remove after saveDisposal() is written\r\n\r\n }", "function send_contact_email($to, $data) {\n\n\t\t\t\t$from = $data['contact_email'];\n\t\t\t\t$subject = \"Contact From Website: \".$data['contact_name'] . \" - \";\n\t\t\t\t$subject .= $data['contact_subject'];\n\n\t\t\t/*\t$msg = $this->mailHeader;\n\t\t\t\t$msg .= $data['contact_message'];\n\t\t\t\t$msg .= $this->mailFooter;*/\n\n\t\t\t\t$res = $this->settings_model->get_contact_page_details();\n\t\t\t\t$contact_phone = $res[0]->contact_phone;\n\t\t\t\t$contact_email = $res[0]->contact_email;\n\t\t\t\t$contact_address = $res[0]->contact_address;\n\n\t\t\t\t$sendto = $details->contect_email;\n\t\t\t\t $ptheme = pt_default_theme();\n\t\t\t\t\t$this->_config = config_item('theme');\n\t\t\t\t\t$uu = $this->_config['url'];\n\t\t\t\t\n\t\t\t\t$email_temp_img = $uu.$ptheme.'/email_temp_img/gb_email_temp_img/';\n $template = array('{name}','{check_in}','{check_out}','{link}','{email_temp_img}','{city}','{state}','{aprx_rooms}','{contact_phone}','{contact_email}','{contact_address}','{top_hotel}');\n\t\t\t\t$values = array($details->contect_name,$details->check_in,$details->check_out,$details->link_gen,$email_temp_img,$details->city,$details->state,$details->aprx_rooms,$contact_phone,$contact_email,$contact_address,$top_hotel);\n\t\t\t\t\n\t\t\t\t$HTML_DATA = file_get_contents( $uu.$ptheme.'/contact_us.html');\n\t\t\t\t$message = str_replace($template, $values, $HTML_DATA);\n\t\t\t\t\t/*echo \"string\";\n\t\t\t\t\techo $message;\n\t\t\t\t\texit();*/\n\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\t$this->email->from($to);\n\t\t\t\t$this->email->to($from);\n\t\t\t\t$this->email->subject('Contact us confirmation');\n\t\t\t\t$this->email->message($message);\n\t\t\t\treturn $this->email->send();\n\t\t}", "function sendFinalEmails ($email, $client_key, $final1, $final2, $final3, $final4) {\n\t//find device email and device type\n\t$sql = \"call getDeviceInfo(\".sql_escape_string($email,1).\");\";\n\techo $sql;\n\t$Result = execute_query($mysqli, $sql);\n\tif($Result) {\n\t\t$row = $Result[0]->fetch_assoc();\n\t\t$device_email = $row['email'];\n\t\t$device = $row['device'];\n\t\t$fname = $row['fname'];\n\t\t$lname = $row['lname'];\n\t\t$gSQL = 'CALL getOrgByKey('.sql_escape_string($client_key,1).');';\n\t\t//echo $gSQL;\n\t\t//echo '<br>';\n\n\t\t$gResult = execute_query($mysqli, $gSQL);\n\t\t$group_code = $gResult[0]->fetch_array()[0];\n\t\t//echo $group_code;\n\t\t//echo '<br>';\n\n\t\t//send to Socks\n\t\t$sMail = getSocksMailer();\n\t\t$sMail->Subject = \"Litesprite User Completed Onboarding\";\n\t\t$sMail->Body = \"client key: \".$client_key.\"<br>\n\t\t\t\t\t\tgroup: \".$group_code.\"<br>\n\t\t\t\t\t\tCodes and Instructions have been sent to: \".$email.\"<br> \n\t\t\t\t\t\tDevice: \".(($device == 'A') ?'Android':'iOS').\"<br> \n\t\t\t\t\t\tDevice email: \".$device_email.\"<br>\n\t\t\t\t\t\tLast name: \".$lname.\"<br>\n\t\t\t\t\t\tFirst name:\".$fname;\n\t\t//echo $sMail->Body;\n\t\t//echo '<br>';\n\t\t$sMail->AddAddress(\"[email protected]\");\n\t\tsendMail($sMail);\n\t\t//send to User\n\t\t$uMail = getSocksMailer();\n\t\t$uMail->Subject = \"Litesprite Beta Sign-Up Completed!\";\n\t\t$uMail->AddEmbeddedImage('../images/paw.png', 'paw');\n\t\t$uMail->Body = $final1.$group_code.$final2.$client_key.$final3.$device_email.$final4;\n\t\t//echo $uMail->Body;\n\t\t$uMail->AddAddress($email);\n\t\tsendMail($uMail);\n\t}\n}", "function clsRecordemails()\r\n {\r\n\r\n global $FileName;\r\n $this->Visible = true;\r\n $this->Errors = new clsErrors();\r\n $this->ds = new clsemailsDataSource();\r\n $this->ReadAllowed = false;\r\n $this->InsertAllowed = false;\r\n $this->UpdateAllowed = false;\r\n $this->DeleteAllowed = false;\r\n $this->Visible = (CCSecurityAccessCheck(\"1;2\") == \"success\");\r\n if($this->Visible)\r\n {\r\n $this->ReadAllowed = CCUserInGroups(CCGetGroupID(), \"1;2\");\r\n $this->InsertAllowed = CCUserInGroups(CCGetGroupID(), \"1;2\");\r\n $this->ComponentName = \"emails\";\r\n $this->HTMLFormAction = $FileName . \"?\" . CCAddParam(CCGetQueryString(\"QueryString\", \"\"), \"ccsForm\", $this->ComponentName);\r\n $CCSForm = CCGetFromGet(\"ccsForm\", \"\");\r\n $this->FormSubmitted = ($CCSForm == $this->ComponentName);\r\n $Method = $this->FormSubmitted ? ccsPost : ccsGet;\r\n $this->message = new clsControl(ccsTextArea, \"message\", \"Message\", ccsMemo, \"\", CCGetRequestParam(\"message\", $Method));\r\n $this->Insert = new clsButton(\"Insert\");\r\n $this->item_id = new clsControl(ccsHidden, \"item_id\", \"Item Id\", ccsInteger, \"\", CCGetRequestParam(\"item_id\", $Method));\r\n $this->to_user_id = new clsControl(ccsHidden, \"to_user_id\", \"To User Id\", ccsInteger, \"\", CCGetRequestParam(\"to_user_id\", $Method));\r\n $this->from_user_id = new clsControl(ccsHidden, \"from_user_id\", \"From User Id\", ccsInteger, \"\", CCGetRequestParam(\"from_user_id\", $Method));\r\n $this->emaildate = new clsControl(ccsHidden, \"emaildate\", \"date\", ccsInteger, \"\", CCGetRequestParam(\"emaildate\", $Method));\r\n $this->subject = new clsControl(ccsHidden, \"subject\", \"Subject\", ccsText, \"\", CCGetRequestParam(\"subject\", $Method));\r\n if(!$this->FormSubmitted) {\r\n if(!strlen($this->from_user_id->GetValue()))\r\n $this->from_user_id->SetValue(CCGetUserID());\r\n if(!strlen($this->emaildate->GetValue()))\r\n $this->emaildate->SetValue(time());\r\n }\r\n }\r\n }", "public function process()\n\t{\n\t\t$bFriendIsSelected = false;\n\t\tif (($iUserId = $this->request()->getInt('to')))\n\t\t{\n\t\t\t$aUser = Phpfox::getService('user')->getUser($iUserId, Phpfox::getUserField());\t\t\t\n\t\t\tif (isset($aUser['user_id']))\n\t\t\t{\n\t\t\t\t//if (!Phpfox::getService('user.privacy')->hasAccess($aUser['user_id'], 'mail.send_message'))\n\t\t\t\tif (!Phpfox::getService('mail')->canMessageUser($aUser['user_id']))\n\t\t\t\t{\n\t\t\t\t\treturn Phpfox_Error::display(Phpfox::getPhrase('mail.unable_to_send_a_private_message_to_this_user_at_the_moment'));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$bFriendIsSelected = true;\n\t\t\t\t\n\t\t\t\t$this->template()->assign('aUser', $aUser);\n\t\t\t}\t\t\t\n\t\t}\n\t\tif (Phpfox::getParam('mail.spam_check_messages') && Phpfox::isSpammer())\n\t\t{\n\t\t\treturn Phpfox_Error::display(Phpfox::getPhrase('mail.currently_your_account_is_marked_as_a_spammer'));\n\t\t}\n\t\t\n\t\t$aValidation = array(\n\t\t\t'subject' => Phpfox::getPhrase('mail.provide_subject_for_your_message'),\n\t\t\t'message' => Phpfox::getPhrase('mail.provide_message')\n\t\t);\t\t\n\n\t\t$oValid = Phpfox::getLib('validator')->set(array(\n\t\t\t\t'sFormName' => 'js_form', \n\t\t\t\t'aParams' => $aValidation\n\t\t\t)\n\t\t);\n\t\t\n\t\tif ($aVals = $this->request()->getArray('val'))\n\t\t{\t\t\t\n\t\t\t// Lets make sure they are actually trying to send someone a message.\t\t\t\n\t\t\tif (((!isset($aVals['to'])) || (isset($aVals['to']) && !count($aVals['to']))) && (!isset($aVals['copy_to_self']) || $aVals['copy_to_self'] != 1))\n\t\t\t{\n\t\t\t\tPhpfox_Error::set(Phpfox::getPhrase('mail.select_a_member_to_send_a_message_to'));\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\tif ($oValid->isValid($aVals))\n\t\t\t{\t\t\t\t\n\t\t\t\tif (Phpfox::getParam('mail.mail_hash_check'))\n\t\t\t\t{\n\t\t\t\t\tPhpfox::getLib('spam.hash', array(\n\t\t\t\t\t\t\t\t'table' => 'mail_hash',\n\t\t\t\t\t\t\t\t'total' => Phpfox::getParam('mail.total_mail_messages_to_check'),\n\t\t\t\t\t\t\t\t'time' => Phpfox::getParam('mail.total_minutes_to_wait_for_pm'),\n\t\t\t\t\t\t\t\t'content' => $aVals['message']\n\t\t\t\t\t\t\t)\t\t\t\t\n\t\t\t\t\t\t)->isSpam();\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (Phpfox::getParam('mail.spam_check_messages'))\n\t\t\t\t{\n\t\t\t\t\tif (Phpfox::getLib('spam')->check(array(\n\t\t\t\t\t\t\t\t'action' => 'isSpam',\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t'params' => array(\n\t\t\t\t\t\t\t\t\t'module' => 'comment',\n\t\t\t\t\t\t\t\t\t'content' => Phpfox::getLib('parse.input')->prepare($aVals['message'])\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t\t{\n\t\t\t\t\t\tPhpfox_Error::set(Phpfox::getPhrase('mail.this_message_feels_like_spam_try_again'));\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\n\t\t\t\t\n\t\t\t\tif (Phpfox_Error::isPassed())\n\t\t\t\t{\n\t\t\t\t\t$aIds = Phpfox::getService('mail.process')->add($aVals);\n\t\t\t\t\t\n\t\t\t\t\t$this->url()->send('mail.view' , array('id' => $aIds[0]));\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\t\n\t\t\n\t\t$this->template()->assign(array(\n\t\t\t\t'bMobileInboxIsActive' => true,\t\t\t\n\t\t\t\t'bFriendIsSelected' => $bFriendIsSelected,\t\n\t\t\t\t'aMobileSubMenus' => array(\n\t\t\t\t\t$this->url()->makeUrl('mail') => Phpfox::getPhrase('mail.mobile_messages'),\n\t\t\t\t\t$this->url()->makeUrl('mail', 'sent') => Phpfox::getPhrase('mail.sent'),\n\t\t\t\t\t$this->url()->makeUrl('mail', 'compose') => Phpfox::getPhrase('mail.compose')\n\t\t\t\t),\n\t\t\t\t'sActiveMobileSubMenu' => $this->url()->makeUrl('mail', 'compose')\n\t\t\t)\n\t\t);\t\t\n\t}", "function send_mails() {\n\t //$myactivebatch = $this->load_saved_batch();//load direct from file\n\t $myactivebatch = GetParam('batchrestore');//load in html form field and save as param\n\t //echo '>',$myactivebatch;\n\t \n\t $batch = GetReq('batchid');\n\t $bid = GetParam('bid')?GetParam('bid'):0; \n\t \t \n\t $include_subs = GetParam('includesubs');\n\t $include_all = GetParam('includeall');\t \n\t $subscribers = $include_subs?$include_subs:$include_all;//one or another\n\t\n\t $from = GetParam('from');\n\t $to = GetParam('to');\t \n\t $subject = GetParam('subject');\n\t \n\t if ($this->template) {\n\t if ($this->dirdepth) {\n\t\t for($i=0;$i<$this->dirdepth;$i++)\n\t\t\t $backdir .= \"../\";\n\t\t }\n\t\t else\n\t\t $backdir = \"../\";\n\t\t //repalce viewable data to send data (absolute dir)\t \n\t\t //echo $backdir;\n\t\t if ($this->mailbody)//get session text with headers\n\t\t $body = $this->mailbody;\n\t\t else //get text area\n\t $body = str_replace($backdir,$this->url.$this->infolder.'/',GetParam('mail_text')); \t \n\t }\t \n\t else\t{ //text area or session text with headers\n\t \n\t if (GetReq('editmode')) {\n\t\t $mytext = $this->mailbody?$this->mailbody:GetParam('mail_text');\n\t\t $body = $this->unload_spath($mytext);\n\t\t }\n\t\t else\n\t $body = $this->mailbody?$this->mailbody:GetParam('mail_text'); \n\t }\t \t \n\t \t \n\t\t \n\t if ($subscribers) {// || ($batch)) {//if sybs checked or batch in process..\n\t \n\t //save the current mail campaign state\n\t $this->save_current_batch($batch);\t\n\t \t \t \n\t //$subs = $this->subs_mail;\n\t\t \n\t\t //workinh batch tosend\n\t\t $subs = $this->getmails($include_all,$this->batch,$bid);\n\t\t \n\t if (($batch>=0) && ($batch>=$myactivebatch)) {\n\n\t //if ($res = GetGlobal('controller')->calldpc_method('rcshmail.sendit use '.$from.'+'.$to.'+'.$subject.'+'.$body.'+'.$subs)) {\n if ($res = $this->sendit($from,$to,$subject,$body,$subs,$this->ishtml)) {\n\t $this->mailmsg = $res . \" mail(s) send!\";\n\t }\t \n\t else \n\t $this->mailmsg = \"Send failed\";\n\t\t }\n\t\t else \t\n\t\t $this->mailmsg = \"Send bypassed\"; \n\t }\t \n\t else {//one receipent\n\t //if ($res = GetGlobal('controller')->calldpc_method('rcshmail.sendit use '.$from.'+'.$to.'+'.$subject.'+'.$body))\n\t\t if ($res = $this->sendit($from,$to,$subject,$body,null,$this->ishtml)) \n\t\t $this->mailmsg = $res . \" mail(s) send!\";\n\t\t else\n\t\t $this->mailmsg = \"Send failed\";\t\n\t }\t \n\t\t \n\t //auto refresh\n\t $refresh = GetParam('refresh')?GetParam('refresh'):$this->auto_refresh;\n\t if (($refresh>0) && ($res==$this->batch)) {\n $this->refresh_bulk_js(seturl('t=cpsubsend&batchid='.($bid+1).'&batch='.$this->batch.'&refresh='.$refresh),$refresh);\t\t\t \n\t $this->mailmsg .= \"Wait for next batch \" . $this->timeout;\t\t \n\t }\t \n\t \n\t //test\n\t //return $this->batch;\n //return (400);\t \t //??????????????????????????????????????????????????\n\t //echo '---------------------',$res,'---------------------------<br>';\n\t \n\t if ($res<$this->batch) //means end of campaign\n\t $this->reset_batch_state();\n\t \n\t return ($res);//how many mails tried to send (batch...)\t \n\t}", "function toHTML(){\n\t\t$objEmailAddressInput = new Input(\"strEmailAddress\", \"strEmailAddressID\");\n\t\t$objEmailAddressInput->setClass(\"box\");\n\t\t$objEmailAddressInput->setValue(\"\");\n\t\t\n\t\t// Create the sender input box\n\t\t$objSenderInput = new Input(\"strSender\", \"strSenderID\");\n\t\t$objSenderInput->setClass(\"box\");\n\t\t$objSenderInput->setValue(\"\");\n\t\t\n\t\t// Create the text message input box\n\t\t$objEmailTextArea = new textArea(\"strEmailText\",\"strEmailTextID\");\n\t\t$objEmailTextArea->setClass(\"box\");\n\t\t$objEmailTextArea->setValue(\"\");\n\t\t\n\t\t// Create the email button input box\n\t\t$objSendEmailButton = new Button(\"strSendEmail\", \"strSendEmailID\");\n\t\t$objSendEmailButton->setValue(\"Send\");\n\t\t$objSendEmailButton->setAction(\"main.php\");\n\t\t\n\t\t// Determine if there are any error messages to be displayed\n\t\t$errorEmailAddress = get_error_message('strEmailAddress.err');\n\t\t$errorSender = get_error_message('strSender.err');\n\t\t$errorText = get_error_message('strEmailText.err');\n\t\t\n\t\t// Reload the email address, sender, or message session if it exists\n\t\tif(array_key_exists('strEmailAddress', $_SESSION))\n\t\t\t$objEmailAddressInput->setValue($_SESSION['strEmailAddress']);\n\t\tif(array_key_exists('strSender', $_SESSION))\n\t\t\t$objSenderInput->setValue($_SESSION['strSender']);\n\t\tif(array_key_exists('strEmailText', $_SESSION))\n\t\t\t$objEmailTextArea->setValue($_SESSION['strEmailText']);\n\t\t\n\t\t// Display the form in html\n\t\t$strHTML = \"<h2>Contact Us</h2>\n\t\t\t\t\t<p>\" . $this->_strText . \"</p>\". \n\t\t\t\t\t\"<form action=\\\"verifyEmail.php\\\" method=\\\"POST\\\">\n\t\t\t\t\t\t<div class=\\\"outerbox\\\"><br/>\n\t\t\t\t\t\t\tYour email address:<br/>\". \n\t\t\t\t\t\t\t\t$objEmailAddressInput->toHTML() . $errorEmailAddress . \"<br/>\". \n\t\t\t\t\t\t\t\"Name:<br/>\". \n\t\t\t\t\t\t\t\t$objSenderInput->toHTML() . $errorSender . \"<br/>\" . \n\t\t\t\t\t\t\t\"Message:<br/>\". \n\t\t\t\t\t\t\t\t$objEmailTextArea->toHTML() . $errorText . \"<br/>\". \n\t\t\t\t\t\t\t\"<br/><div class=\\\"toright\\\">\" . \n\t\t\t\t\t\t\t$objSendEmailButton->toHTML() . \n\t\t\t\t\t\t\"</div>\n\t\t\t\t\t</form></div>\";\n\t\t\t\t\t\t\t\n\t\treturn $strHTML;\n\t}", "function _webform_edit_email_validate($element, &$form_state) {\r\n if ($form_state['values']['user_email']) {\r\n $form_state['values']['value'] = '%useremail';\r\n }\r\n}", "private function generateEmail($intermediair) {\n $this->smarty->assign('user', $intermediair);\n $q = 'SELECT * FROM `Useridemail` WHERE id = ' . $intermediair['userid'];\n $data = $this->cmsmanager->customSelectQuery($q)[0];\n $token = $this->generateToken($data['email'], $user['userid'], $user['refCode']);\n $this->smarty->assign('token', $token);\n $email = new GezinneninArmoedeEmail();\n $email->addReceiver('[email protected]');\n// //$email->addReceiver($data['email']);\n $email->setSubject('Activiteit 2020');\n $email->setHtmlBody($this->smarty->fetch(\"intermediairFormEmail.html\"));\n $email->setSender(\"[email protected]\");\n $email->send();\n }", "function contactSendMail()\r\n {\r\n $subject = 'Contact : ' . $_POST['contactNom'];\r\n $body = $_POST['contactMsg'];\r\n\r\n\r\n $this->sendMail($subject, $body);\r\n }", "private function sendEmail()\n\t{\n\t\t// Get data\n\t\t$config = JFactory::getConfig();\n\t\t$mailer = JFactory::getMailer();\n\t\t$params = JComponentHelper::getParams('com_code');\n\t\t$addresses = $params->get('email_error', '');\n\n\t\t// Build the message\n\t\t$message = sprintf(\n\t\t\t'The sync cron job on developer.joomla.org started at %s failed to complete properly. Please check the logs for further details.',\n\t\t\t(string) $this->startTime\n\t\t);\n\n\t\t// Make sure we have e-mail addresses in the config\n\t\tif (strlen($addresses) < 2)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$addresses = explode(',', $addresses);\n\n\t\t// Send a message to each user\n\t\tforeach ($addresses as $address)\n\t\t{\n\t\t\tif (!$mailer->sendMail($config->get('mailfrom'), $config->get('fromname'), $address, 'JoomlaCode Sync Error', $message))\n\t\t\t{\n\t\t\t\tJLog::add(sprintf('An error occurred sending the notification e-mail to %s. Error: %s', $address, $e->getMessage()), JLog::INFO);\n\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t}", "public function website() {\n\t\t\n\t\t$name \t\t= Input::get('name');\n\t\t$mailFrom \t= Input::get('email');\n\t\t$phone \t\t= Input::get('phone');\n\t\t$comments \t= Input::get('comments');\n\t\t$emailTo \t= '[email protected]';\n\t\t\n\t\t$subject = 'Contato realizado a partir do site Pifou por: ' . $name . '.';\n\t\t$vars = array(\n\t\t\t'name'\t\t=>\t$name,\n\t\t\t'email'\t\t=>\t$mailFrom,\n\t\t\t'phone'\t\t=>\t$phone,\n\t\t\t'comments'\t=>\t$comments,\n\t\t);\n\t\t\n EmailTemplate::SendByKey('contact_mail_user', $vars, $emailTo, null, null, $mailFrom);\n\t\t\n\t\treturn \"<fieldset><div id='success_page'><h4 class='highlight'>Obrigado, <strong>$name</strong>! Sua mensagem foi enviada. Entraremos em contato o mais rápido possível.</h4></div></fieldset>\";\n }", "public function website_provider() {\n\t\t\n\t\t$name = Input::get('name');\n\t\t$mailFrom = Input::get('email');\n\t\t$phone = Input::get('phone');\n\t\t$comments = Input::get('comments');\n\t\t$emailTo = '[email protected]';\n\t\t\n\t\t$vars = array(\n\t\t\t'name'\t\t=>\t$name,\n\t\t\t'email'\t\t=>\t$mailFrom,\n\t\t\t'phone'\t\t=>\t$phone,\n\t\t\t'comments'\t=>\t$comments,\n\t\t);\n\n\t\tEmailTemplate::SendByKey('contact_mail_provider', $vars, $emailTo, null, null, $mailFrom);\n\t\t\n\t\t\n\t\treturn \"<fieldset><div id='success_page'><h4 class='highlight'>Obrigado, <strong>$name</strong>! Sua mensagem foi enviada. Entraremos em contato o mais rápido possível.</h4></div></fieldset>\";\n }", "function elegantSendEmail() {\n $to = $_POST['datastring']['newEmailForm'][0][0];\n $title = $_POST['datastring']['newEmailForm'][0][1];\n $messagetext = nl2br(rawurldecode($_POST['datastring']['newEmailForm'][0][2])); \n $properties = $_POST['datastring']['properties'];\n\n //Send the email and get a report back\n $sent = elegeantSend($to,$messagetext,$properties);\n \n //Save the email as a post and get a report back\n $saved = elegantSave($title,$to,$messagetext,$properties);\n\n //echo 'Email Status:'.$sent.'<br>Save Status:'.$saved;\n \n //Terminate and provide a response. \n wp_die(); \n}", "function aform($setup,$subject,$to,$cc,$bcc,$from) {\n\t\t\n\t\tif (isset($_POST[\"Submit\"])) {\n\t\t\t\n\t\t\t// Compile all POST info\n\t\t\tforeach ($_POST as $key => $value) {\n\t\t\t\t$$key = $value;\t\t\t\t\t\t\t\t\n\t\t\t\tif ($key != \"require\" && $key != \"Submit\" && $key != \"verify\" && $key != \"birthday\") {\n\t\t\t\t\t$message .= \"<span style='text-transform: capitalize; font-weight: 700;'>\".$key.\"</span> \".$value.\"<br /><br />\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//If \"Verify\" is set, then check to see if correct\n\t\t\tif ($birthday != \"\") {\n\t\t\t\tif ($birthday != $verify) {\n\t\t\t\t\t$error .= \"Invalid Verification Code<br />\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Check for \"required\" fields\n\t\t\tif ($require != \"\") {\n\t\t\t\t$dcheck = explode(\",\", $require);\n\t\t\t\t\n\t\t\t\twhile(list($check) = each($dcheck)) {\n\t\t\t\t\tif(!$$dcheck[$check]) {\n\t\t\t\t\t\t$error .= \"The <b>$dcheck[$check]</b> field is required.<br />\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Check the Email Address\n\t\t\t$checkEmail = validEmail($_POST[\"email\"]);\n\t\t\tif ($checkEmail != \"1\") {\n\t\t\t\t$error .= \"Your email is not valid. Please correct.<br />\";\n\t\t\t}\n\t\t\t\n\t\t}\t\n\t\n\n\t\t/* Let's start by building the form */\n\t\t$form .= '\n\t\t<form method=\"post\" enctype=\"multipart/form-data\" class=\"form\">';\n\t\t$form .= \"\\n\";\n\t\t\t\t\t\t\t\t\n\t\t// let's loop the PIPES \"|\" and breakdown the UNDERSCORES \"_\" then use this data to build the form\n\t\t\t\t\t\n\t\t$formchunk = explode(\"|\", $setup);\n\t\t\t\t\t\n\t\tforeach ($formchunk as $key => $value) {\n\t\t\t$entrychunk = explode(\"_\", $value);\n\t\t\t$formalname = $entrychunk[0];\n\t\t\t$name = $entrychunk[1];\n\t\t\t$type = $entrychunk[2];\n\t\t\t\n\t\t\tif ($entrychunk[3] == \"required\") {\n\t\t\t\t$required = $entrychunk[3]; // this is an optional field for making it REQUIRED and may not be set\n\t\t\t\t$values = $entrychunk[4]; // this is an optional field for the VALUE and may not be set (most commonly used for \"select\" and \"radio\"\n\t\t\t} else {\n\t\t\t\t$values = $entrychunk[3]; // this is an optional field for the VALUE and may not be set (most commonly used for \"select\" and \"radio\"\n\t\t\t\t$required = $entrychunk[4]; // this is an optional field for making it REQUIRED and may not be set\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\t$form .= '\t\t\t\t\t\t<div>\n\t\t\t<label>'.$formalname.'</label>';\n\t\t\t$form .= \"\\n\";\n\t\t\tif ($_POST[$name]) {\n\t\t\t\t$valueDisplay = $_POST[$name];\n\t\t\t} else {\n\t\t\t\t$valueDisplay = $values;\n\t\t\t}\n\t\t\t\n\t\t\tswitch ($type) {\n\t\t\t\tcase \"text\":\n\t\t\t\t\t$form .= '\t\t\t\t\t\t\t<input name=\"'.$name.'\" type=\"text\" class=\"text\" id=\"'.$name.'\" value=\"'.$valueDisplay.'\">';\n\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"password\":\n\t\t\t\t\t$form .= '\t\t\t\t\t\t\t<input name=\"'.$name.'\" type=\"password\" class=\"text\" id=\"'.$name.'\" value=\"'.$valueDisplay.'\">';\n\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\tbreak; \n\t\t\t\tcase \"radio\":\n\t\t\t\t\t$form .= '<div class=\"radios\">';\n\t\t\t\t\t$valuechunk = explode(\"-\", $values);\n\t\t\t\t\tforeach ($valuechunk as $keey => $subvalue) {\n\t\t\t\t\t\tif ($subvalue == $valueDisplay) { $active = \" checked\"; }\n\t\t\t\t\t\t$form .= '\t\t\t\t\t\t\t<input type=\"radio\" name=\"'.$name.'\" value=\"'.$subvalue.'\" class=\"text radio\"'.$active.'> '.$subvalue.'<br />';\n\t\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\t\t$active = \"\";\n\t\t\t\t\t}\n\t\t\t\t\t$form .= \"</div>\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"checkbox\":\n\t\t\t\t\t$form .= '<div class=\"radios\">';\n\t\t\t\t\t$valuechunk = explode(\"-\", $values);\n\t\t\t\t\tforeach ($valuechunk as $keey => $subvalue) {\n\t\t\t\t\t\tif ($subvalue == $valueDisplay) { $active = \" checked\"; }\n\t\t\t\t\t\t$form .= '\t\t\t\t\t\t\t<input type=\"checkbox\" name=\"'.$name.'\" value=\"'.$subvalue.'\" class=\"text radio\"'.$active.'> '.$subvalue.'<br />';\n\t\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\t\t$active = \"\";\n\t\t\t\t\t}\n\t\t\t\t\t$form .= \"</div>\";\n\t\t\t\t\tbreak;\t\t\t\t\t\n\t\t\t\tcase \"select\":\n\t\t\t\t\t$form .= '\t\t\t\t\t\t\t<select name=\"'.$name.'\" class=\"text select\">';\n\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\t$form .= '\t\t\t\t\t\t\t\t<option value=\"\"></option>';\n\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\t$valuechunk = explode(\"-\", $values);\n\t\t\t\t\tforeach ($valuechunk as $keey => $subvalue) {\n\t\t\t\t\t\tif ($subvalue == $valueDisplay) { $active = \" selected\"; }\n\t\t\t\t\t\t$form .= '\t\t\t\t\t\t\t\t<option value=\"'.$subvalue.'\"'.$active.'>'.$subvalue.'</option>';\n\t\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\t\t$active = \"\";\n\t\t\t\t\t}\n\t\t\t\t\t$form .= '\t\t\t\t\t\t\t</select>';\n\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"textarea\":\n\t\t\t\t\t$form .= '\t\t\t\t\t\t\t<textarea name=\"'.$name.'\" class=\"text textarea\" id=\"'.$name.'\">'.$valueDisplay.'</textarea>';\n\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"file\":\n\t\t\t\t\t$form .= '\t\t\t\t\t\t\t<input name=\"file\" class=\"text\" id=\"'.$name.'\" type=\"file\" />';\n\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\tbreak;\t\n\t\t\t\tcase \"verify\":\n\t\t\t\t\t$verification = rand(1111, 9999);\n\t\t\t\t\t$form .= '\t\t\t\t\t\t\t<input type=\"hidden\" value=\"'.$verification.'\" name=\"birthday\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"verifytext\">'.$verification.'</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" value=\"\" name=\"verify\" class=\"text verify\" />';\n\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\t\t\n\t\t\t$form .= '\t\t \t\t\t\t\t<div class=\"clear\"></div>';\n\t\t\t$form .= \"\\n\";\n\t\t\t$form .= '\t\t\t\t\t\t</div>';\n\t\t\t$form .= \"\\n\";\n\t\t\t$form .= \"\\n\";\n\t\t\t\t\n\t\t\tif ($required != \"\") {\n\t\t\t\t$requireding = $name;\n\t\t\t\tif ($req != \"\") {\n\t\t\t\t\t$req .= ','.$requireding;\n\t\t\t\t} else {\n\t\t\t\t\t$req .= $requireding;\n\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\t\n\t\t}\n\t\t\t\t\t\n\t\t$form .= '\n\t\t<div>\n\t\t\t<label><input type=\"hidden\" name=\"require\" value=\"'.$req.'\" />&nbsp;</label>\n\t\t\t<input type=\"submit\" name=\"Submit\" value=\"Submit\" class=\"submit\">\n\t\t\t<div class=\"clear\"></div>\n\t\t</div>\n\t\t</form>';\n\n\t\t\n\t\tif (isset($_POST[\"Submit\"])) {\n\n\n\t\t\tif ($_FILES['file']['tmp_name'] != \"\") {\n\n\t\t\t\t/* Attachment */\n\t\t\t\t$uploadto = $GLOBALS[\"uploadfolder\"];\n\t\t\t\t$docroot = $GLOBALS[\"documentroot\"];\n\t\t\t\t\n\t\t\t\t// Check Entension\n\t\t\t\t$extension = pathinfo($_FILES['file']['name']);\n\t\t\t\t$extension = $extension[extension];\n\t\t\t\t$allowed_paths = explode(\", \", $GLOBALS[\"allowed_ext\"]);\t\t\t\t\t\t\n\t\t\t\tfor($i = 0; $i < count($allowed_paths); $i++) {\n\t\t\t\t\tif ($allowed_paths[$i] == \"$extension\") {\n\t\t\t\t\t\t$ok = \"1\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t// Check File Size\n\t\t\t\tif ($ok == \"1\") {\n\t\t\t\t\tif($_FILES['file']['size'] > $GLOBALS[\"max_size\"]) {\n\t\t\t\t\t\t$error .= \"File size is too big!<br />\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$ok = \"2\";\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\n\t\t\tif($error != \"\") {\n\t\t\t\t$fullmessage .= \"<p>\".$error.\"</p>\";\n\t\t\t\t$fullmessage .= $form;\n\t\t\t\treturn $fullmessage;\n\t\t\t} else { \n\t\t\t\t//success!\n\t\t\t\t\n\t\t\t\tif ($_FILES['file']['tmp_name'] == \"\") {\n\t\t\t\t\t/* No Attachment */\n\t\t\t\t\t$send_to = $to;\n\t\t\t\t\t$send_cc = $cc;\n\t\t\t\t\t$send_bcc = $bcc;\n\t\t\t\t\t$send_from = $from;\n\t\t\t\t\t$send_subject = $subject;\n\t\t\t\t\t$message .= \"IP Address: \".$_SERVER['REMOTE_ADDR']; \n\t\t\t\t\tamail($send_to,$send_cc,$send_bcc,$send_from,$send_subject,$message);\t\n\t\t\t\t\treturn \"<p>\".$GLOBALS[\"success\"].\"</p>\";\n\t\t\t\t} else {\n\t\t\t\t\t\t\n\t\t\t\t\tif ($ok == \"2\") {\n\t\t\t\t\t\t@move_uploaded_file($_FILES['file']['tmp_name'], $uploadto.$_FILES['file']['name']);\n\t\t\t\t\t\t// how to use\n\t\t\t\t\t\t$my_file = $_FILES['file']['name'];\n\t\t\t\t\t\t$my_path = $doc.$uploadto;\n\t\t\t\t\t\t$my_name = $from;\n\t\t\t\t\t\t$my_mail = $from;\n\t\t\t\t\t\t$send_cc = $cc;\n\t\t\t\t\t\t$send_bcc = $bcc;\n\t\t\t\t\t\t$my_replyto = $from;\n\t\t\t\t\t\t$my_to = $to;\n\t\t\t\t\t\t$my_subject = $subject;\n\t\t\t\t\t\t$message .= \" IP Address: \".$_SERVER['REMOTE_ADDR'];\n\t\t\t\t\t\tmail_attachment($my_file, $my_path, $my_to, $my_mail, $my_name, $my_replyto, $my_subject, $message, $cc, $bcc);\t\t\t\t\t\t\t\n\t\t\t\t\t\treturn \"<p>\".$GLOBALS[\"success\"].\"</p>\";\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t} else {\n\t\t\treturn $form;\n\t\t}\n\t}", "function daily_update_property_email(){\n\t\t$meta_post = $this->InteractModal->get_update_post_meta();\n\t\tif(!empty($meta_post)){\n\t\t\t$data = array();\n\t\t\tforeach($meta_post as $meta_details){\n\t\t\t\t$user_id = $this->InteractModal->get_post_meta($meta_details['post_id'],'initiator_id');\n\t\t\t\t$data[$user_id][]= $meta_details['meta_key'];\n\t\t\t}\n\t\t}\t\t\n\t\t$get_data=$this->InteractModal->get_today_data();\n\t\t$id=2;\n\t\tif(!empty($get_data)){\n\t\t\t$result = array();\n\t\t\tforeach ($get_data as $element) {\n\t\t\t\t$result[$element['user_id']][]= $element['task_type'];\n\t\t\t}\n\t\t\tif(!empty($data) && (!empty($result))){\n\t\t\t\t$results = array_merge($data,$result);\n\t\t\t}\n\t\t\t$user_id= '';\n\t\t\tif(!empty($results)){\n\t\t\t\tforeach($result as $user_id=>$value):\n\t\t\t\t\t$update_details='';\n\t\t\t\t\t$value = array_unique($value);\n\t\t\t\t\tforeach($value as $values):\t\t\t\t\t\t\n\t\t\t\t\t\t$update_details=$update_details.'Today '.ucwords($values).' Successfully.<br>';\n\t\t\t\t\tendforeach;\n\t\t\t\t\tif(!empty($user_id)){\n\t\t\t\t\t\t$where = array( 'id' =>$user_id);\n\t\t\t\t\t\t$user_data=$this->InteractModal->single_field_value('users',$where);\n\t\t\t\t\t\techo $email= $user_data[0]['user_email'];\n\t\t\t\t\t\techo \"<br>\";\n\t\t\t\t\t\t$company_id = $this->InteractModal->get_user_meta( $user_id, 'company_id');\n\t\t\t\t\t\t///get auto email content data \n\t\t\t\t\t\t$status_template = $this->InteractModal->get_user_meta( $company_id, 'status_template_id_'.$id );\n\t\t\t\t\t\tif(($status_template ==1)){\n\t\t\t\t\t\t\t$subject = $this->InteractModal->get_user_meta( $company_id, 'subject_template_id_'.$id );\n\t\t\t\t\t\t\t$content = $this->InteractModal->get_user_meta( $company_id, 'content_template_id_'.$id );\n\t\t\t\t\t\t\t$user_name = $this->InteractModal->get_user_meta( $user_id, 'concerned_person');\n\t\t\t\t\t\t\t$phone_number = $this->InteractModal->get_user_meta( $user_id, 'phone_number');\n\t\t\t\t\t\t\t$logo_content = '<img src=\"'.base_url().'/assets/img/profiles/logo_(2).png\" height=\"auto\" width=\"100\" alt=\"Logo\">'; \t\t\t\t\t\t\n\t\t\t\t\t\t\t$content=nl2br($content);\n\t\t\t\t\t\t\t$content = str_replace(\"_NAME_\",$user_name,$content);\n\t\t\t\t\t\t\t$content = str_replace(\"_PHONE_\",$phone_number,$content);\n\t\t\t\t\t\t\t$content = str_replace(\"_EMAIL_\",$email,$content);\n\t\t\t\t\t\t\t$content = str_replace(\"_LOGO_\",$logo_content,$content);\n\t\t\t\t\t\t\t$content = str_replace(\"_DATE_\",date('d-F-Y'),$content);\n\t\t\t\t\t\t\t$content = $content.'<br>'.$update_details;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$template_list = $this->InteractModal->get_email_template($id);\n\t\t\t\t\t\t\tforeach( $template_list as $template_lists ):\n\t\t\t\t\t\t\t\t$subject = $template_lists['subject']; \n\t\t\t\t\t\t\t\t$content = $update_details; \n\t\t\t\t\t\t\tendforeach;\t\t\t\t\n\t\t\t\t\t\t}\t\t\t\t\n\t\t\t\t\t\t///get auto email content data \t\t\t\t\n\t\t\t\t\t\t$email_data = array('email' => $email,\n\t\t\t\t\t\t\t'content' => $content,\n\t\t\t\t\t\t\t'subject' => $subject\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$this->send_email($email_data);\n\t\t\t\t\t} \n\t\t\t\tendforeach;\n\t\t\t}\n\t\t}\n\t}", "function do_form_additional_emails($s_id) {\n\t# Dim some Vars:\n\t\tglobal $_TCFG, $_DBCFG, $db_coin, $_LANG, $_nl, $_sp;\n\n\t# Build common td start tag / col strings (reduce text)\n\t\t$_td_str_left\t= '<td class=\"TP1SML_NL\">'.$_nl;\n\t\t$_td_str_ctr\t= '<td class=\"TP1SML_NC\">'.$_nl;\n\n\t# Build table row beginning and ending\n\t\t$_cstart = '<b>'.$_LANG['_ADMIN']['l_Email_Address_Additional'].$_sp.'</b><br>'.$_nl;\n\t\t$_cstart .= '<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\"><tr>'.$_nl;\n\t\t$_cstart .= $_td_str_left.$_LANG['_ADMIN']['l_First_Name'].'</td>'.$_nl;\n\t\t$_cstart .= $_td_str_left.$_LANG['_ADMIN']['l_Last_Name'].'</td>'.$_nl;\n\t\t$_cstart .= $_td_str_left.$_LANG['_ADMIN']['l_Email_Address'].'</td>'.$_nl;\n\t\t$_cstart .= $_td_str_ctr.$_LANG['_CCFG']['Actions'].'</td></tr>'.$_nl;\n\n\t\t$_cend = '</table>'.$_nl;\n\n\t# Set Query for select (additional emails).\n\t\t$query = 'SELECT *';\n\t\t$query .= ' FROM '.$_DBCFG['suppliers_contacts'];\n\t\t$query .= ' WHERE contacts_s_id='.$s_id;\n\t\t$query .= ' ORDER BY contacts_email ASC';\n\n\t# Do select and return check\n\t\tIF (is_numeric($s_id)) {\n\t\t\t$result\t= $db_coin->db_query_execute($query);\n\t\t\t$numrows\t= $db_coin->db_query_numrows($result);\n\t\t}\n\t# Process query results\n\t\tIF ($numrows) {\n\t\t\t$button = str_replace('<img src=\"', '', $_TCFG['_IMG_SAVE_S']);\n\t\t\twhile ($row = $db_coin->db_fetch_array($result)) {\n\n\t\t\t# Display the \"edit/delete data\" form for this row\n\t\t\t\t$_out .= '<form method=\"POST\" action=\"admin.php\">'.$_nl;\n\t\t\t\t$_out .= '<input type=\"hidden\" name=\"s_id\" value=\"'.$s_id.'\">'.$_nl;\n\t\t\t\t$_out .= '<input type=\"hidden\" name=\"stage\" value=\"\">'.$_nl;\n\t\t\t\t$_out .= '<input type=\"hidden\" name=\"op\" value=\"ae_mail_update\">'.$_nl;\n\t\t\t\t$_out .= '<input type=\"hidden\" name=\"contacts_id\" value=\"'.$row['contacts_id'].'\">'.$_nl;\n\t\t\t\t$_out .= '<input type=\"hidden\" name=\"cp\" value=\"suppliers\">'.$_nl;\n\t\t\t\t$_out .= '<tr>'.$_nl;\n\t\t\t\t$_out .= $_td_str_left.'<input class=\"PSML_NL\" type=\"text\" name=\"ae_fname\" size=\"15\" value=\"'.htmlspecialchars($row['contacts_name_first']).'\"></td>'.$_nl;\n\t\t\t\t$_out .= $_td_str_left.'<input class=\"PSML_NL\" type=\"text\" name=\"ae_lname\" size=\"15\" value=\"'.htmlspecialchars($row['contacts_name_last']).'\"></td>'.$_nl;\n\t\t\t\t$_out .= $_td_str_left.'<input class=\"PSML_NL\" type=\"text\" name=\"ae_email\" size=\"35\" value=\"'.htmlspecialchars($row['contacts_email']).'\"></td>'.$_nl;\n\t\t\t\t$_out .= $_td_str_left.'&nbsp;&nbsp;&nbsp;'.$_nl;\n\n\t\t\t# Display \"update\" button\n\t\t\t\t$_out .= '<input type=\"image\" src=\"'.$button.$_nl;\n\n\t\t\t# Display \"Delete\" button\n\t\t\t\t$_out .= '&nbsp;<a href=\"admin.php?cp=suppliers&op=ae_mail_delete&stage=0&s_id='.$s_id.'&contacts_id='.$row['contacts_id'].'\">'.$_TCFG['_IMG_DEL_S'].'</a>'.$_nl;\n\n\t\t\t# End row\n\t\t\t\t$_out .= '</td></tr></form>'.$_nl;\n\t\t\t}\n\t\t}\n\n\t# Display form for adding a new entry\n\t\t$button = str_replace('<img src=\"', '', $_TCFG['_IMG_ADD_S']);\n\t\t$_out .= '<form method=\"POST\" action=\"'.$_SERVER['PHP_SELF'].'\">'.$_nl;\n\t\t$_out .= '<input type=\"hidden\" name=\"s_id\" value=\"'.$s_id.'\">'.$_nl;\n\t\t$_out .= '<input type=\"hidden\" name=\"stage\" value=\"\">'.$_nl;\n\t\t$_out .= '<input type=\"hidden\" name=\"cp\" value=\"suppliers\">'.$_nl;\n\t\t$_out .= '<input type=\"hidden\" name=\"op\" value=\"ae_mail_add\">'.$_nl;\n\t\t$_out .= '<tr>'.$_nl;\n\t\t$_out .= $_td_str_left.'<input class=\"PSML_NL\" type=\"text\" name=\"new_ae_fname\" size=\"15\" value=\"\"></td>'.$_nl;\n\t\t$_out .= $_td_str_left.'<input class=\"PSML_NL\" type=\"text\" name=\"new_ae_lname\" size=\"15\" value=\"\"></td>'.$_nl;\n\t\t$_out .= $_td_str_left.'<input class=\"PSML_NL\" type=\"text\" name=\"new_ae_email\" size=\"35\" value=\"\"></td>'.$_nl;\n\t\t$_out .= $_td_str_left.'&nbsp;&nbsp;&nbsp;'.$_nl;\n\t\t$_out .= '<input type=\"image\" src=\"'.$button.'</td></tr></form>'.$_nl;\n\n\t# Build return string\n\t\t$returning = $_cstart.$_out.$_cend;\n\n\t# Return the form\n\t\treturn $returning;\n}", "function enviar_contacto(){\n $this->asignar_ingreso();\n $nombre_sede = $this->sede;\n\n $resultado = $this->datoSede($nombre_sede);\n $cuerpo =\"<img src='http://prevaler.diazcreativos.net.ve/imagenes/PREVALER.png' /><br /><br />\n\t\t<u>Datos de Entrada:</u><br />\";\n $cuerpo .=\"<br />\";\n $cuerpo .= \"<strong>Nombre Completo: </strong>\".utf8_decode($this->nombre).\"<br />\" ;\n $cuerpo .= \"<strong>Número de telefono: </strong>\".$this->telefono.\"<br />\" ;\n $cuerpo .= \"<strong>E-mail: </strong>\".$this->email.\"<br />\" ;\n $cuerpo .= \"<strong>Mensaje: </strong>\".$this->comentario.\"<br />\";\n $cuerpo .= \"<br />\";\n $cuerpo .= \"---- Fin ----\";\n $cuerpo .= \"<br />\";\n $subject= \"Contacto Web Prevaler\";\n $subject2= \"Contacto Web Prevaler\";\n $basemailfor=$resultado['email_sede'];\n //$basemailfor=\"[email protected]\";\n $basemailfrom = $this->email;\n $respuesta =\"<img src='http://prevaler.diazcreativos.net.ve/imagenes/PREVALER.png' /><br />\n\t\t<strong>Saludos Sr(a).: $this->nombre $this->apellido</strong><br /><br />\n\t\tNosotros hemos recibido su mensaje, nuestro departamento de atención al cliente le responderá lo más pronto posible<br />\n\t\tGracias por contactar a Prevaler.<br />\n\t\tPrevaler<br /><br />\n\t\tTel&eacute;fonos: <br/>\n\t\t\".$resultado['telefono_sede'].\"<br />\n\t\tTwitter: <a href='https://twitter.com/Prevaler_VE'>@Prevaler_VE</a><br />\n\t\tInstagram: <a href='https://www.instagram.com/prevaler_ve/'>@prevaler_ve</a><br />\n\t\t\".$resultado['email_sede'].\"\n\t\t<br /><br />\n\t\tAtentamente,<br />\n\t\tClínica Prevaler.\";\n $this->mensaje=\"<strong>&iexcl;Excelente!</strong> Su Mensaje ha sido enviado exitosamente.\";\n\n $mail = new PHPMailer();\n $mail->From = $basemailfrom;\n $mail->FromName = utf8_decode($subject);\n $mail->AddAddress($basemailfor, $this->nombre.\" \".$this->apellido);\n $mail->Subject = utf8_decode($subject);\n $mail->Body = $cuerpo;\n $mail->AltBody = $cuerpo;\n $exito = $mail->Send();\n\n $mail2 = new PHPMailer();\n $mail2->From = $basemailfor;\n $mail2->FromName = utf8_decode($subject2);\n $mail2->AddAddress($basemailfrom, $this->nombre.\" \".$this->apellido);\n $mail2->Subject = utf8_decode($subject2);\n $mail2->Body = $respuesta;\n $mail2->AltBody = $respuesta;\n $exito = $mail2->Send();\n }", "function email_activation($activationCode,$form)\n\t{\n\t\t$emailaddress = $this->namedFields['email']->getData();\n\t\t$site_address = SITE_ADDRESS;\n $site_address .= (substr(SITE_ADDRESS, -1) == '/') ? '' : '/';\n\t\t$link = $site_address.'sign_up?activate_code='.$activationCode;\n\t\t$body = \"<!DOCTYPE html PUBLIC \\\"-//W3C//DTD XHTML 1.0 Transitional//EN\\\" \\\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\\\"><html xmlns=\\\"http://www.w3.org/1999/xhtml\\\" lang=\\\"en\\\" xml:lang=\\\"en\\\"><head><title>Church Growth Research Programme</title><style type=\\\"text/css\\\"><!-- body { background:#ffffff; margin:0; padding:0; } p { font-family:Arial, Helvetica, sans-serif; font-size:14px; color:#000000; line-height:22px; margin:10px 0px 10px 0px; text-align:left; } h1, h2, h3, h4, h5, h6 { font-family:Arial, Helvetica, sans-serif; } a { color:#2a6307; outline:none; text-decoration:underline; } a:hover { color:#569823; text-decoration:underline; } --> </style></head><body bgcolor=\\\"#fff\\\"><div align=\\\"center\\\"><table width=\\\"600\\\" cellspacing=\\\"0\\\" cellpadding=\\\"0\\\" style=\\\"border:none;\\\"><tbody><tr><td><img width=\\\"600\\\" vspace=\\\"0\\\" hspace=\\\"0\\\" height=\\\"188\\\" border=\\\"0\\\" align=\\\"top\\\" src=\\\"http://www.churchgrowthresearch.org.uk/images/emailheader.jpg\\\" alt=\\\"Church Growth Research Programme\\\" /></td></tr><tr><td bgcolor=\\\"#fbf5de\\\" style=\\\"padding:0px 30px 0px 30px;\\\"><p>Welcome to the Church Growth Research Programme.</p><p>Please click on the link below to activate your account:<p>\".\n\t\t\t\"<p><a href=\\\"$link\\\">$link</a></p><p>Thank you, the Church Growth Reseach Programme website team.</p>\".\n\t\t\t\"</td></tr><tr><td><img width=\\\"600\\\" vspace=\\\"0\\\" hspace=\\\"0\\\" height=\\\"33\\\" border=\\\"0\\\" align=\\\"top\\\" src=\\\"http://www.churchgrowthresearch.org.uk/images/emailfooter.jpg\\\" alt=\\\"Church Growth Research Programme\\\" /></td></tr></tbody></table></div></body></html>\";\n\t\t$from_email_address = $form['email'];\n\t\t$this->send_mail($emailaddress, SITE_NAME, $from_email_address, 'Account Activation', $body, $body_text);\n\n\t}", "function changeEmail() {\r\n\r\n\tglobal $SALT;\r\n\tglobal $DB;\r\n\tglobal $MySelf;\r\n\r\n\t// Are we allowed to change our email?\r\n\tif (!$MySelf->canChangeEmail()) {\r\n\t\tmakeNotice(\"You are not allowed to change your email. Ask your CEO to re-enable this feature for your account.\", \"error\", \"Forbidden\");\r\n\t}\r\n\r\n\t/*\r\n\t* At this point we know that the user who submited the\r\n\t* email change form is both legit and the form was not tampered\r\n\t* with. Proceed with the email-change.\r\n\t*/\r\n\r\n\t// its easier on the eyes.\r\n\t$email = sanitize($_POST[email]);\r\n\t$username = $MySelf->getUsername();\r\n\r\n\t// Update the Database. \r\n\tglobal $IS_DEMO;\r\n\tif (!$IS_DEMO) {\r\n\t\t$DB->query(\"update users set email = '$email', emailvalid = '0' where username = '$username'\");\r\n\t\tmakeNotice(\"Your email information has been updated. Thank you for keeping your records straight!\", \"notice\", \"Information updated\");\r\n\t} else {\r\n\t\tmakeNotice(\"Your email would have been changed. (Operation canceled due to demo site restrictions.)\", \"notice\", \"Email change confirmed\");\r\n\t}\r\n\r\n}", "function process_mail(){\n\t\t$result = true;\n\t\t\n\t\tif(count($this->to) < 1){\n\t\t\treturn 'No email address.';\n\t\t}\n\t\t$this->set_eol();\n\t\t$this->get_message_type();\n\t\t$this->set_boundary();\n\t\t$headers = $this->set_headers();\n\t\t$body = $this->set_body();\n\t\t\n\t\tif($body == ''){\n\t\t\treturn 'Empty email body.';\n\t\t}\n\t\t$result = $this->send_mail($headers, $body);\n\t\treturn $result;\n\t}", "private function fromListSendMail($email_info = array(), $seeker_email_info = array(), $to = 'seeker')\r\t{\r\t\trequire_once 'Project/Code/1_Website/Applications/User_Account/Modules/mail/email.php';\r\t\t\r\t\t$from_email = \"[email protected]\";\r\t\t$from_name\t= \"Raymond\";\r\t\t$subject\t= \"New Lead from Looking for Eldercare\";\r\t\t\r\t\t\r\t\t$images = array(\r\t\t\t'banner'\t=> 'Project/Design/1_Website/Applications/Seeker/images/Eldercare-email-template-banner.png',\r\t\t\t'icon'\t\t=> 'Project/Design/1_Website/Applications/Seeker/images/Eldercare-email-template-icon.png',\r\t\t\t'logo'\t\t=> 'Project/Design/1_Website/Applications/Seeker/images/Eldercare-email-template-logo.png'\r\t\t);\r\t\t\r\t\tif ($to == 'seeker')\r\t\t{\r\t\t\t$view = new seekerView();\r\t\t\t$view->_set('email_to', $to);\r\t\t\t$view->_set('email_info', $seeker_email_info);\r\t\t\t\r\t\t\t$body = $view->displayEmailTemplate();\r\t\t\t\r\t\t\tforeach ($email_info['hcp'] as $hcp)\r\t\t\t{\r\t\t\t\temail::send_email($hcp['email'], $hcp['name'], $from_email, $from_name, $subject, $body, '', '', $images);\r\t\t\t}\r\t\t}\r\t\t\r\t\telse\r\t\t{\r\t\t\t$view = new seekerView();\r\t\t\t$view->_set('email_to', $to);\r\t\t\t\r\t\t\tinclude_once 'Project/Code/System/House_Type/house_types.php';\r\t\t\t$house_types = new house_types();\r\t\t\t//var_dump($house_types->selectHcpHouseTypeArray('17'));die;\r\t\t\t$counter = 0; //Manual looping to get the house types of each hcp\r\t\t\t$house_type_temp = '';\r\t\t\tforeach ($email_info['hcp'] as $hcp_info)\r\t\t\t{\r\t\t\t\tforeach ($house_types->selectHcpHouseTypeArray($hcp_info['hcp_id']) as $house_type)\r\t\t\t\t{\r\t\t\t\t\t$house_type_temp .= $house_type['house_type'].', '; \r\t\t\t\t}\r\t\t\t\t$house_type_temp = rtrim($house_type_temp, ', ');\r\t\t\t\t$email_info['hcp'][$counter]['house_type'] = $house_type_temp;\r\t\t\t\t$counter++;\r\t\t\t}\r\t\t\t\r\t\t\t$house_type_temp = '';\r\t\t\t\r\t\t\t$view->_set('email_info', $email_info['hcp']);\r\t\t\t$body = $view->displayEmailTemplate();\r\t\t\t\r\t\t\t$to_email\t= $seeker_email_info['seeker_email'];\r\t\t\t$to_name\t= $seeker_email_info['seeker_name'];\r\t\t\t\r\t\t\temail::send_email($to_email, $to_name, $from_email, $from_name, $subject, $body, '', '', $images);\r\t\t}\r\t\t\r\t}", "function process_submission() {\n\t\tglobal $post;\n\n\t\t$plugin = Grunion_Contact_Form_Plugin::init();\n\n\t\t$id = $this->get_attribute( 'id' );\n\t\t$to = $this->get_attribute( 'to' );\n\t\t$widget = $this->get_attribute( 'widget' );\n\n\t\t$contact_form_subject = $this->get_attribute( 'subject' );\n\n\t\t$to = str_replace( ' ', '', $to );\n\t\t$emails = explode( ',', $to );\n\n\t\t$valid_emails = array();\n\n\t\tforeach ( (array) $emails as $email ) {\n\t\t\tif ( !is_email( $email ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( function_exists( 'is_email_address_unsafe' ) && is_email_address_unsafe( $email ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$valid_emails[] = $email;\n\t\t}\n\n\t\t// No one to send it to :(\n\t\tif ( !$valid_emails ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$to = $valid_emails;\n\n\t\t// Make sure we're processing the form we think we're processing... probably a redundant check.\n\t\tif ( $widget ) {\n\t\t\tif ( 'widget-' . $widget != $_POST['contact-form-id'] ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\tif ( $post->ID != $_POST['contact-form-id'] ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t$field_ids = $this->get_field_ids();\n\n\t\t// Initialize all these \"standard\" fields to null\n\t\t$comment_author_email = $comment_author_email_label = // v\n\t\t$comment_author = $comment_author_label = // v\n\t\t$comment_author_url = $comment_author_url_label = // v\n\t\t$comment_content = $comment_content_label = null;\n\n\t\t// For each of the \"standard\" fields, grab their field label and value.\n\n\t\tif ( isset( $field_ids['name'] ) ) {\n\t\t\t$field = $this->fields[$field_ids['name']];\n\t\t\t$comment_author = Grunion_Contact_Form_Plugin::strip_tags( stripslashes( apply_filters( 'pre_comment_author_name', addslashes( $field->value ) ) ) );\n\t\t\t$comment_author_label = Grunion_Contact_Form_Plugin::strip_tags( $field->get_attribute( 'label' ) );\n\t\t}\n\n\t\tif ( isset( $field_ids['email'] ) ) {\n\t\t\t$field = $this->fields[$field_ids['email']];\n\t\t\t$comment_author_email = Grunion_Contact_Form_Plugin::strip_tags( stripslashes( apply_filters( 'pre_comment_author_email', addslashes( $field->value ) ) ) );\n\t\t\t$comment_author_email_label = Grunion_Contact_Form_Plugin::strip_tags( $field->get_attribute( 'label' ) );\n\t\t}\n\n\t\tif ( isset( $field_ids['url'] ) ) {\n\t\t\t$field = $this->fields[$field_ids['url']];\n\t\t\t$comment_author_url = Grunion_Contact_Form_Plugin::strip_tags( stripslashes( apply_filters( 'pre_comment_author_url', addslashes( $field->value ) ) ) );\n\t\t\tif ( 'http://' == $comment_author_url ) {\n\t\t\t\t$comment_author_url = '';\n\t\t\t}\n\t\t\t$comment_author_url_label = Grunion_Contact_Form_Plugin::strip_tags( $field->get_attribute( 'label' ) );\n\t\t}\n\n\t\tif ( isset( $field_ids['textarea'] ) ) {\n\t\t\t$field = $this->fields[$field_ids['textarea']];\n\t\t\t$comment_content = trim( Grunion_Contact_Form_Plugin::strip_tags( $field->value ) );\n\t\t\t$comment_content_label = Grunion_Contact_Form_Plugin::strip_tags( $field->get_attribute( 'label' ) );\n\t\t}\n\n\t\tif ( isset( $field_ids['subject'] ) ) {\n\t\t\t$field = $this->fields[$field_ids['subject']];\n\t\t\tif ( $field->value ) {\n\t\t\t\t$contact_form_subject = Grunion_Contact_Form_Plugin::strip_tags( $field->value );\n\t\t\t}\n\t\t}\n\n\t\t$all_values = $extra_values = array();\n\t\t$i = 1; // Prefix counter for stored metadata\n\n\t\t// For all fields, grab label and value\n\t\tforeach ( $field_ids['all'] as $field_id ) {\n\t\t\t$field = $this->fields[$field_id];\n\t\t\t$label = $i . '_' . $field->get_attribute( 'label' );\n\t\t\t$value = $field->value;\n\n\t\t\t$all_values[$label] = $value;\n\t\t\t$i++; // Increment prefix counter for the next field\n\t\t}\n\n\t\t// For the \"non-standard\" fields, grab label and value\n\t\t// Extra fields have their prefix starting from count( $all_values ) + 1\n\t\tforeach ( $field_ids['extra'] as $field_id ) {\n\t\t\t$field = $this->fields[$field_id];\n\t\t\t$label = $i . '_' . $field->get_attribute( 'label' );\n\t\t\t$value = $field->value;\n\n\t\t\t$extra_values[$label] = $value;\n\t\t\t$i++; // Increment prefix counter for the next extra field\n\t\t}\n\n\t\t$contact_form_subject = trim( $contact_form_subject );\n\n\t\t$comment_author_IP = Grunion_Contact_Form_Plugin::get_ip_address();\n\n\t\t$vars = array( 'comment_author', 'comment_author_email', 'comment_author_url', 'contact_form_subject', 'comment_author_IP' );\n\t\tforeach ( $vars as $var )\n\t\t\t$$var = str_replace( array( \"\\n\", \"\\r\" ), '', $$var );\n\t\t$vars[] = 'comment_content';\n\n\t\t$spam = '';\n\t\t$akismet_values = $plugin->prepare_for_akismet( compact( $vars ) );\n\n\t\t// Is it spam?\n\t\t$is_spam = apply_filters( 'contact_form_is_spam', $akismet_values );\n\t\tif ( is_wp_error( $is_spam ) ) // WP_Error to abort\n\t\t\treturn $is_spam; // abort\n\t\telseif ( $is_spam === TRUE ) // TRUE to flag a spam\n\t\t\t$spam = '***SPAM*** ';\n\n\t\tif ( !$comment_author )\n\t\t\t$comment_author = $comment_author_email;\n\n\t\t$to = (array) apply_filters( 'contact_form_to', $to );\n\t\tforeach ( $to as $to_key => $to_value ) {\n\t\t\t$to[$to_key] = Grunion_Contact_Form_Plugin::strip_tags( $to_value );\n\t\t}\n\n\t\t$blog_url = parse_url( site_url() );\n\t\t$from_email_addr = 'wordpress@' . $blog_url['host'];\n\n\t\t$reply_to_addr = $to[0];\n\t\tif ( ! empty( $comment_author_email ) ) {\n\t\t\t$reply_to_addr = $comment_author_email;\n\t\t}\n\n\t\t$headers = 'From: \"' . $comment_author .'\" <' . $from_email_addr . \">\\r\\n\" .\n\t\t\t\t\t'Reply-To: \"' . $comment_author . '\" <' . $reply_to_addr . \">\\r\\n\" .\n\t\t\t\t\t\"Content-Type: text/plain; charset=\\\"\" . get_option('blog_charset') . \"\\\"\";\n\n\t\t$subject = apply_filters( 'contact_form_subject', $contact_form_subject, $all_values );\n\t\t$url = $widget ? home_url( '/' ) : get_permalink( $post->ID );\n\n\t\t$date_time_format = _x( '%1$s \\a\\t %2$s', '{$date_format} \\a\\t {$time_format}', 'jetpack' );\n\t\t$date_time_format = sprintf( $date_time_format, get_option( 'date_format' ), get_option( 'time_format' ) );\n\t\t$time = date_i18n( $date_time_format, current_time( 'timestamp' ) );\n\n\t\t$message = \"$comment_author_label: $comment_author\\n\";\n\t\tif ( !empty( $comment_author_email ) ) {\n\t\t\t$message .= \"$comment_author_email_label: $comment_author_email\\n\";\n\t\t}\n\t\tif ( !empty( $comment_author_url ) ) {\n\t\t\t$message .= \"$comment_author_url_label: $comment_author_url\\n\";\n\t\t}\n\t\tif ( !empty( $comment_content_label ) ) {\n\t\t\t$message .= \"$comment_content_label: $comment_content\\n\";\n\t\t}\n\t\tif ( !empty( $extra_values ) ) {\n\t\t\tforeach ( $extra_values as $label => $value ) {\n\t\t\t\t$message .= preg_replace( '#^\\d+_#i', '', $label ) . ': ' . trim( $value ) . \"\\n\";\n\t\t\t}\n\t\t}\n\t\t$message .= \"\\n\";\n\t\t$message .= __( 'Time:', 'jetpack' ) . ' ' . $time . \"\\n\";\n\t\t$message .= __( 'IP Address:', 'jetpack' ) . ' ' . $comment_author_IP . \"\\n\";\n\t\t$message .= __( 'Contact Form URL:', 'jetpack' ) . \" $url\\n\";\n\n\t\tif ( is_user_logged_in() ) {\n\t\t\t$message .= \"\\n\";\n\t\t\t$message .= sprintf(\n\t\t\t\t__( 'Sent by a verified %s user.', 'jetpack' ),\n\t\t\t\tisset( $GLOBALS['current_site']->site_name ) && $GLOBALS['current_site']->site_name ? $GLOBALS['current_site']->site_name : '\"' . get_option( 'blogname' ) . '\"'\n\t\t\t);\n\t\t} else {\n\t\t\t$message .= __( 'Sent by an unverified visitor to your site.', 'jetpack' );\n\t\t}\n\n\t\t$message = apply_filters( 'contact_form_message', $message );\n\t\t$message = Grunion_Contact_Form_Plugin::strip_tags( $message );\n\n\t\t// keep a copy of the feedback as a custom post type\n\t\t$feedback_time = current_time( 'mysql' );\n\t\t$feedback_title = \"{$comment_author} - {$feedback_time}\";\n\t\t$feedback_status = $is_spam === TRUE ? 'spam' : 'publish';\n\n\t\tforeach ( (array) $akismet_values as $av_key => $av_value ) {\n\t\t\t$akismet_values[$av_key] = Grunion_Contact_Form_Plugin::strip_tags( $av_value );\n\t\t}\n\n\t\tforeach ( (array) $all_values as $all_key => $all_value ) {\n\t\t\t$all_values[$all_key] = Grunion_Contact_Form_Plugin::strip_tags( $all_value );\n\t\t}\n\n\t\tforeach ( (array) $extra_values as $ev_key => $ev_value ) {\n\t\t\t$extra_values[$ev_key] = Grunion_Contact_Form_Plugin::strip_tags( $ev_value );\n\t\t}\n\n\t\t/* We need to make sure that the post author is always zero for contact\n\t\t * form submissions. This prevents export/import from trying to create\n\t\t * new users based on form submissions from people who were logged in\n\t\t * at the time.\n\t\t *\n\t\t * Unfortunately wp_insert_post() tries very hard to make sure the post\n\t\t * author gets the currently logged in user id. That is how we ended up\n\t\t * with this work around. */\n\t\tadd_filter( 'wp_insert_post_data', array( $plugin, 'insert_feedback_filter' ), 10, 2 );\n\n\t\t$post_id = wp_insert_post( array(\n\t\t\t'post_date' => addslashes( $feedback_time ),\n\t\t\t'post_type' => 'feedback',\n\t\t\t'post_status' => addslashes( $feedback_status ),\n\t\t\t'post_parent' => (int) $post->ID,\n\t\t\t'post_title' => addslashes( wp_kses( $feedback_title, array() ) ),\n\t\t\t'post_content' => addslashes( wp_kses( $comment_content . \"\\n<!--more-->\\n\" . \"AUTHOR: {$comment_author}\\nAUTHOR EMAIL: {$comment_author_email}\\nAUTHOR URL: {$comment_author_url}\\nSUBJECT: {$subject}\\nIP: {$comment_author_IP}\\n\" . print_r( $all_values, TRUE ), array() ) ), // so that search will pick up this data\n\t\t\t'post_name' => md5( $feedback_title ),\n\t\t) );\n\n\t\t// once insert has finished we don't need this filter any more\n\t\tremove_filter( 'wp_insert_post_data', array( $plugin, 'insert_feedback_filter' ), 10, 2 );\n\n\t\tupdate_post_meta( $post_id, '_feedback_extra_fields', $this->addslashes_deep( $extra_values ) );\n\t\tupdate_post_meta( $post_id, '_feedback_akismet_values', $this->addslashes_deep( $akismet_values ) );\n\t\tupdate_post_meta( $post_id, '_feedback_email', $this->addslashes_deep( compact( 'to', 'message' ) ) );\n\n\t\t/**\n\t\t * Fires right before the contact form message is sent via email to\n\t\t * the recipient specified in the contact form.\n\t\t *\n\t\t * @since ?\n\t\t * @module Contact_Forms\n\t\t * @param integer $post_id Post contact form lives on\n\t\t * @param array $all_values Contact form fields\n\t\t * @param array $extra_values Contact form fields not included in $all_values\n\t\t **/\n\t\tdo_action( 'grunion_pre_message_sent', $post_id, $all_values, $extra_values );\n\n\t\t// schedule deletes of old spam feedbacks\n\t\tif ( !wp_next_scheduled( 'grunion_scheduled_delete' ) ) {\n\t\t\twp_schedule_event( time() + 250, 'daily', 'grunion_scheduled_delete' );\n\t\t}\n\n\t\tif ( $is_spam !== TRUE && true === apply_filters( 'grunion_should_send_email', true, $post_id ) ) {\n\t\t\twp_mail( $to, \"{$spam}{$subject}\", $message, $headers );\n\t\t} elseif ( true === $is_spam && apply_filters( 'grunion_still_email_spam', FALSE ) == TRUE ) { // don't send spam by default. Filterable.\n\t\t\twp_mail( $to, \"{$spam}{$subject}\", $message, $headers );\n\t\t}\n\n\t\tif ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {\n\t\t\treturn self::success_message( $post_id, $this );\n\t\t}\n\n\t\t$redirect = wp_get_referer();\n\t\tif ( !$redirect ) { // wp_get_referer() returns false if the referer is the same as the current page\n\t\t\t$redirect = $_SERVER['REQUEST_URI'];\n\t\t}\n\n\t\t$redirect = add_query_arg( urlencode_deep( array(\n\t\t\t'contact-form-id' => $id,\n\t\t\t'contact-form-sent' => $post_id,\n\t\t\t'_wpnonce' => wp_create_nonce( \"contact-form-sent-{$post_id}\" ), // wp_nonce_url HTMLencodes :(\n\t\t) ), $redirect );\n\n\t\t$redirect = apply_filters( 'grunion_contact_form_redirect_url', $redirect, $id, $post_id );\n\n\t\twp_safe_redirect( $redirect );\n\t\texit;\n\t}", "public function run()\n {\n if ($this->allowOverride) {\n $to = $this->arg('to');\n $cc = $this->arg('cc');\n $bcc = $this->arg('bcc');\n $subject = $this->arg('subject');\n\n /* if class vars is defined, dont override it */\n if ($to) {\n $this->email->to($to);\n }\n\n if ($cc) {\n $this->email->cc($cc);\n }\n\n if ($bcc) {\n $this->email->bcc($bcc);\n }\n\n if ($subject) {\n $this->email->subject($subject);\n }\n\n $content = $this->arg('content');\n if (! $content) {\n $content = $this->getContent();\n }\n\n if ($this->contentType == \"html\") {\n $this->email->html($content);\n } else {\n $this->email->text($content);\n }\n } else {\n $this->extractFieldsFromThis();\n }\n\n return $this->send();\n }", "protected function notifyByEmail() {\n\t\t$userlist = array();\n\n\t\t// find all the users with this server listed\n\t\t$users = $this->db->select(\n\t\t\tSM_DB_PREFIX . 'users',\n\t\t\t'FIND_IN_SET(\\''.$this->server['server_id'].'\\', `server_id`) AND `email` != \\'\\'',\n\t\t\tarray('user_id', 'name', 'email')\n\t\t);\n\n\t\tif (empty($users)) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// build mail object with some default values\n\t\t$mail = new phpmailer();\n\n\t\t$mail->From\t\t= sm_get_conf('email_from_email');\n\t\t$mail->FromName\t= sm_get_conf('email_from_name');\n\t\t$mail->Subject\t= sm_parse_msg($this->status_new, 'email_subject', $this->server);\n\t\t$mail->Priority\t= 1;\n\n\t\t$body = sm_parse_msg($this->status_new, 'email_body', $this->server);\n\t\t$mail->Body\t\t= $body;\n\t\t$mail->AltBody\t= str_replace('<br/>', \"\\n\", $body);\n\n\t\t// go through empl\n\t foreach ($users as $user) {\n\t \t// we sent a seperate email to every single user.\n\t \t$userlist[] = $user['user_id'];\n\t \t$mail->AddAddress($user['email'], $user['name']);\n\t \t$mail->Send();\n\t \t$mail->ClearAddresses();\n\t }\n\n\t if(sm_get_conf('log_email')) {\n\t \t// save to log\n\t \tsm_add_log($this->server['server_id'], 'email', $body, implode(',', $userlist));\n\t }\n\t}", "function sendInformation($name,$company_name,$city,$email,$phone_no,$comments,$company_email)\n\t\t{\n\t\t\t//email will be sent to both the ad owners and admin\n\t\t\t//emaill of admin\n\t\t\t$email_admin = $this->manage_content->getValue('admin_profile','email_add');\n\t\t\t//get email from array $email_admin[0]['email_add']\n\t\t\t$sendMail_admin = $this->mail_function->contactToAdmin($name,$company_name,$city,$email,$phone_no,$comments,$email_admin[0]['email_add']);\n\t\t\t//send email to ad owner from company.php\n\t\t\t$sendMail_adOwner = $this->mail_function->contactToAdmin($name,$company_name,$city,$email,$phone_no,$comments,$company_email);\n\t\t}", "private function testEmail(){\n $this->user_panel->checkSecurity();\n $this->mail_handler->testEmailFunction();\n }", "function progressive_webform_email($variables) {\r\n _form_set_class($variables['element'], array('form-control'));\r\n return theme_webform_email($variables);\r\n}", "function sendUpdateEmail($email, $registrant)\n{\n $name = $_SESSION['ctst_name'];\n $subject = $name . \" registration information updated.\";\n $mailContent = $registrant['givenName'] . ' ' . $registrant['familyName'];\n $mailContent .= \":\\n\\n\";\n $mailContent .= \"Your information for the \" . $name . \" has been updated.\\n\";\n $mailContent .= \"\\nIf you did not edit your registration information, \" .\n \"please write to the administrator:\\n\";\n $mailContent .= \"mailto:\" . ADMIN_EMAIL . \"?subject=account%20compromised\\n\";\n $mailContent .= \"\\nright away, or simply reply to this note.\\n\";\n $mailContent .= automatedMessage($name);\n $headers = \"From: \" . ADMIN_EMAIL . \"\\r\\n\";\n do_email($email, $subject, $mailContent, $headers);\n}", "function Users_user_updateemail()\n{\n if (!pnUserLoggedIn()) {\n return LogUtil::registerPermissionError();\n }\n\n if (!SecurityUtil::confirmAuthKey('Users')) {\n return LogUtil::registerAuthidError(pnModUrl('Users', 'user', 'changeemail'));\n }\n\n $uservars = pnModGetVar('Users');\n if ($uservars['changeemail'] <> 1) {\n return pnRedirect('Users', 'user', 'main');\n }\n\n $newemail = FormUtil::getPassedValue('newemail', '', 'POST');\n\n $checkuser = pnModAPIFunc('Users', 'user', 'checkuser',\n array('uname' => pnUserGetVar('uname'),\n 'email' => $newemail,\n 'agreetoterms' => true));\n\n // check email related errors only\n if (in_array($checkuser, array(-1, 2, 9, 11, 12))) {\n switch($checkuser)\n {\n case -1:\n $message = __('Sorry! You have not been granted access to this module.');\n break;\n case 2:\n $message = __('Sorry! The e-mail address you entered was incorrectly formatted or is unacceptable for other reasons. Please correct your entry and try again.');\n break;\n case 9:\n $message = __('Sorry! This e-mail address has already been registered, and it cannot be used again for creating another account.');\n break;\n case 11:\n $message = __('Sorry! Your user agent is not accepted for registering an account on this site.');\n break;\n case 12:\n $message = __('Sorry! E-mail addresses from the domain you entered are not accepted for registering an account on this site.');\n break;\n default:\n $message = __('Sorry! You have not been granted access to this module.');\n } // switch\n return LogUtil::registerError($message, null, pnModURL('Users', 'user', 'changeemail'));\n }\n\n // set the new email\n pnUserSetVar('email', $newemail);\n\n LogUtil::registerStatus(__('Done! Saved your e-mail address.'));\n return pnRedirect(pnModURL('Users', 'user', 'main'));\n}", "function mme_display_form() {\n\tif( isset($_POST['send']) ) {\n\t\t$emailstring = $_POST['emails'];\n\t\t$emails = explode( ',', $emailstring );\n\t\t//print_r($emails);\n\t\tforeach($emails as $email){\n\t\t\t$iserror = mme_checkemail( $email );\n\t\t}\n\t\t\tif($iserror) {\n\t\t\tmme_addemail( $emailstring );\n\t\t\tmme_success_notice();\n\t\t}\n\t}\n\t?>\n\t<form method=\"POST\" name=\"mailform\" action=\"#\">\n\t\t<style>\n\t\t\tdiv{\n\t\t\t\tmargin-left:15px;\n\t\t\t\tmargin-top: 10px;\n\t\t\t}\n\t\t\t\n\t\t\tdiv#metavalue{\n \t\t\twidth : 50%;\n \n\t\t\t}\n\t\t</style>\n\t\t<div>Enter the Email address</div>\n\t\t<div><input type = \"text\" id =\"metavalue\" name=\"emails\" /></div>\n\t\t<div class = \"buttons\">\n\t\t\t<input type=\"submit\" value=\"Save\" name=\"send\" class=\"button button-primary button-large\"/>\n\t\t\t<input type=\"reset\" value=\"Cancel\" name=\"cancel\"/>\n\t\t</div>\n\n\t</form>\n\t<?php\n}", "private function setEmail()\n {\n\t if ( empty( $_POST['email'] ) ) {\n\t\t\t$this->data['error']['email'] = 'Please provide a valid email address.';\n $this->error = true;\n return;\n }\n \n $e = trim( $_POST['email'] );\n \n\t\tif ( ! filter_var( $e, FILTER_VALIDATE_EMAIL ) ) {\n\t\t\t$this->data['error']['email'] = 'Please provide a valid email address.';\n $this->error = true;\n return;\n\t\t}\n \n\t\t$this->data['email'] = $e;\n }", "private function email(){\n\t\t\tif($this->get_request_method() != \"POST\"){\n\t\t\t\t$this->response('',406);\n\t\t\t}\n\t\t\t$email = $this->_request['email'];\n\t\t\t$sql = mysql_query(\"SELECT email FROM accounts WHERE email = '\".$email.\"'\", $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// If success everythig is good send header as \"OK\" and return list of users in JSON format\n\t\t\t\techo json_encode(array('valid' =>FALSE));\n\t\t\t} else {\n\t\t\t\techo json_encode(array('valid' =>TRUE));\n\t\t\t}\n\t\t\t//$this->response('',204);\t// If no records \"No Content\" status\n\t\t}", "function clsRecordemails()\r\n\r\n {\r\n\r\n\r\n\r\n global $FileName;\r\n\r\n $this->Visible = true;\r\n\r\n $this->Errors = new clsErrors();\r\n\r\n $this->ds = new clsemailsDataSource();\r\n\r\n $this->InsertAllowed = false;\r\n\r\n $this->UpdateAllowed = false;\r\n\r\n if($this->Visible)\r\n\r\n {\r\n\r\n $this->ComponentName = \"emails\";\r\n\r\n $this->HTMLFormAction = $FileName . \"?\" . CCAddParam(CCGetQueryString(\"QueryString\", \"\"), \"ccsForm\", $this->ComponentName);\r\n\r\n $CCSForm = CCGetFromGet(\"ccsForm\", \"\");\r\n\r\n $this->FormSubmitted = ($CCSForm == $this->ComponentName);\r\n\r\n $Method = $this->FormSubmitted ? ccsPost : ccsGet;\r\n\r\n $this->from_user_id = new clsControl(ccsLabel, \"from_user_id\", \"From User Id\", ccsText, \"\", CCGetRequestParam(\"from_user_id\", $Method));\r\n\r\n $this->emaildate = new clsControl(ccsLabel, \"emaildate\", \"date\", ccsText, \"\", CCGetRequestParam(\"emaildate\", $Method));\r\n\r\n $this->subject = new clsControl(ccsLabel, \"subject\", \"Subject\", ccsText, \"\", CCGetRequestParam(\"subject\", $Method));\r\n\r\n $this->message = new clsControl(ccsLabel, \"message\", \"Message\", ccsMemo, \"\", CCGetRequestParam(\"message\", $Method));\r\n\r\n $this->message->HTML = true;\r\n\r\n $this->Delete = new clsButton(\"Delete\");\r\n\r\n $this->cancel = new clsButton(\"cancel\");\r\n\r\n }\r\n\r\n }", "public function sendMail($nodes) {\n\n\t\t$sender = $this->request->getInternalArgument('__sender');\n\t\t$receiver = $this->request->getInternalArgument('__receiver');\n\t\t$copytouser = $this->request->getInternalArgument('__copytouser');\n\n\t\t$emailBody = \"neue Nachricht\\n\\n\";\n\n\t\tfor($i = 0; $i < count ($nodes); $i++){\n\t\t\t$emailBody .= $nodes[$i][0] . ': '. $nodes[$i][1] . \"\\n\";\n\t\t}\n\t\t$template = new \\TYPO3\\Fluid\\View\\StandaloneView();\n\t\t$template->setTemplatePathAndFilename('resource://CRON.FormBuilder/Private/Templates/EMails/Form.html');\n\t\t$template->assign('email', $emailBody);\n\n\t\t// create instance of \\TYPO3\\SwiftMailer\\Message() and set mail details\n\t\t$mail = new \\TYPO3\\SwiftMailer\\Message();\n\t\t$mail->setFrom($sender, 'Absender')\n\t\t ->setTo($receiver, 'Empfänger')\n\t\t ->setSubject('Your Subject')\n\t\t\t ->addPart($emailBody,'text/plain','utf-8');\n\n\t\tif($copytouser == 1){\n\t\t\t//todo\n\t\t\t//$mail->addBcc()\n\t\t}\n\n\t\t$mail->send();\n\t}", "public function email()\n\t{\n\t\t$this->add('email', 'required', true, 'Email is required.');\n\t\t$this->add('email', 'regexp', '#^[^\\W][a-zA-Z0-9_]+(\\.[a-zA-Z0-9_]+)*\\@[a-zA-Z0-9_]+(\\.[a-zA-Z0-9_]+)*\\.[a-zA-Z]{2,4}$#', 'Bad Email format.');\n\t\t$this->add('email', 'max', 30, 'Bad Email length, no more than 30 characters.');\n\n\t\t$this->setInformation('email', 'Email format, no more than 30 characters...');\n\t}", "public function emails($boletoID, $post);", "public function ga_email_callback()\n {\n printf(\n '<input type=\"email\" id=\"ga_email\" name=\"bpp_setting_options[ga_email]\" value=\"%s\" />',\n isset( $this->options['ga_email'] ) ? esc_attr( $this->options['ga_email']) : ''\n );\n }", "private function verificarEmail(){\n\t \n\t \t\t//Verifica se a requisição é via AJAX\n\t \t\tif(HelperFactory::getInstance()->isAjax()){\n\t \t\t\n\t \t\t\t //Solicita a verificação do E-mail\n\t\t\t\t $this->Delegator('ConcreteCadastro', 'verificarEmail',$this->getPost());\t \t\t\t \n\t \t\t}\t \n\t }", "public function send()\n {\n if (!isset($this->properties['mail_recipients'])) {\n $this->properties['mail_recipients'] = false;\n }\n\n // CHECK IF THERE IS AT LEAST ONE MAIL ADDRESS\n if (!isset($this->properties['mail_bcc'])) {\n $this->properties['mail_bcc'] = false;\n }\n\n // EXIT IF NO EMAIL ADDRESSES ARE SET\n if (!$this->checkEmailSettings()) {\n return;\n }\n\n // CUSTOM TEMPLATE\n $template = $this->getTemplate();\n\n // SET DEFAULT EMAIL DATA ARRAY\n $this->data = [\n 'id' => $this->record->id,\n 'data' => $this->post,\n 'ip' => $this->record->ip,\n 'date' => $this->record->created_at\n ];\n\n // CHECK FOR CUSTOM SUBJECT\n if (!empty($this->properties['mail_subject'])) {\n $this->prepareCustomSubject();\n }\n\n // SEND NOTIFICATION EMAIL\n Mail::sendTo($this->properties['mail_recipients'], $template, $this->data, function ($message) {\n // SEND BLIND CARBON COPY\n if (!empty($this->properties['mail_bcc']) && is_array($this->properties['mail_bcc'])) {\n $message->bcc($this->properties['mail_bcc']);\n }\n\n // USE CUSTOM SUBJECT\n if (!empty($this->properties['mail_subject'])) {\n $message->subject($this->properties['mail_subject']);\n }\n\n // ADD REPLY TO ADDRESS\n if (!empty($this->properties['mail_replyto'])) {\n $message->replyTo($this->properties['mail_replyto']);\n }\n\n // ADD UPLOADS\n if (!empty($this->properties['mail_uploads']) && !empty($this->files)) {\n foreach ($this->files as $file) {\n $message->attach($file->getLocalPath(), ['as' => $file->getFilename()]);\n }\n }\n });\n }", "function send_anon() {\n\n $input = $_POST['feedback'];\n $about = $_POST['about'];\n $relation = $_POST['relation'];\n\n\n\t\t$options = get_option('id_settings');\n $receiver = $options['id_anonymous_email_addresses_field'];\n\n\t\t$subject = 'Anonymous input form website';\n\n $body = \"<i>Sent using the contact form at \" . get_site_url() . \"</i>\" .\n \"<br><br>\" . esc_html($input) .\n \"<br><br>About: \" . esc_html($about) .\n \"<br><br>Relation: \" . esc_html($relation);\n\n\t\t$sender = \"Anonymous <[email protected]>\";\n\n\n\n return send_mail($receiver, $subject, $body, $sender);\n\n }", "private function send(){\n\t\t\n\t\tif(empty($this->email)){\n\t\t\t// Missing Email\n\t\t\t$this->error = true;\n\t\t\t$this->errorMsg = 'Whoops, looks like a bug on our end. We\\'ve logged the issue and our support team will look into it.';\n\t\t\t\n\t\t\t// Log Error\n\t\t\t$errorLog = new LogError();\n\t\t\t$errorLog->errorNumber = 87;\n\t\t\t$errorLog->errorMsg = 'Missing email';\n\t\t\t$errorLog->badData = '';\n\t\t\t$errorLog->filename = 'API / SendEmail.class.php';\n\t\t\t$errorLog->write();\n\t\t}\n\t\t\n\t\tif(empty($this->subject)){\n\t\t\t// Missing Email\n\t\t\t$this->error = true;\n\t\t\t$this->errorMsg = 'Whoops, looks like a bug on our end. We\\'ve logged the issue and our support team will look into it.';\n\t\t\t\n\t\t\t// Log Error\n\t\t\t$errorLog = new LogError();\n\t\t\t$errorLog->errorNumber = 88;\n\t\t\t$errorLog->errorMsg = 'Missing subject';\n\t\t\t$errorLog->badData = '';\n\t\t\t$errorLog->filename = 'API / SendEmail.class.php';\n\t\t\t$errorLog->write();\n\t\t}\n\t\t\n\t\tif(empty($this->plainText)){\n\t\t\t// Missing Email\n\t\t\t$this->error = true;\n\t\t\t$this->errorMsg = 'Whoops, looks like a bug on our end. We\\'ve logged the issue and our support team will look into it.';\n\t\t\t\n\t\t\t// Log Error\n\t\t\t$errorLog = new LogError();\n\t\t\t$errorLog->errorNumber = 89;\n\t\t\t$errorLog->errorMsg = 'Missing plain text of email';\n\t\t\t$errorLog->badData = '';\n\t\t\t$errorLog->filename = 'API / SendEmail.class.php';\n\t\t\t$errorLog->write();\n\t\t}\n\t\t\n\t\tif(empty($this->htmlBody)){\n\t\t\t// Missing Email\n\t\t\t$this->error = true;\n\t\t\t$this->errorMsg = 'Whoops, looks like a bug on our end. We\\'ve logged the issue and our support team will look into it.';\n\t\t\t\n\t\t\t// Log Error\n\t\t\t$errorLog = new LogError();\n\t\t\t$errorLog->errorNumber =90;\n\t\t\t$errorLog->errorMsg = 'Missing HTML of body';\n\t\t\t$errorLog->badData = '';\n\t\t\t$errorLog->filename = 'API / SendEmail.class.php';\n\t\t\t$errorLog->write();\n\t\t}\n\t\t\n\t\t// Validate Email\n\t\t$this->validateEmail($this->email);\n\t\t\n\t\tif(!$this->error){\n\t\t\t// Required Files\n\t\t\tinclude 'Mail.php';\n\t\t\tinclude 'Mail/mime.php';\n\n\t\t\t/* ---\n\t\t\tPEAR Mail Factory\n\t\t\thttp://pear.php.net/manual/en/package.mail.mail.factory.php\n\t\t\t--- */\n\t\t\t$host = \"smtp-relay.gmail.com\";\n\t\t\t$port = 587;\n\t\t\t$smtp = Mail::factory('smtp', array('host'=>$host, 'port'=>$port));\n\n\t\t\t/* ---\n\t\t\tPEAR MIME\n\t\t\thttp://pear.php.net/manual/en/package.mail.mail-mime.mail-mime.php\n\t\t\t--- */\n\t\t\t$crlf = \"\\n\";\n\t\t\t$mime = new Mail_mime(array('eol' => $crlf));\n\n\t\t\t// Headers\n\t\t\t$from = 'Catalog.beer <[email protected]>';\n\t\t\t$replyto = '[email protected]';\n\t\t\t$headers = array('From'=>$from, 'To'=>$this->email, 'Subject'=>$this->subject, 'Reply-To'=>$replyto);\n\n\t\t\t// Plain Text\n\t\t\t$mime->setTXTBody($this->plainText);\n\n\t\t\t// HTML\n\t\t\t$mime->setHTMLBody($this->htmlBody);\n\n\t\t\t$body = $mime->get();\n\t\t\t$headers = $mime->headers($headers);\n\n\t\t\t$smtp = Mail::factory('smtp',\n\t\t\t\tarray ('host' => 'smtp-relay.gmail.com',\n\t\t\t\t\t\t\t 'port' => 587,\n\t\t\t\t\t\t\t 'auth' => true,\n\t\t\t\t\t\t\t 'username' => '',\n\t\t\t\t\t\t\t 'password' => '',\n\t\t\t\t\t\t\t 'debug' => false));\n\n\t\t\t/* ---\n\t\t\tPEAR Send Mail\n\t\t\thttp://pear.php.net/manual/en/package.mail.mail.send.php\n\t\t\t--- */\n\t\t\t$mail = $smtp->send($this->email, $headers, $body);\n\n\t\t\t// Process Errors\n\t\t\tif(PEAR::isError($mail)){\n\t\t\t\t// Error Sending Email\n\t\t\t\t$this->error = true;\n\t\t\t\t$this->errorMsg = 'Whoops, looks like a bug on our end. We\\'ve logged the issue and our support team will look into it.';\n\n\t\t\t\t// Log Error\n\t\t\t\t$errorLog = new LogError();\n\t\t\t\t$errorLog->errorNumber = 91;\n\t\t\t\t$errorLog->errorMsg = 'Error sending email';\n\t\t\t\t$errorLog->badData = $mail->getMessage();\n\t\t\t\t$errorLog->filename = 'API / SendEmail.class.php';\n\t\t\t\t$errorLog->write();\n\t\t\t}\n\t\t}\n\t}", "function vals_soc_invite_form($form, &$form_state, $org = '', $target = '', $show_action = 'administer', $type, $subtype = '') {\n include_once(_VALS_SOC_ROOT . '/includes/module/vals_soc.mail_messages.inc');\n $message = get_invite_email_body($org, $subtype, ($subtype == _STUDENT_TYPE) ? t('your institute') : '');\n\n $form = array(\n '#prefix' => \"<div id='vals_soc_entity_form_wrapper_$target'>\",\n '#suffix' => '</div>',\n );\n $form['email_contact_header'] = array(\n '#markup' => '<h2>' . tt('Invite new %1$s', $subtype) . '</h2><br/>'\n );\n $form['subject'] = array(\n '#type' => 'hidden',\n \"#default_value\" => t('Invitation to join the VALS Semester of code'),\n );\n $form['contact_email'] = array(\n \"#type\" => \"textfield\",\n '#title' => t('Email of the person to invite'),\n '#description' => t('This can be a comma-separated list of addresses'),\n \"#size\" => 100,\n '#required' => '1',\n \"#default_value\" => '',\n );\n $form['description'] = array(\n \"#type\" => \"textarea\",\n '#title' => t('Message'),\n //\"#size\" => 1024,\n \"#default_value\" => $message,\n );\n $form['submit'] = array(\n '#type' => 'submit',\n '#attributes' => array('onclick' => entityCall($type, $org, $target, $show_action, 'administration', 'send_invite_email')),\n '#value' => t('Send'),\n '#post_render' => array('vals_soc_fix_submit_button'),\n );\n $form['cancel'] = array(\n '#type' => 'button',\n '#value' => t('Cancel'),\n '#prefix' => '&nbsp; &nbsp; &nbsp;',\n '#attributes' => array('onClick' => 'location.reload(); return true;'),\n '#post_render' => array('vals_soc_fix_submit_button'),\n );\n $form['#vals_soc_attached']['js'] = array(\n array(\n 'type' => 'file',\n 'data' => '/includes/js/test_functions.js',\n ),\n );\n return $form;\n}", "public function send_email() {\n $toemail = $this->params['toemail'];\n $subject = $this->params['subject'];\n $content = $this->params['content'];\n }", "function m_dspemails()\n\t{\n\t\t$this->ObTpl=new template();\n\t\t$this->ObTpl->set_file(\"TPL_EMAIL_FILE\",$this->emailTemplate);\n\n\t\t#SETTING ALL TEMPLATE BLOCKS\n\t\t$this->ObTpl->set_block(\"TPL_EMAIL_FILE\",\"TPL_EMAIL_BLK\", \"email_blk\");\n\t\t$this->ObTpl->set_block(\"TPL_EMAIL_FILE\",\"TPL_MESSAGE_BLK\", \"message_blk\");\n\t\t$this->ObTpl->set_block(\"TPL_EMAIL_FILE\",\"TPL_MSG_BLK1\", \"msg_blk1\");\n\n\t\t#SETTING TEMPLATE VARIABLE\n\t\t$this->ObTpl->set_var(\"GRAPHICSMAINPATH\",GRAPHICS_PATH);\t\n\t\t$this->ObTpl->set_var(\"TPL_VAR_SALESURL\",SITE_URL.\"sales/\");\n\n\t\t#INTAILIZING ***\n\t\t$this->ObTpl->set_var(\"email_blk\",\"\");\t\n\t\t$this->ObTpl->set_var(\"message_blk\",\"\");\t\n\t\t$this->ObTpl->set_var(\"msg_blk1\",\"\");\t\n\t\t$this->ObTpl->set_var(\"msg_blk2\",\"\");\t\n\n\t\t$this->request['msg']=$this->libFunc->ifSet($this->request,\"msg\");\n\t\t$this->ObTpl->set_var(\"TPL_VAR_MESSAGE\",\"\");\n\n\t\t#DATABASE QUERY\n\t\t$this->obDb->query = \"SELECT * FROM \".EMAILS;\n\t\t$queryResult = $this->obDb->fetchQuery();\n\t\t$campaigncount = $this->obDb->record_count;\n\t\tif($this->request['msg']==1)\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",MSG_EMAIL_INSERTED);\n\t\t\t$this->ObTpl->parse(\"msg_blk1\",\"TPL_MSG_BLK1\");\n\t\t\t$this->ObTpl->parse(\"msg_blk2\",\"TPL_MSG_BLK2\");\n\t\t}\n\t\telseif($this->request['msg']==3)\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",MSG_EMAIL_DELETED);\n\t\t\t$this->ObTpl->parse(\"msg_blk1\",\"TPL_MSG_BLK1\");\n\t\t\t$this->ObTpl->parse(\"msg_blk2\",\"TPL_MSG_BLK2\");\n\t\t}\n\t\telseif($this->request['msg']==5)\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",MSG_EMAIL_SENT);\n\t\t\t$this->ObTpl->parse(\"msg_blk1\",\"TPL_MSG_BLK1\");\n\t\t\t$this->ObTpl->parse(\"msg_blk2\",\"TPL_MSG_BLK2\");\n\t\t}\n\n\t\tif($campaigncount>0)\n\t\t{\n\t\t\t#PARSING DISCOUNT BLOCK\n\t\t\tfor($j=0;$j<$campaigncount;$j++)\n\t\t\t{\t\t\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_ID\",$queryResult[$j]->iMailid_PK);\n\t\t\t\tif ($queryResult[$j]->vUserList==\"All\"){\n $this->obDb->query = \"SELECT count(*) as cnt FROM \".CUSTOMERS.\" WHERE iStatus=1 AND iMailList !=0\";\n }else{ \n $this->obDb->query = \"SELECT count(*) as cnt FROM \".LEADLIST.\" WHERE iLeadId_FK='\". $queryResult[$j]->vUserList.\"'\";\n }\n\t\t\t\t$qryRs = $this->obDb->fetchQuery();\n\t\t\t\t\n\t\t\t\tif ($queryResult[$j]->vVisitorList==\"1\"){\n $this->obDb->query = \"SELECT count(*) as cnt FROM \".NEWSLETTERS;\n\t\t\t\t $qryVs = $this->obDb->fetchQuery();\n\t\t\t\t $qryRs[0]->cnt = $qryRs[0]->cnt + $qryVs[0]->cnt;\n }\n\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_USERCOUNT\",$qryRs[0]->cnt);\n \n $this->ObTpl->set_var(\"TPL_VAR_SUBJECT\",$this->libFunc->m_displayContent($queryResult[$j]->vSubject));\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SID\",$this->libFunc->m_displayContent($queryResult[$j]->vSid));\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_BUILDDATE\",$this->libFunc->dateFormat2($queryResult[$j]->tmBuildDate));\t\n\t\t\t\t$sentDate=$this->libFunc->dateFormat2($queryResult[$j]->tmSentDate);\n\t\t\t\tif(empty($sentDate))\n\t\t\t\t{\t\t\t\t\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SENTDATE\",\"Send now\");\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_VIEWLABEL\",\"View/Sent\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SENTDATE\",$sentDate);\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_VIEWLABEL\",\"View\");\n\t\t\t\t}\n\t\t\t\t$this->ObTpl->parse(\"email_blk\",\"TPL_EMAIL_BLK\",true);\n\t\t\t}\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",$campaigncount.\" records found\");\n\t\t\t$this->ObTpl->parse(\"msg_blk1\",\"TPL_MSG_BLK1\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MESSAGE\",MSG_NOEMAILS);\n\t\t\t$this->ObTpl->parse(\"message_blk\",\"TPL_MESSAGE_BLK\");\n\t\t}\n\t\n\t\treturn($this->ObTpl->parse(\"return\",\"TPL_EMAIL_FILE\"));\n\t}", "function mailUser($transcript, $phoneNumber, $CallSid)\n{\n\t $inCallEmployeeId = getOne(\"select user_id from schedule where ph_id = (select ph_id from phone_numbers where phone_number like '%\".trim($phoneNumber).\"') and is_active=1\");\n\t$inCallEmployeeMail = getOne(\"select user_email from users where user_id = '\".$inCallEmployeeId.\"'\");\n\t$voiceURL = getOne(\"select recording_url from incomming_calls where call_sid = '\".$CallSid.\"'\");\n\t\n\t\n\tif(trim($inCallEmployeeMail) != \"\")\n\t{\n\t\t$message = \"\n\t\t\t<h3> New Call for you..!!</h3>\n\t\t\t<br />\n\t\t\tYou have a new message.<br />\n\t\t\tTranscription: \".$transcript.\"<br />\n\t\t\tVoice Url: \".$voiceURL.\"<br /><br />\n\t\t\tLog in to VBX scheduler for more details.<br />\n\t\t\tThanks.\t\t\n\t\t\";\n\t\tmailEmployee($inCallEmployeeMail, $message);\n\t}\n}" ]
[ "0.69378394", "0.670086", "0.66805977", "0.66643006", "0.66538966", "0.66504693", "0.6602885", "0.657801", "0.6570051", "0.6568018", "0.6558926", "0.64695555", "0.64667624", "0.64493483", "0.6447231", "0.6445809", "0.6435317", "0.64276826", "0.6374332", "0.63678825", "0.6338377", "0.63328016", "0.6312757", "0.6310112", "0.62934786", "0.62508863", "0.6237966", "0.62162936", "0.61936635", "0.6178356", "0.616689", "0.61552465", "0.61454225", "0.6113411", "0.61058646", "0.6095981", "0.60896", "0.607961", "0.60706407", "0.60644627", "0.6060511", "0.60562676", "0.6054742", "0.60246885", "0.6022432", "0.60147434", "0.60120666", "0.5996738", "0.5994845", "0.59947413", "0.59882873", "0.5987454", "0.5981035", "0.59789586", "0.59765595", "0.59726614", "0.59704065", "0.5964641", "0.59570056", "0.59538895", "0.59524626", "0.5951419", "0.59465027", "0.5943115", "0.5936506", "0.59351736", "0.59274304", "0.5923627", "0.5919591", "0.59195733", "0.5917251", "0.59131956", "0.5908621", "0.5899985", "0.5891411", "0.58793145", "0.5876789", "0.5866013", "0.58653134", "0.58573425", "0.5854716", "0.5849591", "0.5847451", "0.58464366", "0.5844363", "0.5839157", "0.5829618", "0.5827877", "0.5827326", "0.5817173", "0.58145994", "0.58113706", "0.5807885", "0.5804611", "0.5797973", "0.5795513", "0.5793972", "0.5787036", "0.57868695", "0.57855004" ]
0.5944248
63
Do display entry (individual entry)
function do_display_entry_mail_archive($adata, $aret_flag=0) { # Get security vars $_SEC = get_security_flags(); $_PERMS = do_decode_perms_admin($_SEC['_sadmin_perms']); # Dim some Vars: global $_CCFG, $_TCFG, $_DBCFG, $db_coin, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp; # Build common td start tag / strings (reduce text) $_td_str_left_vtop = '<td class="TP1SML_NR" width="25%" valign="top">'; $_td_str_colsp2 = '<td class="TP1SML_NJ" width="25%" colspan="2">'; $_td_str_left = '<td class="TP1SML_NR" width="25%">'; $_td_str_right = '<td class="TP1SML_NL" width="75%">'; # Build query and execute $query = 'SELECT *'; $query .= ' FROM '.$_DBCFG['mail_archive']; $query .= ' WHERE '.$_DBCFG['mail_archive'].'.ma_id='.$adata['ma_id']; $result = $db_coin->db_query_execute($query); $numrows = $db_coin->db_query_numrows($result); # Process results IF ($numrows) { while ($row = $db_coin->db_fetch_array($result)) { IF ($_SEC['_suser_id']) { # Dim some vars $good = 0; # Is it the client main address $clinfo = get_contact_client_info($_SEC['_suser_id']); $pos = strpos(strtolower($row['ma_fld_from']), strtolower($clinfo['cl_email'])); IF ($pos !== false) {$good++;} $pos1 = strpos(strtolower($row['ma_fld_recip']), strtolower($clinfo['cl_email'])); IF ($pos1 !== false) {$good++;} # Check all additional email addresses for a client IF (!$good) { $cl_emails = get_contact_client_info_alias($_SEC['_suser_id'],1); $x = sizeof($cl_emails); IF ($x) { FOR ($i=1; $i<=$x; $i++) { $pos = strpos(strtolower($row['ma_fld_from']), strtolower($cl_emails[$x]['cl_email'])); IF ($pos !== false) {$good++; break;} $pos1 = strpos(strtolower($row['ma_fld_recip']), strtolower($cl_emails[$x]['cl_email'])); IF ($pos1 !== false) {$good++; break;} } } } } IF ($_SEC['_sadmin_flg'] || $good) { # Build Title String, Content String, and Footer Menu String $_tstr = '<table width="100%">'.$_nl; $_tstr .= '<tr class="BLK_IT_TITLE_TXT" valign="bottom">'.$_nl; $_tstr .= '<td class="TP3MED_BL">'.$_LANG['_MAIL']['l_View_Message'].$_sp.htmlspecialchars($row['ma_fld_recip'], ENT_QUOTES); IF ($_SEC['_sadmin_flg'] && $adata['_suser_id']) { $_tstr .= ' <a href="mod.php?mod=clients&mode=view&cl_id='.$adata['_suser_id'].'">'.$_TCFG['_IMG_BACK_TO_CLIENT_M'].'</a>'.$_nl; } $_tstr .= '</td>'.$_nl; $_tstr .= '</tr>'.$_nl; $_tstr .= '</table>'.$_nl; $_cstr = '<table width="100%">'.$_nl; $_cstr .= '<tr valign="bottom">'.$_nl; $_cstr .= $_td_str_left.'<b>'.$_LANG['_MAIL']['l_To'].$_sp.'</b></td>'.$_nl; $_cstr .= $_td_str_right.htmlspecialchars($row['ma_fld_recip'], ENT_QUOTES).'</td>'.$_nl; $_cstr .= '</tr>'.$_nl; $_cstr .= '<tr valign="bottom">'.$_nl; $_cstr .= $_td_str_left.'<b>'.$_LANG['_MAIL']['l_CC'].$_sp.'</b></td>'.$_nl; $_cstr .= $_td_str_right.htmlspecialchars($row['ma_fld_cc'], ENT_QUOTES).'</td>'.$_nl; $_cstr .= '</tr>'.$_nl; $_cstr .= '<tr valign="bottom">'.$_nl; $_cstr .= $_td_str_left.'<b>'.$_LANG['_MAIL']['l_BCC'].$_sp.'</b></td>'.$_nl; $_cstr .= $_td_str_right.htmlspecialchars($row['ma_fld_bcc'], ENT_QUOTES).'</td>'.$_nl; $_cstr .= '</tr>'.$_nl; $_cstr .= '<tr valign="bottom">'.$_nl; $_cstr .= $_td_str_left.'<b>'.$_LANG['_MAIL']['l_From'].$_sp.'</b></td>'.$_nl; $_cstr .= $_td_str_right.htmlspecialchars($row['ma_fld_from'], ENT_QUOTES).'</td>'.$_nl; $_cstr .= '</tr>'.$_nl; $_cstr .= '<tr valign="bottom">'.$_nl; $_cstr .= $_td_str_left.'<b>'.$_LANG['_MAIL']['l_Subject'].$_sp.'</b></td>'.$_nl; $_cstr .= $_td_str_right.htmlspecialchars($row['ma_fld_subject']).'</td>'.$_nl; $_cstr .= '</tr>'.$_nl; $_cstr .= '<tr valign="bottom">'.$_nl; $_cstr .= $_td_str_left.'<b>'.$_LANG['_MAIL']['l_Date_Sent'].$_sp.'</b></td>'.$_nl; $_cstr .= $_td_str_right.dt_make_datetime($row['ma_time_stamp'], $_CCFG['_PKG_DATE_FORMAT_SHORT_DTTM']).'</td>'.$_nl; $_cstr .= '</tr>'.$_nl; $_cstr .= '<tr valign="bottom">'.$_nl; $_cstr .= $_td_str_left_vtop.'<b>'.$_LANG['_MAIL']['l_Message'].$_sp.'('.$_LANG['_MAIL']['output_below'].')</b></td>'.$_nl; $_cstr .= $_td_str_right.$_sp.'</td>'.$_nl; $_cstr .= '</tr>'.$_nl; $_cstr .= '<tr valign="bottom">'.$_nl; $_cstr .= $_td_str_colsp2.'<hr></td>'.$_nl; $_cstr .= '</tr>'.$_nl; $_cstr .= '<tr valign="bottom">'.$_nl; $_cstr .= $_td_str_colsp2; IF ($_CCFG['EMAIL_AS_HTML'] || $_CCFG['INCOMING_EMAIL_AS_HTML']) { $_cstr .= nl2br(htmlspecialchars($row['ma_fld_message'])); } ELSE { $_cstr .= '<pre>'.$row['ma_fld_message'].'</pre>'; } $_cstr .= '</td>'.$_nl; $_cstr .= '</tr>'.$_nl; $_cstr .= '</table>'.$_nl; IF ($_CCFG['_IS_PRINT'] != 1) { IF ($_SEC['_sadmin_flg']) {$_mstr .= do_nav_link('admin.php', $_TCFG['_IMG_ADMIN_M'],$_TCFG['_IMG_ADMIN_M_MO'],'','');} $_mstr .= do_nav_link($_SERVER["PHP_SELF"].'?mod=mail&mode=resend&obj=arch&ma_id='.$adata['ma_id'], $_TCFG['_IMG_EMAIL_M'],$_TCFG['_IMG_EMAIL_M_MO'],'',''); IF ($_PERMS['AP16'] == 1 || $_PERMS['AP05'] == 1) { $_mstr .= do_nav_link($_SERVER["PHP_SELF"].'?mod=mail&mode=delete&obj=arch&ma_id='.$adata['ma_id'], $_TCFG['_IMG_DELETE_M'],$_TCFG['_IMG_DELETE_M_MO'],'',''); } $_mstr .= do_nav_link($_SERVER["PHP_SELF"].'?mod=mail&mode=search', $_TCFG['_IMG_SEARCH_M'],$_TCFG['_IMG_SEARCH_M_MO'],'',''); } ELSE { $_mstr = ''; } } # Call block it function $_out .= do_mod_block_it($_tstr, $_cstr, '1', $_mstr, '1'); $_out .= '<br>'.$_nl; } } # Return results IF ($aret_flag) {return $_out;} ELSE {echo $_out;} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function au_show_entry(){\n\n\t// Praise the big $aulis\n\tglobal $aulis;\n\n\t// We can't access this file, if not from index.php, so let's check\n\tif(!defined('aulis'))\n\t\theader(\"Location: index.php\");\n\n\t// We need to decrypt the blog id, if numeric\n\tif(isset($_GET['id']) and is_numeric($_GET['id']))\n\t\t$entry_id = au_decrypt_blog_id($_GET['id']);\n\t// No id...\n\telse\n\t\t$entry_id = 0;\n\n\t// Try to obtain the entry from the big (or small, it all depends) database\n\tif($aulis['blog']['entry'] = au_get_blog_entry($entry_id)){\n\n\t\t// Prepare some url inputs\n\t\t$aulis['blog']['url_input'] = array(\n\t\t\t\"app\" => \"blogentry\",\n\t\t\t\"id\" => $aulis['blog']['entry']->entry_id,\n\t\t\t\"title\" => $aulis['blog']['entry']->blog_name\n\t\t);\n\n\t\t// Load the template\n\t\tau_load_template(\"blog_entry\");\n\n\t}\n\n\t// Bummer... we have to dissappoint them :'(\n\telse\n\t\tau_error_box(BLOG_NOT_FOUND);\n\n}", "public function renderEntry($entry)\n {\n\n $date = $this->view->i18n->timestamp($entry['m_time_created']);\n\n $html = <<<HTML\n <li class=\"entry\" >\n <h3>\n {$entry['user_name']} &lt;{$entry['person_lastname']}, {$entry['person_firstname']}&gt;\n <span class=\"date\">[{$date}]</span>\n </h3>\n <div class=\"thumb\" >\n <img\n src=\"thumb.php?f=core_person-photo-{$entry['person_id']}&amp;s=xxsmall\"\n alt=\"{$entry['user_name']}\"\n style=\"max-width:48px;max-height:48px;\" >\n </div>\n <div class=\"content\" >\n {$entry['log_content']}\n </div>\n <div class=\"do-clear\" ></div>\n </li>\nHTML;\n\n return $html;\n\n }", "public function display(){}", "public function getEntry();", "public function showEntryPage ( $contentType , $entry ) {\n\n $this->load->library('field_handler');\n $this->load->eloquent('Field_short');\n $this->load->eloquent('Field_long');\n $this->load->eloquent('Field_int');\n $this->load->eloquent('Content_type');\n $this->load->eloquent('Entry');\n $this->load->eloquent('Field_type');\n $this->load->eloquent('Field');\n $this->load->eloquent('Content_type_field');\n $this->load->eloquent('Content_category');\n //injecting extra fields to the entry object\n foreach ( $entry->fields as $field ):\n if ( $field->\n contentTypeField->slug )\n $entry->{$field->contentTypeField->slug} = json_decode($field->valuable->value);\n if ( is_array($entry->{$field->\n contentTypeField->slug}) )\n $entry->{$field->contentTypeField->slug} = site_url('upload/content/fields/' . implode('' , json_decode($field->valuable->value)));\n endforeach;\n // set the page template\n $pageTPL = $entry->entry_tpl ? $entry->entry_tpl : $contentType->full_tpl;\n if ( strpos($pageTPL , '.tpl') ) {\n $pageTPL = str_replace('.tpl' , '' , $pageTPL);\n }\n if ( !$this->smart->moduleTemplateExists('pages/entries/' . $pageTPL . '.tpl') ) {\n $pageTPL = 'default';\n }\n\n $Extra_fields = $this->__getExtraFieldObjs($contentType , isset($entry) ? $entry : null);\n $this->smart->assign(compact('contentType'));\n $this->smart->assign(compact('entry'));\n $this->smart->assign(compact('Extra_fields'));\n $this->smart->assign([ 'title' =>\n $entry->title , 'content_type'\n => $contentType ]);\n\n $this->smart->view('pages/entries/' . $pageTPL);\n }", "abstract function display();", "abstract function display();", "abstract protected function displayContent();", "public function display() {\n\t\techo $this->data;\n\t\treturn;\n\t}", "public function display($post);", "function cp_do_display_entry_supplier($adata) {\n\t# Get security vars\n\t\t$_SEC\t= get_security_flags();\n\t\t$_PERMS\t= do_decode_perms_admin($_SEC['_sadmin_perms']);\n\n\t# Dim some Vars:\n\t\tglobal $_CCFG, $_TCFG, $_DBCFG, $db_coin, $_LANG, $_nl, $_sp;\n\n\t# Build common td start tag / strings (reduce text)\n\t\t$_td_str_left\t\t\t= '<td class=\"TP1SML_NR\" valign=\"top\">';\n\t\t$_td_str_right\t\t\t= '<td class=\"TP1SML_NL\" valign=\"top\">';\n\t\t$_td_str_right_span3\t= '<td class=\"TP1SML_NL\" valign=\"top\" colspan=\"3\">';\n\n\n\t# Build output\n\t\t$_out = '<br>'.$_nl;\n\t\t$_out .= '<div align=\"center\">'.$_nl;\n\t\t$_out .= '<table width=\"100%\" border=\"0\" bordercolor=\"'.$_TCFG['_TAG_TABLE_BRDR_COLOR'].'\" bgcolor=\"'.$_TCFG['_TAG_TRTD_BKGRND_COLOR'].'\" cellpadding=\"0\" cellspacing=\"1\">'.$_nl;\n\t\t$_out .= '<tr class=\"BLK_DEF_TITLE\"><td class=\"TP3MED_BC\">'.$_nl;\n\n\t\t$_out .= '<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">'.$_nl;\n\t\t$_out .= '<tr class=\"BLK_IT_TITLE_TXT\">'.$_nl.'<td class=\"TP0MED_NL\">'.$_nl;\n\t\t$_out .= '<b>'.$_LANG['_ADMIN']['Supplier_Info_Entry'].'</b>';\n\t\t$_out .= '</td>'.$_nl.'<td class=\"TP0MED_NR\">'.$_nl;\n\t\tIF ($_CCFG['_IS_PRINT'] != 1) {\n \t\t\tIF ($_PERMS['AP16'] == 1 || $_PERMS['AP04'] == 1) {\n\t\t\t\t$_out .= do_nav_link('admin.php?cp=suppliers&op=edit&s_id='.$adata['s_id'], $_TCFG['_S_IMG_EDIT_S'],$_TCFG['_S_IMG_EDIT_S_MO'],'','');\n\t\t\t}\n\t\t\tIF ($_PERMS['AP16'] == 1 || $_PERMS['AP04'] == 1) {\n\t\t\t\t$_out .= do_nav_link('admin.php?cp=suppliers&op=delete&stage=1&s_id='.$adata['s_id'].'&s_name_first='.$adata['s_name_first'].'&s_name_last='.$adata['s_name_last'], $_TCFG['_S_IMG_DEL_S'],$_TCFG['_S_IMG_DEL_S_MO'],'','');\n\t\t\t}\n\t\t} ELSE {\n\t\t\t$_out .= $_sp;\n\t\t}\n\t\t$_out .= '</td>'.$_nl.'</tr>'.$_nl.'</table>'.$_nl;\n\n\t\t$_out .= '</td></tr>'.$_nl;\n\t\t$_out .= '<tr class=\"BLK_DEF_ENTRY\"><td class=\"BLK_IT_ENTRY\">'.$_nl;\n\n\t\t$_out .= '<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">'.$_nl;\n\n\t\t$_out .= '<tr class=\"BLK_DEF_ENTRY\">'.$_nl;\n\t\t$_out .= $_td_str_left.'<b>'.$_LANG['_ADMIN']['l_Supplier_ID'].$_sp.'</b></td>'.$_nl;\n\t\t$_out .= $_td_str_right.$adata['s_id'].'</td>'.$_nl;\n\t\t$_out .= $_td_str_left.'<b>'.$_LANG['_ADMIN']['l_Company'].$_sp.'</b></td>'.$_nl;\n\t\t$_out .= $_td_str_right.htmlspecialchars($adata['s_company']).'</td>'.$_nl;\n\t\t$_out .= '</tr>'.$_nl;\n\n\t\t$_out .= '<tr class=\"BLK_DEF_ENTRY\">'.$_nl;\n\t\t$_out .= $_td_str_left.'<b>'.$_sp.'</b></td>'.$_nl;\n\t\t$_out .= $_td_str_right.$_sp.'</td>'.$_nl;\n\t\t$_out .= $_td_str_left.'<b>'.$_LANG['_ADMIN']['l_Full_Name'].$_sp.'</b></td>'.$_nl;\n\t\t$_out .= $_td_str_right.htmlspecialchars($adata['s_name_first'].' '.$adata['s_name_last']).'</td>'.$_nl;\n\t\t$_out .= '</tr>'.$_nl;\n\n\t\t$_out .= '<tr class=\"BLK_DEF_ENTRY\">'.$_nl;\n\t\t$_out .= $_td_str_left.'<b>'.$_LANG['_ADMIN']['l_Status'].$_sp.'</b></td>'.$_nl;\n\t\t$_out .= $_td_str_right.$adata['s_status'].'</td>'.$_nl;\n\t\t$_out .= $_td_str_left.'<b>'.$_LANG['_ADMIN']['l_Address_Street_1'].$_sp.'</b></td>'.$_nl;\n\t\t$_out .= $_td_str_right.$adata['s_addr_01'].'</td>'.$_nl;\n\t\t$_out .= '</tr>'.$_nl;\n\n\t\t$_out .= '<tr class=\"BLK_DEF_ENTRY\">'.$_nl;\n\t\t$_out .= $_td_str_left.'<b>'.$_LANG['_ADMIN']['l_AccountID'].$_sp.'</b></td>'.$_nl;\n\t\t$_out .= $_td_str_right.$adata['s_account'].'</td>'.$_nl;\n\t\tIF ($adata['s_addr_02']) {\n\t\t\t$_out .= $_td_str_left.'<b>'.$_LANG['_ADMIN']['l_Address_Street_2'].$_sp.'</b></td>'.$_nl;\n\t\t\t$_out .= $_td_str_right.$adata['s_addr_02'].'</td>'.$_nl;\n\t\t} ELSE {\n\t\t\t$_out .= $_td_str_left.$_sp.'</td>'.$_nl;\n\t\t\t$_out .= $_td_str_right.$_sp.'</td>'.$_nl;\n\t\t}\n\t\t$_out .= '</tr>'.$_nl;\n\n\t\t$_out .= '<tr class=\"BLK_DEF_ENTRY\">'.$_nl;\n\t\t$_out .= $_td_str_left.'<b>'.$_LANG['_ADMIN']['l_Terms'].$_sp.'</b></td>'.$_nl;\n\t\t$_out .= $_td_str_right.$adata['s_terms'].'</td>'.$_nl;\n\t\t$_out .= $_td_str_left.'<b>'.$_LANG['_ADMIN']['l_City'].$_sp.'</b></td>'.$_nl;\n\t\t$_out .= $_td_str_right.htmlspecialchars($adata['s_city']).'</td>'.$_nl;\n\t\t$_out .= '</tr>'.$_nl;\n\n\t\t$_out .= '<tr class=\"BLK_DEF_ENTRY\">'.$_nl;\n\t\t$_out .= $_td_str_left.$_sp.'</td>'.$_nl;\n\t\t$_out .= $_td_str_right.$_sp.'</td>'.$_nl;\n\t\t$_out .= $_td_str_left.'<b>'.$_LANG['_ADMIN']['l_State_Province'].$_sp.'</b></td>'.$_nl;\n\t\t$_out .= $_td_str_right.htmlspecialchars($adata['s_state_prov']).'</td>'.$_nl;\n\t\t$_out .= '</tr>'.$_nl;\n\n\t\t$_out .= '<tr class=\"BLK_DEF_ENTRY\">'.$_nl;\n\t\tIF ($adata['s_phone']) {\n\t\t\t$_out .= $_td_str_left.'<b>'.$_LANG['_ADMIN']['l_Phone'].$_sp.'</b></td>'.$_nl;\n\t\t\t$_out .= $_td_str_right.htmlspecialchars($adata['s_phone']).'</td>'.$_nl;\n\t\t} ELSE {\n\t\t\t$_out .= $_td_str_left.$_sp.'</td>'.$_nl;\n\t\t\t$_out .= $_td_str_right.$_sp.'</td>'.$_nl;\n\t\t}\n\t\t$_out .= $_td_str_left.'<b>'.$_LANG['_ADMIN']['l_Country'].$_sp.'</b></td>'.$_nl;\n\t\t$_out .= $_td_str_right.htmlspecialchars($adata['s_country']).'</td>'.$_nl;\n\t\t$_out .= '</tr>'.$_nl;\n\n\t\t$_out .= '<tr class=\"BLK_DEF_ENTRY\">'.$_nl;\n\t\tIF ($adata['s_fax']) {\n\t\t\t$_out .= $_td_str_left.'<b>'.$_LANG['_ADMIN']['l_Fax'].$_sp.'</b></td>'.$_nl;\n\t\t\t$_out .= $_td_str_right.htmlspecialchars($adata['s_fax']).'</td>'.$_nl;\n\t\t} ELSE {\n\t\t\t$_out .= $_td_str_left.$_sp.'</td>'.$_nl;\n\t\t\t$_out .= $_td_str_right.$_sp.'</td>'.$_nl;\n\t\t}\n\t\t$_out .= $_td_str_left.'<b>'.$_LANG['_ADMIN']['l_Zip_Postal_Code'].$_sp.'</b></td>'.$_nl;\n\t\t$_out .= $_td_str_right.htmlspecialchars($adata['s_zip_code']).'</td>'.$_nl;\n\t\t$_out .= '</tr>'.$_nl;\n\n\t\tIF ($adata['s_tollfree']) {\n\t\t\t$_out .= '<tr class=\"BLK_DEF_ENTRY\">'.$_nl;\n\t\t\t$_out .= $_td_str_left.'<b>'.$_LANG['_ADMIN']['l_TollFree'].$_sp.'</b></td>'.$_nl;\n\t\t\t$_out .= $_td_str_right.htmlspecialchars($adata['s_tollfree']).'</td>'.$_nl;\n\t\t\t$_out .= $_td_str_left.$_sp.'</td>'.$_nl;\n\t\t\t$_out .= $_td_str_right.$_sp.'</td>'.$_nl;\n\t\t\t$_out .= '</tr>'.$_nl;\n\t\t}\n\n\t\t$_out .= '<tr class=\"BLK_DEF_ENTRY\">'.$_nl;\n\t\t$_out .= $_td_str_left.'<b>'.$_LANG['_ADMIN']['l_Email_Address'].$_sp.'</b></td>'.$_nl;\n\t\t$_out .= $_td_str_right.htmlspecialchars($adata['s_email']).'</td>'.$_nl;\n\t\t$_out .= $_td_str_left.'<b>'.$_LANG['_ADMIN']['l_TaxID'].$_sp.'</b></td>'.$_nl;\n\t\t$_out .= $_td_str_right.htmlspecialchars($adata['s_taxid']).'</td>'.$_nl;\n\t\t$_out .= '</tr>'.$_nl;\n\n\t\t$_out .= '<tr class=\"BLK_DEF_ENTRY\">'.$_nl;\n\t\t$_out .= $_td_str_left.'<b>'.$_LANG['_ADMIN']['l_Email_Address_Additional'].$_sp.'</b></td>'.$_nl;\n\t\t$_out .= $_td_str_right.$_nl;\n\n\t# Set Query for select (additional emails).\n\t\t$ae_query\t= 'SELECT *';\n\t\t$ae_query .= ' FROM '.$_DBCFG['suppliers_contacts'];\n\t\t$ae_query .= ' WHERE contacts_s_id='.$adata['s_id'];\n\t\t$ae_query .= ' ORDER BY contacts_email ASC';\n\t\t$ae_result\t= $db_coin->db_query_execute($ae_query);\n\t\tIF ($db_coin->db_query_numrows($ae_result)) {\n\t\t\twhile ($ae_row = $db_coin->db_fetch_array($ae_result)) {\n\t\t\t\t$_out .= htmlspecialchars($ae_row['contacts_email']).'<br>'.$_nl;\n \t }\n\t\t}\n\t\t$_out .= '</td>'.$_nl;\n\n\t\t$_out .= $_td_str_left.$_sp.'</td>'.$_nl;\n\t\t$_out .= $_td_str_right.$_sp.'</td>'.$_nl;\n\t\t$_out .= '</tr>'.$_nl;\n\n\t\t$_out .= '<tr class=\"BLK_DEF_ENTRY\"><td colspan=\"4\"><hr></td></tr>'.$_nl;\n\t\t$_out .= '<tr class=\"BLK_DEF_ENTRY\">'.$_nl;\n\t\t$_out .= $_td_str_left.'<b>'.$_LANG['_ADMIN']['l_Notes'].$_sp.'</b></td>'.$_nl;\n\t\t$_out .= $_td_str_right_span3.nl2br($adata['s_notes']).'</td>'.$_nl;\n\t\t$_out .= '</tr>'.$_nl;\n\n\t\t$_out .= '</table>'.$_nl;\n\n\t\t$_out .= '</td></tr>'.$_nl;\n\t\t$_out .= '</table>'.$_nl;\n\t\t$_out .= '</div>'.$_nl;\n\n\t\treturn $_out;\n}", "function createContent(&$entry) {\n $bibdisplay = new BibEntryDisplay($entry);\n return $bibdisplay->displayOnSteroids();\n }", "public abstract function display();", "public function display() {}", "public function display() {}", "public function displayAdded()\n {\n $entry = $this->getEntry();\n if ($entry) {\n return $entry->displayAdded();\n }\n }", "public function display()\n {\n }", "public function display()\n {\n }", "public function display()\n {\n }", "public function display()\n {\n }", "function display () {\n\t\t// So that if we're displaying a list of reports that are\n\t\t// available for editing, it's accurate.\n\t\t$this->_update_locked();\n\t\n\t\t$data = $this->_get_data_by_recent ();\n\t\t\n\t\t$this->render($data);\n\t\n\t}", "public function display ()\n {\n echo $this->as_text ();\n }", "public function display() {\n\t}", "function zenbu_display($entry_id, $channel_id, $field_data, $rel_data = array(), $field_id, $settings, $rules = array(), $upload_prefs = array(), $installed_addons)\n\t{\n\t\t$output = NBS;\n\t\t\n\t\t$this_entry_id = $entry_id;\n\t\tif( empty($rel_data))\n\t\t{\n\t\t\treturn $output;\n\t\t}\n\n\t\t// --------------------\n\t\t// Relationship entry display\n\t\t// --------------------\n\t\t\n\t\t$output = '';\n\n\t\tif(isset($rel_data['grid']))\n\t\t{\n\t\t\t$related_entries = isset($rel_data['grid']['parent_id_'.$entry_id]['grid_id_'.$field_id]['grid_row_'.$rel_data['grid_row']]['grid_col_'.$rel_data['grid_col']]) ? $rel_data['grid']['parent_id_'.$entry_id]['grid_id_'.$field_id]['grid_row_'.$rel_data['grid_row']]['grid_col_'.$rel_data['grid_col']] : array();\n\n\t\t\tforeach($related_entries as $order => $child_entry_data)\n\t\t\t{\n\t\t\t\tforeach($child_entry_data as $child_id => $entry_data_array)\n\t\t\t\t{\n\t\t\t\t\t$entry_title = highlight($entry_data_array['title'], $rules, 'field_'.$field_id);\n\t\t\t\t\t$entry_id = $entry_data_array['entry_id'];\n\t\t\t\t\t$entry_id_prefix = (isset($extra_settings['field_'.$field_id]['rel_option_1']) && $extra_settings['field_'.$field_id]['rel_option_1'] == 'y') ? $entry_data_array['entry_id'] . ' - ' : '';\n\t\t\t\t\t$channel_id = $entry_data_array['channel_id'];\n\t\t\t\t\t$output .= '<li>'.anchor(BASE.AMP.\"C=content_publish\".AMP.\"M=entry_form\".AMP.\"channel_id=\".$channel_id.AMP.\"entry_id=\".$entry_id, $entry_id_prefix . $entry_title);\n\t\t\t\t\t$output .= (count($related_entries) > 1) ? '</li>' : '';\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\t\t\t$related_entries = isset($rel_data['parent_id_'.$entry_id]['field_id_'.$field_id]) ? $rel_data['parent_id_'.$entry_id]['field_id_'.$field_id] : array();\n\t\t\t$extra_settings = $settings['setting'][$channel_id]['extra_options'];\n\t\t\t\n\t\t\tforeach($related_entries as $child_entry_id => $entry_data_array)\n\t\t\t{\n\t\t\t\t$entry_title = highlight($entry_data_array['title'], $rules, 'field_'.$field_id);\n\t\t\t\t$entry_id = $entry_data_array['entry_id'];\n\t\t\t\t$entry_id_prefix = (isset($extra_settings['field_'.$field_id]['rel_option_1']) && $extra_settings['field_'.$field_id]['rel_option_1'] == 'y') ? $entry_data_array['entry_id'] . ' - ' : '';\n\t\t\t\t$channel_id = $entry_data_array['channel_id'];\n\t\t\t\t$output .= '<li>'.anchor(BASE.AMP.\"C=content_publish\".AMP.\"M=entry_form\".AMP.\"channel_id=\".$channel_id.AMP.\"entry_id=\".$entry_id, $entry_id_prefix . $entry_title);\n\t\t\t\t$output .= (count($related_entries) > 1) ? '</li>' : '';\n\t\t\t}\n\t\t}\n\t\t\n\t\t$output = ! empty($output) ? '<ul>'.$output.'</ul>' : NBS;\n\t\t\n\t\treturn $output;\n\t}", "public function getDisplay();", "function display() {\n\t# Global Variables\n\tglobal $_db, $_GLOBALS, $validator;\n\t\n\t# Get Data\n\t$data\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t= $_db->fetch(\"\tSELECT\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t*\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t`orders`\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tORDER BY\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t`uid` DESC\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\n\t# Generate Listing\n\t$listing\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t= \"\";\n\tforeach ($data as $item) {\n\t\t$listing\t\t\t\t\t\t\t\t\t\t\t\t\t\t.= \"\n\t\t\t<tr>\n\t\t\t\t<td>{$item->datetime}</td>\n\t\t\t\t<td>{$item->reference}</td>\n\t\t\t\t<td>{$item->name}</td>\n\t\t\t\t<td>{$item->contact_number}</td>\n\t\t\t\t<td>{$item->email}</td>\n\t\t\t\t<td>{$item->amount}</td>\n\t\t\t</tr>\n\t\t\";\n\t}\n\t\n\t# Generate HTML\n\t$html\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t= \"\n\t<div class='content'>\n\t\n\t\t<h2>Orders</h2>\n\t\t\n\t\t<table class='results_table' width='100%'>\n\t\t\t<tr>\n\t\t\t\t<th>Date/Time</th>\n\t\t\t\t<th>Reference No.</th>\n\t\t\t\t<th>Name</th>\n\t\t\t\t<th>Contact Number</th>\n\t\t\t\t<th>Email</th>\n\t\t\t\t<th>Amount</th>\n\t\t\t</tr>\n\t\t\t{$listing}\n\t\t</table>\n\t\t\n\t</div>\n\t\";\n\t\n\t# Display HTML\n\tprint $html;\n}", "public function display()\n {\n $current = $this->head;\n while ($current != null) \n {\n echo $current->data->name.\" \";\n echo $current->data->share.\" \";\n echo $current->data->price;\n echo \"\\n\";\n $current = $current->next;\n }\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "function textEntry($display,$name,$entries,$errors,$size=15)\n{\n\t$returnVal = \"\n\t<tr>\n\t\t<td>$display:</td>\n\t\t<td>\n\t\t\t<input type='text' name='$name' size='$size'\n\t\t\tvalue='\" . browserString($entries[$name]) . \"'>\";\n\n\tif (array_key_exists($name,$errors))\n\t{\n\t\t$returnVal .= '<span class=\"Error\" style=\"white-space:nowrap\">* ' .\n\t\t\t\t$errors[$name] .\n\t\t\t'</span>';\n\t}\n\n\t$returnVal .= \"</td>\n\t</tr>\";\n\n\treturn $returnVal;\n}", "public function display()\n {\n if ($this->_query == '')\n {\n WCFDataServicesEntity::displayEntities();\n }\n else\n {\n WCFDataServicesEntity::displayEntityData();\n }\n }", "function process_entries($entries, $cat, $printed_already_once)\n{\n //echo 'entries: ';\n //var_dump($entries);\n //echo 'category: ';\n //var_dump($cat);\n \t//print heading once\n \tif (isset($cat) && !empty($cat)) {\n \t\tif (!isset($printed_already_once[$cat])) {\n\t\t\t\t $post = ' Pferde';\n\t\t\t\t if (strpos($cat, '_') === False)//!== count($cat) - 1)\n {\n // remove spaces\n\t\t\t\t $post = trim(strtolower($post));\n }\n\n \t\t echo '<h3>Unsere ' . toFairy($cat) . $post . ':</h3>';\n \t$printed_already_once[$cat] = true;\n\n \t// Print special notes:\n \tif ($cat == 'hof') {\n \t\techo '<p>Alle unsere Schulpferde werden regelm&auml;&szlig;ig von fachkundigem Reiter korrigiert und weiter ausgebildet.</p>';\n \t}\n \t}\n \t//unset($cat);\n \t}\n\n \t\tforeach ($entries as $entry)\n\t \t{\n \techo $entry;\n }\n\n}", "public function viewAction()\n {\n $id = $this->_getPrimaryId();\n $row = $this->_getRow($id);\n\n $this->view->row = $row;\n }", "function display($tpl = null)\n\t{\n\t\t$this->Item=$this->get('Item');\n\t\t\n//\t\techo \"<pre>\" . var_dump($this->Item) . \"</pre>\";\n\t\t$tour=new TournamentHelper();\n\t\t\t\n\t\tif (isset($this->Item[\"tournament\"][\"id\"]))\n\t\t{\n\t\t\t$tour->tournament=$this->Item[\"tournament\"];\n\t\t\t$tour->player=$this->Item[\"player\"];\n\t\t\t$tour->result=$this->Item[\"result\"];\n\t\t\t$tour->head=$this->Item[\"tournament\"]['event'];\n\t\t\t$this->table=$tour->displayTable(999);\n\t\t}\n\t\tparent::display($tpl);\n\t}", "function show()\r\n\t{\r\n\t\t?>\r\n\r\n\t\t<button class='textlayout' type=\"submit\" name=\"itemtoedit\" value=\"<?php echo $this->orderno ?>\" >\r\n\t\t\t<p>\r\n\t\t\t<span style='font-weight:bold'><?php echo $this->orderno . \". \" . $this->question ; ?></span>\r\n\t\t\t<span style='font-weight:normal'>(<?php echo $this->typeshort; ?>)</span><br>\r\n\t\t\t<span><?php $n = 1; foreach($this->answers as $answerobject){if ($n > 1){echo \", \";}$n ++;echo $answerobject->answer;}?></span>\r\n\t\t\t</p>\r\n\t\t</button><br>\r\n\t\t\r\n\t\t<?php \r\n\t}", "Public function displayInfo(){ \r\n\t\t\techo \"The info about the dress.\"; \r\n\t\t\techo $this->color; \r\n\t\t\techo $this->fabric ; \r\n\t\t\techo $this->design;\r\n\t\t\techo self::MEDIUM;\r\n\t\t}", "function display()\n\t{\n\t\t// Initialize some variables\n\t\t$app\t= & $this->get( 'Application' );\n\t\t$user\t= & $app->getUser();\n\t\t$menu\t= & $this->get( 'Menu' );\n\t\t$doc\t= & $app->getDocument();\n\n\t\t$params\t = & $menu->parameters;\n\t\t$Itemid = $menu->id;\n\n\t\t$gid \t= $user->get('gid');\n\t\t$task \t= JRequest::getVar('task');\n\t\t$id \t= JRequest::getVar('id');\n\t\t$option = JRequest::getVar('option');\n\n\t\t// Lets get our data from the model\n\t\t$section\t\t= & $this->get( 'Section' );\n\t\t$categories\t= & $this->get( 'Categories' );\n\n\t\t//add alternate feed link\n\t\t$link = $mainframe->getBaseURL() .'feed.php?option=com_content&task='.$task.'&id='.$id;\n\t\t$attribs = array('type' => 'application/rss+xml', 'title' => 'RSS 2.0');\n\t\t$document->addHeadLink($link.'&type=rss', 'alternate', 'rel', $attribs);\n\t\t$attribs = array('type' => 'application/atom+xml', 'title' => 'Atom 1.0');\n\t\t$document->addHeadLink($link.'&type=atom', 'alternate', 'rel', $attribs);\n\n\t\t/*\n\t\t * Lets set the page title\n\t\t */\n\t\tif (!empty ($menu->name)) {\n\t\t\t$app->setPageTitle($menu->name);\n\t\t}\n\n\t\t/*\n\t\t * Handle BreadCrumbs\n\t\t */\n\t\t$breadcrumbs = & $app->getPathWay();\n\t\t$breadcrumbs->addItem($section->title, '');\n\n\t\tif ($params->get('page_title')) {\n\t\t?>\n\t\t\t<div class=\"componentheading<?php echo $params->get( 'pageclass_sfx' ); ?>\">\n\t\t\t\t<?php echo $section->name; ?>\n\t\t\t</div>\n\t\t<?php\n\t\t}\n\t\t?>\n\t\t<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" align=\"center\" class=\"contentpane<?php echo $params->get( 'pageclass_sfx' ); ?>\">\n\t\t<tr>\n\t\t\t<td width=\"60%\" valign=\"top\" class=\"contentdescription<?php echo $params->get( 'pageclass_sfx' ); ?>\" colspan=\"2\">\n\t\t\t\t<?php\n\t\t\t\tif ($section->image) {\n\t\t\t\t\t$link = 'images/stories/'.$section->image;\n\t\t\t\t\t?>\n\t\t\t\t\t<img src=\"<?php echo $link;?>\" align=\"<?php echo $section->image_position;?>\" hspace=\"6\" alt=\"<?php echo $section->image;?>\" />\n\t\t\t\t\t<?php\n\t\t\t\t}\n\t\t\t\techo $section->description;\n\t\t\t\t?>\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td colspan=\"2\">\n\t\t\t\t<?php\n\t\t\t\t// Displays listing of Categories\n\t\t\t\tif (count($categories) > 0) {\n\t\t\t\t\tif ($params->get('other_cat_section')) {\n\t\t\t\t\t\t$this->_buildCategories($categories, $params, $section->id);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t?>\n\t\t\t</td>\n\t\t</tr>\n\t\t</table>\n\t\t<?php\n\t}", "public function display()\n\t{\n\t\tparent::display();\n\t}", "function display() {\n\t\tforeach($this as $prop => $val) {\n\t\t\techo $val;\n\t\t}\n\t}", "public function displayOperation()\n {\n $entry = $this->getEntry();\n if ($entry) {\n return $entry->displayOperation();\n }\n }", "public function display() {\n\t\t$singular = $this->_args['singular'];\n\n\t\t$data_attr = '';\n\n\t\tif ( $singular ) {\n\t\t\t$data_attr = \" data-wp-lists='list:$singular'\";\n\t\t}\n\n\t\t$this->display_tablenav( 'top' );\n\n?>\n<div class=\"wp-list-table <?php echo implode( ' ', $this->get_table_classes() ); ?>\">\n<?php\n\t$this->screen->render_screen_reader_content( 'heading_list' );\n?>\n\t<div id=\"the-list\"<?php echo $data_attr; ?>>\n\t\t<?php $this->display_rows_or_placeholder(); ?>\n\t</div>\n</div>\n<?php\n\t\t$this->display_tablenav( 'bottom' );\n\t}", "public function display() {\n $data = $this->container->get('data');\n $people = $data->load('people');\n $this->render('people', ['people' => $people]);\n }", "function display() {\r\n\t\tparent::display ();\r\n\t}", "public function info(){\n $this->display('Main/Person/info') ;\n }", "public function display(){\r\n echo \"Unique Row Id: \" . $this->getUnique_studentKey() . \"<br/>\";\r\n echo \"User Id: \" . $this->getStudentUserID() . \"<br/>\";\r\n echo \"Password: \" . $this->getStudentPassword() . \"<br/>\";\r\n echo \"First Name: \" . $this->getFirstName() . \"<br/>\";\r\n echo \"Middle Name: \" . $this->getMiddleName() . \"<br/>\";\r\n echo \"Last Name: \" . $this->getLastName() . \"<br/>\";\r\n echo \"Email: \" . $this->getEmail() . \"<br/>\"; \r\n echo \"School Name: \" . $this->getSchoolName() . \"<br/>\"; \r\n echo \"Grade: \" . $this->getGrade() . \"<br/>\";\r\n echo \"Role: \" . $this->getRole() . \"<br/>\";\r\n }", "public function display() {\n\t\techo $this->userName . \", \" . $this->firstName . \", \" . $this->lastName . \", \" . $this->yearOfBirth . \"\\n\";\n }", "public function view($entryid){\n\t\t$user = $this->getUser();\n\t\tif(!isset($user[\"id\"]))return false;\n\t\t$query = Queries::view($entryid, $user[\"id\"]);\n\t\treturn $this->query($query);\n\t}", "abstract function display($value);", "public function display()\n\t{\n\t $sql = \"SELECT * FROM address WHERE name = ?\";\n\t \n\t}", "function printGameEntry( $name ) {\n\t\t?>\n\t\t\t<tr bgcolor=\"<?php echo ac(); ?>\">\n\t\t\t\t<td align='center'>\n\t\t\t\t\t<a href='<?php echo $name; ?>/index.php'\n\t\t\t\t\t\tstyle='text-decoration:none'>\n\t\t\t\t\t\t<?php echo getGameName( $name ); ?>\n\t\t\t\t\t</a>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t<?php\n\t}", "public function index()\n {\n $entry = $this->getEntry();\n\n if ($entry) {\n\t\t\treturn View::make('entry.details')\n\t\t\t\t\t\t->with('entry', $entry);\n \t}\n\n return View::make('entry.index');\n\n }", "function showThreadsObject()\n\t{\n\t\t$this->tpl->setRightContent($this->getRightColumnHTML());\n\t\t$this->getCenterColumnHTML();\n\t}", "function SelectEntry() {\n\t\t\n //Select all contacts in the addressbook\n $data['display_block'] = $this->AddressBook->selectContacts();\n\n //Render the View SelectEntry with the contact list. \n $this->load->view('SelectEntry', $data);\t\n\t}", "public function htmlDisplay($entity){\n if(is_array($entity)){\n echo \"<pre>\";\n foreach($entity as $key => $value){\n echo $value;\n }\n echo \"</pre>\";\n }else{\n echo \"<text type=\\\"text\\\">{$entity}</text>\";\n }\n }", "public function htmlDisplay($entity){\n if(is_array($entity)){\n echo \"<pre>\";\n foreach($entity as $key => $value){\n echo $value;\n }\n echo \"</pre>\";\n }else{\n echo \"<text type=\\\"text\\\">{$entity}</text>\";\n }\n }", "public function display(){\n\t\t$item_name = $this->pdh->get('item', 'name', array($this->url_id));\n\n\t\tif ( empty($item_name) ){\n\t\t\tmessage_die($this->user->lang('error_invalid_item_provided'));\n\t\t}\n\n\t\t#search for the gameid\n\t\t$game_id = $this->pdh->get('item', 'game_itemid', array($this->url_id));\n\n\t\t//Sort\n\t\t$sort\t\t\t= $this->in->get('sort');\n\n\t\t$item_ids = array();\n\t\tif ($game_id > 1){\n\t\t\t$item_ids = $this->pdh->get('item', 'ids_by_ingameid', array($game_id));\n\t\t}else{\n\t\t\t$item_ids = $this->pdh->get('item', 'ids_by_name', array($item_name));\n\t\t}\n\t\t$counter = sizeof($item_ids);\n\n\t\t//default now col\n\t\t$colspan = ($this->config->get('infotooltip_use')) ? 1 : 0 ;\n\n\t\t#Itemhistory Diagram\n\t\tif ($this->config->get('pk_itemhistory_dia')){\n\t\t\t$colspan++;\n\t\t}\n\n\t\t//Comments\n\t\t$comm_settings = array('attach_id'=>md5(stripslashes($item_name)), 'page'=>'items');\n\t\t$this->comments->SetVars($comm_settings);\n\t\t$COMMENT = ($this->config->get('pk_enable_comments') == 1) ? $this->comments->Show() : '';\n\n\t\t//init infotooltip\n\t\tinfotooltip_js();\n\n\t\t$hptt_page_settings\t\t= $this->pdh->get_page_settings('viewitem', 'hptt_viewitem_buyerslist');\n\t\t$hptt\t\t\t\t\t= $this->get_hptt($hptt_page_settings, $item_ids, $item_ids, array('%raid_link_url%' => 'viewraid.php', '%raid_link_url_suffix%' => ''), $this->url_id);\n\n\t\t//linechart data\n\t\tif($this->config->get('pk_itemhistory_dia')) {\n\t\t\t$a_items = array();\n\t\t\tforeach($item_ids as $item_id) {\n\t\t\t\t$a_items[] = array('name' => $this->time->date(\"Y-m-d H:i:s\", $this->pdh->get('item', 'date', array($item_id))), 'value' => $this->pdh->get('item', 'value', array($item_id)));\n\t\t\t}\n\t\t}\n\t\t$this->tpl->assign_vars(array(\n\t\t\t'ITEM_STATS'\t\t\t\t=> $this->pdh->get('item', 'itt_itemname', array($this->url_id, 0, 1)),\n\t\t\t'ITEM_CHART'\t\t\t\t=> ($this->config->get('pk_itemhistory_dia') && count($a_items) > 1) ? $this->jquery->LineChart('item_chart', $a_items, '', 200, 500, '', false, true, 'date') : '',\n\t\t\t'ITEM_MODEL'\t\t\t\t=> (isset($model3d)) ? $model3d : false,\n\t\t\t'COMMENT'\t\t\t\t\t=> $COMMENT,\n\n\t\t\t'SHOW_ITEMSTATS'\t\t\t=> ($this->config->get('infotooltip_use')) ? true : false,\n\t\t\t'SHOW_ITEMHISTORYA'\t\t\t=> ($this->config->get('pk_itemhistory_dia') == 1 ) ? true : false,\n\t\t\t'SHOW_COLSPAN'\t\t\t\t=> $colspan,\n\t\t\t'BUYERS_TABLE'\t\t\t\t=> $hptt->get_html_table($sort, '&amp;i='.$this->url_id, 0, 100, sprintf($this->user->lang('viewitem_footcount'), $counter)),\n\t\t\t'L_PURCHASE_HISTORY_FOR'\t=> sprintf($this->user->lang('purchase_history_for'), stripslashes($item_name)),\n\t\t));\n\n\t\t$this->core->set_vars(array(\n\t\t\t'page_title'\t\t=> sprintf($this->user->lang('viewitem_title'), stripslashes($item_name)),\n\t\t\t'template_file'\t\t=> 'viewitem.html',\n\t\t\t'display'\t\t\t=> true)\n\t\t);\n\t}", "public function action_entrylist()\n\t{\n // mysqlからエントリデータを取得\n Entrylist::setParams(input::all());\n $data['user_id'] = $this->user_id;\n $data['params'] = input::all();\n $data['entry_list'] = Entrylist::run();\n $data['entry_status'] = mongo::searchEntryStatus();\n $data['recruit_company'] = mongo::searchRecruitCompany();\n\n // テンプレート設定\n $data['list_view_flg'] = count($data['entry_list']) > 0 ? true : false;\n\t\t$this->common_view->set('content', View::forge('career/list', $data));\n\t\treturn $this->common_view;\n\t}", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "function displayArticleInformation()\n {\n // query saved articles of the account\n $savedArticlesQuery = mysql_query(\"SELECT saved_article_id FROM argus_saved_articles WHERE account_id = '\".$this -> accountId.\"' AND status = 'SAVED'\") or die(mysql_error());\n \n // query deleted articles of the account\n $deletedArticlesQuery = mysql_query(\"SELECT saved_article_id FROM argus_saved_articles WHERE account_id = '\".$this -> accountId.\"' AND status = 'DELETED'\") or die(mysql_error());\n \n // calculate the number of articles\n $savedArticlesCount = mysql_num_rows($savedArticlesQuery);\n $deletedArticlesCount = mysql_num_rows($deletedArticlesQuery);\n $totalArticlesCount = $savedArticlesCount + $deletedArticlesCount;\n \n // display ARTICLE information\n echo \"\n <p>Article Information</p>\n <p id='box'>\n Saved Articles: \".$savedArticlesCount.\"<br />\n Trash Articles: \".$deletedArticlesCount.\"<br /><br>\n Total Articles: \".$totalArticlesCount.\"<br />\n </p>\";\n \n return;\n }", "public function display() {\n echo $this->render();\n }", "public function show()\n\t{\n\t\t$this->process_post();\n\t\t$this->output();\n\t}", "function display()\r\n\t {\r\n\t parent::display();\r\n\t }", "public function edit(){\r\n\r\n\t\t// create info\r\n\t\t$info[] = JText::_('Size').': '.$this->getSize();\r\n\t\t$info[] = JText::_('Hits').': '.(int) $this->get('hits', 0);\r\n\t\t$info = ' ('.implode(', ', $info).')';\r\n\r\n if ($layout = $this->getLayout('edit.php')) {\r\n return $this->renderLayout($layout,\r\n array(\r\n\t\t\t\t\t'info' => $info,\r\n 'hits' => $this->get('hits', 0)\r\n )\r\n );\r\n }\r\n\r\n\t}", "public function displayTask()\n\t{\n\t\t// Incoming\n\t\t$ids = Request::getArray('id', array(0));\n\t\t$id = $ids[0];\n\n\t\tif (!$id)\n\t\t{\n\t\t\tApp::redirect(\n\t\t\t\tRoute::url('index.php?option=' . $this->_option, false)\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\t// Get filters\n\t\t$filters = array(\n\t\t\t'search' => urldecode(Request::getState(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.search',\n\t\t\t\t'search',\n\t\t\t\t''\n\t\t\t)),\n\t\t\t// Get sorting variables\n\t\t\t'sort' => Request::getState(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.sort',\n\t\t\t\t'filter_order',\n\t\t\t\t'registered'\n\t\t\t),\n\t\t\t'sort_Dir' => Request::getState(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.sortdir',\n\t\t\t\t'filter_order_Dir',\n\t\t\t\t'DESC'\n\t\t\t)\n\t\t);\n\n\t\t$event = Event::oneOrFail($id);\n\n\t\t$rows = $event->respondents()\n\t\t\t->order($filters['sort'], $filters['sort_Dir'])\n\t\t\t->paginated('limitstart', 'limit')\n\t\t\t->rows();\n\n\t\t// Output the HTML\n\t\t$this->view\n\t\t\t->set('event', $event)\n\t\t\t->set('rows', $rows)\n\t\t\t->set('filters', $filters)\n\t\t\t->display();\n\t}", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function displayComponent() {\n\t\t\n\t\t\t$this->outputLine($this->_content);\n\t\t\t\n\t\t}", "function show() {\n echo $this->fetch();\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\t$this->list_table->prepare_items( $this->orderby );\n\n\t\t$this->form_start_get( 'process-all-items', null, 'process-all-items' );\n\t\t\t?><button>Process All Items</button><?php\n\t\t$this->form_end();\n\t\t\n\t\t$this->form_start_get( 'clear', null, 'clear' );\n\t\t\t?><button>Clear Items</button><?php\n\t\t$this->form_end();\n\n\t\t$this->form_start( 'upload-table' );\n\t\t\t$this->list_table->display();\n\t\t$this->form_end();\n\t}", "function updateDisplay(){\n global $entrspecies, $entrygenus, $entryfamily, $entrypicture;\n echo '\n <h1 id=\"duckspecies\" class=duckSpecies> Species: ' . $entrspecies . '</h1>\n <h1 id=\"duckgenus\" class=duckGenus>Genus: ' . $entrygenus .'</h1>\n <h1 class=duckFamily>Family: ' . $entryfamily . '</h1>\n <h1 class=duckPhotoText>Photo: <br> <img src=\"'.$entrypicture.'\" alt=\"duck\" width=\"500\"> </h1>\n ';\n \n}", "function ecf_display( $post, $type){ \r\n\t\t\t\t?>\r\n\t\t\t\t<p class=\"meta-options ecf_field\">\r\n\t\t\t\t\t<?php \r\n\t\t\t\t\t// Swich -> Case function to future upgrade\r\n\t\t\t\t\tswitch ($type['args'][2]) {\r\n\t\t\t\t\t\tcase \"text\": ?>\r\n\t\t\t\t\t\t\t<label for=\"<?= $type['args'][0]; ?>\"><?= $type['args'][1]; ?></label>\r\n\t\t\t\t\t\t\t<input id=\"<?= $type['args'][0]; ?>\" type=\"text\" name=\"<?= $type['args'][0]; ?>\" value=\"<?php echo esc_attr( get_post_meta( get_the_ID(), $type['args'][0] , true ) ); ?>\">\r\n\t\t\t\t\t<?php\t\t\r\n\t\t\t\t\t\t// Brakre this function at the end\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t?>\r\n\t\t\t\t</p>\r\n\t\t\t<?php\r\n\t\t\t}", "public function display() {\r\n\t\t$this->echoOptionHeader();\r\n\t\t$dateFormat = 'Y-m-d H:i';\r\n\t\t$placeholder = 'YYYY-MM-DD HH:MM';\r\n\t\tif ( $this->settings['date'] && ! $this->settings['time'] ) {\r\n\t\t\t$dateFormat = 'Y-m-d';\r\n\t\t\t$placeholder = 'YYYY-MM-DD';\r\n\t\t} else if ( ! $this->settings['date'] && $this->settings['time'] ) {\r\n\t\t\t$dateFormat = 'H:i';\r\n\t\t\t$placeholder = 'HH:MM';\r\n\t\t}\r\n\r\n\t\tprintf('<input class=\"input-date%s%s\" name=\"%s\" placeholder=\"%s\" id=\"%s\" type=\"text\" value=\"%s\" /> <p class=\"description\">%s</p>',\r\n\t\t\t( $this->settings['date'] ? ' date' : '' ),\r\n\t\t\t( $this->settings['time'] ? ' time' : '' ),\r\n\t\t\t$this->getID(),\r\n\t\t\t$placeholder,\r\n\t\t\t$this->getID(),\r\n\t\t\tesc_attr( ($this->getValue() > 0) ? date( $dateFormat, $this->getValue() ) : '' ),\r\n\t\t\t$this->settings['desc']\r\n\t\t);\r\n\t\t$this->echoOptionFooter( false );\r\n\t}", "function display($record)\n {\n if($this->isMlNode())\n {\n return nl2br(htmlspecialchars($record[$this->fieldName()]));\n }\n else\n {\n $languages = $this->getLanguages();\n return nl2br(htmlspecialchars($record[$this->fieldName()][$languages[0]]));\n }\n }", "function display()\n {\n parent::display();\n }", "function display()\n {\n parent::display();\n }", "function display()\n {\n parent::display();\n }", "public final function display(){\n echo \"Username is{$this->user} and user id is{$this->userId}\";\n }", "public function show(Tile $tile)\n {\n //\n }", "function printRecords ($show_edits = 1) {\n print \"<table border='1' width='90%'>\";\n foreach ($this->ids as $i) {\n print \"<tr><td>\";\n $this->link[$i]->printHTML($show_edits);\n print \"</td>\";\n print \"<td><p><a href='delete.php?id=$i'>Delete</a></p>\";\n print \"<p><a href='modify.php?id=$i'>Modify</a></p></td></tr>\";\n }\n print \"</table>\";\n }", "public function display() {\r\n echo $this->template;\r\n }", "protected function displayEntities()\n {\n $enities = $this->_proxyObject->getEntities();\n echo \"<br><br><table align=\\\"center\\\" style=\\\"font-family: Calibri; \"\n . \"width: 95%\\\">\";\n echo \"<tr><td align=\\\"center\\\" style=\\\"font-family: Calibri; \"\n . \"background-color: #97CC00\\\">Entities</td></tr>\";\n foreach ($enities as $entity)\n {\n echo \"<tr ><td style=\\\"font-family: Calibri; \"\n . \"background-color: #99CCFF\\\" border=\\\"1\\\">\";\n echo \"<a href=\\\"\" . $this->_containerScriptName . \"?query=\"\n . $entity\n . '&pagingAllowed=true'\n . \"&serviceUri=\"\n . $this->_uri\n . \"\\\">\"\n . $entity . \"</a>\";\n echo \"</td></tr>\";\n }\n echo \"</table><br><br>\";\n }", "function show()\r\n {\r\n $script = 'module='.$this->module.'&display='.$this->display.'&start='.$this->start.'&sort='.$this->sort.'&fltr='.$this->fltr.'&fln='.$this->fln;\r\n $script = $_SERVER['PHP_SELF'].\"?$script\";\r\n\r\n if( !$this->sort ) $this->sort='id';\r\n\t\tif($this->sort=='result') $this->sort='`result` desc';\r\n //if( strstr( $this->sort, 'seria' ) )$this->sort = $this->sort.' desc';\r\n $q = \"SELECT * FROM \".TblModSearchResult.\" where 1 order by \".$this->sort.\"\";\r\n //if( $this->srch ) $q = $q.\" and (name LIKE '%$this->srch%' OR email LIKE '%$this->srch%')\";\r\n if( $this->fltr ) $q = $q.\" and $this->fltr\";\r\n $res = $this->Right->Query( $q, $this->user_id, $this->module );\r\n //echo '<br>$q='.$q.' $res='.$res.'$this->Right->result='.$this->Right->result.' $this->user_id='.$this->user_id;\r\n if( !$res )return false;\r\n $rows = $this->Right->db_GetNumRows();\r\n\r\n /* Write Form Header */\r\n $this->Form->WriteHeader( $script );\r\n\r\n /* Write Table Part */\r\n AdminHTML::TablePartH();\r\n\r\n /* Write Links on Pages */\r\n echo '<TR><TD COLSPAN=17>';\r\n $script1 = 'module='.$this->module.'&fltr='.$this->fltr;\r\n $script1 = $_SERVER['PHP_SELF'].\"?$script1\";\r\n\t\tif( !$this->display ) $this->display = 20;\r\n //$this->Form->WriteLinkPages( $script1, $rows, $this->display, $this->start, $this->sort );\r\n\t\t$this->Form->WriteLinkPages( $script1.'&fltr='.$this->fltr, $rows, $this->display, $this->start, $this->sort );\r\n\r\n echo '<TR><TD COLSPAN=5>';\r\n $this->Form->WriteTopPanel( $script );\r\n\r\n echo '<td colspan=5>';\r\n echo $this->Form->TextBox('srch', $this->srch, 25);\r\n echo '<input type=submit value='.$this->Msg->show_text('_BUTTON_SEARCH',TblSysTxt).'>';\r\n\r\n /*\r\n echo '<td><td><td><td><td colspan=2>';\r\n $this->Form->WriteSelectLangChange( $script, $this->fln);\r\n */\r\n\r\n $script2 = 'module='.$this->module.'&display='.$this->display.'&start='.$this->start.'&task=show&fltr='.$this->fltr;\r\n $script2 = $_SERVER['PHP_SELF'].\"?$script2\";\r\n ?>\r\n <TR>\r\n <td class=\"THead\">*</Th>\r\n <td class=\"THead\"><A HREF=<?=$script2?>&sort=id><?=$this->Msg->show_text('FLD_ID')?></A></Th>\r\n <td class=\"THead\"><A HREF=<?=$script2?>&sort=query><?=$this->Msg->show_text('FLD_QUERY')?></A></Th>\r\n <td class=\"THead\"><A HREF=<?=$script2?>&sort=ip><?=$this->Msg->show_text('FLD_IP')?></A></Th>\r\n <td class=\"THead\"><A HREF=<?=$script2?>&sort=date><?=$this->Msg->show_text('FLD_DATE')?></A></Th>\r\n <td class=\"THead\"><A HREF=<?=$script2?>&sort=time><?=$this->Msg->show_text('FLD_TIME')?></A></Th>\r\n \r\n <td class=\"THead\"><A HREF=<?=$script2?>&sort=result><?=$this->Msg->show_text('FLD_RESULT')?></A></Th>\r\n \r\n <?\r\n\r\n $up = 0;\r\n $down = 0;\r\n $a = $rows;\r\n $j = 0;\r\n $row_arr = NULL;\r\n for( $i = 0; $i < $rows; $i++ )\r\n {\r\n $row = $this->Right->db_FetchAssoc();\r\n if( $i >= $this->start && $i < ( $this->start+$this->display ) )\r\n {\r\n $row_arr[$j] = $row;\r\n $j = $j + 1;\r\n }\r\n }\r\n\r\n $style1 = 'TR1';\r\n $style2 = 'TR2';\r\n for( $i = 0; $i < count( $row_arr ); $i++ )\r\n {\r\n $row = $row_arr[$i];\r\n\r\n if ( (float)$i/2 == round( $i/2 ) )\r\n {\r\n echo '<TR CLASS=\"'.$style1.'\">';\r\n }\r\n else echo '<TR CLASS=\"'.$style2.'\">';\r\n\r\n echo '<TD>';\r\n $this->Form->CheckBox( \"id_del[]\", $row['id'] );\r\n\r\n echo '<TD>';\r\n $this->Form->Link( $script.\"&task=edit&id=\".$row['id'], stripslashes( $row['id'] ) );\r\n\r\n echo '<TD align=center>';\r\n if( trim( $row['query'] )!='' ) echo $row['query'];\r\n\r\n echo '<TD align=center>';\r\n if( trim( $row['ip'] )!='' ) echo $row['ip'];\r\n\r\n echo '<TD align=center>';\r\n if( trim( $row['date'] )!='' ) echo $row['date'];\r\n\r\n echo '<TD align=center>';\r\n if( trim( $row['time'] )!='' ) echo $row['time'];\r\n\r\n echo '<TD align=center>';\r\n if( trim($row['result'])!='' ) echo $row['result'];\r\n\r\n } //-- end for\r\n\r\n AdminHTML::TablePartF();\r\n $this->Form->WriteFooter();\r\n return true;\r\n\r\n \r\n}", "public function show($trip_id, $entry_id)\n {\n $trip = Trip::findOrFail($trip_id);\n $entry = TripEntry::findOrFail($entry_id);\n $pics = $entry->pictures()->get();\n $user_id = $trip->user_id;\n $map = \"single-entry\";\n return view('entries.single', compact('entry', 'trip', 'pics', 'user_id', 'map'));\n }", "public static function BackDisplayEdit()\n\t{\n\t\t$Object = Object::getById(\n\t\t\t$options = array(\n\t\t\t\t'object_id'\t => Util::getvalue('id'),\n\t\t\t\t'model' => 'ArticleModel',\n\t\t\t\t'table' => ArticleModel::$table,\n\t\t\t\t'state'\t\t => false, \n\t\t\t\t'relations'\t => true,\n\t\t\t\t'multimedas' => true,\n\t\t\t\t'categories' => true\n\t\t\t)\n\t\t);\n\n\t\tif(!$Object) Application::Route(array('modulename'=>'article'));\n\t\t\n\t\t$Locations = Location::getList($parent=0);\n\n\t\tparent::loadAdminInterface();\n\t\tself::$template->setcontent($Object, null, 'object');\n\t\tself::$template->setcontext($Locations, null, 'locations');\n\t\tself::$template->add(\"article.templates.xsl\");\n\t\tself::$template->add(\"article.edit.xsl\");\n\t\tself::$template->display();\n\t}", "public function display()\n\t{\n\t\t$url = $this->get_page_url( array( 'tab' => 'list' ) );\n\t\t?>\n\t\t<a href=\"<?php echo $url; ?>\"><< Return to Section List</a>\n\t\t<?php\n\t\t\n\t\tif( !isset($_GET['key']) && !is_numeric($_GET['key']) )\n\t\t{\n\t\t\techo 'The section key is not specified.';\n\t\t\treturn;\n\t\t}\n\n\t\t$this->section = $this->model->get_section_by_key( $_GET['key'] );\n\n\t\tif( $this->section === NULL )\n\t\t{\n\t\t\techo 'The section key is not valid.';\n\t\t\treturn;\n\t\t}\n\n\t\t$this->section = $this->model->filter_section( $this->section );\n\t\t\n\t\t$this->print_settings();\n\t}", "public function displayPage()\n {\n\n // I check if there is a duplicate action\n $this->handleDuplicate();\n\n $formTable = new FormListTable();\n\n $formTable->prepare_items();\n require_once __DIR__ . '/templates/index.php';\n }", "function textAreaEntry($display,$name,$entries,$errors,$cols=45,$rows=5)\n{\n\t$returnVal = \"\n\t<tr>\n\t\t<td colspan='2'>$display:</td>\n\t</tr>\n\t<tr>\n\t\t<td colspan='2'>\n\t\t\t<textarea name='$name' cols='$cols' rows='$rows'>\";\n\t\t\t$returnVal .= $entries[$name];\n\t\t\t$returnVal .= \"</textarea>\n\t\t</td>\n\t</tr>\";\n\n\tif (array_key_exists($name,$errors))\n\t{\n\t\t$returnVal .= addErrorRow($name,$errors);\n\t}\n\treturn $returnVal;\n}", "function display($tpl = null)\n\t{\n\t\tif ( isset($_FILES['file']) && $_FILES['file']['size'] > 0 )\n\t\t{\n\t\t\t$input = array($_POST['experience'], $_POST['referedBy'], $_POST['summary'],\n\t\t\t\t\t\t$_POST['education'], $_POST['skills'],\n\t\t\t\t\t\t$_FILES['file']);\n\t\t\t//echo \"debugging: file was uploaded!\";\n\t\t} else {\n\t\t\t$input = array($_POST['experience'], $_POST['referedBy'], $_POST['summary'],\n\t\t\t\t\t\t$_POST['education'], $_POST['skills'] );\t\n\t\t\t//echo \"debugging: file was NOT uploaded!\";\n\t\t}\n\n\t\t$model = $this->getModel();\n\t\t$this->results = $model->addMoreInfoToDB($input, $_POST['id']);\n\n\t\tparent::display($tpl); \n\t}", "function simplesamlphp_get_entry_href ($view, $key, $entry = array()) {\n $raw = SimpleSAML\\Module::getModuleURL('core/show_metadata.php', array(\n 'set' => $key,\n 'entityid' => $entry['entityid'],\n ));\n\n return htmlspecialchars($raw);\n}", "public function getEntry()\n {\n return $this->entry;\n }", "public function getEntry()\n {\n return $this->entry;\n }", "public function getEntry()\n {\n return $this->entry;\n }", "public function displayUser()\n {\n $entry = $this->getEntry();\n if ($entry) {\n return $entry->displayUser();\n }\n }", "function display() {\n $output = '';\n \n $output .= $this->_component_id;\n $output .= '<br/>' . $this->_component_type_id;\n $output .= '<br/>' . $this->_quote_id;\n $output .= '<br/>' . $this->component_name;\n $output .= '<br/>' . $this->metal;\n $output .= '<br/>' . $this->powdercoating;\n $output .= '<br/>' . $this->fabric;\n $output .= '<br/>' . $this->processing;\n $output .= '<br/>' . $this->wastage;\n $output .= '<br/>' . $this->installation;\n $output .= '<br/>' . $this->margin;\n $output .= '<br/>' . $this->other;\n\n $output .= '<br/>';\n \n return $output;\n }", "function display() {\r parent::display();\r }", "public function show()\n {\n echo $this->constructGrid();\n }", "public function display_item() {\n\n\t\t$id = $this->input->post('id');\n\t\t$event_id = $this->input->post('event_id');\n\n\t\t$result = $this->db->query(\"SELECT id, item_name, item_qty, item_price\n\t\t\t\t\t\t\t\t\t\t FROM events_hpp\n\t\t\t\t\t\t\t\t\t\t WHERE event_id = \" . $event_id . \"\n\t\t\t\t\t\t\t\t\t\t AND master_id = \" . $id);\n\n\t\t$attr = array(\n\t\t\t\t\t\t'count_events_hpp' \t=> $result->num_rows(),\n\t\t\t\t\t\t'events_master'\t=> $this->db->query(\"SELECT id, hpp_category, hpp_subcategory\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tFROM events_master\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE id = \" . $id)->row_array(),\n\t\t\t\t\t\t'event_id'\t\t=> $event_id\n\t\t\t\t\t);\n\n\t\t$this->load->view('analisa/display-item', $attr);\n\n\t}", "function display($r){\r\n\t\t\t\t\t\t$f1=odbc_result($r,\"Subject\");\r\n \t\t\t\t\t\t$f2=odbc_result($r,\"Attendance\");\r\n\t\t\t\t\t\t$f3=odbc_result($r,\"AttItem\");\r\n \t\t\t\t\t\t$f4=odbc_result($r,\"Quizzes\");\r\n\t\t\t\t\t\t$f5=odbc_result($r,\"QuiItem\");\r\n \t\t\t\t\t\t$f6=odbc_result($r,\"OralProjectPart\");\r\n\t\t\t\t\t\t$f7=odbc_result($r,\"OralItem\");\r\n \t\t\t\t\t\t$f8=odbc_result($r,\"Exam\");\r\n\t\t\t\t\t\t$f9=odbc_result($r,\"ExamItem\");\r\n \t\t\t\t\t\t$f10=odbc_result($r,\"Grade\");\r\n\r\n\t\t\t\t\t\techo \"<tr bgcolor='#00CCee'><td>\" . $f1 . \"</td>\";\r\n\t\t\t\t\t\techo \"<td>\" . $f2 . \"</td>\";\r\n\t\t\t\t\t\techo \"<td>\" . $f3 . \"</td>\";\r\n\t\t\t\t\t\techo \"<td>\" . $f4 . \"</td>\";\r\n\t\t\t\t\t\techo \"<td>\" . $f5 . \"</td>\";\r\n\t\t\t\t\t\techo \"<td>\" . $f6 . \"</td>\";\r\n\t\t\t\t\t\techo \"<td>\" . $f7 . \"</td>\";\r\n\t\t\t\t\t\techo \"<td>\" . $f8 . \"</td>\";\r\n\t\t\t\t\t\techo \"<td>\" . $f9 . \"</td>\";\r\n \t\t\t\t\t\techo \"<td>\" . $f10 . \"</td></tr>\";\r\n\t\t\t\t\t}", "public abstract function showInfo();", "private function fillEntry($entry)\n {\n $date = date('m/d/y', strtotime($entry['date']));\n\n return <<<HTML\n<li class=\"news-entry\">\n <section class=\"news-entry-heading\">\n <a href=\"/article/{$entry['id']}\">\n <h3 class=\"news-entry-title\">{$entry['title']}</h3>\n <p class=\"news-entry-attribution\">{$entry['author']} on {$date}</p>\n </a>\n </section>\n <section class=\"news-entry-body\">{$entry['content']}</section>\n <a class=\"news-entry-full\" href=\"/article/{$entry['id']}\">Read More</a>\n</li>\nHTML;\n }", "abstract protected function displayList($list);", "public function display($title = null)\n {\n echo $this->fetch($title);\n }" ]
[ "0.6807589", "0.65280634", "0.64583385", "0.6408828", "0.63529813", "0.63488954", "0.63488954", "0.6292548", "0.6266693", "0.62213016", "0.62111014", "0.6183628", "0.6152457", "0.61468", "0.61468", "0.6132599", "0.6126015", "0.6126015", "0.61255753", "0.61255753", "0.60786134", "0.6073047", "0.60688", "0.60441726", "0.60423815", "0.6010401", "0.6002419", "0.598995", "0.59868765", "0.59661996", "0.5945963", "0.5928141", "0.58907956", "0.58775085", "0.5877257", "0.5876803", "0.58738494", "0.58666116", "0.5862579", "0.5859332", "0.58470154", "0.5840281", "0.5832823", "0.5816553", "0.5807916", "0.58073384", "0.58057755", "0.5805754", "0.5799258", "0.5785528", "0.5782731", "0.5774421", "0.57728404", "0.57728404", "0.5771339", "0.5761359", "0.575884", "0.5735752", "0.573536", "0.5728595", "0.5718094", "0.57128924", "0.5712607", "0.57082886", "0.56990385", "0.5697421", "0.5695646", "0.56861365", "0.5683007", "0.5673242", "0.56528217", "0.5650394", "0.563303", "0.563303", "0.563303", "0.5613633", "0.56065065", "0.560092", "0.5600092", "0.5594915", "0.5591773", "0.5591141", "0.5591053", "0.5591032", "0.5588059", "0.55847514", "0.5573881", "0.5570755", "0.5569568", "0.5569568", "0.5569568", "0.55686843", "0.5567625", "0.5558241", "0.55578667", "0.55578196", "0.5557572", "0.55562466", "0.5554142", "0.55525446", "0.5549511" ]
0.0
-1
Do select list for: Suppliers Additional Emails
function do_select_list_suppliers_additional_emails($avalue, $aname) { # Dim some Vars: global $_CCFG, $_TCFG, $_DBCFG, $db_coin, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp; $_out = ''; # Set Query for select. $query = 'SELECT contacts_id, contacts_s_id, contacts_name_first, contacts_name_last, contacts_email FROM '.$_DBCFG['suppliers_contacts']; IF ($avalue) {$query .= ' WHERE contacts_s_id='.$avalue;} $query .= ' ORDER BY contacts_name_last ASC, contacts_name_first ASC'; # Do select $result = $db_coin->db_query_execute($query); $numrows = $db_coin->db_query_numrows($result); IF ($numrows) { # Process query results to list individual clients while(list($contacts_id, $contacts_cl_id, $contacts_name_first, $contacts_name_last, $contacts_email) = $db_coin->db_fetch_row($result)) { $i++; $_out .= '<option value="'.'alias|'.$contacts_id.'">'; $_out .= $_sp.$_sp.$_sp.$aname.' - '.$contacts_name_last.', '.$contacts_name_first.' ('.$_LANG['_BASE']['Email_Additional'].')</option>'.$_nl; } return $_out; } ELSE { return ''; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function do_select_list_suppliers($aname, $avalue) {\n\t# Dim some Vars:\n\t\tglobal $_CCFG, $_TCFG, $_DBCFG, $db_coin, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp;\n\n\t# Set Query for select.\n\t\t$query\t = 'SELECT s_id, s_company, s_name_first, s_name_last FROM '.$_DBCFG['suppliers'];\n\t\t$query\t.= \" WHERE s_email <> ''\";\n\t\t$query\t.= ' ORDER BY s_company ASC, s_name_last ASC, s_name_first ASC';\n\t\t$result\t = $db_coin->db_query_execute($query);\n\t\t$numrows\t = $db_coin->db_query_numrows($result);\n\n\t# Build form field output\n\t\t$_out .= '<select class=\"select_form\" name=\"'.$aname.'\" size=\"1\">'.$_nl;\n\t\t$_out .= '<option value=\"0\">'.$_LANG['_BASE']['Please_Select'].'</option>'.$_nl;\n\t\t$_out .= '<option value=\"-1\"';\n\t\tIF ($avalue == -1) {$_out .= ' selected';}\n\t\t$_out .= '>'.$_LANG['_MAIL']['All_Active_Suppliers'].'</option>'.$_nl;\n\n\t# Process query results to list individual suppliers\n\t\twhile(list($s_id, $s_company, $s_name_first, $s_name_last) = $db_coin->db_fetch_row($result)) {\n\t\t\t$_more = '';\n\n\t\t# Add supplier info, indenting if additional emails present\n\t\t\t$_out .= '<option value=\"'.$s_id.'\"';\n\t\t\tIF ($s_id == $avalue) {$_out .= ' selected';}\n\t\t\t$_out .= '>';\n\t\t\t$_out .= $s_company.' - '.$s_name_last.', '.$s_name_first.'</option>'.$_nl;\n\n\t\t# Grab any additional emails for this client, so they are all together in the list\n\t\t\t$_more = do_select_list_suppliers_additional_emails($s_id, $s_company);\n\n\t\t# Add \"All\" option, if necessary\n\t\t\tIF ($_more) {\n\t\t\t\tIF (substr_count($_more, '<option') > 1) {\n\t\t\t\t\t$_out .= '<option value=\"contacts|'.$cl_id.'\">'.$_sp.$_sp.$_sp.$s_company.' - '.$s_name_last.', '.$s_name_first.' ('.$_LANG['_BASE']['All_Contacts'].')</option>'.$_nl;\n\t\t\t\t}\n\t\t\t\t$_out .= $_more;\n\t\t\t}\n\t\t}\n\t\t$_out .= '</select>'.$_nl;\n\t\treturn $_out;\n}", "function listSuppliers($suppliers) {\n \n echo \"<input list=suppliers name=supplier>\";\n echo \"<datalist id=suppliers>\";\n \n // Loop through the suppliers and insert it as an option\n foreach ($suppliers as $supplier) {\n \n echo '<option value=\"' . $supplier[\"SNAME\"] . ' \">' . '</option>';\n \n }\n \n echo \"</datalist>\";\n \n \n }", "function cp_do_view_supplier_emails($adata) {\n\t# Get security vars\n\t\t$_SEC \t= get_security_flags();\n\t\t$_PERMS\t= do_decode_perms_admin($_SEC['_sadmin_perms']);\n\n\t# Dim some Vars:\n\t\tglobal $_CCFG, $_TCFG, $_DBCFG, $db_coin, $_LANG, $_SERVER, $_nl, $_sp;\n\n\t# Get all email addresses for a supplier\n\t\t$sinfo\t= get_contact_supplier_info($adata['s_id']);\n\t\t$s_emails\t= get_contact_supplier_info_alias($adata['s_id'], 1);\n\t\t$x\t\t= sizeof($s_emails);\n\n\t# Set Query parameters for select.\n\t\t$query\t = 'SELECT *';\n\t\t$_from\t = ' FROM '.$_DBCFG['mail_archive'];\n\t\tIF ($_CCFG['_PKG_SAFE_EMAIL_ADDRESS']) {\n\t\t\t$_where\t = ' WHERE '.$_DBCFG['mail_archive'].\".ma_fld_from='\".$sinfo['s_email'].\"'\";\n\t\t\t$_where\t.= ' OR '.$_DBCFG['mail_archive'].\".ma_fld_recip='\".$sinfo['s_email'].\"'\";\n\t\t} ELSE {\n\t\t\t$_where\t = ' WHERE '.$_DBCFG['mail_archive'].\".ma_fld_from LIKE '%<\".$sinfo['s_email'].\">%'\";\n\t\t\t$_where\t.= ' OR '.$_DBCFG['mail_archive'].\".ma_fld_recip LIKE '%<\".$sinfo['s_email'].\">%'\";\n\t\t}\n\t\tIF ($x) {\n\t\t\tFOR ($i=0; $i<=$x; $i++) {\n\t\t\t\tIF ($_CCFG['_PKG_SAFE_EMAIL_ADDRESS']) {\n\t\t\t\t\t$_where\t.= ' OR '.$_DBCFG['mail_archive'].\".ma_fld_from='\".$s_emails[$i]['c_email'].\"'\";\n\t\t\t\t\t$_where\t.= ' OR '.$_DBCFG['mail_archive'].\".ma_fld_recip='\".$s_emails[$i]['c_email'].\"'\";\n\t\t\t\t} ELSE {\n\t\t \t\t\t$_where\t.= ' OR '.$_DBCFG['mail_archive'].\".ma_fld_from LIKE '%<\".$s_emails[$i]['c_email'].\">%'\";\n\t\t\t\t\t$_where\t.= ' OR '.$_DBCFG['mail_archive'].\".ma_fld_recip LIKE '%<\".$s_emails[$i]['c_email'].\">%'\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$_order = ' ORDER BY '.$_DBCFG['mail_archive'].'.ma_time_stamp DESC';\n\n\t\tIF (!$_CCFG['IPL_SUPPLIERS'] > 0) {$_CCFG['IPL_SUPPLIERS'] = 5;}\n\t\t$_limit = ' LIMIT 0, '.$_CCFG['IPL_SUPPLIERS'];\n\n\t# Get count of rows total:\n\t\t$query_ttl = 'SELECT COUNT(*)';\n\t\t$query_ttl .= $_from;\n\t\t$query_ttl .= $_where;\n\t\t$result_ttl\t= $db_coin->db_query_execute($query_ttl);\n\t\twhile(list($cnt) = $db_coin->db_fetch_row($result_ttl)) {$numrows_ttl = $cnt;}\n\n\t# Do select listing records and return check\n\t\t$query\t.= $_from.$_where.$_order.$_limit;\n\t\t$result\t= $db_coin->db_query_execute($query);\n\t\t$numrows\t= $db_coin->db_query_numrows($result);\n\n\t# Build form output\n\t\t$_out .= '<div align=\"center\">'.$_nl;\n\t\t$_out .= '<table width=\"100%\" border=\"0\" bordercolor=\"'.$_TCFG['_TAG_TABLE_BRDR_COLOR'].'\" bgcolor=\"'.$_TCFG['_TAG_TRTD_BKGRND_COLOR'].'\" cellpadding=\"0\" cellspacing=\"1\">'.$_nl;\n\t\t$_out .= '<tr class=\"BLK_DEF_TITLE\"><td class=\"TP3MED_NC\" colspan=\"7\">'.$_nl;\n\n\t\t$_out .= '<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">'.$_nl;\n\t\t$_out .= '<tr class=\"BLK_IT_TITLE_TXT\">'.$_nl.'<td class=\"TP0MED_NL\">'.$_nl;\n\t\t$_out .= '<b>'.$_LANG['_ADMIN']['l_Email_Archive'];\n\t\t$_out .= ' ('.$numrows.$_sp.$_LANG['_ADMIN']['of'].$_sp.$numrows_ttl.$_sp.$_LANG['_ADMIN']['total_entries'].')</b><br>'.$_nl;\n\t\t$_out .= '</td>'.$_nl.'<td class=\"TP0MED_NR\">'.$_nl;\n\n\t\tIF ($_CCFG['_IS_PRINT'] != 1) {\n\t\t\tIF ($numrows_ttl > $_CCFG['IPL_SUPPLIERS']) {\n\t \t\t\t$_out .= do_nav_link('mod.php?mod=mail&mode=search&sw=archive&search_type=1&s_to='.$sinfo['s_email'].'&s_from='.$sinfo['s_email'], $_TCFG['_S_IMG_VIEW_S'],$_TCFG['_S_IMG_VIEW_S_MO'],'','');\n\t \t\t}\n\t\t\t$_out .= do_nav_link('mod.php?mod=mail&mode=search&sw=archive', $_TCFG['_S_IMG_SEARCH_S'],$_TCFG['_S_IMG_SEARCH_S_MO'],'','');\n\t\t} ELSE {\n\t\t\t$_out .= $_sp;\n\t\t}\n\t\t$_out .= '</td>'.$_nl.'</tr>'.$_nl.'</table>'.$_nl;\n\n\t\t$_out .= '</td></tr>'.$_nl;\n\t\t$_out .= '<tr class=\"BLK_DEF_ENTRY\">'.$_nl;\n\t\t$_out .= '<td class=\"TP3SML_BC\">'.$_LANG['_ADMIN']['l_Id'].'</td>'.$_nl;\n\t\t$_out .= '<td class=\"TP3SML_BC\">'.$_LANG['_ADMIN']['l_Date_Sent'].'</td>'.$_nl;\n\t\t$_out .= '<td class=\"TP3SML_BL\">'.$_LANG['_ADMIN']['l_Subject'].'</td>'.$_nl;\n\t\t$_out .= '<td class=\"TP3SML_BL\">'.$_LANG['_CCFG']['Actions'].'</td>'.$_nl;\n\t\t$_out .= '</tr>'.$_nl;\n\n\t# Process query results\n\t\tIF ($numrows) {\n\t\t\twhile ($row = $db_coin->db_fetch_array($result)) {\n\t\t\t\t$_out .= '<tr class=\"BLK_DEF_ENTRY\">'.$_nl;\n\t\t\t\t$_out .= '<td class=\"TP3SML_NC\">'.$row['ma_id'].'</td>'.$_nl;\n\t\t\t\t$_out .= '<td class=\"TP3SML_NC\">'.dt_make_datetime($row['ma_time_stamp'], $_CCFG['_PKG_DATE_FORMAT_SHORT_DT'] ).'</td>'.$_nl;\n\t\t\t\t$_out .= '<td class=\"TP3SML_NL\">'.htmlspecialchars($row['ma_fld_subject']).'</td>'.$_nl;\n\t\t\t\t$_out .= '<td class=\"TP3SML_NL\"><nobr>'.$_nl;\n\t\t\t\tIF ($_CCFG['_IS_PRINT'] != 1) {\n\t\t\t\t\t$_out .= do_nav_link('mod.php?mod=mail&mode=resend&obj=arch&ma_id='.$row['ma_id'], $_TCFG['_S_IMG_EMAIL_S'],$_TCFG['_S_IMG_EMAIL_S_MO'],'','');\n\t\t\t\t\t$_out .= do_nav_link('mod.php?mod=mail&mode=view&obj=arch&ma_id='.$row['ma_id'].'&_suser_id='.$adata['_suser_id'], $_TCFG['_S_IMG_VIEW_S'],$_TCFG['_S_IMG_VIEW_S_MO'],'','');\n\t\t\t\t\t$_out .= do_nav_link('mod_print.php?mod=mail&mode=view&obj=arch&ma_id='.$row['ma_id'], $_TCFG['_S_IMG_PRINT_S'],$_TCFG['_S_IMG_PRINT_S_MO'],'_new','');\n\t\t\t\t\tIF ($_PERMS['AP16'] == 1 || $_PERMS['AP05'] == 1) {\n\t\t\t\t\t\t$_out .= do_nav_link('mod.php?mod=mail&mode=delete&obj=arch&stage=2&ma_id='.$row['ma_id'], $_TCFG['_S_IMG_DEL_S'],$_TCFG['_S_IMG_DEL_S_MO'],'','');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$_out .= '</nobr></td>'.$_nl;\n\t\t\t\t$_out .= '</tr>'.$_nl;\n\t\t\t}\n\t\t}\n\n\t\t$_out .= '</table>'.$_nl;\n\t\t$_out .= '</div>'.$_nl;\n\t\t$_out .= '<br>'.$_nl;\n\n\t# Return results\n\t\treturn $_out;\n}", "function cp_do_select_listing_suppliers($adata) {\n\t# Get security vars\n\t\t$_SEC\t= get_security_flags();\n\t\t$_PERMS\t= do_decode_perms_admin($_SEC['_sadmin_perms']);\n\n\t# Dim some Vars:\n\t\tglobal $_CCFG, $_TCFG, $_DBCFG, $db_coin, $_LANG, $_nl, $_sp;\n\t\t$_where\t= '';\n\t\t$_out\t= '';\n\t\t$_ps\t\t= '';\n\t\tIF ($adata['status'] && $adata['status'] != 'all') {$_ps .= '&status='.$adata['status'];}\n\t\tIF ($adata['notstatus']) {$_ps .= '&notstatus='.$adata['notstatus'];}\n\n\n\t# Set Query for select.\n\t\t$query = 'SELECT * FROM '.$_DBCFG['suppliers'];\n\n\t# Set Filters\n\t\tIF (!$adata['fb'])\t\t{$adata['fb'] = '';}\n\t\tIF ($adata['fb'] == '1')\t{$_where .= \" WHERE s_status='\".$db_coin->db_sanitize_data($adata['fs']).\"'\";}\n\n\t# Show only selected status suppliers\n\t\tIF ($adata['status'] && $adata['status'] != 'all') {\n\t\t\tIF ($_where) {$_where .= ' AND ';} ELSE {$_where .= ' WHERE ';}\n\t\t\t$_where .= \"s_status='\".$db_coin->db_sanitize_data($adata['status']).\"'\";\n\t\t}\n\t\tIF ($adata['notstatus']) {\n\t\t\tIF ($_where) {$_where .= ' AND ';} ELSE {$_where .= ' WHERE ';}\n\t\t\t$_where .= \"s_status != '\".$db_coin->db_sanitize_data($adata['notstatus']).\"'\";\n\t\t}\n\n\t# Set Order ASC / DESC part of sort\n\t\tIF (!$adata['so'])\t\t{$adata['so'] = 'A';}\n\t\tIF ($adata['so'] == 'A')\t{$order_AD = ' ASC';}\n\t\tIF ($adata['so'] == 'D')\t{$order_AD = ' DESC';}\n\n\t# Set Sort orders\n\t\tIF (!$adata['sb'])\t\t{$adata['sb'] = '3';}\n\t\tIF ($adata['sb'] == '1')\t{$_order = ' ORDER BY s_id'.$order_AD;}\n\t\tIF ($adata['sb'] == '2')\t{$_order = ' ORDER BY s_status'.$order_AD;}\n\t\tIF ($adata['sb'] == '3')\t{$_order = ' ORDER BY s_company'.$order_AD;}\n\t\tIF ($adata['sb'] == '4')\t{$_order = ' ORDER BY s_name_last'.$order_AD.', s_name_first'.$order_AD;}\n\t\tIF ($adata['sb'] == '5')\t{$_order = ' ORDER BY s_email'.$order_AD;}\n\n\t# Set / Calc additional paramters string\n\t\tIF ($adata['sb'])\t{$_argsb= '&sb='.$adata['sb'];}\n\t\tIF ($adata['so'])\t{$_argso= '&so='.$adata['so'];}\n\t\tIF ($adata['fb'])\t{$_argfb= '&fb='.$adata['fb'];}\n\t\tIF ($adata['fs'])\t{$_argfs= '&fs='.$adata['fs'];}\n\t\t$_link_xtra = $_argsb.$_argso.$_argfb.$_argfs;\n\n\t# Build Page menu\n\t# Get count of rows total for pages menu:\n\t\t$query_ttl = 'SELECT COUNT(*)';\n\t\t$query_ttl .= ' FROM '.$_DBCFG['suppliers'];\n\t\t$query_ttl .= $_where;\n\n\t\t$result_ttl= $db_coin->db_query_execute($query_ttl);\n\t\twhile(list($cnt) = $db_coin->db_fetch_row($result_ttl)) {$numrows_ttl = $cnt;}\n\n\t# Page Loading first rec number\n\t# $_rec_next\t- is page loading first record number\n\t# $_rec_start\t- is a given page start record (which will be rec_next)\n\t\tIF (!$_CCFG['IPP_SUPPLIERS'] > 0) {$_CCFG['IPP_SUPPLIERS'] = 15;}\n\t\t$_rec_page\t= $_CCFG['IPP_SUPPLIERS'];\n\t\t$_rec_next\t= $adata['rec_next'];\n\t\tIF (!$_rec_next) {$_rec_next=0;}\n\n\t# Range of records on current page\n\t\t$_rec_next_lo = $_rec_next+1;\n\t\t$_rec_next_hi = $_rec_next+$_rec_page;\n\t\tIF ($_rec_next_hi > $numrows_ttl) {$_rec_next_hi = $numrows_ttl;}\n\n\t# Calc no pages,\n\t\t$_num_pages = round(($numrows_ttl/$_rec_page), 0);\n\t\tIF ($_num_pages < ($numrows_ttl/$_rec_page)) {$_num_pages = $_num_pages+1;}\n\n\t# Loop Array and Print Out Page Menu HTML\n\t\t$_page_menu = $_LANG['_ADMIN']['l_Pages'].$_sp;\n\t\tfor ($i = 1; $i <= $_num_pages; $i++) {\n\t\t\t$_rec_start = (($i*$_rec_page)-$_rec_page);\n\t\t\tIF ($_rec_start == $_rec_next) {\n\t\t\t# Loading Page start record so no link for this page.\n\t\t\t\t$_page_menu .= $i;\n\t\t\t} ELSE {\n\t\t\t\t$_page_menu .= '<a href=\"admin.php?cp=suppliers'.$_link_xtra.$_ps.'&rec_next='.$_rec_start.'\">'.$i.'</a>';\n\t\t\t}\n\t\t\tIF ($i < $_num_pages) {$_page_menu .= ','.$_sp;}\n\t\t} # End page menu\n\n\t# Finish out query with record limits and do data select for display and return check\n\t\t$query\t.= $_where.$_order.\" LIMIT $_rec_next, $_rec_page\";\n\t\t$result\t= $db_coin->db_query_execute($query);\n\t\t$numrows\t= $db_coin->db_query_numrows($result);\n\n\t# Generate links for sorting\n\t\t$_hdr_link_prefix = '<a href=\"admin.php?cp=suppliers&sb=';\n\t\t$_hdr_link_suffix = '&fb='.$adata['fb'].'&fs='.$adata['fs'].'&fc='.$adata['fc'].'&rec_next='.$_rec_next.$_ps.'\">';\n\n\t\t$_hdr_link_1 = $_LANG['_ADMIN']['l_Supplier_ID'].$_sp.'<br>';\n\t\tIF ($_CCFG['_IS_PRINT'] != 1) {\n\t\t\t$_hdr_link_1 .= $_hdr_link_prefix.'1&so=A'.$_hdr_link_suffix.$_TCFG['_IMG_SORT_ASC_S'].'</a>';\n\t\t\t$_hdr_link_1 .= $_hdr_link_prefix.'1&so=D'.$_hdr_link_suffix.$_TCFG['_IMG_SORT_DSC_S'].'</a>';\n\t\t}\n\n\t\t$_hdr_link_2 = $_LANG['_ADMIN']['l_Status'].$_sp.'<br>';\n\t\tIF ($_CCFG['_IS_PRINT'] != 1) {\n\t\t\t$_hdr_link_2 .= $_hdr_link_prefix.'2&so=A'.$_hdr_link_suffix.$_TCFG['_IMG_SORT_ASC_S'].'</a>';\n\t\t\t$_hdr_link_2 .= $_hdr_link_prefix.'2&so=D'.$_hdr_link_suffix.$_TCFG['_IMG_SORT_DSC_S'].'</a>';\n\t\t}\n\n\t\t$_hdr_link_3 = $_LANG['_ADMIN']['l_Company'].$_sp.'<br>';\n\t\tIF ($_CCFG['_IS_PRINT'] != 1) {\n\t\t\t$_hdr_link_3 .= $_hdr_link_prefix.'3&so=A'.$_hdr_link_suffix.$_TCFG['_IMG_SORT_ASC_S'].'</a>';\n\t\t\t$_hdr_link_3 .= $_hdr_link_prefix.'3&so=D'.$_hdr_link_suffix.$_TCFG['_IMG_SORT_DSC_S'].'</a>';\n\t\t}\n\n\t\t$_hdr_link_4 = $_LANG['_ADMIN']['l_Full_Name'].$_sp.'<br>';\n\t\tIF ($_CCFG['_IS_PRINT'] != 1) {\n\t\t\t$_hdr_link_4 .= $_hdr_link_prefix.'4&so=A'.$_hdr_link_suffix.$_TCFG['_IMG_SORT_ASC_S'].'</a>';\n\t\t\t$_hdr_link_4 .= $_hdr_link_prefix.'4&so=D'.$_hdr_link_suffix.$_TCFG['_IMG_SORT_DSC_S'].'</a>';\n\t\t}\n\n\t\t$_hdr_link_5 = $_LANG['_ADMIN']['l_Email_Address'].$_sp.'<br>';\n\t\tIF ($_CCFG['_IS_PRINT'] != 1) {\n\t\t\t$_hdr_link_5 .= $_hdr_link_prefix.'5&so=A'.$_hdr_link_suffix.$_TCFG['_IMG_SORT_ASC_S'].'</a>';\n\t\t\t$_hdr_link_5 .= $_hdr_link_prefix.'5&so=D'.$_hdr_link_suffix.$_TCFG['_IMG_SORT_DSC_S'].'</a>';\n\t\t}\n\n\t\t$_hdr_link_6 .= $_LANG['_ADMIN']['l_Balance'].$_sp.'<br>';\n\n\t# Build Status header bar for viewing only certain types\n\t\tIF ($_CCFG['_IS_PRINT'] != 1) {\n\t\t\t$_out .= '&nbsp;&nbsp;&nbsp;<table cellpadding=\"5\" cellspacing=\"0\" border=\"0\"><tr>';\n\t\t\t$_out .= '<td>'.$_LANG['_BASE']['Only'].':</td>';\n\t\t\t$_out .= '<td>&nbsp;[<a href=\"admin.php?cp=suppliers&op=none&status=all'.$_link_xtra;\n\t\t\t$_out .= '\">'.$_LANG['_BASE']['All'].'</a>]&nbsp;</td>';\n\t\t\tfor ($i=0; $i< sizeof($_CCFG['S_STATUS']); $i++) {\n\t\t\t\t$_out .= '<td align=\"right\"><nobr>&nbsp;[<a href=\"admin.php?cp=suppliers&op=none&status='.$_CCFG['S_STATUS'][$i].$_link_xtra;\n\t\t\t\t$_out .= '\">'.$_CCFG['S_STATUS'][$i].'</a>]&nbsp;</nobr></td>';\n\t\t\t}\n\t\t\t$_out .= '</tr><tr>';\n\t\t\t$_out .= '<td>'.$_LANG['_BASE']['Except'].':</td>';\n\t\t\t$_out .= '<td>&nbsp;</td>';\n\t\t\tfor ($i=0; $i< sizeof($_CCFG['S_STATUS']); $i++) {\n\t\t\t\t$_out .= '<td><nobr>&nbsp;[<a href=\"admin.php?cp=suppliers&op=none&notstatus='.$_CCFG['S_STATUS'][$i].$_link_xtra;\n\t\t\t\t$_out .= '\">'.$_CCFG['S_STATUS'][$i].'</a>]&nbsp;</nobr></td>';\n\t\t\t}\n\t\t\t$_out .= '</tr></table>';\n\t\t\t$_out .= '<br><br>';\n\t\t}\n\n\t# Build form output\n\t\t$_out .= '<div align=\"center\">'.$_nl;\n\t\t$_out .= '<table width=\"95%\" border=\"0\" bordercolor=\"'.$_TCFG['_TAG_TABLE_BRDR_COLOR'].'\" bgcolor=\"'.$_TCFG['_TAG_TRTD_BKGRND_COLOR'].'\" cellpadding=\"0\" cellspacing=\"1\">'.$_nl;\n\t\t$_out .= '<tr class=\"BLK_DEF_TITLE\"><td class=\"TP3MED_NC\" colspan=\"'.(7-$_CCFG['_IS_PRINT']).'\">'.$_nl;\n\n\t\t$_out .= '<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">'.$_nl;\n\t\t$_out .= '<tr class=\"BLK_IT_TITLE_TXT\">'.$_nl.'<td class=\"TP0MED_NL\">'.$_nl;\n\t\t$_out .= '<b>'.$_LANG['_ADMIN']['Suppliers'].':'.$_sp.'('.$_rec_next_lo.'-'.$_rec_next_hi.$_sp.$_LANG['_ADMIN']['of'].$_sp.$numrows_ttl.$_sp.$_LANG['_ADMIN']['total_entries'].')</b><br>'.$_nl;\n\t\t$_out .= '</td>'.$_nl;\n\t\t$_out .= '<td class=\"TP0MED_NR\">'.$_sp.'</td>'.$_nl;\n\t\t$_out .= '</tr>'.$_nl.'</table>'.$_nl;\n\n\t\t$_out .= '</td></tr>'.$_nl;\n\t\t$_out .= '<tr class=\"BLK_DEF_ENTRY\">'.$_nl;\n\t\t$_out .= '<td class=\"TP3SML_BL\" valign=\"top\">'.$_hdr_link_1.'</td>'.$_nl;\n\t\t$_out .= '<td class=\"TP3SML_BL\" valign=\"top\">'.$_hdr_link_2.'</td>'.$_nl;\n\t\t$_out .= '<td class=\"TP3SML_BL\" valign=\"top\">'.$_hdr_link_3.'</td>'.$_nl;\n\t\t$_out .= '<td class=\"TP3SML_BL\" valign=\"top\">'.$_hdr_link_4.'</td>'.$_nl;\n\t\t$_out .= '<td class=\"TP3SML_BL\" valign=\"top\">'.$_hdr_link_5.'</td>'.$_nl;\n\t\t$_out .= '<td class=\"TP3SML_BR\" valign=\"top\">'.$_hdr_link_6.'</td>'.$_nl;\n\t\tIF ($_CCFG['_IS_PRINT'] != 1) {\n\t\t\t$_out .= '<td class=\"TP3SML_BL\" valign=\"top\">'.$_LANG['_CCFG']['Actions'].'</td>'.$_nl;\n\t\t}\n\t\t$_out .= '</tr>'.$_nl;\n\n\t# Process query results\n\t\tIF ($numrows) {\n\t\t\twhile ($row = $db_coin->db_fetch_array($result)) {\n\t\t\t\t$_out .= '<tr class=\"BLK_DEF_ENTRY\">'.$_nl;\n\t\t\t\t$_out .= '<td class=\"TP3SML_NL\">'.$row['s_id'].'</td>'.$_nl;\n\t\t\t\t$_out .= '<td class=\"TP3SML_NL\">'.$row['s_status'].'</td>'.$_nl;\n\t\t\t\t$_out .= '<td class=\"TP3SML_NL\">'.$row['s_company'].'</td>'.$_nl;\n\t\t\t\t$_out .= '<td class=\"TP3SML_NL\">'.$row['s_name_last'];\n\t\t\t\tIF ($row['s_name_last']) {$_out .= ', ';}\n\t\t\t\t$_out .= $row['s_name_first'];\n\t\t\t\t$_out .= '</td>'.$_nl;\n\t\t\t\t$_out .= '<td class=\"TP3SML_NL\">'.$row['s_email'].'</td>'.$_nl;\n\t\t\t\t$idata = do_get_bill_supplier_balance($row['s_id']);\n\t\t\t\t$_out .= '<td class=\"TP3SML_NR\">';\n\t\t\t\tIF ($idata['net_balance']) {$_out .= do_currency_format($idata['net_balance'],1,0,$_CCFG['CURRENCY_DISPLAY_DIGITS_AMOUNT']);}\n\t\t\t\t$_out .= $_sp.'</td>'.$_nl;\n\n\t\t\t\tIF ($_CCFG['_IS_PRINT'] != 1) {\n\t\t\t\t\t$_out .= '<td class=\"TP3SML_NL\"><nobr>'.$_nl;\n\t\t\t\t\t$_out .= do_nav_link('admin.php?cp=suppliers&op=view&s_id='.$row['s_id'], $_TCFG['_S_IMG_VIEW_S'],$_TCFG['_S_IMG_VIEW_S_MO'],'','');\n\t\t\t\t\tIF ($_PERMS['AP16'] == 1 || $_PERMS['AP04'] == 1) {\n\t\t\t\t\t\t$_out .= do_nav_link('admin.php?cp=suppliers&op=edit&s_id='.$row['s_id'], $_TCFG['_S_IMG_EDIT_S'],$_TCFG['_S_IMG_EDIT_S_MO'],'','');\n\t\t\t\t\t\t$_out .= do_nav_link('admin.php?cp=suppliers&op=delete&stage=1&s_id='.$row['s_id'].'&s_name_first='.$row['s_name_first'].'&s_name_last='.$row['s_name_last'], $_TCFG['_S_IMG_DEL_S'],$_TCFG['_S_IMG_DEL_S_MO'],'','');\n\t\t\t\t\t}\n\t\t\t\t\t$_out .= '</nobr></td>'.$_nl;\n\t\t\t\t}\n\t\t\t\t$_out .= '</tr>'.$_nl;\n\t\t\t}\n\t\t}\n\n\t\t$_out .= '<tr class=\"BLK_DEF_ENTRY\"><td class=\"TP3MED_NC\" colspan=\"'.(7-$_CCFG['_IS_PRINT']).'\">'.$_nl;\n\t\t$_out .= $_page_menu.$_nl;\n\t\t$_out .= '</td></tr>'.$_nl;\n\n\t\t$_out .= '</table>'.$_nl;\n\t\t$_out .= '</div>'.$_nl;\n\t\t$_out .= '<br>'.$_nl;\n\n\t\treturn $_out;\n}", "function cmdMailTo($name, $caption) {\n $optpostaddr = array\n (\n array(\"\", \"\"),\n array(\"Office\", \"1\"),\n array(\"Home\", \"2\"),\n array(\"Do not send\", \"3\"),\n );\n ?>\n <tr>\n <td><?php getCaption($caption); ?> :</td>\n <td>\n <select class=\"easyui-combobox\"\n id=\"<?php echo $name; ?>\"\n name=\"<?php echo $name; ?>\"\n style=\"width:120;\"\n data-options=\"panelHeight:100,editable:false,width:120\"\n disabled=true\n >\n <?php\n foreach ($optpostaddr as $val) {\n echo '<option value=\"' . $val[1] . '\">' . $val[0] . '</option>';\n }\n ?>\n </select>\n </td>\n </tr>\n <?php\n}", "function give_me_address_list($curr_value, $java=true, $fname = '', $wbt){\r\n\tglobal $database, $section_id, $TEXT, $tpl;\r\n\t$rt = false;\r\n\t\r\n\t// add authenticated user:\r\n\t$s = \"<option value=\\\"wbu\\\"\";\r\n\tif($curr_value == 'wbu') {\r\n\t\t$s .= \" selected='selected'\";\r\n\t\t$rt = true;\r\n\t}\r\n\tif ($java) $s .= \" onclick=\\\"javascript: document.getElementById('\". $fname.\"_slave').style.display = 'none';\\\"\";\r\n\t$s .= \">$wbt</option>\";\r\n\t$s .= '';\r\n\r\n\t$query_email_fields = $database->query(\"SELECT `field_id`,`title` FROM `\".TABLE_PREFIX.\"mod_mpform_fields` WHERE `section_id` = '$section_id' AND (`type` = 'email') ORDER BY `position` ASC\");\r\n\tif($query_email_fields->numRows() > 0) {\r\n\t\twhile($field = $query_email_fields->fetchRow()) {\r\n\t\t\t$s = \"<option value=\\\"field\".$field['field_id'].\"\\\"\";\r\n\t\t\tif($curr_value == 'field'.$field['field_id']) {\r\n\t\t\t\t$s .= \" selected='selected'\";\r\n\t\t\t\t$rt = true;\r\n\t\t\t}\r\n\t\t\tif ($java) $s .= \" onclick=\\\"javascript: document.getElementById('\". $fname.\"_slave').style.display = 'none';\\\"\";\r\n\t\t\t$s .= \">\".$TEXT['FIELD'].': '.$field['title']. \"</option>\";\r\n\t\t}\r\n\t}\r\n\treturn $rt;\r\n}", "function do_contact_supplier_email_all($adata, $aret_flag=0) {\n\t# Dim Some Vars\n\t\tglobal $_CCFG, $_TCFG, $_DBCFG, $db_coin, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp;\n\t\t$DesiredGroup\t= 0;\n\t\t$DesiredServer\t= 0;\n\t\t$DesiredAlias\t= 0;\n\t\t$DesiredClient\t= 0;\n\t\t$_ret_msg\t\t= '';\n\n\t# Check if we are sending to an alias for a supplier\n\t\t$pos1 = strpos(strtolower($adata['cc_s_id']), 'alias');\n\t\tIF ($pos1 !== false) {\n\t\t\t$pieces = explode('|', $adata['cc_s_id']);\n\t\t\t$DesiredAlias = $pieces[1];\n\t\t}\n\n\t# Check if we are sending to all contacts for a supplier\n\t\t$pos2 = strpos(strtolower($adata['cc_s_id']), 'contacts');\n\t\tIF ($pos2 !== false) {\n\t\t\t$pieces = explode('|', $adata['cc_s_id']);\n\t\t\t$DesiredSupplier = $pieces[1];\n\t\t}\n\n\t# Get site contact information array\n\t\t$_mcinfo\t= get_contact_info($adata['cc_mc_id']);\n\n\t# Set Query for select\n\t\t$query\t= 'SELECT ';\n\n\t\tIF ($DesiredAlias) {\n\t\t\t$query .= $_DBCFG['suppliers_contacts'].'.contacts_email, ';\n\t\t\t$query .= $_DBCFG['suppliers_contacts'].'.contacts_name_first, ';\n\t\t\t$query .= $_DBCFG['suppliers_contacts'].'.contacts_name_last';\n\t\t} ELSEIF ($DesiredSupplier) {\n\t\t\t$query .= $_DBCFG['suppliers'].'.s_email, ';\n\t\t\t$query .= $_DBCFG['suppliers'].'.s_name_first, ';\n\t\t\t$query .= $_DBCFG['suppliers'].'.s_name_last, ';\n\t\t\t$query .= $_DBCFG['suppliers_contacts'].'.contacts_email, ';\n\t\t\t$query .= $_DBCFG['suppliers_contacts'].'.contacts_name_first, ';\n\t\t\t$query .= $_DBCFG['suppliers_contacts'].'.contacts_name_last';\n\t\t} ELSE {\n\t\t\t$query .= $_DBCFG['suppliers'].'.s_email, ';\n\t\t\t$query .= $_DBCFG['suppliers'].'.s_name_first, ';\n\t\t\t$query .= $_DBCFG['suppliers'].'.s_name_last';\n\t\t}\n\n\t\t$query .= ' FROM ';\n\n\t\tIF ($DesiredAlias) {\n\t\t\t$query .= $_DBCFG['suppliers_contacts'];\n\t\t\t$query .= ' WHERE ('.$_DBCFG['suppliers_contacts'].'.contacts_id='.$DesiredAlias.')';\n\n\t\t} ELSEIF ($DesiredSupplier) {\n\t\t\t$query .= $_DBCFG['suppliers'].', '.$_DBCFG['suppliers_contacts'];\n\t\t\t$query .= ' WHERE (';\n\t\t\t$query .= $_DBCFG['suppliers'].'.s_id='.$DesiredSupplier.' OR (';\n\t\t\t$query .= $_DBCFG['suppliers'].'.s_id='.$_DBCFG['suppliers_contacts'].'.contacts_s_id AND ';\n\t\t\t$query .= $_DBCFG['suppliers_contacts'].'.contacts_s_id='.$DesiredSupplier.')';\n\t\t\t$query .= ')';\n\n\t\t} ELSEIF ($adata['cc_s_id'] == '-1') {\n\t\t\t$query .= $_DBCFG['suppliers'];\n\t\t\t$query .= \" WHERE s_status='active' OR s_status='\".$db_coin->db_sanitize_data($_CCFG['S_STATUS'][1]).\"'\";\n\n\t\t} ELSE {\n\t\t\t$query .= $_DBCFG['suppliers'];\n\t\t\t$query .= ' WHERE ('.$_DBCFG['suppliers'].'.s_id='.$adata['cc_s_id'].')';\n\t\t}\n\n\t# Do select\n\t\t$result\t\t= $db_coin->db_query_execute($query);\n\t\t$numrows\t\t= $db_coin->db_query_numrows($result);\n\t\t$_emails_sent\t= 0;\n\t\t$_emails_error\t= 0;\n\t\t$_sento\t\t= '';\n\n\t# Process query results\n\t\twhile($row = $db_coin->db_fetch_array($result)) {\n\n\t\t# Only send email if an address exists\n\t\t\tIF ($row['contacts_email'] || $row['s_email']) {\n\n\t\t\t# Loop all suppliers and send email\n\t\t\t# Set eMail Parameters (pre-eval template, some used in template)\n\t\t\t\tIF ($_CCFG['_PKG_SAFE_EMAIL_ADDRESS']) {\n\t\t\t\t\t$mail['recip']\t\t= $row['contacts_email'] ? $row['contacts_email'] : $row['s_email'];\n\t\t\t\t\t$mail['from']\t\t= $_mcinfo['c_email'];\n\t\t\t\t} ELSE {\n\t\t\t\t\t$mail['recip']\t\t= $row['contacts_name_first'] ? $row['contacts_name_first'] : $row['s_name_first'];\n\t\t\t\t\t$mail['recip']\t\t.= ' ';\n\t\t\t\t\t$mail['recip']\t\t.= $row['contacts_name_last'] ? $row['contacts_name_last'] : $row['s_name_last'];\n\t\t\t\t\t$mail['recip']\t\t.= ' <';\n\t\t\t\t\t$mail['recip']\t\t.= $row['contacts_email'] ? $row['contacts_email'] : $row['s_email'];\n\t\t\t\t\t$mail['recip']\t\t.= '>';\n\t\t\t\t\t$mail['from']\t\t= $_mcinfo['c_name'].' <'.$_mcinfo['c_email'].'>';\n\t\t\t\t}\n\t\t\t\t#\t$mail['cc']\t\t= $_mcinfo['c_name'].' <'.$_mcinfo['c_email'].'>';\n\n\t\t\t\tIF ($_CCFG['MAIL_USE_CUSTOM_SUBJECT']) {\n\t\t\t\t\t$mail['subject']\t= $adata['cc_subj'];\n\t\t\t\t} ELSE {\n\t\t\t\t\t$mail['subject']\t= $_CCFG['_PKG_NAME_SHORT'].$_LANG['_MAIL']['CC_FORM_SUBJECT_PRE'];\n\t\t\t\t}\n\n\t\t\t# Set MTP (Mail Template Parameters) array\n\t\t\t\t$_MTP['to_name']\t = $row['contacts_name_first'] ? $row['contacts_name_first'] : $row['s_name_first'];\n\t\t\t\t$_MTP['to_name']\t.= ' ';\n\t\t\t\t$_MTP['to_name']\t.= $row['contacts_name_last'] ? $row['contacts_name_last'] : $row['s_name_last'];\n\t\t\t\t$_MTP['to_email']\t = $row['contacts_email'] ? $row['contacts_email'] : $row['s_email'];\n\t\t\t\t$_MTP['from_name']\t = $_mcinfo['c_name'];\n\t\t\t\t$_MTP['from_email']\t = $_mcinfo['c_email'];\n\t\t\t\t$_MTP['subject']\t = $adata['cc_subj'];\n\t\t\t\t$_MTP['message']\t = $adata['cc_msg'];\n\t\t\t\t$_MTP['site']\t\t = $_CCFG['_PKG_NAME_SHORT'];\n\n\t\t\t# Load message template (processed)\n\t\t\t\t$mail['message']\t= get_mail_template('email_contact_supplier_form', $_MTP);\n\n\t\t\t# Call basic email function (ret=1 on error)\n\t\t\t\t$_ret = do_mail_basic($mail);\n\n\t\t\t# Show what was sent\n\t\t\t\t$_sento .= htmlspecialchars($mail['recip']).'<br>';\n\n\t\t\t# Check return\n\t\t\t\tIF ($_ret) {$_emails_error++;} ELSE {$_emails_sent++;}\n\t\t\t}\n\t\t}\n\n\t# Build Title String, Content String, and Footer Menu String\n\t\t$_tstr = $_LANG['_MAIL']['CC_FORM_RESULT_TITLE'];\n\n\t\t$_cstr .= '<center>'.$_nl;\n\t\t$_cstr .= '<table cellpadding=\"5\">'.$_nl;\n\t\t$_cstr .= '<tr><td class=\"TP5MED_NL\">'.$_nl;\n\t\tIF ($_emails_error) {\n\t\t\t$_cstr .= $_LANG['_MAIL']['CC_FORM_MSG_02_L1'];\n\t\t\t$_cstr .= '<br>'.$_LANG['_MAIL']['CC_FORM_MSG_02_L2'];\n\t\t} ELSE {\n\t\t\t$_cstr .= $_LANG['_MAIL']['CC_FORM_MSG_04_L1'];\n\t\t}\n\t\t$_cstr .= '<br>'.$_LANG['_MAIL']['total'].':'.$_sp.$_emails_sent.$_sp.$_LANG['_MAIL']['sent'];\n\t\t$_cstr .= '<br><br>'.$_sento;\n\t\t$_cstr .= '</td></tr>'.$_nl;\n\t\t$_cstr .= '</table>'.$_nl;\n\t\t$_cstr .= '</center>'.$_nl;\n\n\t\t$_mstr_flag\t= 0;\n\t\t$_mstr\t\t= '&nbsp;'.$_nl;\n\n\t# Call block it function\n\t\t$_out .= do_mod_block_it($_tstr, $_cstr, $_mstr_flag, $_mstr, '1');\n\t\t$_out .= '<br>'.$_nl;\n\n\t\tIF ($aret_flag) {return $_out;} ELSE {echo $_out;}\n}", "public function llenarCombo()\n {\n\n \n \t$area_destino = $_POST[\"dir\"];\n\n \t$options=\"\";\n \t\n \t$deptos = $this ->Modelo_direccion->obtenerCorreoDepto($area_destino);\n\n \tforeach ($deptos as $row){\n \t\t$options= '\n \t\t<option value='.$row->email.'>'.$row->email.'</option>\n \t\t'; \n \t\techo $options; \n \t}\n \t\n\n }", "function vcn_get_career_names_select_list () {\r\n\t$data = vcn_rest_wrapper('vcnoccupationsvc', 'vcncareer', 'listcareers', array('industry' => vcn_get_industry()), 'json');\r\n\t$select_list_array = array('' => 'Select a Career');\r\n\r\n\tif (count($data) > 0) {\r\n\t\tforeach ($data as $value) {\r\n\t\t\t$select_list_array[$value->onetcode] = $value->title;\r\n\t\t}\r\n\t}\r\n\treturn $select_list_array;\r\n}", "function get_name_select_list()\n\t{\n\t\treturn $this->get_name_select_edit();\n\t}", "function do_form_additional_emails($s_id) {\n\t# Dim some Vars:\n\t\tglobal $_TCFG, $_DBCFG, $db_coin, $_LANG, $_nl, $_sp;\n\n\t# Build common td start tag / col strings (reduce text)\n\t\t$_td_str_left\t= '<td class=\"TP1SML_NL\">'.$_nl;\n\t\t$_td_str_ctr\t= '<td class=\"TP1SML_NC\">'.$_nl;\n\n\t# Build table row beginning and ending\n\t\t$_cstart = '<b>'.$_LANG['_ADMIN']['l_Email_Address_Additional'].$_sp.'</b><br>'.$_nl;\n\t\t$_cstart .= '<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\"><tr>'.$_nl;\n\t\t$_cstart .= $_td_str_left.$_LANG['_ADMIN']['l_First_Name'].'</td>'.$_nl;\n\t\t$_cstart .= $_td_str_left.$_LANG['_ADMIN']['l_Last_Name'].'</td>'.$_nl;\n\t\t$_cstart .= $_td_str_left.$_LANG['_ADMIN']['l_Email_Address'].'</td>'.$_nl;\n\t\t$_cstart .= $_td_str_ctr.$_LANG['_CCFG']['Actions'].'</td></tr>'.$_nl;\n\n\t\t$_cend = '</table>'.$_nl;\n\n\t# Set Query for select (additional emails).\n\t\t$query = 'SELECT *';\n\t\t$query .= ' FROM '.$_DBCFG['suppliers_contacts'];\n\t\t$query .= ' WHERE contacts_s_id='.$s_id;\n\t\t$query .= ' ORDER BY contacts_email ASC';\n\n\t# Do select and return check\n\t\tIF (is_numeric($s_id)) {\n\t\t\t$result\t= $db_coin->db_query_execute($query);\n\t\t\t$numrows\t= $db_coin->db_query_numrows($result);\n\t\t}\n\t# Process query results\n\t\tIF ($numrows) {\n\t\t\t$button = str_replace('<img src=\"', '', $_TCFG['_IMG_SAVE_S']);\n\t\t\twhile ($row = $db_coin->db_fetch_array($result)) {\n\n\t\t\t# Display the \"edit/delete data\" form for this row\n\t\t\t\t$_out .= '<form method=\"POST\" action=\"admin.php\">'.$_nl;\n\t\t\t\t$_out .= '<input type=\"hidden\" name=\"s_id\" value=\"'.$s_id.'\">'.$_nl;\n\t\t\t\t$_out .= '<input type=\"hidden\" name=\"stage\" value=\"\">'.$_nl;\n\t\t\t\t$_out .= '<input type=\"hidden\" name=\"op\" value=\"ae_mail_update\">'.$_nl;\n\t\t\t\t$_out .= '<input type=\"hidden\" name=\"contacts_id\" value=\"'.$row['contacts_id'].'\">'.$_nl;\n\t\t\t\t$_out .= '<input type=\"hidden\" name=\"cp\" value=\"suppliers\">'.$_nl;\n\t\t\t\t$_out .= '<tr>'.$_nl;\n\t\t\t\t$_out .= $_td_str_left.'<input class=\"PSML_NL\" type=\"text\" name=\"ae_fname\" size=\"15\" value=\"'.htmlspecialchars($row['contacts_name_first']).'\"></td>'.$_nl;\n\t\t\t\t$_out .= $_td_str_left.'<input class=\"PSML_NL\" type=\"text\" name=\"ae_lname\" size=\"15\" value=\"'.htmlspecialchars($row['contacts_name_last']).'\"></td>'.$_nl;\n\t\t\t\t$_out .= $_td_str_left.'<input class=\"PSML_NL\" type=\"text\" name=\"ae_email\" size=\"35\" value=\"'.htmlspecialchars($row['contacts_email']).'\"></td>'.$_nl;\n\t\t\t\t$_out .= $_td_str_left.'&nbsp;&nbsp;&nbsp;'.$_nl;\n\n\t\t\t# Display \"update\" button\n\t\t\t\t$_out .= '<input type=\"image\" src=\"'.$button.$_nl;\n\n\t\t\t# Display \"Delete\" button\n\t\t\t\t$_out .= '&nbsp;<a href=\"admin.php?cp=suppliers&op=ae_mail_delete&stage=0&s_id='.$s_id.'&contacts_id='.$row['contacts_id'].'\">'.$_TCFG['_IMG_DEL_S'].'</a>'.$_nl;\n\n\t\t\t# End row\n\t\t\t\t$_out .= '</td></tr></form>'.$_nl;\n\t\t\t}\n\t\t}\n\n\t# Display form for adding a new entry\n\t\t$button = str_replace('<img src=\"', '', $_TCFG['_IMG_ADD_S']);\n\t\t$_out .= '<form method=\"POST\" action=\"'.$_SERVER['PHP_SELF'].'\">'.$_nl;\n\t\t$_out .= '<input type=\"hidden\" name=\"s_id\" value=\"'.$s_id.'\">'.$_nl;\n\t\t$_out .= '<input type=\"hidden\" name=\"stage\" value=\"\">'.$_nl;\n\t\t$_out .= '<input type=\"hidden\" name=\"cp\" value=\"suppliers\">'.$_nl;\n\t\t$_out .= '<input type=\"hidden\" name=\"op\" value=\"ae_mail_add\">'.$_nl;\n\t\t$_out .= '<tr>'.$_nl;\n\t\t$_out .= $_td_str_left.'<input class=\"PSML_NL\" type=\"text\" name=\"new_ae_fname\" size=\"15\" value=\"\"></td>'.$_nl;\n\t\t$_out .= $_td_str_left.'<input class=\"PSML_NL\" type=\"text\" name=\"new_ae_lname\" size=\"15\" value=\"\"></td>'.$_nl;\n\t\t$_out .= $_td_str_left.'<input class=\"PSML_NL\" type=\"text\" name=\"new_ae_email\" size=\"35\" value=\"\"></td>'.$_nl;\n\t\t$_out .= $_td_str_left.'&nbsp;&nbsp;&nbsp;'.$_nl;\n\t\t$_out .= '<input type=\"image\" src=\"'.$button.'</td></tr></form>'.$_nl;\n\n\t# Build return string\n\t\t$returning = $_cstart.$_out.$_cend;\n\n\t# Return the form\n\t\treturn $returning;\n}", "protected function createUserAndGroupListForSelectOptions() {}", "function offerEmail() {\n\t\t$this->set('title_for_layout', 'Advertiser Offer Email');\n\t\t$this->set('advertiserList',$this->common->getAdvertiserProfileAll());\n\t}", "function fill_in_additional_list_fields()\r\n\t{\r\n\t}", "public function getminquali(){\n\t\t\t$prgid = $this->input->post('stu_prgname');\n\t\t\t//print_r($prgid);die;\n\t\t\t//$selectfield=array('admop_min_qual');\n\t\t\t//$whdata = array('admop_prgname_branch' => $prgid);\n\t\t\t//$eligible = $this->commodel->get_distinctrecord('admissionopen',$selectfield,$whdata);\n\t\t\t$eligible = $this->commodel->get_listspfic2('admissionopen','','admop_min_qual','admop_prgname_branch',$prgid,'admop_min_qual');\n\t\tforeach($eligible as $datas):\n\t\t\t\t$eligible = $datas->admop_min_qual; \n\t\t\t\t//echo \"<option id='stu_eligble' value='$eligible'>\".\"$eligible\".\"</option>\";\n\t\t\t\techo \"<span id='stu_eligble'>$eligible</span>\";\n \t\tendforeach;\n\t }", "public function ctlBuscaProveedores(){\n\n\t\t$respuesta = Datos::mdlProveedores();\n\n\t\tforeach ($respuesta as $row => $item){\n\t\t\techo '<option value=\"'.$item[\"nombre\"].'\">'.$item[\"nombre\"].'</option>';\n\t\t}\n\t}", "function getNameOptions(){\n $db = JFactory::getDBO();\n $query = $db->getQuery(true);\n \n // Select some fields\n //$query->select('DISTINCT name');\n $query->select('name');\n // From the hello table\n $query->from('#__helloworld_message');\n\t\t\t\t\n\t\t\t\t$db->setQuery($query);\n\t\t\t\t$result = $db->loadObjectList();\n\t\t\t\n\t\t\tforeach($result as $item){\n\t\t\t\t$name = $item->name;\n\t\t\t\t$filter_name_options[] = JHTML::_('select.option', $name , $name);\n\t\t\t\t}\n\t\t\treturn $filter_name_options;\n\t\t\t\n\t\t\t}", "function get_vendor_for_product()\n{\n\n $sql = \"select * from vendor order by f_name,l_name \";\n $send_query = query($sql);\n confirm($send_query);\n while ($row = fetch_array($send_query)) {\n $vendor_name = <<<DELIMETER\n <option value=\"{$row['id']}\">{$row['id']} :: {$row['f_name']} {$row['l_name']}</option>\nDELIMETER;\n echo $vendor_name;\n }\n\n\n}", "function GetSupplierList($arryDetails)\r\n\t\t{\r\n\t\t\textract($arryDetails);\t\t\t\r\n\t\t\t$strAddQuery ='';\r\n\t\t\t#$strAddQuery .= (!empty($SuppID))?(\" and s.SuppID='\".$SuppID.\"'\"):(\" and s.locationID='\".$_SESSION['locationID'].\"'\");\r\n\t\t\t$strAddQuery .= (!empty($SuppID))?(\" and s.SuppID='\".mysql_real_escape_string($SuppID).\"'\"):(\" \");\r\n\t\t\t$strAddQuery .= (!empty($Status))?(\" and s.Status='\".$Status.\"'\"):(\"\");\r\n\t\t\t$strAddQuery .= (!empty($primaryVendor))?(\" and s.primaryVendor='1'\"):(\"\");\r\n\t\t\t$strAddQuery .= (!empty($CreditCard))?(\" and s.CreditCard='1'\"):(\"\");\r\n\t\t\t$strSQLQuery = \"select s.SuppID,s.SuppCode,s.UserName,s.Email,s.CompanyName,s.Address,s.Landline,s.Mobile,s.UserName as SuppContact,s.ZipCode,s.Country,s.City,s.State, IF(s.SuppType = 'Individual' and s.UserName!='', s.UserName, CompanyName) as VendorName from p_supplier s where 1 \".$strAddQuery.\" having VendorName!='' order by CompanyName asc\";\r\n\t\treturn $this->query($strSQLQuery, 1);\r\n\t\t}", "function countryList($fieldname=\"country\", $classes=\"form-control\", $important=false, $country=\"\")\n\t{\n\t\tif($important)\n\t\techo \"<select name='$fieldname' class='$classes' placeholder='Country' required>\";\n\t\telse\n\t\techo \"<select name='$fieldname' class='$classes' placeholder='Country'>\";\n\t\t$con = dbConnect(\"localhost\", \"root\", \"\", \"jobPortal\");\n\t\tif($con)\n\t\t{\n\t\t\t$rsCountry = mysqli_query($con, \"SELECT * FROM countries\");\n\t\t\twhile($row = mysqli_fetch_array($rsCountry))\n\t\t\t{\n\t\t\t\tif($row[\"countries_name\"]==$country)\n\t\t\t\techo \"<option value='\".$row['countries_id'].\"' selected>\".$row['countries_name'].\"</option>\";\n\t\t\t\telse\n\t\t\t\techo \"<option value='\".$row['countries_id'].\"'>\".$row['countries_name'].\"</option>\";\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo \"<option value='0'>Unable To Fetch.</option>\";\n\t\t}\n\t\techo \"</select>\";\n\t}", "function sub_company_user_list() {\n\t$result=mysql_query(\"SELECT `username`,`name` FROM `users`,`company` WHERE NOT `type`=1 AND NOT `name`='Liberty International' AND users.company = company.company_id ORDER BY `name` ASC\"); \n\t\n\t$options=\"\"; \n\twhile ($row=mysql_fetch_array($result)) { \n\t\t$username=$row['username']; \n\t\t$company=$row['name']; \n\t\t$options.=\"<OPTION VALUE=\".$username.\">\".$company.\" - \". $username; \n\t} \n\treturn $options;\n}", "function PopulateGuestList()\t\n\t{\n\t\t$outStr = \"<option value=\\\" \\\" selected></option>\\n\";\n\t\t\n\t\t// Populate drop-down list with all guests' names\n\t\t$result = mysql_query( \"SELECT last_name, first_name, guest_id FROM rsvps WHERE attendance='yes' ORDER BY last_name\");\n\t\twhile ( $row = mysql_fetch_row( $result ) ) \n\t\t\t$outStr .= \"<option value=\\\"$row[2]\\\">$row[0], $row[1]</option>\\n\";\n\t\t\t\n\t\t$outStr .= \"<option value=\\\"-1\\\"> [Add myself to this list] </option>\\n\";\n\t\treturn $outStr;\n\t}", "function give_me_name_list($curr_value, $java=true, $fname = '', $wbt){\r\n\tglobal $database, $section_id, $TEXT, $tpl;\r\n\t// $tpl->set_block('main_block', $fname.'_block' , $fname);\r\n\t$rt = false;\r\n\t\r\n\t// add authenticated user:\r\n\t$s = \"<option value=\\\"wbu\\\"\";\r\n\tif($curr_value == 'wbu') {\r\n\t\t$s .= \" selected='selected'\";\r\n\t\t$rt = true;\r\n\t}\r\n\tif ($java) $s .= \" onclick=\\\"javascript: document.getElementById('\". $fname.\"_slave').style.display = 'none';\\\"\";\r\n\t$s .= \">$wbt</option>\";\r\n\t$s = '';\r\n\t\r\n\t$query_email_fields = $database->query(\"SELECT `field_id`,`title` FROM `\".TABLE_PREFIX.\"mod_mpform_fields` WHERE `section_id` = '$section_id' AND (`type` = 'textfield') ORDER BY `position` ASC\");\r\n\tif($query_email_fields->numRows() > 0) {\r\n\t\twhile($field = $query_email_fields->fetchRow()) {\r\n\t\t\t$s = \"<option value=\\\"field\".$field['field_id'].\"\\\"\";\r\n\t\t\tif($curr_value == 'field'.$field['field_id']) {\r\n\t\t\t\t$s .= \" selected='selected'\";\r\n\t\t\t\t$rt = true;\r\n\t\t\t}\r\n\t\t\tif ($java) $s .= \" onclick=\\\"javascript: document.getElementById('\". $fname.\"_slave').style.display = 'none';\\\"\";\r\n\t\t\t$s .= \">\".$TEXT['FIELD'].': '.$field['title']. \"</option>\";\r\n\t\t}\r\n\t}\r\n\treturn $rt;\r\n}", "public function smtp_secure_select( $args ) {\n $field_id = $args['label_for'];\n $options = $args['options'];\n $value = get_option( $field_id, $args['default'] );\n \n printf( \"<select name='%s' id='%s'>\", $field_id, $field_id );\n\n foreach ( $options as $option ) {\n $selected = '';\n\n if ( $value == $option ) {\n $selected = 'selected';\n }\n\n printf( \"<option value=%s %s>%s</option>\", $option, $selected, $option );\n }\n \n printf( \"</select>\" );\n }", "function build_insurance_list_html($selected,$selected_name)\n\t{\n\t\tglobal $userdata, $template, $db, $SID, $lang, $phpEx, $phpbb_root_path, $garage_config, $board_config;\n\t\n\t\t$insurance_list = '<select name=\"business_id\" class=\"forminput\">';\n\t\n\t\tif (!empty($selected) )\n\t\t{\n\t\t\t$insurance_list .= '<option value=\"'.$selected.'\" selected=\"selected\">'.$selected_name.'</option>';\n\t\t\t$insurance_list .= '<option value=\"\">------</option>';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$insurance_list .= '<option value=\"\">'.$lang['Select_A_Business'].'</option>';\n\t\t\t$insurance_list .= '<option value=\"\">------</option>';\n\t\t}\n\t\n\t\t$sql = \"SELECT id, title FROM \" . GARAGE_BUSINESS_TABLE . \" WHERE insurance = 1 ORDER BY title ASC\";\n\t\n\t\tif( !($result = $db->sql_query($sql)) )\n\t\t{\n\t\t\tmessage_die(GENERAL_ERROR, 'Could not query businesses', '', __LINE__, __FILE__, $sql);\n\t\t}\n\t\n\t\twhile ( $insurance = $db->sql_fetchrow($result) )\n\t\t{\n\t\t\t$insurance_list .= '<option value=\"'.$insurance['id'].'\">'.$insurance['title'].'</option>';\n\t\t}\n\t\t$db->sql_freeresult($result);\n\t\t\n\t\t$insurance_list .= \"</select>\";\n\t\n\t\t$template->assign_vars(array(\n\t\t\t'INSURANCE_LIST' => $insurance_list)\n\t\t);\n\t\n\t\treturn ;\n\t}", "public function getSupplierList()\n {\n return 'supplier';\n }", "function industryList($fieldname=\"industry\", $classes=\"form-control\", $important=false, $ind=\"Aerospace Industry\")\n\t{\n\t\tif($important)\n\t\techo \"<select name='$fieldname' class='$classes' placeholder='Industry' required>\";\n\t\telse\n\t\techo \"<select name='$fieldname' class='$classes' placeholder='Industry'>\";\n\t\t$con = dbConnect(\"localhost\", \"root\", \"\", \"jobPortal\");\n\t\tif($con)\n\t\t{\n\t\t\t$rsIndustry = mysqli_query($con, \"SELECT * FROM industries\");\n\t\t\tif($rsIndustry)\n\t\t\t{\n\t\t\t\twhile($row = mysqli_fetch_array($rsIndustry))\n\t\t\t\t{\n\t\t\t\t\tif($row[\"indName\"]==$ind)\n\t\t\t\t\techo \"<option value='\".$row['indId'].\"' selected>\".$row['indName'].\"</option>\";\n\t\t\t\t\telse\n\t\t\t\t\techo \"<option value='\".$row['indId'].\"'>\".$row['indName'].\"</option>\";\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo \"<option value='0'>Unable To Fetch.</option>\";\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo \"<option value='0'>Unable To Fetch.</option>\";\n\t\t}\n\t\techo \"</select>\";\n\t}", "public function getClientTypeListAction()\n\t{\n\t\t$clientParameters=$this->_request->getParams();\n\t\t$client_types=$clientParameters['client_type'];\t\n\n\t\t$client_obj=new Ep_Quote_Client();\n\t\t\n\t\t$searchparams['client_type']=explode(\",\",$client_types);\t\t\n\t\t$company_list=$client_obj->getAllCompanyList($searchparams);\n\n\t\t$options='<option></option>';\n\n\t\tif($company_list!='NO')\n\t\t{\n\t\t\tforeach($company_list as $id=>$email)\n\t\t\t{\n\t\t\t\t$options.='<option value=\"'.$id.'\"\">'.$email.'</option>';\n\t\t\t}\n\t\t}\n\t\techo $options;\n\n\t}", "function clients_importDisplaySelectValues($data) {\n\tglobal $gSession;\n\t\n\t$current_group = intval($_GET['group']);\n\t$update = intval($_GET['update']);\n\t\n\t## setup the template\n\t$file = ENGINE.\"modules/clients/interface/import_asssign_fields.tpl\";\n\t$select_template = new Template();\n\t$select_template->set_templatefile(array(\"body\" => $file,'column'=>$file));\n\n\t$select_template->set_var('language_inputhead','Match the file with your subscriber fields');\n\t$select_template->set_var('language_inputbody',\"For each column, select the field it corresponds to in 'Belongs to'. Click the 'Next' button when you're do\");\n\t$select_template->set_var('element_desc',' ');\n\t\n\t$targetURL = \"module.php?cmd=import&step=4&group=\".$current_group.'&update='.$update;\n\t$targetURL = $gSession->url($targetURL);\n\t$select_template->set_var('actionURL',$targetURL);\t\n\t\n\t## prepare the select element wiht all available fields\n\t$wt = new ctlparser(MATRIX_BASEDIR.'settings/modules/'.$GLOBALS['_MODULE_DATAOBJECTS_NAME'].'/base.xml');\n\t$wt->parse();\t\t\n\t$elements = $wt->getElements();\t\n\t\n\t$allowed_types = array('text','email','copytext','tags','selectbox','date');\n\t$field_selector = '<option label=\"\" value=\"-1\">Skip This Column</option><option label=\"\" value=\"-1\"></option>';\n\tforeach($elements as $current_row) {\n\t\tforeach($current_row as $current_element) {\n\t\t\t$type = strtolower($current_element['TYPE']);\n\t\t\t$identifier = strtolower($current_element['IDENTIFIER']);\n\t\t\t\n\t\t\tif(in_array($type,$allowed_types)) {\n\t\t\t\t## first we try to include the apropriate file \n\t\t\t\t@include_once(MATRIX_BASEDIR.\"/matrix_engine/modules/clients/attributetypes/\".$type.\"/attribute.php\");\t\t\t\n\t\t\t\tif(function_exists(\"clients_\".$type.\"_getData\")) {\n\t\t\t\t\t$field_selector .= '<option label=\"'.$current_element['NAME'].'\" value=\"'.$identifier.'\">'.$current_element['NAME'].'</option>';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\t\n\t\n\t\n\t## now we will output each colum recoginzed by the system\n\t$output = '';\n\t$counter = 0;\n\n\tforeach($data as $key=>$value) {\n\t\t$current_selector = '<select name=\"COLUMN_'.$counter.'\">'.$field_selector.'</select>';\n\t\n\t\t$select_template->set_var('COLUMN_NAME',$key);\n\t\t$select_template->set_var('COLUMN_SELECTOR',$current_selector);\n\t\t\n\t\t$output .= $select_template->fill_block(\"column\");\n\t\t$counter++;\n\t}\n\t\n\t## prpeare the hidden fields\n\t$hiddenfields = '<input name=\"column_count\" id=\"column_count\" type=\"hidden\" value=\"'.($counter-1).'\">';\n\t\n\t$select_template->set_var('COLUMNS',$output);\t\n\t$select_template->set_var('hiddenfields',$hiddenfields);\n\t\n\t$select_template->pfill_block(\"body\");\n\t\n}", "function pmprowoo_gift_levels_add_recipient_fields() {\r\n global $product;\t\r\n $product_id = $product->get_id();\r\n\t\r\n $gift_membership_code = get_post_meta( $product_id, '_gift_membership_code', true);\r\n $gift_membership_email_option = get_post_meta($product_id, '_gift_membership_email_option', true);\r\n\t\r\n if(!empty($gift_membership_code) && !empty($gift_membership_email_option)){\r\n if($gift_membership_email_option == '1'){\r\n echo '<table class=\"variations gift-membership-fields\" cellspacing=\"0\">\r\n <tbody>\r\n <tr>\r\n <td class=\"label\"><label for=\"gift-recipient-name\">'. __( 'Recipient Name', 'pmpro-woocommerce' ).'</label></td>\r\n <td class=\"value\"><input type=\"text\" name=\"gift-recipient-name\" value=\"\" style=\"margin:0;\" /></td>\r\n </tr> \r\n <tr>\r\n <td class=\"label\"><label for=\"gift-recipient-email\">'. __( 'Recipient Email', 'pmpro-woocommerce' ).'</label></td>\r\n <td class=\"value\"><input type=\"text\" name=\"gift-recipient-email\" value=\"\" style=\"margin:0;\" /></td>\r\n </tr> \r\n </tbody>\r\n </table>';\r\n }elseif($gift_membership_email_option == '3'){\r\n echo '<table class=\"variations gift-membership-fields\" cellspacing=\"0\">\r\n <tbody>\r\n <tr>\r\n <td class=\"label\"><label for=\"gift-recipient-email\">'. __( 'Send Email to Recipient?', 'pmpro-woocommerce' ).'</label></td>\r\n <td class=\"value\"><select id=\"pa_send-email\" class=\"\" name=\"gift-send-email\"> \r\n <option selected=\"selected\" value=\"\">Choose an option</option>\r\n <option class=\"attached enabled\" value=\"1\">YES</option>\r\n <option class=\"attached enabled\" value=\"0\">NO</option>\r\n </select></td>\r\n </tr> \r\n <tr id=\"recipient-name\" style=\"display:none;\">\r\n <td class=\"label\"><label for=\"gift-recipient-name\">'. __( 'Recipient Name', 'pmpro-woocommerce' ).'</label></td>\r\n <td class=\"value\"><input type=\"text\" name=\"gift-recipient-name\" value=\"\" style=\"margin:0;\" /></td>\r\n </tr>\r\n <tr id=\"recipient-email\" style=\"display:none;\">\r\n <td class=\"label\"><label for=\"gift-recipient-email\">'. __( 'Recipient Email', 'pmpro-woocommerce' ).'</label></td>\r\n <td class=\"value\"><input type=\"text\" name=\"gift-recipient-email\" value=\"\" style=\"margin:0;\" /></td>\r\n </tr> \r\n </tbody>\r\n </table>';\r\n echo \"<script type='text/javascript'>\r\n jQuery(document).ready(function($){\r\n if ( $('#pa_send-email').val() == '1') {\r\n $('#recipient-name').show();\r\n $('#recipient-email').show();\r\n }\r\n $('#pa_send-email').on('change', function() {\r\n if ( this.value == '1') {\r\n $('#recipient-name').show();\r\n $('#recipient-email').show();\r\n } else {\r\n $('#recipient-name').hide();\r\n $('#recipient-email').hide();\r\n }\r\n });\r\n });\r\n </script>\";\r\n }\r\n }\r\n\r\n}", "function JournalSubjectPulldown($field_code,$curr_subj_code, $opt=\"\") {\n // mysql_pconnect removed (lib)\n if (preg_match(\"/dept_only/\",$opt)) { $where = \"where not (liaison = '')\"; }\n else { $where = \"\"; }\n$result = mysql_query(\"SELECT subj_code,subject FROM subjects $where order by subject\", $db);\n\nwhile ($myrow = mysql_fetch_row($result)) {\n $subj_code = $myrow[0];\n $subject = $myrow[1];\n if ($curr_subj_code == $subj_code) { \n $checked = \"SELECTED\";\n $curr_subject = $subject;\n }\n else { $checked = \"\"; }\n $options .= \"<option value=$subj_code $checked>$subject</option>\\n\";\n} #end while myrow\n\n if (preg_match(\"/witt.*sem/\",$opt)) {\n if ($curr_subj_code == \"wittsem\")\n $checked = \"SELECTED\";\n $options.= \"<option value=wittsem $checked>WittSem</option>\\n\";\n }\nprint \"<select name=$field_code><option value=\\\"\\\">----- Select a Subject -----</option>\\n\";\nprint $options;\nprint \"</select>\\n\";\n}", "public function get_suppliers_list()\n\t {\n\t \t$userId=$this->checklogin();\n\t \t$query=$this->ApiModel->get_suppliers_list($userId);\n\t \techo json_encode($query);\n\t }", "function GetExtendedFilterValues() {\n\t\tglobal $dealers_reports;\n\n\t\t// Field StartDate\n\t\t$sSelect = \"SELECT DISTINCT agree.StartDate FROM \" . $dealers_reports->SqlFrom();\n\t\t$sOrderBy = \"agree.StartDate ASC\";\n\t\t$wrkSql = ewrpt_BuildReportSql($sSelect, $dealers_reports->SqlWhere(), \"\", \"\", $sOrderBy, $this->UserIDFilter, \"\");\n\t\t$dealers_reports->StartDate->DropDownList = ewrpt_GetDistinctValues($dealers_reports->StartDate->DateFilter, $wrkSql);\n\t}", "function getEmployeesListCtrl() {\n $accounts = getEmployeesList();\n echo \"<select class='form-control' required name='id_comptes'>\";\n foreach ($accounts as $a) {\n if ($id === $a['id_compte']) {\n echo \"<option value='\".$a[\"id_compte\"].\"' selected>\".$a[\"nom\"].\" \".$a[\"prenom\"].\"</option>\";\n } else {\n echo \"<option value='\".$a[\"id_compte\"].\"'>\".$a[\"nom\"].\" \".$a[\"prenom\"].\"</option>\";\n }\n }\n echo \"</select>\";\n}", "private function getSelectOptions() {\n $result = \"\";\n if($this->pleaseSelectEnabled) {\n $result .= '<option value=\"null\"> -- Please Select --</option>';\n }\n foreach($this->itemList as $key => $val) {\n $selectedText = \"\";\n if(in_array($key, $this->selectedItems)) {\n $selectedText = 'selected=\"selected\"';\n }\n $result .= '<option value=\"'.$key.'\" '.$selectedText.'>'.$val.'</option>'.\"\\n \\t\";\n }\n return $result;\n }", "function cmdCustType($name, $caption) {\n $optcust_type = array\n (\n array(\"\", \"\"),\n array(\"End User\", \"1\"),\n array(\"Dealer / Reseller\", \"2\"),\n array(\"Goverment / BUMN\", \"3\"),\n );\n ?>\n <tr>\n <td><?php getCaption($caption); ?> :</td>\n <td>\n <select class=\"easyui-combobox\"\n id=\"<?php echo $name; ?>\"\n name=\"<?php echo $name; ?>\"\n style=\"width:120px;\"\n data-options=\"panelHeight:100,editable:false,width:200\"\n disabled=true\n >\n <?php\n foreach ($optcust_type as $val) {\n echo '<option value=\"' . $val[1] . '\">' . $val[0] . '</option>';\n }\n ?>\n </select>\n </td>\n </tr>\n <?php\n}", "public function handleSelectedCompanyEmail()\n\t{\n\t\tif($this->emailSendTo->Text)\n\t\t{\n\t\t\t$this->emailSendTo->Text = $this->emailSendTo->Text . \";\" . $this->emailCompany->getSelectedValue();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->emailSendTo->Text = $this->emailCompany->getSelectedValue();\n\t\t}\n\t\t$this->emailCompany->setSelectedValue(0);\n\t\t$this->emailCompany->Text = \"\";\n\t}", "public function getSelectDataFields();", "public function get_med_pro_info() {\n $user_type = $this->session->ses_user_type;\n if ($user_type == \"admin\" || $user_type == \"staff\") {\n $salesType = $this->input->post('salesType');\n if ($salesType == \"medicine\") {\n $result = $this->Common_model->get_all_info(\"insert_medicine_info\");\n $option = \"<option value=''>-- Select --</option>\";\n foreach ($result as $info) {\n $option .= \"<option value='m$info->record_id'>$info->medicine_name [$info->medicine_presentation]</option>\";\n }\n } elseif ($salesType == \"product\") {\n $result = $this->Common_model->get_all_info(\"insert_product_info\");\n $option = \"<option value=''>-- Select --</option>\";\n foreach ($result as $info) {\n $option .= \"<option value='p$info->record_id'>$info->product_name [$info->types_of_product]</option>\";\n }\n }\n\n echo $option;\n } else {\n $data['wrong_msg'] = \"\";\n $this->load->view('website/login_check', $data);\n }\n }", "function build_garage_install_list_html($selected,$selected_name)\n\t{\n\t\tglobal $userdata, $template, $db, $SID, $lang, $phpEx, $phpbb_root_path, $garage_config, $board_config;\n\t\n\t\t$garage_install_list = \"<select name='install_business_id' class='forminput'>\";\n\t\n\t\tif (!empty($selected) )\n\t\t{\n\t\t\t$garage_install_list .= \"<option value='$selected' selected='selected'>$selected_name</option>\";\n\t\t\t$garage_install_list .= \"<option value=''>------</option>\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$garage_install_list .= \"<option value=''>\".$lang['Select_A_Business'].\"</option>\";\n\t\t\t$garage_install_list .= \"<option value=''>------</option>\";\n\t\t}\n\t\n\t\t$sql = \"SELECT id, title FROM \" . GARAGE_BUSINESS_TABLE . \" WHERE garage = 1 ORDER BY title ASC\";\n\t\n\t\tif( !($result = $db->sql_query($sql)) )\n\t\t{\n\t\t\tmessage_die(GENERAL_ERROR, 'Could not query businesses', '', __LINE__, __FILE__, $sql);\n\t\t}\n\t\n\t\twhile ( $garage_list = $db->sql_fetchrow($result) )\n\t\t{\n\t\t\t$garage_install_list .= \"<option value='\".$garage_list['id'].\"'>\".$garage_list['title'].\"</option>\";\n\t\t}\n\t\t$db->sql_freeresult($result);\n\t\t\n\t\t$garage_install_list .= \"</select>\";\n\t\n\t\t$template->assign_vars(array(\n\t\t\t'GARAGE_INSTALL_LIST' => $garage_install_list)\n\t\t);\n\t\n\t\treturn ;\n\t}", "function mfcs_get_email_type_list_options($option = NULL, $hidden = FALSE, $disabled = FALSE) {\n $options = array();\n $options_all = array();\n\n if ($hidden) {\n $options_all[MFCS_EMAIL_TYPE_NONE] = 'None';\n }\n\n $options_all[MFCS_EMAIL_TYPE_AMENDED] = 'Amended';\n $options_all[MFCS_EMAIL_TYPE_APPROVED] = 'Approved';\n $options_all[MFCS_EMAIL_TYPE_CANCELLED] = 'Cancelled';\n $options_all[MFCS_EMAIL_TYPE_CANCELLING] = 'Cancelling';\n $options_all[MFCS_EMAIL_TYPE_COMMENT] = 'Comment';\n $options_all[MFCS_EMAIL_TYPE_DELETED] = 'Deleted';\n $options_all[MFCS_EMAIL_TYPE_DENIED] = 'Denied';\n $options_all[MFCS_EMAIL_TYPE_FINAL_DECISION] = 'Final Decision';\n $options_all[MFCS_EMAIL_TYPE_FORCED] = 'Forced';\n $options_all[MFCS_EMAIL_TYPE_INSURANCE_PROVIDED] = 'Insurance Provided';\n $options_all[MFCS_EMAIL_TYPE_INSURANCE_REQUIRED] = 'Insurance Required';\n $options_all[MFCS_EMAIL_TYPE_ISSUES] = 'Issues';\n $options_all[MFCS_EMAIL_TYPE_MODIFIED] = 'Modified';\n $options_all[MFCS_EMAIL_TYPE_MOVED] = 'Moved';\n $options_all[MFCS_EMAIL_TYPE_NEEDS_REVIEW] = 'Needs Review';\n $options_all[MFCS_EMAIL_TYPE_ISSUES_NONE] = 'No Issues';\n $options_all[MFCS_EMAIL_TYPE_REASSIGN_COORDINATOR] = 'Re-Assign Coordinator';\n $options_all[MFCS_EMAIL_TYPE_REASSIGN_REQUESTER] = 'Re-Assign Requester';\n $options_all[MFCS_EMAIL_TYPE_REQUESTED] = 'Requested';\n $options_all[MFCS_EMAIL_TYPE_UNAVAILABLE] = 'Unavailable';\n $options_all[MFCS_EMAIL_TYPE_UNAVAILABLE_LOCKED] = 'Unavailable (Due to Lock)';\n $options_all[MFCS_EMAIL_TYPE_UNCANCELLED] = 'Uncancelled';\n $options_all[MFCS_EMAIL_TYPE_UNREVIEWED_REQUEST] = 'Unreviewed Request';\n\n if ($disabled) {\n $options_all[MFCS_EMAIL_TYPE_REQUIREMENTS] = 'Requirements';\n $options_all[MFCS_EMAIL_TYPE_REVIEWED] = 'Reviewed';\n }\n\n if ($option == 'select') {\n $options[''] = '- Select -';\n }\n\n foreach ($options_all as $option_id => $option_name) {\n $options[$option_id] = $option_name;\n }\n\n asort($options);\n\n return $options;\n}", "public function company_email_list($lead_email_ID)\n {\n $result = common_select_values('Distinct company_email', 'emails', ' lead_email = \"'.$lead_email_ID.'\"', 'result');\n return $result;\n }", "function showStaffSelect(){\r\n $conn= databaseConnection();\r\n $sql = \"SELECT UserId,FirstName,LastName FROM tblUsers;\";\r\n //add call to user rates and car groups \r\n $result = mysqli_query($conn, $sql);\r\n if (mysqli_num_rows($result) > 0) {\r\n // output data of each row\r\n while($row = mysqli_fetch_assoc($result)) {\r\n echo'<option id=\"'. $row[\"UserId\"].'\" value=\"'. $row[\"UserId\"].'\">'. $row[\"FirstName\"].' '.$row[\"LastName\"].'</option>';\r\n }\r\n } else {\r\n echo \"0 results\";\r\n }\r\n mysqli_close($conn);\r\n }", "public function Do_select_Example1(){\n\n\t}", "public function brandForm(){\n $table = \"brands\";\n $cresults = $this->getAllrecords($table);\n foreach($cresults as $brand){\n echo('<option value=\"'.$brand[\"brand_id\"].'\">'.$brand[\"brand_name\"].'</option>');\n }\n\n\n }", "function email_print_select_options($options, $perpage) {\n\n\tglobal $CFG, $USER;\n\n\t$baseurl = $CFG->wwwroot . '/blocks/email_list/email/index.php?' . email_build_url($options);\n\n\techo '<br />';\n\n\techo '<div class=\"content emailfloatcontent\">';\n\n\tif ( $options->id != SITEID ) {\n\t\techo '<div class=\"emailfloat emailleft\">';\n\t\tif ( ! email_isfolder_type(email_get_folder($options->folderid), EMAIL_SENDBOX) ) {\n\t\t\techo '<select name=\"action\" onchange=\"this.form.submit()\">\n\t\t \t<option value=\"\" selected=\"selected\">' . get_string('markas', 'block_email_list') .':</option>\n\t\t \t\t\t<option value=\"toread\">' . get_string('toread','block_email_list') . '</option>\n\t\t \t<option value=\"tounread\">' . get_string('tounread','block_email_list') . '</option>\n\t\t \t\t</select>';\n\n\n\t\t print_spacer(1, 20, false);\n\t\t}\n\t\techo '</div>';\n\t echo '<div class=\"emailleft\">';\n\t email_print_movefolder_button($options);\n\t\t// Idaho State University & MoodleRooms contrib - Thanks!\n\t\temail_print_preview_button($options->id);\n\t\techo '</div>';\n\t\techo '<div id=\"move2folder\"></div>';\n\t\techo '</div>';\n\n\t}\n\n\t// ALERT!: Now, I'm printing end start form, for choose number mail per page\n\t$url = '';\n\t// Build url part options\n \tif ($options) {\n \t\t$url = email_build_url($options);\n }\n\n\n\techo '</form>';\n\techo '<form id=\"mailsperpage\" name=\"mailsperpage\" action=\"'.$CFG->wwwroot.'/blocks/email_list/email/index.php?'.$url.'\" method=\"post\">';\n\n\n\t// Choose number mails perpage\n\n\techo '<div id=\"sizepage\" class=\"emailright\">' . get_string('mailsperpage', 'block_email_list') .': ';\n\n\n\t// Define default separator\n\t$spaces = '&#160;&#160;&#160;';\n\n\techo '<select name=\"perpage\" onchange=\"javascript:this.form.submit();\">';\n\n\tfor($i = 5; $i < 80; $i=$i+5) {\n\n \tif ( $perpage == $i ) {\n \t\techo '<option value=\"'.$i.'\" selected=\"selected\">' . $i . '</option>';\n \t} else {\n \t\techo '<option value=\"'.$i.'\">' . $i . '</option>';\n \t}\n\t}\n\n echo '</select>';\n\n\techo '</div>';\n\n return true;\n}", "private function emailList()\n {\n return array(\n '[email protected]',\n '[email protected]',\n '[email protected]',\n );\n }", "public function suppliers_by_cat($id_cat, $clang = 'ro'){\n\t\t\n\t\t\t$str = '<option value=\"\" label=\"' . lang('invoices_pick') . '\">' . lang('invoices_pick') . '</option>';\n\t\t\t$options = $this->ss_suppliers_model->options_list(NULL, NULL, array('id_cat' => $id_cat));\n\t\t\t$selectedSupplier = $this->input->post('supplier');\n\t\t\t\n\t\t\tforeach($options as $key => $val)\n\t\t\t{\n\t\t\t\t$str = $str . '<option value=\"'. $key .'\"'. ($key != $selectedSupplier ? '' : ' selected') .'>'.$val.'</option>';\n\t\t\t}\n\t\t\t\n\t\t\techo $str;\n\t\t}", "function select_dropdown_options($name)\n{\n $conn = db_connect();\n\n // Generate the salespeople from the database as select options if that is the name passed in to the element\n if ($name == \"salesperson\") {\n\n // Prepared statement for selecting salesperson dropdown options\n $salesperson_dropdown_select_stmt = pg_prepare(\n $conn,\n \"salesperson_dropdown_select_stmt\",\n \"SELECT id, first_name, last_name FROM salespeople;\"\n );\n\n $result = pg_execute($conn, \"salesperson_dropdown_select_stmt\", array());\n\n // Generate the clients from the database as select options if salesperson is logged in \n // by filtering only their clients\n } else if ($name == \"client\" && $_SESSION['type'] == \"a\") {\n\n // Prepared statement for selecting client dropdown options\n $salesperson_id = $_SESSION['id'];\n $clients_dropdown_select_stmt = pg_prepare(\n $conn,\n \"clients_dropdown_select_stmt\",\n \"SELECT id, first_name, last_name FROM clients WHERE salesperson_id = $salesperson_id;\"\n );\n\n $result = pg_execute($conn, \"clients_dropdown_select_stmt\", array());\n }\n\n // Return the data required to populate dropdown menu options\n return $result;\n}", "function printSubjectOptions ($url, $selected = NULL) {\n print \"Limit by Subject:<br>\\n\";\n print \"<form action='$url' method='get'>\\n\";\n $this->subject->printSelectList($selected, 1, 'no', true);\n print '<input type=\"submit\" value=\"Go\">';\n print \"</form>\\n\";\n }", "function list_drop_menu_system_users($pre_selected_items='', $order_clause='') {\r\n\r\n\tif ($order_clause) {\r\n\t\t$order_clause = \" ORDER BY \".$order_clause.\"\";\r\n\t}\r\n\r\n\t# MUST EDIT\r\n\t$sql = \"SELECT * FROM system_users_tbl WHERE system_users_disabled = \\\"0\\\"\".$order_clause.\"\";\r\n\t$results = runQuery($sql);\r\n\r\n\tforeach($results as $results_item) {\r\n\t\tif (is_array($pre_selected_items)) { \r\n\t\t\t$match = NULL;\r\n\t\t\tforeach($pre_selected_items as $preselected) {\r\n\t\t\t\t# MUST EDIT\r\n\t\t\t\tif ($results_item[system_users_id] == $preselected) {\r\n\t\t\t\t\techo \"<option selected=\\\"selected\\\" value=\\\"$results_item[system_users_id]\\\">$results_item[system_users_name]</option>\\n\";\r\n\t\t\t\t\t$match = 1;\r\n\t\t\t\t} \r\n\t\t\t}\r\n\r\n\t\t\t# MUST EDIT\r\n\t\t\tif (!$match) { \r\n\t\t\t\techo \"<option value=\\\"$results_item[system_users_id]\\\">$results_item[system_users_name]</option>\\n\"; \r\n\t\t\t}\r\n\r\n\t\t} elseif ($pre_selected_items) {\r\n\t\t\t$match = NULL;\r\n\t\t\t# MUST EDIT\r\n\t\t\tif ($results_item[system_users_id] == $pre_selected_items) {\r\n\t\t\t\techo \"<option selected=\\\"selected\\\" value=\\\"$results_item[system_users_id]\\\">$results_item[system_users_name]</option>\\n\";\r\n\t\t\t\t$match = 1;\r\n\t\t\t} \r\n\r\n\t\t\t# MUST EDIT\r\n\t\t\tif (!$match) { \r\n\t\t\t\techo \"<option value=\\\"$results_item[system_users_id]\\\">$results_item[system_users_name]</option>\\n\"; \r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t# MUST EDIT\r\n\t\t\techo \"<option value=\\\"$results_item[system_users_id]\\\">$results_item[system_users_name]</option>\\n\"; \r\n\t\t}\r\n\t}\r\n\r\n}", "public function listing_option(){\n\n\n\n\t\t$data['urgent_priority_fee']=$this->shipping->get_data_with_single_cond('urgent','priority_fee','fee_name');\n\n\t\t$data['featured_priority_fee']=$this->shipping->get_data_with_single_cond('featured','priority_fee','fee_name');\n\n\t\t$this->load->view('shipment/listing-options',$data);\n\n\n\n\t}", "function SelectEntry() {\n\t\t\n //Select all contacts in the addressbook\n $data['display_block'] = $this->AddressBook->selectContacts();\n\n //Render the View SelectEntry with the contact list. \n $this->load->view('SelectEntry', $data);\t\n\t}", "function select() {\n return \"\n contact_a.id as contact_id ,\n contact_a.contact_type as contact_type,\n contact_a.sort_name as sort_name,\n contact_a.job_title as job_title,\n contact_a.organization_name as current_employer\n \";\n }", "function tc_get_resend_email_events( $field_name = '', $post_id = '', $multi_select = false ) {\n\n $placeholder = ( $multi_select ) ? __( 'Choose any events', 'tc' ) : '';\n\n $tc_email_settings = get_option('tc_email_setting', false);\n $selected = ( isset( $tc_email_settings['resend_attendees_event_name'] ) ) ? $tc_email_settings['resend_attendees_event_name'] : 'all';\n\n $wp_events_search = new TC_Events_Search( '', '', -1 );\n ?>\n\n <!-- Event Name Field -->\n <select id=\"resend_attendees_event_name\" class=\"regular-text dynamic-field-child\" name=\"tc_email_setting[resend_attendees_event_name]\" data-placeholder=\"<?php echo $placeholder; ?>\">\n <?php foreach ( $wp_events_search->get_results() as $event ) : ?>\n <option value=\"<?php echo (int) $event->ID; ?>\" <?php selected( $event->ID, $selected, true ); ?>><?php echo get_the_title( (int) $event->ID ); ?></option>\n <?php endforeach; ?>\n </select>\n <?php\n}", "function GetExtendedFilterValues() {\n\t\tglobal $deals_details;\n\n\t\t// Field dealer\n\t\t$sSelect = \"SELECT DISTINCT rep.dealer FROM \" . $deals_details->SqlFrom();\n\t\t$sOrderBy = \"rep.dealer ASC\";\n\t\t$wrkSql = ewrpt_BuildReportSql($sSelect, $deals_details->SqlWhere(), \"\", \"\", $sOrderBy, $this->UserIDFilter, \"\");\n\t\t$deals_details->dealer->DropDownList = ewrpt_GetDistinctValues(\"\", $wrkSql);\n\n\t\t// Field date_start\n\t\t$sSelect = \"SELECT DISTINCT rep.date_start FROM \" . $deals_details->SqlFrom();\n\t\t$sOrderBy = \"rep.date_start ASC\";\n\t\t$wrkSql = ewrpt_BuildReportSql($sSelect, $deals_details->SqlWhere(), \"\", \"\", $sOrderBy, $this->UserIDFilter, \"\");\n\t\t$deals_details->date_start->DropDownList = ewrpt_GetDistinctValues($deals_details->date_start->DateFilter, $wrkSql);\n\n\t\t// Field status\n\t\t$sSelect = \"SELECT DISTINCT rep.status FROM \" . $deals_details->SqlFrom();\n\t\t$sOrderBy = \"rep.status ASC\";\n\t\t$wrkSql = ewrpt_BuildReportSql($sSelect, $deals_details->SqlWhere(), \"\", \"\", $sOrderBy, $this->UserIDFilter, \"\");\n\t\t$deals_details->status->DropDownList = ewrpt_GetDistinctValues(\"\", $wrkSql);\n\t}", "function get_executives_and_fc()\r\n\t\t{\r\n\t\t\t$trr_id=$this->input->post('territory_id');\r\n\t\t\t$executives_list=$this->erpm->get_executives_by_territroy($trr_id);\r\n\t\t\t\r\n\t\t\techo '<select name=\"excutives_list\">';\r\n\t\t\t\techo '<option value=\"Choose\">Choose</option>';\r\n\t\t\t\tif($executives_list)\r\n\t\t\t\t{\r\n\t\t\t\t\tforeach($executives_list as $executive)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\techo '<option value=\"'.$executive['employee_id'].'\">'.$executive['name'].'-'.$executive['role_name'].'</option>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\techo '</select>';\r\n\t\t}", "function email_print_users_to_send($users, $nosenders=false, $options=NULL) {\n\n\tglobal $CFG;\n\n\t$url = '';\n\tif ( $options ) {\n\t\t$url = email_build_url($options);\n\t}\n\n\n\techo '<tr valign=\"middle\">\n <td class=\"legendmail\">\n <b>'.get_string('for', 'block_email_list'). '\n :\n </b>\n </td>\n <td class=\"inputmail\">';\n\n if ( ! empty ( $users ) ) {\n\n \techo '<div id=\"to\">';\n\n \tforeach ( $users as $userid ) {\n \t\techo '<input type=\"hidden\" value=\"'.$userid.'\" name=\"to[]\" />';\n \t}\n\n \techo '</div>';\n\n \techo '<textarea id=\"textareato\" class=\"textareacontacts\" name=\"to\" cols=\"65\" rows=\"3\" disabled=\"true\" multiple=\"multiple\">';\n\n \tforeach ( $users as $userid ) {\n \t\techo fullname( get_record('user', 'id', $userid) ).', ';\n \t}\n\n \techo '</textarea>';\n }\n\n \techo '</td><td class=\"extrabutton\">';\n\n\tlink_to_popup_window( '/blocks/email_list/email/participants.php?'.$url, 'participants', get_string('participants', 'block_email_list').' ...',\n 470, 520, get_string('participants', 'block_email_list') );\n\n echo '</td></tr>';\n echo '<tr valign=\"middle\">\n \t\t\t<td class=\"legendmail\">\n \t\t\t\t<div id=\"tdcc\"></div>\n \t\t\t</td>\n \t\t\t<td><div id=\"fortextareacc\"></div><div id=\"cc\"></div><div id=\"url\">'.$urltoaddcc.'<span id=\"urltxt\">&#160;|&#160;</span>'.$urltoaddbcc.'</div></td><td><div id=\"buttoncc\"></div></td></tr>';\n echo '<tr valign=\"middle\"><td class=\"legendmail\"><div id=\"tdbcc\"></div></td><td><div id=\"fortextareabcc\"></div><div id=\"bcc\"></div></td><td><div id=\"buttonbcc\"></div></td>';\n\n\n}", "public function brandsSearchDrop(){\n $table = \"brands\";\n $cresults = $this->getAllrecords($table);\n if($cresults == \"NO_RECORDS_FOUND\"){\n echo(\"NO_PRODUCT_FOUND\");\n }\n else{\n foreach($cresults as $brands){\n echo('<option value=\"'.$brands[\"brand_id\"].'\">'.$brands[\"brand_name\"].'</option>');\n }\n\n\n }\n\n \n}", "public function populateSuburbDropdown() {\n\n $qry = $this->db->prepare('SELECT DISTINCT SUBURB FROM n8598177.items;');\n $qry->execute();\n\n echo('\n <select name=\"search-suburb\" class=\"suburb-select-box\">\n <option disabled selected value=\"\">Suburb...</option>\n ');\n foreach ($qry as $hotspot) {\n echo '<option value=\"' . $hotspot['SUBURB'] . '\">' . $hotspot['SUBURB'] . '</option>';\n }\n echo '</select>';\n }", "public function add_new_supplier()\n {\n if ($this->input->post())\n {\n $ac_payable = $this->MSettings->get_by_company_id($this->session->user_company);\n $chart = $this->MAc_charts->get_by_id($ac_payable['ac_payable']);\n $siblings = $this->MAc_charts->get_by_parent_id($ac_payable['ac_payable']);\n if (count($siblings) > 0)\n {\n $ac_code_temp = explode('.', $siblings['code']);\n $ac_last = count($ac_code_temp) - 1;\n $ac_new = (int)$ac_code_temp[$ac_last] + 10;\n $ac_code = $chart['code'] . '.' . $ac_new;\n }\n else\n {\n $ac_code = $chart['code'] . '.10';\n }\n $ac_id = $this->MAc_charts->account_create($ac_payable['ac_payable'], $ac_code, $this->input->post('name'));\n $insert_id = $this->MSuppliers->create(trim($this->input->post('code')), $ac_id);\n $suppliers = $this->MSuppliers->get_all();\n $html = '';\n foreach ($suppliers as $supplier)\n {\n if ($insert_id == $supplier['id'])\n {\n $html .= '<option value=\"' . $supplier['id'] . '\" selected>' . $supplier['name'] . '</option>';\n }\n else\n {\n $html .= '<option value=\"' . $supplier['id'] . '\">' . $supplier['name'] . '</option>';\n }\n }\n echo $html;\n }\n }", "function selection() {\r\n global $order;\r\n $onFocus = ' onfocus=\"methodSelect(\\'pmt-' . $this->code . '\\')\"';\r\n $bank_acct_types = array();\r\n $echeck_customer_types = array();\r\n\r\n $bank_acct_types[] = array('id' => 'CHECKING', 'text' => 'Checking');\r\n $bank_acct_types[] = array('id' => 'BUSINESSCHECKING', 'text' => 'Business Checking');\r\n $bank_acct_types[] = array('id' => 'SAVINGS', 'text' => 'Savings');\r\n\r\n $selection = array('id' => $this->code,\r\n 'module' => MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_CATALOG_TITLE,\r\n 'fields' => array(\r\n array('title' => MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_BANK_ROUTING_CODE,\r\n 'field' => zen_draw_input_field('authorizenet_echeck_bank_aba_code', '', 'maxlength=\"9\" id=\"'.$this->code.'-echeck-routing-code\"' . $onFocus),\r\n 'tag' => $this->code.'-echeck-routing-code'),\r\n array('title' => MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_BANK_ACCOUNT_NUM,\r\n 'field' => zen_draw_input_field('authorizenet_echeck_bank_acct_num', '', 'maxlength=\"20\" id=\"'.$this->code.'-echeck-bank-acct-num\"'. $onFocus),\r\n 'tag' => $this->code.'-echeck-bank-acct-num'),\r\n array('title' => MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_BANK_NAME,\r\n 'field' => zen_draw_input_field('authorizenet_echeck_bank_name', '', 'maxlength=\"50\" id=\"'.$this->code.'-echeck-bank-name\"' . $onFocus),\r\n 'tag' => $this->code.'-echeck-bank-name'),\r\n array('title' => MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_BANK_ACCOUNT_TYPE,\r\n 'field' => zen_draw_pull_down_menu('authorizenet_echeck_bank_acct_type', $bank_acct_types, '', 'id=\"'.$this->code.'-echeck-bank-acct-type\"' . $onFocus),\r\n 'tag' => $this->code.'-echeck-bank-acct-type'),\r\n array('title' => MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_BANK_ACCOUNTHOLDER,\r\n 'field' => zen_draw_input_field('authorizenet_echeck_bank_accountholder', $order->billing['firstname'] . ' ' . $order->billing['lastname'], 'maxlength=\"100\" id=\"'.$this->code.'-echeck-bank-acctholder\"' . $onFocus),\r\n 'tag' => $this->code.'-echeck-bank-acctholder') ));\r\n\r\n if (MODULE_PAYMENT_AUTHORIZENET_ECHECK_WFSS_ENABLED == 'True') {\r\n $echeck_customer_types[] = array('id' => 'I', 'text' => 'Individual');\r\n $echeck_customer_types[] = array('id' => 'B', 'text' => 'Business');\r\n $dl_states = array();\r\n global $db;\r\n $sql = \"select zone_code, zone_name\r\n from \" . TABLE_ZONES . \"\r\n where zone_country_id = 223\";\r\n $result = $db->Execute($sql);\r\n while (!$result->EOF) {\r\n $dl_states[] = array('id' => $result->fields['zone_code'], 'text' => $result->fields['zone_name']);\r\n $result->MoveNext();\r\n }\r\n $selection['fields'] = array_merge($selection['fields'], array(\r\n array('title' => MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_CUST_TYPE,\r\n 'field' => zen_draw_pull_down_menu('echeck_customer_type', $echeck_customer_types, '', 'id=\"'.$this->code.'-echeck-cust-type\"' . $onFocus),\r\n 'tag' => $this->code.'-echeck-cust-type'),\r\n array('title' => MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_CUST_TAX_ID,\r\n 'field' => zen_draw_input_field('echeck_customer_tax_id', '', 'maxlength=\"9\" id=\"'.$this->code.'-echeck-tax-id\"' . $onFocus),\r\n 'tag' => $this->code.'-echeck-tax-id'),\r\n array('title' => MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_DL_NUMBER,\r\n 'field' => zen_draw_input_field('echeck_dl_num', '', 'maxlength=\"50\" id=\"'.$this->code.'-echeck-dl-num\"' . $onFocus),\r\n 'tag' => $this->code.'-echeck-dl-num'),\r\n array('title' => MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_DL_STATE,\r\n 'field' => zen_draw_pull_down_menu('echeck_dl_state', $dl_states, '', 'id=\"'.$this->code.'-echeck-dl-state\"' . $onFocus),\r\n 'tag' => $this->code.'-echeck-dl-state'),\r\n array('title' => MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_DL_DOB_TEXT,\r\n 'field' => zen_draw_input_field('echeck_dl_dob', '', 'maxlength=\"11\" id=\"'.$this->code.'-echeck-dl-dob\"' . $onFocus) . ' ' . MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_DL_DOB_FORMAT,\r\n 'tag' => $this->code.'-echeck-dl-dob') ));\r\n }\r\n return $selection;\r\n }", "function caldol_add_options_members_filter(){\n\techo '<option value=\"TomChoice\">doggie</option>';\n\t\t\n}", "function twispay_tw_get_suppress_email( $tw_lang ) {\n // Wordpress database reference\n global $wpdb;\n $html = '';\n $table_name = $wpdb->prefix . 'twispay_tw_configuration';\n\n $suppress_email = $wpdb->get_results( \"SELECT suppress_email FROM $table_name\" );\n\n if ( $suppress_email ) {\n $html .= '<select name=\"suppress_email\" id=\"suppress_email\">';\n foreach ( $suppress_email as $e_s ) {\n if ( $e_s->suppress_email == 1 ) {\n $html .= '<option value=\"1\" selected>' . esc_html( $tw_lang['live_mode_option_true'] ) . '</option>';\n $html .= '<option value=\"0\">' . esc_html( $tw_lang['live_mode_option_false'] ) . '</option>';\n }\n else {\n $html .= '<option value=\"1\">' . esc_html( $tw_lang['live_mode_option_true'] ) . '</option>';\n $html .= '<option value=\"0\" selected>' . esc_html( $tw_lang['live_mode_option_false'] ) . '</option>';\n }\n\n break;\n }\n $html .= '</select>';\n\n return $html;\n }\n}", "function pqrc_display_select_field()\n {\n global $pqrc_countries;\n $option = get_option('pqrc_select');\n\n printf('<select id=\"%s\" name=\"%s\">', 'pqrc_select', 'pqrc_select');\n foreach ($pqrc_countries as $country) {\n $selected = '';\n if ($option == $country) {\n $selected = 'selected';\n }\n printf('<option value=\"%s\" %s>%s</option>', $country, $selected, $country);\n }\n echo \"</select>\";\n }", "function populatelist ($lstname, $str_query, $str_firstvalue=\"-1\", $str_firstoption = \"\", $str_selected = \"\", $bln_disabled = false, $str_event = \"\", $str_style = \"\") {\n\n $rsRES = mysql_query($str_query) or die (mysql_error() . $str_query);\n $str_disable = \"\";\n if ($bln_disabled == true){\n $str_disable = \"disabled\";\n }\n echo '<select name=\"' . $lstname . '\"' . $str_disable . ' ' . $str_event . ' ' . $str_style . '>';\n if ( trim($str_firstoption) != \"\" && is_null($str_firstoption) == false ) {\n if ( $str_selected == $str_firstvalue ) {\n echo '<option selected=\"selected\" value=\"' . $str_firstvalue . '\">';\n echo $str_firstoption;\n echo '</option>';\n }\n else {\n echo '<option value=\"' . $str_firstvalue . '\">' . $str_firstoption . '</option>';\n }\n }\n while ($arrRES = mysql_fetch_array($rsRES)) {\n if ( $str_selected == $arrRES[0] ) {\n echo '<option selected=\"selected\" value=\"' . $arrRES[0] . '\">';\n echo $arrRES[1];\n echo '</option>';\n }\n else {\n echo '<option value=\"' . $arrRES[0] . '\">' . $arrRES[1] . '</option>';\n }\n }\n echo '</select>';\n}", "function GetUser()\n\t{\t\n\t\t\t$userid=$this->input->post('usertypeID');\n\t\t\tif(!empty($userid))\n\t\t\t{\n\t\t\t\t\t$usertype=$this->AddProperty_model->getuser($this->input->post('usertypeID'));\n\t\t\t\t\tif(!empty($usertype)){\n\t\t\t\t\t\techo\"<option value=''>Select User</option>\";\n\t\t\t\t\t\tforeach($usertype as $usertypes){\n\t\t\t\t\t\t\techo\"<option value=\".$usertypes->userID.\">$usertypes->userEmail</option>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}else{\n\t\t\t\t\t\techo\"<option>No user Found!</option>\";\n\t\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t\n\t\t\t}\n\t\t\n\t}", "function makeSelectElement($list, $pre_selected='', $fullinfo=false, $extra=array())\n{\n $select_elem = '';\n foreach ( $list as $item ) {\n if ( $item->getId() == $pre_selected ) {\n $selected = ' selected';\n } else {\n $selected = '';\n }\n $name = htmlspecialchars($item->getFullName());\n $id = htmlspecialchars($item->getId());\n if ( $fullinfo ) {\n $id = \"{$name} ({$id})\";\n $name = $id;\n }\n $select_elem .= <<<HTML\n <option value=\"{$id}\"{$selected}>{$name}</option>\n\nHTML;\n }\n if ( !empty($extra) ) {\n $select_elem .= <<<HTML\n <option value=\"{$extra['id']}\">{$extra['name']}</option>\nHTML;\n\n }\n return $select_elem;\n}", "public function handleSelectedWarehouseEmail()\n\t{\n\t\tif($this->emailSendTo->Text)\n\t\t{\n\t\t\t$this->emailSendTo->Text = $this->emailSendTo->Text . \";\" . $this->emailWarehouse->getSelectedValue();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->emailSendTo->Text = $this->emailWarehouse->getSelectedValue();\n\t\t}\n\t\t$this->emailWarehouse->setSelectedValue(0);\n\t\t$this->emailWarehouse->Text = \"\";\n\t}", "public function infoUsuariosPorProyectoList(){\n\n $usuarios = UsersModel::infoUsuariosPorProyecto(\"usuario\", $_SESSION[\"id_project\"]);\n \n foreach ($usuarios as $row => $item) {\n echo '<option value=\"'.$item[\"Email\"].'\">'.$item[\"Email\"].'</option>'; \n }\n\n }", "function echoSelected($fieldname){\n\t#echo \"199\".$fieldname.$this->request['option']; exit;\n\t\tif($this->request['option']==$fieldname)\n\t\t\techo \" selected\";\n\t}", "public function getCMSFields_forPopup() {\n\t\t\n\t\t$fields = new FieldSet(\n\t\t\tnew TextField('EmailSubject', _t('UserDefinedForm.EMAILSUBJECT', 'Email Subject')),\n\t\t\tnew TextField('EmailFrom', _t('UserDefinedForm.FROMADDRESS','Send Email From')),\n\t\t\tnew TextField('EmailAddress', _t('UserDefinedForm.SENDEMAILTO','Send Email To')),\n\t\t\tnew CheckboxField('HideFormData', _t('UserDefinedForm.HIDEFORMDATA', 'Hide Form Data from Email')),\n\t\t\tnew CheckboxField('SendPlain', _t('UserDefinedForm.SENDPLAIN', 'Send Email as Plain Text (HTML will be stripped)')),\n\t\t\tnew TextareaField('EmailBody', 'Body')\n\t\t);\n\t\t\n\t\tif($this->Form()) {\n\t\t\t$validEmailFields = DataObject::get(\"EditableEmailField\", \"\\\"ParentID\\\" = '$this->FormID'\");\n\t\t\t$multiOptionFields = DataObject::get(\"EditableMultipleOptionField\", \"\\\"ParentID\\\" = '$this->FormID'\");\n\t\t\t\n\t\t\t// if they have email fields then we could send from it\n\t\t\tif($validEmailFields) {\n\t\t\t\t$fields->insertAfter(new DropdownField('SendEmailFromFieldID', _t('UserDefinedForm.ORSELECTAFIELDTOUSEASFROM', '.. or Select a Form Field to use as the From Address'), $validEmailFields->toDropdownMap('ID', 'Title'), '', null,\"\"), 'EmailFrom');\n\t\t\t}\n\t\t\t\n\t\t\t// if they have multiple options\n\t\t\tif($multiOptionFields || $validEmailFields) {\n\t\t\t\tif($multiOptionFields && $validEmailFields) {\n\t\t\t\t\t$multiOptionFields->merge($validEmailFields);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telseif(!$multiOptionFields) {\n\t\t\t\t\t$multiOptionFields = $validEmailFields;\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$multiOptionFields = $multiOptionFields->toDropdownMap('ID', 'Title');\n\t\t\t\t$fields->insertAfter(new DropdownField('SendEmailToFieldID', _t('UserDefinedForm.ORSELECTAFIELDTOUSEASTO', '.. or Select a Field to use as the To Address'), $multiOptionFields, '', null, \"\"), 'EmailAddress');\n\t\t\t}\n\t\t}\n\n\t\treturn $fields;\n\t}", "function select($name = \"txt\", $alttext = \"\", $selecttype = \"array\", $lookup = \"\", $value = \"\", $event = \"\", $cssid = \"\", $readonly = false, $nochoose = true) {\n\n if (isset($_REQUEST[$name])) {\n if ($value == \"\") {\n $value = $_REQUEST[$name];\n }\n }\n $lookuplist = [];\n if ($selecttype == \"array\" || $selecttype == \"multiarray\") {\n\n if (is_array($lookup)) {\n $lookuplist = $lookup;\n } else {\n $lookuplist = explode(\"|\", $lookup);\n }\n } else if ($selecttype == \"sql\" || $selecttype == \"multisql\") {\n $lookuprow = $this->DEB->getRows($lookup, DEB_ARRAY); //format [0] = NAME\n\n\n foreach ($lookuprow as $irow => $row) {\n $lookuplist[$irow] = $row[0] . \",\" . $row[1]; //make it in the form of array\n }\n }\n //make options for the type of select etc .....\n if ($selecttype == \"multiarray\" || $selecttype == \"multisql\") {\n $options = \"multiple=\\\"multiple\\\"\";\n } else {\n $options = \"\";\n }\n if ($readonly == true) {\n $disabled = \"disabled=\\\"disabled\\\"\";\n } else {\n $disabled = \"\";\n }\n //default text\n if ($alttext == \"\") {\n $alttext = \"Choose\";\n }\n if ($cssid != \"\") {\n $cssid = \"id=\\\"{$cssid}\\\"\";\n } else {\n $cssid = \"\";\n }\n $html = \"<select class=\\\"form-control\\\" $cssid name=\\\"{$name}\\\" $options {$event} $disabled >\";\n\n if (!$nochoose) {\n $html .= \"<option value=\\\"\\\">{$alttext}</option>\";\n }\n\n foreach ($lookuplist as $lid => $option) {\n\n $toption = explode(\",\", $option);\n if (count($toption) != 2) {\n $toption[0] = $lid;\n $toption[1] = $option;\n }\n\n $option = $toption;\n\n if (trim($value) == trim($option[0])) {\n $html .= \"<option selected=\\\"selected\\\" value=\\\"{$option[0]}\\\">{$option[1]}</option>\";\n } else {\n $html .= \"<option value=\\\"{$option[0]}\\\">{$option[1]}</option>\";\n }\n }\n $html .= \"</select>\";\n return $html;\n }", "function PKG_showAllPackageSelections($selName,$first,$addFirstEntry=\"\")\n{\n\treturn(HTML_listSelection($selName,PKG_getAllPackageSelections($addFirstEntry),$first));\n}", "public function showMailOptions()\n\t{\n\t\t/**\n\t\t * @var $ilTabs ilTabsGUI\n\t\t * @var $lng ilLanguage\n\t\t * @var $rbacsystem ilRbacSystem\n\t\t */\n\t\tglobal $ilTabs, $lng, $rbacsystem;\n\n\t\tinclude_once 'Services/Mail/classes/class.ilMailGlobalServices.php';\n\t\tif(!$rbacsystem->checkAccess('internal_mail', ilMailGlobalServices::getMailObjectRefId()))\n\t\t{\n\t\t\t$this->ilias->raiseError($lng->txt('permission_denied'), $this->ilias->error_obj->MESSAGE);\n\t\t}\n\t\t\n\t\t$lng->loadLanguageModule('mail');\n\t\t\n\t\t$this->__initSubTabs('showMailOptions');\n\t\t$ilTabs->activateTab('mail_settings');\n\n\t\t$this->setHeader();\n\n\t\t$this->initMailOptionsForm();\n\t\t$this->setMailOptionsValuesByDB();\n\n\t\t$this->tpl->setContent($this->form->getHTML());\n\t\t$this->tpl->show();\n\t}", "public function getForSelect()\n {\n return $this->all()->lists('full_name', 'id')->all();\n }", "protected function getSelection() : string {\n\n\t\t\t$selection = [];\n\n\t\t\tforeach ($this->definition->getParamsSecure() as $field) $selection[] = ('ent.' . $field);\n\n\t\t\t# ------------------------\n\n\t\t\treturn implode(', ', $selection);\n\t\t}", "function get_subject_by_standard($eid=null){\n\t\t$html1='<option value=\"\">--Select--</option>';\n\t\t$result=$this->ObjM->get_subject_by_standard($eid);\n\t\tfor($i=0;$i<count($result);$i++){\n\t\t\t$sel=($result[$i]['subject_code']==$selected) ? \"selected='selected'\" : \"\";\n\t\t\t$html1.='<option '.$sel.' value=\"'.$result[$i]['subject_code'].'\">'.$result[$i]['subject_name'].'</option>';\n\t\t}\n\t\treturn $html1;\n\t}", "function hundope_select_field_render() { \n\t\n}", "public function SelectMail(){\n\n $CantidadMails = ($this->ConfigModelo->select('select', 'Mensajes', 'estado', '0', 'Id', 'Id'));\n return $CantidadMails;\n\n }", "function SelectedContact() {\n\t\t\n\t\t$data['display_block2'] = \"\";\n\t\t\t\n\t\t//Get the master id of the selected contact from the Post variable\n $master_id = $this->input->post('master_id');\n\n\t\t//Get the contact details for this master_id from all tables\n $data['display_block2'] .= $this->AddressBook->getSelectedContactDetails($master_id);\n\n //Fill the select box again - better to save this off but do like this for the moment\n $data['display_block'] = $this->AddressBook->selectContacts();\n\n //View the selected contacts dropdown and the details for the selected contact \n $this->load->view('SelectEntry', $data);\n }", "function AddDropLog()\r\n{\r\n if (session_id() == '')\r\n {\r\n session_start();\r\n }\r\n if (isset($_SESSION))\r\n {\r\n if (!empty($_SESSION) && !empty($_SESSION['email']))\r\n {\r\n $driver = $_SESSION['email'];\r\n $ID = GrabData(\"delivery\",\"ID\",\"driver\",$driver);\r\n if ($ID != false)\r\n {\r\n for ($i = 0; $i < countResults($ID); $i++)\r\n {\r\n echo \"<option value=\" . $ID[$i]['ID'];\r\n echo \">\" . $ID[$i]['ID'] . \"</option>\";\r\n }\r\n }\r\n else \r\n {\r\n echo \"<option value=\\\"\\\">No deliveries assigned</option>\";\r\n }\r\n \r\n \r\n }\r\n }\r\n}", "public function getEmails(){\r\n \r\n $dbConfig = array(\r\n \"DB_DNS\" => 'mysql:host=localhost;port=3306;dbname=PHPadvClassSpring2015',\r\n \"DB_USER\" => 'root', \r\n \"DB_PASSWORD\" => '');\r\n $pdo = new DB($dbConfig);\r\n $db = $pdo->getDB();\r\n $stmt = $db->prepare(\"SELECT * FROM emailtype where active = 1\");\r\n if ($stmt->execute() && $stmt->rowCount() > 0) {\r\n $results = $stmt->fetchAll(PDO::FETCH_ASSOC);\r\n echo '<h3>Types of E-mails</h3>';\r\n foreach ($results as $value) {\r\n echo '<p>- <strong>', $value['emailtype'], '</strong></p>';\r\n }\r\n } else {\r\n echo '<p>No data found!</p>';\r\n } \r\n \r\n }", "public function column_email($item)\n {\n }", "public function column_email($item)\n {\n }", "function bls_sf_selectForTypes() {\n\tbls_ut_backTrace(\"bls_sf_selectForTypes\");\n\tglobal $bls_sf_location;\n\n\techo \"<select name=\\\"s_pkg_srctype\\\">\";\n\tforeach ($bls_sf_location as $key => $val) {\n\t\techo \"<option value=\\\"$key\\\">$val</option>\";\n\t}\n\techo \"</select>\";\n}", "public function display_all_supplier()\n {\n \n if ( ! file_exists(APPPATH.'views/pages/list.php'))\n {\n // Whoops, we don't have a page for that!\n show_404();\n }\n if (!isset($this->session->userdata['user_role']) || $this->session->userdata['user_role'] < 40)\n {\n $this->session->set_flashdata('message', 'Vous devez avoir les droits de superviseur');\n redirect($_SERVER['HTTP_REFERER']); \n } \n \n $data['title'] = 'Liste des Fournisseurs'; // Capitalize the first letter\n $data['membres'] = $this->member_model->get_by_type('name = \"Fournisseur\" OR name = \"Fournisseur Or\"');\n\n // breadcrumb\n $data['breadcrumbs'] = $this->breadcrumbs('liste');\n \n $this->load->template('pages/list_members',$data);\n }", "function render_field_select($field)\n {\n }", "function select() {\n // TODO: clb.organization_name should only be selected if a primary relationship exists.\n return \"\n contact_a.id AS contact_id,\n contact_a.last_name,\n contact_a.first_name,\n contact_a.preferred_language,\n ca.street_address as contact_street_address,\n ca.postal_code as contact_postal_code,\n ca.city as contact_city,\n cc.name as contact_country,\n email,\n phone,\n clb.organization_name\n \";\n }", "function mailchimp_list(){\n\t\t$list = $this->mailchimp->lists(array(), 0, 25);\n\t\tif($list) {\n\t\t\t$this->sci->assign('maindata' , $list['data']);\n\t\t\t$this->sci->assign('total' , $list['total']);\n\t\t}\n\t\t//print_r($list);\n\t\t$this->sci->da('mailchimp_list.htm');\n\t}", "function select_customer()\n {\n $data = array();\n $customer_id = $this->input->post(\"term\");\n \n if ($this->Customer->account_number_exists($customer_id))\n {\n $customer_id = $this->Customer->customer_id_from_account_number($customer_id);\n }\n \n if ($this->Customer->exists($customer_id))\n {\n $this->sale_lib->set_customer($customer_id);\n if($this->config->item('automatically_email_receipt'))\n {\n $this->sale_lib->set_email_receipt(1);\n }\n }\n else\n {\n $data['error']=lang('sales_unable_to_add_customer');\n }\n $this->_reload($data);\n }", "function get_contact_supplier_info($acc_s_id) {\n\t# Dim some Vars\n\t\tglobal $_DBCFG, $db_coin;\n\t\t$_cinfo = array(\"s_id\" => 0, \"s_name_first\" => '', \"s_name_last\" => '', \"s_company\" => '', \"s_email\" => '');\n\n\t# Set Query for select and execute\n\t\t$query\t = 'SELECT s_id, s_name_first, s_name_last, s_company, s_email FROM '.$_DBCFG['suppliers'];\n\t\t$query\t.= ' WHERE s_id='.$acc_s_id.' ORDER BY s_company ASC, s_name_last ASC, s_name_first ASC';\n\t\t$result\t= $db_coin->db_query_execute($query);\n\t\tIF ($db_coin->db_query_numrows($result)) {\n\t\t\twhile(list($s_id, $s_name_first, $s_name_last, $s_company, $s_email) = $db_coin->db_fetch_row($result)) {\n\t\t\t\t$_cinfo['s_id']\t\t= $s_id;\n\t\t\t\t$_cinfo['s_name_first']\t= $s_name_first;\n\t\t\t\t$_cinfo['s_name_last']\t= $s_name_last;\n\t\t\t\t$_cinfo['s_company']\t= $s_company;\n\t\t\t\t$_cinfo['s_email']\t\t= $s_email;\n\t\t\t}\n\t\t}\n\t\treturn $_cinfo;\n}", "function do_contact_supplier_email($adata, $aret_flag=0) {\n\t# Dim Some Vars\n\t\tglobal $_CCFG, $_TCFG, $_DBCFG, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp;\n\n\t# Check if we are sending to an additional email instead of the clients regular address\n\t\t$pos = strpos(strtolower($adata['cc_s_id']), \"alias\");\n\t\tif ($pos !== false) {\n\t\t\t$pieces\t= explode('|', $adata['cc_cl_id']);\n\t\t\t$_ccinfot\t= get_contact_supplier_info_alias($pieces[1], 0);\n\t\t\t$_ccinfo\t= $_ccinfot[1];\n\t } ELSE {\n\t\t# Get supplier contact information array\n\t\t\t$_ccinfo\t= get_contact_supplier_info($adata['cc_s_id']);\n\t\t}\n\n\t# Get site contact information array\n\t\t$_mcinfo = get_contact_info($adata['cc_mc_id']);\n\n\t# Set eMail Parameters (pre-eval template, some used in template)\n\t\tIF ($_CCFG['_PKG_SAFE_EMAIL_ADDRESS']) {\n \t\t\t$mail['recip']\t\t= $_ccinfo['s_email'];\n\t\t\t$mail['from']\t\t= $_mcinfo['c_email'];\n\t\t\t$mail['cc']\t\t= $_mcinfo['c_email'];\n\t\t} ELSE {\n\t\t\tIF ($_ccinfo['s_name_first'] && $_ccinfo['s_name_last']) {\n\t\t\t\t$mail['recip'] = $_ccinfo['s_name_first'].' '.$_ccinfo['s_name_last'].' <'.$_ccinfo['s_email'].'>';\n\t\t\t} ELSE {\n\t\t\t\t$mail['recip'] = $_ccinfo['s_company'].' <'.$_ccinfo['s_email'].'>';\n\t\t\t}\n\t\t\t$mail['from']\t\t= $_mcinfo['c_name'].' <'.$_mcinfo['c_email'].'>';\n\t\t\t$mail['cc']\t\t= $_mcinfo['c_name'].' <'.$_mcinfo['c_email'].'>';\n\t\t}\n\n\t\tIF ($_CCFG['MAIL_USE_CUSTOM_SUBJECT']) {\n\t\t\t$mail['subject']\t= $adata['cc_subj'];\n\t\t} ELSE {\n\t\t\t$mail['subject']\t= $_CCFG['_PKG_NAME_SHORT'].$_LANG['_MAIL']['CC_FORM_SUBJECT_PRE'];\n\t\t}\n\n\t# Set MTP (Mail Template Parameters) array\n\t\tIF ($_ccinfo['s_name_first'] && $_ccinfo['s_name_last']) {\n\t\t\t$_MTP['to_name']\t= $_ccinfo['s_name_first'].' '.$_ccinfo['s_name_last'];\n\t\t} ELSE {\n\t\t\t$_MTP['to_name']\t= $_ccinfo['s_company'];\n\t\t}\n\t\t$_MTP['to_email']\t= $_ccinfo['s_email'];\n\t\t$_MTP['from_name']\t= $_mcinfo['c_name'];\n\t\t$_MTP['from_email']\t= $_mcinfo['c_email'];\n\t\t$_MTP['subject']\t= $adata['cc_subj'];\n\t\t$_MTP['message']\t= $adata['cc_msg'];\n\t\t$_MTP['site']\t\t= $_CCFG['_PKG_NAME_SHORT'];\n\n\t# Load message template (processed)\n\t\t$mail['message']\t= get_mail_template('email_contact_supplier_form', $_MTP);\n\n\t# Call basic email function (ret=0 on error)\n\t\t$_ret = do_mail_basic($mail);\n\n\t# Check return\n\t\tIF ($_ret) {\n\t\t\t$_ret_msg = $_LANG['_MAIL']['CC_FORM_MSG_02_L1'];\n\t\t\t$_ret_msg .= '<br>'.$_LANG['_MAIL']['CC_FORM_MSG_02_L2'];\n\t\t} ELSE {\n\t\t\t$_ret_msg = $_LANG['_MAIL']['CC_FORM_MSG_03_L1'];\n\t\t}\n\n\t# Build Title String, Content String, and Footer Menu String\n\t\t$_tstr = $_LANG['_MAIL']['CC_FORM_RESULT_TITLE'];\n\n\t\t$_cstr .= '<center>'.$_nl;\n\t\t$_cstr .= '<table cellpadding=\"5\" width=\"100%\">'.$_nl;\n\t\t$_cstr .= '<tr><td class=\"TP5MED_NC\">'.$_nl;\n\t\t$_cstr .= $_ret_msg.$_nl;\n\t\t$_cstr .= '</td></tr>'.$_nl;\n\t\t$_cstr .= '</table>'.$_nl;\n\t\t$_cstr .= '</center>'.$_nl;\n\n\t\t$_mstr_flag\t= 0;\n\t\t$_mstr\t\t= '&nbsp;'.$_nl;\n\n\t# Call block it function\n\t\t$_out .= do_mod_block_it($_tstr, $_cstr, $_mstr_flag, $_mstr, '1');\n\t\t$_out .= '<br>'.$_nl;\n\n\t\tIF ($aret_flag) {return $_out;} ELSE {echo $_out;}\n}", "function selectAskPriceSupplierStatus($selected='',$short=0)\n {\n global $langs;\n\n $sql = \"SELECT id, code, label, active FROM \".MAIN_DB_PREFIX.\"c_propalst\";\n $sql .= \" WHERE active = 1\";\n\n dol_syslog(get_class($this).\"::selectAskPriceSupplierStatus\", LOG_DEBUG);\n $resql=$this->db->query($sql);\n if ($resql)\n {\n print '<select class=\"flat\" name=\"askpricesupplier_statut\">';\n print '<option value=\"\">&nbsp;</option>';\n $num = $this->db->num_rows($resql);\n $i = 0;\n if ($num)\n {\n while ($i < $num)\n {\n $obj = $this->db->fetch_object($resql);\n if ($selected == $obj->id)\n {\n print '<option value=\"'.$obj->id.'\" selected>';\n }\n else\n {\n print '<option value=\"'.$obj->id.'\">';\n }\n $key=$obj->code;\n if ($langs->trans(\"PropalStatus\".$key.($short?'Short':'')) != \"PropalStatus\".$key.($short?'Short':''))\n {\n print $langs->trans(\"PropalStatus\".$key.($short?'Short':''));\n }\n else\n {\n $conv_to_new_code=array('PR_DRAFT'=>'Draft','PR_OPEN'=>'Opened','PR_CLOSED'=>'Closed','PR_SIGNED'=>'Signed','PR_NOTSIGNED'=>'NotSigned','PR_FAC'=>'Billed');\n if (! empty($conv_to_new_code[$obj->code])) $key=$conv_to_new_code[$obj->code];\n print ($langs->trans(\"PropalStatus\".$key.($short?'Short':''))!=\"PropalStatus\".$key.($short?'Short':''))?$langs->trans(\"PropalStatus\".$key.($short?'Short':'')):$obj->label;\n }\n print '</option>';\n $i++;\n }\n }\n print '</select>';\n }\n else\n {\n dol_print_error($this->db);\n }\n }", "public function mostrarInfoEquipo(){\n\n $infoEquipo = UsersModel::mostrarInfoTablas(\"manager\");\n\n foreach($infoEquipo as $row => $tipo){\n\n if($tipo[\"Id_Manager\"] > 1){\n\n echo '<option value=\"'.$tipo[\"Id_Manager\"].'\">'.$tipo[\"NameM\"].'</option>'; \n\n }\n\n }\n \n }", "function select_option()\r\n{}", "function grantsCreateFieldHtml( $field_name = FALSE, $field_value = FALSE, $options = array() )\n{\n global $db, $grants_fields, $grants_primary_key;\n if ($field_name === FALSE or $field_value === FALSE) return FALSE; \n\n // print_r($grants_fields);\n // echo $field_name;\n\n if ( !in_array($field_name, array_keys($grants_fields)) ){\n trigger_error($field_name . ' is not a recognized field in the grants table.');\n return FALSE;\n }\n\n $field_value = encode($field_value);\n\n $return_html = '';\n\n // set up opening divs and spans\n $return_html .= '<div class=\"field\">';\n $return_html .= '<div class=\"form-group\">';\n\n // set up the label\n $return_html .= '<label class=\"control-label col-xs-4\" for=\"'. $field_name . '\">'. convertFieldName($field_name) .'</label>';\n\n // handle special fields, e.g. drop down lookups\n $special_fields = array('status');\n if ( in_array($field_name, $special_fields) ){\n switch ($field_name) {\n case 'status':\n\n $lookups = getLookups('grants', 'status');\n\n // set up the select element\n $return_html .= '<div class=\"col-xs-8\">';\n $return_html .= '<select class=\"form-control \" id=\"' . $field_name . '\" name=\"'. $field_name .'\">';\n\n // deal with the possibility that the db has a value that is not on the lookup list\n if ( !empty($field_value) && array_search($field_value, array_column($lookups, 'lookup_value')) === FALSE ){\n $return_html .= '<option class=\"drop-down-option-default\" value=\"\" selected disabled>'. $field_value .' [invalid option]</option>';\n } else {\n $return_html .= '<option class=\"drop-down-option-default\" value=\"\"></option>';\n }\n foreach ($lookups as $key => $lookup) {\n $return_html .= '<option class=\"drop-down-option\" value=\"'. $lookup['lookup_value'] .'\" ';\n if ( $lookup['lookup_value'] === $field_value ) {\n $return_html .= 'selected';\n }\n $return_html .= '>'. $lookup['label'] . '</option>';\n }\n $return_html .= '</select>';\n $return_html .= '</div>';\n break;\n }\n } else {\n // do stuff for normal fields\n\n // figure out if i have integer, string, text, date, etc.\n // based on the DBAL Types\n $field_type = $grants_fields[$field_name]->getType();\n\n // echo \"my field type: \";\n // echo $field_type;\n switch ($field_type) {\n case 'Integer':\n case 'Decimal':\n case 'String':\n case 'Date':\n // add a normal input field for all four types\n $return_html .= '<div class=\"col-xs-8\">';\n $return_html .= '<input class=\"form-control\" type=\"text\" id=\"' . $field_name . '\" name=\"'. $field_name .'\" value=\"'. $field_value .'\"';\n if ($field_name === $grants_primary_key) {\n $return_html .= ' readonly';\n }\n $return_html .= ' />';\n $return_html .= '</div>';\n break;\n // TODO make date fields a date picker input\n case 'Text':\n $return_html .= '<div class=\"col-xs-8\">';\n $return_html .= '<textarea class=\"form-control\" rows=\"2\" id=\"'. $field_name . '\" name=\"'. $field_name . '\">' . $field_value . '</textarea>';\n $return_html .= '</div>';\n break;\n default:\n // TODO add a default\n break;\n } // end switch\n } // end if field name is in special fields\n\n // apply options\n\n // close the divs and spans\n $return_html .= '</div>'; // close form-group; \n $return_html .= '</div>'; // close field;\n\n return $return_html;\n\n}", "function form_staff( $dbh, $field_id, $selected_jid ) {\n\t\t$query = \"SELECT `name`, `xmpp` FROM `staff` WHERE `xmpp` != ''\";\n\t\t$query .= \" AND (`end_date` = '0000-00-00' OR `end_date` >= '2015-03-20')\";\n\t\t$query .= \" ORDER BY `name`\";\n\t\t$res = $dbh->query( $query );\n\t\t$res->data_seek( 0 );\n\t\techo '<select name=\"select_' . $field_id . '\">';\n\t\techo '<option value=\"\">Any</option>';\n\t\twhile( $row = $res->fetch_assoc() ) {\n\t\t\techo '<option value=\"' . $row[ 'xmpp' ] . '\"';\n\t\t\tif( $row[ 'xmpp' ] == $selected_jid ) {\n\t\t\t\techo ' selected=\"selected\"';\n\t\t\t}\n\t\t\techo '>' . $row[ 'name' ] . '</option>';\n\t\t}\n\t\techo '</select>';\n\t}", "function nice_get_entries()\n\t{\n\t\t$_m=$GLOBALS['SITE_DB']->query_select('f_welcome_emails',array('*'));\n\t\t$entries=new ocp_tempcode();\n\t\tforeach ($_m as $m)\n\t\t{\n\t\t\t$entries->attach(form_input_list_entry(strval($m['id']),false,$m['w_name']));\n\t\t}\n\n\t\treturn $entries;\n\t}", "private function createUsersSelect(): ?string\n {\n $HTML = \"<select name='user_for_admin'>\";\n // Create select option from each row in the array.\n foreach ($this->fetchUsers() as $row) {\n list('user_id' => $userID, 'email' => $email, 'first_name' => $firstName, 'last_name' => $lastName) = $row;\n $HTML .= \"<option value=$userID>$lastName $firstName ($email)</option>\";\n }\n $HTML .= \"</select>\";\n return $HTML;\n }" ]
[ "0.72284275", "0.6165431", "0.6056979", "0.59823215", "0.5956728", "0.59533775", "0.58541936", "0.57612777", "0.5747015", "0.5694604", "0.56943625", "0.56774485", "0.56399715", "0.5569345", "0.5537811", "0.552397", "0.5484817", "0.54840535", "0.5479395", "0.5476864", "0.54493684", "0.54450995", "0.54246974", "0.541825", "0.54134196", "0.53851914", "0.5377689", "0.5366084", "0.53521764", "0.534728", "0.5338451", "0.5332427", "0.53200746", "0.5306593", "0.5306292", "0.5301542", "0.529283", "0.528961", "0.5284973", "0.52794963", "0.52731496", "0.52501047", "0.5247426", "0.52290446", "0.52269155", "0.52185816", "0.52175105", "0.5216935", "0.521642", "0.52154654", "0.5215134", "0.5211484", "0.520515", "0.52011704", "0.5197053", "0.5195909", "0.5195845", "0.51857406", "0.51848453", "0.517416", "0.5173015", "0.5166743", "0.51653606", "0.51620376", "0.51544017", "0.51467896", "0.5145775", "0.5144242", "0.5143016", "0.51381844", "0.51381475", "0.51349694", "0.5134708", "0.5134614", "0.512958", "0.51255184", "0.5123392", "0.51113874", "0.5104146", "0.5104048", "0.5095983", "0.5092006", "0.5089369", "0.50868696", "0.5085196", "0.5078157", "0.50759995", "0.5072958", "0.5071673", "0.506683", "0.50655484", "0.5053185", "0.5049775", "0.5043859", "0.5043232", "0.50362796", "0.5035419", "0.5031288", "0.50290793", "0.50285596" ]
0.77125174
0