query
stringlengths
10
8.11k
document
stringlengths
17
398k
negatives
sequencelengths
19
20
metadata
dict
/ Display a new metabox on the order screen including data collected here and mapping meals
function order_meta_box() { global $post; $order_id = $post->ID; $user_id = get_post_meta( $order_id, '_customer_user', true ); $order_date = get_post_meta( $order_id, 'order_date', true ); $items = $this->get_order_items( $order_id ); $lines = array(); foreach ( $items as $item ) { $product_id = intval( $item['product_id'] ); $quantity = intval( $item['quantity'] ); $meal = $this->get_meal_data( $product_id, $user_id, $order_date ); if ( is_null( $meal ) ) { $product = get_post( $product_id ); $meal_name = $product->post_title; } else { $meal_name = $meal->post_title; } $lines[] = $meal_name . ' x ' . $quantity; } echo '<p><strong>' . __('Date') . ':</strong> ' . esc_html( get_post_meta( $order_id, 'order_date', true ) ) . '</p>'; echo '<p><strong>' . __('Notes') . ':</strong> ' . esc_html( $post->post_excerpt ) . '</p>'; echo '<p><strong>' . __('Meal') . ':</strong> <ul style="list-style-type: disc;margin-left: 20px;">'; foreach ( $lines as $line ) { echo '<li>' . esc_html( $line ) . '</li>'; } echo '</ul></p>'; }
[ "public function add_meta_box() {\n\t\tadd_meta_box( 'mo-food-details', __( 'Food Details', 'mobile-order' ), array( $this, 'display_meta_box' ), 'food' );\n\t}", "function my_em_event_order_boxes(){ \n\tadd_meta_box('em-event-order', 'Order Details', 'my_em_event_order_metabox','tribe_events', 'side','low');\n}", "function omb_metabox_display() {\n add_meta_box( \"omb_metabox_id\", __( \"Meta Info\", \"our-metabox\" ), array( $this, \"omb_metabox_add\" ), array( \"post\" ), \"normal\" );\n add_meta_box( \"omb_upload_id\", __( \"Image Info\", \"our-metabox\" ), array( $this, \"omb_image_info\" ), array( \"post\" ), \"normal\" );\n add_meta_box( \"omb_gallery_id\", __( \"Gallery Info\", \"our-metabox\" ), array( $this, \"omb_gallery_info\" ), array( \"post\" ), \"normal\" );\n }", "function display_additional_meta_data(){}", "function add_meta_box() {\n add_meta_box('sent_mail_details', 'Sent Mail Details', array(&$this, 'show_meta_box'), 'sent_mail', 'normal', 'high');\n }", "function tafri_travel_pro_posttype_bn_populartour_meta_box() {\n add_meta_box( 'tafri-travel-pro-posttype-populartour-meta', __( 'Enter Details', 'tafri-travel-pro-posttype' ), 'tafri_travel_pro_posttype_bn_populartour_meta_callback', 'populartour', 'normal', 'high' );\n}", "function print_abandoned_cart_details_metabox( $post ) {\n\t\tdo_action( 'it_exchange_before_abandoned_cart_details' );\n\t\t?><p>Here i am</p><?php\n\t\tdo_action( 'it_exchange_after_abandoned_cart_details' );\n\t}", "function Ingridients_Meta_Box() {\n add_meta_box (\n \t 'ingridients_meta_box_id',\n \t __('Ingridients', 'text-domain') ,\n \t 'Ingridients_Meta_Box_Callback',\n \t 'food'\n );\n}", "function create_metabox() \n\t{\n \tadd_meta_box( 'product_details_meta_box',\n 'Product Details',\n array($this, 'display_product_details_meta_box'),\n 'Product', 'normal', 'high'\n );\n\t}", "public function output_metabox() {\n\t\t$cmb = $this->init_metabox();\n\t\t$cmb->show_form( $cmb->object_id(), $cmb->object_type() );\n\t}", "public function metabox() {\n\t\t\n\t\t/**\n\t\t * Initialize the metabox\n\t\t */\n\t\t$cmb = new_cmb2_box( array(\n\t\t\t'id' => 'expedia_hotel_id',\n\t\t\t'title' => __( 'Expedia Hotel ID', 'cmb2' ),\n\t\t\t'object_types' => array( 'hawaii-hotels', ), // Post type\n\t\t\t'context' => 'side',\n\t\t\t'priority' => 'high',\n\t\t\t'closed' => true,\n\t\t\t'show_names' => false, // Show field names on the left\n\t\t\t'show_on_cb' => [ $this, 'excludeFromPages' ],\n\t\t) );\n\n\t\t// Regular text field\n\t\t$cmb->add_field( array(\n\t\t\t'name' => __( 'Expedia Hotel ID', 'cmb2' ),\n\t\t\t'id' => '_expedia_hotel_id',\n\t\t\t'type' => 'text_small',\n\t\t\t'sanitization_cb' => [ $this, 'sanitize' ], // custom sanitization callback parameter\n\t\t\t'on_front' => false, // Optionally designate a field to wp-admin only\n\t\t\t'attributes' => array(\n\t\t\t\t'placeholder' => 'Must be 6 numbers',\n\t\t\t),\n\t\t\t'render_row_cb' => [$this, 'renderRow'],\n\t\t) );\n\t\t\n\t}", "function carton_order_items_meta_box( $post ) {\n\tglobal $wpdb, $thepostid, $theorder, $carton;\n\n\tif ( ! is_object( $theorder ) )\n\t\t$theorder = new CTN_Order( $thepostid );\n\n\t$order = $theorder;\n\n\t$data = get_post_meta( $post->ID );\n\t?>\n\t<div class=\"carton_order_items_wrapper\">\n\t\t<table cellpadding=\"0\" cellspacing=\"0\" class=\"carton_order_items\">\n\t\t\t<thead>\n\t\t\t\t<tr>\n\t\t\t\t\t<th><input type=\"checkbox\" class=\"check-column\" /></th>\n\t\t\t\t\t<th class=\"item\" colspan=\"2\"><?php _e( 'Item', 'carton' ); ?></th>\n\n\t\t\t\t\t<?php do_action( 'carton_admin_order_item_headers' ); ?>\n\n\t\t\t\t\t<?php if ( get_option( 'carton_calc_taxes' ) == 'yes' ) : ?>\n\t\t\t\t\t\t<th class=\"tax_class\"><?php _e( 'Tax Class', 'carton' ); ?>&nbsp;<a class=\"tips\" data-tip=\"<?php _e( 'Tax class for the line item', 'carton' ); ?>.\" href=\"#\">[?]</a></th>\n\t\t\t\t\t<?php endif; ?>\n\n\t\t\t\t\t<th class=\"quantity\"><?php _e( 'Qty', 'carton' ); ?></th>\n\n\t\t\t\t\t<th class=\"line_cost\"><?php _e( 'Cost', 'carton' ); ?>&nbsp;<a class=\"tips\" data-tip=\"<?php _e( 'Line subtotals are before pre-tax discounts, totals are after.', 'carton' ); ?>\" href=\"#\">[?]</a></th>\n\n\t\t\t\t\t<?php if ( get_option( 'carton_calc_taxes' ) == 'yes' ) : ?>\n\t\t\t\t\t\t<th class=\"line_tax\"><?php _e( 'Tax', 'carton' ); ?></th>\n\t\t\t\t\t<?php endif; ?>\n\t\t\t\t</tr>\n\t\t\t</thead>\n\t\t\t<tbody id=\"order_items_list\">\n\n\t\t\t\t<?php\n\t\t\t\t\t// List order items\n\t\t\t\t\t$order_items = $order->get_items( apply_filters( 'carton_admin_order_item_types', array( 'line_item', 'fee' ) ) );\n\n\t\t\t\t\tforeach ( $order_items as $item_id => $item ) {\n\n\t\t\t\t\t\tswitch ( $item['type'] ) {\n\t\t\t\t\t\t\tcase 'line_item' :\n\t\t\t\t\t\t\t\t$_product \t= $order->get_product_from_item( $item );\n\t\t\t\t\t\t\t\t$item_meta \t= $order->get_item_meta( $item_id );\n\n\t\t\t\t\t\t\t\tif ( $_product )\n\t\t\t\t\t\t\t\t\tinclude( 'order-item-html.php' );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'fee' :\n\t\t\t\t\t\t\t\tinclude( 'order-fee-html.php' );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tdo_action( 'carton_order_item_' . $item['type'] . '_html' );\n\n\t\t\t\t\t}\n\t\t\t\t?>\n\t\t\t</tbody>\n\t\t</table>\n\t</div>\n\n\t<p class=\"bulk_actions\">\n\t\t<select>\n\t\t\t<option value=\"\"><?php _e( 'Actions', 'carton' ); ?></option>\n\t\t\t<optgroup label=\"<?php _e( 'Edit', 'carton' ); ?>\">\n\t\t\t\t<option value=\"delete\"><?php _e( 'Delete Lines', 'carton' ); ?></option>\n\t\t\t</optgroup>\n\t\t\t<optgroup label=\"<?php _e( 'Stock Actions', 'carton' ); ?>\">\n\t\t\t\t<option value=\"reduce_stock\"><?php _e( 'Reduce Line Stock', 'carton' ); ?></option>\n\t\t\t\t<option value=\"increase_stock\"><?php _e( 'Increase Line Stock', 'carton' ); ?></option>\n\t\t\t</optgroup>\n\t\t</select>\n\n\t\t<button type=\"button\" class=\"button do_bulk_action wc-reload\" title=\"<?php _e( 'Apply', 'carton' ); ?>\"><span><?php _e( 'Apply', 'carton' ); ?></span></button>\n\t</p>\n\n\t<p class=\"add_items\">\n\t\t<select id=\"add_item_id\" class=\"ajax_chosen_select_products_and_variations\" multiple=\"multiple\" data-placeholder=\"<?php _e( 'Search for a product&hellip;', 'carton' ); ?>\" style=\"width: 400px\"></select>\n\n\t\t<button type=\"button\" class=\"button add_order_item\"><?php _e( 'Add item(s)', 'carton' ); ?></button>\n\t\t<button type=\"button\" class=\"button add_order_fee\"><?php _e( 'Add fee', 'carton' ); ?></button>\n\t</p>\n\t<div class=\"clear\"></div>\n\t<?php\n}", "public function detailsMetaBox() {\n\t\tglobal $post;\n\t\t$taxes = get_terms('series', array(\n\t\t\t'hide_empty' => false\n\t\t));\n\t\t$series = array();\n\t\t$the_term_query = new WP_Term_Query(array(\n\t\t\t'taxonomy' => 'series',\n\t\t\t'hide_empty' => false\n\t\t));\n\t\tforeach ($the_term_query->get_terms() as $term) {\n\t\t\t$series[$term->slug] = $term->name;\n\t\t}\n\t\t$this->theme->set('series', $series);\n\t\t$data = $this->theme->metaToData($post->ID);\n\t\t$selectedSeries = wp_get_post_terms($post->ID, 'series');\n\t\t$data['tax_input']['series'] = isset($selectedSeries[0]) ? $selectedSeries[0]->slug: null;\n\t\t$this->theme->set('data', $data);\n\t\techo $this->theme->render('message'.DS.'message_details_meta_box');\n\t}", "function add() {\n\t\tadd_meta_box($this->_meta_box['id'], $this->_meta_box['title'], array(&$this, 'show'), 'page', $this->_meta_box['context'], $this->_meta_box['priority']);\n\t}", "public function add_meta_box() {\n\t\tadd_meta_box( 'woocommerce-shipment-tracking', __( 'Shipment Tracking', 'woocommerce-shipment-tracking' ), array( $this, 'meta_box' ), 'shop_order', 'side', 'high' );\n\t}", "function add_meta_box() {\n\t\t\t\tadd_meta_box( 'woocommerce-shipment-tracking', __('Shipment Tracking', 'wc_shipment_tracking'), array( &$this, 'meta_box' ), 'shop_order', 'side', 'high');\n\t\t\t}", "function displayMetaBoxe(){\n global $post; \n $originalID = pn_find_original_id($this->name); \n \n ?> \n <table class='tableMeta' style='width:100%'> \n <?php\n \n foreach($this->models as $modelName => $model){ \n $data = pn_get_model_raw_data(\"posttype\", $modelName, $model, $originalID); \n pn_select_input_template($modelName, $model, $data); \n }\n \n ?> \n </table>\n <input type=\"hidden\" name=\"_safeWpMeta\" value=\"0\" />\n <?php \n }", "function dil_metabox_further_info() {\n add_meta_box( \n 'further-info', \n 'Further Information', \n 'dil_further_info_metabox_content', \n 'post', \n 'advanced', \n 'high' \n );\n}", "function add_products_metaboxes() {\n\tadd_meta_box('cf_product_details', 'Product Details', 'cf_product_details', 'product', 'normal', 'high');\n}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test splicing elements from collection
public function testSpliceWithoutArgs() { $slice = $this->collection->splice(); $this->assertInstanceOf(Collection::class, $slice); $this->assertAttributeEquals([], 'elements', $slice); $this->assertAttributeEquals([1, 2, 3], 'elements', $this->collection); }
[ "public function testSlice()\n {\n $slice = $this->collection->slice(1, 1);\n\n $this->assertInstanceOf(Collection::class, $slice);\n $this->assertAttributeEquals([1 => 2], 'elements', $slice);\n $this->assertAttributeEquals([1, 2, 3], 'elements', $this->collection);\n }", "public function testSpliceWithScalarReplacement()\n {\n $slice = $this->collection->splice(1, 1, 7);\n\n $this->assertInstanceOf(Collection::class, $slice);\n $this->assertAttributeEquals([2], 'elements', $slice);\n $this->assertAttributeEquals([1, 7, 3], 'elements', $this->collection);\n }", "public function testShift()\n {\n $element = $this->collection->shift();\n\n $this->assertCount(2, $this->collection);\n $this->assertFalse($this->collection->contains(1));\n $this->assertEquals(1, $element);\n }", "public function testSliceWithoutArgs()\n {\n $slice = $this->collection->slice();\n\n $this->assertInstanceOf(Collection::class, $slice);\n $this->assertAttributeEquals([], 'elements', $slice);\n $this->assertAttributeEquals([1, 2, 3], 'elements', $this->collection);\n }", "public function testCollectionUnShift()\n {\n $seedArray = [];\n $expected = [1];\n $collection = new Collection($seedArray);\n\n $this->assertEquals($collection->arrayResult(), []);\n\n $collection->unshift(1);\n\n $this->assertEquals($collection->arrayResult(), $expected);\n }", "public function testSetRemove1()\n {\n $initialItems = [1, 2, 3, 4, 5, 6];\n $valueToRemove = 3;\n $this->set->addAll($initialItems);\n $this->set->remove($valueToRemove);\n\n $this->assertEquals(2, array_search(4, $this->set->toArray()));\n $this->assertFalse($this->set->contains($valueToRemove));\n }", "public function test_can_pop_from_tail(): void {\n\t\t$initial_data = array( 1, 2, 3, 4 );\n\t\t$collection = Collection::from( $initial_data );\n\n\t\t// Test we can pop and its removed.\n\t\t$this->assertEquals( 4, $collection->pop() );\n\t\t$this->assertArrayNotHasKey( 3, $collection->to_array() );\n\n\t\t$this->assertEquals( 3, $collection->pop() );\n\t\t$this->assertArrayNotHasKey( 2, $collection->to_array() );\n\t}", "public function testSkipWithTraversableNonIterator(): void\n {\n $collection = new Collection($this->datePeriod('2017-01-01', '2017-01-07'));\n $result = $collection->skip(3)->toList();\n $expected = [\n new DateTime('2017-01-04'),\n new DateTime('2017-01-05'),\n new DateTime('2017-01-06'),\n ];\n $this->assertEquals($expected, $result);\n }", "public function testSkipOverflow(): void\n {\n $collection = new Collection([1, 2, 3]);\n $this->assertEquals([], $collection->skip(3)->toArray());\n $this->assertEquals([], $collection->skip(4)->toArray());\n }", "public function testUnshift()\n {\n $this->collection->unshift(0);\n\n $this->assertCount(4, $this->collection);\n $this->assertTrue($this->collection->contains(0));\n $this->assertEquals(0, $this->collection->get(0));\n }", "public function testLimitWithTake()\n {\n $data = array('foo', 'bar', 'baz', 'quux', 'foobar', 'barbaz');\n foreach ($data as $value) {\n $this->collection->add($value);\n }\n\n $collection = $this->collection->take(3);\n\n $this->assertEquals(3, count($collection));\n $this->assertEquals(\n array('foo', 'bar', 'baz'),\n $collection->toArray()\n );\n }", "public function retainAll($collection) {\n $newcollection = array_fill_keys($collection, true);\n $origlength = $this->size(); \n $this->elements = array_intersect_key($this->elements, $newcollection);\n return !($origlength == $this->size());\n }", "public function testSlice() {\n\t\t$this->assertEquals(['integer' => 12345], $this->object->slice(0, 1));\n\n\t\t$this->assertEquals([\n\t\t\t'zero' => 0,\n\t\t\t'empty' => '',\n\t\t\t'map' => ['foo' => 'bar']\n\t\t], $this->object->slice(5, 3));\n\n\t\t$this->assertEquals([\n\t\t\t'map' => ['foo' => 'bar'],\n\t\t\t'array' => ['foo', 'bar']\n\t\t], $this->object->slice(7));\n\t}", "public function testRemoveElementWillReturnTrueIfTheElementIsInArray()\n {\n $element1 = new \\stdClass();\n $element1->Name = 'EL 1';\n\n $element2 = new \\stdClass();\n $element2->Name = 'EL 2';\n\n $Collection = new \\MySQLExtractor\\Common\\Collection();\n\n $Collection->set('index2', $element2);\n $Collection->set('index1', $element1);\n\n $this->assertTrue($Collection->removeElement($element2));\n }", "public function testGetSubset()\n {\n $class = AbstractContainerCollection::class;\n \n $mock = clone $this->testInstance;\n $mock->setAll(array(\"key51\"=>\"value51\"));\n \n $array = array(\n \"key1\" => \"value1\",\n \"key2\" => \"value2\",\n \"key3\" => \"value3\",\n \"key4\" => array(\n \"key41\" => \"value41\",\n \"key42\" => \"value42\"\n ),\n \"key5\" => $mock\n );\n \n $this->testInstance->setAll($array);\n \n foreach (array_keys($array) as $key) {\n $this->assertInstanceOf(\n $class,\n $this->testInstance->getSubset($key),\n sprintf(\n \"The instance of %s is expected to return\".\n \" instance of %s when the method %s is called\",\n $class,\n $class,\n \"getSubset\"\n )\n );\n }\n\n $this->assertTrue(\n empty($this->testInstance->getSubset(\"key1\")->toArray()),\n sprintf(\n \"The instance of %s is expected to\".\n \" return an empty subset for the key %s\".\n \" containing %s\",\n $class,\n \"key1\",\n json_encode($array[\"key1\"])\n )\n );\n $this->assertTrue(\n empty($this->testInstance->getSubset(\"key2\")->toArray()),\n sprintf(\n \"The instance of %s is expected to\".\n \" return an empty subset for the key %s\".\n \" containing %s\",\n $class,\n \"key2\",\n json_encode($array[\"key2\"])\n )\n );\n $this->assertTrue(\n empty($this->testInstance->getSubset(\"key3\")->toArray()),\n sprintf(\n \"The instance of %s is expected to\".\n \" return an empty subset for the key %s\".\n \" containing %s\",\n $class,\n \"key3\",\n json_encode($array[\"key3\"])\n )\n );\n $this->assertFalse(\n empty($this->testInstance->getSubset(\"key4\")->toArray()),\n sprintf(\n \"The instance of %s is expected to\".\n \" return an hydrated subset for the key %s\".\n \" containing %s\",\n $class,\n \"key4\",\n json_encode($array[\"key4\"])\n )\n );\n $this->assertFalse(\n empty($this->testInstance->getSubset(\"key5\")->toArray()),\n sprintf(\n \"The instance of %s is expected to\".\n \" return an hydrated subset for the key %s\".\n \" containing %s\",\n $class,\n \"key5\",\n json_encode($array[\"key5\"])\n )\n );\n }", "public function testDeleteSliceSort()\n {\n $scenario = self::getPeopleScenario();\n\n $method = <<<'EOS'\ndelete(\n slice(sort(people, age), :start, :stop)\n)\nEOS;\n\n $mysql = <<<'EOS'\nDELETE\n FROM `People`\n ORDER BY `People`.`Age` ASC\n LIMIT :0\nEOS;\n\n $phpInput = <<<'EOS'\nif (!array_key_exists('stop', $input)) {\n throw new Exception('stop', 1);\n}\n\nif (!array_key_exists('start', $input)) {\n throw new Exception('start', 1);\n}\n\nif (\n is_integer($input['stop']) && is_integer($input['start'])\n) {\n $output = array(\n ':0' => $input['stop'] - $input['start']\n );\n} else {\n $output = null;\n}\nEOS;\n\n $phpOutput = <<<'EOS'\n$output = true;\nEOS;\n\n $this->verifyResult($scenario, $method, $mysql, $phpInput, $phpOutput);\n }", "public function testSetRemove2()\n {\n $initialItem = [1, 2, 3, 4, 5, 6];\n $valueToRemove = 7;\n $this->set->addAll($initialItem);\n\n $this->assertFalse($this->set->remove($valueToRemove));\n }", "function drop_first( $collection, $callback ) {\n\n\t\t$result = array();\n\n\t\t$drop = true;\n\t\tforeach ( $collection as $index => $element ) {\n\n\t\t\tif ( $drop ) {\n\t\t\t\tif ( !call_user_func( $callback, $element, $index, $collection ) ) {\n\t\t\t\t\t$drop = false;\n\t\t\t\t} else {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$result[$index] = $element;\n\t\t}\n\n\t\treturn $result;\n\t}", "public function testRemoveFromList()\n {\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
test no results when retrieving a fundraiser name
public function testGetFundraiserNameNoResults() { $id = 100; $results = Mockery::mock('Illuminate\Database\Eloquent\Collection'); $results->shouldReceive('isEmpty')->andReturn(true); $model = Mockery::mock('App\Fundraiser'); $model->shouldReceive('select')->andReturn($model); $model->shouldReceive('where')->with('id', '=', $id)->andReturns($model); $model->shouldReceive('get')->andReturns($results); $repository = new \App\Repositories\DBFundraiserRepository($model); $name = $repository->getName($id); $this->assertSame('', $name); }
[ "public function testGetFundraiserName()\n {\n $id = 1;\n\n $fundraiser = new \\StdClass;\n $fundraiser->fundraiser_name = 'Test Case';\n\n $results = Mockery::mock('Illuminate\\Database\\Eloquent\\Collection');\n $results->shouldReceive('isEmpty')->andReturn(false);\n $results->shouldReceive('first')->andReturn($fundraiser);\n\n $model = Mockery::mock('App\\Fundraiser');\n $model->shouldReceive('select')->andReturn($model);\n $model->shouldReceive('where')->with('id', '=', $id)->andReturns($model);\n $model->shouldReceive('get')->andReturns($results);\n\n $repository = new \\App\\Repositories\\DBFundraiserRepository($model);\n $name = $repository->getName($id);\n\n $this->assertSame('Test Case', $name);\n }", "public function testShowingRestaurantsResultsWhenSubmittingExistingMealName()\n {\n $response = $this->post('/find-restaurants-v2', [\n 'meal_name' => 'Fried Chicken',\n ]);\n\n $response->assertSee('table');\n }", "public function testGetFullNameNoOrder() {\n $enquiry = $this->enquiriesTable->retrieveRecord('id', 1)[0];\n\n $this->assertEmpty($enquiry->getFullName(''));\n }", "function notFound($name){\n $initial = getCount($name);\n if(!$initial){\n printError(\"Error: Pokemon $name not found in your Pokedex.\");\n }\n }", "public function testRetrieveCreatorName()\n {\n $userId = 1;\n\n $this->assertEquals('', $this->creator->retrieveCreatorName(UserContextInterface::USER_TYPE_GUEST, $userId));\n }", "public function testGetDealerNoAccount()\n {\n // Set parameters\n $params = [\n 'token' => '1234'\n ];\n \n // Do Request\n $this->_request('GET', '/api/1.5.0/report-sales-dealer', $params)\n ->_result(['error' => 'no-account']);\n }", "function getSupplierName($supplieruid){\n\t\tif ($supplieruid > 0) {\n\t\t\t$result= $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n\t\t\t\t'title',\n\t\t\t\t'tx_commerce_supplier',\n\t\t\t\t'uid = '.intval($supplieruid)\n\t\t\t);\n\t\t\tif ($GLOBALS['TYPO3_DB']->sql_num_rows($result)==1) {\n\t\t\t\t$return_data = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result);\n\t\t\t\treturn $return_data['title'];\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public function is_survey_name_valid()\n {\n //get_survey_by_user_name($name)\n $name=$_GET['name'];\n $data=$this->survey->get_survey_by_user_name($name);\n if(empty($data))\n {\n echo json_encode('true');\n }\n else\n {\n echo json_encode('false');\n }\n }", "function chkAbsent($username){\r\n\t\t// pass it to the next level\r\n\t\t$date = date('Y-m-d');\r\n\t\t$startdate = $date.\" 08:00:00\";\t// of the morning \r\n\t\t$enddate = $date.\" 21:30:00\";\t // of the afternoon\r\n\t\t\r\n\t\t$select = $this->select();\r\n\r\n\t\t$select->where('username like ?',$username);\r\n\t\t$select->where('type like ?','absent');\r\n\t\t$select->where(\"datetime between '$startdate' and '$enddate'\");\r\n\t\t$detail = $this->fetchAll($select);\r\n\t\t\r\n\t\t$count = $detail->count();\t\r\n\r\n\t\tif($count > 0){\t\t\t\t\t\t\r\n\t\t\tif ($detail->approver_alternative){\r\n\t\t\treturn $detail->approver_alternative;\t\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\treturn '';\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}else {\t\t\t\r\n\t\t\treturn 'present';\r\n\t\t}\r\n\t}", "public function testRetreiveFund()\n {\n }", "function no_sulfuras($name){\n return ($name!='Sulfuras, Hand of Ragnaros');\n }", "function surferExists($surferName) {\n if (trim($surferName) != '') {\n $sql = \"SELECT surfer_id\n FROM %s\n WHERE surfer_handle = '%s'\";\n $params = array($this->tableCommunitySurfers, $surferName);\n if ($res = $this->databaseQueryFmt($sql, $params)) {\n if ($row = $res->fetchRow()) {\n return $row[0];\n }\n }\n }\n return FALSE;\n }", "public function payerExist(){\r\n $payerId = $this->getPayerRef();\r\n $customer = Mage::getModel('customer/customer')->load($payerId);\r\n if(!$customer->getId()){\r\n $customer = $payerId;\r\n }\r\n\r\n $collection = mage::getModel('realex/tokencard')->getCollection()->addCustomerFilter($customer);\r\n\r\n if($collection->count() > 0){\r\n return '1';\r\n }\r\n return '0';\r\n }", "public function testNotFoundKeywordNameFilter()\n {\n //Creates a random user\n $user = factory(User::class)->create(['name' => 'Willian Rodrigues']);\n //acting as user created\n $this->actingAs($user);\n //make request\n $response = $this->json('GET', '/api/users?name=Cesar');\n //checks if found user\n $response->assertJsonFragment([\n 'total' => 0,\n 'data' => []\n ]);\n }", "public function test_find_business_by_name()\n\t{\t\t\n\t\t\t\n\t\t\n\t}", "public function testNameIsReturned(): void\n {\n $currency = Currency::valueOf(Currencies::TEST);\n\n self::assertEquals('Code reserved for testing purposes', $currency->getName());\n }", "public function testInvalidFurName(){\n\t\t\t$furVars =[\n\t\t\t\t'name' => '',\n\t\t\t\t'description' => 'Nice Dresser',\n\t\t\t\t'price' => '900.12',\n\t\t\t\t'categoryId' => '5',\n\t\t\t\t'fur_condition' => 'NEW'\n\t\t\t];\n\t\t\t$properTest = saveFuncFurniture($furVars);\n\t\t\t$this->assertFalse($properTest);\n\t\t}", "function isFund($name, $dbh)\n{\n\n\t$sql = \"SELECT * FROM fund_cash where name = :name\";\t\n\t$query = $dbh->prepare($sql);\n\t$query->bindValue(':name', $name);\n\t$query->execute();\n\n\ttry{\n\t\tif ($query->rowCount() > 0)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t}\n\tcatch (PDOException $e)\n\t{\n\t\techo \"Error checking isFund()<br>\";\n\t}\n\n\treturn false;\n}", "function checkName() {\n\t\tglobal $NET_ID, $FULL_NAME;\n\t\t$db = new Database();\n\t\t$studentsDAO = &$db->getStudentsDAO();\n\t\t$success = true;\n\n\t\t$result = $studentsDAO->getStudentName($NET_ID);\n\t\tif(Database::getNextRow($result)['full_name'] == '')\n\t\t\t$success = $studentsDAO->addStudentName($NET_ID, $FULL_NAME);\n\n\t\t$db->close($success);\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Filter the query on the ctps_serie column Example usage: $query>filterByCtpsSerie('fooValue'); // WHERE ctps_serie = 'fooValue' $query>filterByCtpsSerie('%fooValue%'); // WHERE ctps_serie LIKE '%fooValue%'
public function filterByCtpsSerie($ctpsSerie = null, $comparison = null) { if (null === $comparison) { if (is_array($ctpsSerie)) { $comparison = Criteria::IN; } elseif (preg_match('/[\%\*]/', $ctpsSerie)) { $ctpsSerie = str_replace('*', '%', $ctpsSerie); $comparison = Criteria::LIKE; } } return $this->addUsingAlias(PfInformacoesPeer::CTPS_SERIE, $ctpsSerie, $comparison); }
[ "public function filterBySerie($serie = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($serie)) {\n $comparison = Criteria::IN;\n } elseif (preg_match('/[\\%\\*]/', $serie)) {\n $serie = str_replace('*', '%', $serie);\n $comparison = Criteria::LIKE;\n }\n }\n\n return $this->addUsingAlias(TransaccionPeer::SERIE, $serie, $comparison);\n }", "public function filterBySerie($serie = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($serie)) {\n $comparison = Criteria::IN;\n } elseif (preg_match('/[\\%\\*]/', $serie)) {\n $serie = str_replace('*', '%', $serie);\n $comparison = Criteria::LIKE;\n }\n }\n\n return $this->addUsingAlias(FacturaPeer::SERIE, $serie, $comparison);\n }", "function filterBy_S_A_F_E($SEDE, $AREA, $FACULTAD, $ESCUELA,$TABLE_I)\n{\n global $mysqli;\n $TINS = $TABLE_I;\n $query = new Query($mysqli, \"SELECT red,nombre,apellido,CONCAT(provincia,'-',clave,'-',tomo,'-',folio)AS cedula,n_ins,sede,fac_ia,esc_ia,car_ia,fac_iia,esc_iia,car_iia,fac_iiia,esc_iiia,car_iiia\n FROM \" .$TINS. \" where sede = ? AND area_i = ? AND fac_ia = ? AND esc_ia = ? \");\n $parametros = array(\"iiii\", &$SEDE, &$AREA, &$FACULTAD, &$ESCUELA);\n $data = $query->getresults($parametros);\n\n if (isset($data[0])) {\n return $data;\n } else {\n return null;\n }\n\n}", "function filterByS_A_F($SEDE, $AREA, $FACULTAD,$TABLE_I)\n{\n global $mysqli;\n $TINS = $TABLE_I;\n $query = new Query($mysqli, \"SELECT red,nombre,apellido,CONCAT(provincia,'-',clave,'-',tomo,'-',folio)AS cedula,n_ins,sede,fac_ia,esc_ia,car_ia,fac_iia,esc_iia,car_iia,fac_iiia,esc_iiia,car_iiia\n FROM \" .$TINS. \" where sede = ? AND area_i = ? AND fac_ia = ?\");\n $parametros = array(\"iii\", &$SEDE, &$AREA, &$FACULTAD);\n $data = $query->getresults($parametros);\n\n if (isset($data[0])) {\n return $data;\n } else {\n return null;\n }\n\n}", "private function nroSecuenciaFilter($params, &$where, &$queryParams) {\n if($this->paramExists($params, 'nro_secuencia')) {\n $queryParams[':nro_secuencia'] = $params['nro_secuencia'];\n $where = $this->addWhereSentence($where, \"Protocolo.nro_secuencia = :nro_secuencia\");\n }\n }", "public function filter($value);", "public function prepare_field_filter_statement($column = '', $value = '')\n\t{\n\t\t// Carrega controlador CI para uso de funcoes internas\n\t\t$CI =& get_instance();\n\t\t$CI->load->library('acme/validation');\n\t\t\n\t\t// Só acrescenta a linha caso o valor do campo seja diferente de vazio\n\t\tif($value != '')\n\t\t{\n\t\t\tif($CI->validation->is_integer_($value) || $CI->validation->is_float_($value))\n\t\t\t{\n\t\t\t\treturn \" AND $column = $value\";\n\t\t\t}\n\t\t\n\t\t\telseif($CI->validation->is_alfa($value))\n\t\t\t{\n\t\t\t\treturn \" AND $column LIKE '%\" . $this->db->escape_like_str($value) . \"%'\";\n\t\t\t}\n\t\t\n\t\t\telseif($CI->validation->is_currency($value))\n\t\t\t{\n\t\t\t\treturn \" AND $column = '\" . $value . \"'\";\n\t\t\t}\n\t\t\t\n\t\t\telseif(isset($value)) \n\t\t\t{\n\t\t\t\treturn \" AND $column LIKE '%\" . $this->db->escape_like_str($value) . \"%'\";\n\t\t\t}\n\t\t}\n\t}", "protected function getFilter()\n {\n \t$filtros = \" 1 = 1 \";\n if (Session::getInstance()->get($this->namefilter)!=\"\") {\n $filters =(object)Session::getInstance()->get($this->namefilter);\n if ($filters->contenidos_fecha != '') {\n $filtros = $filtros.\" AND contenidos_fecha LIKE '%\".$filters->contenidos_fecha.\"%'\";\n }\n if ($filters->contenidos_seccion != '') {\n $filtros = $filtros.\" AND contenidos_seccion ='\".$filters->contenidos_seccion.\"'\";\n }\n if ($filters->contenidos_estado != '') {\n $filtros = $filtros.\" AND contenidos_estado ='\".$filters->contenidos_estado.\"'\";\n }\n if ($filters->contenidos_titulo != '') {\n $filtros = $filtros.\" AND contenidos_titulo LIKE '%\".$filters->contenidos_titulo.\"%'\";\n }\n\t\t}\n return $filtros;\n }", "public function filterByCelular($celular = null, $comparison = null)\n\t{\n\t\tif (null === $comparison) {\n\t\t\tif (is_array($celular)) {\n\t\t\t\t$comparison = Criteria::IN;\n\t\t\t} elseif (preg_match('/[\\%\\*]/', $celular)) {\n\t\t\t\t$celular = str_replace('*', '%', $celular);\n\t\t\t\t$comparison = Criteria::LIKE;\n\t\t\t}\n\t\t}\n\t\treturn $this->addUsingAlias(ClientePeer::CELULAR, $celular, $comparison);\n\t}", "public function actionFilterTable()\n {\n //get all params from post(or get)\n $client_name = Yii::app()->request->getParam('cli_name', '');\n $client_type_id = Yii::app()->request->getParam('cli_type_id',null);\n $invoice_code = Yii::app()->request->getParam('in_code','');\n $operation_status_id = Yii::app()->request->getParam('in_status_id','');\n $stock_city_id = Yii::app()->request->getParam('stock_city_id','');\n $date_from_str = Yii::app()->request->getParam('date_from_str','');\n $date_to_str = Yii::app()->request->getParam('date_to_str','');\n $page = Yii::app()->request->getParam('page',1);\n $on_page = Yii::app()->request->getParam('on_page',3);\n\n //date range by default\n $time_from = 0;\n $time_to = time() + (60 * 60 * 24);\n\n //criteria\n $c = new CDbCriteria();\n\n //if client name not empty\n if(!empty($client_name))\n {\n if(!empty($client_type_id))\n {\n //if not company (physical person)\n if($client_type_id != 1)\n {\n $names = explode(\" \",$client_name,2);\n if(count($names) > 1)\n {\n $c -> addCondition('client.name LIKE \"%'.$names[0].'%\" AND client.surname LIKE \"%'.$names[1].'%\"');\n }\n else\n {\n $c -> addCondition('client.name LIKE \"%'.$client_name.'%\"');\n }\n }\n\n //if company\n else\n {\n $c -> addCondition('client.company_name LIKE \"%'.$client_name.'%\"');\n }\n }\n else\n {\n $names = explode(\" \",$client_name,2);\n if(count($names) > 1)\n {\n $c -> addCondition('client.name LIKE \"%'.$names[0].'%\" AND client.surname LIKE \"%'.$names[1].'%\" OR client.company_name LIKE \"%'.$client_name.'%\"');\n }\n else\n {\n $c -> addCondition('client.name LIKE \"%'.$client_name.'%\" OR client.company_name LIKE \"%'.$client_name.'%\"');\n }\n }\n }\n elseif(!empty($client_type_id))\n {\n $c -> addCondition('client.type = '.$client_type_id.'');\n }\n\n if(!empty($stock_city_id))\n {\n $c -> addCondition('stock.location_id = '.$stock_city_id.'');\n }\n\n //if given dates\n if(!empty($date_from_str))\n {\n $dt = DateTime::createFromFormat('m/d/Y',$date_from_str);\n $time_from = $dt->getTimestamp();\n }\n if(!empty($date_to_str))\n {\n $dt = DateTime::createFromFormat('m/d/Y',$date_to_str);\n $time_to = $dt->getTimestamp();\n $time_to += (60*60*24); //add one day\n }\n\n //if invoice code set\n if(!empty($invoice_code))\n {\n $c -> addInCondition('invoice_code',array($invoice_code));\n }\n\n //if operation status set\n if(!empty($operation_status_id))\n {\n $c -> addInCondition('status_id',array($operation_status_id));\n }\n\n //search between times\n $c -> addBetweenCondition('date_created_ops',$time_from,$time_to);\n\n //get all items by conditions and limit them by criteria\n $operations = OperationsOut::model()->with(array('client','stock.location'))->findAll($c);\n\n $pagination = new CPagerComponent($operations,$on_page,$page);\n\n //render partial\n $this->renderPartial('_ajax_table_filtering',array('pager' => $pagination));\n\n }", "public function getFilteredWithCuisine($cuisineId) {\n // $filterString = $this->getFiltersQuery();\n\n $query = \n mysql_query(\"SELECT sm_user_reco_small.fbid AS fbid,\n sm_user_reco_small.resId AS resId,\n sm_user_reco_small.rating AS rating\n FROM sm_restaurant_info, sm_user_reco_small, sm_res_cuisine\n WHERE sm_user_reco_small.fbid='\".$this->fbid.\"'\n AND sm_user_reco_small.resId = sm_restaurant_info.resId\n AND sm_res_cuisine.cuisineId = \\\"\".$cuisineId.\"\\\"\n AND sm_res_cuisine.resId = sm_restaurant_info.resId\".\n // .$filterString.\n \" ORDER BY rating DESC\")\n or die(mysql_error());\n return $query;\n\n }", "public function where($column, $operator = '', $value = '');", "public function filterBySecuNumber($secuNumber = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($secuNumber)) {\n $comparison = Criteria::IN;\n } elseif (preg_match('/[\\%\\*]/', $secuNumber)) {\n $secuNumber = str_replace('*', '%', $secuNumber);\n $comparison = Criteria::LIKE;\n }\n }\n\n return $this->addUsingAlias(ContactPeer::SECU_NUMBER, $secuNumber, $comparison);\n }", "public function isFiltered(array $datarow, $value);", "function filterProvereniSignali($spodelenie)\n{\n\t# IAG\n\tif(strlen($spodelenie == 1) && $spodelenie = 1)\n\t{\n\t\t$where = \"1 = 1 AND r.proveren = 1\";\n\t}\n\t\n\t# DGS\n\tif(strlen($spodelenie) == 5)\n\t{\n\t\t$where = \"s.pod_id = \".$spodelenie.\" AND r.proveren = 1\";\n\t}\n\n\t# RDG\n\tif(strlen($spodelenie) == 3 && $spodelenie > 100 && $spodelenie < 117)\t\n\t{\n\t\t$where = \"s.glav_pod = \".$spodelenie.\" AND r.proveren = 1\";\n\t}\n\t\n\t# DP\n\tif(strlen($spodelenie) == 3 && $spodelenie > 200 && $spodelenie < 207)\t\n\t{\n\t\t$where = \"dgs.DP_ID = \".$spodelenie.\" AND r.proveren = 1\";\n\t}\n\t\t\n\treturn $where;\n}", "public function select_souscategorie(){\n $spathSQL= $this->GLOBALS_INI[\"PATH_HOME\"] . $this->GLOBALS_INI[\"PATH_MODEL\"] . \"select_souscategorie.sql\";\n $this->resultat[\"devis_select_souscategorie\"]= $this->oBdd->getSelectDatas($spathSQL);\n }", "public function filterByIdsucursalcliente($idsucursalcliente = null, $comparison = null)\n {\n if (is_array($idsucursalcliente)) {\n $useMinMax = false;\n if (isset($idsucursalcliente['min'])) {\n $this->addUsingAlias(ContrareciboPeer::IDSUCURSALCLIENTE, $idsucursalcliente['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($idsucursalcliente['max'])) {\n $this->addUsingAlias(ContrareciboPeer::IDSUCURSALCLIENTE, $idsucursalcliente['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(ContrareciboPeer::IDSUCURSALCLIENTE, $idsucursalcliente, $comparison);\n }", "public function filterByReservista($reservista = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($reservista)) {\n $comparison = Criteria::IN;\n } elseif (preg_match('/[\\%\\*]/', $reservista)) {\n $reservista = str_replace('*', '%', $reservista);\n $comparison = Criteria::LIKE;\n }\n }\n\n return $this->addUsingAlias(TbalunoImportPeer::RESERVISTA, $reservista, $comparison);\n }", "private function _prepareFilterValue(array $column, $value)\n {\n if (!isset($column['filter'])) {\n // There is no filter function so we'll search for plain value\n return $value;\n }\n\n // Filter function found - lets use it!\n return $column['filter']($value);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add the list of additional certs to the prefs.
public function addAdditionalCert($key) { $GLOBALS['prefs']->setValue('smime_additional_cert', (is_array($key)) ? implode('', $key) : $key); }
[ "public function loadCertificates(): void\n {\n foreach ($this->certs as &$cert) {\n $cert['content'] = rtrim(file_get_contents($cert['path']));\n }\n }", "function ajax_list_exemption_certificates() {\r\n\tglobal $current_user;\r\n\t\r\n\t//get_currentuserinfo();\r\n\r\n\t$customer_id = is_user_logged_in() ? $current_user->user_login : '';\r\n\r\n\tif ( $customer_id ) {\r\n\t\t$certificates = get_user_exemption_certs( $customer_id );\r\n\r\n\t\tif ( count( $certificates ) > 0 ) {\r\n\t\t\t$final_certificates = new stdClass();\r\n\t\t\t$final_certificates->cert_list = $certificates;\r\n\r\n\t\t\t// Convert to JSON and return\r\n\t\t\tdie( json_encode( $final_certificates ) );\r\n\t\t} else {\r\n\t\t\tdie( '{cert_list:[]}' );\r\n\t\t}\r\n\t} else {\r\n\t\tdie( '{cert_list:[]}' );\r\n\t}\r\n}", "function get_certificates_server($get_includeWebCert=false) {\n\tglobal $config;\n\t$certificates=array();\n\t$a_cert = &$config['cert'];\n\tforeach ($a_cert as $cert)\n\t{\n\t\tif ($get_ca == false && is_webgui_cert($cert['refid']))\n\t\t\tcontinue;\n\n\t\t$purpose = cert_get_purpose($cert['crt']);\n\t\t//$certserverpurpose = $purpose['server'] == 'Yes' ? \" [Server certificate]\" : \"\";\n\t\t$certserverpurpose = \"\";\n\n\t\t$selected = \"\";\n\t\t$caname = \"\";\n\t\t$inuse = \"\";\n\t\t$revoked = \"\";\n\t\t$ca = lookup_ca($cert['caref']);\n\t\tif ($ca)\n\t\t\t$caname = \" (CA: {$ca['descr']})\";\n\t\tif ($pconfig['certref'] == $cert['refid'])\n\t\t\t$selected = \"selected\";\n\t\tif (cert_in_use($cert['refid']))\n\t\t\t$inuse = \" *In Use\";\n\t\tif (is_cert_revoked($cert))\n\t\t$revoked = \" *Revoked\";\n\t\t\n\t\t$usagestr=\"\";\n\t\t$usage = get_certificat_usage($cert['refid']);\n\t\tforeach($usage as $use){\n\t\t\t$usagestr .= \" \" . $use;\n\t\t}\t\t\n\t\tif ($usagestr != \"\")\n\t\t\t$usagestr = \" (\".trim($usagestr).\")\";\n\t\t\n\t\t$certificates[$cert['refid']]['name'] = $cert['descr'] . $caname . $certserverpurpose . $inuse . $revoked . $usagestr;\n\t}\n\treturn $certificates;\n}", "public function setAdditionalExtensions($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::MESSAGE, \\Google\\Cloud\\Security\\PrivateCA\\V1\\X509Extension::class);\n $this->additional_extensions = $arr;\n\n return $this;\n }", "private function loadListChain()\n {\n $arr = explode(\"-----END CERTIFICATE-----\", $this->rawKey);\n foreach ($arr as $a) {\n if (strlen($a) > 20) {\n $cert = \"{$a}-----END CERTIFICATE-----\\n\";\n $this->loadList($cert);\n }\n }\n }", "protected function loadPluginPreferences(): void\n {\n $this->prefs = array_merge(\n $this->getDefaultPluginPreferences(),\n $this->rcmail->user->get_prefs()[$this->ID] ?? []\n );\n }", "public function setSslCertificates(?array $value): void {\n $this->getBackingStore()->set('sslCertificates', $value);\n }", "public function update_privacy_preferences() {\n\t\tif ( ! isset( $_POST[ 'update-privacy-preferences-nonce' ] ) || ! wp_verify_nonce( sanitize_key( $_POST[ 'update-privacy-preferences-nonce' ] ), 'uncode-privacy-update_privacy_preferences' ) ) {\n\t\t\twp_die( esc_html__( 'We could not verify the the security token. Please try again.', 'uncode-privacy' ) );\n\t\t}\n\n\t\t$consents_default_on_list = array_map( 'sanitize_text_field', (array) $_POST[ 'consents_default_on_list' ] );\n\t\t$consents = array_map( 'sanitize_text_field', (array) $_POST[ 'user_consents' ] );\n\t\t$consents_to_save = array();\n\n\t\t// First save all consents that are on by default to off (if unchecked)\n\t\tforeach ( $consents_default_on_list as $consents_on ) {\n\t\t\tif ( ! in_array( $consents_on, $consents ) ) {\n\t\t\t\t$consents_to_save[] = $consents_on . '-off';\n\t\t\t}\n\t\t}\n\n\t\t// Then save the other consents\n\t\tforeach ( $consents as $consent_id ) {\n\t\t\tif ( in_array( $consent_id, $consents_default_on_list ) ) {\n\t\t\t\t$consents_to_save[] = $consent_id . '-on';\n\t\t\t} else {\n\t\t\t\t$consents_to_save[] = $consent_id;\n\t\t\t}\n\t\t}\n\n\t\t$consents_as_json = json_encode( $consents_to_save );\n\n\t\tsetcookie( \"uncode_privacy[consent_types]\", $consents_as_json, time() + YEAR_IN_SECONDS, \"/\" );\n\n\t\tif ( is_user_logged_in() ) {\n\t\t\t$user = wp_get_current_user();\n\n\t\t\tif ( ! empty( $consents_to_save ) ) {\n\t\t\t\tdelete_user_meta( $user->ID, 'uncode_privacy_consents' );\n\n\t\t\t\tforeach ( $consents_to_save as $consent ) {\n\t\t\t\t\t$consent = sanitize_text_field( wp_unslash( $consent ) );\n\t\t\t\t\tadd_user_meta( $user->ID, 'uncode_privacy_consents', $consent );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\twp_safe_redirect( esc_url_raw( wp_get_referer() ) );\n\t\texit;\n\t}", "public function setCertificateList(?array $value): void {\n $this->getBackingStore()->set('certificateList', $value);\n }", "protected function createCertificateBundle() {\n\t\t$path = $this->user->getHome() . '/files_external/';\n\t\t$certs = $this->listCertificates();\n\n\t\t$fh_certs = fopen($path . '/rootcerts.crt', 'w');\n\t\tforeach ($certs as $cert) {\n\t\t\t$file = $path . '/uploads/' . $cert->getName();\n\t\t\t$data = file_get_contents($file);\n\t\t\tif (strpos($data, 'BEGIN CERTIFICATE')) {\n\t\t\t\tfwrite($fh_certs, $data);\n\t\t\t\tfwrite($fh_certs, \"\\r\\n\");\n\t\t\t}\n\t\t}\n\n\t\tfclose($fh_certs);\n\t}", "public function setUserPfxCertificates(?array $value): void {\n $this->getBackingStore()->set('userPfxCertificates', $value);\n }", "public function initCertificadoCupoms()\n\t{\n\t\t$this->collCertificadoCupoms = array();\n\t}", "function squid_get_server_certs() {\n\t$cert_arr = array();\n\t$cert_arr[] = array('refid' => 'none', 'descr' => 'none');\n\tforeach (config_get_path('cert', []) as $cert) {\n\t\t$cert_arr[] = array('refid' => $cert['refid'], 'descr' => $cert['descr']);\n\t}\n\treturn $cert_arr;\n}", "private function caddyEmailInitConf()\n {\n $conf = $GLOBALS[ 'TSFE' ]->tmpl->setup[ 'plugin.' ][ 'tx_caddy_pi1.' ];\n $conf = array_merge( ( array ) $this->conf, ( array ) $conf );\n\n return $conf;\n }", "function get_certificate_options()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n $certificate_manager = new Certificate_Manager();\n $certs = $certificate_manager->get_list();\n\n return $certs;\n }", "public function setHostSslCertificates(?array $value): void {\n $this->getBackingStore()->set('hostSslCertificates', $value);\n }", "protected function addPreferences(array $preferences)\n {\n foreach ($preferences as $key => $input) {\n $this->addPreference($key, $input);\n }\n }", "function onDisplayPreferences() {\r\n\t\t$prefs = $this->prefs;\r\n \t\t\r\n\t\t/* Global *************************************************************/\r\n\t\t$preferences['Download Counter']\t= <<<HERE\r\n<table>\r\n\t<tr>\r\n\t\t<th scope=\"row\">Extensions</th>\r\n\t\t<td><span><input type=\"text\" id=\"fileExtensions\" name=\"fileExtensions\" value=\"{$prefs['fileExtensions']}\" /></span></td>\r\n\t</tr>\r\n\t<tr>\r\n\t\t<td></td>\r\n\t\t<td>A list of comma delimited file extensions, eg. <code>pdf,zip,mpg,mov</code>.</td>\r\n\t</tr>\r\n</table>\r\n\r\nHERE;\r\n\t\t\r\n\t\treturn $preferences;\r\n\t\t}", "public function configureSslPaths() {\n\t\t\n\t\t$helper = Mage::helper('netpayonlinepayments');\n\t\t\n\t\t$this->_ssl_path['use_cert'] = $helper->getApiCertEnabled();\n\t\t$this->_ssl_path['certificate'] = $helper->getApiCert();\n\t\t$this->_ssl_path['key'] = $helper->getApiKey();\n\t\t$this->_ssl_path['certificate_pass'] = $helper->getApiCertPass();\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check if the current profile exists
protected function _profileExists() { $homeDir = trim(`echo \$HOME`); $config = file_get_contents($homeDir . DIRECTORY_SEPARATOR . self::AWS_CONFIG_LOCATION); return strpos($config, "[profile {$this->_profile}]") !== false; }
[ "public function hasProfile(): bool\n {\n return isset($this->columns['profile_id']);\n }", "public function hasProfilePreLoaded()\n {\n return property_exists($this, 'profile') && ! is_null($this->profile);\n }", "function ting_field_search_profile_exists($value) {\n // Retrieve existing profile names.\n $profiles = array_keys(ting_field_search_profiles_load_all());\n\n return in_array($value, $profiles);\n}", "public function hasProfilePicture()\n {\n return !is_null($this->profilePicture);\n }", "public function hasNinjaProfile()\n {\n return !is_null($this->ninjaProfile);\n }", "public function hasBasicProfile()\n {\n\n return true;\n }", "private function mmv_profile_exist(){\n if($this->get_request_method() != \"POST\"){\n $this->response('',406);\n }\n $email = $this->_request['email']; \n $ph = $this->_request['phone'];\n //$password = md5($password);\n if(!empty($email) and !empty($ph)){ \n $query=\"SELECT * FROM mmv_userdet_master WHERE (mmv_phone = '$ph' or mmv_email = '$email')\";\n $r = $this->mysqli->query($query) or die($this->mysqli->error.__LINE__);\n if($r->num_rows>0){\n $result = $r->fetch_assoc();\n echo \"exists\";\n exit;\n } else{\n echo \"not available\";\n exit;\n }\n }\n else{\n echo \"failed\";\n exit;\n }\n }", "protected function isCreateProfile()\n {\n return \\XLite\\Core\\Session::getInstance()->order_create_profile;\n }", "function checkForPermissionProfiles()\n{\n\t$db = database();\n\n\t$result = $db->query('', '\n\t\tSELECT \n\t\t\tid_profile\n\t\tFROM {db_prefix}sp_profiles\n\t\tWHERE type = {int:type}\n\t\tLIMIT {int:limit}',\n\t\tarray(\n\t\t\t'type' => 1,\n\t\t\t'limit' => 1,\n\t\t)\n\t);\n\t$has_permission_profiles = '';\n\tif ($db->num_rows($result) !== 0)\n\t{\n\t\tlist ($has_permission_profiles) = $db->fetch_row($result);\n\t\t$db->free_result($result);\n\t}\n\n\treturn !empty($has_permission_profiles);\n}", "public function IsProfileSet()\n {\n $profile = $this->GetProfile();\n \n $isSet = !is_null($profile);\n \n return $isSet;\n }", "function envato_user_exist() {\r\n\t\t\t\r\n\t\t\t$url = 'http://marketplace.envato.com/api/v2/' . $this->user_login . '/' . $this->api . '/account.json';\r\n\t\t\t$credentials = @file_get_contents( $url );\r\n\t\t\t\r\n\t\t\tif( $credentials ) {\r\n\t\t\t\treturn true;\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\t\t\r\n\t\t\t}\r\n\t\t}", "function checkForStyleProfiles()\n{\n\t$db = database();\n\n\t// Do style profiles exist already?\n\t$result = $db->query('', '\n\t\tSELECT\n\t\t\tid_profile\n\t\tFROM {db_prefix}sp_profiles\n\t\tWHERE type = {int:type}\n\t\tLIMIT {int:limit}',\n\t\tarray(\n\t\t\t'type' => 2,\n\t\t\t'limit' => 1,\n\t\t)\n\t);\n\t$has_style_profiles = '';\n\tif ($db->num_rows($result) !== 0)\n\t{\n\t\tlist ($has_style_profiles) = $db->fetch_row($result);\n\t\t$db->free_result($result);\n\t}\n\n\treturn !empty($has_style_profiles);\n}", "private static function _shouldProfile(): bool\n {\n if (self::$_shouldProfile !== null) {\n return self::$_shouldProfile;\n }\n\n if (YII_DEBUG) {\n return self::$_shouldProfile = true;\n }\n\n $user = Craft::$app->getUser()->getIdentity();\n\n if (!$user) {\n return false;\n }\n\n return self::$_shouldProfile = $user->admin && $user->getPreference('profileTemplates');\n }", "function osclass_pm_is_pub_profile() {\r\n $location = Rewrite::newInstance()->get_location();\r\n $section = Rewrite::newInstance()->get_section();\r\n if($location == 'user' && $section == 'pub_profile'){\r\n return TRUE;\r\n }\r\n return FALSE;\r\n }", "public function isAllowedPublicProfile()\n {\n return $this->configService->getParameter('c975LUser.publicProfile');\n }", "public function isValidProfile()\n {\n $id = (int) $this->_request->getParam('id');\n $profileRowData = $this->getUploadedFileRowData($id);\n if (!empty($profileRowData)) {\n return true;\n }\n return false;\n }", "function learn_press_has_profile_method() {\r\n\t$lpr_profile = get_option( '_lpr_settings_general', array() );\r\n\tif ( isset( $lpr_profile['set_page'] ) && $lpr_profile['set_page'] == 'lpr_profile' ) {\r\n\t\treturn true;\r\n\t}\r\n\r\n\treturn false;\r\n}", "function checkProfile() {\n\t\n\t\t$result = $this->db->query(sprintf(\"SELECT * FROM `admins` WHERE `username` = '%s' AND `password` = '%s'\", $this->db->real_escape_string($this->username), $this->db->real_escape_string(md5($this->password))));\n\t\t\n\t\treturn ($result->num_rows) ? 1 : 0;\n\t\t\n\t}", "public function checkUserExisted(){\n return $this->getAuth() != NULL;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
group array of object by property if exist if not group by $default value
public function groupByProperty($arrayObjs, $propperty, $default){ $result = []; foreach ($arrayObjs as $obj){ $key = ($obj[$propperty] != null) ? $obj[$propperty] : $default; $result[$key][] = $obj; } return $result; }
[ "public function testGroupObjectsByProperty()\n {\n $this->assertEquals([], Helpers::groupObjectsByProperty([], 'foo'));\n\n $user1 = new User();\n $user1->id = 8;\n $user1->name = 'Bill';\n $user2 = new User();\n $user2->id = 4;\n $user2->name = 'Ivan';\n $user3 = new User();\n $user3->id = 7;\n $user3->name = 'Bill';\n $groups = Helpers::groupObjectsByProperty([$user1, $user2, $user3], 'name');\n $this->assertEquals(['Bill', 'Ivan'], array_keys($groups));\n foreach ($groups as $users) {\n $this->assertInternalType('array', $users);\n }\n $this->assertCount(2, $groups['Bill']);\n $this->assertEquals(8, $groups['Bill'][0]->id);\n $this->assertEquals(7, $groups['Bill'][1]->id);\n $this->assertCount(1, $groups['Ivan']);\n $this->assertEquals(4, $groups['Ivan'][0]->id);\n\n $groups = Helpers::groupObjectsByProperty([\n 'first' => $user1,\n 'second' => $user2,\n 'third' => $user3\n ], 'name', true);\n $this->assertEquals(['first', 'third'], array_keys($groups['Bill']));\n $this->assertEquals(['second'], array_keys($groups['Ivan']));\n }", "function mergeDefaultProps(array &$props, array $defaultProps) {\n foreach ($defaultProps as $key => $value) {\n if (array_key_exists($key, $props)) {\n if (empty($props[$key]) && $props[$key] !== 0) {\n $props[$key] = null; // Clear to unify\n } elseif (is_array($props[$key]) && is_array($value)) {\n mergeDefaultProps($props[$key], $value);\n }\n } else /* `$key` does not exist on `$props` */ {\n if (is_array($value)) {\n $props[$key] = null;\n } else {\n $props[$key] = $value;\n }\n }\n }\n}", "function group_by($prop, $in, $del = true) {\n\t$del &= is_array($in);\n\t$out = array();\n\tforeach ($in as $i => $obj) {\n\t\t$out[$obj->$prop][] = $obj; // add to array\n\t\tif ($del) {\n\t\t\tunset($in[$i]);\n\t\t}\n\t}\n\treturn $out;\n}", "function groupBy() {}", "private static function extract_group_key($objects, $default_key)\n {\n }", "function _billable_ensure_minimal_group_by($group_by) {\n if (!in_array('customer', $group_by))\n $group_by[] = 'customer';\n \n if (!in_array('vat_rate', $group_by))\n $group_by[] = 'vat_rate';\n\n if (!in_array('currency', $group_by))\n $group_by[] = 'currency';\n \n if (!in_array('contractor', $group_by))\n $group_by[] = 'contractor';\n \n if (!in_array('single_price', $group_by))\n $group_by[] = 'single_price';\n \n return $group_by;\n}", "private function mergeDefaultFields($field)\n {\n $default = 'default_' . $field;\n // merge data\n $data = (array)$this->$field;\n $data = $data + $this->$default;\n $data = (object)$data;\n // detect if need to update database\n $_old = json_encode($this->$field);\n $_new = json_encode($data);\n if ($_old != $_new) {\n $this->$field = $data;\n }\n }", "public function getShouldAggregateValues();", "private static function groupByField($fieldName = '')\n {\n $fieldName = !empty($fieldName)? $fieldName: static::$keyField;\n if (!empty($fieldName)) {\n $group = new \\stdClass();\n foreach (static::$lastResults as $modelContainer) {\n if (!isset($modelContainer->model->$fieldName)) continue;\n $key = $modelContainer->model->$fieldName;\n $group->$key = isset($group->$key)? $group->$key: [];\n array_push($group->$key, $modelContainer);\n }\n $group = (array)$group;\n if (count($group)) static::$lastResults = $group;\n }\n return static::$lastResults;\n }", "public function _group_by( $array = array(), $key = '' ) {\n\t\t$data = array();\n\t\tforeach($array as $val) {\n\t\t\t$by_key = '';\n\t\t\tif( is_object($val) ) {\n\t\t\t\t$by_key = $val->$key;\n\t\t\t}\t\t\t\n\t\t\tif( is_array($val) ) {\n\t\t\t\t$by_key = $val[$key];\n\t\t\t}\n\t\t\t\n\t\t\tif( $by_key ){\t\t\t\t\t\n\t\t\t\t$data[$by_key][] = $val;\n\t\t\t}\n\t\t}\n\t\treturn $data;\n\t}", "function pp_group_array( $array, $key ) {\n\n\t// Bail if the data is bad\n\tif ( ! is_array( $array ) ) {\n\t\treturn $array;\n\t}\n\n\t// Sorted array to build as we go\n\t$sorted_items = array();\n\n\t// If we encounter a bad item, just bail on the whole thing\n\t$should_bail = false;\n\n\t// Loop through itmes\n\tforeach ( $array as $item ) {\n\n\t\t// If this isn't an array or isn't an object, bail\n\t\tif ( ! is_array( $item ) && ! is_object( $item ) ) {\n\t\t\t$should_bail = true;\n\t\t}\n\n\t\t// Create the key to use\n\t\t$key_to_use = is_array( $item ) ? $item[ $key ] : $item->$key;\n\n\t\t// If we don't have a key to use, bail\n\t\tif ( $key_to_use === false ) {\n\t\t\t$should_bail = true;\n\t\t}\n\n\t\t// If this is the firrst time encountering this key, create a new array item in our grouping array\n\t\tif ( ! isset( $sorted_items[ $key_to_use ] ) ) {\n\t\t\t$sorted_items[ $key_to_use ] = array();\n\t\t}\n\n\t\t// Add this item to the appropriate nested array\n\t\t$sorted_items[ $key_to_use ][] = $item;\n\n\t}\n\n\tif ( $should_bail ) {\n\t\treturn $array;\n\t} else {\n\t\treturn $sorted_items;\n\t}\n\n}", "public function addDefaultAggregations()\n {\n //By Century\n $this->addCenturyAggregation();\n //By Media Type (aka format)\n $this->addAggregation(\"media_format\", \"format\");\n //By genre\n $this->addAggregation(\"genre\", \"miranda_genre\");\n //By Language\n $this->addAggregation(\"language\", \"language\");\n }", "function cleanGroupBy()\n {\n if ($this instanceof DataObjectList)\n $this->groupby = array();\n }", "function aggregate_properties_by_list($object, $class_name, $properties_list, $exclude = false)\n{\n}", "public function addDefaultAggregations()\n {\n //By Century\n $this->addCenturyAggregation();\n //By Media Type (aka format)\n $this->addAggregation(\"media_format\", \"format\");\n //By genre\n $this->addAggregation(\"folger_genres\", \"folger_genre.terms\");\n }", "public function transformWithDefaultProvider() {\n return [\n 'default not used' => [\n 'source' => [NULL, NULL, 'Test', 'Test 2'],\n 'default_value' => 'default',\n 'expected_result' => 'Test',\n ],\n 'default string' => [\n 'source' => [NULL, NULL],\n 'default_value' => 'default',\n 'expected_result' => 'default',\n ],\n 'default NULL' => [\n 'source' => [NULL, NULL],\n 'default_value' => NULL,\n 'expected_result' => NULL,\n ],\n ];\n }", "function makeGroupedArray($arg_input, $arg_key, $with_blank_key = false)\n{\n $result = array();\n if (is_array($arg_input))\n foreach ($arg_input as $val)\n \tif (array_key_exists($arg_key, $val))\n\t $result[$val[$arg_key]][] = $val;\n elseif ($with_blank_key)\n \t$result[''][] = $val;\n return $result;\n}", "function array_group_by(array $collection, $iterator): array{\n $result = [];\n foreach ($collection as $k => $v) {\n $key = $iterator($v, $k);\n // if group not exists, create group\n if (!array_key_exists($key, $result)) {\n $result[$key] = [];\n }\n $result[$key][] = $v;\n sort($result[$key], SORT_STRING); // &$a; sort values! returns bool\n }\n ksort($result); //in-place sort keys!\n return $result;\n}", "function feed_group_defaults($feed_group = NULL) {\r\n $feed_group = (object) $feed_group;\r\n \r\n if (!isset($feed_group->name)) $feed_group->name = '';\r\n if (!isset($feed_group->description)) $feed_group->description = '';\r\n \r\n return $feed_group;\r\n}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
this functino for find brand find by sub category id
public function brandsBySubCategoryId($id){ $brands = Brand::where('subcategory_id', $id)->get()->all(); return $brands; }
[ "public function select_sub_cat_brand_info_search($cat_id='',$search_key='')\n {\n\n $this->db->select('c.*,a.category_id');\n $this->db->from('product_information a');\n $this->db->join('brand c','c.brand_id = a.brand_id','left');\n $this->db->where('a.category_id',$cat_id);\n $this->db->where('a.status',1);\n $this->db->like('c.brand_name', $search_key, 'both');\n $this->db->group_by('a.brand_id');\n\n $query = $this->db->get();\n $w_cat_pro = $query->result_array();\n\n //First category\n $first_cat= $this->db->select('*')\n ->from('product_category')\n ->where('parent_category_id',$cat_id)\n ->where('cat_type',2)\n ->get()\n ->result();\n if ($first_cat) {\n foreach ($first_cat as $f_cat) {\n\n $this->db->select('c.*,a.category_id');\n $this->db->from('product_information a');\n $this->db->join('brand c','c.brand_id = a.brand_id','left');\n $this->db->where('a.category_id',$f_cat->category_id);\n $this->db->where('a.status',1);\n $this->db->like('c.brand_name', $search_key, 'both');\n $this->db->group_by('a.brand_id');\n\n $query = $this->db->get();\n $first_cat_pro = $query->result_array();\n\n if ($first_cat_pro) {\n foreach ($first_cat_pro as $f_cat_pro) {\n array_push($w_cat_pro, $f_cat_pro);\n }\n }\n\n // Second category\n $second_cat = $this->db->select('*')\n ->from('product_category')\n ->where('parent_category_id',$f_cat->category_id)\n ->where('cat_type',2)\n ->get()\n ->result();\n if ($second_cat) {\n foreach ($second_cat as $s_cat) {\n\n $this->db->select('c.*,a.category_id');\n $this->db->from('product_information a');\n $this->db->join('brand c','c.brand_id = a.brand_id','left');\n $this->db->where('a.category_id',$s_cat->category_id);\n $this->db->where('a.status',1);\n $this->db->like('c.brand_name', $search_key, 'both');\n $this->db->group_by('a.brand_id');\n\n $query = $this->db->get();\n $sec_cat_pro = $query->result_array();\n\n if ($sec_cat_pro) {\n foreach ($sec_cat_pro as $s_cat_pro) {\n array_push($w_cat_pro, $s_cat_pro);\n }\n }\n\n //Third category\n $third_cat = $this->db->select('*')\n ->from('product_category')\n ->where('parent_category_id',$s_cat->category_id)\n ->where('cat_type',2)\n ->get()\n ->result();\n\n if ($third_cat) {\n foreach ($third_cat as $t_cat) {\n\n $this->db->select('c.*,a.category_id');\n $this->db->from('product_information a');\n $this->db->join('brand c','c.brand_id = a.brand_id','left');\n $this->db->where('a.category_id',$t_cat->category_id);\n $this->db->where('a.status',1);\n $this->db->like('c.brand_name', $search_key, 'both');\n $this->db->group_by('a.brand_id');\n\n $query = $this->db->get();\n $thrd_cat_pro = $query->result_array();\n\n if ($thrd_cat_pro) {\n foreach ($thrd_cat_pro as $t_cat_pro) {\n array_push($w_cat_pro, $t_cat_pro);\n }\n }\n }\n }\n }\n }\n }\n }\n return $this->unique_multidim_array($w_cat_pro,'brand_id');\n }", "function loadcat_bybrand($brandid=9999999999)\r\n\t\t{\r\n\t\t\t$brandid =(!is_numeric($brandid))?9999999999:$brandid;\r\n\t\t\t$output=array();\r\n\t\t\t$cat_list=$this->db->query(\"SELECT a.catid,a.brandid,b.name AS brand_name,c.name AS category_name\r\n\t\t\t\t\t\t\t\t\t\t\tFROM king_deals a\r\n\t\t\t\t\t\t\t\t\t\t\tJOIN king_brands b ON b.id=a.brandid\r\n\t\t\t\t\t\t\t\t\t\t\tJOIN king_categories c ON c.id=a.catid\r\n\t\t\t\t\t\t\t\t\t\t\tWHERE b.id=?\r\n\t\t\t\t\t\t\t\t\t\t\tGROUP BY c.id\",$brandid);\r\n\t\t\tif($cat_list->num_rows())\r\n\t\t\t{\r\n\t\t\t\t$output['cat_list']=$cat_list->result_array();\r\n\t\t\t\t$output['status']='success';\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$output['status']='error';\r\n\t\t\t\t$output['message']='No data Found';\r\n\t\t\t}\r\n\t\t\techo json_encode($output);\r\n\t\t}", "public function getBrand(int $id);", "public function getBrandById($id);", "function get_brand($id) {\n return $this->db->get_where('brands', array('id' => $id))->row_array();\n }", "public static function getBrandsFromCurrentCategory()\n {\n sfContext::getInstance()->getConfiguration()->loadHelpers('sfsCategory');\n $categoryId = get_current_category_id();\n if(!$categoryId)\n return BrandPeer::getAll(new Criteria(), true);\n $criteria = new Criteria();\n $ah = sfContext::getInstance()->getUser()->getAttributeHolder()->getAll('product/filter');\n $cton2 = null;\n if(isset($ah['brand_id'])) {\n $cton2 = $criteria->getNewCriterion(BrandPeer::ID, $ah['brand_id']);\n }\n $criteria->addJoin(Product2CategoryPeer::PRODUCT_ID, ProductPeer::ID);\n $ids = CategoryPeer::getAllChildIds($categoryId);\n\n $ids = array_merge($ids, array($categoryId));\n if($cton2) {\n $cton1 = $criteria->getNewCriterion(Product2CategoryPeer::CATEGORY_ID, $ids, Criteria::IN);\n $cton1->addOr($cton2);\n $criteria->add($cton1);\n }\n else \n $criteria->add(Product2CategoryPeer::CATEGORY_ID, $ids, Criteria::IN);\n\n $criteria->addJoin(ProductPeer::BRAND_ID, BrandPeer::ID);\n $criteria->setDistinct();\n $criteria->add(ProductPeer::IS_ACTIVE, 1);\n $criteria->add(ProductPeer::IS_DELETED, 0);\n $criteria->add(CategoryPeer::IS_ACTIVE, 1);\n $criteria->add(CategoryPeer::IS_DELETED, 0);\n return BrandPeer::doSelectWithTranslation($criteria);\n }", "public function brandCategories($brand, $category){\n\n $brandMeta = Brand::where('slug', $brand)->first();\n $categoryMeta = Category::where('slug', $category)->first();\n\n \n\n\n $products = Product::with('categories')->where('brand',$brandMeta->id)->whereHas('categories', function ($query) use ($category) {\n $query->where('slug',$category);\n })->get();\n \n\n \n $categoryName = $categoryMeta->name;\n $categoryId = $categoryMeta->id;\n\n \n\n /*--$products = Product::with('categories')->whereHas('categories', function ($query) use ($category){\n dd($category);\n $query->where('slug', $category);\n });\n\n dd($products);--*/\n \n\n return view('brand.product', compact('categories','brand','products','categoryName'));\n }", "public function getBrandById($id){\n \n /**\n * Select the row from the brands table\n * based on the brands specific identifcation\n */\n $query = \"SELECT * FROM tbl_brand\n WHERE brandId='$id'\"; \n \n //set return object equal to result using select method\n //from the databse class\n $result = $this->db->select($query); \n\n //return the query\n return $result; \n }", "public static function getCategoriesInBrand($brand_id=0) \n {\n if(!empty($brand_id) && !empty($status))\n {\n $sql = \"SELECT * FROM `products_items` `pi`\n INNER JOIN `brands` ON (`brands`.id = `pi`.`brand_id`)\n INNER JOIN `category` ON (`category`.id = `pi`.`category_id`)\n WHERE (`id` = '{$brand_id}')\n GROUP BY `category_id`\";\n db::execute_query($sql);\n $d_arr = db::get_result();\n $r = array();\n foreach($d_arr as $d)\n {\n array_push($r,$d);\n }\n return $r; \n }\n }", "public function findBrandProductCategory($product_category_id = null, $brand_id = null)\n {\n $pcBrandFound = $this->prepare('SELECT * FROM brand_product_category\n WHERE product_category_id = ' . $product_category_id . '\n AND brand_id = ' . $brand_id . ' LIMIT 1');\n $pcBrandFound->execute();\n\n return $pcBrandFound->fetch(PDO::FETCH_ASSOC);\n }", "function get_sub_category($category_id){\n $query = $this->db->get_where('possible_advisories', array('cat' => $category_id));\n return $query;\n }", "function get_brand_data_list($cat_id) {\n\tglobal $db;\n\t$response = array();\n\n\t$sql_whr = \"\";\n\tif($cat_id>0) {\n\t\t $sql_whr = \"AND m.cat_id='\".$cat_id.\"'\";\n\t}\n\t\n\t$brand_query=mysqli_query($db,\"SELECT m.*, d.title AS device_title, d.sef_url AS device_sef_url, b.title AS brand_title, b.image AS brand_image, b.description AS brand_desc, b.id AS brand_id FROM mobile AS m LEFT JOIN devices AS d ON d.id=m.device_id LEFT JOIN brand AS b ON b.id=m.brand_id WHERE m.published=1 AND m.brand_id>0 \".$sql_whr.\" GROUP BY b.id ORDER BY m.id DESC\");\n\t$brand_num_of_rows = mysqli_num_rows($brand_query);\n\tif($brand_num_of_rows>0) {\n\t\twhile($brand_list=mysqli_fetch_assoc($brand_query)) {\n\t\t\t$response[] = $brand_list;\n\t\t}\n\t}\n\treturn $response;\n}", "function getBrandId()\n {\n return $this->brand_id;\n }", "public function getBrand_id()\n {\n return $this->brand_id;\n }", "public function getId_brand()\n {\n return $this->id_brand;\n }", "public function getBusinessCategoryByID($bussness_cat_id);", "public function bySubSubCategory($subSubCatName)\n {\n $this->db->query(\"SELECT p.prod_id , p.prod_refer, p.prod_name, p.brand, p.qt_stock,p.prod_price, c.id , c.category_name , sc.sub_category_name ,ssc.sub_sub_category_name , pim.*\n from products p join subsubcategories ssc \n on p.sub_sub_cat = ssc.id\n join subcategories sc \n on p.sub_cat = sc.id\n join categories c \n on sc.id_cat = c.id\n join productimages pim on p.prod_refer = pim.prod_ref\n where LOWER(replace(ssc.sub_sub_category_name,' ', '') ) like LOWER(:subSubCatName)\n GROUP by p.prod_id\n order by p.prod_price \n \");\n $this->db->bind(':subSubCatName', $subSubCatName);\n $results = $this->db->resultset();\n\n return $results;\n }", "function search_brands_by_slug($data) {\n\t$slug = urldecode($data->get_param('slug'));\n\n\t$taxonomy = get_terms(array(\n\t\t'get' => 'all',\n\t 'taxonomy' => 'product_brand',\n\t 'slug' => urldecode($slug)\n\t));\n\n\tif (empty($taxonomy)) {\n\t\t$error = \"The brand '{$slug}' is not found\";\n\t\t$code = 1;\n\t\treturn api_error_404($error, $code);\n\t}\n\n\treturn (object) [\n\t\t\"id\" => $taxonomy[0]->term_id,\n\t\t\"name\" => $taxonomy[0]->name,\n\t\t\"slug\" => $taxonomy[0]->slug,\n\t\t\"description\" => $taxonomy[0]->description,\n\t\t\"parent\" => $taxonomy[0]->parent\n\t];\n}", "public function getItemProfile_Brand_Category(){\n $sql = \"SELECT a.profile, a.itemID, e.average_rating, c.category, d.brand\n FROM item_profile a\n LEFT JOIN products b ON a.itemID = b.id\n LEFT JOIN categories c ON b.categories = c.id\n LEFT JOIN brand d ON b.brand = d.id\n LEFT JOIN average_ratings e ON e.itemID = b.id\";\n $myQuerry = $this->getConnection()->prepare($sql);\n $myQuerry->execute();\n $result = $myQuerry->fetchAll();\n return $result;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
updating user GCM registration ID
public function updateGcmID($user_id, $gcm_registration_id) { $response = array(); $stmt = $this->conn->prepare("UPDATE users SET gcm_registration_id = ? WHERE user_id = ?"); $stmt->bind_param("si", $gcm_registration_id, $user_id); if ($stmt->execute()) { // User successfully updated $response["error"] = false; $response["message"] = 'GCM registration ID updated successfully'; } else { // Failed to update user $response["error"] = true; $response["message"] = "Failed to update GCM registration ID" . $user_id . "gds"; $stmt->error; } $stmt->close(); return $response; }
[ "public function updateGcmID($user_id, $gcm_registration_id) {\n $response = array();\n $stmt = $this->conn->prepare(\"UPDATE students SET gcm_registration_id = ? WHERE student_id = ?\");\n $stmt->bind_param(\"si\", $gcm_registration_id, $user_id);\n\n if ($stmt->execute()) {\n // User successfully updated\n $response[\"error\"] = false;\n $response[\"message\"] = 'GCM registration ID updated successfully';\n } else {\n // Failed to update user\n $response[\"error\"] = true;\n $response[\"message\"] = \"Failed to update GCM registration ID\";\n $stmt->error;\n }\n $stmt->close();\n\n return $response;\n }", "public function updateGcmID($mobile, $name, $gcm_reg_id) {\n $response = array();\n $stmt = $this->conn->prepare(\"UPDATE users SET gcm_reg_id = ?, name = ? WHERE mobile = ?\");\n $stmt->bind_param(\"sss\", $gcm_reg_id, $name, $mobile);\n\n if ($stmt->execute()) {\n // User successfully updated\n $response[\"error\"] = false;\n $response[\"message\"] = 'GCM registration ID updated successfully';\n } else {\n // Failed to update user\n $response[\"error\"] = true;\n $response[\"message\"] = \"Failed to update GCM registration ID\";\n $stmt->error;\n }\n $stmt->close();\n\n return $response;\n }", "public function updateFcmToken($user_id, $gcm_registration_id) {\r\n $response = array();\r\n\t\t$query = \"UPDATE clients SET gcm_registration_id = ? WHERE id = ?\";\r\n \r\n\t\tif ($stmt = $this->conn->prepare($query)) {\r\n\t\t\r\n\t\t\t$stmt->bind_param(\"si\", $gcm_registration_id, $user_id);\r\n\t \r\n\t\t\tif ($stmt->execute()) {\r\n\t\t\t\t// User successfully updated\r\n\t\t\t\t$response[\"error\"] = false;\r\n\t\t\t\t$response[\"message\"] = 'FCM registration ID updated successfully';\r\n\t\t\t} else {\r\n\t\t\t\t// Failed to update user\r\n\t\t\t\t$response[\"error\"] = true;\r\n\t\t\t\t$response[\"message\"] = \"Failed to update FCM registration ID\";\r\n\t\t\t\t$stmt->error;\r\n\t\t\t}\r\n\t\t\t$stmt->close();\r\n\t\t\r\n\t\t} else {\r\n\t\t\t\r\n\t\t\t$response[\"error\"] = true;\r\n\t\t\t$response[\"message\"] = $this->conn->error;\r\n\t\t\t$response['error_type'] = AN_ERROR_OCCURED_ERROR;\r\n\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//$response[\"query\"] = $query;\r\n\t\t$response[\"gcm_registration_id\"] = $gcm_registration_id;\r\n\t\t$response[\"user_id\"] = $user_id;\r\n \r\n return $response;\r\n }", "public function getUserGcmRegId() {\n $stmt = $this->conn->prepare(\"SELECT gcm_registration_id FROM app_users\");\n // $stmt->bind_param(\"s\", $api_key);\n $stmt->execute();\n $user_gcm = $stmt->get_result();\n $stmt->close();\n return $user_gcm;\n }", "public function registerGcmToken($userId, $gcmToken)\n {\n $contributor = Contributor::find($userId);\n if($contributor != null){\n $contributor->gcm_token = $gcmToken;\n $contributor->save();\n }\n }", "public function testUpdateDeviceRegistration()\n {\n }", "public function postFcmId(Request $request)\n { \n $input = $request->input();\n\n if ($input['fcmRegId'] == DB::table('fcm_users')->where('user_id', $input['userId'])->pluck('fcm_reg_id')->first()) {\n return response()->json(['status' => 'success','response' =>'Fcm registration id updated successfully.']);\n }\n\n $check = DB::table('fcm_users')->where('user_id', $input['userId'])->pluck('user_id')->first();\n \n if ($check){\n $response = DB::table('fcm_users')->where('user_id', $input['userId'])->update(['fcm_reg_id' => $input['fcmRegId']]);\n\n if ($response)\n return response()->json(['status' => 'success','response' =>'Fcm registration id updated successfully.']);\n else\n return response()->json(['status' => 'failure','response' =>'System Error:Unable to update Fcm registration id for this user.']);\n\n } else {\n $response = DB::table('fcm_users')->insert(['user_id' => $input['userId'], 'user_role_id' => $input['roleId'], 'fcm_reg_id' => $input['fcmRegId']]);\n\n if($response)\n return response()->json(['status' => 'success','response' =>' Fcm registration id for this user save successfully.']);\n else\n return response()->json(['status' => 'failure','response' =>'System Error:Unable to save Fcm registration id for this user.']);\n }\n }", "function sendMessageThroughGCM() {\n $data = $_GET['message'];\n $message = array(\"msg\" => $data);\n\n //query all registered id from database and encode it to json\n $query = $this->db->get('hris_gcm_regisid');\n $reg_id = array();\n foreach ($query->result_array() as $row) {\n $reg_id[] = $row['reg_id'];\n }\n $gcmRegIds = $reg_id;\n echo json_encode($gcmRegIds);\n\n //Google cloud messaging GCM-API url\n $url = 'https://android.googleapis.com/gcm/send';\n $fields = array(\n 'registration_ids' => $gcmRegIds,\n 'data' => $message,\n );\n\n // Update your Google Cloud Messaging API Key\n define(\"GOOGLE_API_KEY\", \"AIzaSyCn_LhLMRCAP35IX8E6xkIAPGgb7NjrLqI\");\n $headers = array(\n 'Authorization: key=' . GOOGLE_API_KEY,\n 'Content-Type: application/json'\n );\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_POST, true);\n curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($fields));\n $result = curl_exec($ch);\n if ($result === FALSE) {\n die('Curl failed: ' . curl_error($ch));\n }\n curl_close($ch);\n echo $result;\n return $result;\n }", "public function getUser_registration_id()\n {\n return $this->user_registration_id;\n }", "function updatePushRegistration() {\n $InternalUniqueId = null;\n if (isset($_POST[\"internal_id\"])) {\n $InternalUniqueId = $_POST[\"internal_id\"];\n }\n $RegistrationId = null;\n if (isset($_POST[\"registration_id\"])) {\n $RegistrationId = $_POST[\"registration_id\"];\n }\n $DeviceUuid = null;\n if (isset($_POST[\"device_uuid\"])) {\n $DeviceUuid = $_POST[\"device_uuid\"];\n }\n $DevicePlatform = null;\n if (isset($_POST[\"device_platform\"])) {\n $DevicePlatform = $_POST[\"device_platform\"];\n }\n $DeviceOs = 'NOT SPECIFIED';\n if (isset($_POST[\"device_os\"])) {\n $DeviceOs = $_POST[\"device_os\"];\n }\n $RegistrationDateTime = null;\n if (isset($_POST[\"registration_date_time\"])) {\n $RegistrationDateTime = new dxDateTime($_POST[\"registration_date_time\"]);\n }\n $Status = NativeDevicePushRegistrationStatus::ACTIVE_STR;\n if (isset($_POST[\"registration_status\"])) {\n $Status = $_POST[\"registration_status\"];\n }\n if (!ProjectFunctions::updatePushRegistration($InternalUniqueId,$RegistrationId,$DeviceUuid,$DevicePlatform,$DeviceOs,$RegistrationDateTime,$Status,$ErrorInfo)) {\n die(json_encode(array(\"Result\" => \"Failed\",\"Message\" => $ErrorInfo)));\n }\n die(json_encode(array(\"Result\" => \"Success\",\"InternalId\" => $ErrorInfo[0])));\n}", "public static function getUserIdFromRegistrationId($registration_id) {\n \n $Database = AppCore::GetDatabase();\n $Memcached = AppCore::GetMemcached(); \n \n $key = sprintf(\"railpage:gcm.subscription.key=%s\", $registration_id); \n \n if (!$user_id = $Memcached->fetch($key)) {\n $query = \"SELECT user_id FROM nuke_user_push WHERE registration_id = ?\";\n \n $user_id = $Database->fetchOne($query, $registration_id); \n $Memcached->save($key, $user_id, 0); \n }\n \n return $user_id; \n \n }", "public function updateFCMToken(){\n $sqlQuery = \"UPDATE\n \". $this->db_table .\"\n SET\n USER_FCM_TOKEN = :fcm_token\n WHERE \n USER_ID = :user_id\";\n \n $stmt = $this->conn->prepare($sqlQuery);\n \n // Sanitise the data\n $this->id=htmlspecialchars(strip_tags($this->id));\n $this->fcm_token=htmlspecialchars(strip_tags($this->fcm_token));\n \n // bind data\n $stmt->bindParam(\":user_id\", $this->id);\n $stmt->bindParam(\":fcm_token\", $this->fcm_token);\n \n if($stmt->execute()){\n return true;\n }\n return false;\n }", "public function register()\n {\n // Make sure user doesn't try to register again if they already have a userID in the ctor.\n if ($this->_userID !== null)\n {\n echo \"Warning: You already have a userID, no need to register another. Using current ID.\\n\";\n return $this->_userID;\n }\n\n // Do the register request\n $response = $this->_execute(GracenoteRhythmAPI::REGISTER, array());\n\n // Cache it locally, then return it to the user.\n $this->_userID = (string)$response[\"USER\"][0][\"VALUE\"];\n return $this->_userID;\n }", "public function updatePushNotificationDetails()\n\t{\n\t\ttry{\n\t\t\t\n\t\t\t$arguments = Request::all();\n\t\t\t\n\t\t\t$user = User::where('id', '=', $arguments['id'])->get()->toArray();\n\n\t\t\tif(empty($user))\n\t\t\t\tthrow new Exception(\"This user does not exist\", 1);\n\n\t\t\t$user = User::find($arguments['id']);\n\n\t\t\t//Removing the unique credentials of user from requests.\n\t\t\tunset($arguments['id']);\n/*\t\t\tif($arguments['email'] || $arguments['password']){\n\t\t\t\tunset($arguments['email']);\n\t\t\t\tunset($arguments['password']);\n\t\t\t}*/\n\n\t\t\tif($arguments['device_type'] == 'ANDROID' || $arguments['device_type'] == 'IPHONE' || $arguments['device_type'] == 'NONE'){\n\t\t\t\t$user->fill($arguments);\n\t\t\t\t$saved = $user->push();\n\t\t\t}\n\t\t\t\n\t\t\t$this->data = User::find(Request::get('id'));\n\t\t\t$this->status = 'success';\n\t\t\t$this->message = null;\n\n\t\t}catch(Exception $e){\n\n\t\t\t$this->message = $e->getMessage();\n\n\t\t}\n\n\t\treturn $this->output();\n\t}", "public function registerGcm(Request $request)\n {\n $contributor = new Contributor();\n $userId = $request->input('id');\n if ($userId != null && $userId != 0) {\n $contributor->registerGcmToken($userId, $request->input('gcm_token'));\n }\n\n return response()->json([\n 'request_id' => uniqid(),\n 'status' => 'success',\n 'message' => $request->input('gcm_token'),\n 'timestamp' => Carbon::now(),\n ]);\n }", "public function setGCMRegistrationCodeAction() {\n $logger = $this->container->get('logger');\n $serializer = $this->container->get('jms_serializer');\n $apiResponse = new ApiResponse();\n $response = new Response();\n $response->headers->set('Content-Type', 'application/json');\n $em = $this->container->get('Doctrine')->getManager();\n\n if (!$this->container->get('request')->getMethod() == 'POST') {\n $apiResponse->setCode(404);\n $response->setContent($serializer->serialize($apiResponse, 'json'));\n return $response;\n }\n\n $content = json_decode($this->container->get('request')->getContent());\n\n /* @var $extData \\Tavros\\DomainBundle\\Entity\\ExternalData */\n\n $extData = $em->getRepository('TavrosDomainBundle:ExternalData')->findOneByExdaToken($content->_token);\n\n if (!$extData) {\n $apiResponse->setCode(110);\n $response->setContent($serializer->serialize($apiResponse, 'json'));\n return $response;\n }\n\n try {\n $registrationCode = $content->registrationCode;\n\n $extData->setExdaRegistrationCode($registrationCode);\n $em->persist($extData);\n $em->flush();\n } catch (Exception $ex) {\n $logger->error('[TAVROS - ERROR]' . $ex);\n $apiResponse->setCode(120);\n $response->setContent($serializer->serialize($apiResponse, 'json'));\n return $response;\n }\n\n $apiResponse->setCode(200);\n $response->setContent($serializer->serialize($apiResponse, 'json'));\n return $response;\n }", "function get_auth_key_update($user_id,$key)\n\t{\n\t\t$data=array('google_auth_code'=>$key);\n\t\t$this->db->where('id',$user_id);\n\t\t$this->db->update(DB_PREFIX.'users',$data);\n\t}", "function ios_add_id($userId, $uuid, $deviceId){\r\n\t$query_cek_ios=\"select id,ios_id from token_access where ios_id='\".$deviceId.\"'\";\r\n\t$result_cek_ios=mysql_query($query_cek_ios);\r\n\tif($result_cek_ios){\r\n\t\t$num_cek_ios=mysql_num_rows($result_cek_ios);\r\n\t\tif($num_cek_ios>0){\r\n\t\t\t$data_cek_ios=mysql_fetch_assoc($result_cek_ios);\r\n\t\t\t$query_update_ios=\"update token_access set ios_id='' where id='\".$data_cek_ios['id'].\"'\";\r\n\t\t\t$result_update_ios=mysql_query($query_update_ios);\r\n\t\t\tif(!$result_update_ios){\r\n\t\t\t\t$data['status']=\"0\";\r\n\t\t\t\t$data['message']=\"[Update ios Failed] \".mysql_error();\r\n\t\t\t\treturn json_encode($data);\r\n\t\t\t}\r\n\t\t}\r\n\t\t$query_update_ios=\"update token_access set ios_id='\".$deviceId.\"' where user_id='\".$userId.\"' and uuid='\".$uuid.\"'\";\r\n\t\t$result_update_ios=mysql_query($query_update_ios);\r\n\t\tif($result_update_ios){\r\n\t\t\t$data['status']=\"1\";\r\n\t\t\t$data['message']=\"Update Success\";\r\n\t\t}else{\r\n\t\t\t$data['status']=\"0\";\r\n\t\t\t$data['message']=\"[Update Failed] \".mysql_error(); \r\n\t\t}\r\n\t}else{\r\n\t\t$data['status']=\"0\";\r\n\t\t$data['message']=\"[Cek ios Failed] \".mysql_error();\r\n\t}\r\n\t\r\n\treturn json_encode($data);\r\n}", "public function update_push_token() {\n $uuid = $this->input->get_post('uuid');\n $push_token = $this->input->get_post('push_token');\n $platform = $this->input->get_post('platform');\n \n // Check parameters\n if ($this->helperlib->hasEmptyParams(array($uuid, $push_token, $platform))) {\n $this->outputlib->error($this->lang->line('error_missing_parameters'));\n }\n \n // Update database\n $query = \"\n UPDATE \".TABLE_USERS_DEVICES.\"\n SET\n push_token = ?,\n platform = ?\n WHERE uuid = ?\n \";\n $data = array($push_token, $platform, $uuid);\n $this->db->query($query, $data);\n \n // Output\n $this->outputlib->output(STATUS_OK, \"\", array());\n return;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
all roles for ROLE CONTROLLER ACTION ROLE SPECIAL bcs role controller action is lager get from it
public function getAllRoles(){ return $this->roleControllerActionAcl->getRoles(); }
[ "public function loadRoleRolesAction()\n {\n $return = array();\n $roleModel = new Admin_Model_DbTable_Acl_Role;\n $roleMemberModel = new Admin_Model_DbTable_Acl_RoleMember;\n $roleInheritModel = new Admin_Model_DbTable_Acl_RoleInherit;\n $roles = $roleModel->fetchAll();\n\n FOREACH($roles AS $roleRow) {\n $users = $groups = $inherits = array();\n $role = new Admin_Model_DbRow_Role($roleRow);\n\n FOREACH($roleMemberModel->getRoleUsers($roleRow['uar_id']) AS $userRow) {\n $user = new Admin_Model_DbRow_User($userRow);\n $users[] = $user->toJsonArray();\n }\n FOREACH($roleMemberModel->getRoleGroups($roleRow['uar_id']) AS $groupRow) {\n $group = new Admin_Model_DbRow_Group($groupRow);\n $groups[] = $group->toJsonArray();\n }\n FOREACH($roleInheritModel->getRoleInheritance($roleRow['uar_id']) AS $inheritRow) {\n $inherit = new Admin_Model_DbRow_Role($inheritRow);\n $inherits[] = $inherit->toJsonArray();\n }\n\n $return[] = array_merge($role->toJsonArray(), array(\n 'users' => $users,\n 'groups' => $groups,\n 'inherits' => $inherits\n ));\n }\n\n RETURN $this->responseSuccess(array(\n 'roles' => $return\n ));\n }", "public function getRoles()\n {\n }", "public static function getAllRoleOrGate();", "function roles_get_all_roles() {\r\n\treturn roles()->getAll();\r\n}", "function system_roles() {\n $default_role_id = ConfigOptions::getValue('default_role');\n if($this->logged_user->isAdministrator() || $this->logged_user->isProjectManager()) {\n $roles_data = array();\n $system_permissions = Permissions::findSystem();\n \n $roles = Roles::findSystemRoles();\n if(is_foreachable($roles)) {\n foreach($roles as $role) {\n $role_details = array(\n 'id' => $role->getId(),\n 'name' => $role->getName(),\n 'is_default' => $role->getId() == $default_role_id,\n 'permissions' => array(),\n );\n \n foreach($system_permissions as $permission) {\n $role_details['permissions'][$permission] = (boolean) $role->getPermissionValue($permission, false);\n } // foreach\n \n $roles_data[] = $role_details;\n } // foreach\n } // if\n \n $this->serveData($roles_data, 'system_roles');\n } else {\n $this->serveData($default_role_id, 'default_role_id');\n $this->httpError(HTTP_ERR_FORBIDDEN);\n } // if\n }", "private function check_roles()\n {\n $action_name = Request::current()->action();\n\n\n\n if (\n (\n $this->_auth_required !== FALSE &&\n Auth::instance()->logged_in($this->_auth_required) === FALSE\n ) ||\n (\n is_array($this->_secure_actions) &&\n array_key_exists($action_name, $this->_secure_actions) &&\n Auth::instance()->logged_in($this->_secure_actions[$action_name]) === FALSE\n )\n )\n {\n\n if (Auth::instance()->logged_in())\n {\n $this->request->redirect('notify/noaccess');\n } else\n {\n// echo '<pre>';\n// var_dump($_SERVER);\n// echo '</pre>';\n\n $_SESSION['redirect_on_login'] = $_SERVER['REQUEST_URI'];\n\n// die;\n $this->request->redirect('login');\n }\n }\n }", "public function getAllRoles();", "protected function get_roles() {\n\t\t\treturn array( 'administrator' );\n\t\t}", "public function getAllRoles()\n {\n $roles = Role::all();\n return $roles ;\n }", "public function rolesForUser();", "public static function getRoles(){\n return self::$acceptable_roles;\n }", "public function rolesPermissions();", "abstract function getActiveRole();", "function user_role()\r\n\t{\t\r\n\t\t\t\tAuthority::is_logged_in();\r\n\t\tif(Authority::checkAuthority('user_role')==true)\r\n\t\t\t\t{\r\n\t\t\t\t\tredirect('index.php/Loginpg');\r\n\t\t\t\t}\r\n\t\t$role_list=$this->data['role_list']=$this->Authority_model->role_list();\r\n\t\t//if($su!=='superuser')\r\n\t\t//{\r\n\t\t\t//$verify_list=$this->data['verify_list']=$this->Authority_model->verify_list();\r\n\t//}\r\n\r\n\t\t$su_verify_list=$this->data['su_verify_list']=$this->Authority_model->su_verify_list();\r\n\t\t\r\n\t\t\r\n\t\t$this->parser->parse('Adminheader',$this->data);\r\n\t\t$this->load->view('user_role',$this->data);\r\n\t\t$this->parser->parse('Adminfooter',$this->data);\r\n\t}", "public function getUserRoles();", "public function index()\n {\n $this->authorize('viewAny', Role::class);\n return Role::all();\n }", "protected function get_roles_data()\n {\n }", "private function actionAddCommonRoles()\n {\n $this->addCommonUserRole();\n $this->addCommonAdminRole();\n }", "public function getAllowedRoles();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This function updates the data store. Currently unoptimized, as it just calls delete then save.
public function update() { $this->delete(); $this->save(); }
[ "public static function update() {\n self::getEntityManager()->flush();\n }", "public function save()\n {\n $this->dbh->update(Kernel::REGISTRY_COLLECTION, $this->store);\n }", "function update_db() {\n // Updates\n foreach ($this->need_update as $object) {\n if (!$object->update()) {\n debugging(\"Could not update the object in DB.\");\n } elseif ($object->is_old_parent_childless()) {\n $this->need_delete[$object->old_parent->id] = $object->old_parent;\n }\n }\n\n // Deletions\n foreach ($this->need_delete as $id => $object) {\n // If an item is both in the delete AND insert arrays, it must be an existing object that only needs updating, so ignore it.\n if (empty($this->need_insert[$id])) {\n if (!$object->delete()) {\n debugging(\"Could not delete object from DB.\");\n }\n }\n }\n\n // Insertions\n foreach ($this->need_insert as $id => $object) {\n if (empty($this->need_delete[$id])) {\n if (!$object->insert()) {\n debugging(\"Could not insert object into DB.\");\n }\n }\n }\n\n $this->need_update = array();\n $this->need_delete = array();\n $this->need_insert = array();\n\n $this->reset_first_sortorder();\n $this->renumber();\n }", "public function flushUpdates();", "public function update()\n {\n $this->storage->deleteNode($this->id);\n $this->save();\n }", "function update() {\n\t\treset($this->data);\n\t\twhile(list($key,$val)=each($this->data)){\n\t\t\tif($key != $this->idKey) {\n\t\t\t\tif($val === NULL || $val == '') {\n\t\t\t\t\t$my_sql[] = $key . \" = NULL\";\n\t\t\t\t} else {\n //dump($val, 'val');\n if(in_array($key, $this->binaryFields)) {\n //if(strpos($val, \"'\"))\n // raiseError(\"invalid character in binary field data\");\n $my_sql[] = $key . \" = '\". addslashes($val) . \"'\";\n } else {\n $my_sql[] = $key . \" = '\" . sotf_Utils::magicQuotes($val) . \"'\";\n }\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$my_sql = implode(\", \", $my_sql);\n\n //execute the query\n $res = $this->db->query(\"UPDATE \" . $this->tablename . \" SET \" . $my_sql . \" WHERE \" . $this->idKey . \"='\" . $this->id . \"' \");\n \n //if the query is dead, stop executio, output error\n if(DB::isError($res)){\n raiseError($res);\n }\n\t}", "public function update_data() {\n global $DB;\n\n $DB->update_record('local_extension_cm', $this->cm);\n\n utility::cache_invalidate_request($this->requestid);\n }", "protected function updateDataStore()\n {\n // Add some helper variables into the scope\n $this->store->merge([\n 'template' => $this->template,\n 'layout' => $this->getLayout()\n ]);\n\n // Add globals. Each global set will get their own scope.\n $this->mergeGlobalsIntoDataStore();\n\n // The 'global.yaml' global set will be merged into the global cascade.\n $this->store->merge($this->store->getScope('global'));\n\n // Merge anything passed to this in a $data parameter.\n // Also put it in the 'page' scope if anyone ever needs to access it from inside another scope\n $data = (is_object($this->data)) ? $this->data->toArray() : $this->data;\n $this->store->merge($data);\n $this->store->mergeInto('page', $data);\n $this->store->merge(['page_object' => $this->data instanceof LocalizedData ? $this->data->get() : $this->data]);\n }", "public function testUpdateStoreGroup()\n {\n }", "public function afterStore($model, $data, $new, $delete) {}", "private function saveOldData() {\n if ($this->keepOldData) {\n\n // Save settings\n if (Schema::hasTable('settings')) {\n foreach ($this->settings as $settingName => $settingValue) {\n if (empty($settingValue)) {\n $this->settings[$settingName] = Settings::getByName($settingName);\n }\n }\n }\n\n // Save the admin\n if (Schema::hasTable('admins')) {\n if (empty($this->admin)) {\n $this->admin = User::with('admin')->first();\n }\n }\n }\n }", "function updateObjectDB () {\n\t\t$this->prepareValues();\n\t\t$database = mamboDatabase::getInstance();\n\t\t$database->doSQL($this->updateSQL());\n\t}", "public function updateRecordsInIndexer() {\n\t\tforeach($this->tempArrayForUpdatingExistingRecords as $query) {\n\t\t\t$GLOBALS['TYPO3_DB']->sql_query($query['set']);\n\t\t\t$GLOBALS['TYPO3_DB']->sql_query($query['execute']);\n\t\t}\n\t\t$this->tempArrayForUpdatingExistingRecords = array();\n\t}", "protected function persistSave(): void\n {\n foreach ($this->storeEntities as $sid => $entity) {\n $this->forgetEntity($entity);\n\n unset($this->storeEntities[$sid]);\n }\n }", "public function updateStoreGoods()\n {\n }", "public function testDataSetsUpdate()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function testUpdate()\n {\n $id = $this->repo->create('store1');\n $store = $this->repo->find($id);\n $this->assertEquals($store->name, 'store1');\n\n $this->repo->update('new store1', $id);\n $store = $this->repo->find($id);\n $this->assertEquals($store->name, 'new store1');\n }", "public function saveSettings()\n {\n $this->store->save($this->data);\n }", "function save() {\n\t\tif($this->save_all) {\n\t\t\tfor($i=0; $i<$this->record_count; $i++) {\n\t\t\t\t$this->save_update_record($this->record);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor($i=$this->record_count; $i<count($this->records); $i++) {\n\t\t\t$this->save_new_record($this->records[$i]);\n\t\t}\n\t\t$this->record_count = count($this->records);\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sign up a user with $credentials. On success return User, on error throw AccountException. Possible exception status codes: METHOD_IS_NOT_IMPLEMENTED, INVALID_CREDENTIAL, ACCOUNT_ALREADY_EXISTS, FAILURE
public function signup(array $credentials): User;
[ "public function signup()\n {\n $user = new User();\n\n $user->username = $this->username;\n $user->email = $this->email;\n $user->user_role = ( (int) User::find()->count() === 0 )\n ? AccessControl::ROLE_ROOT\n : AccessControl::ROLE_USER;\n $user->setPassword($this->password);\n $user->generateAuthKey();\n $user->status = $this->status;\n\n // if scenario is \"RegistrationNeedsActivation\" we will generate profile activation token\n if ($this->scenario === 'RegistrationNeedsActivation') {\n $user->generateProfileActivationToken();\n }\n\n // if user is saved and role is assigned return user object\n return $user->save() && RbacHelper::assignRole($user) ? $user : null;\n }", "public function createUserFromCredentials(array $credentials) {\n //At a minimum, email, iss and sub codes must be available.\n if (!isset($credentials['email']) || !isset($credentials['iss']) ||\n !isset($credentials['sub'])) {\n return null;\n }\n\n $model = $this->createModel();\n\n $name = isset($credentials['name']) ? $credentials['name'] : \"\";\n\n return $model->createWithOidcCredentials($name, $credentials['email'],\n $credentials['iss'], $credentials['sub'], $this->defaultRole);\n }", "public function createUser()\n {\n $body = $this->request->getParsedBody();\n\n $userValidator = Validator::arrayType()\n ->key(\n 'username',\n Validator::stringType()\n ->noWhitespace()\n ->alnum('-_')\n ->length(4, 200)\n )\n ->key(\n 'email',\n Validator::email()\n )\n ->key(\n 'password',\n Validator::stringType()\n ->notEmpty()\n ->length(6, 255)\n );\n\n if (!$userValidator->validate($body)) {\n return $this->status(400);\n }\n\n $repo = new UsersRepository();\n\n $status = $repo->create($body);\n\n if ($status === 201) {\n return $this->status(201);\n }\n\n if ($status === 409) {\n return $this->status(409);\n }\n \n if ($status === 500) {\n return $this->status(500);\n }\n }", "protected function createNewFromLdapAndCreds(array $ldapUserDetails, array $credentials): User\n {\n $email = trim($ldapUserDetails['email'] ?: ($credentials['email'] ?? ''));\n\n if (empty($email)) {\n throw new LoginAttemptEmailNeededException();\n }\n\n $details = [\n 'name' => $ldapUserDetails['name'],\n 'email' => $ldapUserDetails['email'] ?: $credentials['email'],\n 'external_auth_id' => $ldapUserDetails['uid'],\n 'password' => Str::random(32),\n ];\n\n $user = $this->registrationService->registerUser($details, null, false);\n $this->ldapService->saveAndAttachAvatar($user, $ldapUserDetails);\n\n return $user;\n }", "public function signup()\n {\n $this->validate($this->request, [ 'username' => 'required|unique:App\\Entities\\User,username', 'password' => 'required' ]);\n\n return SignupService::signup($this->request->input());\n }", "function createUpnCredentials(NextADInt_Adi_Authentication_Credentials $credentials)\n\t{\n\t\t// findLdapAttributesOfUser tries both sAMAccountName and userPrincipalName\n\t\t$ldapAttributes = $this->getAttributeService()->findLdapAttributesOfUser($credentials, '');\n\n\t\tif ($ldapAttributes->getRaw() == false) {\n\t\t\tthrow new NextADInt_Adi_Authentication_Exception(\"User '\" . $credentials->getLogin() . \"' does not exist in Active Directory'\");\n\t\t}\n\n\t\t$upn = $ldapAttributes->getFilteredValue('userprincipalname');\n\t\t$samaccountname = $ldapAttributes->getFilteredValue('samaccountname');\n\t\t$credentials = self::createCredentials($upn, '');\n // ADI-620: make sure that the sAMAccountName is explicitly set as it does not have to correlate with the userPrincipalName\n\t\t$credentials->setSAMAccountName($samaccountname);\n\n\t\treturn $credentials;\n\t}", "public function registerAccount() {\n\t\tif(!check($this->_username)) throw new Exception(lang('error_4'));\n\t\tif(!check($this->_password)) throw new Exception(lang('error_4'));\n\t\tif(!check($this->_email)) throw new Exception(lang('error_4'));\n\t\t\n\t\tif($this->usernameExists()) throw new Exception(lang('error_10'));\n\t\tif($this->emailExists()) throw new Exception(lang('error_11'));\n\t\tif($this->_emailExistsInSavedRegistrations()) throw new Exception(lang('error_11'));\n\t\t\n\t\t// email verification\n\t\tif($this->_verificationEnabled) {\n\t\t\t$saveRegistration = $this->_saveRegistration();\n\t\t\tif(!$saveRegistration) throw new Exception(lang('error_22'));\n\t\t\tif(!$this->_sendVerificationEmail()) throw new Exception(lang('error_20'));\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// regular registration\n\t\t$createAccount = $this->_createAccount();\n\t\tif(!$createAccount) throw new Exception(lang('error_22'));\n\t\t\n\t\t// account preferences\n\t\tif($this->_createAccountPreferences) {\n\t\t\t$AccountPreferences = new AccountPreferences();\n\t\t\t$AccountPreferences->setUsername($this->_username);\n\t\t\t$AccountPreferences->createAccountPreferences();\n\t\t}\n\t\t\n\t\t// welcome email\n\t\tif($this->_welcomeEmailEnabled) $this->_sendWelcomeEmail();\n\t}", "public function createUser($accountName, $password1, $password2);", "protected function _createAccount() {\n\t\tif(!check($this->_username)) return;\n\t\tif(!check($this->_password)) return;\n\t\tif(!check($this->_email)) return;\n\t\t\n\t\t$lastAccountId = $this->_getLastAccountId();\n\t\tif(!$lastAccountId) return;\n\t\t\n\t\t$accountId = $lastAccountId+1;\n\t\t\n\t\t$passwordHash = $this->_encryptPassword($this->_password);\n\t\tif(!check($passwordHash)) return;\n\t\t\n\t\t$registrationDate = round(microtime(true) * 1000);\n\t\t\n\t\t$newAccountData = array(\n\t\t\t'_id' => $accountId,\n\t\t\t'accountName' => $this->_username,\n\t\t\t'email' => $this->_email,\n\t\t\t'password' => $passwordHash,\n\t\t\t'pin' => '000001',\n\t\t\t'family' => '',\n\t\t\t'accessLvl' => 0,\n\t\t\t'characterSlots' => 0,\n\t\t\t'cash' => 0,\n\t\t\t'confirmationHash' => '',\n\t\t\t'changePasswordHash' => '',\n\t\t\t'registrationDate' => $registrationDate,\n\t\t);\n\t\t\n\t\ttry {\n\t\t\t$this->db->loginserver->accounts->insertOne($newAccountData);\n\t\t\treturn true;\n\t\t} catch(Exception $ex) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t}", "public function register(array $credentials, $activate = false)\n {\n $user = $this->storeUser($credentials,$activate);\n $this->event->fire('users.register',array($user));\n\n return $user;\n }", "public function getAccountByCredentials(AccountCredentials $credentials) : Account {\n // This definitely does more than \"one thing\". Although that is \"by design\".\n // Does that work for you, Martin?\n $account = $this->getAccountByUsername($credentials->getUsername());\n\n if ($account->isPasswordMatch($credentials->getPassword())) {\n $this->doRememberUser($credentials, $account);\n // Refresh the account's \"updated at\".\n $this->updateAccount($account, array());\n return $account;\n }\n else\n throw new InvalidCredentialsException();\n }", "public function retrieveByCredentials(array $credentials)\n {\n\t if (filter_var($credentials['email'], FILTER_VALIDATE_EMAIL)) { //Invalid Email\n\t\t\t$user = get_user_by('email', $credentials['email']);\n\t } else {\n\t \t$user = get_user_by('login', $credentials['email']);\n\t }\n\t if( $user ) {\n\t\t $user = wp_signon([\n\t\t \t'user_login' => $user->user_login, \n\t\t \t'user_password' => $credentials['password']\n\t\t ], $this->container['config.factory']->get('session')['secure'] ? true : false);\n\t\t if( $user && ! is_wp_error( $user ) ) {\n\t\t\t return new User($user->ID);\n\t\t }\n\t\t}\n\t\treturn new User();\n }", "public function create()\n {\n\n if (!isset($_POST['email']) ||\n !isset($_POST['first_name']) ||\n !isset($_POST['last_name']) ||\n !isset($_POST['password'])) {\n $response = [ \"status\" => \"fail\", \"message\" => \"Missing required data.\" ];\n http_response_code(400);\n return json_encode($response);\n }\n\n $user = new User($_POST['email'], $_POST['first_name'], $_POST['last_name'], $_POST['password']);\n if($user->save()) {\n $response = [ \"status\" => \"ok\", \"message\" => \"User Created\", \"new_user_id\" => $user->getId()];\n return json_encode($response);\n } else {\n $response = [ \"status\" => \"fail\", \"message\" => \"Failed to create user.\", \"reason\" => $user->getError()];\n return json_encode($response);\n }\n }", "public function createAccount()\n {\n $this->loadManagers();\n $userManager = new \\project_Alaska\\model\\UserManager();\n if (isset($_POST['username']) &&\n (preg_match($this->usernameRegex, $_POST['username'])) &&\n (preg_match($this->emailRegex, $_POST['userEmail'])) &&\n (preg_match($this->passwordRegex, $_POST['userPassword'])) &&\n (preg_match($this->passwordRegex, $_POST['userCopiedPassword'])) &&\n ($_POST['userPassword'] === $_POST['userCopiedPassword']))\n {\n // Verify if the account already exists by returning an Id if so\n $userId = $userManager->getUserId($_POST['username']);\n \n if (is_null($userId))\n {\n // \"Non-existing pseudo in BDD\" case\n $newUserData = $userManager->createUser($_POST['username'], strtolower($_POST['userEmail']), password_hash($_POST['userPassword'], PASSWORD_DEFAULT));\n \n if (isset($newUserData) && $newUserData > 0)\n {\n $_SESSION['pseudo'] = htmlspecialchars($_POST['username']);\n $_SESSION['id'] = $newUserData;\n $_SESSION['status'] = 'member';\n header('Location: index.php?action=getChaptersList');\n }\n \n else\n {\n header('Location: index.php?action=register');\n }\n }\n elseif ($userId > 0)\n {\n // \"Existing pseudo in BDD\" case\n header('Location: index.php?action=register');\n }\n }\n else\n {\n header('Location: index.php?action=register');\n }\n }", "public function createPendingUserWithAccount($emailAddress, $password, $name = null, $accountName = null, $parentAccountId = null) {\n\n // Grab the parent account id if necessary.\n $parentAccountId = $parentAccountId === null ? $this->session->__getActiveParentAccountId() : $parentAccountId;\n\n // Create a new user, save it and return it back.\n $user = Container::instance()->new(User::class, false);\n $user->setEmailAddress($emailAddress);\n $user->setHashedPassword($password);\n $user->setName($name);\n $user->setParentAccountId($parentAccountId);\n\n $validationErrors = $user->validate();\n\n if (isset($validationErrors[\"emailAddress\"])) {\n $this->emailService->send(new BrandedTemplatedEmail(\"security/duplicate-account\", [\"name\" => $name], null, null, [$user->getFullEmailAddress()]));\n } else {\n\n // Create an account to match with any name we can find.\n $account = Container::instance()->new(Account::class, false);\n $account->setName($accountName ? $accountName : ($name ? $name : $emailAddress));\n $account->setParentAccountId($parentAccountId);\n\n // Create a pending activation action\n $actionIdentifier = $this->pendingActionService->createPendingAction(\"USER_ACTIVATION\", \"NEW\", [\n \"user\" => $user,\n \"account\" => $account\n ]);\n\n $this->emailService->send(new BrandedTemplatedEmail(\"security/activate-account\", [\"code\" => $actionIdentifier, \"name\" => $name], null, null, [$user->getFullEmailAddress()]));\n\n return $actionIdentifier;\n }\n\n\n }", "protected function _createUser()\n {\n $aBillingAddress = KlarnaFormatter::klarnaToOxidAddress($this->_aOrderData, 'billing_address');\n\n $aDeliveryAddress = null;\n if($this->_aOrderData['billing_address'] !== $this->_aOrderData['shipping_address']){\n $aDeliveryAddress = KlarnaFormatter::klarnaToOxidAddress($this->_aOrderData, 'shipping_address');\n }\n\n $this->_oUser->oxuser__oxusername = new Field($this->_aOrderData['billing_address']['email'], Field::T_RAW);\n $this->_oUser->oxuser__oxactive = new Field(1, Field::T_RAW);\n\n if (isset($this->_aOrderData['customer']['date_of_birth'])) {\n $this->_oUser->oxuser__oxbirthdate = new Field($this->_aOrderData['customer']['date_of_birth']);\n }\n\n $this->_oUser->createUser();\n\n //NECESSARY to have all fields initialized.\n $this->_oUser->load($this->_oUser->getId());\n\n $password = $this->isRegisterNewUserNeeded() ? $this->getRandomPassword(8) : null;\n $this->_oUser->setPassword($password);\n\n $this->_oUser->changeUserData($this->_oUser->oxuser__oxusername->value, $password, $password, $aBillingAddress, $aDeliveryAddress);\n\n // login only if registered a new account with password\n if ($this->isRegisterNewUserNeeded()) {\n Registry::getSession()->setVariable('usr', $this->_oUser->getId());\n Registry::getSession()->setVariable('blNeedLogout', true); // TODO: seem to be not used - remove?\n }\n\n $this->setUser($this->_oUser);\n\n if($aDeliveryAddress){\n $this->_oUser->updateDeliveryAddress($aDeliveryAddress);\n }\n\n return true;\n }", "public function register()\n {\n $data = [\n 'name' => $this->request->get('name'),\n 'email' => $this->request->get('email'),\n 'password' => password_hash($this->request->get('password'), PASSWORD_DEFAULT)\n ];\n\n $user = User::create($data);\n\n $this->success(\n $user->toArray(),\n 'Account Created'\n );\n }", "protected function createUser()\n {\n if (! $this->needsUser()) {\n $this->command->info('Current driver does not require a user.');\n\n return;\n }\n\n $this->makeUserManager()\n ->createUser();\n\n $this->command->info('Created User ' . $this->username);\n }", "public function doCreateAccount()\n {\n $response = array(\n 'result' => 'error',\n 'data' => array(),\n 'errors' => array()\n );\n\n // Check that the request is coming from\n // an authorized source\n if ($this->checkAuthentication()) {\n\n // We can grab the POST'd data and\n // create a new user from it.\n // We then need to add the user id to the\n // data field in the response json.\n\n // Validate POST data\n $validator = Validator::make($_POST, array(\n 'email' => 'required',\n 'id' => 'required'\n ))->process();\n\n // Return errors if failure\n if ($validator->failed()) {\n $response['errors'] = $validator->getErrors();\n $response['result'] = 'error';\n header(\"Content-Type: application/json\");\n die(json_encode($response));\n }\n\n // Format user row data\n $user_data = array(\n 'email_address' => (string)$_POST['email'],\n 'app_id' => (int)$_POST['id'],\n 'created_at' => time(),\n 'requires_notification_setup' => 1\n );\n\n // Create a new user row\n $user = UserModel::create($user_data);\n\n // Format user details row data\n $user_details_data = array(\n 'user_id' => $user->getId(),\n );\n\n // Create new user details row\n $details = UserDetailsModel::create($user_details_data);\n $response['result'] = 'success';\n $response['data']['user_id'] = $user->getId();\n }\n\n header(\"Content-Type: application/json\");\n die(json_encode($response));\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the release date for the plugin as a string.
public function getPluginReleaseDate() { return $this->simpleQuery('/plnplugin/pluginInfo/releaseDate'); }
[ "public function getAppReleaseDate() : string {\n return $this->configVars['version-info']['release-date'];\n }", "public static function getReleaseDate () {}", "public function getReleaseDate();", "public function getReleaseDate() {\n\t}", "public function getReleaseDate()\n {\n return $this->release_date;\n }", "function getReleaseDate()\r\n {\r\n /**\r\n * version is rev of this class\r\n */\r\n Include_once 'xoops_version.php';\r\n $releasedate = XOOPS_FRAMEWORKS_MODULEADMIN_RELEASEDATE;\r\n return $releasedate;\r\n }", "public function getRelease_date()\n {\n return $this->release_date;\n }", "public function getReleaseDate()\n {\n return $this->releaseDate;\n }", "function getReleaseDate () {\n return $this->releaseDate;\n }", "public function getReleaseDate(){\n return $this->_releaseDate;\n }", "public function getBuildDate(): string {\n return DateTimeHelper::timestampToFormattedDateTime($this->getBuildTimestamp()) ?? '';\n }", "public function getReleaseDate()\n {\n return $this->releaseDate;\n }", "public function getDateRelease()\n {\n return $this->dateRelease;\n }", "public function getRevisionDate()\n {\n $value = $this->get(self::REVISIONDATE);\n return $value === null ? (string)$value : $value;\n }", "public function getResourceReleaseDate()\n {\n return $this->resourceReleaseDate;\n }", "public function getDate()\r\n {\r\n return (string) $this->svnInfo->date;\r\n }", "public function getDate(): string\n {\n return $this->getVersionFile()->getDate();\n }", "public function getReleaseDateDisplayName()\n {\n if (array_key_exists(\"releaseDateDisplayName\", $this->_propDict)) {\n return $this->_propDict[\"releaseDateDisplayName\"];\n } else {\n return null;\n }\n }", "public function getBuildDate()\n {\n if ($data = $this->getBuildData()) {\n return $data['date'];\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get name with the category name
public function getNameWithCategoryName() { return ''.$this->getCategoryName().' > '.$this->name; }
[ "function category_name()\n\t{\n\t\tglobal $IN, $TMPL, $FNS, $DB, $REGX, $LOC;\n\n\t\tif ( ! preg_match(\"#(^|\\/)C(\\d+)#\", $IN->QSTR, $match))\n\t\t{\t\t\n\t\t\treturn '';\n\t\t}\n\t\t\t\t\n\t\t$sql = \"SELECT exp_gallery_categories.cat_name\n\t\t\t\tFROM exp_gallery_categories, exp_galleries\n\t\t\t\tWHERE exp_gallery_categories.gallery_id = exp_galleries.gallery_id\";\n\t\t\t\t\n if (USER_BLOG !== FALSE)\n {\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t$sql .= \" AND exp_galleries.user_blog_id = '\".UB_BLOG_ID.\"'\";\n\t\t}\n\t\telse\n\t\t{\t\t\t\n\t\t\t$sql .= \" AND exp_galleries.is_user_blog = 'n'\";\n\t\t}\n\n\t\t$sql .= \" AND exp_gallery_categories.cat_id = '\".$DB->escape_str($match['2']).\"'\";\n\n\t\t$query = $DB->query($sql);\n\n\t\tif ($query->num_rows == 0)\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n\t\treturn str_replace(LD.'category'.RD, $query->row['cat_name'], $TMPL->tagdata);\n\t}", "public function getCategoryName() {\n\t\t\t$category_name = get_the_category();\n\t\t\t$category_name = $category_name[0]->cat_name;\n\t\t\treturn $category_name;\n\t\t}", "public function getNameAndCategory()\n {\n return '[' . $this->category->getName() . '] ' . $this->name;\n }", "function categoryName($id) {\n $name = \"\";\t\n if (is_object($this->params)) {\n $categories = $this->params->getCats()->Category;\n if (is_array($categories)) {\n foreach ($categories as $category) {\n if ($category->id == $id && strpos($category->name, \"Alla\") === false) {\n $name = $category->name; \n }\n }\n }\n }\n return $name;\n }", "public function getCustomName(RDR_Category $category){\n $key = $this->getId().\"-name\";\n if($category->getByKey(\"feedsData\", $key)) return $category->getByKey(\"feedsData\", $key);\n return $this->name;\n }", "public function getCategoryName()\n {\n return $this->categoryName;\n }", "function getCategoryName($categoryId)\n {\n // include the name retriever class and create a category name retriever\n require_once(\"class_libraries/NameRetriever.php\");\n $nameRetriever = new NameRetriever(\"category_id\");\n \n // get the category name and return it\n return $nameRetriever -> getName($categoryId);\n }", "public function getCategoryName()\r\n {\r\n return $this->categoryName;\r\n }", "public function getNameCat()\n {\n return $this->name_cat;\n }", "private function name_of_category($cat_id)\n {\n $sth = $this->conn->prepare(\"SELECT `category` AS 'name' FROM `tomato220`.`category` WHERE `category`.`id`= :id\");\n $sth->bindParam(':id', $cat_id, PDO::PARAM_INT);\n $sth->execute();\n // $value= $sth->fetch(PDO::FETCH_ASSOC);\n // $value = $sth->fetchall();\n $value = $sth->fetch(PDO::FETCH_ASSOC);\n return $value['name'];\n }", "function sp_meta_event_category_name(){\n\t\tglobal $sp_ecp;\n\t\t$current_cat = get_query_var('sp_events_cat');\n\t\tif($current_cat){\n\t\t\t$term_info = get_term_by('slug',$current_cat,$sp_ecp->get_event_taxonomy());\n\t\t\treturn $term_info->name;\n\t\t}\n\t}", "public function getCategoryName() {\n return $this->getCurrent()->findParentRow('Yourdelivery_Model_DbTable_Meal_Categories')->name;\n }", "function cah_news_get_category_name($cat_ID) {\r\n $response = cah_news_get_rest_body('categories/' . $cat_ID);\r\n if ($response) {\r\n return $response->name;\r\n }\r\n}", "public function getCategoryName()\n {\n $refUrl = explode(\"/\", $this->_redirectInterface->getRefererUrl());\n $cat_url = explode(\".\", end($refUrl));\n if (isset($cat_url)) {\n return null;\n }\n $category = $this->_categoryFactory->create();\n /** @var CategoryCollection $collection */\n $collection = $category->getCollection();\n if ($collection) {\n $collection->addAttributeToFilter('url_key', $cat_url[0]);\n $collection->addAttributeToSelect(['name', 'path']);\n }\n\n return $collection ? $collection->getFirstItem(): null;\n }", "public function getCategoryName()\n {\n $refUrl = explode(\"/\", $this->_redirectInterface->getRefererUrl());\n $cat_url = explode(\".\", end($refUrl));\n if (!$cat_url) {\n return null;\n }\n $category = $this->_categoryFactory->create();\n /** @var CategoryCollection $collection */\n $collection = $category->getCollection();\n if ($collection) {\n $collection->addAttributeToFilter('url_key', $cat_url[0]);\n $collection->addAttributeToSelect(['name', 'path']);\n }\n\n return $collection ? $collection->getFirstItem() : null;\n }", "function get_category_name($id)\n {\n \t$ci = & get_instance();\n \treturn $ci->db->get_where('xx_categories', array('id' => $id))->row_array()['name'];\n }", "public function getCategoryName() {\n return $this->pluginDefinition['category'] ?? '';\n }", "function primary_category_name() {\n\n\tglobal $post_id;\n\t$term = get_the_terms( $post_id, 'primary-category' );\n\tif ( ! $term ) {\n\t\treturn;\n\t} else {\n\t\techo $term[0]->name;\n\t}\n\n}", "public function getProductCategoryName() \n {\n return $this->_fields['ProductCategoryName']['FieldValue'];\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the value of tipousuariopemisos
public function getTipousuariopemisos() { return $this->tipousuariopemisos; }
[ "public function getPintuan()\n {\n return $this->get(self::pintuan);\n }", "public function getTiempo();", "public function getTiempoTono(){\n\t\treturn $this->tiempo_tono;\n\t}", "public function getValorMoraMulta()\n {\n return $this->segmento_u->valor_acrescimos;\n }", "public function getPrueba_psicotecnica(){\n return $this->prueba_psicotecnica;\n }", "public function obtenerTiposTurismo() {\n //abre conexion a base de datos\n $this->tipoTurismoD->conectar();\n //se obtiene los tipos Turismo de la base de datos\n $resultado = $this->tipoTurismoD->obtenerTiposTurismo();\n // se cierra conexion\n $this->tipoTurismoD->cerrarConexion();\n // se retorna la respuesta de la BD\n return $resultado;\n }", "function getprocedimiento(){\n\t\treturn $this->procedimiento;\n\t}", "public function getValorSolicitado();", "function getTamanio() {\r\n return $this->Tamanio;\r\n }", "public function getTipousuariofecha()\n {\n return $this->tipousuariofecha;\n }", "public function getPuntuacion()\n {\n return $this->puntuacion;\n }", "public function getTipousuario_idtipousuario()\n {\n return $this->tipousuario_idtipousuario;\n }", "public function getQtdImoveisContrato() {\n $idUser = (int)$_SESSION['user'][$this->ambiente]['id'];\n $imoveisqtdProprietario = $this->crud->SelectTotalSQL(\"SELECT * FROM anuncios WHERE id_proprietario = \".$idUser);\n return $imoveisqtdProprietario;\n }", "public function getPrecioOferta()\n {\n return $this->precioOferta;\n }", "public function getPuntaje()\n {\n return $this->puntaje;\n }", "public function DatosConfiguracionTiposSolicitudes()\n {\n\n $buscar = ConfiguracionTiposSolicitudes::find()->where(\"impuesto=:impuesto\", [\":impuesto\" => 2])\n ->andwhere(\"descripcion=:descripcion\", [\":descripcion\" => 'CAMBIO DE NUMERO CATASTRAL'])\n ->asArray()->all();\n\n\n return $buscar[0][\"id_tipo_solicitud\"]; \n\n }", "public function getMontoEjecutado()\n {\n $montoEjecutado = 0;\n foreach ($this->objetivos as $objetivo)\n {\n if (count($objetivo->getActividades())!=0)\n {\n foreach($objetivo->getActividades() as $actividad)\n {\n if (count($actividad->getRecursoEjecutado())!=0)\n {\n foreach($actividad->getRecursoEjecutado() as $ejecutado)\n {\n $moneda = $ejecutado->getMoneda();\n $montoEjecutado+=($ejecutado->getMonto()*$moneda->getPrecioBs());\n }\n }\n } \n }\n }\n return $montoEjecutado;\n }", "public function getPunti()\n {\n return $this->punti;\n }", "public function getPonta()\n {\n return $this->ponta;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get variance of times(sec)
public function getVariance () { $ave = $this->getAverage(); return (float)(array_sum(array_map(function($val) use ($ave){ return pow($val['time'] - $ave, 2); }, $this->logs)) / count($this->logs)); }
[ "function variance($arr){\n if (!count($arr)) return 0;\n $mean = $this->average($arr);\n $sos = 0; // Sum of squares\n foreach($arr as $key => $value){\n $sos += ($value - $mean) * ($value - $mean);\n }\n\n return $sos / (count($arr)-1); // denominator = n-1; i.e. estimating based on sample\n // n-1 is also what MS Excel takes by default in the\n // VAR function\n}", "function getTimeSlotVariances() {\n $timeSlotVariances = [];\n foreach ($this->timeSlotScores as $timeSlotID=>$score) {\n $timeSlotVariances[$timeSlotID] = $score->variance;\n }\n return $timeSlotVariances;\n }", "public function variance(): float\n {\n return 2 * $this->k;\n }", "public function variance(): int|float;", "function calc_variance($samples)\n{\n\n $num_samples = count($samples); // count: number of samples\n\n if ($num_samples < 2)\n {\n //print(\"ERROR: at least two numbers required to calculate variance\\n\");\n return NULL;\n }\n $average=array_sum($samples)/$num_samples; // calculate average value of samples\n\n foreach ($samples as $sample) // for each sample...\n { // make an array of\n $temp_array[]=pow($sample-$average,2); // (sample-average)^2\n }\n\n $sum=array_sum($temp_array); // sum all of these\n\n $variance=$sum/($num_samples-1); // variance = (sum of all samples) / (number of samples - 1)\n\n return $variance;\n}", "function sp_dur($stime)\n\t{\n\t\tif(!$stime) return \"N/A\";\n\t\tlist($usec, $sec) = explode(\" \", microtime());\n\t\treturn round(((float)$usec + (float)$sec)-$stime,4).\"s\";\n\t}", "public function getAverageDurations()\n {\n $durations = array();\n foreach ($this->_durations as $name => $duration) {\n $durations[$name] = $duration / $this->_iterations;\n\n }\n return $durations;\n }", "public function get_seconds_total()\n\t{\n\t\treturn $this->int_value / DateTime::int_in_second;\n\t}", "public function getSeconds(): int;", "public function getAvgTotalTimeSec()\n {\n return $this->avgTotalTimeSec;\n }", "function variance_population ($a) {\n //variable and initializations\n $the_variance = 0.0;\n $the_mean = 0.0;\n $the_array_sum = array_sum($a); //sum the elements\n $number_elements = count($a); //count the number of elements\n\n //calculate the mean\n $the_mean = $the_array_sum / $number_elements;\n\n //calculate the variance\n for ($i = 0; $i < $number_elements; $i++)\n {\n //sum the array\n $the_variance = $the_variance + ($a[$i] - $the_mean) * ($a[$i] - $the_mean);\n }\n\n $the_variance = $the_variance / $number_elements;\n\n //return the variance\n return $the_variance;\n}", "public function getTotalElapsedSeconds() {}", "function deviation ($array){\r\n\r\n$avg = average($array);\r\nforeach ($array as $value) {\r\n$variance[] = pow($value-$avg, 2);\r\n}\r\n$deviation = sqrt(average($variance));\r\nreturn $deviation;\r\n}", "public function testVariancePopulationFloats() {\n $values = [0.0, 0.25, 0.25, 1.25, 1.5, 1.75, 2.75, 3.25];\n $sample = false;\n $result = Stats::variance($values, $sample);\n $expected = 1.25;\n ok($expected, $result, '', pow(10, -4));\n }", "function getStandardDeviation($a)\n{\n //variable and initializations\n $the_standard_deviation = 0.0;\n $the_variance = 0.0;\n $the_mean = 0.0;\n $the_array_sum = array_sum($a); //sum the elements\n $number_elements = count($a); //count the number of elements\n\n //calculate the mean\n $the_mean = $the_array_sum / $number_elements;\n\n //calculate the variance\n for ($i = 0; $i < $number_elements; $i++)\n {\n //sum the array\n $the_variance = $the_variance + ($a[$i] - $the_mean) * ($a[$i] - $the_mean);\n }\n\n $the_variance = $the_variance / $number_elements;\n\n //calculate the standard deviation\n $the_standard_deviation = pow( $the_variance, 0.5);\n\n //return the variance\n return $the_standard_deviation;\n}", "public function testVarianceSampleIntegers() {\n $values = [2, 4, 4, 4, 5, 5, 7, 9];\n $sample = true;\n $result = Stats::variance($values, $sample);\n $expected = 4.571429;\n ok($expected, $result, '', pow(10, -4));\n }", "public function averageCourierTime()\n {\n return floatval($this->areas->average('duration')); \n }", "public function variances() : array\n {\n return $this->variances;\n }", "public function subSeconds($value);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Runs at the beginning of `exec()` before `preAction()`.
public function preExec() { }
[ "function _preExecute() { return; }", "function PreActions()\n {\n }", "public function doPreActionProcessings () { }", "public function preProcess ()\n\t{\n\t\t$this->_call('preProcess');\n\t}", "public function _beforeAction()\n {\n // We can write some custom code here that will be taken before an action is made\n }", "public function preDispatch()\n {\n $this->_escort->controllerBeforeAction($this->getActionController());\n }", "protected function pre() \n\t{\n\t\t\n\t}", "protected function preExecute() : void {\n // Do nothing, let subclasses override if needed.\n }", "public function preAction()\n {\n // page without action but with a scripts view get redirected to index action\n if (!$this->isAction($this->action) && $this->viewScriptExists()) {\n $this->new_file = $this->getViewActionScriptPath();\n $this->action = $this->action_prefix.'basic';\n }\n }", "public function runBefore() {\n if($this->_beforeController !== null) {\n foreach($this->_beforeController as $hookProvider) {\n $hookProvider->doBefore();\n }\n }\n }", "public function preProcess();", "function _beforeAction() \n {\n }", "protected function beforeAction() {\n\t\t\n\t}", "abstract public function beforeAction();", "public function drupalPre()\n {\n $this->init();\n $this->runSteps('Pre');\n }", "public function _beforeAction() {}", "public static function primary_before() { do_action( 'tha_primary_before' ); }", "protected function beforeExecute()\n\t{\n\t}", "public function beforeAction() {}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new vendor
public function createAction() { if (!$this->request->isPost()) { $this->dispatcher->forward([ 'controller' => "vendor", 'action' => 'index' ]); return; } $vendor = new Vendor(); $vendor->Listid = $this->request->getPost("ListID"); $vendor->Timecreated = $this->request->getPost("TimeCreated"); $vendor->Timemodified = $this->request->getPost("TimeModified"); $vendor->Editsequence = $this->request->getPost("EditSequence"); $vendor->Name = $this->request->getPost("Name"); $vendor->Isactive = $this->request->getPost("IsActive"); $vendor->Classref_listid = $this->request->getPost("ClassRef_ListID"); $vendor->Classref_fullname = $this->request->getPost("ClassRef_FullName"); $vendor->Companyname = $this->request->getPost("CompanyName"); $vendor->Salutation = $this->request->getPost("Salutation"); $vendor->Firstname = $this->request->getPost("FirstName"); $vendor->Middlename = $this->request->getPost("MiddleName"); $vendor->Lastname = $this->request->getPost("LastName"); $vendor->Jobtitle = $this->request->getPost("JobTitle"); $vendor->Suffix = $this->request->getPost("Suffix"); $vendor->Vendoraddress_addr1 = $this->request->getPost("VendorAddress_Addr1"); $vendor->Vendoraddress_addr2 = $this->request->getPost("VendorAddress_Addr2"); $vendor->Vendoraddress_addr3 = $this->request->getPost("VendorAddress_Addr3"); $vendor->Vendoraddress_addr4 = $this->request->getPost("VendorAddress_Addr4"); $vendor->Vendoraddress_addr5 = $this->request->getPost("VendorAddress_Addr5"); $vendor->Vendoraddress_city = $this->request->getPost("VendorAddress_City"); $vendor->Vendoraddress_state = $this->request->getPost("VendorAddress_State"); $vendor->Vendoraddress_postalcode = $this->request->getPost("VendorAddress_PostalCode"); $vendor->Vendoraddress_country = $this->request->getPost("VendorAddress_Country"); $vendor->Vendoraddress_note = $this->request->getPost("VendorAddress_Note"); $vendor->Shipaddress_addr1 = $this->request->getPost("ShipAddress_Addr1"); $vendor->Shipaddress_addr2 = $this->request->getPost("ShipAddress_Addr2"); $vendor->Shipaddress_addr3 = $this->request->getPost("ShipAddress_Addr3"); $vendor->Shipaddress_addr4 = $this->request->getPost("ShipAddress_Addr4"); $vendor->Shipaddress_addr5 = $this->request->getPost("ShipAddress_Addr5"); $vendor->Shipaddress_city = $this->request->getPost("ShipAddress_City"); $vendor->Shipaddress_state = $this->request->getPost("ShipAddress_State"); $vendor->Shipaddress_postalcode = $this->request->getPost("ShipAddress_PostalCode"); $vendor->Shipaddress_country = $this->request->getPost("ShipAddress_Country"); $vendor->Shipaddress_note = $this->request->getPost("ShipAddress_Note"); $vendor->Phone = $this->request->getPost("Phone"); $vendor->Mobile = $this->request->getPost("Mobile"); $vendor->Pager = $this->request->getPost("Pager"); $vendor->Altphone = $this->request->getPost("AltPhone"); $vendor->Fax = $this->request->getPost("Fax"); $vendor->Email = $this->request->getPost("Email"); $vendor->Cc = $this->request->getPost("Cc"); $vendor->Contact = $this->request->getPost("Contact"); $vendor->Altcontact = $this->request->getPost("AltContact"); $vendor->Nameoncheck = $this->request->getPost("NameOnCheck"); $vendor->Notes = $this->request->getPost("Notes"); $vendor->Accountnumber = $this->request->getPost("AccountNumber"); $vendor->Vendortyperef_listid = $this->request->getPost("VendorTypeRef_ListID"); $vendor->Vendortyperef_fullname = $this->request->getPost("VendorTypeRef_FullName"); $vendor->Termsref_listid = $this->request->getPost("TermsRef_ListID"); $vendor->Termsref_fullname = $this->request->getPost("TermsRef_FullName"); $vendor->Creditlimit = $this->request->getPost("CreditLimit"); $vendor->Vendortaxident = $this->request->getPost("VendorTaxIdent"); $vendor->Isvendoreligiblefor1099 = $this->request->getPost("IsVendorEligibleFor1099"); $vendor->Balance = $this->request->getPost("Balance"); $vendor->Currencyref_listid = $this->request->getPost("CurrencyRef_ListID"); $vendor->Currencyref_fullname = $this->request->getPost("CurrencyRef_FullName"); $vendor->Billingrateref_listid = $this->request->getPost("BillingRateRef_ListID"); $vendor->Billingrateref_fullname = $this->request->getPost("BillingRateRef_FullName"); $vendor->Salestaxcoderef_listid = $this->request->getPost("SalesTaxCodeRef_ListID"); $vendor->Salestaxcoderef_fullname = $this->request->getPost("SalesTaxCodeRef_FullName"); $vendor->Salestaxcountry = $this->request->getPost("SalesTaxCountry"); $vendor->Issalestaxagency = $this->request->getPost("IsSalesTaxAgency"); $vendor->Salestaxreturnref_listid = $this->request->getPost("SalesTaxReturnRef_ListID"); $vendor->Salestaxreturnref_fullname = $this->request->getPost("SalesTaxReturnRef_FullName"); $vendor->Taxregistrationnumber = $this->request->getPost("TaxRegistrationNumber"); $vendor->Reportingperiod = $this->request->getPost("ReportingPeriod"); $vendor->Istaxtrackedonpurchases = $this->request->getPost("IsTaxTrackedOnPurchases"); $vendor->Taxonpurchasesaccountref_listid = $this->request->getPost("TaxOnPurchasesAccountRef_ListID"); $vendor->Taxonpurchasesaccountref_fullname = $this->request->getPost("TaxOnPurchasesAccountRef_FullName"); $vendor->Istaxtrackedonsales = $this->request->getPost("IsTaxTrackedOnSales"); $vendor->Taxonsalesaccountref_listid = $this->request->getPost("TaxOnSalesAccountRef_ListID"); $vendor->Taxonsalesaccountref_fullname = $this->request->getPost("TaxOnSalesAccountRef_FullName"); $vendor->Istaxontax = $this->request->getPost("IsTaxOnTax"); $vendor->Prefillaccountref_listid = $this->request->getPost("PrefillAccountRef_ListID"); $vendor->Prefillaccountref_fullname = $this->request->getPost("PrefillAccountRef_FullName"); $vendor->Customfield1 = $this->request->getPost("CustomField1"); $vendor->Customfield2 = $this->request->getPost("CustomField2"); $vendor->Customfield3 = $this->request->getPost("CustomField3"); $vendor->Customfield4 = $this->request->getPost("CustomField4"); $vendor->Customfield5 = $this->request->getPost("CustomField5"); $vendor->Customfield6 = $this->request->getPost("CustomField6"); $vendor->Customfield7 = $this->request->getPost("CustomField7"); $vendor->Customfield8 = $this->request->getPost("CustomField8"); $vendor->Customfield9 = $this->request->getPost("CustomField9"); $vendor->Customfield10 = $this->request->getPost("CustomField10"); $vendor->Customfield11 = $this->request->getPost("CustomField11"); $vendor->Customfield12 = $this->request->getPost("CustomField12"); $vendor->Customfield13 = $this->request->getPost("CustomField13"); $vendor->Customfield14 = $this->request->getPost("CustomField14"); $vendor->Customfield15 = $this->request->getPost("CustomField15"); $vendor->Status = $this->request->getPost("Status"); if (!$vendor->save()) { foreach ($vendor->getMessages() as $message) { $this->flash->error($message); } $this->dispatcher->forward([ 'controller' => "vendor", 'action' => 'new' ]); return; } $this->flash->success("vendor was created successfully"); $this->dispatcher->forward([ 'controller' => "vendor", 'action' => 'index' ]); }
[ "public function testCreateVendor()\n {\n }", "function create_vendor($data)\n\t{\n\t\t$this->db->insert('vendor', $data);\n\t\t$return_value = $this->db->insert_id();\n\t\treturn \t$return_value;\n\t}", "public function actionCreate(SynchEntityInterface $vendor)\n {\n\t\ttry {\n \n $IPPVendor = $this->getQBOEntityByDisplayName($vendor->display_name);\n if(!$IPPVendor){\n $IPPVendor = new IPPVendor();\n $this->map($IPPVendor, $vendor);\t\t\t\t\n $IPPVendor = $this->add($IPPVendor);\n }\n $this->linkEntity($vendor, $IPPVendor);\n\t\t\t \n\t \t} catch (Exception $e) {\n QuickBooks::quickBookExceptionThrow($e);\n\t\t}\n \n }", "public function store()\n\t{\n\t\t$input = Request::all();\n\t\t$validator = Validator::make($input, Vendor::getCreateRules());\n\t\tif($validator->fails()) {\n\n\t\t\treturn ApiResponse::validation($validator);\n\t\t}\n\n\t\ttry {\n\t\t\t$vendor = $this->repo->createVendor($input['display_name'], $input);\n\t\t\tEvent::fire('JobProgress.Events.VendorCreated', new VendorCreated($vendor));\n\n\t\t\treturn ApiResponse::success([\n\t\t\t\t'message' => trans('response.success.created', ['attribute' => 'vendor']),\n\t\t\t\t'data' => $this->response->item($vendor, new VendorsTransformer)\n\t\t\t]);\n\t\t}catch(Exception $e) {\n\n\t\t\treturn ApiResponse::errorInternal(trans('response.error.internal'), $e);\n\t\t}\n\t}", "public function actionCreate() {\n $model = new Vendor();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\n // cek session dari halaman yg mana transaksi-masuk edit\n if (Url::previous('tm-edit')) {\n $var = Url::previous('tm-edit');\n Yii::$app->session->remove('tm-edit');\n Yii::$app->getSession()->setFlash(\n 'success', 'Berhasil menambahkan Vendor : <b>' . $model->nama\n );\n return $this->redirect($var);\n } else if (Url::previous('tm-create')) {\n $var = Url::previous('tm-create');\n Yii::$app->session->remove('tm-create');\n Yii::$app->getSession()->setFlash(\n 'success', 'Berhasil menambahkan Vendor : <b>' . $model->nama\n );\n return $this->redirect($var);\n }\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function store(CreateVendorRequest $request)\n {\n $input = $request->all();\n\n $vendor = $this->vendorRepository->create($input);\n\n Session::Flash('msg.success', 'Vendor saved successfully.');\n\n return redirect(route('admin.vendors.index'));\n }", "function NewVendorRecord()\n\t{\n\t\t$vendorNo = $_POST['vendorNo'];\n\t\t$vendorName = $_POST['vendorName'];\n $address1 = $_POST['address1'];\n\t\t$address2 = $_POST['address2'];\n\t\t$city = $_POST['city'];\n\t\t$prov = $_POST['prov'];\n\t\t$postCode = $_POST['postCode'];\n\t\t$country = $_POST['country'];\n\t\t$phone = $_POST['phone'];\n\t\t$fax = $_POST['fax'];\n\n\t\t$connection = ConnectToDatabase();\n\t\t$sql = \"INSERT INTO Vendors (VendorNo, VendorName, Address1, Address2, City, Prov, PostCode, Country, Phone, Fax) VALUES($vendorNo, '$vendorName', '$address1', '$address2', '$city', '$prov', '$postCode', '$country', $phone, $fax)\";\n\t\t$preparedQueryInsert = $connection -> prepare($sql);\n\t\t$preparedQueryInsert -> execute();\n\t}", "public function setVendor(): void;", "function ss_wc_create_vendor_store( $vendor_id ) {\n\t// The base commission set in the vendors settings.\n\t$vendors_commission = get_option( 'woocommerce_product_vendors_base_commission' );\n\t// Check that a base commission has been set. If empty we set a default commission percentage.\n\tif ( empty( $vendors_commission ) ) {\n\t\t$vendors_commission = 50; // Default is 50%\n\t}\n\n\t// Now we pass through the store details.\n\t$store_details = array(\n\t\t'name' => trim( $_POST['store_name'] ),\n\t\t'description' => trim( $_POST['store_description'] ),\n\t\t'vendor_admins' => $vendor_id,\n\t\t'vendor_commission' => apply_filters( 'ss_wc_vendor_commission_rate_on_registration', $vendors_commission ), // Can be filtered to change commission rate on registration.\n\t\t'paypal_email' => trim( $_POST['paypal_email'] )\n\t);\n\n\t// Create vendor store.\n\t$new_vendor_id = wp_insert_term( $store_details['name'], 'shop_vendor', array(\n\t\t'description' => $store_details['description'],\n\t\t'slug' => trim( strtolower( str_replace( ' ', '-', $store_details['name'] ) ) ),\n\t\t'parent' => ''\n\t) );\n\n\tif( ! is_wp_error( $new_vendor_id ) ) {\n\t\t// Get term id, set default to 0 if not set.\n\t\t$new_vendor_id = isset( $new_vendor_id['term_id'] ) ? $new_vendor_id['term_id'] : 0;\n\n\t\tdo_action( 'ss_wc_save_store_details', $vendor_id, $new_vendor_id, $store_details );\n\t} else {\n\t\t$error_log = array( 'vendor_id' => $vendor_id, 'new_vendor_id' => $new_vendor_id, 'store_details' => $store_details );\n\t\t$store_error = new WP_Error( 'creating-store-error', __( 'Unable to create store. Please see error log for details.\", \"ss-wc-vendor-registration' ), $error_log );\n\t\treturn $store_error;\n\t}\n\n}", "public function createProduct();", "protected function createVendorRequest($vendor = null)\n {\n\n $resourcePath = '/vendors';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($vendor)) {\n $_tempBody = $vendor;\n }\n\n if ($multipart) {\n $headers= $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n $httpBody = new MultipartStream($multipartContents); // for HTTP post (form)\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams); // for HTTP post (form)\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n $url = $this->config->getHost() . $resourcePath . ($query ? '?' . $query : '');\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n return new Request(\n 'POST',\n $url,\n $headers,\n $httpBody\n );\n }", "private function vendorFactory(string $postcode): Vendor\n {\n return new Vendor(\"test\", $postcode, 10);\n }", "private function createVendorsModel(array $vendors): void\n {\n foreach ($vendors as $vendor) {\n $vendorDetails = $this->splitIntoVendorsAndFoodItems($vendor);\n $oVendor = new Vendor(...$this->splitVendor($vendorDetails[0]));\n foreach (array_slice($vendorDetails, 1) as $foodItem) {\n $foodItemFormatted = $this->splitFoodItem($foodItem);\n $oFoodItem = new FoodItem(...$foodItemFormatted);\n $oVendor->addFoodItem($oFoodItem);\n }\n $this->mVendors->addVendor($oVendor);\n }\n }", "public function testAddVendor()\n {\n }", "public function testPostValidVendor() {\n\t\t// create a new Vendor\n\t\t$newVendor = new Vendor(null, $this->VALID_contactName, $this->VALID_vendorEmail, $this->VALID_vendorName, $this->VALID_vendorPhoneNumber);\n\n\t\t// run a get request to establish session tokens\n\t\t$this->guzzle->get('https://bootcamp-coders.cnm.edu/~invtext/backend/php/api/vendor/?vendorName=br');\n\n\t\t// grab the data from guzzle and enforce the status' match our expectations\n\t\t$response = $this->guzzle->post('https://bootcamp-coders.cnm.edu/~invtext/backend/php/api/vendor/',\n\t\t\t['headers' => ['X-XSRF-TOKEN' => $this->getXsrfToken()], 'json' => $newVendor]);\n\t\t$this->assertSame($response->getStatusCode(), 200);\n\t\t$body = $response->getBody();\n\t\t$vendor = json_decode($body);\n\t\techo $body.PHP_EOL;\n\t\t$this->assertSame(200, $vendor->status);\n\t}", "private function addVendors() {\n\t\n\t\t$database = new Database();\n\n\t\tforeach($this->aryData as $record) {\n\t\t\t\t\t\n\t\t\t$database->query(\n\t\t\t\t'INSERT IGNORE INTO vendors (`code`) VALUES (:code)'\n\t\t\t);\n\t\t\t\t\n\t\t\t$database->bind(':code', $record{'Vendor'});\n\n\t\t\t$database->execute();\n\t\t}\n\t\techo \"<p>Vendors added for store.</p>\";\n\t}", "public function local_vendors_create()\n {\n \tview()->share('type', 'local_vendors');\n $title = 'Add New local_vendors';\n return view('admin.local_vendors_create', compact('title'));\n }", "public function createECashVendorAPI($property_short, $mode, $application_id = NULL)\n\t{\n\t\treturn new OLPECash_VendorAPI($property_short, $mode, $application_id);\n\t}", "public function store()\n {\n $data = Input::json()->all();\n $this->validator->validate($data);\n\n $vendor = new Vendor($data);\n $vendor->save();\n\n return $this->successfulResponse($vendor);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes all properties attached to the given $parent.
protected function removePropertiesByParent($parent) { $parentIdentifier = $this->persistenceSession->getIdentifierByObject($parent); $statementHandle = $this->databaseHandle->prepare('DELETE FROM "properties_data" WHERE "parent"=?'); $statementHandle->execute(array($parentIdentifier)); $statementHandle = $this->databaseHandle->prepare('DELETE FROM "properties" WHERE "parent"=?'); $statementHandle->execute(array($parentIdentifier)); }
[ "protected function removeValueObjectsByParent($parent) {\n\t\t$statementHandle = $this->databaseHandle->prepare('SELECT \"identifier\" FROM \"valueobjects\" WHERE \"identifier\" IN (SELECT DISTINCT \"object\" FROM \"properties_data\" WHERE \"parent\"=?)');\n\t\t$statementHandle->execute(array($this->persistenceSession->getIdentifierByObject($parent)));\n\t\twhile ($valueObjectIdentifier = $statementHandle->fetchColumn()) {\n\t\t\t$valueObject = $this->persistenceSession->getObjectByIdentifier($valueObjectIdentifier);\n\t\t\tif ($this->getValueObjectUsageCount($valueObject) === 1) {\n\t\t\t\t$this->removeValueObject($valueObject);\n\t\t\t}\n\t\t}\n\t}", "public function unset_on_parent() {\n\t\t$this->parent->delete_by_key( $this->key );\n\t}", "protected function removeEntitiesByParent($parent) {\n\t\t$statementHandle = $this->databaseHandle->prepare('SELECT \"identifier\", \"type\" FROM \"entities\" WHERE \"parent\" = ?');\n\t\t$statementHandle->execute(array($this->persistenceSession->getIdentifierByObject($parent)));\n\t\tforeach ($statementHandle->fetchAll(\\PDO::FETCH_ASSOC) as $entityRow) {\n\t\t\tif ($this->reflectionService->getClassSchema($entityRow['type'])->isAggregateRoot() !== TRUE) {\n\t\t\t\t$this->removeEntity($this->persistenceSession->getObjectByIdentifier($entityRow['identifier']));\n\t\t\t}\n\t\t}\n\t}", "public function unsetParent() {\n\t\tunset($this->parent);\n\t}", "public function clearProperties();", "public function deleteAllProperties() {}", "public function clearProperties() {}", "public function inheritProperties($parent)\n {\n foreach ((new ReflectionClass($parent))->getProperties() as $property) {\n\n if($property->isStatic()) {\n continue;\n }\n\n $property->setAccessible(true);\n\n \t$this->{$property->getName()} = $property->getValue($parent);\n\n }\n\n return $this;\n }", "public function removeFromParent();", "private function unsetProperties(){\n //Human::log(\"--------------------------------------------------- unset initial properties for \".$this->modelName);\n foreach($this->fields() as $f){\n \n $fieldName=$f->name;\n \n unset($this->$fieldName);\n /*\n if(gettype($this->$fieldName)==\"object\"){\n Human::log(\"FIELD now $fieldName is \". get_class($this->$fieldName)); \n }else{\n Human::log(\"FIELD now $fieldName is \". gettype($this->$fieldName)); \n }\n\t \n\t */\n } \n }", "protected function resetObjectProperties()\n {\n foreach ($this as $key => $value) {\n unset($this->$key);\n }\n }", "public function clearProperties()\n {\n $this->properties = [];\n }", "function clear_properties() {\r\n\t\t$this->properties = 0;\r\n\t}", "public function removeProperty($path) {\n\t\t// PHP doesn't allow to delete the array entry by unseting the\n\t\t// reference. So we need to get the parent property to delete\n\t\t// the specified property.\n\t\t$parts = explode(\".\", $path);\n\t\t$propName = array_pop($parts);\n\t\t$path = implode($parts);\n\t\t// Get the parent property schema.\n\t\t$parentPropSchema = &$this->_getSchemaByPath($path, $this->schema);\n\t\t// Unset the specified property.\n\t\tswitch ($parentPropSchema['type']) {\n\t\tcase \"array\":\n\t\t\tunset($parentPropSchema['items'][$propName]);\n\t\t\tbreak;\n\t\tcase \"object\":\n\t\t\tunset($parentPropSchema['properties'][$propName]);\n\t\t\tbreak;\n\t\t}\n\t}", "protected function removeProperties($entity)\n\t{\n // We're walking through all public and private properties, not using getters\n foreach ((array)$entity as $key => $value) {\n if ($value instanceof Persistable) {\n $value->persistRemove();\n }\n }\n\t}", "public function deleteProperties()\n {\n $relation_name = $this->getPropertyRelationName();\n\n if (!method_exists($this, $relation_name)) return;\n\n if ($relations = call_user_func(array($this, $relation_name))) {\n $relations->delete();\n }\n }", "public function clear()\n {\n foreach ( $this->properties as $name => $value )\n {\n if ( !in_array( $name, array( 'name', 'namespace', 'errors', 'hasError' ), true ) )\n {\n $this->properties[$name] = null;\n }\n }\n }", "function dropByParent($parent) {\n return StatusUpdates::delete(array('parent_id = ?', $parent->getId()));\n }", "public function clear()\r\n\t{\r\n\t\tforeach ($this->_properties as $key => $value) {\r\n\t\t\t$this->_properties[$key] = null;\r\n\t\t}\r\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get extra items which haven't been defined in blueprints.
public function extra() { return $this->getBlueprint()->extra($this->toArray()); }
[ "public function extra()\n {\n return $this->blueprints ? $this->blueprints->extra($this->items) : array();\n }", "protected function getExtra()\n {\n $collection = $this->wishlistHelper->getWishlistItemCollection()->setInStockFilter();\n\n $items = [];\n /** @var \\Magento\\Wishlist\\Model\\Item $wishlistItem */\n foreach($collection as $wishlistItem) {\n $items[] = [\n 'id' => $wishlistItem->getProductId(),\n 'wishlistId' => $wishlistItem->getId()\n ];\n }\n\n return $items;\n }", "public function getUnknownItems() : array\n\t{\n\t\treturn $this->showdownItemRepository->getUnknown();\n\t}", "protected function listExtraDocumentationItems(): array\n {\n $extra = FilterNull::filterNull([\n 'additionalProperties' => $this->allowAdditionalProperties ?: null,\n 'minProperties' => $this->minProperties,\n 'maxProperties' => $this->maxProperties,\n 'properties' => []\n ]);\n\n foreach ($this->properties as $propName => $parameter) {\n $extra['properties'][$propName] = $parameter->getDocumentation();\n\n // Per OpenAPI spec, object properties cannot have 'required' attribute,\n // so we remove it, but if it is true, there is a special 'required' attribute for the\n // parent object that must have the property name in it. Sheesh...\n if (isset($extra['properties'][$propName]['required'])) {\n if ($extra['properties'][$propName]['required'] == true) {\n $extra['required'][] = $propName;\n }\n unset($extra['properties'][$propName]['required']);\n }\n }\n\n return $extra;\n }", "public static function get_excluded_items() {\n\t\t\treturn get_option( 'astra_portfolio_excludes', array() );\n\t\t}", "public function getAvailableExtras()\n {\n // Create extra object\n $extraResponse = \\tabs\\api\\client\\ApiClient::getApi()->get(\n \"/booking/{$this->getBookingId()}/extra\"\n );\n \n return $this->_getExtrasFromResponse($extraResponse);\n }", "public function get_extras()\n {\n return $this->extras;\n }", "public function getExtra() {\n\t\treturn $this->extra;\n\t}", "public function getExtraFields()\n {\n return $this->extra_fields;\n }", "public function getExtraFields()\n {\n return $this->extraFields;\n }", "public function getAdditional();", "protected abstract function getDisallowedItems();", "protected function getExcludedAttributesFromDependencies() {\n return array(\n 'author',\n 'parent',\n 'comments',\n 'host_entity',\n );\n }", "public function getExtra()\n {\n return json_decode($this->extra);\n }", "public function getExtraAttributes()\n {\n return $this->extraAttributes;\n }", "public function getExtraVars()\n {\n return $this->extraVars;\n }", "protected function allItems() {\n\t\treturn $this->allItemsExcept(['BigKey', 'Key']);\n\t}", "public function getExtras()\n {\n return $this->extras;\n }", "public function getUnavailableItems()\n {\n return $this->unavailableItems;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Migrates the objects that are included in the video sitemap.
protected function migrateIncludedObjects() { if ( ! isset( $this->oldOptions['modules']['aiosp_video_sitemap_options']['aiosp_video_sitemap_posttypes'] ) ) { return; } $publicPostTypes = aioseo()->helpers->getPublicPostTypes( true ); if ( in_array( 'all', $this->oldOptions['modules']['aiosp_video_sitemap_options']['aiosp_video_sitemap_posttypes'], true ) ) { aioseo()->options->sitemap->video->postTypes->all = true; aioseo()->options->sitemap->video->postTypes->included = array_values( $publicPostTypes ); } else { aioseo()->options->sitemap->video->postTypes->all = false; aioseo()->options->sitemap->video->postTypes->included = array_values( array_intersect( $publicPostTypes, $this->oldOptions['modules']['aiosp_video_sitemap_options']['aiosp_video_sitemap_posttypes'] ) ); } }
[ "private function _migrateRoutes()\n {\n $routes = (new Query())\n ->select([\n 'uid',\n 'siteId',\n 'uriParts',\n 'uriPattern',\n 'template',\n 'sortOrder',\n ])\n ->from(['{{%routes}}'])\n ->indexBy('uid')\n ->all();\n\n foreach ($routes as &$route) {\n $route['siteUid'] = $route['siteId'] ? Db::uidById(Table::SITES, $route['siteId']) : null;\n $route['uriParts'] = Json::decodeIfJson($route['uriParts']);\n unset($route['uid'], $route['siteId']);\n $route['sortOrder'] = (int)$route['sortOrder'];\n }\n\n Craft::$app->getProjectConfig()->set('routes', $routes);\n }", "private function moveFiles()\n {\n /** @var Sitemap[] $sitemaps */\n foreach ($this->sitemaps as $shopId => $sitemaps) {\n // Delete old sitemaps for this siteId\n foreach ($this->filesystem->listContents(sprintf('shop-%d', $shopId)) as $file) {\n $this->filesystem->delete($file['path']);\n }\n\n // Move new sitemaps into place\n foreach ($sitemaps as $sitemap) {\n $sitemapFileName = $this->sitemapNameGenerator->getSitemapFilename($shopId);\n try {\n $this->filesystem->write($sitemapFileName, file_get_contents($sitemap->getFilename()));\n } catch (\\League\\Flysystem\\Exception $exception) {\n $this->logger->error(sprintf('Could not move sitemap to \"%s\" in the location for sitemaps', $sitemapFileName));\n } finally {\n // If we could not move the file to it's target, we remove it here to not clutter tmp dir\n unlink($sitemap->getFilename());\n }\n }\n }\n\n $this->sitemaps = [];\n }", "private function regenerateSitemap() {\n\t\tif (\n\t\t\tisset( $this->oldOptions['modules']['aiosp_sitemap_options']['aiosp_sitemap_rewrite'] ) &&\n\t\t\tempty( $this->oldOptions['modules']['aiosp_sitemap_options']['aiosp_sitemap_rewrite'] )\n\t\t) {\n\t\t\t$files = aioseo()->sitemap->file->files();\n\t\t\t$detectedFiles = [];\n\t\t\tforeach ( $files as $filename ) {\n\t\t\t\t// We don't want to delete the video sitemap here at all.\n\t\t\t\t$isVideoSitemap = preg_match( '#.*video.*#', $filename ) ? true : false;\n\t\t\t\tif ( ! $isVideoSitemap ) {\n\t\t\t\t\t$detectedFiles[] = $filename;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$wpfs = aioseo()->helpers->wpfs();\n\t\t\tif ( count( $detectedFiles ) && is_object( $wpfs ) ) {\n\t\t\t\tforeach ( $detectedFiles as $file ) {\n\t\t\t\t\t@$wpfs->delete( $file, false, 'f' );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\taioseo()->sitemap->file->generate( true );\n\t\t}\n\t}", "private function migrateIncludedTaxonomies() {\n\t\tif ( isset( $this->options['videositemap_taxonomies'] ) ) {\n\t\t\t$allowedTaxonomies = array_diff(\n\t\t\t\taioseo()->helpers->getPublicTaxonomies( true ), aioseo()->helpers->getNoindexedTaxonomies(), [ 'category', 'post_tag' ]\n\t\t\t);\n\t\t\t$includedTaxonomies = array_values(\n\t\t\t\tarray_intersect( $allowedTaxonomies, $this->options['videositemap_taxonomies'] )\n\t\t\t);\n\n\t\t\taioseo()->options->sitemap->video->taxonomies->included = $includedTaxonomies;\n\n\t\t\tif ( count( $includedTaxonomies ) !== count( $allowedTaxonomies ) ) {\n\t\t\t\taioseo()->options->sitemap->video->taxonomies->all = false;\n\t\t\t}\n\t\t}\n\t}", "protected function migrateMedia()\n {\n $this->em = $this->getContainer()->get('doctrine')->getManager();\n $this->client = new Client();\n $this->s3 = new S3Client(\r\n [\n 'version' => 'latest',\n 'region' => 'us-west-2',\n 'credentials' => [\n 'key' => $this->getContainer()->getParameter('amazon_aws_key'),\n 'secret' => $this->getContainer()->getParameter('amazon_aws_secret_key'),\n ]\n ]\r\n );\n $this->bucket = $this->getContainer()->getParameter('amazon_s3_bucket_name');\n //Article Posts\n $this->migrateArticlePosts();\n //Video Posts\n //$this->migrateVideoPosts();\n //List Posts\n //$this->migrateListPosts();\n //Montage Posts\n //$this->migrateMontagePosts();\n }", "function sm_migration_add_redirects() {\n\t$node_type_replacements = array(\n\t\t'article' => 'article',\n\t\t//'page' => '',\n\t\t'blog' => 'blog',\n\t\t//'company' => 'supplier',\n\t\t'podcast'=> 'podcast',\n\t\t'video' => 'video',\n\t\t'webcast' => 'webcast',\n\t\t'whitepaper' => 'whitepaper',\n\t);\n\t\n\t$joomla_ids = _sm_get_joomla_ids_from_csv();\n foreach($joomla_ids as $joomla_id) {\n $query = db_select('node', 'node')\n \t\t\t\t \t->fields('jtable', array('field_joomla_id_value'))\n \t\t\t\t\t->fields('node', array('nid', 'type'))\n \t\t\t\t \t->condition('entity_type', 'node')\n \t\t\t\t \t->condition('jtable.field_joomla_id_value', $joomla_id)\n \t\t\t\t \t->condition('deleted', '0');\n \t$query->leftJoin('field_data_field_joomla_id', 'jtable', 'node.nid=jtable.entity_id AND node.vid=jtable.revision_id');\n \t$result = $query->execute();\n \t\n \tforeach ($result as $record) {\n \t $node_id = $record->nid;\n \t \n \t // ==== Code to Add redirects\n \t $type = isset($node_type_replacements[$record->type]) ? $node_type_replacements[$record->type] : false;\n \t \n \t if ($type == 'page' || $type == 'blog') continue; // no blog and page will be added manually\n\n \t\tif ($type == 'article') {\n \t\t\t$query = Database::getConnection('default', 'joomla')\n \t\t\t\t\t\t\t\t->select('jos_content', 'jcontent')\n \t\t\t \t->fields('jcontent', array('content_type'))\n \t\t\t\t\t\t\t\t->condition('jcontent.id', $joomla_id);\n \t\t\t$finder = $query->execute();\n\n \t\t\tforeach($finder as $finder1) {\n \t\t\t\t$type = term_subtype_update($finder1->content_type);\n \t\t\t}\n \t\t}\n\n \t\t$patterns = array(\n \t\t\t'view-' . $joomla_id => 'view-' . $joomla_id\n \t\t);\n\n \t\tif ($type) {\n \t\t\t$patterns[$type . '-' . $joomla_id] = $type . '-' . $joomla_id;\n \t\t}\n \t\telse {\n \t\t\tdebugm('Missing content type: ' . $joomla_id . ':' . $node_id);\n \t\t}\n \n \n \t\t$query = db_select('redirect', 'redirect')\n \t\t\t\t\t\t->fields('redirect', array('source'))\n \t\t\t\t\t \t->condition('redirect', 'node/'.$node_id);\n \t\t$redirects = $query->execute();\n \t\tforeach($redirects as $redirect) {\n \t\t\tif (isset($patterns[$redirect->source])) unset($patterns[$redirect->source]);\n \t\t}\n \n \t\tif (!$patterns) continue;\n\n foreach($patterns as $pattern) {\n \t\t\t$redirect = new stdClass();\n \t\t\t$redirect->type = 'redirect';\n \t\t\t$redirect->source = $pattern;\n \t\t\t$redirect->source_options = array();\n \t\t\t$redirect->redirect = 'node/' . $node_id;\n \t\t\t$redirect->redirect_options = array();\n \t\t\t$redirect->language = LANGUAGE_NONE;\n \t\t\t$redirect->status_code = 301;\n \n \t\t\tredirect_save($redirect);\n \t\t}\n\t }\n }\n}", "protected function migrateSeoTab()\n {\n $this->log('Start migration SEO Tab data...');\n\n /* Migrate redirects. */\n $corePath = $this->modx->getOption('stercseo.core_path', null, $this->modx->getOption('core_path') . 'components/stercseo/');\n $this->modx->loadClass('seoUrl', $corePath . 'model/stercseo/');\n foreach ($this->modx->getIterator('seoUrl') as $seoUrl) {\n /* Create redirect if not exists. */\n $oldUrlArray = parse_url(urldecode($seoUrl->get('url')));\n if (!isset($oldUrlArray['path'])) {\n continue;\n }\n\n $oldUrl = trim($oldUrlArray['path'], '/');\n if (!$this->modx->getObject('SeoSuiteRedirect', [\n 'resource_id' => $seoUrl->get('resource'),\n 'context_key' => $seoUrl->get('context_key'),\n 'old_url' => $oldUrl\n ])) {\n $redirect = $this->modx->newObject('SeoSuiteRedirect');\n $redirect->fromArray([\n 'context_key' => $seoUrl->get('context_key'),\n 'resource_id' => $seoUrl->get('resource'),\n 'old_url' => $oldUrl,\n 'new_url' => $seoUrl->get('resource'),\n 'active' => true\n ]);\n\n $redirect->save();\n }\n }\n\n /* Migrate properties. */\n $query = $this->modx->newQuery('modResource');\n $query->where([\n 'properties:LIKE' => '%stercseo%'\n ]);\n foreach ($this->modx->getIterator('modResource', $query) as $modResource) {\n $ssResource = $this->modx->getObject('SeoSuiteResource', [\n 'resource_id' => $modResource->get('id')\n ]);\n\n if (!$ssResource) {\n $ssResource = $this->modx->newObject('SeoSuiteResource');\n $ssResource->set('resource_id', $modResource->get('id'));\n }\n\n if ($oldProperties = $modResource->getProperties('stercseo')) {\n $ssResource->fromArray([\n 'index_type' => isset($oldProperties['index']) ? $oldProperties['index'] : 1,\n 'follow_type' => isset($oldProperties['follow']) ? $oldProperties['follow'] : 1,\n 'sitemap' => isset($oldProperties['sitemap']) ? $oldProperties['sitemap'] : 1,\n 'sitemap_prio' => isset($oldProperties['priority']) ? str_replace(['0.25', '0.5', '1.0'], ['low', 'normal', 'high'], $oldProperties['priority']) : 'normal',\n 'sitemap_changefreq' => isset($oldProperties['changefreq']) ? str_replace(['always', 'hourly'], ['high', 'normal'], $oldProperties['changefreq']) : 'normal'\n ]);\n\n $ssResource->save();\n }\n }\n\n $this->log('Finished migrating SEO Tab data');\n }", "function drush_gbif_scaled_contents_migrate() {\n include_once('taxonomy_terms_mapping.php');\n $voc_field_mapping = gbif_scaled_contents_voc_field_mapping();\n $content_type_mapping = array(\n 'newsarticle' => 'news',\n 'usesofdata' => 'data_use',\n 'featureddataset' => 'dataset',\n );\n\n variable_del('gbif_subject_definition');\n\n foreach ($content_type_mapping as $old_type => $new_type) {\n $entity_query = new EntityFieldQuery();\n $entity_query->entityCondition('entity_type', 'node')\n ->entityCondition('bundle', array($old_type), 'IN');\n $exist = $entity_query->execute();\n\n if (isset($exist['node'])) {\n\n $count = count($exist['node']);\n drush_print($count . ' nodes to be processed...');\n $count_unpublished = 0;\n $count_published = 0;\n $count_migrated = 0;\n\n // Migrate each of them by iterating through.\n // First round to save only legacy nid and the title.\n foreach ($exist['node'] as $nid => $n_obj) {\n $legacy_node = node_load($nid);\n drush_print('Node ' . $legacy_node->nid . ' is being processed...');\n $legacy_node_wrapper = entity_metadata_wrapper('node', $legacy_node);\n $legacy_node_status = $legacy_node_wrapper->status->value();\n switch ($legacy_node_status) {\n case \"1\":\n $count_published++;\n break;\n case \"0\":\n $count_unpublished++;\n break;\n }\n $legacy_node_created = (int)$legacy_node_wrapper->created->value();\n $legacy_node_changed = (int)$legacy_node_wrapper->changed->value();\n\n $new_node = new stdClass();\n $new_node->type = $new_type; // The new type of node being created.\n node_object_prepare($new_node);\n $new_node->legacy_node_created = $legacy_node_created;\n $new_node->legacy_node_changed = $legacy_node_changed;\n\n // Pathauto and URL alias\n $url_alias = drupal_get_path_alias('node/' . $legacy_node->nid);\n if (isset($url_alias)) {\n $new_node->legacy_node_path = $url_alias;\n }\n\n $new_node_wrapper = entity_metadata_wrapper('node', $new_node);\n\n // Legacy nid\n $new_node_wrapper->field_legacy_nid->set($nid);\n\n // Title\n $title = $legacy_node_wrapper->title->value();\n $new_node_wrapper->title->set($title);\n\n // Body\n $body = $legacy_node_wrapper->body->value();\n // If this node only has title and no body, and is unpublished, delete and exit the loop.\n if (!empty($body)) {\n $new_node_wrapper->body->set($body);\n }\n\n // Images\n // @see http://dropbucket.org/node/1201 for checking a field is set.\n if ($legacy_node_wrapper->__isset('field_image')) {\n $image = $legacy_node_wrapper->field_image->value();\n if (!empty($image)) {\n // Move the image file to the new location\n $file_destination_dir_uri = 'public://gbif_scaled_contents/news/' . date('Y-F', $legacy_node_created) . '/' . $legacy_node->nid;\n $dir_exists = file_prepare_directory($file_destination_dir_uri);\n if (!$dir_exists) {\n $dir_created = drupal_mkdir($file_destination_dir_uri, NULL, TRUE);\n if ($dir_created == TRUE) {\n drush_print(' Node ' . $legacy_node->nid . ' directory created.');\n }\n else {\n drush_print(' Node ' . $legacy_node->nid . ' directory creation failed.');\n }\n }\n $image_real_path = drupal_realpath($image['uri']);\n $image_content = file_get_contents($image_real_path);\n $file_destination_uri = $file_destination_dir_uri . '/' . $image['filename'];\n file_unmanaged_save_data($image_content, $file_destination_uri, FILE_EXISTS_REPLACE);\n file_unmanaged_delete_recursive($image['uri']);\n\n $image['uri'] = $file_destination_uri;\n $new_node_wrapper->field_uni_images->set(array($image));\n }\n }\n\n // fields that can be migrated without term mapping.\n $fields_wo_term_mapping = array(\n 'field_citationinformation' => 'field_citation_information',\n 'field_relatedgbifresources' => 'field_related_gbif_resources', // links\n 'field_numofresused' => 'field_num_rs_used',\n 'field_reasearcherslocation' => 'field_researcher_location',\n 'field_linkstoresearch' => 'field_link_to_research',\n 'field_datasetkey' => 'field_dataset_uuid',\n 'field_country' => 'field_country',\n 'field_programme' => 'field_programme',\n 'field_organizations' => 'field_organizations',\n );\n foreach ($fields_wo_term_mapping as $field_from => $field_to) {\n //drush_print(' Field ' . $field_from . ' are being analysed and migrated to ' . $field_to . '...');\n if (!empty($legacy_node->$field_from)) {\n //drush_print(' Processing ' . $field_from . '...');\n\n $field_from_value = $legacy_node_wrapper->$field_from->value();\n\n // EMW seems omitting delta when there is only one value in the field.\n // We need to restore the array structure here.\n if (is_array($field_from_value)) {\n $keys = array_keys($field_from_value);\n $delta_true = TRUE;\n foreach ($keys as $key) {\n if (!is_numeric($key)) $delta_true = FALSE;\n }\n if ($delta_true == FALSE) {\n $field_from_value = array($field_from_value);\n }\n }\n if ($field_from == 'field_datasetkey') {\n $field_from_value = array(\n array(\n $field_from_value,\n ),\n );\n }\n $new_node_wrapper->$field_to->set($field_from_value);\n unset($field_from_value, $field_from, $field_to);\n }\n }\n\n // Converting text fields to link fields\n // Study area\n if (!empty($legacy_node->field_studyarea)) {\n $field_studyarea_value = $legacy_node_wrapper->field_studyarea->value();\n $field_studyarea_values = explode(', ', $field_studyarea_value);\n $new_study_area_value = array();\n foreach ($field_studyarea_values as $value) {\n $value_array = array(\n 'url' => '',\n 'title' => $value,\n 'attributes' => array(),\n );\n $new_study_area_value[] = $value_array;\n }\n $new_node_wrapper->field_study_area->set($new_study_area_value);\n }\n // Data sources\n if (!empty($legacy_node->field_datasources)) {\n $field_datasources_value = $legacy_node_wrapper->field_datasources->value();\n $field_datasources_values = explode(', ', $field_datasources_value);\n $new_data_source_value = array();\n foreach ($field_datasources_values as $value) {\n if (substr($value, 0, 7) === 'http://') {\n $value_array = array(\n 'url' => $value,\n 'title' => '',\n 'attributes' => array(),\n );\n }\n elseif (strpos($value, '(') !== FALSE) {\n $values = explode(' (', $value);\n if (substr($values[1], 0, 7) === 'http://') {\n $url = str_replace(')', '', $values[1]);\n $value_array = array(\n 'url' => $url,\n 'title' => $values[0],\n 'attributes' => array(),\n );\n }\n else {\n $value_array = array(\n 'url' => '',\n 'title' => trim($value),\n 'attributes' => array(),\n );\n }\n }\n else {\n $value_array = array(\n 'url' => '',\n 'title' => trim($value),\n 'attributes' => array(),\n );\n }\n $new_data_source_value[] = $value_array;\n }\n $new_node_wrapper->field_data_source->set($new_data_source_value);\n }\n\n // Term reference fields that needs to map to the new core taxonomy.\n $target_fields = array();\n if (in_array($legacy_node->type, array('newsarticle', 'usesofdata', 'featureddataset'))) {\n $legacy_term_fields = array(\n array(\n 'field' => 'field_datausecategories',\n 'mapping' => 'gbif_scaled_contents_get_data_use_mapping'\n ),\n array(\n 'field' => 'field_capacity',\n 'mapping' => 'gbif_scaled_contents_get_thematic_tags_mapping'\n ),\n array(\n 'field' => 'field_regions',\n 'mapping' => 'gbif_scaled_contents_get_regions_mapping',\n ),\n );\n foreach ($legacy_term_fields as $f) {\n if (!empty($legacy_node->$f['field'])) {\n // retrieve tids from the legacy node\n $legacy_values = $legacy_node_wrapper->$f['field']->value();\n drush_print(' Term references of ' . $f['field'] . ' are being analysed...');\n foreach ($legacy_values as $v) {\n $mapping = $f['mapping']();\n foreach ($mapping as $cat) {\n $new_tid = ($cat['old_tid'] == $v->tid) ? $cat['new_tid'] : NULL;\n if (!empty($new_tid)) {\n $new_t_obj = taxonomy_term_load($new_tid);\n $target_field = $voc_field_mapping[$new_t_obj->vid];\n $target_fields[$target_field][] = $new_t_obj;\n }\n }\n unset($new_tid);\n }\n }\n }\n }\n foreach ($target_fields as $f_name => $f_values) {\n if (count($f_values) !== 0) {\n $unique_values = array_map('unserialize', array_unique(array_map('serialize', $f_values)));\n $new_node_wrapper->$f_name->set($unique_values);\n }\n }\n\n // Save content\n $author = $legacy_node_wrapper->author->value();\n $new_node_wrapper->author->set($author);\n $new_node_wrapper->log->set('Revision created by the migration script.');\n $new_node_wrapper->language->set('en');\n $new_node_wrapper->created->set($legacy_node_created);\n $new_node_wrapper->status->set($legacy_node->status);\n $new_node_wrapper->promote->set($legacy_node->promote);\n $new_node_wrapper->sticky->set($legacy_node->sticky);\n\n $new_node_wrapper->save();\n drush_print('New node ' . $new_node->nid . ' created and saved.');\n if ($legacy_node->status == '1') {\n workbench_moderation_moderate($new_node, 'published');\n }\n\n // Update entityreference from programme/project\n foreach (array('field_data_field_related_news', 'field_revision_field_related_news') as $table) {\n $entityrefs = db_select($table, 'f')\n ->fields('f')\n ->condition('field_related_news_target_id', $legacy_node->nid, '=')\n ->execute()\n ->fetchAll();\n if (!empty($entityrefs)) {\n foreach ($entityrefs as $entityref) {\n $updated = db_update($table)\n ->fields(array(\n 'field_related_news_target_id' => $new_node->nid\n ))\n ->condition('field_related_news_target_id', $entityref->field_related_news_target_id, '=')\n ->execute();\n }\n }\n unset($entityrefs, $entityref, $updated);\n }\n\n // Updating redirect\n $redirect_results = db_select('redirect', 'r')\n ->fields('r')\n ->condition('redirect', 'node/' . $legacy_node->nid, '=')\n ->execute()\n ->fetchAll();\n // delete old node before the redirect is saved\n node_delete($legacy_node->nid);\n drush_print('Old node ' . $legacy_node->nid . ' deleled.');\n $count_migrated++;\n if (!empty($redirect_results)) {\n foreach ($redirect_results as $redirect_result) {\n $redirect_result->redirect = 'node/' . $new_node->nid;\n redirect_save($redirect_result);\n }\n }\n\n // reset all variables\n unset($legacy_node, $legacy_node_wrapper, $new_node, $new_node_wrapper);\n }\n }\n\n drush_print($count . ' ' . $old_type . ' nodes processed.');\n drush_print($count_published . ' ' . $new_type . ' node(s) published.');\n drush_print($count_unpublished . ' ' . $new_type . ' node(s) unpublished.');\n drush_print($count_migrated . ' ' . $old_type . ' node(s) migrated.');\n\n node_type_delete($old_type);\n drush_print($old_type . ' node type deleted.');\n\n }\n\n // site redirects\n drush_print('Global redirect...');\n $site_redirects = array(\n '/newsroom/uses' => '/newsroom/uses/summary',\n '/newsroom/uses/all' => '/newsroom/uses',\n );\n foreach ($site_redirects as $from => $to) {\n $redirect = new stdClass();\n redirect_object_prepare(\n $redirect,\n array(\n 'source' => $from,\n 'source_options' => array(),\n 'redirect' => $to,\n 'redirect_options' => array(),\n 'language' => 'en',\n )\n );\n redirect_save($redirect);\n drush_print('Redirected ' . $from . ' to ' . $to . '.');\n unset($redirect);\n }\n\n // delete unused view\n $views_to_delete = array('viewallfeaturedarticles', 'featureddatasetsarticles');\n foreach ($views_to_delete as $v) {\n $view = views_ui_cache_load($v);\n $view->delete();\n drush_print('Unused view ' . $view->name . ' deleted.');\n }\n\n}", "private function packModels()\n {\n /** @var xPDOManager $manager */\n $manager = $this->modx->getManager();\n /** @var xPDOGenerator $generator */\n $generator = $manager->getGenerator();\n\n Utils::removeDirectory(__DIR__ . '/../core/components/videocast/model/videocast/mysql');\n\n $generator->parseSchema(\n __DIR__ . '/../core/components/videocast/model/schema/videocast.mysql.schema.xml',\n __DIR__ . '/../core/components/videocast/model/'\n );\n\n $this->modx->log(modX::LOG_LEVEL_INFO, 'Models generated');\n }", "public function moveContentAndCopyLivePage() {}", "public function migrate_15_to_16()\n {\n db()->query('ALTER TABLE `' . dbMySQLConnector::$prefix . 'gallery` ADD `priority` INT(11) NOT NULL DEFAULT 0 AFTER `MaterialID`');\n db()->query('ALTER TABLE `' . dbMySQLConnector::$prefix . 'gallery` ADD `size` INT(11) NOT NULL DEFAULT 0 AFTER `Src`');\n db()->query('ALTER TABLE `' . dbMySQLConnector::$prefix . 'gallery` DROP `Thumbpath`');\n db()->query('ALTER TABLE `' . dbMySQLConnector::$prefix . 'gallery` DROP `Thumbsrc`');\n\n foreach (dbQuery('gallery')->exec() as $gallery) {\n $gallery->Path = dirname($gallery->Path);\n $gallery->Src = basename($gallery->Src);\n $gallery->save();\n }\n }", "function yoast_sitemap_mod(){\n global $wpseo_sitemaps;\n if($wpseo_sitemaps){\n global $rewrite;\n add_filter('wpseo_sitemap_index', 'yoast_add_sitemap_index', false);\n // Hatch showroom sitemap\n $wpseo_sitemaps->register_sitemap('hatch-showroom', 'yoast_sitemap_hatch_showroom_xml', $rewrite);\n }\n}", "private function migrate() {\n\t\tif ( ! empty( $this->options['seopress_breadcrumbs_i18n_search'] ) ) {\n\t\t\taioseo()->options->breadcrumbs->searchResultFormat = sprintf( '%1$s #breadcrumb_archive_post_type_name', $this->options['seopress_breadcrumbs_i18n_search'] );\n\t\t}\n\n\t\tif ( ! empty( $this->options['seopress_breadcrumbs_remove_blog_page'] ) ) {\n\t\t\taioseo()->options->breadcrumbs->showBlogHome = false;\n\t\t}\n\n\t\t$settings = [\n\t\t\t'seopress_breadcrumbs_enable' => [ 'type' => 'boolean', 'newOption' => [ 'breadcrumbs', 'enable' ] ],\n\t\t\t'seopress_breadcrumbs_separator' => [ 'type' => 'string', 'newOption' => [ 'breadcrumbs', 'separator' ] ],\n\t\t\t'seopress_breadcrumbs_i18n_home' => [ 'type' => 'string', 'newOption' => [ 'breadcrumbs', 'homepageLabel' ] ],\n\t\t\t'seopress_breadcrumbs_i18n_here' => [ 'type' => 'string', 'newOption' => [ 'breadcrumbs', 'breadcrumbPrefix' ] ],\n\t\t\t'seopress_breadcrumbs_i18n_404' => [ 'type' => 'string', 'newOption' => [ 'breadcrumbs', 'errorFormat404' ] ],\n\t\t];\n\n\t\taioseo()->importExport->seoPress->helpers->mapOldToNew( $settings, $this->options );\n\t}", "private function migrateExclusions() {\n\t\t$excludedPosts = aioseo()->options->sitemap->video->advancedSettings->excludePosts;\n\t\t$toExclude = aioseo()->db\n\t\t\t->start( 'postmeta as pm' )\n\t\t\t->select( 'pm.post_id' )\n\t\t\t->whereRaw( \"`pm`.`meta_key` = '_seopress_video_disabled'\" )\n\t\t\t->whereRaw( \"`pm`.`meta_value` = 'yes'\" )\n\t\t\t->run()\n\t\t\t->result();\n\n\t\tif ( count( $toExclude ) ) {\n\t\t\tforeach ( $toExclude as $record ) {\n\t\t\t\t$post = aioseo()->helpers->getPost( $record->post_id );\n\t\t\t\tif ( ! is_object( $post ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$excludedPost = new \\stdClass();\n\t\t\t\t$excludedPost->value = $post->ID;\n\t\t\t\t$excludedPost->type = $post->post_type;\n\t\t\t\t$excludedPost->label = $post->post_title;\n\t\t\t\t$excludedPost->link = get_permalink( $post->ID );\n\n\t\t\t\tarray_push( $excludedPosts, wp_json_encode( $excludedPost ) );\n\t\t\t}\n\t\t\taioseo()->options->sitemap->video->advancedSettings->enable = true;\n\t\t}\n\t\taioseo()->options->sitemap->video->advancedSettings->excludePosts = $excludedPosts;\n\t}", "protected function _move()\n\t{\t\n\t\t$items = $this->_sortIncoming(); \n\t\tif (!empty($items))\n\t\t{\n\t\t\tforeach ($items as $element)\n\t\t\t{\n\t\t\t\tforeach ($element as $type => $item)\n\t\t\t\t{\n\t\t\t\t\t// Get type and item name\n\t\t\t\t\tbreak;\n\t\t\t\t} \n\n\t\t\t\t// Must have a name\n\t\t\t\tif (trim($item) == '')\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$srcPath = $this->_getFullPath($item);\n\t\t\t\t$srcLocalPath = $this->_getLocalPath($item);\n\n\t\t\t\t$newpath = trim(urldecode(Request::getString('newpath', '')), DS);\n\t\t\t\t$newdir = Request::getString('newdir', '');\n\t\t\t\t$target = $newdir ? $newdir : $newpath;\n\t\t\t\t$newItemPath = $target ? $target . DS . $item : $item; \n\t\t\t\t$destPath = $this->path . DS. $newItemPath;\n\n\t\t\t\tif ($type === 'folder') {\n\t\t\t\t\t$itemsInDir = $this->repo->filelist(array(\n\t\t\t\t\t\t'subdir'\t\t => $srcLocalPath,\n\t\t\t\t\t\t'sortby' => 'localpath',\n\t\t\t\t\t\t'showFullMetadata' => false,\n\t\t\t\t\t\t'getParents' => true,\n\t\t\t\t\t\t'getChildren' => true,\n\t\t\t\t\t\t'dirsOnly' => false,\n\t\t\t\t\t\t'recursive' => true\n\t\t\t\t\t));\n\t\t\t\t\tforeach ($itemsInDir as $i) {\n\t\t\t\t\t\t$this->_writeToDb($this->projectId, $i->get('fullPath'), $this->_actionMapping[$this->action], $destPath . DS . $i->get('name'));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->_writeToDb($this->projectId, $srcPath, $this->_actionMapping[$this->action], $destPath);\n\t\t\t}\n\t\t}\n\t}", "public function migrateAction()\n {\n $dashboards = array_map(function (DashboardId $id) {\n return $this->sourceRepository->loadDashboard($id);\n }, $this->dashboardsIds);\n\n // 2. send dashboards to remote repository one by one\n array_walk($dashboards, [$this, 'migrateSingleDashboard']);\n }", "public function updateModelMappings()\n {\n\t\t$files = scandir(Yii::getPathOfAlias('force.models'));\n\n $mapping = array();\n\t\tforeach($files as $file)\n\t\t{\n if(($pos = strripos($file,'.php')) > 0){\n $objectName = substr($file,0,$pos);\n if(class_exists($objectName)){\n $object = new $objectName;\n $mapping[get_class($object)] = $object->sObject; \n }\n }\n\t\t} \n $this->_modelMappings = $mapping;\n }", "private function mapModels() {\n $this->resolveUrls();\n\n $this->mappedModels = [];\n foreach ($this->urls as $urlModel) {\n\n if (!isset($this->mappedModels[$urlModel->model])) {\n $this->mappedModels[$urlModel->model] = [];\n }\n\n $this->mappedModels[$urlModel->model][$urlModel->model_id] = $urlModel->id;\n }\n }", "public function migrateImagesTtNewsDam(){\n $select = $this->upgradeServerAction['tables']['tt_news']['select'];\n $where = $this->upgradeServerAction['tables']['tt_news']['where'];\n $table = $this->upgradeServerAction['tables']['tt_news']['table'];\n // get the Results from the T3 4.5 Installation\n $resultTtNewsLiveserver = $this->mysql->select($this->connectionLiveServer,$select,$table,$where);\n // loop through the Records and migrate the Images\n while($rowTtNewsLiveserver = $resultTtNewsLiveserver->fetch_assoc()){\n // get the uid from tx_dam_mm_ref\n $select = $this->upgradeServerAction['tables']['tx_dam_mm_ref']['select'];\n $table = $this->upgradeServerAction['tables']['tx_dam_mm_ref']['table'];\n $where = str_replace('###uid_foreign###',$rowTtNewsLiveserver['uid'],$this->upgradeServerAction['tables']['tx_dam_mm_ref']['where']) . $this->upgradeServerAction['tables']['tx_dam_mm_ref']['additionalWhere'];\n $resultTxDamMmRefLiveserver = $this->mysql->select($this->connectionLiveServer,$select,$table,$where);\n // define the Select and Table for tx_dam\n $selectTxDam = $this->upgradeServerAction['tables']['tx_dam']['select'];\n $tableTxDam = $this->upgradeServerAction['tables']['tx_dam']['table'];\n // $whereTxDam = str_replace('###uid###',$rowTxDamMmRefLiveserver['uid_local'],$this->upgradeServerAction['tables']['tx_dam']['where']) . $this->upgradeServerAction['tables']['tx_dam']['additionalWhere'];\n if($resultTxDamMmRefLiveserver->num_rows > 1){ // more than one Image\n while($rowTxDamMmRefLiveserver = $resultTxDamMmRefLiveserver->fetch_assoc()){\n // fetch the Images from tx_dam and build a commaseperated String from the Imagenames\n $whereTxDam = str_replace('###uid###',$rowTxDamMmRefLiveserver['uid_local'],$this->upgradeServerAction['tables']['tx_dam']['where']) . $this->upgradeServerAction['tables']['tx_dam']['additionalWhere'];\n $resultTxDamLiveserver = $this->mysql->select($this->connectionLiveServer,$selectTxDam,$tableTxDam,$whereTxDam);\n if($resultTxDamLiveserver->num_rows >= 1){\n $rowTxDamLiveserver = $resultTxDamLiveserver->fetch_assoc();\n // if we have an Imagename to something\n if($rowTxDamLiveserver['file_name'] != ''){\n // copy all Images to uploads/pics/\n $this->copyImage($this->pathUpload,'../../' . $rowTxDamLiveserver['file_path'],$rowTxDamLiveserver['file_name']);\n // set the uid_foreign\n $uid_foreign = $rowTxDamMmRefLiveserver['uid_foreign'];\n // build the Imagename String\n $imageNameString .= $rowTxDamLiveserver['file_name'] . ',';\n // fill the logText\n $this->logText .= 'Habe die Bilder ' . $rowTxDamLiveserver['file_name'] . 'nach ' . $this->pathUploads . \" kopiert\\n\";\n }\n }\n }\n // delete last ,\n $rowTxDamLiveserver['file_name'] = substr($imageNameString,0,-1);\n $imageNameString = '';\n } else {// only one Image\n $imageNameString = '';\n $rowTxDamMmRefLiveserver = $resultTxDamMmRefLiveserver->fetch_assoc();\n $uid_foreign = $rowTxDamMmRefLiveserver['uid_foreign'];\n // now look into tx_dam for file_name and file_path\n $whereTxDam = str_replace('###uid###',$rowTxDamMmRefLiveserver['uid_local'],$this->upgradeServerAction['tables']['tx_dam']['where']) . $this->upgradeServerAction['tables']['tx_dam']['additionalWhere'];\n $resultTxDamLiveserver = $this->mysql->select($this->connectionLiveServer,$selectTxDam,$tableTxDam,$whereTxDam);\n // do we have a result than do the work\n if($resultTxDamLiveserver->num_rows > 0){\n $rowTxDamLiveserver = $resultTxDamLiveserver->fetch_assoc();\n // now copy the Image to uploads/pics\n $this->copyImage($this->pathUpload,'../../' . $rowTxDamLiveserver['file_path'],$rowTxDamLiveserver['file_name']);\n $this->logText .= 'Habe das Bild ' . $rowTxDamLiveserver['file_name'] . 'nach ' . $this->pathUploads . \" kopiert\\n\";\n }\n }\n\n if($rowTxDamLiveserver){\n // prepare the Update of the tt_news Table\n $table = $this->upgradeServerAction['tables']['tt_news']['table'];\n $where = 'uid = ' . $uid_foreign;\n if(!empty($rowTxDamLiveserver['file_name'])){\n $values = 'image = \\'' . $rowTxDamLiveserver['file_name'] . '\\',tx_damnews_dam_images = 0';\n } else {// set tx_damnews_dam_images to 0\n $values = 'tx_damnews_dam_images = 0';\n }\n /*\n if($uid_foreign == 11707){\n $upgradeResult = $this->mysql->updateRow($this->connectionUpgradeServer,$table, $values, $where);\n }\n */\n $upgradeResult = $this->mysql->updateRow($this->connectionUpgradeServer,$table, $values, $where);\n if($upgradeResult){\n $this->logText .= 'Habe die News mit der uid: ' . $uid_foreign . \" bearbeitet.\\n\";\n } else {\n $this->error = $upgradeResult;\n }\n $url = $this->ini_array['upgradeserver']['url'] . 'index.php?id=' . $rowTtNewsLiveserver['pid'];\n $linkListe .= '<a href=\"'. $url .'\">Link mit pid:' . $rowTtNewsLiveserver['pid'] . '</a><br/>';\n //die();\n }\n\n }\n if($this->logText AND $linkListe){\n $this->writeLogtext('logTtNewsDam.txt');\n $this->logText = '';\n echo $linkListe;\n $linkListe = '';\n } else {\n $this->logText = $this->error;\n $this->writeLogtext('error_logTtNewsDam.txt');\n $this->logText = '';\n }\n\n\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
end loadHrdbForms() function loadEditFormFieldValues Initializes the loadEditFormFieldValues Page.
function loadEditFormFieldValues($isCreated = false) { // set the pageCallBack to be without any additional parameters // (an AdminBox needs this so Language Switching on a page doesn't // pass a previous operations) $parameters = array('PERSON_ID'=>$this->PERSON_ID, 'PROVINCE_ID'=>$this->PROVINCE_ID, 'GENDER_ID'=>$this->GENDER_ID, 'STAFF_ID'=>$this->STAFF_ID, 'REGION_ID'=>$this->REGION_ID, 'EMERG_ID'=>$this->EMERG_ID, 'ASSIGNSTATUS_ID'=>$this->ASSIGNSTATUS_ID, 'CAMPUS_ID'=>$this->CAMPUS_ID, 'ASSIGNMENT_ID'=>$this->ASSIGNMENT_ID, 'VIEWER_ID'=>$this->VIEWER_ID, 'ACCESS_ID'=>$this->ACCESS_ID, 'YEAR_ID'=>$this->YEAR_ID, 'PERSON_YEAR_ID'=>$this->PERSON_YEAR_ID, 'STAFFSCHEDULE_ID'=>$this->STAFFSCHEDULE_ID, 'STAFFACTIVITY_ID'=>$this->STAFFACTIVITY_ID, 'ACTIVITYTYPE_ID'=>$this->ACTIVITYTYPE_ID, 'STAFFSCHEDULETYPE_ID'=>$this->STAFFSCHEDULETYPE_ID, 'ACTIVITYSCHEDULE_ID'=>$this->ACTIVITYSCHEDULE_ID, 'FIELD_ID'=>$this->FIELD_ID, 'FIELDVALUE_ID'=>$this->FIELDVALUE_ID, 'FIELDTYPE_ID'=>$this->FIELDTYPE_ID, 'DATATYPE_ID'=>$this->DATATYPE_ID, 'COUNTRY_ID'=>$this->COUNTRY_ID);//[RAD_CALLBACK_PARAMS] $pageCallBack = $this->getCallBack(modulecim_hrdb::PAGE_EDITFORMFIELDVALUES, $this->sortBy, $parameters); $this->setPageCallBack( $pageCallBack ); // Edit My HRDB Form page is restricted to staff and above if (( $this->accessPrivManager->hasSitePriv() ) || ( $this->accessPrivManager->isStaff($this->viewer->getID()) )) { $parameters = array('PERSON_ID'=>$this->PERSON_ID, 'PROVINCE_ID'=>$this->PROVINCE_ID, 'GENDER_ID'=>$this->GENDER_ID, 'STAFF_ID'=>$this->STAFF_ID, 'REGION_ID'=>$this->REGION_ID, 'EMERG_ID'=>$this->EMERG_ID, 'ASSIGNSTATUS_ID'=>$this->ASSIGNSTATUS_ID, 'CAMPUS_ID'=>$this->CAMPUS_ID, 'ASSIGNMENT_ID'=>$this->ASSIGNMENT_ID, 'VIEWER_ID'=>$this->VIEWER_ID, 'ACCESS_ID'=>$this->ACCESS_ID, 'YEAR_ID'=>$this->YEAR_ID, 'PERSON_YEAR_ID'=>$this->PERSON_YEAR_ID, 'STAFFSCHEDULE_ID'=>$this->STAFFSCHEDULE_ID, 'STAFFACTIVITY_ID'=>$this->STAFFACTIVITY_ID, 'ACTIVITYTYPE_ID'=>$this->ACTIVITYTYPE_ID, 'STAFFSCHEDULETYPE_ID'=>$this->STAFFSCHEDULETYPE_ID, 'ACTIVITYSCHEDULE_ID'=>$this->ACTIVITYSCHEDULE_ID, 'FIELD_ID'=>$this->FIELD_ID, 'FIELDVALUE_ID'=>$this->FIELDVALUE_ID, 'FIELDTYPE_ID'=>$this->FIELDTYPE_ID, 'DATATYPE_ID'=>$this->DATATYPE_ID, 'COUNTRY_ID'=>$this->COUNTRY_ID);//[RAD_CALLBACK_PARAMS] $basic_form_parameters = array('PERSON_ID'=>$this->PERSON_ID, 'STAFF_ID'=>$this->STAFF_ID, 'ASSIGNSTATUS_ID'=>$this->ASSIGNSTATUS_ID, 'CAMPUS_ID'=>$this->CAMPUS_ID, 'ASSIGNMENT_ID'=>$this->ASSIGNMENT_ID, 'VIEWER_ID'=>$this->VIEWER_ID, 'ACCESS_ID'=>$this->ACCESS_ID, 'STAFFSCHEDULE_ID'=>$this->STAFFSCHEDULE_ID, 'STAFFSCHEDULETYPE_ID'=>$this->STAFFSCHEDULETYPE_ID, 'FIELD_ID'=>$this->FIELD_ID, 'FIELDVALUE_ID'=>$this->FIELDVALUE_ID);//[RAD_CALLBACK_PARAMS] $activity_form_parameters = array('PERSON_ID'=>$this->PERSON_ID, 'STAFF_ID'=>$this->STAFF_ID, 'CAMPUS_ID'=>$this->CAMPUS_ID, 'ASSIGNMENT_ID'=>$this->ASSIGNMENT_ID, 'VIEWER_ID'=>$this->VIEWER_ID, 'ACCESS_ID'=>$this->ACCESS_ID, 'STAFFSCHEDULE_ID'=>$this->STAFFSCHEDULE_ID, 'STAFFACTIVITY_ID'=>$this->STAFFACTIVITY_ID, 'ACTIVITYTYPE_ID'=>$this->ACTIVITYTYPE_ID, 'STAFFSCHEDULETYPE_ID'=>$this->STAFFSCHEDULETYPE_ID, 'ACTIVITYSCHEDULE_ID'=>$this->ACTIVITYSCHEDULE_ID);//[RAD_CALLBACK_PARAMS] $formAction = $this->getCallBack(modulecim_hrdb::PAGE_EDITFORMFIELDVALUES, $this->sortBy, $parameters ); $basicFormAction = $this->getCallBack(modulecim_hrdb::PAGE_EDITFORMFIELDVALUES, $this->sortBy, $basic_form_parameters ); $activityFormAction = $this->getCallBack(modulecim_hrdb::PAGE_EDITFORMFIELDVALUES, $this->sortBy, $activity_form_parameters ); $pageCallBack = $this->getCallBack(modulecim_hrdb::PAGE_EDITFORMFIELDVALUES, $this->sortBy, $parameters); $this->setPageCallBack( $pageCallBack ); // if this pageDisplay object isn't already created then if ( !$isCreated ) { $disableHeading = true; $showActivityForm = true; $showHidden = false; // TODO: create condition for this based on privilege level // create a new pageDisplay object // $this->pageDisplay = new FormProcessor_EditStaffScheduleForm( $this->moduleRootPath, $this->viewer, $formAction, $basicFormAction, $activityFormAction, $this->sortBy, $this->PERSON_ID, $this->STAFFSCHEDULETYPE_ID, $this->STAFFSCHEDULE_ID, $this->FIELDVALUE_ID, $this->FIELD_ID, $this->STAFFACTIVITY_ID, $showHidden, $showActivityForm);//[RAD_FORMINIT_FOREIGNKEY_INIT] $this->pageDisplay = new FormProcessor_EditStaffScheduleForm( $this->moduleRootPath, $this->viewer, $formAction, $this->PERSON_ID, $this->STAFFSCHEDULETYPE_ID, $this->FIELDVALUE_ID, $this->FIELD_ID, $disableHeading, $showHidden);//[RAD_FORMINIT_FOREIGNKEY_INIT] } else { // otherwise just update the formAction value $this->pageDisplay->setFormAction( $formAction ); } $links = array(); /**** BASIC STAFF SCHEDULE FORM SUB-PAGE LINKS INIT ***/ // $basicFormLinks = array(); // // $parameters = array('PERSON_ID'=>$this->PERSON_ID, 'PROVINCE_ID'=>$this->PROVINCE_ID, 'GENDER_ID'=>$this->GENDER_ID, 'STAFF_ID'=>$this->STAFF_ID, 'REGION_ID'=>$this->REGION_ID, 'EMERG_ID'=>$this->EMERG_ID, 'ASSIGNSTATUS_ID'=>$this->ASSIGNSTATUS_ID, 'CAMPUS_ID'=>$this->CAMPUS_ID, 'ASSIGNMENT_ID'=>$this->ASSIGNMENT_ID, 'VIEWER_ID'=>$this->VIEWER_ID, 'ACCESS_ID'=>$this->ACCESS_ID, 'YEAR_ID'=>$this->YEAR_ID, 'PERSON_YEAR_ID'=>$this->PERSON_YEAR_ID, 'STAFFSCHEDULE_ID'=>$this->STAFFSCHEDULE_ID, 'STAFFACTIVITY_ID'=>$this->STAFFACTIVITY_ID, 'ACTIVITYTYPE_ID'=>$this->ACTIVITYTYPE_ID, 'STAFFSCHEDULETYPE_ID'=>$this->STAFFSCHEDULETYPE_ID, 'ACTIVITYSCHEDULE_ID'=>$this->ACTIVITYSCHEDULE_ID, 'FIELD_ID'=>$this->FIELD_ID, 'FIELDVALUE_ID'=>$this->FIELDVALUE_ID, 'FIELDTYPE_ID'=>$this->FIELDTYPE_ID, 'DATATYPE_ID'=>$this->DATATYPE_ID, 'COUNTRY_ID'=>$this->COUNTRY_ID);//[RAD_CALLBACK_PARAMS] // $editLink = $this->getCallBack( modulecim_hrdb::PAGE_EDITFORMFIELDVALUES, $this->sortBy, $parameters ); // $editLink .= "&". modulecim_hrdb::STAFFSCHEDULETYPE_ID . "="; // $basicFormLinks[ "edit" ] = $editLink; // // // NOTE: delete link is same as edit link for an AdminBox // $basicFormLinks[ "del" ] = $editLink; // $parameters = array('PERSON_ID'=>$this->PERSON_ID, 'PROVINCE_ID'=>$this->PROVINCE_ID, 'GENDER_ID'=>$this->GENDER_ID, 'STAFF_ID'=>$this->STAFF_ID, 'REGION_ID'=>$this->REGION_ID, 'EMERG_ID'=>$this->EMERG_ID, 'ASSIGNSTATUS_ID'=>$this->ASSIGNSTATUS_ID, 'CAMPUS_ID'=>$this->CAMPUS_ID, 'ASSIGNMENT_ID'=>$this->ASSIGNMENT_ID, 'VIEWER_ID'=>$this->VIEWER_ID, 'ACCESS_ID'=>$this->ACCESS_ID, 'YEAR_ID'=>$this->YEAR_ID, 'PERSON_YEAR_ID'=>$this->PERSON_YEAR_ID, 'STAFFSCHEDULE_ID'=>$this->STAFFSCHEDULE_ID, 'STAFFACTIVITY_ID'=>$this->STAFFACTIVITY_ID, 'ACTIVITYTYPE_ID'=>$this->ACTIVITYTYPE_ID, 'STAFFSCHEDULETYPE_ID'=>$this->STAFFSCHEDULETYPE_ID, 'ACTIVITYSCHEDULE_ID'=>$this->ACTIVITYSCHEDULE_ID, 'FIELD_ID'=>$this->FIELD_ID, 'FIELDVALUE_ID'=>$this->FIELDVALUE_ID, 'FIELDTYPE_ID'=>$this->FIELDTYPE_ID, 'DATATYPE_ID'=>$this->DATATYPE_ID, 'COUNTRY_ID'=>$this->COUNTRY_ID);//[RAD_CALLBACK_PARAMS] // $sortByLink = $this->getCallBack( modulecim_hrdb::PAGE_EDITFORMFIELDVALUES, '', $parameters ); // $sortByLink .= "&".modulecim_hrdb::SORTBY."="; // $basicFormLinks["sortBy"] = $sortByLink; /**** ACTIVITY FORM SUB-PAGE LINKS INIT ***/ // $activityFormLinks = array(); // // $parameters = array('PERSON_ID'=>$this->PERSON_ID, 'PROVINCE_ID'=>$this->PROVINCE_ID, 'GENDER_ID'=>$this->GENDER_ID, 'STAFF_ID'=>$this->STAFF_ID, 'REGION_ID'=>$this->REGION_ID, 'EMERG_ID'=>$this->EMERG_ID, 'ASSIGNSTATUS_ID'=>$this->ASSIGNSTATUS_ID, 'CAMPUS_ID'=>$this->CAMPUS_ID, 'ASSIGNMENT_ID'=>$this->ASSIGNMENT_ID, 'VIEWER_ID'=>$this->VIEWER_ID, 'ACCESS_ID'=>$this->ACCESS_ID, 'YEAR_ID'=>$this->YEAR_ID, 'PERSON_YEAR_ID'=>$this->PERSON_YEAR_ID, 'STAFFSCHEDULE_ID'=>$this->STAFFSCHEDULE_ID, 'STAFFACTIVITY_ID'=>$this->STAFFACTIVITY_ID, 'ACTIVITYTYPE_ID'=>$this->ACTIVITYTYPE_ID, 'STAFFSCHEDULETYPE_ID'=>$this->STAFFSCHEDULETYPE_ID, 'ACTIVITYSCHEDULE_ID'=>$this->ACTIVITYSCHEDULE_ID, 'FIELD_ID'=>$this->FIELD_ID, 'FIELDVALUE_ID'=>$this->FIELDVALUE_ID, 'FIELDTYPE_ID'=>$this->FIELDTYPE_ID, 'DATATYPE_ID'=>$this->DATATYPE_ID, 'COUNTRY_ID'=>$this->COUNTRY_ID);//[RAD_CALLBACK_PARAMS] // $editLink = $this->getCallBack( modulecim_hrdb::PAGE_EDITFORMFIELDVALUES, $this->sortBy, $parameters ); // $editLink .= "&". modulecim_hrdb::STAFFACTIVITY_ID . "="; // $activityFormLinks[ "edit" ] = $editLink; // // // NOTE: delete link is same as edit link for an AdminBox // $activityFormLinks[ "del" ] = $editLink; // /*[RAD_LINK_INSERT]*/ // $parameters = array('PERSON_ID'=>$this->PERSON_ID, 'PROVINCE_ID'=>$this->PROVINCE_ID, 'GENDER_ID'=>$this->GENDER_ID, 'STAFF_ID'=>$this->STAFF_ID, 'REGION_ID'=>$this->REGION_ID, 'EMERG_ID'=>$this->EMERG_ID, 'ASSIGNSTATUS_ID'=>$this->ASSIGNSTATUS_ID, 'CAMPUS_ID'=>$this->CAMPUS_ID, 'ASSIGNMENT_ID'=>$this->ASSIGNMENT_ID, 'VIEWER_ID'=>$this->VIEWER_ID, 'ACCESS_ID'=>$this->ACCESS_ID, 'YEAR_ID'=>$this->YEAR_ID, 'PERSON_YEAR_ID'=>$this->PERSON_YEAR_ID, 'STAFFSCHEDULE_ID'=>$this->STAFFSCHEDULE_ID, 'STAFFACTIVITY_ID'=>$this->STAFFACTIVITY_ID, 'ACTIVITYTYPE_ID'=>$this->ACTIVITYTYPE_ID, 'STAFFSCHEDULETYPE_ID'=>$this->STAFFSCHEDULETYPE_ID, 'ACTIVITYSCHEDULE_ID'=>$this->ACTIVITYSCHEDULE_ID, 'FIELD_ID'=>$this->FIELD_ID, 'FIELDVALUE_ID'=>$this->FIELDVALUE_ID, 'FIELDTYPE_ID'=>$this->FIELDTYPE_ID, 'DATATYPE_ID'=>$this->DATATYPE_ID, 'COUNTRY_ID'=>$this->COUNTRY_ID);//[RAD_CALLBACK_PARAMS] // $sortByLink = $this->getCallBack( modulecim_hrdb::PAGE_EDITFORMFIELDVALUES, '', $parameters ); // $sortByLink .= "&".modulecim_hrdb::SORTBY."="; // $activityFormLinks["sortBy"] = $sortByLink; // $this->pageDisplay->setLinks( $activityFormLinks ); // $links, $basicFormLinks, (DON'T NEED LINKS FOR SINGLE FORM PORTION) // } else { $this->pageDisplay = new page_NotAuthorized($this->moduleRootPath, $this->viewer); } }
[ "function loadEditFieldValues($isCreated = false) \n {\n\n\t // get privileges for the current viewer\n $privManager = new PrivilegeManager( $this->viewer->getID() ); \n if (($this->IS_IN_REG_PROCESS == modulecim_reg::IS_SIGNUP)||($privManager->isCampusAdmin($this->EVENT_ID, $this->CAMPUS_ID)==true))\t// check if privilege level is high enough\n {\t \n\t // set the pageCallBack to be without any additional parameters\n\t // (an AdminBox needs this so Language Switching on a page doesn't\n\t // pass a previous operations)\n\t $parameters = array('MINISTRY_ID'=>$this->MINISTRY_ID, 'IS_IN_REG_PROCESS'=>$this->IS_IN_REG_PROCESS, 'EVENT_ID'=>$this->EVENT_ID, 'FIELDTYPE_ID'=>$this->FIELDTYPE_ID, 'PRICERULETYPE_ID'=>$this->PRICERULETYPE_ID, 'CCTYPE_ID'=>$this->CCTYPE_ID, 'PRIV_ID'=>$this->PRIV_ID, 'VIEWER_ID'=>$this->VIEWER_ID, 'SUPERADMIN_ID'=>$this->SUPERADMIN_ID, 'EVENTADMIN_ID'=>$this->EVENTADMIN_ID, 'FIELD_ID'=>$this->FIELD_ID, 'DATATYPE_ID'=>$this->DATATYPE_ID, 'PRICERULE_ID'=>$this->PRICERULE_ID, 'CAMPUSACCESS_ID'=>$this->CAMPUSACCESS_ID, 'CASHTRANS_ID'=>$this->CASHTRANS_ID, 'CCTRANS_ID'=>$this->CCTRANS_ID, 'REG_ID'=>$this->REG_ID, 'FIELDVALUE_ID'=>$this->FIELDVALUE_ID, 'SCHOLARSHIP_ID'=>$this->SCHOLARSHIP_ID, 'STATUS_ID'=>$this->STATUS_ID, 'CAMPUS_ID'=>$this->CAMPUS_ID, 'PERSON_ID'=>$this->PERSON_ID);//[RAD_CALLBACK_PARAMS]\n\t $pageCallBack = $this->getCallBack(modulecim_reg::PAGE_EDITFIELDVALUES, $this->sortBy, $parameters);\n\t $this->setPageCallBack( $pageCallBack ); \n\t \n\t \n\t $parameters = array('MINISTRY_ID'=>$this->MINISTRY_ID, 'IS_IN_REG_PROCESS'=>$this->IS_IN_REG_PROCESS, 'EVENT_ID'=>$this->EVENT_ID, 'FIELDTYPE_ID'=>$this->FIELDTYPE_ID, 'PRICERULETYPE_ID'=>$this->PRICERULETYPE_ID, 'CCTYPE_ID'=>$this->CCTYPE_ID, 'PRIV_ID'=>$this->PRIV_ID, 'VIEWER_ID'=>$this->VIEWER_ID, 'SUPERADMIN_ID'=>$this->SUPERADMIN_ID, 'EVENTADMIN_ID'=>$this->EVENTADMIN_ID, 'FIELD_ID'=>$this->FIELD_ID, 'DATATYPE_ID'=>$this->DATATYPE_ID, 'PRICERULE_ID'=>$this->PRICERULE_ID, 'CAMPUSACCESS_ID'=>$this->CAMPUSACCESS_ID, 'CASHTRANS_ID'=>$this->CASHTRANS_ID, 'CCTRANS_ID'=>$this->CCTRANS_ID, 'REG_ID'=>$this->REG_ID, 'FIELDVALUE_ID'=>$this->FIELDVALUE_ID, 'SCHOLARSHIP_ID'=>$this->SCHOLARSHIP_ID, 'STATUS_ID'=>$this->STATUS_ID, 'CAMPUS_ID'=>$this->CAMPUS_ID, 'PERSON_ID'=>$this->PERSON_ID);//[RAD_CALLBACK_PARAMS]\n\t $formAction = $this->getCallBack(modulecim_reg::PAGE_EDITFIELDVALUES, $this->sortBy, $parameters );\n\t // $this->pageDisplay = new FormProcessor_EditFieldValues( $this->moduleRootPath, $this->viewer, $formAction, $this->PERSON_ID, $this->EVENT_ID, $this->FIELDVALUE_ID , $this->FIELD_ID, $this->REG_ID);//[RAD_FORMINIT_FOREIGNKEY_INIT] \n\t\n\t // if this pageDisplay object isn't already created then \n\t if ( !$isCreated ) {\n\t\t \n\t\t $showHidden = true;\n\t\t if ($this->IS_IN_REG_PROCESS == modulecim_reg::IS_SIGNUP)\n\t\t {\n\t\t\t $showHidden = false;\n\t\t }\n\t \n\t // create a new pageDisplay object\n\t \t\t$this->pageDisplay = new FormProcessor_EditFieldValues( $this->moduleRootPath, $this->viewer, $formAction, $this->PERSON_ID, $this->EVENT_ID, $this->FIELDVALUE_ID , $this->FIELD_ID, $this->REG_ID, false, $showHidden);//[RAD_FORMINIT_FOREIGNKEY_INIT] \n\t \n\t } else {\n\t \n\t // otherwise just update the formAction value\n\t $this->pageDisplay->setFormAction( $formAction );\n\t } \n }\n else\n {\n\t $this->pageDisplay = new page_NotAuthorized($this->moduleRootPath, $this->viewer); \n } \n }", "protected function _getEditForm()\n {\n }", "function loadFromForm() \n {\n // for each form field we want to work with\n for( $indx=0; $indx<count($this->formFields); $indx++) {\n $key = $this->formFields[ $indx ];\n \n // if value is found in form data\n if (isset($_REQUEST[ $key ] ) ) {\n \n // store value in formValues\n $this->formValues[ $key ] = $_REQUEST[ $key ];\n \n } else {\n \n // else store empty value in formValues\n $this->formValues[ $key ] = '';\n }\n }\n \n }", "public abstract function fetchAdminEditForm();", "public function loadAdminFormValues()\n {\n if (Tools::isSubmit('submitSettings')) {\n //saving all data posted\n $top3_siteid = Tools::getValue('top3_siteid');\n $top3_authkey = Tools::getValue('top3_authkey');\n $top3_status = Tools::getValue('top3_status');\n $top3_email_test = Tools::getValue('top3_email_test');\n $top3_default_product_type = Tools::getValue('top3_default_product_type');\n $top3_default_carrier_type = Tools::getValue('top3_default_carrier_type');\n $top3_default_carrier_speed = Tools::getValue('top3_default_carrier_speed');\n } else {\n //take database values or fix defaut values\n $top3_siteid = (Configuration::get('TOP3_SITEID') === false ?\n '' : Configuration::get('TOP3_SITEID'));\n $top3_authkey = (Configuration::get('TOP3_AUTHKEY') === false ?\n '' : Configuration::get('TOP3_AUTHKEY'));\n $top3_status = (Configuration::get('TOP3_STATUS') === false ?\n '' : Configuration::get('TOP3_STATUS'));\n $top3_email_test = (Configuration::get('TOP3_EMAILS_TEST') === false ?\n '' : Configuration::get('TOP3_EMAILS_TEST'));\n $top3_default_product_type = (Configuration::get('TOP3_DEFAULT_PRODUCT_TYPE') === false ?\n '1' : Configuration::get('TOP3_DEFAULT_PRODUCT_TYPE'));\n $top3_default_carrier_type = (Configuration::get('TOP3_DEFAULT_CARRIER_TYPE') === false ?\n '4' : Configuration::get('TOP3_DEFAULT_CARRIER_TYPE'));\n $top3_default_carrier_speed = (Configuration::get('TOP3_DEFAULT_CARRIER_SPEED') === false ?\n '2' : Configuration::get('TOP3_DEFAULT_CARRIER_SPEED'));\n }\n\n $adminform_values = array(\n 'top3_siteid' => Tools::safeOutput($top3_siteid),\n 'top3_authkey' => Tools::safeOutput($top3_authkey),\n 'top3_status' => Tools::safeOutput($top3_status),\n 'top3_email_test' => Tools::safeOutput($top3_email_test),\n 'top3_default_product_type' => Tools::safeOutput($top3_default_product_type),\n 'top3_default_carrier_type' => Tools::safeOutput($top3_default_carrier_type),\n 'top3_default_carrier_speed' => Tools::safeOutput($top3_default_carrier_speed),\n );\n\n //return array values for admin.tpl\n return $adminform_values;\n }", "function loadEditMyEmergInfo() \n {\n // set the pageCallBack to be without any additional parameters\n // (an AdminBox needs this so Language Switching on a page doesn't\n // pass a previous operations)\n $parameters = array('PERSON_ID'=>$this->PERSON_ID, 'PROVINCE_ID'=>$this->PROVINCE_ID, 'GENDER_ID'=>$this->GENDER_ID, 'STAFF_ID'=>$this->STAFF_ID, 'REGION_ID'=>$this->REGION_ID, 'EMERG_ID'=>$this->EMERG_ID);//[RAD_CALLBACK_PARAMS]\n $pageCallBack = $this->getCallBack(modulecim_hrdb::PAGE_EDITMYEMERGINFO, $this->sortBy, $parameters);\n $this->setPageCallBack( $pageCallBack );\n \n \n $parameters = array('PERSON_ID'=>$this->PERSON_ID, 'PROVINCE_ID'=>$this->PROVINCE_ID, 'GENDER_ID'=>$this->GENDER_ID, 'STAFF_ID'=>$this->STAFF_ID, 'REGION_ID'=>$this->REGION_ID, 'EMERG_ID'=>$this->EMERG_ID);//[RAD_CALLBACK_PARAMS]\n $formAction = $this->getCallBack(modulecim_hrdb::PAGE_EDITMYEMERGINFO, $this->sortBy, $parameters );\n $this->pageDisplay = new FormProcessor_EditMyEmergInfo( $this->moduleRootPath, $this->viewer, $formAction, $this->EMERG_ID , $this->PERSON_ID);//[RAD_FORMINIT_FOREIGNKEY_INIT] \n \n }", "protected function loadFieldFormData()\n\t{\n\t\t$this->field_definition->setRecordId((int) $_GET['record_id']);\n\t\t$this->field_definition->setTitle(ilUtil::stripSlashes($_POST['title']));\n\t\t$this->field_definition->setDescription(ilUtil::stripSlashes($_POST['description']));\n\t\t$this->field_definition->enableSearchable(isset($_POST['searchable']) ? true : false);\n\t\t$this->field_definition->setFieldType(ilUtil::stripSlashes($_POST['field_type']));\n\t\t$this->field_definition->setFieldValues(array());\n\t\t\n\t\tfor($i = 1; $i <= $_SESSION['num_values'];$i++)\n\t\t{\n\t\t\tif(isset($_POST['value_'.$i]))\n\t\t\t{\n\t\t\t\t$this->field_definition->appendFieldValue($_POST['value_'.$i]);\n\t\t\t}\n\t\t}\n\t}", "public function ItemEditForm() {\n $form=parent::ItemEditForm();\n \n if($form==null) {\n return;\n }\n \n $editFields=$form->Fields()->fieldByName('Root')->Tabs();\n $form->setFields(new FieldList(\n TabSet::create('Root',\n new TabSet('Content', _t('WebbuildersGroup\\\\SiteConfigErrorPages\\\\Forms\\\\GridField\\\\ErrorPageItemRequestHandler.CONTENT', 'Content')),\n new TabSet('Settings', _t('WebbuildersGroup\\\\SiteConfigErrorPages\\\\Forms\\\\GridField\\\\ErrorPageItemRequestHandler.SETTINGS', 'Settings'))\n )->setTemplate('SilverStripe\\\\Forms\\\\CMSTabSet')\n ));\n \n $form->Fields()->addFieldsToTab('Root.Content', $editFields);\n $form->Fields()->addFieldsToTab('Root.Settings', $this->record->getSettingsFields()->setForm($form)->fieldByName('Root')->Tabs());\n \n \n //Reload the data since we added the settings fields\n $form->loadDataFrom($this->record, ($this->record->ID==0 ? Form::MERGE_IGNORE_FALSEISH:Form::MERGE_DEFAULT));\n \n \n $form->Fields()->dataFieldByName('ParentID')->addExtraClass('parent-id-field');\n $form->Fields()->dataFieldByName('ViewerGroups')->addExtraClass('viewer-groups-field');\n $form->Fields()->dataFieldByName('EditorGroups')->addExtraClass('editor-groups-field');\n \n \n $form->setActions($this->record->getCMSActions()->setForm($form));\n $actionsFlattened=$form->Actions()->dataFields();\n if($actionsFlattened) {\n foreach($actionsFlattened as $action) {\n $action->setUseButtonTag(true);\n }\n }\n \n if($this->record->exists() && $this->record->canEdit() && $this->record->canCreate()) {\n $form->Actions()->insertBefore('ActionMenus', FormAction::create('doDuplicate', _t('WebbuildersGroup\\\\SiteConfigErrorPages\\\\Forms\\\\GridField\\\\ErrorPageItemRequestHandler.DUPLICATE', '_Duplicate'))\n ->setAttribute('data-icon', 'no-icon')\n ->setUseButtonTag(true));\n }\n \n $form->disableDefaultAction();\n \n $form->addExtraClass('ErrorPage-edit ErrorPageItemRequestHandler');\n $form->setAttribute('data-history-link', Controller::join_links(LeftAndMain::config()->url_base, CMSPageHistoryController::config()->url_segment, 'show', $this->record->ID));\n \n \n //Add the navigator if it doesn't exist\n if(!$form->Fields()->fieldByName(SilverStripeNavigator::class)) {\n $navField=LiteralField::create(SilverStripeNavigator::class, $this->getSilverStripeNavigator())->setForm($form)->setAllowHTML(true);\n $form->Fields()->push($navField);\n \n $form->addExtraClass('cms-previewable');\n $form->setTemplate(array(\n 'type'=>'Includes',\n 'WebbuildersGroup\\\\SiteConfigErrorPages\\\\Forms\\\\GridField\\\\ErrorPageItemEditForm'\n ));\n }\n \n \n Requirements::css('webbuilders-group/silverstripe-siteconfig-error-pages:css/ErrorPageItemRequestHandler.css');\n Requirements::javascript('webbuilders-group/silverstripe-siteconfig-error-pages:javascript/ErrorPageItemRequestHandler.js');\n \n return $form;\n }", "function load_form ()\r\r\n {\r\r\n # Get the passed details into the url data array if any\r\r\n $urldata = $this->uri->uri_to_assoc(3, array('m', 'i', 'b'));\r\r\n\r\r\n # Pick all assigned data\r\r\n $data = assign_to_data($urldata);\r\r\n\r\r\n #check user access\r\r\n #1: for editing\r\r\n if (!empty($data['i'])) {\r\r\n check_user_access($this, 'view_bid_invitations', 'redirect');\r\r\n } #2: for creating\r\r\n else {\r\r\n check_user_access($this, 'view_bid_invitations', 'redirect');\r\r\n }\r\r\n\r\r\n if ($this->session->userdata('isadmin') == 'N') $userdetails = $this->db->get_where('users', array('userid' => $this->session->userdata('userid')))->result_array();\r\r\n\r\r\n #exit($this->db->last_query());\r\r\n\r\r\n #user is editing\r\r\n if (!empty($data['i'])) {\r\r\n $holiday_id = decryptValue($data['i']);\r\r\n $data['formdata'] = $this->Query_reader->get_row_as_array('search_table', array('table' => 'public_holidays', 'limittext' => '', 'orderby' => 'id', 'searchstring' => ' id=\"' . $holiday_id . '\" AND isactive=\"Y\"'));\r\r\n }\r\r\n\r\r\n $data['page_title'] = (!empty($data['i']) ? 'Edit public holiday' : 'Add public holiday');\r\r\n $data['current_menu'] = 'view_bid_invitations';\r\r\n $data['view_to_load'] = 'public_holiday/form';\r\r\n $data['view_data']['form_title'] = $data['page_title'];\r\r\n\r\r\n $this->load->view('dashboard_v', $data);\r\r\n\r\r\n }", "public function init_form_fields()\n {\n }", "public function init_form_fields() {\n $this->form_fields = require( dirname( __FILE__ ) . '/admin/digitalriver-settings.php' );\n }", "private function setFieldValues(){\n\t\t\t\t$library = new Library();\n\t\t\t\t//Get Datafields to enter\n\t\t\t\t$libraryFields = $library->getLibraryItemDataFields();\n\t\t\t\t$this->infoToView['fields'] = $libraryFields;\n\t\t\t\t$this->infoToView['dropdown'] = $library->getDropdownValues($libraryFields);\n\t}", "public function init_form_fields() {\n\t\t\t//$this->form_fields = include( dirname( __FILE__ ) . '/settings-one-click.php' );\n\t\t}", "protected function loadCreateForm()\n {\n }", "function LoadSearchValues() {\n\t\tglobal $objForm;\n\n\t\t// Load search values\n\t\t// id\n\n\t\t$this->id->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue(\"x_id\"));\n\t\t$this->id->AdvancedSearch->SearchOperator = $objForm->GetValue(\"z_id\");\n\n\t\t// nama_pemilik\n\t\t$this->nama_pemilik->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue(\"x_nama_pemilik\"));\n\t\t$this->nama_pemilik->AdvancedSearch->SearchOperator = $objForm->GetValue(\"z_nama_pemilik\");\n\n\t\t// nama_industri_kreatif\n\t\t$this->nama_industri_kreatif->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue(\"x_nama_industri_kreatif\"));\n\t\t$this->nama_industri_kreatif->AdvancedSearch->SearchOperator = $objForm->GetValue(\"z_nama_industri_kreatif\");\n\n\t\t// email\n\t\t$this->_email->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue(\"x__email\"));\n\t\t$this->_email->AdvancedSearch->SearchOperator = $objForm->GetValue(\"z__email\");\n\n\t\t// password\n\t\t$this->password->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue(\"x_password\"));\n\t\t$this->password->AdvancedSearch->SearchOperator = $objForm->GetValue(\"z_password\");\n\n\t\t// deskripsi_industri_kreatif\n\t\t$this->deskripsi_industri_kreatif->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue(\"x_deskripsi_industri_kreatif\"));\n\t\t$this->deskripsi_industri_kreatif->AdvancedSearch->SearchOperator = $objForm->GetValue(\"z_deskripsi_industri_kreatif\");\n\n\t\t// alamat\n\t\t$this->alamat->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue(\"x_alamat\"));\n\t\t$this->alamat->AdvancedSearch->SearchOperator = $objForm->GetValue(\"z_alamat\");\n\n\t\t// no_telp\n\t\t$this->no_telp->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue(\"x_no_telp\"));\n\t\t$this->no_telp->AdvancedSearch->SearchOperator = $objForm->GetValue(\"z_no_telp\");\n\n\t\t// image\n\t\t$this->image->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue(\"x_image\"));\n\t\t$this->image->AdvancedSearch->SearchOperator = $objForm->GetValue(\"z_image\");\n\n\t\t// website\n\t\t$this->website->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue(\"x_website\"));\n\t\t$this->website->AdvancedSearch->SearchOperator = $objForm->GetValue(\"z_website\");\n\n\t\t// sektor_industri_kreatif\n\t\t$this->sektor_industri_kreatif->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue(\"x_sektor_industri_kreatif\"));\n\t\t$this->sektor_industri_kreatif->AdvancedSearch->SearchOperator = $objForm->GetValue(\"z_sektor_industri_kreatif\");\n\n\t\t// order_rank\n\t\t$this->order_rank->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue(\"x_order_rank\"));\n\t\t$this->order_rank->AdvancedSearch->SearchOperator = $objForm->GetValue(\"z_order_rank\");\n\n\t\t// created_at\n\t\t$this->created_at->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue(\"x_created_at\"));\n\t\t$this->created_at->AdvancedSearch->SearchOperator = $objForm->GetValue(\"z_created_at\");\n\n\t\t// role\n\t\t$this->role->AdvancedSearch->SearchValue = ew_StripSlashes($objForm->GetValue(\"x_role\"));\n\t\t$this->role->AdvancedSearch->SearchOperator = $objForm->GetValue(\"z_role\");\n\t}", "private function populateForm()\n {\n $this->form->get('version')->setValue($this->continuationDetailData['version']);\n }", "function thumbwhere_hostroletypehostsubroletype_edit_form($form, &$form_state, $thumbwhere_hostroletypehostsubroletype) {\n\n // Add the default field elements.\n $form['fk_hostroletype'] = array(\n '#type' => 'textfield',\n '#title' => t('ThumbWhereHostRoleTypeHostSubRoleType fk_hostroletype'),\n '#default_value' => isset($thumbwhere_hostroletypehostsubroletype->fk_hostroletype) ? $thumbwhere_hostroletypehostsubroletype->fk_hostroletype : '',\n //'#maxlength' => 255,\n /// '#required' => TRUE,\n '#weight' => -5,\n '#autocomplete_path' => 'entity-autocomplete/thumbwhere_hostroletype',\n );\n // Add the default field elements.\n $form['fk_subroletype'] = array(\n '#type' => 'textfield',\n '#title' => t('ThumbWhereHostRoleTypeHostSubRoleType fk_subroletype'),\n '#default_value' => isset($thumbwhere_hostroletypehostsubroletype->fk_subroletype) ? $thumbwhere_hostroletypehostsubroletype->fk_subroletype : '',\n //'#maxlength' => 255,\n /// '#required' => TRUE,\n '#weight' => -5,\n '#autocomplete_path' => 'entity-autocomplete/thumbwhere_hostroletype',\n );\n\n\n\n $form['data']['#tree'] = TRUE;\n\n /*\n $form['data']['sample_data'] = array(\n '#type' => 'checkbox',\n '#title' => t('An interesting thumbwhere_hostroletypehostsubroletype switch'),\n '#default_value' => isset($thumbwhere_hostroletypehostsubroletype->data['sample_data']) ? $thumbwhere_hostroletypehostsubroletype->data['sample_data'] : 1,\n );\n */\n\n\n // Add the field related form elements.\n $form_state['thumbwhere_hostroletypehostsubroletype'] = $thumbwhere_hostroletypehostsubroletype;\n field_attach_form('thumbwhere_hostroletypehostsubroletype', $thumbwhere_hostroletypehostsubroletype, $form, $form_state);\n\n $form['actions'] = array(\n '#type' => 'container',\n '#attributes' => array('class' => array('form-actions')),\n '#weight' => 400,\n );\n\n // We add the form's #submit array to this button along with the actual submit\n // handler to preserve any submit handlers added by a form callback_wrapper.\n $submit = array();\n\n if (!empty($form['#submit'])) {\n $submit += $form['#submit'];\n }\n\n $form['actions']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save thumbwhere_hostroletypehostsubroletype'),\n '#submit' => $submit + array('thumbwhere_hostroletypehostsubroletype_edit_form_submit'),\n );\n\n // Do we show the delete button?\n if (!empty($thumbwhere_hostroletypehostsubroletype->pk_hostroletypehostsubroletype)) {\n $form['actions']['delete'] = array(\n '#type' => 'submit',\n '#value' => t('Delete thumbwhere_hostroletypehostsubroletype'),\n '#suffix' => l(t('Cancel'), 'admin/thumbwhere/thumbwhere_hostroletypehostsubroletypes'),\n '#submit' => $submit + array('thumbwhere_hostroletypehostsubroletype_form_submit_delete'),\n '#weight' => 45,\n );\n }\n\n // We append the validate handler to #validate in case a form callback_wrapper\n // is used to add validate handlers earlier.\n $form['#validate'][] = 'thumbwhere_hostroletypehostsubroletype_edit_form_validate';\n return $form;\n}", "function loadFromForm() \n {\n parent::loadFromForm();\n \n /*\n * Put any additional data manipulations here.\n * if you don't need to do anything else, you should \n * just remove this method and let the parent method get\n * called directly.\n */\n \n }", "private function loadForm()\n {\n $this->frm = new BackendForm('settings');\n\n $this->frm->addText('username', $this->get('fork.settings')->get('Geo', 'username'));\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the value of field is_new
public function getIsNew() { return $this->is_new; }
[ "public function isNew()\n {\n return (bool) $this->is_new;\n }", "public function getIsNew()\n {\n }", "function is_new_record() {\n\t\t\treturn $this->new_record;\n\t\t}", "public function isNew(){\n\t\treturn $this->newEntity;\n\t}", "public function getModifiedNew()\n {\n return $this->modifiedNew;\n }", "public function getIsNewRecord()\n {\n return $this->_isNewRecord;\n }", "public function getIsNewCustom() {\n return $this->get(self::ISNEWCUSTOM);\n }", "public function isNew() {\n return $this->status == self::STATUS_NEW;\n }", "public function getIsNewRecord()\n {\n return !isset($this->{$this->getPk()});\n }", "public function isNew()\r\n {\r\n $this->load('personal');\r\n return $this->first_visit;\r\n }", "static function retrieveByIsNew($value) {\n\t\treturn Guest::retrieveByColumn('is_new', $value);\n\t}", "public function setNew()\r\n {\r\n $this->new = true;\r\n }", "public function setIsNew($is_new)\n {\n $this->is_new = $is_new;\n\n return $this;\n }", "public function getIsNewRecord()\n {\n return $this->_item === null;\n }", "public function isNew(): bool;", "public function isCreateNewProperty(): bool\n {\n return $this->createNewProperty;\n }", "public function getBNew()\n\t{\n\t\treturn $this->b_new;\n\t}", "public function isNew()\n\t{\n\t\treturn $this->is_new_session;\n\t}", "function rules_condition_entity_is_new($entity, $settings, $state, $element) {\n $wrapper = $state->currentArguments['entity'];\n return !$wrapper->getIdentifier() || !empty($entity->is_new);\n}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the class for the text section.
function ttfmake_builder_get_text_class( $ttfmake_section_data, $sections ) { if ( ! ttfmake_builder_is_section_type( 'text', $ttfmake_section_data ) ) { return ''; } $text_class = ' '; // Section classes $text_class .= ttfmake_get_builder_save()->section_classes( $ttfmake_section_data, $sections ); // Columns $columns_number = ( isset( $ttfmake_section_data['columns-number'] ) ) ? absint( $ttfmake_section_data['columns-number'] ) : 1; $text_class .= ' builder-text-columns-' . $columns_number; return $text_class; }
[ "function maera_pb_builder_get_text_class( $maera_pb_section_data, $sections ) {\n\tif ( ! maera_pb_builder_is_section_type( 'text', $maera_pb_section_data ) ) {\n\t\treturn '';\n\t}\n\n\t$text_class = ' ';\n\n\t// Section classes\n\t$text_class .= maera_pb_get_builder_save()->section_classes( $maera_pb_section_data, $sections );\n\n\t// Columns\n\t$columns_number = ( isset( $maera_pb_section_data['columns-number'] ) ) ? absint( $maera_pb_section_data['columns-number'] ) : 1;\n\t$text_class .= ' builder-text-columns-' . $columns_number;\n\n\t/**\n\t * Filter the text section class.\n\t *\n\t * @since 1.2.3.\n\t *\n\t * @param string $text_class The computed class string.\n\t * @param array $maera_pb_section_data The section data.\n\t * @param array $sections The list of sections.\n\t */\n\treturn apply_filters( 'maera_builder_get_text_class', $text_class, $maera_pb_section_data, $sections );\n}", "public function getSectionClass();", "public function GetClassText() {\n return $this->classText;\n }", "function sectionText() {\n\t}", "public function getText()\n {\n $chunk = new ClassChunk($this);\n return $chunk->getText();\n }", "public function getCSSClass()\n {\n return $this->getValue('nb_site_target_section_css_class');\n }", "public function getContractSectionText ()\n {\n if (strlen($this->sectionText) < 1)\n {\n return $this->getContractSection()->sectionDefaultText;\n }\n\n return $this->sectionText;\n }", "protected function getTextStatisticsClass()\n {\n if (!$this->textStatistics) {\n $this->textStatistics = new TextStatistics;\n }\n\n return $this->textStatistics;\n }", "public function getTextSegment()\n {\n return $this->text_segment;\n }", "public function getTextSegmentType()\n {\n return $this->text_segment_type;\n }", "public function getSectionClass() {\n\t\treturn $this->config->get(\"forum::sections.model\");\n\t}", "public function getTextClassificationConfig()\n {\n return $this->readOneof(4);\n }", "function getContentClass()\n\t{\n\t\treturn $this->contentclass;\n\t}", "public static function get_text_style_class_name($id_or_slug) {\n $style;\n if (is_integer($id_or_slug)) {\n $style = get_post($id_or_slug);\n } else {\n $style = self::get_style_by_slug($id_or_slug);\n }\n\n // If we didn't find any posts return an empty string.\n if ( ! $style ) { return ''; }\n\n // Get the slug.\n $slug = $style->post_name;\n\n return \"wptb-txt-style__$slug\";\n }", "function get_text()\n\t{\n\t\treturn $this->text;\n\t}", "protected function getStyleClass()\n {\n $class = 'z-form-text';\n if ($this->mandatorysym) {\n $class .= ' z-form-mandatory';\n }\n if ($this->readOnly) {\n $class .= ' z-form-readonly';\n }\n if ($this->cssClass != null) {\n $class .= ' ' . $this->cssClass;\n }\n return $class;\n }", "abstract public function getTextAlignmentClass($viewport, $value);", "public function display_main_section_text() {}", "public function getTextClassificationModelMetadata()\n {\n return $this->readOneof(14);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns element from 'tags' list at given offset
public function getTagsAt($offset) { return $this->get(self::TAGS, $offset); }
[ "public function getTagsAt($offset)\n {\n return $this->get(self::tags, $offset);\n }", "public function offsetGet($offset) {\n $hash = md5($offset);\n if (isset($this->items[$hash])) {\n return $this->items[$hash];\n }\n\n $indexElement = $this->findInIndex($offset);\n\n if (!empty($indexElement)) {\n return $indexElement;\n }\n\n return $this->findElement($offset);\n }", "public function offsetGet($tag)\n {\n return $this->entries[$tag];\n }", "public function itemAt($offset) {\n $slice = array_slice($this->items, $offset, 1);\n return $slice[0];\n }", "public function getMarketingTagsAt($offset)\n {\n return $this->get(self::marketing_tags, $offset);\n }", "public function offsetGet($offset)\n {\n return $this->tokens[$offset];\n }", "public function offsetGet($offset);", "public function offsetGet($offset){\r\n return $this->collection[$offset];\r\n }", "public function findOneByOffset($offset)\n {\n $extensions = $this->findAll();\n $extensions = array_values($extensions);\n $offset = (int)$offset;\n if (!empty($extensions[$offset])) {\n return $extensions[$offset];\n }\n return null;\n }", "public function offsetGet($offset)\n {\n return $this->body[$offset];\n }", "public function getItemAt($offset)\n {\n return $this->get(self::ITEM, $offset);\n }", "function offsetGet ($offset)\n\t{\n\t\tif (is_numeric($offset)) {\n\t\t\t$found = parent::offsetGet($offset);\n\t\t} else {\n\t\t\t$found = null;\n\t\t}\n\t\tif (!$found && is_string($offset)) {\n\t\t\t$found = $this->namedItem($offset);\n\t\t}\n\t\treturn $found;\n\t}", "public static function getTagName($index){}", "#[\\ReturnTypeWillChange]\n public function offsetGet($offset)\n {\n return $this->offsetExists($offset) ? $this->nodes[$offset] : null;\n }", "function offsetGet ($offset)\n\t{\n\t\tif (is_numeric($offset)) {\n\t\t\t$found = parent::offsetGet($offset);\n\t\t} else {\n\t\t\t$found = null;\n\t\t}\n\t\tif (!$found && is_string($offset)) {\n\t\t\t$found = $this->namedItem($offset);\n\t\t\tif ($found->length === 0) {\n\t\t\t\t$found = null;\n\t\t\t}\n\t\t}\n\t\treturn $found;\n\t}", "function getelem($collection, $ndx) {}", "public function offsetGet($offset)\n {\n return $this->_handler->get($offset);\n }", "public function offsetGet($offset) {\n\t\treturn $this->values[$offset];\n\t}", "public function offsetGet($offset)\n\t{\n\t\treturn $this->segments[$offset];\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the default records per page.
public static function get_records_per_page();
[ "public function getDefaultItemsPerPage();", "public function getUsersDefaultPaging();", "public static function getDefaultItemCountPerPage ()\n {\n return self::$_defaultItemCountPerPage;\n }", "public function getRecordsPerPage ();", "public function getDefaultPageSize()\n {\n return self::DEFAULT_PAGE_SIZE;\n }", "public static function getPerPageDefault() : int\n {\n return static::$perPageDefault;\n }", "public static function getDefaultPageSize()\n\t{\n\t\treturn config('consts.paginator_default_page_size');\n\t}", "public function all($record_per_page = 20);", "public function getDefaultPerPageValue()\n {\n return $this->_inSearchHelper->getDefaultLimitPerPageValue($this->currentType);\n }", "function osc_default_results_per_page_at_search() {\n return (int)(getPreference('defaultResultsPerPage@search'));\n }", "public function getDefaultMaximumRecords()\n {\n return $this->defaultMaximumRecords;\n }", "public function records_pagination()\n\t\t{\n\t\t\t/*\t\n\t\t\t\tcase: 1\n\t\t\t\tbecause number of number of all records > max records per page :: we force pagination system even \n\t\t\t\tuser doesn't allow records pagination\n\t\t\t\tcase: 2\n\t\t\t\tbecause number of AllowRowsPagination = true and records per page > max records per page :: we force pagination system even user doesn't allow records pagination\n\t\t\t\tcase: 3\n\t\t\t\tAllowRowsPagination = true and (number of all records and records per page) < max records per \n\t\t\t\tpage :: user will get pagination system as he/she expected\n\t\t\t\t\n\t\t\t*/\n\t\t\tglobal $AllowRowsPagination;\n\t\t\tif($this->AllowRowsPagination === false && $this->num_records > $this->maxRecordPerPage) // case: 1\n\t\t\t{\n\t\t\t\t$this->AllowRowsPagination = true;\n\t\t\t\t$recordPerPage = $this->maxRecordPerPage;\n\t\t\t}\n\t\t\telse if($this->recordPerPage > $this->maxRecordPerPage) // case: 2\n\t\t\t\t$recordPerPage = $this->maxRecordPerPage;\n\t\t\telse // case: 3\n\t\t\t\t$recordPerPage = $this->recordPerPage;\n\t\t\t\n\t\t\t$AllowRowsPagination = $this->AllowRowsPagination;\n\t\t\t\n\t\t\treturn $recordPerPage;\n\t\t}", "public function get_items_per_page();", "static function per_page(){\n\t\treturn Config::apply_filters('indexer_per_page', 10);\n\t}", "private function setPaginationDefaultParameters()\n {\n $limit = request()->get('limit', 50);\n $page = request()->get('page', 0);\n $orderBy = request()->get('order_by');\n $orderByMode = request()->get('order_by_mode');\n $search = request()->get('search');\n\n if (!is_numeric($page) or ($page < 1) or empty($page)) $page = 1;\n if (!is_numeric($limit) or ($limit < 10) or ($limit > 500)) $limit = 50;\n if (empty($orderBy)) $orderBy = null;\n if (empty($orderByMode)) $orderByMode = null;\n if (empty($search)) $search = null;\n\n return [\n 'limit' => $limit,\n 'page' => $page,\n 'order_by' => $orderBy,\n 'order_by_mode' => $orderByMode,\n 'search' => $search,\n ];\n }", "function wc_get_default_product_rows_per_page()\n {\n }", "public static function getDefaultPage()\n\t{\n\t\treturn config('consts.paginator_default_page');\n\t}", "public function getResultsPerPage();", "public function withDefaultPageSize($pageSize) {}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the ACP category.
public function getACPCategory() { return $this->acpCategory; }
[ "public function getCategory()\n {\n return $this->getOptionValue(self::CATEGORY);\n }", "public function getCategory(): string\n {\n return $this->category;\n }", "public function getCategory()\r\n {\r\n return $this->category;\r\n }", "public function getCategory()\n {\n return Mage::registry('current_category');\n }", "public function getCategory()\n\t{\n\t\t$Category = new Product_Category();\n\t\treturn $Category->findItem( array( 'Layout = '.get_class( $this ) ) );\n\t}", "function get_category() {\n $category = null;\n\n if (!empty($this->categoryid)) {\n $category = grade_category::fetch('id', $this->categoryid);\n } elseif (!empty($this->iteminstance) && $this->itemtype == 'category') {\n $category = grade_category::fetch('id', $this->iteminstance);\n }\n\n return $category;\n }", "public function getActiveCategory()\n {\n return $this->_activeCategory;\n }", "public function getProduct_category () {\n\t$preValue = $this->preGetValue(\"product_category\"); \n\tif($preValue !== null && !\\Pimcore::inAdmin()) { \n\t\treturn $preValue;\n\t}\n\t$data = $this->getClass()->getFieldDefinition(\"product_category\")->preGetData($this);\n\treturn $data;\n}", "public function getCategory()\n {\n return $this->readOneof(6);\n }", "function category() {\n $db = new DB(\"categories\");\n $db->select(\"category_id = '\" . $this->_vars['category'] . \"'\");\n $db->nextRecord();\n return $db->category_icon;\n }", "public function getCategoryName() {\n return $this->pluginDefinition['category'] ?? '';\n }", "public function getCategory()\n {\n $category = $this->getOption('category');\n\n if ($this->provider->supportsCategories() && $this->provider->isCategoryValid($category)) {\n return $category;\n }\n\n return null;\n }", "function get_Category()\n {\n try {\n return $this->mCategory;\n }catch(Exception $e){\n $this->error->throwException('303', 'No s`ha pogut retornar la informació', $e);\n }\n }", "public function getControlCategory()\n {\n if (array_key_exists(\"controlCategory\", $this->_propDict)) {\n return $this->_propDict[\"controlCategory\"];\n } else {\n return null;\n }\n }", "public function getCategory() {\r\n return Mage::getModel('lcb_attachments/category')->load($this->getRequest()->getParam('id'));\r\n }", "function getCategory() {\n\t\treturn $this->node->firstChild->toString();\n\t}", "public function getCategory()\n {\n $string = mb_strtolower(\"{$this->name} {$this->id}\");\n $string = preg_replace('/[^a-z ]/', ' ', $string);\n $parts = explode(' ', $string);\n $parts = array_filter($parts);\n $lastPart = array_shift($parts);\n return $lastPart ?: 'bin';\n }", "private function getCurrentCategory()\n {\n $result = null;\n $catalogLayer = $this->layerResolver->get();\n\n if ($catalogLayer) {\n $result = $catalogLayer->getCurrentCategory();\n }\n\n return $result;\n }", "public function getCategoria()\n {\n return $this->DS_CATEGORIA;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
used to display transport infos for a player on the map
public function get_transport_infos($player_id) { $this->db->select("tm.id,tm.hexmap,tm.route_id,w.player_id,w.whtype,coalesce(x.pname,'Travelling') as pname") ->select("coalesce(t.description,'Not on a route') as description") ->from("transport_movements tm") ->join("warehouses w", "tm.id = w.id") ->join("places x", "x.hexmap = tm.hexmap","left") ->join("traderoutes t","abs(tm.route_id) = t.id","left"); if ($player_id) { $this->db->where("w.player_id",$player_id); } else { //the admin can see the transport of everybody $this->db->select("p.fullname") ->join("players p", "p.id = w.player_id"); } $data = $this->db->get()->result(); //now collect the cargo info for every transport foreach($data as &$item) { $this->db->select("wg.id_good, wg.quantity, g.gname") ->from("warehouses_goods wg") ->join("goods g", "wg.id_good = g.id") ->where("id_warehouse", $item->id); $query = $this->db->get(); if(!$item->goods = $query->result()) { $item->goods = "Empty"; } } return $data; }
[ "protected function info(){\n $this->io->writeln(\"Player Info\");\n\n $playerInfo = $this->game->getCurrentPlayerInfo();\n\n $this->io->table(\n array('Name', $playerInfo['name']),\n array(\n array('Level', $playerInfo['level']),\n array('XP', $playerInfo['xp']),\n )\n );\n }", "public function get_player_detail()\n {\n if (Authenticate::is_authorized()) {\n $model_player = Player::getInstance();\n\n $id = $this->framework->url->url_part(3);\n\n $model_report = ReportGenerator::getInstance();\n $model_report->get_report_player_detail($model_player->fetch($id));\n $model_report->print_report();\n } else {\n transport(\"administrator\");\n }\n }", "private function getPlayerinfo()\r\n\t{\r\n\t\t$data = $this->cmd(\"\\xFF\\xFF\\xFF\\xFF\\x55\" . pack(\"H*\", $this->challengeNumber));\r\n\t\t\r\n\t\t$rtn[\"type\"]\t= $this->getPacketData($data, \"byte\");\r\n\t\t$rtn[\"player\"]\t= $this->getPacketData($data, \"byte\", true);\r\n\t\t\r\n\t\tfor($i = 0; $i < $rtn[\"player\"]; $i++)\r\n\t\t{\r\n\t\t\t$rtn[\"players\"][$i][\"index\"]\t= $this->getPacketData($data, \"byte\", true);\r\n\t\t\t$rtn[\"players\"][$i][\"name\"]\t= $this->getPacketString($data);\r\n\t\t\t$rtn[\"players\"][$i][\"kills\"]\t= $this->getPacketData($data, \"long\", true);\r\n\t\t\t$rtn[\"players\"][$i][\"connected\"]= $this->hex2float(hexdec($this->getPacketData($data, \"float\")));\r\n\t\t}\r\n\t\t\r\n\t\t$this->playerinfo = $rtn;\r\n\t}", "public function display() {\n\n\t\tif( null == $this->mPlayers ){\n\n\t\t\t$playerJsonString = $this->mActionsController->getPlayers();\n\t\t\t//if fail to read players\n\t\t\tif( null == $playerJsonString ){\t\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$this->mPlayers = json_decode($playerJsonString);\n\t\t}\n\n\t\techo \"Current Players: \\n\";\n\t\tforeach($this->mPlayers as $player) {\n\n\t\t\tforeach( $player as $key=>$val){\n\t\t\t\t$key = ucfirst($key);\n\t\t\t\techo \"\\t $key : $val \\n\";\n\t\t\t}\n\t\t\techo \"\\n\";\n\t\t}\n\n\t}", "public function show_transport()\n\t{\t\n\t\t$classes = Classes::orderBy('created_at','desc')->paginate(5);\n\t\t$transports = Transport::orderBy('created_at','desc')->paginate(5);\n\t\t$auth = Auth::user();\n\t\t$settings = Settings::find(1);\n\t\treturn view('admin.transports.list')->with(compact(['transports','settings','classes','auth']));\n\t}", "public function showMap(){\n $battlefieldId = filter_input(INPUT_GET, 'battlefieldId', FILTER_SANITIZE_NUMBER_INT);\n $battlefield = new Battlefield($this->_DI, $battlefieldId);\n $battlefieldData = $battlefield->getData();\n $this->picturePath = $battlefield->generateMap();\n $this->battlefieldName = $battlefieldData['name'];\n $this->hives = $battlefieldData['hives'];\n }", "function displayPlayerForAuction(Player $player) {\n \t// Display player attributes.\r\n \techo \"<hr class='bothr'/>\";\n $player->displayPlayerInfo();\n \techo \"<hr/>\";\r\n\r\n \t// MLB Team\r\n \techo \"<table class='table vertmiddle table-striped table-condensed table-bordered center'>\";\n \t$mlbTeam = $player->getMlbTeam();\r\n \techo \"<tr><td><strong>Team:</strong></td>\r\n \t<td>\" . $mlbTeam->getCity() . \" \" . $mlbTeam->getName() . \"</td></tr>\";\r\n\r\n \t// Birth date & age\r\n \techo \"<tr><td><strong>Birth Date:</strong></td>\r\n \t<td>\" . $player->getBirthDate() . \"</td></tr>\";\r\n \techo \"<tr><td><strong>Age:</strong></td>\r\n \t<td>\" . $player->getAge() . \"</td></tr>\";\r\n\r\n \t// Positions\r\n \techo \"<tr><td><strong>Position(s):</strong></td>\r\n \t<td>\" . $player->getPositionString() . \"</td></tr>\";\r\n \techo \"</table>\";\r\n\n \techo \"<input type='hidden' name='auction_playerid' value='\" . $player->getId() . \"'>\";\n }", "public function displayTimes() {\n $lines = $this->maniaControl->getSettingManager()->getSettingValue($this, self::SETTING_LINESCOUNT);\n $lineHeight = $this->maniaControl->getSettingManager()->getSettingValue($this, self::SETTING_LINE_HEIGHT);\n $posX = $this->maniaControl->getSettingManager()->getSettingValue($this, self::SETTING_POSX);\n $posY = $this->maniaControl->getSettingManager()->getSettingValue($this, self::SETTING_POSY);\n $width = $this->maniaControl->getSettingManager()->getSettingValue($this, self::SETTING_WIDTH);\n\n\n $maniaLink = new ManiaLink(self::MLID_CHAPOLIVE_WIDGETTIMES);\n $frame = new Frame();\n $maniaLink->addChild($frame);\n $frame->setPosition($posX, $posY);\n\n\n $i = 0;\n foreach ($this->players as $player) {\n $playerId = $player->getPlayerId();\n $i++;\n $time = Formatter::formatTime(\"55482\");\n\n $y = -$i*$lineHeight;\n\n $playerReguFrame = new Frame();\n $frame->addChild($playerReguFrame);\n $playerReguFrame->setPosition(0, $y+13);\n\n //Name\n $nameLabel = new Label_Text();\n $playerReguFrame->addChild($nameLabel);\n $nameLabel->setHorizontalAlign($nameLabel::LEFT);\n $nameLabel->setX($width * -0.4);\n $nameLabel->setSize($width * 0.6, $lineHeight);\n $nameLabel->setTextSize(1);\n var_dump($playerId);\n $nameLabel->setText(' ' . $playerId);\n $nameLabel->setTextEmboss(true);\n }\n\n\n $this->maniaControl->getManialinkManager()->sendManialink($maniaLink, false);\n }", "function getInfo() {\r\t\treturn $this->name.\" (\".$this->latitude.\"/\".$this->longitude.\")\";\r\t}", "public function info() {\n\n\t\t$valid = $this->SteamPlayerCache->countValidPlayers();\n\t\t$expired = $this->SteamPlayerCache->countExpiredPlayers();\n\t\t$precached = $this->SteamPlayerCache->countPrecachedPlayers();\n\t\t$total = $valid + $expired;\n\n\t\t$this->out(\"Total: $total\");\n\t\t$this->out(\"Valid: $valid\");\n\t\t$this->out(\"Expired: $expired\");\n\t\t$this->out(\"Precached: $precached\");\n\t}", "function output_soldier_info() {\n\t\tglobal $armies, $campaign, $user;\n\t\t//Global information show no matter what\n\t\techo '<table>\n\t\t\t<tr>\n\t\t\t\t<th>Username:</th>\n\t\t\t\t<td>' . $user->data['username'] . '</td>\n\t\t\t</tr>' . PHP_EOL;\n\t\tif($campaign->is_running) {\n\t\t\t/* Output primarily changes based on whether the user is \n\t\t\t in an army or not. */\n\t\t\tif($this->army_id) {\n\t\t\t\techo '<tr>\n\t\t\t\t\t<td colspan=\"2\">You have been assigned to ' . $armies[$this->army_ptr]['army']->name . '. Don&rsquo;t forget to check your forums for more information.</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<th>Tags:</th>\n\t\t\t\t\t<td>' . $this->tags . '</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<th>Rank:</th>\n\t\t\t\t\t<td>' . $armies[$this->army_ptr]['ranks'][$this->rank_ptr]->name . '</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<th>Division:</th>\n\t\t\t\t\t<td>' . $armies[$this->army_ptr]['divisions'][$this->division_ptr]->name . '</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<th>TS Pass:</th>\n\t\t\t\t\t<td>' . (empty($armies[$this->army_ptr]['army']->ts_pw) ? 'No password set' : $armies[$this->army_ptr]['army']->ts_pw) . '</td>\n\t\t\t\t</tr>' . PHP_EOL;\n\t\t\t} else {\n\t\t\t\t/* If the user is not in an army then either show sign \n\t\t\t\t up button or message stating their application is\n\t\t\t\t pending. */\n\t\t\t\tif($this->is_signed_up && $campaign->state < 4) {\n\t\t\t\t\techo '<tr>\n\t\t\t\t\t\t<td colspan=\"2\">You have been entered into the draft, which is scheduled to take place on ' . date('D jS M', $campaign->draft_date) . '.<br /><br />\n\t\t\t\t\t\tIf you no longer wish to be a part of the draft you may remove yourself by <a href=\"abc_soldier_remove.php\">clicking here</a></td>\n\t\t\t\t\t</tr>' . PHP_EOL;\n\t\t\t\t} elseif($this->is_signed_up) {\n\t\t\t\t\techo '<tr>\n\t\t\t\t\t\t<td colspan=\"2\">Your application is currently pending. Please check back soon to see which army you have been assigned to.</td>\n\t\t\t\t\t</tr>' . PHP_EOL;\n\t\t\t\t} elseif($campaign->state <> 4) {\n\t\t\t\t\techo '<tr>\n\t\t\t\t\t\t<td colspan=\"2\">' . ($campaign->state < 4 ? 'The campaign will be starting soon, but before you can take part you must join the draft.' : 'The campaign is currently underway. However don&rsquo;t dispair, you can still take part. Just sign up and a TA will assign you to an army.') . '</td>\n\t\t\t\t\t</tr><tr>\n\t\t\t\t\t\t<td colspan=\"2\"><input type=\"button\" name=\"soldier_sign_up\" id=\"soldier_sign_up_btn\" value=\"' . ($campaign->state < 4 ? 'Enter Draft' : 'Join Campaign') . '\" /></td>\n\t\t\t\t\t</tr>' . PHP_EOL;\n\t\t\t\t} else {\n\t\t\t\t\techo '<tr>\n\t\t\t\t\t\t<td colspan=\"2\">You cannot sign up during the draft. Please wait until the end of the draft and then refresh this page.</td>\n\t\t\t\t\t</tr>' . PHP_EOL;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\techo '<tr>\n\t\t\t\t<td colspan=\"2\">There is currently no campaign running. Please check back soon.</td>\n\t\t\t</tr>' . PHP_EOL;\n\t\t}\n\t\techo '</table>' . PHP_EOL;\n\t}", "public function showAction(Transport $transport)\n {\n $deleteForm = $this->createDeleteForm($transport);\n $user = $this->getUser()->getId();\n return $this->render('transport/show.html.twig', array(\n 'transport' => $transport,\n 'delete_form' => $deleteForm->createView(),\n 'user' => $user,\n ));\n }", "function api_sql_player_teaminfo(){\n\t\t\treturn \"i.Name AS TeamName, pi.Name AS ProTeamName, pi.Abbre AS ProTeamAbbre, i.Abbre AS Abbre, i.City AS City \";\n\t\t}", "public function detailsTile() {\n\t\t\t// Declare classes\n\t\t\t$RepTexture\t\t\t= new RepTexture();\n\t\t\t$ModTexture\t\t\t= new ModTexture();\n\t\t\t// Initialize variables\n\t\t\t$id_tile\t\t\t= (isset($GLOBALS['params'][1])) ? trim(($GLOBALS['params'][1])) : false;\n\t\t\t// If tile id was sent\n\t\t\tif ($id_tile) {\n\t\t\t\t// Get branch Info\n\t\t\t\t$tile\t\t\t= $RepTexture->getTileById($id_tile);\n\t\t\t\t// If user was found\n\t\t\t\tif ($tile) {\n\t\t\t\t\t// Get and model Title Type's combo\n\t\t\t\t\t$tileTypes\t= $RepTexture->getAllTileTypes('vc_name');\n\t\t\t\t\t$tileTypes\t= ($tileTypes) ? $ModTexture->comboTileTypes($tileTypes, $tile['id_tiletype']) : false;\n\t\t\t\t\t// Prepare data to be sent\n\t\t\t\t\tView::set('tileTypes',\t\t$tileTypes);\n\t\t\t\t\tView::set('id_tile',\t\t$id_tile);\n\t\t\t\t\tView::set('vc_name',\t\t$tile['vc_name']);\n\t\t\t\t\tView::set('vc_path',\t\t$tile['vc_path']);\n\t\t\t\t\t// Render page\n\t\t\t\t\tView::render('partial_tileDetails');\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function displayTravelData() {\n\n echo \"<table class='table table-bordered t3'>\";\n $this->displayTravelTableHead();\n $this->displayTravelTableBody();\n echo \"</table>\";\n\n }", "public function mapPlayersInfoAction()\n {\n $idArray = json_decode($this->getRequest()->query->get('idArray'));\n $infos = $this->getDoctrine()->getRepository('EIPHRBundle:HRHero')->getMapInfoFor($idArray, $this->getGame()->getId());\n // translate hero names\n $tr = $this->get('translator');\n foreach ($infos as &$info)\n $info['heroName'] = $tr->trans($info['heroName'], array(), 'heroes');\n return new \\Symfony\\Component\\HttpFoundation\\JsonResponse($infos);\n }", "function display_player_profile($player_info){\n if($player_info['messages']){\n\t?>\n\t<div class='player-profile'>\n\t\t<p class='centered'><span class='subtitle'>Message:</span> <?php echo out($player_info['messages']); ?></p>\n\t</div>\n\t<?php\n\t}\n}", "function GetTransportInfo($InstanceID = 0)\n {\n //Define variables\n $service = 'SkyPlay';\n $action = \"GetTransportInfo\";\n $args = \"<InstanceID>\" . trim($InstanceID) . \"</InstanceID>\";\n\n return $this->processUPnP($action, $args, $service);\n }", "public function showPlayer($playerData){\n\n $html = '<div class=\"player-div\">'\n .'<p>' . $playerData[\"name\"] . '</p>'\n .'<p>' . $playerData[\"race\"] . '</p>'\n .'<p>' . $playerData[\"strength\"] . '</p>'\n .'<p>' . $playerData[\"dexterity\"] . '</p>'\n .'<p>' . $playerData[\"intelligence\"] . '</p>'\n .'<p>' . $playerData[\"wisdom\"] . '</p>'\n .'<p>' . $playerData[\"charisma\"] . '</p>'\n .'</div>';\n\n $this->output($html);\n\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Extracts the formatted header from the definition.
private function extractHeader(Suite $suite, Definition $definition) { $pattern = $definition->getPattern(); $lines = array(); $lines[] = strtr( '{suite} <def_dimmed>|</def_dimmed> <info>{type}</info> <def_regex>{regex}</def_regex>', array( '{suite}' => $suite->getName(), '{type}' => $this->getDefinitionType($definition), '{regex}' => $pattern, ) ); return $lines; }
[ "public function getHeader()\n {\n if (is_null($this->header)) {\n $this->header = new HeaderDefinition();\n }\n\n return $this->header;\n }", "function format_header()\n\t{\n\t\t$this->headers = str_replace(\"\\r\\n\", \"\\n\", $this->headers);\n\t\t// Cleanup multiline headers.\n\t\t$this->headers = preg_replace(\"!\\n(\\t| )+!\", ' ', $this->headers);\n\t\t$hdr = explode(\"\\n\", trim($this->headers));\n\t\t$this->headers = array();\n\t\tforeach ($hdr as $v) {\n\t\t\t$hk = substr($v, 0, ($p = strpos($v, ':')));\n\t\t\t// Skip non-valid header lines.\n\t\t\tif (!$hk || ++$p == strlen($v) || ($v{$p} != ' ' && $v{$p} != \"\\t\")) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$hv = substr($v, $p);\n\t\t\t$hk = strtolower(trim($hk));\n\n\t\t\tif (!isset($this->headers[$hk])) {\n\t\t\t\t$this->headers[$hk] = decode_header_value($hv);\n\t\t\t} else {\n\t\t\t\t$this->headers[$hk] .= ' '. decode_header_value($hv);\n\t\t\t}\n\t\t}\n\t}", "public function getHeader() {\n return $this->getFacet(\"header\");\n }", "public function getHeader(){\n\t\treturn $this->attributes['header'];\n\t}", "protected function _parseHeader() {}", "public function buildHeader();", "public function getHeader() {\n if (!isset($this->csvData)) {\n $this->parseCsvData();\n }\n return $this->header;\n }", "private function getHeader(): string\n {\n return $this->splitToken()[0] ?? '';\n }", "public function get_header() {\n $this->do_header();\n return $this->c_header;\n }", "public function get_header()\n\t{\n\t\treturn $this->header_title;\n\t}", "function get_header( $name = 'header' ) {\n return get_partial($name);\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 }", "public function GetHeader()\r\n\t{\r\n\t\treturn $this->pObjResponse->GetHeader();\r\n\t}", "private function getHeader() : object {\n return imap_rfc822_parse_headers($this->currentEmail);\n }", "protected function parseHeader()\n\t{\n\t\t//line 1 is version header\n\t\t$this->parseVersion(fgets($this->logFile));\n\t\t\n\t\t//line 2 is timezone header\n\t\t$this->parseTimezone(fgets($this->logFile));\n\t\t\n\t\t//line 3 is client header\n\t\t$this->parseClient(fgets($this->logFile));\n\t}", "public function getHeader()\n {\n return $this->readOneof(12);\n }", "function getSectionHeaderObject( $content ) {\n\t\treturn substr($content,12,4);\n\t}", "function parse_header($header_line) {\r\n\t\treturn explode(': ', $header_line,2);\r\n\t}", "protected function readHeader()\r\n {\r\n $header = new MessageHeader();\r\n $header->name = $this->readUtf();\r\n $header->mustUnderstand = $this->readBoolean();\r\n $this->skipBytes(4); // skip header length\r\n $header->data = $this->run();\r\n return $header;\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function call This function accepts the MBTI types of a USER and its CONNECTION and returns the relavant file names which represent the predefined relationships between the two MBTI types
function send_MBTI_relationship_file($user, $connection, $relationship_files,$DB,$type,$USERID) { # variable for the list of files to be returned $file_list=""; # if the MBTI type is more than 4 characters then the function returns no files if (strlen($user)==4) { if (strlen($connection)==4) { $user=chunk_split($user,1,""); $connection=chunk_split($connection,1,""); $prev=0; # checking for relationship files after comparing the USER and CONNECTION's MBTI types for ($i=0; $i<4; $i++) { $arr_key=$user[$i] . $connection[$i]; if (in_array($arr_key,$relationship_files)) { # adding the file names found to the file_list variable $file_list = $DB->getMBTIContent($arr_key,$type); while($row=mysql_fetch_row($file_list)) { $contents = nl2br($row[1]); $id = $row[0]; $order=$row[2]+$prev; echo "<div class=\"mbti_sent\" id=$id>"; echo $order.') '. $contents; echo "<div class=\"mbti_base\">"; $ref = getenv('HTTP_REFERER'); $url = (parse_url($ref)); $path = $url['path']; $query = $url['query']; $profileid = explode("=",$query); $profile_id = $profileid[1]; $res =$DB->ifuserliked($USERID,$id,$profile_id); if($res==1) { echo "<span class=\"mbti_unlike\">Liked</span>"; echo "<span class=\"mbti_comment\">Comment</span>"; } else { echo "<span class=\"mbti_like\">Like </span>"; echo "<span class=\"mbti_comment\">Comment</span>"; } echo "</div>"; echo getLikers($id,$profile_id,$DB,$USERID); echo '<div class="editor comments">'; echo getComments($id,$profile_id,$DB,$USERID); echo "</div>"; echo '<div class = "editor">'; /*echo "<textarea rows=\"2\" cols=\"10\" id=\"mbti_comm_post\" name=\"mbti_comm_post\" placeholder=\"Enter your comment...\"></textarea>"; echo "</div><div class=\"add_answer_div\"><a class=\"add_help_answer\" href=\"javascript:void();\">Post</a></div>";*/ echo "</div></div>"; } } $prev = $order; } } else { echo "Incorrect MBTI value of CONNECTION"; } } else { echo "Incorrect MBTI value of USER.\n"; } }
[ "function send_MBTI_relationship_file($user, $connection, $relationship_files)\n{\t# variable for the list of files to be returned\n\t$file_list=\"\";\t\n\t\n\t# if the MBTI type is more than 4 characters then the function returns no files\n\tif (strlen($user)==4)\n\t{\tif (strlen($connection)==4) \n\t\t{ \t\n\t\t\t$user=chunk_split($user,1,\"\");\n\t\t\t$connection=chunk_split($connection,1,\"\");\n\t\t\t\n\t\t\t# checking for relationship files after comparing the USER and CONNECTION's MBTI types\n\t\t\tfor ($i=0; $i<4; $i++) \n\t\t\t{\t$arr_key=$user[$i] . $connection[$i]; \n\t\t\t\tif (array_key_exists($arr_key,$relationship_files)) \n\t\t\t\t{\t# adding the file names found to the file_list variable\t\n\t\t\t\t\t$file_list= $file_list . $relationship_files[$arr_key] . \"|\" ;\n\n\t\t\t\t} \n\t\t\t} \t\t\t\t\t\t \n\t\t\t\t\techo $file_list;\t\t\t\t\t \n\t\t} \n\t\telse\n\t\t{\techo \"Incorrect MBTI value of CONNECTION\"; \n\t\t\treturn $file_list; \n\t\t} \n\t} \n\telse \n\t{\techo \"Incorrect MBTI value of USER.\\n\";\n\t\treturn $file_list; \n\t} \n\treturn $file_list; \n}", "function getTypeAndGroupFromUser(){\n\t$configFilePath = dirname(__FILE__).\"/userGroupsAndTypes.txt\";\n\t$lines = file($configFilePath);\n\t$userTypes[] = explode(\", \", rtrim($lines[0])); \n\t$userGroups[] = explode(\", \", rtrim($lines[1])); \n\treturn array($userTypes, $userGroups); \n}", "function getTypes($subtype=\"both\") {\n\t$types = array(\"users\" => array(),\n\t \"resources\" => array());\n\tif($subtype == \"users\" || $subtype == \"both\") {\n\t\t$query = \"SELECT id, name FROM userprivtype WHERE name NOT IN ('configAdmin', 'serverProfileAdmin')\";\n\t\t$qh = doQuery($query, 365);\n\t\twhile($row = mysqli_fetch_assoc($qh)) {\n\t\t\tif($row[\"name\"] == \"block\" || $row[\"name\"] == \"cascade\")\n\t\t\t\tcontinue;\n\t\t\t$types[\"users\"][$row[\"id\"]] = $row[\"name\"];\n\t\t}\n\t}\n\tif($subtype == \"resources\" || $subtype == \"both\") {\n\t\t$query = \"SELECT id, name FROM resourcetype\";\n\t\t$qh = doQuery($query, 366);\n\t\twhile($row = mysqli_fetch_assoc($qh))\n\t\t\t$types[\"resources\"][$row[\"id\"]] = $row[\"name\"];\n\t}\n\treturn $types;\n}", "public function userTypes() {}", "function get_all_file($user)\n {\n $sql = '';\n \n if(($user->permission &1)||$user->user_type_id == 2)\n {\n $sql = 'select * from file_master;'; \n }\n else\n {\n $sql = 'select * from file_master where (id in (select file_user.file_id from file_user where file_user.file_id = file_master.id and file_user.user_id = '.$user->id.'));'; \n }\n \n //$row = mysqli_fetch_assoc(parent::getPreparedStatement($sql, NULL));\n \n $row = parent::getPreparedStatement($sql, NULL);\n \n return $row;\n }", "public function attachmentObjTypes();", "public function getFileTypes();", "public function listUserTypes();", "public function fileTypes();", "public function getUserImages($user){\n //compare db result with file names in getAll\n }", "function get_all_image_ids_type($type,$recurse=false,$db=NULL,$theme=NULL,$dirs_only=false,$db_only=false)\n{\n\tif (is_null($db)) $db=$GLOBALS['SITE_DB'];\n\tif (is_null($theme)) $theme=$GLOBALS['FORUM_DRIVER']->get_theme();\n\n\tif ((substr($type,0,4)=='ocf_') && (file_exists(get_file_base().'/themes/default/images/avatars/index.html'))) // Allow debranding of theme img dirs\n\t{\n\t\t$type=substr($type,4);\n\t}\n\n\tif (substr($type,-1)=='/') $type=substr($type,0,strlen($type)-1);\n\n\t$ids=array();\n\n\tif ((!$db_only) && (($db->connection_write==$GLOBALS['SITE_DB']->connection_write) || ($dirs_only) || (get_db_forums()==get_db_site())))\n\t{\n\t\t_get_all_image_ids_type($ids,get_file_base().'/themes/default/images/'.(($type=='')?'':($type.'/')),$type,$recurse,$dirs_only);\n\t\t_get_all_image_ids_type($ids,get_file_base().'/themes/default/images/'.get_site_default_lang().'/'.(($type=='')?'':($type.'/')),$type,$recurse,$dirs_only);\n\t\tif ($theme!='default')\n\t\t{\n\t\t\t_get_all_image_ids_type($ids,get_custom_file_base().'/themes/'.$theme.'/images/'.(($type=='')?'':($type.'/')),$type,$recurse,$dirs_only);\n\t\t\t_get_all_image_ids_type($ids,get_custom_file_base().'/themes/'.$theme.'/images/'.get_site_default_lang().'/'.(($type=='')?'':($type.'/')),$type,$recurse,$dirs_only);\n\t\t}\n\t\t_get_all_image_ids_type($ids,get_file_base().'/themes/default/images_custom/'.(($type=='')?'':($type.'/')),$type,$recurse,$dirs_only);\n\t\t_get_all_image_ids_type($ids,get_file_base().'/themes/default/images_custom/'.get_site_default_lang().'/'.(($type=='')?'':($type.'/')),$type,$recurse,$dirs_only);\n\t\tif ($theme!='default')\n\t\t{\n\t\t\t_get_all_image_ids_type($ids,get_custom_file_base().'/themes/'.$theme.'/images_custom/'.(($type=='')?'':($type.'/')),$type,$recurse,$dirs_only);\n\t\t\t_get_all_image_ids_type($ids,get_custom_file_base().'/themes/'.$theme.'/images_custom/'.get_site_default_lang().'/'.(($type=='')?'':($type.'/')),$type,$recurse,$dirs_only);\n\t\t}\n\t}\n\n\tif (!$dirs_only)\n\t{\n\t\t$query='SELECT DISTINCT id,path FROM '.$db->get_table_prefix().'theme_images WHERE ';\n\t\tif (!$db_only)\n\t\t\t$query.='path NOT LIKE \\''.db_encode_like('themes/default/images/%').'\\' AND '.db_string_not_equal_to('path','themes/default/images/blank.gif').' AND ';\n\t\t$query.='('.db_string_equal_to('theme',$theme).' OR '.db_string_equal_to('theme','default').') AND id LIKE \\''.db_encode_like($type.'%').'\\' ORDER BY path';\n\t\t$rows=$db->query($query);\n\t\tforeach ($rows as $row)\n\t\t{\n\t\t\tif ($row['path']=='') continue;\n\n\t\t\tif ((url_is_local($row['path'])) && (!file_exists(((substr($row['path'],0,15)=='themes/default/')?get_file_base():get_custom_file_base()).'/'.rawurldecode($row['path'])))) continue;\n\t\t\tif ($row['path']!='themes/default/images/blank.gif') // We sometimes associate to blank.gif to essentially delete images so they can never be found again\n\t\t\t{\n\t\t\t\t$ids[]=$row['id'];\n\t\t\t} else\n\t\t\t{\n\t\t\t\t$key=array_search($row['id'],$ids);\n\t\t\t\tif (is_integer($key)) unset($ids[$key]);\n\t\t\t}\n\t\t}\n\t}\n\tsort($ids);\n\n\treturn array_unique($ids);\n}", "function connection_types() {\n\t\tforeach ( P2P_Connection_Type_Factory::get_all_instances() as $p2p_type => $ctype ) {\n\t\t\tWP_CLI::line( $p2p_type );\n\t\t}\n\t}", "function getTypes(){\n\t\t\t//opens up the types file\n\t\t\t$types_file_handle = new MarkUpFile('../Lib/fileTypes.txt'); \n\t\t\t$types_file_arrayList = $types_file_handle->Read();\n\t\t\t$types_file_handle->Close();\n\t\t\t//types is the array that holds all of the types\n\t\t\t$types = array();\n\t\t\t//loads all the types in to types\n\t\t\tforeach($types_file_arrayList as $single_type){\n\t\t\t\t$types = array_merge($types, array(new fileType($single_type[2], $single_type[1], $single_type[3])));\n\t\t\t}\n\t\t\treturn $types;\n\t\t}", "public function getUserType();", "public function busca($tipo){\n\n \t$q = new CMQuery('AMFile', 'AMLibraryFiles');\n\n \tswitch( $tipo ){\n case \"img\":\n \t$q->setFilter(\"(AMFile::codeFile = AMLibraryFiles::codeFile ) AND (AMFile::mimetype LIKE 'image/%') AND (AMLibraryFiles::codeLibrary = '$this->code') AND AMLibraryFiles::active='y'\");\n \tbreak;\n case \"docs\":\n \t$q->setFilter(\"(AMFile::codeFile = AMLibraryFiles::codeFile ) AND (AMFile::mimetype = 'application/msword' OR AMFile::mimetype LIKE 'text/%' OR AMFile::mimetype = 'application/vnd.sun.xml.writer' OR AMFile::mimetype = 'application/pdf') AND (AMLibraryFiles::codeLibrary = '$this->code') AND AMLibraryFiles::active='y'\");\n \tbreak;\n case \"video\":\n \t$q->setFilter(\"(AMFile::codeFile = AMLibraryFiles::codeFile ) AND (AMFile::mimetype LIKE 'video/%'OR AMFile::mimetype = 'application/x-shockwave-flash') AND (AMLibraryFiles::codeLibrary = '$this->code') AND AMLibraryFiles::active='y'\");\n \tbreak;\n case \"audio\":\n \t$q->setFilter(\"(AMFile::codeFile = AMLibraryFiles::codeFile ) AND (AMFile::mimetype LIKE 'audio/%') AND (AMLibraryFiles::codeLibrary = '$this->code') AND AMLibraryFiles::active='y'\");\n \tbreak;\n case \"outros\":\n \t$q->setFilter(\"(AMFile::codeFile = AMLibraryFiles::codeFile ) AND (AMFile::mimetype NOT LIKE 'audio/%' AND AMFile::mimetype NOT LIKE 'video/%' AND AMFile::mimetype != 'application/x-shockwave-flash' AND AMFile::mimetype NOT LIKE 'image/%' AND AMFile::mimetype != 'application/msword' AND AMFile::mimetype NOT LIKE 'text/%' AND AMFile::mimetype != 'application/vnd.sun.xml.writer' AND AMFile::mimetype != 'application/pdf') AND (AMLibraryFiles::codeLibrary = '$this->code') AND AMLibraryFiles::active='y'\");\n \tbreak;\n default:\n \tbreak;\n \t} //fecha switch\n \t$q->setOrder('AMFile::name');\n \t$res = $q->execute();\n \tif($res->__hasItems()){\n \t\treturn $res;\n \t}\n }", "function _getFileTypes()\n {\n return array(\n FT_S_DATA => \"Soubor k sekci\",\n FT_X_LECTUREDATA => \"Soubor přístupný po přihlášení do předmětu\",\n FT_A_IMAGE => \"Obrázek ke článku\",\n FT_A_DATA => \"Soubor ke článku\",\n FT_S_IMAGE => \"Obrázek k sekci\",\n );\n }", "function getUserTypes() {\n\t$usertypes = array ();\n\t$usertypes[\"Alumni\"] = \"Alumni\";\n\t$usertypes[\"Faculty\"] = \"Faculty\";\n\t$usertypes[\"Student\"] = \"Student\";\n\t$usertypes[\"WebTeam\"] = \"WebTeam\";\n\t$usertypes[\"Other\"] = \"Other\";\n\treturn $usertypes;\n}", "function auth_ldap_getbinaryfields () {\n global $CFG;\n $binaryfields = array (\n 'edir' => array('guid'),\n 'rfc2703' => array(),\n 'rfc2703bis' => array(),\n 'samba' => array(),\n 'ad' => array(),\n 'default' => '*'\n );\n if (!empty($CFG->ldap_user_type)) {\n return $binaryfields[$CFG->ldap_user_type]; \n } else {\n return $binaryfields['default'];\n } \n }", "public function retrieveAllTheIconMimeTypes(){\n \n $icon_mimetype = [];\n $icon_types = [];\n $criteria = new CDbCriteria();\n $criteria->select = '*';\n // $criteria->condition='id=:id';\n // $criteria->params = array(':id'=>$id);\n $icon_mime = PlatformSettings::model()->find($criteria); \n \n $icon_mimetype = explode(',',$icon_mime['icon_mime_type']);\n foreach($icon_mimetype as $icon){\n $icon_types[] =$icon; \n \n }\n \n return $icon_types;\n \n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
check if selector supports reportType
public function supportsReportType(ReportTypeInterface $reportType);
[ "public function isShowReportSelector() {\n $filterData = new Varien_Object();\n $requestData = $this->getRequestData();\n $report_radio_select = $requestData['report_radio_select'];\n return $this->helper('inventoryreports')->checkDisplay($report_radio_select);\n }", "public function getReportType();", "private function is_supported($type) {\n\t\treturn in_array($type, $this->supported);\n\t}", "public function getReportType()\n {\n if (isset($this->response)) {\n return $this->response['ReportType'];\n } else {\n return false;\n }\n }", "public function supports(string $type): bool;", "function ReportSelector() {\n\t\t$reports = ClassInfo::subclassesFor(\"SideReport\");\n\n\t\t$options[\"\"] = _t('CMSMain.CHOOSEREPORT',\"(Choose a report)\");\n\t\tforeach($reports as $report) {\n\t\t\tif($report != 'SideReport') $options[$report] = singleton($report)->title();\n\t\t}\n\t\treturn new DropdownField(\"ReportSelector\", _t('CMSMain.REPORT', 'Report'),$options);\n\t}", "public function getReportType() {\n\t$query1 = <<<SQL\n\tSELECT\n *\n\tFROM\n reports\nSQL;\n\treturn $this->DB->execute($query1);\n}", "public function isSelect() {\n return in_array($this->getType(), array(\n DBQueryType::SELECT,\n DBQueryType::DESCRIBE,\n DBQueryType::SHOW\n ));\n }", "public function test_get_report_types() {\n $reporttypes = objectfs_report::get_report_types();\n $this->assertEquals('array', gettype($reporttypes));\n $this->assertEquals(3, count($reporttypes));\n }", "public function allowExport()\n {\n $type = $this->getReportType();\n return in_array($type, self::$allowExportType);\n }", "function is_available() {\n //by default, make the report available,\n //override in child class if necessary to restrict\n return true;\n }", "public function exists($element, $selectortype) {\n return (array(new Given('\"'. $element. '\" \"'. $selectortype. '\" should exist')));\n }", "public static function isSelector($selector)\n {\n try {\n return !! (new CssSelectorConverter())->toXPath($selector);\n } catch (ParseException $e) {\n return false;\n }\n }", "public function getReportType()\n {\n return $this->reportType;\n }", "public function isReportAvailable()\n {\n if ($this->exists('report') && $this->isRuntimeReportEnabled()) {\n return true;\n }\n return false;\n }", "public function isSelect()\n {\n $repo = $this->repo; return $this->type == $repo::TYPE_SELECT;\n }", "public function isElementSelector()\n {\n return (!($this->isId) && !($this->isClass));\n }", "public function isSelectActionSupported()\n\t{\n\t\treturn $this->isActionSupported('select');\n\t}", "public function supports(string $driver): bool;" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Remove sticky GET which was set by stickyGet.
public function stickyForget(string $name) { unset($this->sticky_get_arguments[$name]); }
[ "function stickyForget($name){\n unset($this->sticky_get_arguments[$name]);\n }", "public function unsetGet($key)\r\n\t{\r\n\t\tif ($this->default)\r\n\t\t\tunset( $_GET[$key] );\r\n\t\telse \r\n\t\t\t{}\r\n\t}", "protected function remove_get_parameters() {\n\n\t\tif ( isset( $_SERVER['REQUEST_URI'] ) ) {\n\t\t\t$_SERVER['REQUEST_URI'] = remove_query_arg(\n\t\t\t\t[\n\t\t\t\t\t'_wp_http_referer',\n\t\t\t\t\t'_wpnonce',\n\t\t\t\t\t'wp-mail-smtp-delete-log-entries-nonce',\n\t\t\t\t],\n\t\t\t\t$_SERVER['REQUEST_URI'] // phpcs:ignore WordPress.Security.ValidatedSanitizedInput\n\t\t\t);\n\t\t}\n\t}", "protected function removeDefaultCtrlActionFromGlobalGet () {\n\t\tif ($this->requestGlobalGet) {\n\t\t\t$toolClass = $this->application->GetToolClass();\n\t\t\tlist($dfltCtrlPc, $dftlActionPc) = $this->application->GetDefaultControllerAndActionNames();\n\t\t\t$dfltCtrlDc = $toolClass::GetDashedFromPascalCase($dfltCtrlPc);\n\t\t\t$dftlActionDc = $toolClass::GetDashedFromPascalCase($dftlActionPc);\n\t\t\tif (isset($this->requestGlobalGet[static::URL_PARAM_CONTROLLER]) && isset($this->requestGlobalGet[static::URL_PARAM_ACTION]))\n\t\t\t\tif (\n\t\t\t\t\t$this->requestGlobalGet[static::URL_PARAM_CONTROLLER] == $dfltCtrlDc && \n\t\t\t\t\t$this->requestGlobalGet[static::URL_PARAM_ACTION] == $dftlActionDc\n\t\t\t\t)\n\t\t\t\t\tunset($this->requestGlobalGet[static::URL_PARAM_CONTROLLER], $this->requestGlobalGet[static::URL_PARAM_ACTION]);\n\t\t}\n\t}", "public function removeGetVar($var)\r\n {\r\n // remove variable\r\n $newGetStr = '';\r\n foreach ($_GET as $key => $value) {\r\n if ($key !== $var) {\r\n $newGetStr .= $key . '=' . $value . '&';\r\n }\r\n }\r\n // cut last &\r\n $newGetStr = substr($newGetStr, 0, -1);\r\n\r\n $arrRequestUri = explode('?', $this->getCacheSiteId());\r\n if (!$newGetStr) {\r\n return $arrRequestUri[0];\r\n } else {\r\n return $arrRequestUri[0] . '?' . $newGetStr;\r\n }\r\n }", "protected function remove_ajax_parameters(&$p_get)\n {\n unset($p_get[C__GET__AJAX_CALL], $p_get[C__GET__AJAX_REQUEST], $p_get[C__GET__AJAX]);\n\n return $p_get;\n }", "function remove_sticky_message() {\n\t\tdelete_transient( 'facebook_plugin_api_sticky' );\n\t}", "public function unstick_stickies( $query ) {\n\t\tif(is_admin()) return;\n\t\t$query->set( 'ignore_sticky_posts', true );\n\t\t$query->set( 'posts_per_page', 10 ); //limit return for now.\n\t}", "static public function _GET()\n\t\t{\n\t\t$get = $_GET;\n\t\tunset($get['q']);\n\t\treturn $get;\n\t\t}", "function _header_unset() {\n unset($this->_req);\n }", "function removeURLQuery($query){\n\t\tif(is_array($query)){\n\t\t\tforeach ($query as $v){\n\t\t\t\tremoveURLQuery($v);\n\t\t\t}\n\t\t}\n\t\t$get = $_GET;\n\t\tif(array_key_exists($query, $get)) {\n\t\t\tunset($get[$query]);\n\t\t} \n\t\treturn $get;\n\t}", "public function unsetGlobals()\n {\n unset($_GET);\n unset($_POST);\n }", "function elgg_clear_sticky_value($form_name, $variable) {\n\tunset($_SESSION['sticky_forms'][$form_name][$variable]);\n}", "public function removeTag()\n\t{\n\t\tif(isset($this->primarySearchData[$this->ref_tag]))\n\t\t{\n\t\t\tunset($this->primarySearchData[$this->ref_tag]);\n\t\t}\n\t}", "public function __unset($key);", "public function __unset ($key);", "function remove_query_by_get($get, $queries) {\n\t$final_queries = array();\n\tforeach ($queries as $key => $query) {\n\t\tif (empty($query['get']) || $query['get'] !== $get) {\n\t\t\t$final_queries[$key] = $query;\n\t\t}\n\t}\n\treturn $final_queries;\n}", "function myamp_deactivate() {\n\tglobal $wp_rewrite;\n\tforeach ( $wp_rewrite->endpoints as $index => $endpoint ) {\n\t\tif ( MYAMP_QUERY_VAR === $endpoint[1] ) {\n\t\t\tunset( $wp_rewrite->endpoints[ $index ] );\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tflush_rewrite_rules();\n}", "public function clearGetFields()\n {\n $this->get_fields = array();\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the value of idTecnico
public function getIdTecnico() { return $this->idTecnico; }
[ "public function getIdTecnico()\n {\n return $this->idTecnico;\n }", "public function getIdContato()\n {\n return $this->id_contato;\n }", "public function getIdVeiculo()\n {\n return $this->idVeiculo;\n }", "public function getIdContrato()\n {\n return $this->id_contrato;\n }", "public function getIdTalla()\n {\n return $this->id_talla;\n }", "public static function getTecnicoById($tecnicoId){\n\t\ttry {\n\n\t\t\t$connection = Database::instance();\n\n\t\t\t$sql = \"SELECT * FROM Usuarios WHERE id = ? AND role = 'tech' \";\n\n\t\t\t$query = $connection -> prepare($sql);\n\n\t\t\t$query -> bindParam(1, $tecnicoId, \\PDO::PARAM_INT);\n\n\t\t\t$query -> execute();\n\n\t\t\treturn $query -> fetch();\n\n\t\t} catch(\\PDOException $e) {\n\t\t\t/* print \"Error in models.Admin.User.php.getTecnicoById(): \" . $e->getMessage(); */\n\t\t\t$internalErrorCodigo = \"PDOException in models.Admin.User.getTecnicoById():\";\n\t\t\t$internalErrorMessage = $e -> getMessage();\n\t\t\t$internalErrorExtra = $tecnicoId;\n\n\t\t\t/**/\n\t\t\tTransaccion::insertTransaccionPDOException(\"Usuario_LogIn\",$internalErrorCodigo, $internalErrorMessage, $internalErrorExtra);\n\t\t\t\n\t\t\tView::set(\"internalErrorCodigo\", $internalErrorCodigo);\n\t\t\tView::set(\"internalErrorMessage\",$internalErrorMessage);\n\t\t\tView::set(\"internalErrorExtra\",\t $internalErrorExtra);\n\n\t\t\tView::render(\"internalError\");\n\t\t\tdie;\n\t\t}\n\t}", "public function getIdcuenta()\n {\n return $this->idcuenta;\n }", "public function getIdentifiantTva() {\n return $this->identifiantTva;\n }", "public function getIdTipo()\n {\n return $this->id_tipo;\n }", "public function getIdtipoUsuario(){\n return $this->idtipoUsuario;\n }", "public function getIdTipoacesso()\n {\n return $this->id_tipoacesso;\n }", "public function getIdServicoSelecionado(){\r\n\t\t$this->resultado = $this->db->query(\" select id from {$this->tabela} where id_catalogo = {$id_catalogo} AND id_servico = {$id_servico} \");\r\n\t\treturn $this->resultado;\r\n\t}", "public function idRetorno(){\r\n\t\treturn $this->retorno;\r\n\t}", "public function getContratoId()\n\t{\n\t\treturn $this->contrato_id;\n\t}", "public function getIdTipo()\n {\n return $this->idTipo;\n }", "public function getId_contrato() {\n return $this->id_contrato;\n }", "function get_idLegajo( ) {\n // returns the value of idLegajo\n return $this->idLegajo;\n }", "public function getIdTipoUsuario(){\n return $this->idTipoUsuario;\n }", "private function getCuestionarioId(){\n\t\treturn $this->cuestionario_id;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Edit a system role
public function editsystemroleAction(){ $form = new SystemRoleForm(); $this->view->form = $form; if ($this->_request->isPost()) { $formData = $this->_request->getPost(); if ($form->isValid($formData)) { $updateData = array( 'role' => $form->getValue('role'), 'description' => $form->getValue('description'), 'updated' => $this->getTimeForForms(), 'updatedBy' => $this->getIdentityForForms() ); $where = array(); $where[] = $this->getRoles()->getAdapter()->quoteInto('id = ?', $this->_getParam('id')); $this->getRoles()->update($updateData, $where); $this->getFlash()->addMessage($form->getValue('role') . '\'s details updated.'); $this->_redirect('/admin/systemroles/'); } else { $form->populate($formData); } } else { // find id is expected in $params['id'] $id = (int)$this->_request->getParam('id', 0); if ($id > 0) { $roles = $this->getRoles()->fetchRow('id=' . $id); $form->populate($roles->toArray()); } } }
[ "public function editRole()\n {\n\n $data = [\n \"role\" => $this->input->post('role', true)\n ];\n\n $this->db->where('id_role', $this->input->post('id_role'));\n $this->db->update('user_role', $data);\n }", "public function updateRole($role);", "function admin_role_put()\n { \n $admin_role = new Admin_role($this->put('role_id'));\n\n $admin_role->date_modified = date('Y-m-d H:i:s');\n $admin_role->modifiedbypk = $this->get_user()->user_id;\n\n $this->response($this->_admin_role_save($admin_role, 'put'));\n }", "public function changeRole()\n {\n //prevent CSRF\n if (!isset($_POST['token']) || !Token::check($_POST['token'], false))\n {\n echo json_encode([\"displayError\" => self::$language->invokeOutput('frequent/badRequest')]);\n }else{\n unset($_POST['token']);\n $change = usersAPI::getInstance()->changeRole($_POST);\n if (is_string($change) )\n echo json_encode([\"done\" => $change, 'reload' => true]);\n else\n {\n if (is_array($change))\n echo json_encode([\"displayError\" => $change[0]]);\n else\n echo json_encode([\"displayError\" => Controller::$language->invokeOutput('frequent/wrong')]);\n }\n }\n }", "public function update()\n {\n csrfCheck(); // helpers.php\n $id = intval($_REQUEST['id']);\n $name = test_name($_REQUEST['name']);\n $description = test_input($_REQUEST['description']);\n\n if ($name) {\n $params = array(\n 'id' => $id,\n 'name' => $name,\n 'description' => $description,\n );\n $role = Role::update($params);\n }\n header('Location: ' . SITE_URL . '/?controller=roles&action=index');\n die;\n }", "function edit(){\r\n\t\t$role_id=decodeId($this->uri->segment(4,null));\r\n\t\tif($role_id==null){\t\t\t\t\t\t\t\t\t// if Id is empty\r\n\t\t\tset_flash_message(ROLE_ID_EMPTY,'error');\r\n\t\t\tredirect(\"admincms/roles/\");\t\t\r\n\t\t}\r\n\t\tif(!$this->role->isRoleVerified($role_id)){ // if not Available Location\r\n\t\t\tset_flash_message(ROLE_VERIFICATION_FAILED,'error');\r\n\t\t\tredirect(\"admincms/roles/\");\r\n\t\t}\r\n\t\t$data['role']=$this->role->getRole($role_id);\r\n\t\t$this->load->view(\"admincms/role/edit\",$data);\r\n\t}", "public function editAction()\n {\n $roleId = $this->_getParam('roleId', null);\n\n if (is_null($roleId)) {\n throw new Ot_Exception_Input('msg-error-roleIdNotSet');\n }\n\n $role = new Ot_Model_DbTable_Role();\n\n $thisRole = $role->find($roleId);\n if (is_null($thisRole)) {\n throw new Ot_Exception_Data('msg-error-noRole');\n }\n\n if ($thisRole->editable != 1) {\n throw new Ot_Exception_Access('msg-error-unallowedRoleEdit');\n }\n\n $form = new Ot_Form_Role();\n $form->populate($thisRole->toArray());\n\n if ($this->_request->isPost()) {\n if ($form->isValid($_POST)) {\n\n $data = array(\n 'roleId' => $roleId,\n 'name' => $form->getValue('name'),\n 'inheritRoleId' => $form->getValue('inheritRoleId'),\n );\n\n $role->update($data, null);\n\n $logOptions = array(\n 'attributeName' => 'accessRole',\n 'attributeId' => $data['roleId'],\n );\n\n $this->_helper->log(Zend_Log::INFO, 'Role ' . $data['name'] . ' was modified', $logOptions);\n \n $this->_helper->messenger->addSuccess('Role was saved successfully');\n \n $this->_helper->redirector->gotoRoute(array('controller' => 'acl', 'action' => 'details', 'roleId' => $roleId), 'ot', true);\n } else {\n $this->_helper->messenger->addError('msg-error-invalidForm');\n }\n }\n\n $this->_helper->pageTitle(\"ot-acl-edit:title\");\n\n $this->view->assign(array(\n 'role' => $thisRole,\n 'form' => $form,\n ));\n }", "function setRole($role);", "function GetRoleEditAction()\n {\n return \"RoleEdit\";\n }", "function save() {\n\t\tglobal $wpdb;\n\n\t\tcheck_admin_referer( 'edit-role', '_wpnonce_edit-role' );\n\t\tif ($this->_validate()) {\n\t\t\t$wpdb->update( $this->table, $this->role, array('id'=>$this->role['id']) );\n\t\t\twp_redirect( $this->url );\n\t\t\tdie();\n\t\t} else {\n\t\t\t$_REQUEST['action'] = 'edit';\n\t\t}\n\t}", "public function renderEditRoleAction() {\n if (false === $this->isGranted('ROLE_ADMIN_CAN_EDIT_ROLE')) {\n throw new AccessDeniedException('user.role.no_right_to_view_page');\n }\n\n $view = $this->view()\n ->setTemplate('CoreUserBundle:AdminManageRole:editRole.html.twig')\n ->setFormat('html');\n return $this->handleView($view);\n }", "function assignRole($role);", "function setRole() {\n if(isset($_POST[\"set_role\"])) {\n if ($_SERVER[\"REQUEST_METHOD\"] == \"POST\") {\n $id = $_POST[\"set_role\"];\n $role = $_POST[\"role_for_user_\".$id];\n $sql = \"UPDATE users SET role=? WHERE user_id=?\";\n $stmt = $this->conn->prepare($sql);\n $stmt->execute([$role, $id]);\n }\n }\n }", "public function role(){\n\n\t\t$user = $this->container->user->find($_SESSION['user_id']);\n\t}", "public function edit_role(int $role_id, string $code, string $name, string $description): int {\r\n\t\t$this->clear_error();\r\n\t\tif(1 == $role_id) return -2; // Err : CAN'T edit the system-admin role, -)-\r\n\t\t$v_record = $this->field(['role_num'=>['COUNT(*)']])->table(['manager_roles'])->where(['id'=>$role_id, 'code'=>$code], ['neq', 'eq'])->one();\r\n\t\tif($this->get_error() == self::ERR_NONE){\r\n\t\t\tif($v_record['role_num'] > 0) return -2; // Err : x, -)-\r\n\t\t\t$role_datas = ['code'=>$code, 'name'=>$name, 'description'=>$description];\r\n\t\t\treturn $this->table(['manager_roles'])->where(['id'=>$role_id])->edit(merge_time($role_datas, false));\r\n\t\t}\r\n\t\treturn -1;\r\n\t}", "public function changeUserRole()\n {\n $data = $this->validate(['role_id' => ['bail', 'required', 'numeric']]);\n\n /** @var User */\n $user = User::find($this->userId);\n\n if ($user) {\n\n $user->update($data);\n\n $this->emit('hideChangeRoleModal');\n \n }\n \n }", "function bbp_profile_update_role($user_id = 0)\n{\n}", "public function changeRole()\n {\n $username = Hash::get($this->args, 0);\n $role = Hash::get($this->args, 1);\n if (empty($username)) {\n $this->abort(__d('cake_d_c/users', 'Please enter a username.'));\n }\n if (empty($role)) {\n $this->abort(__d('cake_d_c/users', 'Please enter a role.'));\n }\n $data = [\n 'role' => $role,\n ];\n $savedUser = $this->_updateUser($username, $data);\n $this->out(__d('cake_d_c/users', 'Role changed for user: {0}', $username));\n $this->out(__d('cake_d_c/users', 'New role: {0}', $savedUser->role));\n }", "public function testUpdate()\n {\n // User without permissions\n $route = route('access.role.update', [$id = $this->user->getRole()->getId()]);\n $this->assertRejectsUnauthorizedAccessToRoute($route, 'put');\n\n // User with permissions. Incomplete data\n $user = $this->createUser(['permissions' => ['use-access-module', 'role-update']]);\n $referer = route('access.role.edit', [$id]);\n $response = $this->actingAs($user)->from($referer)->put($route);\n $response->assertRedirect($referer);\n $response->assertSessionHasErrors();\n\n // User with permissions. Complete data\n $permission = $this->createPermission();\n $data = factory(Role::class)->raw([\n 'permissions' => [$permission->getName()],\n ]);\n $response = $this->put($route, $data);\n $response->assertRedirect(route('access.role.show', [$id]));\n $response->assertSessionHasNoErrors();\n $response->assertSessionHas('success');\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the hash length (in bytes)
public function getLength() { return $this->hash->getLengthInBytes(); }
[ "public function hashLength(): int;", "public function getHashSize(): int\r\n {\r\n return $this->hSize;\r\n }", "public function getHashAlgorithmSize();", "public function getDigestSize();", "public function getHashCount()\n {\n return $this->hash_count;\n }", "public function getHashKeyLen()\n {\n return 1;\n }", "public function hashCount() : int;", "public function size() {\n return sizeof(array_keys($this->_hash));\n }", "function mhash_get_block_size($hash) {}", "function mhash_get_block_size ($hash) {}", "public function getHashKeyLen()\n {\n return $this->getMinKeyLen();\n }", "public function getSaltLength() {}", "public function getMaxHashCount() {}", "protected function getHashLength($withprefix = false){\n\t\t// per ora disattivato prché allungo un po' i tempi, imposto fisso a 60 la lunghezza\n\t\t//$test = password_hash(\"qwertyasdfghzxcvbn123456\", PASSWORD_BCRYPT, array('cost'=>$this->hash_cost));\n\t\t//return ($withprefix) ? strlen($test) : strlen($test)-7;\n\t\t$forced_length = 60;\n\t\treturn ($withprefix) ? $forced_length : $forced_length-7;\n\t}", "private function getHmacSize() {\n\t// Make a dummy hash and figure out how big it is.\n\t// Note: there's a different way to do this, but I'm doing\n\t// this way so when the config changes the system can\n\t// dynamically adjust.\n\treturn strlen($this->getHmac(\"X\", $this->getHash(\"Y\")));\n }", "function getSaltLength() ;", "public function length(): int\n {\n return strlen($this->binary);\n }", "public function getLengthInBytes(): int\n {\n return strlen($this->toBytes());\n }", "static public function getHashSize($algorithm, $raw = false)\n {\n return strlen(hash($algorithm, 'drilld', $raw));\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the default properties for form fields.
public function getFormDefaultProp() { return $this->default_form_prop; }
[ "public function get_form_defaults();", "public static function get_default_fields_definition() {\n return static::$requiredfields + static::$optionalfields + static::$enginefields;\n }", "public function getFieldDefaults()\n {\n $defaults = array();\n $defaults['field'] = false; // Field name\n $defaults['label'] = false; // Field label\n $defaults['description'] = false; // Field description\n // Display options\n $defaults['show_in_form'] = true; // Display in form?\n $defaults['show_in_grid'] = true; // Display in grid?\n // Foreign key\n $defaults['foreign_key_relationship_type'] = 0; // FormBuilder::FOREIGN_KEY_ONE_TO_MANY;\n $defaults['foreign_key_table'] = false;\n $defaults['foreign_key_field'] = 'id';\n $defaults['foreign_key_label_field'] = 'id';\n $defaults['foreign_key_accept_null'] = false;\n $defaults['foreign_key_where_conditions'] = false; // TODO This is only implemented in FormBuilder, needs to be implemented in filters as well\n\n $defaults['foreign_key_junction_table'] = false;\n $defaults['foreign_key_junction_id_field_left'] = false;\n $defaults['foreign_key_junction_id_field_right'] = false;\n $defaults['foreign_key_junction_where_conditions'] = false;\n\n //\n // Input specific\n //\n $defaults['input_type'] = 0; //FormBuilder::TEXTFIELD;\t// Input type, see FormBuilder constants\n $defaults['input_default_value'] = false; // Default value for field\n $defaults['values'] = false; // Values for to select among them, must be an associative array\n $defaults['validation_rules'] = 'required'; // Validation rules\n $defaults['input_is_editable'] = true;\n $defaults['input_group'] = false;\n $defaults['input_css_class'] = false;\n $defaults['options'] = array();\n\n // File upload\n $defaults['upload_complete_callback'] = false;\n $defaults['upload_path'] = ''; //$this->default_uploads_path;\n $defaults['upload_display_path'] = ''; //$this->default_upload_display_path;\n $defaults['upload_allowed_types'] = '*';\n $defaults['upload_encrypt_name'] = false;\n\n //\n // Grid specific\n //\n $defaults['grid_formating_callback'] = false;\n $defaults['grid_is_orderable'] = true;\n $defaults['grid_css_class'] = false;\n $defaults['filter_type'] = false;\n $defaults['filter_values'] = false; // It is not always the same for values\n $defaults['filter_condition'] = 'like';\n\n //\n // Excel cell format column\n //\n $defaults['excel_cell_format'] = false;\n $defaults['excel_header_format'] = false;\n\n // Autocomplete\n $defaults['autocomplete_source'] = '';\n\n return $defaults;\n }", "abstract protected function get_default_fields();", "protected function getDefaultFields()\n {\n return array();\n }", "public function getFieldsThatHaveDefaults();", "protected function get_initial_form_values()\n {\n // Create a new empty object, which will story each of the form's defaults.\n $data = new stdClass();\n\n // And specify the base defaults: every field is empty, and the user's message format is the same as their preferred mail format.\n $data->id = null;\n $data->subject = '';\n $data->message = '';\n $data->mailto = '';\n $data->format = $this->user->mailformat;\n\n // Create copies of the following two fields in the format that Moodle expects.\n $data->messagetext = $data->message;\n $data->messageformat = $data->format;\n\n // Return the newly created defaults.\n return $data;\n }", "function get_default_properties()\r\n {\r\n return $this->defaultProperties;\r\n }", "public function getFormProperties() {\r\n\t\treturn $this->_properties;\r\n\t}", "protected function getDefaultFields()\n {\n return [\n 'id',\n 'name',\n 'description',\n 'price',\n 'image',\n 'url',\n 'categories',\n 'brand',\n 'sku',\n 'on_sale',\n 'is_in_stock',\n 'stock_amount'\n ];\n }", "function getFormProps()\n {\n return $this->formProps;\n }", "protected function defaults() {\n\t\t\t$defaults = array(\n\t\t\t\t'horizontal' => false,\n\t\t\t\t'id' => false, # Unique Database ID For Each And Every Field\n\t\t\t\t'type' => false, # Type of the field,\n\t\t\t\t'title' => false, # Title For Each Field,\n\t\t\t\t'desc' => false, # Field Description to print after title,\n\t\t\t\t'desc_field' => false, # Field description to print after field output.\n\t\t\t\t'help' => false, # Used for field tooltip\n\t\t\t\t'class' => false, # Extra Element Class,\n\t\t\t\t'style' => false,\n\t\t\t\t'wrap_class' => null, # custom class for the field wrapper,\n\t\t\t\t'wrap_attributes' => array(),\n\t\t\t\t'placeholder' => false,\n\t\t\t\t'default' => null, # Stores Default Value,\n\t\t\t\t'dependency' => array(), # dependency for showing and hiding fields\n\t\t\t\t'attributes' => array(), # attributes of field. supporting only html standard attributes\n\t\t\t\t'sanitize' => null, #sanitize of field. can be enabled or disabled\n\t\t\t\t'validate' => null, #validate of field. can be enabled or disabled\n\t\t\t\t'before' => null,\n\t\t\t\t'after' => null,\n\t\t\t\t'only_field' => false,\n\t\t\t\t'name' => false,\n\t\t\t\t'clone' => false,\n\t\t\t\t'clone_settings' => array(),\n\t\t\t\t'debug' => wponion_field_debug(),\n\t\t\t);\n\t\t\treturn $this->parse_args( $this->field_default(), $defaults );\n\t\t}", "public function get_field_properties() {\n return array(PARAM_TEXT, NULL_NOT_ALLOWED);\n }", "public function get_default_properties()\n {\n return $this->defaultProperties;\n }", "function getFormDefaults(){\n $f['text']['class']='col-md-8';\n $f['textarea']['class']='col-md-8';\n $f['choice']['class']='col-md-8';\n\n\t //TODO: Make plusIcon CSS\n $f['behaviors']='load start:hidden,reveal:only on click->plusIcon';\n return $f;\n }", "public function getDefaultFields(){\n return $this->dbFields;\n }", "public static function formInputPropertyMapping()\n\t{\n\t\treturn [\n\t\t\t'username' => 'username',\n\t\t\t'firstName' => 'firstName',\n\t\t\t'middleName' => 'middleName',\n\t\t\t'lastName' => 'lastName',\n\t\t\t'email' => 'email',\n\t\t\t'phone' => 'phone',\n\t\t];\n\t}", "public static function add_standard_properties() {\n\n\t\t// Set properties.\n\t\tself::$field->id = rgar( self::$nf_field, 'id' );\n\t\tself::$field->label = rgar( self::$nf_field, 'label' );\n\t\tself::$field->adminLabel = rgar( self::$nf_field, 'admin_label' );\n\t\tself::$field->isRequired = rgar( self::$nf_field, 'req' );\n\t\tself::$field->cssClass = rgar( self::$nf_field, 'class' );\n\t\tself::$field->defaultValue = rgar( self::$nf_field, 'default_value_type' ) === '_custom' || rgar( self::$nf_field, 'default_value_type' ) === '' ? rgar( self::$nf_field, 'default_value' ) : null;\n\n\t}", "public function getDefaultProperties(){}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set PolicySummaryOc value This property is removable from request (nillable=true+minOccurs=0), therefore if the value assigned to this property is null, it is removed from this object
public function setPolicySummaryOc(\Mu4ddi3\Compensa\Webservice\StructType\PolicySummary $policySummaryOc = null) { if (is_null($policySummaryOc) || (is_array($policySummaryOc) && empty($policySummaryOc))) { unset($this->PolicySummaryOc); } else { $this->PolicySummaryOc = $policySummaryOc; } return $this; }
[ "public function getRenewalPolicySummaryOc()\n {\n return isset($this->RenewalPolicySummaryOc) ? $this->RenewalPolicySummaryOc : null;\n }", "public function getPolicySummaryOcCorrection()\n {\n return isset($this->PolicySummaryOcCorrection) ? $this->PolicySummaryOcCorrection : null;\n }", "public function setSummary($summary)\r\n {\r\n if (!empty($summary)) {\r\n $this->_summary = strip_tags($summary);\r\n }\r\n }", "public function setSummaryString($summaryString) {}", "public function setOwnerPaymentSummary($ops)\n {\n $this->ownerpaymentsummary = OwnerPaymentSummary::factory($ops);\n\n return $this;\n }", "public function setSummary($summary)\n {\n $this->summary = $summary;\n }", "public function setSummary($summary)\n {\n $this->summary = $summary;\n $this->setUpdated();\n }", "public function setSummary($var)\n {\n GPBUtil::checkString($var, True);\n $this->summary = $var;\n\n return $this;\n }", "public function setSummary($summary): void\n {\n $this->summary = $summary;\n }", "public function setDeploymentSummary(?ManagedAppPolicyDeploymentSummary $value): void {\n $this->getBackingStore()->set('deploymentSummary', $value);\n }", "public function setRenewalPolicySummaryAc(\\Mu4ddi3\\Compensa\\Webservice\\StructType\\PolicySummary $renewalPolicySummaryAc = null)\n {\n if (is_null($renewalPolicySummaryAc) || (is_array($renewalPolicySummaryAc) && empty($renewalPolicySummaryAc))) {\n unset($this->RenewalPolicySummaryAc);\n } else {\n $this->RenewalPolicySummaryAc = $renewalPolicySummaryAc;\n }\n return $this;\n }", "public function setSummary( string $summary=NULL ) : Property\n {\n $summary = trim( $summary );\n \n $this->checkMetadataSet();\n \n if( $this->metadata_set->getSummaryFieldRequired() && $summary == '' )\n {\n throw new e\\RequiredFieldException(\n S_SPAN . \"The summary field is required.\" . E_SPAN );\n }\n\n $this->summary = $summary;\n return $this;\n }", "public function getPolicySummary()\n {\n return isset($this->policy_summary) ? $this->policy_summary : null;\n }", "public function setSummary(ChildSummary $v = null)\n {\n if ($v === null) {\n $this->setId(NULL);\n } else {\n $this->setId($v->getId());\n }\n\n $this->aSummary = $v;\n\n // Add binding for other direction of this 1:1 relationship.\n if ($v !== null) {\n $v->setContentArea($this);\n }\n\n\n return $this;\n }", "public function setMalwareCategorySummary($val)\n {\n $this->_propDict[\"malwareCategorySummary\"] = $val;\n return $this;\n }", "protected function validateSummary()\n {\n $this->validator->sometimes(['summary_en', 'summary_fr'], 'required', function () {\n return ! empty($this->operationalDetails->summary_content);\n });\n }", "private function setSummary($summary)\n {\n $this->_vevent->setAttribute('SUMMARY', $summary);\n }", "public function setSummary(string $summary): void\n {\n $this->summary = $summary;\n }", "public function getOppoSummary()\r\n {\r\n return $this->get(self::_OPPO_SUMMARY);\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Find data by excluding multiple values in one field
public function findWhereNotIn($field, array $values, $columns = ['*']);
[ "public function where_not_in($field, $val=array());", "public function findWhereNotIn($field, array $values, array $columns = ['*']);", "public function orWhereNotIn(string $fieldName, array $list): self;", "public function findWhereNotIn($attribute, $values, $columns = ['*'], $with = []);", "public function findWhereNotIn( $field, array $values, $columns = array('*'));", "function srminer_filter_ne($fields) {\n return \"(\" . implode(\" ne \", $fields) . \")\";\n}", "public function testMultipleExcludeMultipleMatches()\n {\n $list = TeamComment::get();\n $list = $list->exclude(['Name'=>'Bob', 'Comment'=>'Phil is a unique guy, and comments on team2']);\n $this->assertCount(3, $list);\n }", "public function whereNotContainedIn($field, $array) {\n\t$this->parseQuery->whereNotContainedIn($field, $array);\n }", "public function whereNotContainedIn($field, $array) {\r\n\t$this->parseQuery->whereNotContainedIn($field, $array);\r\n }", "public function whereNotIn(string $fieldName, array $list, string $logicalOperator = 'and'): self;", "public function exclude()\n {\n return $this->list->exclude(...func_get_args());\n }", "function getExclusion()\n{\n // return array(); // default\n return array(7,20,32,33,34,23,41,42,43,31,65,66,67,22,38,39,40);\n}", "function handle_not_contains(&$cce, $props, $criteria, $vsites, $stype, $sfield)\n{\n\tfor ($i = 0; $i < count($props); $i++) {\n\t\tunset($criteria['regex'][$props[$i]]);\n\t}\n\n\t$other_vsites = $cce->findx('Vsite', $criteria['exact'],\n\t\t\t\t $criteria['regex'], $stype, $sfield);\n\n\t/*\n\t * for each oid that matched the criteria for contains for the fields\n\t * in $props, build up the list of oids that should get displayed\n\t */\n\t$ret_vsites = array();\n\tforeach ($other_vsites as $oid) {\n\t\t// need to get the key of the oid, to remove it from the array\n\t\t$foo = array_search($oid, $vsites);\n\t\t\n\t\tif (!$foo && $foo !== 0) {\n\t\t\t$ret_vsites[] = $oid;\n\t\t}\n\t}\n\n\treturn $ret_vsites;\n}", "public function getExcludedIds();", "function queryFilterNot_Contains(&$layout_def)\n {\n $matches = explode(',', $layout_def['input_name0']);\n $q = \"\";\n foreach ($matches as $match) {\n // Make the match field the lowercase version of the field. This feels\n // a little dirty but I bet Mike Rowe would approve\n $match = strtolower(trim($match));\n $q .= \" \" . $this->getLowercaseColumnSelect($layout_def) . \" NOT LIKE '%\" .$GLOBALS['db']->quote($match).\"%' AND\";\n }\n\n return rtrim($q, \" AND\");\n }", "public function notContains($list)\n\t\t{\n\t\t\t\n\t\t\t$value = trim(strtolower($this->value));\n \t$list = explode(\",\",trim(strtolower($list)));\n\t\t\t\n\t\t\t$found = false;\n\t\t\tforeach($list as $item)\n\t\t\t{\t\t\t\t\n\t\t\t\tif(strpos($value,trim($item)) !== false)\n\t\t\t\t{\n\t\t\t\t\t$found = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n \n if($found)\n\t\t\t{\n\t\t\t\t$this->errorMessage(\"Contains not allowed values\",__FUNCTION__);\n }\n\t\t\t\n return $this;\n \n }", "public function whereNotEqualTo($field, $value) {\r\n\t$this->parseQuery->whereNotEqualTo($field, $value);\r\n }", "public function provideExcludeAny()\n {\n // so we can just use the same scenarios and reverse the expected results.\n $scenarios = $this->provideFilterAny();\n foreach ($scenarios as $name => $scenario) {\n $kept = [];\n $excluded = [];\n /** @var array $item */\n foreach ($scenario['contains'] as $item) {\n $kept[] = $item['ID'];\n }\n /** @var ArrayData $item */\n foreach ($scenario['list'] as $item) {\n $itemAsArray = $item->toMap();\n if (!in_array($itemAsArray['ID'], $kept)) {\n $excluded[] = $itemAsArray;\n }\n }\n $scenarios[$name]['contains'] = $excluded;\n }\n return $scenarios;\n }", "public function ignoreCriteria($ignore = true);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the correct view port typ from session or from url parameter If returns true for desktop view and false for mobile view.
public function isDesktopViewPort() { $bDesktopViewPort = $this->inputFilterUtil->getFilteredInput('showDesktopMode', null, false, TCMSUserInput::FILTER_URL_INTERNAL); $request = $this->requestStack->getCurrentRequest(); if (false === $request->hasSession()) { return false; } $oSession = $request->getSession(); if (null !== $bDesktopViewPort) { $bDesktopViewPort = '1' === $bDesktopViewPort; $oSession->set('bDesktopViewPort', $bDesktopViewPort); } elseif (true === $oSession->has('bDesktopViewPort')) { $bDesktopViewPort = $oSession->get('bDesktopViewPort'); } else { $oSession->set('bDesktopViewPort', false); $bDesktopViewPort = false; } return $bDesktopViewPort; }
[ "protected static function get_mode()\n\t{\n\t\t$value = request_var(self::$mobile_var, '');\n\t\tswitch ($value)\n\t\t{\n\t\t\tcase 'reset':\n\t\t\t\t// Reset to default mode\n\t\t\t\tself::set_cookie('', false);\n\t\t\t\treturn false;\n\n\t\t\tcase 'on': \n\t\t\t\t// Mobile device detected by JavaScript\n\t\t\t\t$value = 'mobile';\n\t\t\t\tself::set_cookie($value, false);\n\t\t\t\treturn $value;\n\n\t\t\tcase 'off':\n\t\t\t\t// Desktop detected by JavaScript\n\t\t\t\t$value = 'desktop';\n\t\t\t\tself::set_cookie($value, false);\n\t\t\t\treturn $value;\n\n\t\t\tcase '404': // Mobile style detected, but not found\n\t\t\tcase 'desktop': // Force desktop style\n\t\t\tcase 'mobile': // Force mobile style\n\t\t\t\tself::set_cookie($value, $value != '404');\n\t\t\t\treturn $value;\n\t\t}\n\t\t\n\t\tif (isset($_COOKIE[self::$cookie_var]))\n\t\t{\n\t\t\tswitch ($_COOKIE[self::$cookie_var])\n\t\t\t{\n\t\t\t\tcase 'mobile': // Force mobile style\n\t\t\t\tcase 'desktop': // Force desktop style\n\t\t\t\t\t$value = $_COOKIE[self::$cookie_var];\n\t\t\t\t\treturn $value;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tself::set_cookie('');\n\t\t}\n\n\t\treturn false;\n\t}", "public function detectDevice()\n {\n // Already set\n if ($this->deviceView) {\n return;\n }\n\n // Allow user to override\n if($device = $this->request->get('dv')) {\n if ($this->validDevice($device)) {\n $this->session->put('device-view', $device);\n }\n }\n\n // Get params\n $device = $this->session->get('device-view');\n\n if (! $device)\n {\n // Get device\n $detect = new Mobile_Detect;\n $device = $detect->isTablet() ? 'tablet' : ($detect->isMobile() ? 'mobile' : $this->defaultView);\n\n // Validate device\n $device = $this->validDevice($device) ? $this->devices[$device] : $this->defaultView;\n }\n\n // Set view\n $this->setDeviceView($device);\n }", "function getPortFromURL($url){\n\t$port = getComponentFromURL($url, \"port\");\n\tif($port !== false){\n\t\treturn $port;\n\t}\n\n\t//port is not found in URL so lets return the default port 80 for http and 443 for https\n\t$scheme = getComponentFromURL($url, \"scheme\");\n\tif($scheme == \"http\"){\n\t\treturn \"80\";\n\t}\n\telse if($scheme == \"https\"){\n\t\treturn \"443\";\n\t}\n\n\t_log(\"getPortFromURL: unsupported URL scheme\");\n\treturn false;\n}", "private function determineView($url){\n\t\t\n\t\t$view = false;\n\t\t$view_section = false;\n\t\t$url_parts = explode('/', $url);\n\t\t\n\t\t//TODO: Here should come the part, where the url sheme should be analized according to the system configuration\n\t\tif($url_parts[0] == \"admin\"){\n\t\t\t$view = \"Admin_Index\";\n\t\t} else {\n\t\t\t$view = \"Frontend_Content\";\n\t\t}\n\t\t\n\t\t$_GET['BD']['core']['view']['name'] = $this->view;\n\t\t$_GET['BD']['core']['url'] = $url;\n\t\t$_GET['BD']['core']['path'] = $url;\n\t\t\n\t\treturn $view;\n\t}", "public function isMobileOrTablet();", "public function urlsession() {\n\t\treturn $_COOKIE[$this->sidname()] ? 0 : 1;\n\t}", "public function getUseSessionInUrl()\n {\n if ($this->_useSessionInUrl === null) {\n //Using config value by default, can be overridden by using the\n //setter.\n $this->_useSessionInUrl = (bool)$this->scopeConfig->getValue(\n self::XML_PATH_USE_FRONTEND_SID,\n $this->_scopeType\n );\n }\n\n return $this->_useSessionInUrl;\n }", "public static function viewPort(array $viewPort=NULL){\n if (!is_null($viewPort)){\n $out='';\n $out.=(empty($viewPort[self::WIDTH]))?'':self::WIDTH.'='.$viewPort[self::WIDTH].', ';\n $out.=(empty($viewPort[self::HEIGHT]))?'':self::HEIGHT.'='.$viewPort[self::HEIGHT].', ';\n $out.=($viewPort[\"userScalable\"]==\"YES\" || $viewPort[\"userScalable\"]==\"NO\")?'user-scalable='.$viewPort[\"userScalable\"].', ':'';\n $out.=($viewPort[\"initialScale\"]!=0)?'initial-scale='.$viewPort[\"initialScale\"].', ':'';\n $out.=($viewPort[\"maximumScale\"]!=0)?'maximum-scale='.$viewPort[\"maximumScale\"].', ':'';\n $out.=($viewPort[\"minimunScale\"]!=0)?'minimum-scale='.$viewPort[\"minimumScale\"].'':'';\n $out=rtrim($out,', ');\n \n return HtmlTags::meta('viewport',$out,'name').PHP_EOL;\n }\n \n }", "function request_user_agent_matches_session() {\n \n // return false if either value is not set\n if (!isset($_SESSION['user_agent']) || null !== hServerParameter('HTTP_USER_AGENT')) {\n return false;\n }\n if ($_SESSION['user_agent'] === hServerParameter('HTTP_USER_AGENT')) {\n return true;\n } else {\n return false;\n }\n}", "public function isMobileMode()\r\n {\r\n// return Engine_Api::_()->sitemobile()->isSiteMobileModeEnabled(); // This may cause exception if Mobile Plugin is not installed\r\n $session = new Zend_Session_Namespace('siteViewModeSM');\r\n return (isset($session->siteViewModeSM) && in_array($session->siteViewModeSM, array(\"mobile\", \"tablet\")));\r\n }", "function sf_is_pmview()\n{\n\tglobal $sfvars;\n\n\tsf_initialise_globals();\n\treturn $sfvars['pageview'] == 'pm';\n}", "public function getCurrentBrowseView()\n {\n $session = geoSession::getInstance();\n\n $browse_view = $this->db->get_site_setting('default_browse_view');\n $browse_view = ($browse_view) ? $browse_view : 'grid';\n\n $valid_views = array ('grid','list','gallery');\n\n $browse_view = $session->get('browse_view', $browse_view);\n\n if (isset($_GET['browse_view']) && in_array($_GET['browse_view'], $valid_views)) {\n $browse_view = $_GET['browse_view'];\n //remember it for this session...\n $session->set('browse_view', $browse_view);\n }\n\n //one final check, make sure browse view is one of the enabled types\n $browse_view = (in_array($browse_view, $valid_views)) ? $browse_view : 'grid';\n return $browse_view;\n }", "static function mode() {\n $queryAdmin = isset($_GET['access']) ? $_GET['access'] : 2;\n $sessionAdmin = isset($_SESSION['access']) ? $_SESSION['access'] : 3;\n return ($sessionAdmin == $queryAdmin);\n }", "public function isTablet();", "public function getView()\n {\n $view = $this->view;\n if (isset($_GET['view'])) {\n if ($_GET['view'] == 'expanded') {\n $view = 'expanded';\n }\n if ($_GET['view'] == 'list') {\n $view = 'list';\n }\n } else if (isset($_SESSION['view'])) {\n $view = $_SESSION['view'];\n }\n\n return $view;\n }", "public function theSizeIsMobilePortrait()\n {\n $this->getSession()->resizeWindow(320, 900, 'current');\n }", "function Get_Mode($url)\n\t{\n\t\t\n\t\tif (preg_match('/\\.ds(\\d+)\\.tss/', $url))\n\t\t{\n\t\t\t$mode = MODE_LOCAL;\n\t\t}\n\t\telseif (preg_match('/^rc\\./', $url))\n\t\t{\n\t\t\t$mode = MODE_RC;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$mode = MODE_LIVE;\n\t\t}\n\t\t\n\t\treturn($mode);\n\t\t\n\t}", "public static function portNumber(){\n\t\tif(self::sslOn()){return 443;}\n\t\treturn getenv(\"GATEWAY_PORT\")?getenv(\"GATEWAY_PORT\"):3000;\n\t}", "function request_user_agent_matches_session() {\n\t// return false if either value is not set\n\tif(!isset($_SESSION['user_agent']) || !isset($_SERVER['HTTP_USER_AGENT'])) {\n\t\treturn false;\n\t}\n\tif($_SESSION['user_agent'] === $_SERVER['HTTP_USER_AGENT']) {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieve the FormLabel helper
protected function getLabelHelper() { if ($this->labelHelper) return $this->labelHelper; if (method_exists($this->view, 'plugin')) $this->labelHelper = $this->view->plugin('form_label'); if (!($this->labelHelper instanceof \Zend\Form\View\Helper\FormLabel)) $this->labelHelper = new \Zend\Form\View\Helper\FormLabel(); if ($this->hasTranslator()) $this->labelHelper->setTranslator($this->getTranslator(), $this->getTranslatorTextDomain()); return $this->labelHelper; }
[ "protected function getLabelHelper()\n {\n if ( $this->labelHelper )\n {\n return $this->labelHelper;\n }\n\n if ( method_exists( $this->view, 'plugin' ) )\n {\n $this->labelHelper = $this->view->plugin( 'form_label' );\n }\n\n if ( ! $this->labelHelper instanceof FormLabel )\n {\n $this->labelHelper = new FormLabel();\n }\n\n if ( $this->hasTranslator() )\n {\n $this->labelHelper\n ->setTranslator(\n $this->getTranslator(),\n $this->getTranslatorTextDomain()\n );\n }\n\n return $this->labelHelper;\n }", "protected function getLabelHelper() {\n if ($this->labelHelper) {\n return $this->labelHelper;\n }\n if (method_exists($this->view, 'plugin')) {\n $this->labelHelper = $this->view->plugin('form_label');\n }\n if (!($this->labelHelper instanceof \\Zend\\Form\\View\\Helper\\FormLabel)) {\n $this->labelHelper = new \\Zend\\Form\\View\\Helper\\FormLabel();\n }\n if ($this->hasTranslator()) {\n $this->labelHelper->setTranslator($this->getTranslator(), $this->getTranslatorTextDomain());\n }\n return $this->labelHelper;\n }", "public function getFormLabel()\n {\n return '#'.$this->id .' - '.$this->name;\n }", "private function label()\n {\n if ($this->type === 'hidden') {\n $this->label = false;\n return;\n }\n\n $label = Arr::get($this->options, 'label', null);\n\n // nothing passed\n if (is_null($label) || $label === true) {\n $label = Str::of($this->name);\n\n // remove _id from the end\n if ($label->endsWith('_id')) {\n $label = $label->substr(0, -3);\n }\n\n $label = $label->replace(['_', '[', ']', '.'], ' ');\n\n $this->label = trim(ucwords((string) $label));\n } else {\n $this->label = $label;\n }\n\n if (!empty($this->label) && Arr::get($this->options, 'required')) {\n $this->label .= config('form.required.helper');\n }\n }", "protected function getHelperControlLabel(): FormControlLabel\n {\n if ($this->helperControlLabel) {\n return $this->helperControlLabel;\n }\n\n if (!$this->helperControlLabel instanceof FormControlLabel) {\n $this->helperControlLabel = new FormControlLabel();\n }\n\n $this->helperControlLabel->setTranslator($this->getTranslator());\n $this->helperControlLabel->setView($this->getView());\n\n return $this->helperControlLabel;\n }", "public function getLabel()\n {\n $open_html = \"<div class=\\\"control-label\\\"><span class=\\\"span-label\\\">\";\n $close_html = '</span></div>';\n $html = '';\n $label = $this->currentField->getLabelOption();\n\n if ($label) {\n $label = $this->currentField->getSetting( 'label' );\n\t $label .= $this->currentField->getSetting( 'required' ) ? '*' : '';\n $html = \"{$open_html}{$label} {$close_html}\";\n }\n\n return $html;\n }", "public final function label() {\n $label = $this->label;\n if ($label === '') return '';\n $required = '';\n if (($this->required || $this->required_mock) && $this->form()->__asterisk)\n $required = $this->form()->required_suffix;\n if (preg_match('#[\\.\\?!:;]$#i', $label)) return $label . $required;\n return $label . $required . $this->__FormContainer->label_suffix;\n }", "private function getLabelHelper()\n {\n $this->label_helper = new FormLabel();\n }", "function &getFormFieldLabel(&$formField) {\n return $this->formFieldLabels[$formField->getId()];\n }", "public function label() {\n if (!$label = $this->get('label')) {\n $label = $this->id();\n }\n return $label;\n }", "function getLabel() {\n global $Language;\n if ($this->isLabelMustBeLocalized()) {\n return $Language->getText('plugin_tracker_common_fieldset', $this->label);\n } else {\n return $this->label;\n }\n }", "public function getFrontendLabel();", "protected function get_label_tag() {\n\t\treturn $this->get_tag( 'label', $this->get_label_attributes() );\n\t}", "public function labelTag() {\r\n\t\treturn '<label for=\"'.$this->getID().'\">'.$this->label().'</label>';\r\n\t}", "public function getFieldLabel() {\n return $this->label;\n }", "public function getLabel()\n {\n return $this->formRuntime->getFormDefinition()->getPageDefinition($this->pageName)->getLabel();\n }", "public function getLabelField() {\n return $GLOBALS['TCA'][$this->_table]['ctrl']['label'];\n }", "public function getFieldLabel()\n {\n return $this->fieldLabel;\n }", "public function getLabel() : TLabel {\n return $this->label;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets impressions count for a campaign
public static function cmac_get_impressions_cnt($campaign_id) { global $wpdb; //$impressions_cnt = $wpdb->get_var('SELECT count(*) FROM ' . self::$historyTable . ' WHERE `event_type`="impression" AND `campaign_id`="' . $campaign_id . '"'); $impressions_cnt = 0; return $impressions_cnt; }
[ "public function get_impressions()\n {\n return (int)parent::get_campaign_meta($this->optin_campaign_id, $this->impression, true);\n }", "public function getTotalImpressions()\n {\n return isset($this->total_impressions) ? $this->total_impressions : 0;\n }", "public static function cmac_get_banner_impressions_cnt($banner_id)\n {\n global $wpdb;\n// $impressions_cnt = $wpdb->get_var('SELECT count(*) FROM ' . self::$historyTable . ' WHERE `event_type`=\"impression\" AND `banner_id`=\"' . $banner_id . '\"');\n $impressions_cnt = 0;\n return $impressions_cnt;\n }", "public function getImpressions()\n {\n return isset($this->impressions) ? $this->impressions : 0.0;\n }", "function getImpressions()\n {\n return $this->impressions;\n }", "public function incrementImpressions()\n {\n $this->impressions++;\n }", "public function getTotalImpressionsUnwrapped()\n {\n return $this->readWrapperValue(\"total_impressions\");\n }", "function update_ad_impressions()\n{\n\tglobal $context;\n\n\t$db = database();\n\n\t// No ad displayed, no impressions\n\tif (empty($context['displayed_ads']))\n\t{\n\t\treturn;\n\t}\n\n\t$db->query('', '\n\t\tUPDATE {db_prefix}sa_ads\n\t\tSET impressions = impressions + 1\n\t\tWHERE id_ad IN ({array_int:displayed_ads})',\n\t\tarray(\n\t\t\t'displayed_ads' => $context['displayed_ads'],\n\t\t)\n\t);\n}", "public function getCampaignCount()\n {\n return isset($this->campaign_count) ? $this->campaign_count : 0;\n }", "public function getViewableImpressions()\n {\n return isset($this->viewable_impressions) ? $this->viewable_impressions : 0;\n }", "public function total_abandoned_calls($campaign = NULL) {\n \t\t\n \t\t//generate stats for each campaign\n \t\tif($campaign == NULL) {\n \t\t\t$query = \"\n\t\t\t\tSELECT appl, COUNT(*)\n\t\t\t\tFROM inboundlog\n\t\t\t\tWHERE appl != 'CGEN' AND tsr = '' AND appl IS NOT NULL\n\t\t\t\tGROUP BY appl\n\t\t\t\";\n\n\t\t\t$result = odbc_exec($this->conn, $query);\n\n\t\t\t$data = array();\n\n\t\t\t# fetch the data from the database\n\t\t\twhile(odbc_fetch_row($result)){\n\t\t\t \t$campaign = trim(odbc_result($result, 1));\n\t\t\t\t$count = odbc_result($result, 2);\n\t\t\t\t$data[$campaign] = $count;\n\t\t\t}\n\n\t\t\t# close the connection\n\t\t\todbc_close($this->conn);\n\n\t\t\treturn $data;\n\n \t\t} else {\n \t\t\t//generate stats for specific campaign\n\t\t\t\n\t\t\t//check if campaign exist\t \t\t\t\n \t\t\tif($this->campaign_exist($campaign) === TRUE) {\n \t\t\t\t//query total calls\n \t\t\t\t$query = \"\n \t\t\t\t\tSELECT appl, COUNT(*)\n\t\t\t\t\tFROM inboundlog\n\t\t\t\t\tWHERE appl = '$campaign' AND tsr = ''\n\t\t\t\t\tGROUP BY appl\n \t\t\t\t\";\n\n \t\t\t\t# perform the query\n\t\t\t\todbc_fetch_into(odbc_exec($this->conn, $query), $result);\n\n\t\t\t\t# close the connection\n\t\t\t\todbc_close($this->conn);\n\n\t\t\t\treturn $result[1];\n \t\t\t}\n \t\t}\n\n \t}", "public function getImpressionTrackingUrlCount()\n {\n return $this->count(self::IMPRESSION_TRACKING_URL);\n }", "public function setImpressions($var)\n {\n GPBUtil::checkInt32($var);\n $this->impressions = $var;\n\n return $this;\n }", "public function setImpressions($var)\n {\n GPBUtil::checkInt64($var);\n $this->impressions = $var;\n\n return $this;\n }", "public function setImpressions($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Protobuf\\Int32Value::class);\n $this->impressions = $var;\n\n return $this;\n }", "public function getAdsCount()\n {\n return $this->count(self::ADS);\n }", "public function getNumberOfActiveCampaigns()\n {\n $query = $this->db->getQuery(true);\n $query\n ->select(\"COUNT(*) AS number\")\n ->from($this->db->quoteName(\"#__crowdf_projects\", \"a\"))\n ->where(\"a.user_id = \". (int)$this->id)\n ->where(\"a.published = 1\")\n ->where(\"a.approved = 1\");\n\n $this->db->setQuery($query, 0, 1);\n\n $result = $this->db->loadResult();\n\n if (!$result) {\n $result = 0;\n }\n\n return $result;\n }", "function getBannerImpressions($bannerid)\n{\n\tglobal $dbbms;\n\t$sql = \"select BannerServed as totalimp from bms2.BANNER where BannerId='$bannerid'\";\n\t//echo $sql=\"select BannerServed as totalimp from bms2.BANNERHEAP where BannerId='$bannerid'\";\n\t$res = mysql_query($sql,$dbbms) or logErrorBms(\"bms_mis.php :getBannerImpressions:1: Could not select total impressions <br><!--$sql<br>\". mysql_error().\"-->: \". mysql_errno(),$sql);\n\t$myrow = mysql_fetch_array($res);\n\n\t$totalimp = $myrow[\"totalimp\"];\n\tif ($totalimp)\n\t\treturn $totalimp;\n\telse\n\t\treturn 0;\n}", "public function getImpressions() : ? array\n {\n return $this->impressions;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the allowAttendeeToEnableCamera Indicates whether attendees can turn on their camera.
public function setAllowAttendeeToEnableCamera($val) { $this->_propDict["allowAttendeeToEnableCamera"] = boolval($val); return $this; }
[ "public function setCameraBlocked($val)\n {\n $this->_propDict[\"cameraBlocked\"] = boolval($val);\n return $this;\n }", "public function setInfraredCamera(?Enablement $value): void {\n $this->getBackingStore()->set('infraredCamera', $value);\n }", "public function setAttendee($attendee) {\r\n\t$this->attendee = $attendee;\r\n }", "public function setAttendees($val)\n {\n $this->_propDict[\"attendees\"] = $val;\n return $this;\n }", "public function allowToSetOptions($allow){\n $this->allowToSetOptions = (bool)$allow;\n }", "public function setCanCapture($canCapture)\n {\n if ($this->_canCapture != $canCapture) {\n $this->_canCapture = $canCapture;\n }\n }", "public function setMeetingRequesterEnabled($meetingRequesterEnabled){\n\t\t$this->_meetingRequesterEnabled = $meetingRequesterEnabled;\n\t\treturn $this;\n\t}", "public function setAllowScreenCapture($val)\n {\n $this->_propDict[\"allowScreenCapture\"] = boolval($val);\n return $this;\n }", "public function getAllowCameraUpload() : bool\n {\n return $this->allowCameraUpload;\n }", "public function setRequestAccessForAllowedTargets($val)\n {\n $this->_propDict[\"requestAccessForAllowedTargets\"] = $val;\n return $this;\n }", "public function setEnableRestrictEditing($val)\n {\n $this->_propDict[\"enableRestrictEditing\"] = boolval($val);\n return $this;\n }", "public function setMaxAttendees($max): void {\n\t\tif (!empty($max) && !is_numeric($max)) {\n\t\t\t$max = null;\n\t\t}\n\t\t\n\t\t$this->max_attendees = $max;\n\t}", "public function gMapsSetAllowStreetView($param) {\n $this->allowShowStreetView = $param;\n }", "public function setWorkProfileBlockCamera(?bool $value): void {\n $this->getBackingStore()->set('workProfileBlockCamera', $value);\n }", "public function setAllowMeetingChat($val)\n {\n $this->_propDict[\"allowMeetingChat\"] = $val;\n return $this;\n }", "public function setIsReviewEmailNotificationEnabled($val)\n {\n $this->_propDict[\"isReviewEmailNotificationEnabled\"] = boolval($val);\n return $this;\n }", "function setAttachUsers ($value) {\n\t\t$this->attach_users = $value ? true : false;\n\t}", "public function setAllowAttachments($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (int) $v;\n\t\t}\n\n\t\tif ($this->allow_attachments !== $v) {\n\t\t\t$this->allow_attachments = $v;\n\t\t\t$this->modifiedColumns[] = ForumForumPeer::ALLOW_ATTACHMENTS;\n\t\t}\n\n\t\treturn $this;\n\t}", "public function setEnablerMode($turn_on)\n\t{\n\t\t$this->enabler_allow = (bool)$turn_on;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set shipping method on cart with GraphQl mutation
private function setShippingMethod(string $cartId, array $method): array { $query = <<<QUERY mutation { setShippingMethodsOnCart(input: { cart_id: "{$cartId}", shipping_methods: [ { carrier_code: "{$method['carrier_code']}" method_code: "{$method['method_code']}" } ] }) { cart { available_payment_methods { code title } } } } QUERY; $currentEmail = 'customer@example.com'; $currentPassword = 'password'; $response = $this->graphQlMutation( $query, [], '', $this->customerAuthenticationHeader->execute($currentEmail, $currentPassword) ); $availablePaymentMethod = current($response['setShippingMethodsOnCart']['cart']['available_payment_methods']); return $availablePaymentMethod; }
[ "public function setShippingMethod($shippingMethod);", "public function testSetShippingMethod()\n {\n $this->markTestIncomplete('combine shipping framework with core, or remove reliance');\n }", "function setShippingMethod() {\n global $total_count, $total_weight;\n // ensure that cart contents is calculated properly for weight and value\n if (!isset($total_weight)) $total_weight = $_SESSION['cart']->show_weight();\n if (!isset($total_count)) $total_count = $_SESSION['cart']->count_contents();\n // set the shipping method if one is not already set\n // defaults to the cheapest shipping method\n if ((!isset($_SESSION['shipping']) || (!isset($_SESSION['shipping']['id']) || $_SESSION['shipping']['id'] == '') && zen_count_shipping_modules() >= 1)) {\n require_once(DIR_WS_CLASSES . 'http_client.php');\n require_once(DIR_WS_CLASSES . 'shipping.php');\n $shipping_Obj = new shipping;\n\n // generate the quotes\n $shipping_Obj->quote();\n\n // set the cheapest one\n $_SESSION['shipping'] = $shipping_Obj->cheapest();\n }\n }", "function admin_edit_shipping_method() {\n\t\t//\n\t}", "public function getShippingMethod();", "public function shipping($method)\n\t{\n\t\t$this->shipping_method = $method;\n\t\t$this->order->shipping = 'TD5****T*'.$this->shipping_method.PHP_EOL;\n\t\treturn $this;\n\t}", "public function testGetShippingCarrierAndMethodWithOverride() { $this->assertEquals(\n ['UPS', 'Express'],\n $this->model->getShippingCarrierAndMethod([\n 'UPDATED_SHIPPING_METHOD' => 'UPS Express',\n 'SHIPPING_METHOD' => 'TOTALLY BOGUS',\n ])\n );\n }", "public function initShippingMethod()\n {\n $helper = Mage::helper('onestepcheckout/shipping');\n if (!$this->getQuote()->getShippingAddress()->getShippingMethod()) {\n $shippingRates = $helper->getShippingRates();\n if ((count($shippingRates) == 1)) {\n $currentShippingRate = current($shippingRates);\n if (count($currentShippingRate) == 1) {\n $shippingRate = current($currentShippingRate);\n $shippingMethod = $shippingRate->getCode();\n }\n } elseif ($lastShippingMethod = $helper->getLastShippingMethod()) {\n $shippingMethod = $lastShippingMethod;\n } elseif ($defaultShippingMethod = Mage::helper('onestepcheckout/config')->getDefaultShippingMethod()) {\n $shippingMethod = $defaultShippingMethod;\n }\n if (isset($shippingMethod)) {\n $this->getOnepage()->saveShippingMethod($shippingMethod);\n }\n }\n }", "function billing_shipping_method() {\n\t\t//\n\t}", "public function setShippingMethodCode($code);", "public function setShippingMethod(IsotopeShipping $objShipping = null);", "public function shipping()\n {\n }", "function woocommerce_register_shipping_method($shipping_method)\n {\n }", "public function setShippingAction()\n {\n try {\n $this->loadServices();\n\n Shopware()->Plugins()->Controller()->ViewRenderer()->setNoRender();\n\n $shippingIdentifier = $this->Request()->getParam('identifier', '');\n\n\n $previousShippingIdentifier = $shippingIdentifier;\n\n # fire event about the shipping methods that\n # will be set for the user\n $shippingIdentifier = $this->eventManager->filter(\n Events::APPLEPAY_DIRECT_SET_SHIPPING,\n $shippingIdentifier,\n []\n );\n\n if ($previousShippingIdentifier !== $shippingIdentifier) {\n $this->logger->info(\n 'Filter Event changed Apple Pay Direct Shipping Method to ' . $shippingIdentifier,\n [\n 'data' => [\n 'previousShipping' => $previousShippingIdentifier,\n 'newShipping' => $shippingIdentifier\n ]\n ]\n );\n }\n\n if (!empty($shippingIdentifier)) {\n $this->shipping->setCartShippingMethodID($shippingIdentifier);\n }\n\n $cart = $this->handlerApplePay->buildApplePayCart();\n $formattedCart = $this->applePayFormatter->formatCart(\n $cart,\n Shopware()->Shop(),\n $this->config->isTestmodeActive()\n );\n\n $data = [\n 'success' => true,\n 'cart' => $formattedCart,\n ];\n\n echo json_encode($data);\n die();\n } catch (\\Exception $ex) {\n $this->logger->error(\n 'Error setting shipping for Mollie Apple Pay Direct',\n [\n 'error' => $ex->getMessage()\n ]\n );\n\n $data = [\n 'success' => false,\n ];\n\n echo json_encode($data);\n die();\n }\n }", "private function setPaymentMethod(string $cartId, array $method): void\n {\n $query = <<<QUERY\nmutation {\n setPaymentMethodOnCart(\n input: {\n cart_id: \"{$cartId}\"\n payment_method: {\n code: \"{$method['code']}\"\n }\n }\n ) {\n cart {selected_payment_method {code}}\n }\n}\nQUERY;\n $currentEmail = 'customer@example.com';\n $currentPassword = 'password';\n $this->graphQlMutation(\n $query,\n [],\n '',\n $this->customerAuthenticationHeader->execute($currentEmail, $currentPassword)\n );\n }", "public function saveShippingMethodAction()\n {\n if ($this->_expireAjax()) {\n return;\n }\n if ($this->getRequest()->isPost()) {\n $data = $this->getRequest()->getPost('shipping_method', '');\n $result = $this->getOnepage()->saveShippingMethod($data);\n /*\n $result will have erro data if shipping method is empty\n */\n if(!$result) {\n Mage::dispatchEvent('checkout_controller_onepage_save_shipping_method',\n array('request'=>$this->getRequest(),\n 'quote'=>$this->getOnepage()->getQuote()));\n $this->getOnepage()->getQuote()->collectTotals();\n $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));\n\n $result['goto_section'] = 'payment';\n\t\t\t\t\n $result['update_section'] = array(\n 'name' => 'payment-method',\n 'html' => $this->_getPaymentMethodsHtml()\n );\n\t\t\t\t\n\t\t\t\t$shippingAmount = $this->getOnepage()->getQuote()->getShippingAddress()->getShippingAmount();\n\t\t\t\tif ($shippingAmount > 0) {\n\t\t\t\t\t$shippingAmount = Mage::helper('core')->formatPrice($shippingAmount, false);\n\t\t\t\t} else {\n\t\t\t\t\t$shippingAmount = 'FREE';\n\t\t\t\t}\n\t\t\t\t\n $result['set_summary'] = array(\n 'name' => 'shipping_method',\n 'html' => $this->getOnepage()->getQuote()->getShippingAddress()->getShippingDescription().' - '.\n\t\t\t\t\t\t\t\t$shippingAmount\n );\n }\n $this->getOnepage()->getQuote()->collectTotals()->save();\n $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));\n }\n }", "public function saveShippingMethodAction(){\n\t\tif ($this->_expireAjax()) {\n\t\t\treturn;\n\t\t}\n\t\t$responseData = array();\n\n\t\tif ($this->getRequest()->isPost()) {\n\n\t\t\t$this->checkNewslatter();\n\n\t\t\t$data = $this->getRequest()->getPost('shipping_method', '');\n\t\t\t$result = $this->getOnepage()->saveShippingMethod($data);\n\t\t\t/*\n\t\t\t $result will have erro data if shipping method is empty\n\t\t\t*/\n\t\t\tif(!$result) {\n\t\t\t\tMage::dispatchEvent('checkout_controller_onepage_save_shipping_method',\n\t\t\t\t\tarray('request'=>$this->getRequest(),\n\t\t\t\t\t\t'quote'=>$this->getOnepage()->getQuote())\n\t\t\t\t);\n\n\t\t\t\t$this->getOnepage()->getQuote()->collectTotals();\n\t\t\t\t$this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));\n\n\t\t\t\t$responseData['review'] = $this->_getReviewHtml();\n\t\t\t\t$responseData['grandTotal'] = Mage::helper('opc')->getGrandTotal();\n\t\t\t\t/*$result['update_section'] = array(\n\t\t\t\t\t\t'name' => 'payment-method',\n\t\t\t\t\t\t'html' => $this->_getPaymentMethodsHtml()\n\t\t\t\t);*/\n\t\t\t}\n\t\t\t$this->getOnepage()->getQuote()->collectTotals()->save();\n\n\n\n\t\t\t$this->getResponse()->setHeader('Content-type','application/json', true);\n\t\t\t$this->getResponse()->setBody(Mage::helper('core')->jsonEncode($responseData));\n\t\t}\n\t}", "public function saveShippingMethodAction()\n {\n if ($this->_expireAjax()) {\n return;\n }\n if ($this->getRequest()->isPost()) {\n $data = $this->getRequest()->getPost('shipping_method', '');\n $result = $this->getOnepage()->saveShippingMethod($data);\n // $result will contain error data if shipping method is empty\n if (!$result) {\n Mage::dispatchEvent(\n 'checkout_controller_onepage_save_shipping_method',\n array(\n 'request' => $this->getRequest(),\n 'quote' => $this->getOnepage()->getQuote()));\n $this->getOnepage()->getQuote()->collectTotals();\n $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));\n $result['skipPayment'] = false;\n if($this->getOnepage()->getQuote()->getGrandTotal() == 0){\n $result['skipPayment'] = true;\n }\n $result['goto_section'] = 'payment';\n $result['update_section'] = array(\n 'name' => 'payment-method',\n 'html' => $this->_getPaymentMethodsHtml()\n );\n }\n $this->getOnepage()->getQuote()->collectTotals()->save();\n $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));\n }\n }", "public function store_product_shipping(Request $request , int $post_id);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Only select successful historic external task log entries.
public function successLog(): HistoricExternalTaskLogQueryInterface;
[ "private function logEntriesInDateRange() {\n\t\t// loop the discovered files\t\t\n\t\tforeach ($this->report['files'] as $file) {\n\t\t\t$handle = @fopen($file, \"r\");\n\t\t\tif ($handle) {\n\t\t\t\twhile (($buffer = fgets($handle, 4096)) !== false) {\n\t\t\t\t\t$this->Log->parseLogLine($buffer);\n\t\t\t\t\t// is it an log entry for the customer of interest?\n\t\t\t\t\tif ($this->Log->logLine['customer'] == $this->report['customer']) {\n\t\t\t\t\t\t// if the log entry is in the specific date range, save it\n\t\t\t\t\t\tif ($this->Log->meta['datetime'] >= $this->report['firstTime'] && $this->Log->meta['datetime'] <= $this->report['finalTime']) {\n\t\t\t\t\t\t\t$this->report['items'][$this->Log->logLine['id']]['Activity'][] = array_merge($this->Log->meta, $this->Log->logLine);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\t\t\n\t\t\t\t}\n\t\t\t\tif (!feof($handle)) {\n\t\t\t\t\techo \"Error: unexpected fgets() fail\\n<br />\";\n\t\t\t\t}\n\t\t\t\tfclose($handle);\n\t\t\t}\n\t\t}\n\t}", "protected function getLogEntries() {\r\n\t\tglobal $TYPO3_DB; /* @var $TYPO3_DB t3lib_db */\r\n\r\n\t\t\t// Initialize result array:\r\n\t\t$resultArray = array(\r\n\t\t\t'message' => $this->cli_help['name'].chr(10).chr(10).$this->cli_help['description'],\r\n\t\t\t'headers' => array(\r\n\t\t\t\t'listing' => array('','',1),\r\n\t\t\t\t'allDetails' => array('','',0),\r\n\t\t\t),\r\n\t\t\t'listing' => array(),\r\n\t\t\t'allDetails' => array()\r\n\t\t);\r\n\r\n\t\t$rows = $TYPO3_DB->exec_SELECTgetRows(\r\n\t\t\t'*',\r\n\t\t\t'sys_log',\r\n\t\t\t'tstamp>' . ($GLOBALS['EXEC_TIME'] - $this->hours * 3600) . ' AND error = ' . $this->logLevel\r\n\t\t);\r\n\r\n\t\tforeach ($rows as $r) {\r\n\t\t\t$l = unserialize($r['log_data']);\r\n\t\t\t$explained = '#' . $r['uid'] . ' ' . t3lib_BEfunc::datetime($r['tstamp']) . ' USER[' . $r['userid'] . ']: '.sprintf($r['details'],$l[0],$l[1],$l[2],$l[3],$l[4],$l[5]);\r\n\t\t\t$resultArray['listing'][$r['uid']] = $explained;\r\n\t\t\t$resultArray['allDetails'][$r['uid']] = array($explained,t3lib_div::arrayToLogString($r,'uid,userid,action,recuid,tablename,recpid,error,tstamp,type,details_nr,IP,event_pid,NEWid,workspace'));\r\n\t\t}\r\n\r\n\t\treturn $resultArray;\r\n\t}", "public function get_task_run_logs( BTM_Task_Run_Log_View_Filter $filter ){\n\t\tglobal $wpdb;\n\n\t\t$where = $this->generate_where_statement( $filter, 'run_logs', 'tasks' );\n\n\t\tif( $filter->has_order_params() ){\n\t\t\t$order = ' ORDER BY `'. $filter->get_order_by() . '` ' . $filter->get_order();\n\t\t}else{\n\t\t\t$order = '';\n\t\t}\n\n\t\t$offset = $filter->get_items_per_page() * ( $filter->get_current_page() - 1 );\n\t\t$limit = $wpdb->prepare('\n\t\t\tLIMIT %d, %d\n\t\t',\n\t\t\t$offset,\n\t\t\t$filter->get_items_per_page()\n\t\t);\n\n\t\t$query = '\n\t\t\tSELECT \n\t\t\t\t`run_logs`.`id`, \n\t\t\t\t`run_logs`.`task_id`,\n\t\t\t\t`run_logs`.`logs`,\n\t\t\t\t`run_logs`.`status`,\n\t\t\t\t`run_logs`.`date_started`,\n\t\t\t\t`run_logs`.`date_finished`,\n\t\t\t\t`tasks`.`callback_action`\n\t\t\tFROM `' . BTM_Task_Run_Log_Dao::get_instance()->get_table_name() . '` AS `run_logs`\n\t\t\tJOIN `' . BTM_Task_Dao::get_instance()->get_table_name() . '` AS `tasks`\n\t\t\t\tON `run_logs`.`task_id` = `tasks`.`id`\n\t\t\tWHERE 1=1\n\t\t\t\t' . $where . '\n\t\t\t' . $order . '\n\t\t\t' . $limit . '\n\t\t';\n\n\t\t$task_run_log_view_objs = $wpdb->get_results( $query, OBJECT );\n\t\tif( empty( $task_run_log_view_objs ) ){\n\t\t\treturn array();\n\t\t}\n\n\t\t$task_run_log_views = array();\n\t\tforeach ( $task_run_log_view_objs as $task_run_log_view_obj ){\n\t\t\t$task_run_log_views[] = $this->create_task_run_log_from_db_obj( $task_run_log_view_obj );\n\t\t}\n\t\treturn $task_run_log_views;\n\t}", "function cwrc_workflow_skip_entries_form_submit(array $form, array &$form_state) {\n foreach ($form_state['lids'] as $lid) {\n db_update('islandora_workflow_rest_ds_logs')\n ->fields(array('state' => 'skipped'))\n ->condition('lid', $lid)\n ->execute();\n }\n drupal_set_message(t(\"Checked entries skipped\"));\n drupal_goto('cwrc_workflow');\n}", "protected function readLogEntries() {\n\t\t$sql = \"SELECT\t\tcronjobs.*, cronjobs_log.*\n\t\t\tFROM\t\twcf\".WCF_N.\"_cronjobs_log cronjobs_log\n\t\t\tLEFT JOIN\twcf\".WCF_N.\"_cronjobs cronjobs\n\t\t\tON\t\t(cronjobs.cronjobID = cronjobs_log.cronjobID)\n\t\t\tWHERE\t\tcronjobs_log.cronjobID IN (\n\t\t\t\t\t\tSELECT\tcronjobID\n\t\t\t\t\t\tFROM\twcf\".WCF_N.\"_cronjobs cronjobs,\n\t\t\t\t\t\t\twcf\".WCF_N.\"_package_dependency package_dependency\n\t\t\t\t\t\tWHERE \tcronjobs.packageID = package_dependency.dependency\n\t\t\t\t\t\t\tAND package_dependency.packageID = \".PACKAGE_ID.\"\n\t\t\t\t\t)\n\t\t\tORDER BY\t\".(($this->sortField == 'classPath' || $this->sortField == 'description') ? 'cronjobs.' : 'cronjobs_log.').$this->sortField.\" \".$this->sortOrder;\n\t\t$result = WCF::getDB()->sendQuery($sql, $this->itemsPerPage, ($this->pageNo - 1) * $this->itemsPerPage);\n\t\twhile ($row = WCF::getDB()->fetchArray($result)) {\n\t\t\tif ($row['error']) {\n\t\t\t\t$row['error'] = nl2br(StringUtil::encodeHTML($row['error']));\n\t\t\t}\n\t\t\t$this->logEntries[] = $row;\n\t\t}\n\t}", "protected function clearLogsEntries() {\n $this->drupalGet(Url::fromRoute('dblog.confirm'));\n }", "public static function getAllActiveLogs() {\n $pdo = new PDO_MYSQL();\n $stmt = $pdo->queryMulti(\"SELECT tID FROM entrance_tracing WHERE active = 1 ORDER BY tID\");\n return $stmt->fetchAll(PDO::FETCH_FUNC, \"\\\\Entrance\\\\TracingEntry::fromTID\");\n }", "function _cleanLogRecords() {\n $dateTime = date('Y-m-d H:i:s');\n $sql = \"\n DELETE FROM civicrm_log\n WHERE id IN (\n SELECT *\n FROM (\n SELECT id\n FROM civicrm_log\n WHERE modified_date >= DATE_SUB('{$dateTime}', INTERVAL 1 HOUR)\n AND entity_table = 'civicrm_contact'\n AND entity_id = modified_id\n ) migrationLog\n )\n \";\n CRM_Core_DAO::executeQuery($sql);\n bbscript_log(LL::INFO, \"cleaning up log table records...\");\n }", "public function logId(?string $historicExternalTaskLogId): HistoricExternalTaskLogQueryInterface;", "function selectionLogEntry ($site)\n\t{\n\t}", "public function findNewLoginAttempts($lastSearchTimeStamp = null){\n $filterList = Array();\n //if null we start from the beginning\n if($lastSearchTimeStamp == null){\n\n //var_dump($this->logFileContents);\n\n foreach($this->logFileContents as $logEntry){\n if(ServiceChecker::isAnOffenceToAService($logEntry)){\n $filterList[] = $logEntry;\n }\n }\n\n\n\n //else we start from after the timestamp in the log\n }else{\n\n //print(\"There is a threshold \\n\");\n\n foreach($this->logFileContents as $logEntry){\n $words = explode(\" \", $logEntry);\n $pulledDate = \"$words[0] $words[1] $words[2]\";\n\n\n if($this->isGreaterThenDate($lastSearchTimeStamp, $pulledDate)){\n\n if(ServiceChecker::isAnOffenceToAService($logEntry)){\n $filterList[] = $logEntry;\n }\n }\n }\n }\n\n return $filterList;\n }", "protected function loadLastSyncLog()\r\n {\r\n if($this->_lastSyncLogEntry){\r\n return;\r\n }\r\n $this->_searchCriteriaBuilder->setCurrentPage(1);\r\n $this->_searchCriteriaBuilder->setPageSize(1);\r\n $this->_searchCriteriaBuilder->addFilter('is_completed', 1);\r\n $this->_sortOrderBuilder->setField('start_time');\r\n $this->_sortOrderBuilder->setDescendingDirection();\r\n $sortOrder=$this->_sortOrderBuilder->create();\r\n $this->_searchCriteriaBuilder->addSortOrder($sortOrder);\r\n $searchCriteria = $this->_searchCriteriaBuilder->create();\r\n $entries=$this->_syncLogRepository->getList($searchCriteria);\r\n foreach($entries->getItems() as $entry){\r\n $this->_lastSyncLogEntry = $entry;\r\n break;\r\n }\r\n }", "function getExistingHosts(){\n $handle = fopen($this->hostFile, \"r\");\n if ($handle) {\n while (($line = fgets($handle)) !== false) {\n if ($line==$this->newHostsMarker)\n break;\n $this->lines[]=$line;\n }\n }\n fclose($handle);\n }", "public function test_get_logs_by_ip()\n\t{\n\t\t$this->mark_test_incomplete();\n\t\t\n\t}", "function allFilterLog($filter) {\n\t\t$sql = \"SELECT * FROM exchange_log as a\";\n\n\t\t$where = array();\n\t\t\n\t\tif($filter['startdate'] != '0') {\n\t\t\t$startdate = $filter['startdate'];\n\t\t\t$enddate = $filter['enddate'];\n\t\t\t$where[] = 'time >= ' . $startdate . ' AND time <= ' . $enddate;\n\t\t}\n\t\t\n\t\tif(isset($filter['user_id']) && $filter['user_id'] != '-1') {\n\t\t\t$where[] = \"a.user_id=\" . $filter['user_id'];\n\t\t}\n\t\tif(isset($filter['username']) && $filter['username'] != '-1') {\n\t\t\t$where[] = \"a.username LIKE '%\" . $filter['username'] . \"%'\";\n\t\t}\n if(isset($filter['tx_type']) && $filter['tx_type'] != '-1') {\n\t\t\t$where[] = \"a.tx_type LIKE '%\" . $filter['tx_type'] . \"%'\";\n\t\t}\n\t\t\n\t\tif($where) {\n\t\t\t$sql .= \" WHERE \" . implode(\" AND \", $where);\n\t\t}\n\n\t\t$sort_array = array(\n\t\t\t'id',\n\t\t\t'user_id',\n \t\t'username',\n \t\t'tx_type'\n \t);\n \tif(isset($filter['sortby']) && in_array($filter['sortby'], $sort_array)) {\n \t\t$sql .= \" ORDER BY a.\" . $filter['sortby'];\n \t} else {\n \t\t$sql .= \" ORDER BY a.id\";\n \t}\n \tif(isset($filter['order']) && $filter['order'] == 'ASC') {\n \t\t$sql .= \" ASC\";\n \t} else {\n \t\t$sql .= \" DESC\";\n \t}\n \tif(isset($filter['page']) || isset($filter['limit'])) {\n \t\tif($filter['start'] < 0) {\n \t\t\t$filter['start'] = 0;\n \t\t}\n \t\tif($filter['limit'] < 1) {\n \t\t\t$filter['limit'] = 50;\n \t\t}\n \t\t$sql .= \" LIMIT \" . (int)$filter['start'] . \",\" . (int)$filter['limit'];\n \t}\n \t$query = $this->dbuser->query($sql);\n \treturn $query->result();\t\t\n\t}", "public function onAfterInitialise()\n\t{\n\t\t// Delete up to 100 old entries\n\t\t$maxEntries = $this->params->get('maxlogentries', 0);\n\t\t$db = $this->db;\n\t\t$query = $db->getQuery(true)\n\t\t\t->select($db->qn('id'))\n\t\t\t->from($db->qn('#__admintools_log'))\n\t\t\t->order($db->qn('id') . ' DESC');\n\t\t$db->setQuery($query, $maxEntries, 100);\n\t\t$ids = $db->loadColumn(0);\n\n\t\tif (!count($ids))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$temp = array();\n\n\t\tforeach ($ids as $id)\n\t\t{\n\t\t\t$temp[] = $db->q($id);\n\t\t}\n\n\t\t$ids = implode(',', $temp);\n\n\t\t$query = $db->getQuery(true)\n\t\t\t->delete($db->qn('#__admintools_log'))\n\t\t\t->where($db->qn('id') . ' IN(' . $ids . ')');\n\t\t$db->setQuery($query);\n\n\t\ttry\n\t\t{\n\t\t\t$db->execute();\n\t\t}\n\t\tcatch (Exception $exc)\n\t\t{\n\t\t\t// Do nothing on DB exception\n\t\t}\n\t}", "public function getLogs()\n {\n $result = $this->mootalib->getLatestMutation();\n $total = 0;\n\n if ($result['status'] == 'success') {\n foreach ($result['logs'] as $log) {\n $this->mootalib->save($log);\n $total++;\n }\n }\n\n echo \"Successfully get $total records from Moota \\n\";\n }", "public function filter(&$logs);", "function checkLog() {\n\t\tfor ($x = 0; $x < count($this->lines); $x++) {\n\t\t\t\n\t\t\t// If eventid or dbid is matched...\t\t\n\t\t\tif (preg_match(\"/(dbid)\\s+([0-9]+)\\s/i\",$this->lines[$x],$matches) || preg_match(\"/eventid\\s+([0-9]+)/i\",$this->lines[$x],$matches)) { \n\t\n\t\t\t\t// Set the DBID array if its a DBID\n\t\t\t\tif ($matches[1] == \"dbid\") {\n\t\t\t\t\n\t\t\t\t\t$this->dbid[$matches[2]]=time();\n\t\t\t\t\t$this->EventQueue++;\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Otherwise it must be an eventid.\n\t\t\t\telse {\n\t\t\t\t\t\n\t\t\t\t\tif($this->CoreWasDown && time() - $this->CoreTimeUp < 60 ) { $this->eventQueueProcessing = 1;}\n\t\t\t\t\t$this->eventid[$matches[1]] = time();\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t}\n\t\t\t\t\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Call the composer for a given view.
public function callComposer(ViewContract $view) { $this->getFactory()->getDispatcher()->dispatch('composing: ' . $view->name(), [$view]); }
[ "public function callComposer($view)\n {\n }", "public static function callComposer($view)\n {\n /** @var \\Illuminate\\View\\Factory $instance */\n $instance->callComposer($view);\n }", "public function callComposer ( View $view )\n {\n $this->events->fire ( 'composing: ' . $view->getName (), array ( $view ) );\n }", "public function callComposer(View $view)\n {\n $this->events->fire('composing: ' . $view->getName(), array($view));\n }", "public function callCreator(View $view): void;", "public function callCreator($view)\n {\n }", "private function callView(): void\n {\n if ($this->confirm(\"Create crud views for the $this->resource resource?\")) {\n $views = config('generators.resource_views');\n foreach ($views as $key => $name) {\n $resource = $this->argument('resource');\n if (Str::contains($resource, '.')) {\n $resource = str_replace('.', '/', $resource);\n }\n\n $this->callCommandFile(\n 'view',\n $this->getViewPath($resource),\n $key . $this->option('view'),\n ['--name' => $name]\n );\n }\n }\n }", "public function callCreator ( View $view )\n {\n $this->events->fire ( 'creating: ' . $view->getName (), array ( $view ) );\n }", "public static function callCreator($view)\n {\n /** @var \\Illuminate\\View\\Factory $instance */\n $instance->callCreator($view);\n }", "public function testComposerEventIsCalledWhenViewIsRendering()\n\t{\n\t\tView::composer('tests.basic', function($view)\n\t\t{\n\t\t\t$view->data = array('name' => 'Taylor', 'age' => 25);\n\t\t});\n\n\t\t$view = View::make('tests.basic')->render();\n\n\t\t$this->assertEquals('Taylor is 25', $view);\n\t}", "public function executeView() {\n\t}", "public function execute()\n {\n if ($this->argument === NULL) {\n $this->controller->{$this->action}();\n }\n else {\n $this->controller->{$this->action}($this->argument);\n }\n\n // TODO: check for non-default template\n $template = DEFAULT_TEMPLATE;\n\n $view = new AppView($this->page, $template);\n $view->show_view_with_context_variables($this->controller->getModelViewContext());\n }", "public function callViewFunction(string $functionName, ...$args);", "public function callView() {\n $view = new LandingView();\n $data = $this->getData();\n $view->render($data);\n }", "function services_views_execute_services_view($info) {\n $args = func_get_args();\n array_shift($args);\n\n $view = views_get_view($info['view_name']);\n $view->set_arguments($args);\n $output = $view->render($info['display_id']);\n\n drupal_alter('services_views_execute_view', $output, $view);\n $view->destroy();\n\n return $output;\n}", "public function processView(View $view)\n\t{\n\t\t$broker = $this->getViewBroker();\n\n\t\tif($broker === null)\n\t\t{\n\t\t\t$this->setViewBroker($view->getViewBroker());\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$view->setViewBroker($broker);\n\t\t}\n\n\t\t$view->dispatch();\n\t}", "function launchPage($view=NULL){\n require_once $view;\n }", "public function getView($view, $data = [])\n {\n require_once(\"./views/{$view}\");\n }", "function h2_invokeView(&$controller, $action)\n{\n\treturn($controller->invokeView($action));\n}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Explode the action separator.
protected function explodeActions() { $actions = last($this->explodeKey()); return explode(static::ACTION_SEPARATOR, $actions); }
[ "protected function explodeAction($action)\n {\n return explode(static::ARGS_LIST, $action);\n }", "private function _parseAction($action)\n\t{\n\t\t$parts = array();\n\t\t\n\t\tif(strpos($action, \"/\") === false)\n\t\t\t$parts[0] = $action;\n\t\telse\n\t\t\t$parts = preg_split('/[\\/\\\\\\]/',$action);\n\t\t\n\t\tif($parts[0] == \"\")\n\t\t\t$parts[0] = $this->defaultAction;\n\t\t\n\t\t$parts[0] = ucfirst(strtolower($parts[0]));\n\t\t\n\t\treturn $parts;\n\t}", "private function explodeUrl() {\n $this->explodeAction();\n $this->explodeParams();\n }", "protected function getActionParts() : array {\n return array_map('strtolower', preg_split('/(?=[A-Z])/', $this->getAction()));\n }", "public function getMassActionsSeparator()\n {\n return $this->_recordSeparator;\n }", "public function getSeparator();", "protected function separate()\r\n {\r\n return explode($this->getSeparator(), $this->getQuery());\r\n }", "function AddSeparator(){}", "protected function splitUrl()\n {\n $url = $this->getParam('url');\n\n $url = explode('/', $url);\n $this->setGetParam('controller', $url[0]);\n\n if (isset($url[1])) {\n $this->setGetParam('action', $url[1]);\n }\n }", "static function split($arrItems, $sepator) {\n\t\tif (is_array($arrItems)) {\n \t\t\t$string = implode($sepator, $arrItems);\n \t\t\treturn $string;\n \t\t} else {\n \t\t\treturn $arrItems;\n \t\t}\n\t}", "protected function getTokenSeparators() : array\n {\n return [';'];\n }", "public function getActionIDs()\n\t{\n\t\t$actions = preg_split('/[\\s,]+/', $this->actions, -1, PREG_SPLIT_NO_EMPTY);\n\t\tif (!empty($this->modelClass) && !empty($this->formActions)) {\n\t\t\t$actions = array_merge($actions, preg_split('/[\\s,]+/', $this->formActions, -1, PREG_SPLIT_NO_EMPTY));\n\t\t}\n\t\t$actions = array_unique($actions);\n\n\t\treturn $actions;\n\t}", "protected function parseAction($action)\n {\n if (is_string($action)) {\n return [ 'uses' => $action , 'as' => null ];\n } elseif (!is_array($action)) {\n return [ $action ];\n }\n if (isset($action['middleware']) && is_string($action['middleware'])) {\n $action['middleware'] = explode('|', $action['middleware']);\n }\n return $action;\n }", "public function explodeCustomDelimiter()\n {\n $this->assertSame(['a', 'b', 'c', 'd,e'], Strings::explode('a b c d,e', ' '));\n }", "public function explode_customDelimiter()\n {\n $this->assertSame(['a', 'b', 'c', 'd,e'], S::explode('a b c d,e', ' '));\n }", "function parse_route_action(string $route_action) : array\n{\n return explode('#', $route_action, 2);\n}", "private static function split($separator, $env) {\n return $env ? explode($separator, $env) : [];\n }", "public function explode ( $separator )\n {\n $result = array(\"\");\n\n foreach ( $this->sections AS $section ) {\n\n if ( ( $section->isQuoted() && $this->quoted ) || ( !$section->isQuoted() && $this->unquoted ) )\n $exploded = explode( $separator, $section->__toString() );\n else\n $exploded = array( $section->__toString() );\n\n array_push(\n $result,\n array_pop( $result ) . array_shift( $exploded )\n );\n\n $result = array_merge( $result, $exploded );\n\n }\n\n return $result;\n }", "protected function getLastSeparator()\n {\n return \"and\";\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Operation updateHistoryTimeToLiveByProcessDefinitionKey Update History Time to Live
public function updateHistoryTimeToLiveByProcessDefinitionKey($key, $history_time_to_live_dto = null) { $this->updateHistoryTimeToLiveByProcessDefinitionKeyWithHttpInfo($key, $history_time_to_live_dto); }
[ "public function testUpdateHistoryTimeToLiveByDecisionDefinitionKeyAndTenant()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function updateHistoryTimeToLiveByProcessDefinitionKeyAndTenantId($key, $tenant_id, $history_time_to_live_dto = null)\n {\n $this->updateHistoryTimeToLiveByProcessDefinitionKeyAndTenantIdWithHttpInfo($key, $tenant_id, $history_time_to_live_dto);\n }", "public function updateHistoryTimeToLiveByProcessDefinitionKeyWithHttpInfo($key, $history_time_to_live_dto = null)\n {\n $request = $this->updateHistoryTimeToLiveByProcessDefinitionKeyRequest($key, $history_time_to_live_dto);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n (int) $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? (string) $e->getResponse()->getBody() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n (string) $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n\n return [null, $statusCode, $response->getHeaders()];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\OpenAPI\\Client\\Model\\ExceptionDto',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 404:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\OpenAPI\\Client\\Model\\ExceptionDto',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "public function updateHistoryTimeToLiveByDecisionDefinitionKeyAndTenant($key, $tenant_id, $history_time_to_live_dto = null)\n {\n $this->updateHistoryTimeToLiveByDecisionDefinitionKeyAndTenantWithHttpInfo($key, $tenant_id, $history_time_to_live_dto);\n }", "public function updateHistoryTimeToLiveByProcessDefinitionKeyAsyncWithHttpInfo($key, $history_time_to_live_dto = null)\n {\n $returnType = '';\n $request = $this->updateHistoryTimeToLiveByProcessDefinitionKeyRequest($key, $history_time_to_live_dto);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n return [null, $response->getStatusCode(), $response->getHeaders()];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }", "public function updateHistoryTimeToLiveByProcessDefinitionKeyAndTenantIdAsync($key, $tenant_id, $history_time_to_live_dto = null)\n {\n return $this->updateHistoryTimeToLiveByProcessDefinitionKeyAndTenantIdAsyncWithHttpInfo($key, $tenant_id, $history_time_to_live_dto)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "public function getHistoryTimeToLive(): ?int;", "protected function updateProcessTimeActivity()\n\t{\n\t\tif (!$this->_process->updateTimeLastActivity())\n\t\t{\n\t\t\t$this->log(__CLASS__.'::'.__FUNCTION__.' Can\\'t update listener process activity time, ID = '.$this->_process->id);\n\t\t\t$this->disconnect(Connection::CONNECTION_CLOSE_MODE_SOFT, 'Other listener process captured control');\n\t\t\tthrow new CTIException(CTIException::otherListenerCapturedControl(ListenerProcess::loadCurrentProcessInfo(ListenerProcess::PROCESS_INFO_KEY_ID), $this->_process->id));\n\t\t}\n\t}", "public function updateHistoryTimeToLiveByDecisionDefinitionKeyAndTenantWithHttpInfo($key, $tenant_id, $history_time_to_live_dto = null)\n {\n $request = $this->updateHistoryTimeToLiveByDecisionDefinitionKeyAndTenantRequest($key, $tenant_id, $history_time_to_live_dto);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n (int) $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? (string) $e->getResponse()->getBody() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n (string) $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n\n return [null, $statusCode, $response->getHeaders()];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\OpenAPI\\Client\\Model\\ExceptionDto',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 404:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\OpenAPI\\Client\\Model\\ExceptionDto',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "function updateHistory() {\n\t\t//See if we already have history for this timestamp\n\t\t//TODO: Make this more efficient\n\t\t$now = time();\n\t\t\n\t\t$r = $this->History->find('first', array(\n\t\t\t'conditions' => array('time' => $now)\n\t\t));\n\t\tif(empty($r))\n\t\t{\n\t\t\t$fspeed = 0;\n\t\t\t$stats = $this->Stat->find('list',\n\t\t\t\tarray(\n\t\t\t\t\t'fields' => array('Stat.id', 'Stat.speed')\n\t\t\t\t)\n\t\t\t);\n\t\t\tforeach($stats as $id => $speed) {\n\t\t\t\t$fspeed += $speed;\n\t\t\t}\n\n\t\t\t//Add to global stats\n\t\t\t$this->History->save(\n\t\t\t\tarray(\n\t\t\t\t\t'History' => array(\n\t\t\t\t\t\t'time' => $now,\n\t\t\t\t\t\t'speed' => $fspeed\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}", "public function updateHistoryTimeToLiveByProcessDefinitionIdWithHttpInfo($id, $history_time_to_live_dto = null)\n {\n $request = $this->updateHistoryTimeToLiveByProcessDefinitionIdRequest($id, $history_time_to_live_dto);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n (int) $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? (string) $e->getResponse()->getBody() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n (string) $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n\n return [null, $statusCode, $response->getHeaders()];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\OpenAPI\\Client\\Model\\ExceptionDto',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 404:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\OpenAPI\\Client\\Model\\ExceptionDto',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "public function updateHistoryTimeToLiveByDecisionDefinitionKeyAndTenantAsync($key, $tenant_id, $history_time_to_live_dto = null)\n {\n return $this->updateHistoryTimeToLiveByDecisionDefinitionKeyAndTenantAsyncWithHttpInfo($key, $tenant_id, $history_time_to_live_dto)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "public function setTimeToLive($timeToLive);", "abstract protected function defineCacheTimeToLive();", "public function setHistory($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->history !== $v) {\n $this->history = $v;\n $this->modifiedColumns[SkillVersionTableMap::COL_HISTORY] = true;\n }\n\n return $this;\n }", "public function updateFreshness() {\n $this->databaseHandle->exec(\"UPDATE deployment SET last_change = CURRENT_TIMESTAMP WHERE deployment_id = $this->identifier\");\n }", "public function deleteHistoricProcessInstance(?string $processInstanceId): void;", "public function testActionHistoryUpdateEnds()\n {\n $this->_cron->actionHistoryUpdate();\n }", "private function addHistory()\n {\n if ($this->list_object->is_history_logic) {\n $this->save_arr[\"created_user_id\"] = Auth::user()->id;\n $this->save_arr[\"created_time\"] = $this->time_now;\n $this->save_arr[\"modified_user_id\"] = Auth::user()->id;\n $this->save_arr[\"modified_time\"] = $this->time_now;\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return available font weight styles list
public function get_available_font_weight_styles() { return [ '100' => esc_html__( '100', 'jet-cw' ), '200' => esc_html__( '200', 'jet-cw' ), '300' => esc_html__( '300', 'jet-cw' ), '400' => esc_html__( '400', 'jet-cw' ), '500' => esc_html__( '500', 'jet-cw' ), '600' => esc_html__( '600', 'jet-cw' ), '700' => esc_html__( '700', 'jet-cw' ), '800' => esc_html__( '800', 'jet-cw' ), '900' => esc_html__( '900', 'jet-cw' ), ]; }
[ "public function fontWeightProvider()\n {\n return [\n [100],\n [200],\n [300],\n [400],\n [500],\n [600],\n [700],\n [800],\n [900],\n [\"thin\"],\n [\"extra-light\"],\n [\"extralight\"],\n [\"ultra-light\"],\n [\"light\"],\n [\"regular\"],\n [\"normal\"],\n [\"book\"],\n [\"roman\"],\n [\"medium\"],\n [\"semi-bold\"],\n [\"semibold\"],\n [\"demi-bold\"],\n [\"demibold\"],\n [\"bold\"],\n [\"extra-bold\"],\n [\"extrabold\"],\n [\"ultra-bold\"],\n [\"ultrabold\"],\n [\"black\"],\n [\"heavy\"],\n [\"lighter\"],\n [\"bolder\"]\n ];\n }", "function getFontWeight(){}", "public function getFontWeight () {}", "public function getFontWeight() {}", "public function getfontweight()\n {\n }", "public function fontWeights()\n {\n $sql = \"SELECT dctw.id, dctw.css, dctw.`name`\n\t\t\t\tFROM designer_css_text_weight dctw\n\t\t\t\tORDER BY dctw.sort_order\";\n $stmt = $this->_db->prepare($sql);\n $stmt->execute();\n\n $result = $stmt->fetchAll();\n\n $rows = array();\n\n foreach ($result as $row) {\n $rows[$row['id']] = array(\n 'name' => $row['name'],\n 'css' => $row['css'],\n );\n }\n\n return $rows;\n }", "function oo_get_font_styles() {\n\treturn array(\n\t\t'normal' => 'Normal',\n\t\t'italic' => 'Italic',\n\t\t'bold' => 'Bold',\n\t\t'bold italic' => 'Bold Italic'\n\t);\n}", "static public function get_font_weight_strings() {\n\t\treturn apply_filters( 'fl_builder_font_weight_strings', array(\n\t\t\t'default' => __( 'Default', 'fl-builder' ),\n\t\t\t'regular' => __( 'Regular', 'fl-builder' ),\n\t\t\t'italic' => __( 'Italic', 'fl-builder' ),\n\t\t\t'100' => __( 'Thin', 'fl-builder' ),\n\t\t\t'100i' => __( 'Thin Italic', 'fl-builder' ),\n\t\t\t'100italic' => __( 'Thin Italic', 'fl-builder' ),\n\t\t\t'200' => __( 'Extra-Light', 'fl-builder' ),\n\t\t\t'200i' => __( 'Extra-Light Italic', 'fl-builder' ),\n\t\t\t'200italic' => __( 'Extra-Light Italic', 'fl-builder' ),\n\t\t\t'300' => __( 'Light', 'fl-builder' ),\n\t\t\t'300i' => __( 'Light Italic', 'fl-builder' ),\n\t\t\t'300italic' => __( 'Light Italic', 'fl-builder' ),\n\t\t\t'400' => __( 'Normal', 'fl-builder' ),\n\t\t\t'400i' => __( 'Normal Italic', 'fl-builder' ),\n\t\t\t'400italic' => __( 'Normal Italic', 'fl-builder' ),\n\t\t\t'500' => __( 'Medium', 'fl-builder' ),\n\t\t\t'500i' => __( 'Medium Italic', 'fl-builder' ),\n\t\t\t'500italic' => __( 'Medium Italic', 'fl-builder' ),\n\t\t\t'600' => __( 'Semi-Bold', 'fl-builder' ),\n\t\t\t'600i' => __( 'Semi-Bold Italic', 'fl-builder' ),\n\t\t\t'600italic' => __( 'Semi-Bold Italic', 'fl-builder' ),\n\t\t\t'700' => __( 'Bold', 'fl-builder' ),\n\t\t\t'700i' => __( 'Bold Italic', 'fl-builder' ),\n\t\t\t'700italic' => __( 'Bold Italic', 'fl-builder' ),\n\t\t\t'800' => __( 'Extra-Bold', 'fl-builder' ),\n\t\t\t'800i' => __( 'Extra-Bold Italic', 'fl-builder' ),\n\t\t\t'800italic' => __( 'Extra-Bold Italic', 'fl-builder' ),\n\t\t\t'900' => __( 'Ultra-Bold', 'fl-builder' ),\n\t\t\t'900i' => __( 'Ultra-Bold Italic', 'fl-builder' ),\n\t\t\t'900italic' => __( 'Ultra-Bold Italic', 'fl-builder' ),\n\t\t) );\n\t}", "function flo_get_font_styles() {\n\treturn array(\n\t\t'normal' => 'Normal',\n\t\t'italic' => 'Italic',\n\t\t'bold' => 'Bold',\n\t\t'bold italic' => 'Bold Italic'\n\t);\n}", "function HasFontWeight(){}", "public function getFontStyles(){\n\t\t$fonts = array(\n\t\t\t'System Fonts' => array(\n\t\t\t\t'serif' => 'Serif',\n\t\t\t\t'sans-serif' => 'Sans Serif',\n\t\t\t),\n\t\t\t'Google Fonts' => array(\n\t\t\t\t'Open Sans' => 'Open Sans',\n\t\t\t\t'Oswald' => 'Oswald',\n\t\t\t\t'Lora' => 'Lora',\n\t\t\t\t'Love Ya Like A Sister' => 'Love Ya Like A Sister',\n\t\t\t\t'Raleway' => 'Raleway',\n\t\t\t\t'Cinzel' => 'Cinzel',\n\t\t\t\t'Stalemate' => 'Stalemate',\n\t\t\t\t'Poller One' => 'Poller One',\n\t\t\t\t'Eagle Lake' => 'Eagle Lake',\n\t\t\t\t'The Girl Next Door' => 'The Girl Next Door',\n\t\t\t\t'Finger Paint' => 'Finger Paint',\n\t\t\t\t'Frijole' => 'Frijole',\n\t\t\t\t'Loved by the King' => 'Loved by the King',\n\t\t\t\t'Happy Monkey' => 'Happy Monkey',\n\t\t\t\t'Nunito' => 'Nunito'\n\t\t\t)\n\t\t);\n\t\treturn $fonts;\n\t}", "public function getFontWeight()\n {\n return $this->fontWeight;\n }", "function studiare_get_font_weight_array($first_empty = false) {\n\t$font_weights = array();\n\n\tif ($first_empty) {\n\t\t$font_weights[''] = '';\n\t}\n\n\t$font_weights['100'] = esc_html__('Thin 100', 'studiare');\n\t$font_weights['200'] = esc_html__('Extra-Light 200', 'studiare');\n\t$font_weights['300'] = esc_html__('Light 300', 'studiare');\n\t$font_weights['400'] = esc_html__('Regular 400', 'studiare');\n\t$font_weights['500'] = esc_html__('Medium 500', 'studiare');\n\t$font_weights['600'] = esc_html__('Semi-Bold 600', 'studiare');\n\t$font_weights['700'] = esc_html__('Bold 700', 'studiare');\n\t$font_weights['800'] = esc_html__('Extra-Bold 800', 'studiare');\n\t$font_weights['900'] = esc_html__('Ultra-bold 900', 'studiare');\n\n\treturn $font_weights;\n}", "public function getFontStyle () {}", "function StyleGetWeight($style){}", "public static function get_font_style() {\n\treturn array(\n\t array('value' => 'italic', 'name' => __('Italic', 'themify'), 'icon' => '<span class=\"tb_font_italic\">I</span>'),\n\t array('value' => 'normal', 'name' => __('Normal', 'themify'), 'icon' => 'N')\n\t);\n }", "public function getFontStyles()\n\t{\n\t\treturn $this->_aFontStyles;\n\t}", "public function fontStyleProvider()\n {\n return [[\"normal\"], [\"italic\"], [\"oblique\"]];\n }", "function get_font_weight( $variant ) {\n\t\t$variant = str_replace( 'italic', '', $variant );\n\t\tif ( in_array( $variant, array( '100', '200', '300', '400', '500', '600', '700', '800', '900' ) ) ) {\n\t\t\treturn $variant;\n\t\t}\n\t\treturn '';\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Remove Conferencium entity from collection (one to many).
public function removeConferencium(Conferencium $conferencium) { $this->conferencia->removeElement($conferencium); return $this; }
[ "public function remove()\n {\n $this->images = $this->images->filter(function (Image $image) {\n $this->deletedImages[] = $image;\n $image->remove();\n return false; // returning false will remove from new collection\n });\n }", "abstract public function removeQuestionSetRelatedData();", "public function remove($oneOrManyEntities): void;", "public function removeFromRelatedGroup() {\n\t\t$this->saveField(\"related_to\", null);\n\t\t$report = $this->findByRelatedTo($this->id);\n\t\tif ($report) {\n\t\t\t$this->updateAll(\n\t\t\t\tarray(\"related_to\" => $report[\"Report\"][\"id\"]),\n\t\t\t\tarray(\"related_to\" => $this->id)\n\t\t\t);\n\t\t}\n\t}", "public function deleteExpendablesRelationship(){\n\n $expendables = $this->expendables()->get();\n\n foreach ($expendables as $expendable) {\n $expendable->setWardrobeidNull();\n }\n }", "public function deleteMany(){}", "function removeCollection()\n {\n $collection = eZProductCollection::fetch( $this->attribute( 'productcollection_id' ) );\n $collection->remove();\n }", "public function clearNotificacionsRelatedById_emisor()\n\t{\n\t\t$this->collNotificacionsRelatedById_emisor = null; // important to set this to NULL since that means it is uninitialized\n\t}", "public function preRemove($entity);", "public function cascade()\n {\n foreach ($this->dependants as $dependent) {\n\n $related = $this->{$dependent}()->get();\n\n foreach ($related as $model) {\n if ($this->{$dependent}() instanceof BelongsToMany) {\n $this->{$dependent}()->detach($model->id);\n }\n $model->delete();\n }\n }\n\n $this->delete();\n }", "public function deleteRelatedData(){\n $modelManager = \\Phalcon\\Di::getDefault()->getShared('modelsManager');\n $relations = $modelManager->getRelations(get_class( $this ));\n foreach($relations as $relation)\n {\n if($relation->getType() == 2){ //only has many\n $referenceModel = $relation->getReferencedModel();\n $this->$referenceModel->delete();\n }\n }\n }", "public function remove($entity);", "function remove($entity);", "public function collectionCleanup(GenericEvent $event) {\n $collection = $event->getSubject();\n\n if (!($collection instanceof GrundCollection)) {\n return;\n }\n\n $this->em->remove($collection);\n $this->em->flush();\n }", "function clearAssociations(){\n $this->associations = array();\n return $this; // Allow chaining\n }", "public function testUpdateEntityWithUnsetCollection(): void\n {\n $e = new User();\n $e->email = 'test@email.com';\n $e->balance = 300;\n\n $this->captureWriteQueries();\n $this->save($e);\n $this->assertNumWrites(1);\n $this->assertIsIterable($e->comments);\n\n $e->comments = null;\n\n $this->captureWriteQueries();\n $this->save($e);\n $this->assertNumWrites(0);\n }", "public function cleanRemoved();", "public function removeCollection(\\TeckHouse\\AnalyticsBundle\\Document\\Collection $collection);", "public function fulldelete() {\n if ($this->id && !$this->elements) {\n $this->elements = self::get_instances(array('setid' => $this->id));\n }\n\n foreach ($this->elements as $elm) {\n $elm->delete();\n }\n\n parent::delete();\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
===================================== COMIC FUNCTIONS (HIGH LEVEL) =================================================== // download a comic, depending on its download mode.
public function Download($comic) { if (!($comic['url'] && ($comic['active'] == 1))) return; $this->DebugMsg("Downloading {$comic['name']} (id: {$comic['comic_id']}; mode: {$comic['fetch_mode']})..."); switch($comic['fetch_mode']) { // generic comic fetch: download page, then find strip files. case 1: if (!$this->GetComic($comic['comic_id'], $comic['url'], $comic['file_path'], $comic['num_files'], $comic['min_size'])) $this->NotFound($comic); break; // this is for comics where the main page has a bunch of links, and each link must be accessed separately. Never more than two pages deep. // the file_path field in the DB can contain 2 parts: // - match pattern for the script/image URLs (including one set of parens that denote the url to execute, prefixed by the base url) from the main page retrieved // - (optional) match pattern for any images that are to be retrieved from the second document retrieved (absolute or relative URLs) case 2: $script = $this->GetFile($comic['url']); $searchParams = explode('|',$comic['file_path']); $count = 0; // match against the first level regexp if (preg_match_all($searchParams[0], $script, $match)) { // fetch each of these urls (to a limit), and retrieve all images from that page. foreach($match[1] as $m) { // prepend the base of the script URL if there was no http in the target (also below). assumes $m starts with a / $internalReferer = BuildURL($comic['url'], $m); $internalScript = $this->GetFile($internalReferer, $comic['url']); // if there was an internal search specified, retrieve internal images. there could be more than one. if (isset($searchParams[1])) { if(preg_match_all($searchParams[1], $internalScript, $internalMatch)) { foreach($internalMatch[1] as $im) { $imUrl = BuildURL($comic['url'], $im); if (!$this->ProcessComic($this->GetFile($imUrl, $internalReferer), $comic['comic_id'], FindTitleTag($im, $internalScript), md5($comic['comic_id'].$imUrl))) $this->NotFound($comic); } } } else { if (!$this->ProcessComic($internalScript, $comic['comic_id'], FindTitleTag($m, $script), md5($comic['comic_id'].$internalReferer))) $this->NotFound($comic); } // num_files for these comics pertains to the number of pages to load, as opposed to the number of files to return. $count++; if ($count == $comic['num_files']) break; } } else $this->NotFound($comic); break; // the Cheezburger sites. These pages have lots of images and lots of structure so it's not easy to haul stuff out without DOM manipulation. case 3: $url = $comic['url']; $stopImage = $comic['file_path']; $newStopImage = null; $foundStopImage = false; $count = 0; $page = 1; while((!$foundStopImage) && $count < $comic['num_files']) { if ($this->testing) $this->DebugMsg(" - Loading {$url}..."); $dom = @DOMDocument::loadHTML($this->GetFile($url)); $xp = new DOMXpath($dom); $item = $xp->evaluate("//div[@class = 'post-asset-inner']"); foreach($item as $i) { $srcArray = $title = $id = $src = null; $data = $i->getElementsByTagName('img'); if ($data->length > 0) { $d = $data->item(0); $id = $d->getAttribute('id'); $src = $d->getAttribute('src'); $title = $d->getAttribute('title'); // if we've handled this image before for this site, then stop. if ($id == $stopImage) { $foundStopImage = true; break; } // set the new "last seen image" id so the script knows where to stop if (!$newStopImage) $newStopImage = $id; // add this image to the database if (!$this->ProcessComic($this->GetFile($src, $url), $comic['comic_id'], $title)) $this->NotFound($comic); $count++; if ($count == $comic['num_files']) break; } // if there wasn't an image in the div, then handle video. else { $data = $i->getElementsByTagName('div'); if ($data->length > 0) { $id = $data->item(0)->getAttribute('id'); $iframe = $i->getElementsByTagName('iframe'); // if there was no iframe, then go to the next one. if (!$iframe->length) continue; $title = $i->parentNode->parentNode->parentNode->getElementsByTagName('h2')->item(0)->getElementsByTagName('a')->item(0)->nodeValue; // pass the video init stuff to the video class framework $src = $iframe->item(0)->getAttribute('src'); if ($videoObj = Video::init($src, $this)) { // some videos have no functionality; if that's the case, continue. if ($videoObj->noData()) continue; // don't add when testing... if ($this->testing) $this->DebugMsg(" - Iframe link found: {$src} - {$title} - {$videoObj->getLink()} - {$videoObj->getMode(true)}"); else { if($fileName = $this->SaveFile($videoObj->getThumbfile(), $videoObj->getMd5())) { $this->DebugMsg(" - Adding iframe link: {$src} - {$title} - {$videoObj->getLink()}"); $this->db->Execute("CALL ADDCOMIC({$comic['comic_id']}, '{$videoObj->getMd5()}', '{$videoObj->getImageMimeType()}', '{$this->db->escape($title)}', '{$videoObj->getLink()}', {$videoObj->getMode()})"); } } } // if there was no thumbnail, the next part will fail horribly, so notify my and skip this. else { $this->DebugMsg(" - No thumbFile found, skipping this video: Source: {$src}, Title: {$title}, ID: {$id}, URL: {$comic['url']}"); $this->AddError($comic, '- No thumbFile found'); $this->AddError($comic, " * Source: {$src}"); $this->AddError($comic, " * Title: {$title}"); $this->AddError($comic, " * ID: {$id}"); $this->AddError($comic, " * URL: {$comic['url']}"); continue; } } } } // if we haven't found the last image yet, then go to the next page. if (!$foundStopImage) $url = $comic['url'].'page/'.++$page; } // we save the id of the first image we saw so the script knows where to stop next time. if ((!$this->testing) && $newStopImage) $this->db->Execute("update comics set file_path = '{$newStopImage}' where comic_id = {$comic['comic_id']}"); break; // Baby Blues. From their site, not the King Features syndicated newspaper sites, which are nearly impossible to navigate (nb: not currently used) case 4: $this->GetComic($comic['comic_id'], $comic['url']); $searchParams = explode('|', $comic['file_path']); if (!(grep($this->DOWNLOAD_DIR."/{$comic['comic_id']}/{$searchParams[0]}", $searchParams[1], $matches) && $this->ProcessComic($this->GetFile($matches[0], $comic['url']), $comic['comic_id']))) $this->NotFound($comic); break; // Oglaf.com. Another weird structure: main page refers to first page of a story, but there could be more, have to follow links. case 5: // hit the page first to create the session cookie, and to accept the "over 18" thing. $cookie = $this->DOWNLOAD_DIR.'/oglaf.cookie.txt'; $this->GetComic($comic['comic_id'], $comic['url'], null, null, null, true, null, $cookie, "--post-data 'over18=%C2%A0'"); $parsed_url = parse_url($comic['url']); $url = $parsed_url['host'].'/'; $searchParams = explode('|', $comic['file_path']); do { $this->GetComic($comic['comic_id'], 'http://'.$url, null, null, null, true, null, $cookie); if (preg_match($searchParams[0], file_get_contents($this->DOWNLOAD_DIR."/{$comic['comic_id']}/{$url}index.html"), $newUrl)) $url = preg_filter($searchParams[1], $parsed_url['host'].'/$1', $newUrl[0]); else $url = ''; } while ($url); if (!$this->GetComic($comic['comic_id'], null, $searchParams[2])) $this->NotFound($comic); break; // - this is identical to case 2, except the next level of matching occurs on the result of the first level of matching (allowing nested regexp processing // - levels of regexps must be separated by a pipe. case 6: $script = $this->GetFile($comic['url']); $searchParams = explode('|',$comic['file_path']); $count = 0; // match against the first level regexp if (preg_match_all($searchParams[0], $script, $match)) { // each of these will be regexp'ed again for the actual URLs.fetch each of these urls (to a limit), and retrieve all images from that page. foreach($match[1] as $m) { // if there was an internal search specified, retrieve internal images. there could be more than one. if (isset($searchParams[1])) { if(preg_match_all($searchParams[1], $m, $internalMatch)) { foreach($internalMatch[1] as $im) { $imUrl = BuildURL($comic['url'], $im); if (!$this->ProcessComic($this->GetFile($imUrl, $comic['url']), $comic['comic_id'], FindTitleTag($im, $script), md5($comic['comic_id'].$imUrl))) $this->NotFound($comic); } } } else { // this should work like case 2 if no second search param is provided. $internalReferer = BuildURL($comic['url'], $m); $internalScript = $this->GetFile($internalReferer, $comic['url']); if (!$this->ProcessComic($internalScript, $comic['comic_id'], FindTitleTag($m, $script), md5($comic['comic_id'].$internalReferer))) $this->NotFound($comic); } // num_files for these comics pertains to the number of pages to load, as opposed to the number of files to return. $count++; if ($count == $comic['num_files']) break; } } else $this->NotFound($comic); break; } $this->DebugMsg("=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-="); }
[ "function isDownloadable();", "public function download() {\t\t}", "abstract function actionDownload();", "private function GetComic($id, $url, $file=null, $maxFiles=null, $minSize=null, $hashFileName=true, $referer=null, $cookieFile=self::COOKIE_FILE, $extra=null)\n {\n $this->DebugMsg(\" - GetComic call: $id, $url, $file, $maxFiles, $minSize, $referer, $cookieFile\");\n\n // for easier searching for title tags\n $dir = $this->DOWNLOAD_DIR.\"/{$id}\";\n if(!is_dir($dir))\n mkdir($dir);\n\n chdir($dir);\n\n // process the URL\n $this->wget($url, $cookieFile, $referer, $extra);\n\n // if the file to fetch is empty, then return false (not necessarily a bad thing)\n if (!$file)\n return false;\n\n // size limit (to filter out small files that are probably not comics)\n $sizeLimit = ($minSize ? \"-size +{$minSize}\" : null);\n\n // if we only want a certain number, find files matching the pattern, ordered by size in descending order\n // otherwise find all files and sort alphabetically\n if ($maxFiles)\n {\n $findStr = \"find {$file} {$sizeLimit} -type f -exec du -sk {} \\; 2>&1 | sort -nr\";\n exec($findStr, $results);\n foreach($results as &$r)\n $r = preg_replace('/\\d*\\s*(.*)/', '\\1', $r);\n }\n else\n {\n $findStr = \"find {$file} {$sizeLimit} -type f 2>&1 | sort\";\n exec($findStr, $results);\n }\n\n $this->DebugMsg(\" - {$findStr}\\n====================\\n\".print_r($results,true).\"====================\");\n\n // if \"no such file\" was there, the file wasn't found.\n if (!isset($results[0]))\n {\n $this->AddError($id, '- find results missing');\n $this->AddError($id, print_r(debug_backtrace(), true));\n }\n elseif (strpos($results[0], 'No such file') === false)\n {\n $count = 0;\n foreach($results as $comicFile)\n {\n // try to find a title tag for this comic. Some comics don't have the full $comicFile var in the image, so strip it down to just the path.\n $imgPath = parse_url('http://'.$comicFile);\n if(grep ('.', '/<img[^>]*'.str_replace('/', '\\/', substr($imgPath['path'],1)).'[^>]*>/i', $imgTagScan))\n $titleTag = html_entity_decode(preg_filter('/.*title\\s*=\\s*\"([^\"]*).*/i', '$1', preg_replace(\"/[\\r\\n]/\", '', $imgTagScan[0])), ENT_QUOTES);\n else\n $titleTag = null;\n\n // create the md5 based on the filename\n $this->ProcessComic(file_get_contents($comicFile), $id, $titleTag, ($hashFileName ? md5($id.$comicFile) : null));\n $count++;\n if ($count == $maxFiles)\n break;\n }\n\n return true;\n }\n }", "function instant_download($product_id) {\n\t //echo \"PICKIT:\",$file; \n \n\t switch ($this->type) {\n\t\t\t\t\n case 'fullversion' :\n\t\t $file = paramload('SHELL','prpath') . \n\t\t\t\t\t\t\t paramload('RCPICKIT','dirsource') . \n\t\t\t\t\t\t\t\t\t $product_id . \n\t\t\t\t\t\t\t\t\t paramload('RCPICKIT','filetype');\n\t\t\t\t\t\t\t break;\n\t\t\t\t\t\t\t \n\t case 'shareware' : $file = paramload('SHELL','prpath') . \n\t\t\t\t\t\t\t paramload('RCDOWNLOAD','dirsource') . \n\t\t\t\t\t\t\t\t \t $product_id . \n\t\t\t\t\t\t\t\t\t paramload('RCDOWNLOAD','filetype');\n\t\t\t\t\t\t\t break;\n\t }\t \n\n $downloadfile = new DOWNLOADFILE($file);\n\t \n //$this->tell_by_mail(\n\t GetGlobal('controller')->calldpc_method(\"rcdownload.tell_by_mail use \" .\n\t $this->type . \" file downloaded\".\"+\".\n\t 'support@re-coding.com'.\"+\".\n\t\t 'billy@re-coding.com'.\"+\".\n\t\t\t\t\t\t $file);\t \t \n\t \n if (!$downloadfile->df_download()) {\n\t //echo \"Sorry, we are experiencing technical difficulties downloading this file. Please report this error to Technical Support.\";\t \t \n $ret = $this->error;\t \n\t }\n\t //else\n\t // $ret = \"OK\";\t\n\t \n\t return ($ret);\n }", "function downloadFile()\n\t{\n\t\tglobal $ilAccess, $ilias, $lng;\n\t\t\n\t\tif (!$ilAccess->checkAccess(\"read\", \"\", $_GET[\"ref_id\"]))\n\t\t{\n\t\t\t$ilias->raiseError($lng->txt(\"permission_denied\"),$ilias->error_obj->MESSAGE);\n\t\t}\n\n\t\t$file = explode(\"_\", $_GET[\"file_id\"]);\n\t\tinclude_once(\"./Modules/File/classes/class.ilObjFile.php\");\n\t\t$fileObj =& new ilObjFile($file[count($file) - 1], false);\n\t\t$fileObj->sendFile();\n\t\texit;\n\t}", "public function downloadFile();", "function io_download($url,$file,$useAttachment=false,$defaultName='',$maxSize=2097152){\n global $conf;\n $http = new DokuHTTPClient();\n $http->max_bodysize = $maxSize;\n $http->timeout = 25; //max. 25 sec\n $http->keep_alive = false; // we do single ops here, no need for keep-alive\n\n $data = $http->get($url);\n if(!$data) return false;\n\n $name = '';\n if ($useAttachment) {\n if (isset($http->resp_headers['content-disposition'])) {\n $content_disposition = $http->resp_headers['content-disposition'];\n $match=array();\n if (is_string($content_disposition) &&\n preg_match('/attachment;\\s*filename\\s*=\\s*\"([^\"]*)\"/i', $content_disposition, $match)) {\n\n $name = utf8_basename($match[1]);\n }\n\n }\n\n if (!$name) {\n if (!$defaultName) return false;\n $name = $defaultName;\n }\n\n $file = $file.$name;\n }\n\n $fileexists = @file_exists($file);\n $fp = @fopen($file,\"w\");\n if(!$fp) return false;\n fwrite($fp,$data);\n fclose($fp);\n if(!$fileexists and $conf['fperm']) chmod($file, $conf['fperm']);\n if ($useAttachment) return $name;\n return true;\n}", "function ied_plugin_download()\n{\n if (gps('ied_plugin_download')) {\n $type = gps('type');\n switch ($type) {\n case 'zip':\n case 'txt':\n ied_plugin_save_as_file();\n break;\n case 'php':\n ied_plugin_save_as_php_file();\n break;\n case 'textpack':\n ied_plugin_save_as_textpack();\n break;\n }\n }\n}", "public function download(){\r\n\t\tdownload($this->arquivo_nome);\r\n\t}", "abstract function download_asynch($rempath, $locpath, $mode = 'auto');", "function doDownloadFile() {\n\t\t$this->db = xn(\"db\");\n\t\t$this->collection = xn(\"collection\");\n\t\t$this->id = xn(\"id\");\n\t\t$db = $this->_mongo->selectDB($this->db);\n\t\t$prefix = substr($this->collection, 0, strrpos($this->collection, \".\"));\n\t\t$file = $db->getGridFS()->findOne(array(\"_id\" => rock_real_id($this->id)));\n\t\t$fileinfo = pathinfo($file->getFilename());\n\t\t$extension = strtolower($fileinfo[\"extension\"]);\n\t\timport(\"lib.mime.types\", false);\n\t\tob_end_clean();\n\t\tif (isset($mime_types[$extension])) {\n\t\t\theader(\"Content-Type:\" . $mime_types[$extension]);\n\t\t}\n\t\telse {\n\t\t\theader(\"Content-Type:text/plain\");\n\t\t}\n\t\theader(\"Content-Disposition: attachment; filename=\" . $fileinfo[\"basename\"]);\n\t\theader(\"Content-Length:\" . $file->getSize());\n\t\techo $file->getBytes();\n\t\texit;\n\t}", "function sendPrroductDownloadToBrowser() {\n $transaction = getTransaction($_GET['id']);\n if ($transaction['status'] == \"valid\") {\n header(\"Content-Type: application/octet-stream\");\n header(\"Content-Transfer-Encoding: binary\");\n header(\"Content-Description: File Transfer\");\n if ($_GET[\"oto\"] && $transaction['oto']) {\n $fparts = explode(\"/\", $sys_oto_location);\n $filename = $fparts[count($fparts)-1];\n header(\"Content-Disposition: attachment; filename=$filename\");\n @readfile($sys_oto_location);\n } else {\n $fparts = explode(\"/\", $sys_item_location);\n $filename = $fparts[count($fparts)-1];\n header(\"Content-Disposition: attachment; filename=$filename\");\n @readfile($sys_item_location);\n }\n exit;\n } elseif ($transaction['status'] == \"expired\") {\n $filename = \"downloadexpired.html\";\n } else {\n $filename = \"invalid.html\";\n }\n showTemplate($filename);\n }", "function download_file()\n\t{\n\t\t$filename = AppRequest::get('filename');\n\t\t$fileType = AppRequest::get('filetype');\n\t\t//$fileid = $_REQUEST['fileid'];\n\t\t$filesize = AppRequest::get('filesize');\n\n\t\t//Added for enhancement from Rosa Weber\n\n\t\tif (AppRequest::get('module') == 'Invoice' || AppRequest::get('module') == 'Quotes') {\n\t\t\t$id = AppRequest::get('id');\n\t\t\t$block = AppRequest::get('module');\n\t\t\t$params = array('id' => \"$id\", 'block' => \"$block\", 'contactid' => $_SESSION[\"loggeduser\"]['id'], 'sessionid' => $_SESSION[\"loggeduser\"]['sessionid']);\n\t\t\t$fileContent = $GLOBALS[\"sclient\"]->call('get_pdf', $params);\n\t\t\t$fileType = 'application/pdf';\n\t\t\t$fileContent = $fileContent[0];\n\t\t\t$filesize = strlen(base64_decode($fileContent));\n\t\t\t$filename = \"$block.pdf\";\n\t\t} else if (AppRequest::get('module') == 'Documents') {\n\t\t\t$id = AppRequest::get('id');\n\t\t\t$folderid = AppRequest::get('folderid');\n\t\t\t$block = AppRequest::get('module');\n\t\t\t$params = array('id' => \"$id\", 'folderid' => \"$folderid\", 'block' => \"$block\", 'contactid' => $_SESSION[\"loggeduser\"]['id'], 'sessionid' => $_SESSION[\"loggeduser\"]['sessionid']);\n\t\t\t$result = $GLOBALS[\"sclient\"]->call('get_filecontent_detail', $params);\n\t\t\t$fileType = $result[0]['filetype'];\n\t\t\t$filesize = $result[0]['filesize'];\n\t\t\t$filename = html_entity_decode($result[0]['filename']);\n\t\t\t$fileContent = $result[0]['filecontents'];\n\t\t} else {\n\t\t\t$ticketid = AppRequest::get('id');\n\t\t\t$fileid = AppRequest::get('fileid');\n\t\t\t//we have to get the content by passing the customerid, fileid and filename\n\t\t\t$customerid = $_SESSION[\"loggeduser\"]['id'];\n\t\t\t$sessionid = $_SESSION[\"loggeduser\"]['sessionid'];\n\t\t\t$params = array(array('id' => $customerid, 'fileid' => $fileid, 'filename' => $filename, 'sessionid' => $sessionid, 'ticketid' => $ticketid));\n\t\t\t$fileContent = $GLOBALS[\"sclient\"]->call('get_filecontent', $params);\n\t\t\t$fileContent = $fileContent[0];\n\t\t\t$filesize = strlen(base64_decode($fileContent));\n\t\t}\n\t\t// : End\n\t\t//we have to get the content by passing the customerid, fileid and filename\n\t\t$customerid = $_SESSION[\"loggeduser\"]['id'];\n\t\t$sessionid = $_SESSION[\"loggeduser\"]['sessionid'];\n\n\t\theader(\"Content-type: $fileType\");\n\t\theader(\"Content-length: $filesize\");\n\t\theader(\"Cache-Control: private\");\n\t\theader(\"Content-Disposition: attachment; filename=$filename\");\n\t\theader(\"Content-Description: PHP Generated Data\");\n\t\techo base64_decode($fileContent);\n\t\texit;\n\t}", "public function doDownloadFile() {\n\t\t$this->db = xn(\"db\");\n\t\t$this->collection = xn(\"collection\");\n\t\t$this->id = xn(\"id\");\n\t\t$db = $this->_mongo->selectDB($this->db);\n\t\t$prefix = substr($this->collection, 0, strrpos($this->collection, \".\"));\n\t\t$file = $db->getGridFS($prefix)->findOne(array(\"_id\" => rock_real_id($this->id)));\n\t\t$fileinfo = pathinfo($file->getFilename());\n\t\t$extension = strtolower($fileinfo[\"extension\"]);\n\t\timport(\"lib.mime.types\", false);\n\t\tob_end_clean();\n\t\tif (isset($GLOBALS[\"mime_types\"][$extension])) {\n\t\t\theader(\"Content-Type:\" . $GLOBALS[\"mime_types\"][$extension]);\n\t\t}\n\t\telse {\n\t\t\theader(\"Content-Type:text/plain\");\n\t\t}\n\t\theader(\"Content-Disposition: attachment; filename=\" . $fileinfo[\"basename\"]);\n\t\theader(\"Content-Length:\" . $file->getSize());\n\t\techo $file->getBytes();\n\t\texit;\n\t}", "public function is_downloadable() {\n return false;\n }", "public function fetchDownloadableResult();", "function download_file($file) {\n\tglobal $camp_link; \n\n\t// restrict downloaded files to .Group and .Mission files\n\t$allowedExts = array(\"Group\", \"group\", \"Mission\", \"mission\");\n\n\t$DownloadDir = \"downloads/\";\n\n\t$path = \"$DownloadDir\".\"$file\";\n//\techo \"\\$path: $path<br />\\n\";\n\n\tif (file_exists($path)) {\n\n\t\t$tmp = explode(\".\", $path);\n\t\t$extension = end($tmp);\n//\t\techo \"\\$extension: $extension<br />\\n\";\n\n\t\tif (in_array($extension, $allowedExts)) {\n \t\theader('Content-Description: File Transfer');\n\t\t header('Content-Type: application/octet-stream');\n\t\t header('Content-Disposition: attachment; filename='.basename($path));\n\t\t header('Content-Transfer-Encoding: binary');\n\t\t header('Expires: 0');\n\t\t header('Cache-Control: must-revalidate');\n\t\t header('Pragma: public');\n\t\t header('Content-Length: ' . filesize($path));\n\t\t ob_clean();\n\t\t flush();\n\t\t readfile($path);\n\t\t\treturn(true); \n\t\t} else {\n\t\t\techo \".$extension is not an allowed extension<br />\\n\";\n\t\t\treturn(false); \n\t\t}\n\t} else {\n\t\techo \"$path does not exist or is unreadable<br />\\n\"; \n\t\treturn(false); \n\t}\n}", "function download() {\necho $this->getvcard();\nreturn true;\n}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
return array of games matching homeTeam and awayTeam this day array to support doubleheaders
public function getGamesByTeams($homeTeamID, $awayTeamID) { $ret = []; foreach ($this->allGames as &$game) { if ($game->homeTeamID==$homeTeamID && $game->awayTeamID==$awayTeamID) $ret[] = $game; } return (sizeof($ret)==0?NULL:$ret); }
[ "private function getGames() {\n\t\t$games = array();\n\t\t\n\t\t$webpage = $this->grabUrl($this->url);\n\t\t$webpage = $this->cleanWhiteSpaces($webpage);\n\n\t\n\t\t$teamNameRegex \t= '/teamName\">([^\\/\"]+).+?>([^<]+)/';\n\t\t$dateRegex \t\t= '/skedStartDateSite\">([^<]+)/';\n\t\t$timeRegex \t\t= '/skedStartTimeLocal\">([^<]+)/';\n\t\n\t\tpreg_match_all($dateRegex, $webpage, $dateMatches);\n\t\tpreg_match_all($timeRegex, $webpage, $timeMatches);\n\t\n\t\n\t\tif (preg_match_all($teamNameRegex,$webpage,$matches)) {\n\t\t\t$teams = array();\n\t\t\t$c = 0;\n\t\t\tfor ($i = 0; $i < count($matches[2]); $i++) {\n\t\t\t\t$c = $i == 0 ? $i : $i+$i ;\n\t\t\t\tif (empty($matches[2][$c])) break;\n\t\t\t\t$teams[] = $matches[2][$c] . \",\" . $matches[2][$c+1];\n\t\t\t}\n\t\n\t\t\t\n\t\t\tfor ($i = 0; $i < count($teams); $i++) {\n\t\t\t\t$allTimeStr = explode(\" \", $timeMatches[1][$i]);\n\t\t\t\t$teamsSpl = explode(\",\", $teams[$i]);\n\t\t\t\t\n\t\t\t\t// set time format to 24H\n\t\t\t\t$timePieces = explode(\":\", $allTimeStr[0]);\n\t\t\t\tif ($allTimeStr[1] == \"PM\") $timePieces[0] = $timePieces[0]+12;\n\t\t\t\t$time = $timePieces[0] . \":\" . $timePieces[1];\n\t\t\t\t\n\t\t\t\t$o = new stdClass();\n\t\t\t\t$o->date \t\t= date('d/m/Y', strtotime($dateMatches[1][$i]));\n\t\t\t\t$o->time \t\t= $time;\n\t\t\t\t$o->timeZone \t= $allTimeStr[2];\n\t\t\t\t$o->visitTeam \t= $teamsSpl[0];\n\t\t\t\t$o->homeTeam \t= $teamsSpl[1];\n\t\t\t\t\n\t\t\t\t$games[] = $o;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $games;\n\t}", "private function getRelevantGames() {\n // query the database\n $dir = 'sqlite:C:\\Apache24\\htdocs\\rps-game\\server\\db\\game.db';\n $dbh = new \\PDO($dir) or die(\"cannot open the database\");\n $query = $dbh->prepare('SELECT * FROM games');\n $query->execute(array());\n $results = $query->fetchAll();\n\n // process the results\n $games = array(\n 'myGames' => array(),\n 'openGames' => array(),\n );\n foreach ($results as $value) {\n $gameObj = \\GuzzleHttp\\json_decode($value['game_state']);\n if (!$gameObj->isGameOver) {\n\n // currently playing this game\n if (\n $gameObj->player1->name == $this->sender->name\n || $gameObj->player2->name == $this->sender->name\n ) {\n $games['myGames'][$value['game_id']] = $gameObj;\n continue;\n }\n\n // this game has an empty seat\n if (\n $gameObj->player1->name == FALSE\n || $gameObj->player2->name == FALSE\n ) {\n $games['openGames'][$value['game_id']] = $gameObj;\n continue;\n }\n\n }\n }\n\n return $games;\n }", "public function getMatches()\n {\n $u20 = strpos($this->getName(), 'U-20') !== false;\n $matches = Wrapper\\National::matches($u20);\n $ok = array();\n foreach ($matches->getMatches() as $match) {\n if ($match->getHomeTeamName() == $this->getName() || $match->getAwayTeamName() == $this->getName()) {\n $ok[] = $match;\n }\n }\n return $ok;\n }", "public function getHomeMatches()\n {\n return $this->hasMany(Match::class, ['home_team_id' => 'id']);\n }", "public static function getGames() {\n $db = HelperController::getConnection();\n $sql = \"SELECT * FROM mydb.game\";\n\n $stmt = $db->prepare($sql);\n $stmt->execute();\n $result = $stmt->fetchAll();\n \n foreach ($result as $key => $game){\n $id_team1 = $game[\"team_id1\"];\n $id_team2 = $game[\"team_id2\"];\n \n //get flag for team 1\n $sql = \"SELECT team.flag FROM mydb.team WHERE team.id=:id\";\n\n $stmt = $db->prepare($sql);\n $stmt->bindParam(':id', $id_team1);\n $stmt->execute();\n $result1 = $stmt->fetch();\n \n //get flag for team 2\n $sql = \"SELECT team.flag FROM mydb.team WHERE team.id=:id\";\n\n $stmt = $db->prepare($sql);\n $stmt->bindParam(':id', $id_team2);\n $stmt->execute();\n $result2 = $stmt->fetch();\n \n $result[$key]['flag_1'] = $result1[\"flag\"];\n $result[$key]['flag_2'] = $result2[\"flag\"];\n $result[$key]['name_1'] = HelperController::getTeamName($game[\"team_id1\"]);\n $result[$key]['name_2'] = HelperController::getTeamName($game[\"team_id2\"]);\n }\n return $result;\n }", "public function getOwnLeagueResults()\r\n\t{\r\n\t\tif (!isset($this->ownleagueresults))\r\n\t\t{\r\n\t\t\t$onlyownteam = true;\r\n\t\t\t$this->calcSeasonStart($weekoffset, $daysahead);\r\n\t\t\t\r\n\t\t\t$this->ownleagueresults = $this->getLeague()->getMatchResults($onlyownteam, $daysahead, $weekoffset);\r\n\t\t\t// descending sort on match date\r\n\t\t\tusort($this->ownleagueresults, function ($match1, $match2) {\r\n\t\t\t if ($match1->wedstrijddatum == $match2->wedstrijddatum) return 0;\r\n\t\t\t return ($match1->wedstrijddatum > $match2->wedstrijddatum)? -1 : 1;\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn $this->ownleagueresults;\r\n\t}", "public function getGamesForTeam($team)\n {\n $response = $this->guzzle->get(\n WP_SUAPI_ENDPOINT_GAMES\n . \"?season=\" . $this->yearForQuery\n . \"&mode=team\"\n . \"&view=full\"\n . \"&order=natural\"\n . \"&team_id=\" . $team->getTeamId());\n if ($response->getStatusCode() !== 200) {\n throw new WP_SUAPI_Api_Exception($response->getBody());\n }\n\n return array_map(function ($item) {\n $id = $item->link->ids[0];\n $date = $item->cells[0]->text[0];\n $time = $item->cells[0]->text[1];\n $location = new Location($item->cells[1]->text[0], $item->cells[1]->text[1]);\n $location->setLocationLongitude($item->cells[1]->link->x);\n $location->setLocationLatitude($item->cells[1]->link->y);\n $teamHome = $item->cells[2]->text[0];\n $teamAway = $item->cells[3]->text[0];\n $result = $item->cells[4]->text[0];\n return new Game($id, $date, $time, $location, $teamHome, $teamAway);\n }, json_decode($response->getBody())->data->regions[0]->rows);\n }", "private function match_teams($homeid,$awayid,$match_pk)\n\t{\n \n \n if($homeid == $awayid)\n {\n // echo \"!!!!!!!!!!!!!!!!!match_teams was given the same team to play itself\\n\";\n return false;\n }\n //init data if not saved\n \n if(!isset($this->head_to_head[$homeid])) $this->head_to_head[$homeid]=array();\n if(!isset($this->head_to_head[$homeid][$awayid])) \t$this->head_to_head[$homeid][$awayid]=0;\t\n \t\n if(!isset($this->head_to_head[$awayid])) $this->head_to_head[$awayid]=array();\n if(!isset($this->head_to_head[$awayid][$homeid]))\t$this->head_to_head[$awayid][$homeid]=0;\n \n if(!isset($this->homeGames[$awayid] ))$this->homeGames[$awayid]=0;\n if(!isset($this->homeGames[$homeid])) $this->homeGames[$homeid]=0;\n if(!isset($this->awayGames[$awayid] ))$this->awayGames[$awayid]=0;\n if(!isset($this->awayGames[$homeid])) $this->awayGames[$homeid]=0;\n \n \n $homediv \t= $this->teamDivId[$homeid];\n $awaydiv \t= $this->teamDivId[$awayid];\n $home_total = $this->homeGames[$homeid] + $this->awayGames[$homeid];\n $away_total = $this->homeGames[$awayid] + $this->awayGames[$awayid];\n \n $global =$this->globalRules;\n if($global['max'] !=0 && $global['max']!=''&&$match_pk !=-1 && $match_pk!=-1)//if so then compare played to global max\n if( $home_total >= $global['max'] || $away_total >= $global['max'] )\n {\n\t\t\t//echo \"match_teams $match_pk cannot exceeed global max \".$global['max'];\n\t\t\t\n\t\t\tif(!isset($this->matchOverflow[$match_pk]))\n\t\t\t\t$this->matchOverflow[$match_pk]=0;\n\n\t\t\t$this->matchOverflow[$match_pk]++;//one game failed to be created\n\t\t\t\n\t\t\treturn false;\n\t\t\t\n }\n \n //check local balance first before global balance.. \n // so if never met or are balanced h2h, then add to minimal globly\n \n if($this->head_to_head[$homeid][$awayid] == $this->head_to_head[$awayid][$homeid])//if same here, do globally\n { \n \t//same so check global home and away games\n\t if($this->homeGames[$awayid] < $this->homeGames[$homeid] )//so same team wont be home twice in row\n\t {\n\t //swap both team and div\n\t $swap = $homediv;\n\t $homediv = $awaydiv;\n\t $awaydiv = $swap;\n\t \n\t $swap=$homeid;\n\t $homeid=$awayid;\n\t $awayid=$swap;\n\t }\n\t else if ($this->homeGames[$awayid] == $this->homeGames[$homeid] ) \n\t {\n\t $homeTotal = $this->homeGames[$homeid] + $this->homeGames[$homeid];\n\t $awayTotal = $this->awayGames[$awayid] + $this->awayGames[$awayid];\n\t //if there is a tie, make the team with the fewest existing matches take the home slot\n\t if($homeTotal > $awayTotal)\n\t {\n\t //swap both team and div\n\t $swap = $homediv;\n\t $homediv = $awaydiv;\n\t $awaydiv = $swap;\n\t \n\t $swap=$homeid;\n\t $homeid=$awayid;\n\t $awayid=$swap;\n\t \n\t }//should leave more room for the other team\n\t \n\t } //if both were zero, nothing changed\n\t //else current home is smaller, so keep it here\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//pick minimum locally\n\t\t\tif($this->head_to_head[$homeid][$awayid] > $this->head_to_head[$awayid][$homeid])\n\t\t\t{\n\t\t\t\t//current home has been a home team more times than current away -----swap\n\t\t\t\t//swap both team and div\n\t $swap = $homediv;\n\t $homediv = $awaydiv;\n\t $awaydiv = $swap;\n\t \n\t $swap=$homeid;\n\t $homeid=$awayid;\n\t $awayid=$swap;\n\t \n\t\t\t}\n\t\t\t//else no swap; stay the same\n\t\t\t\n\t\t}\n $homename = $this->teamName[$homeid];\n $awayname = $this->teamName[$awayid];// ### UNDEFINED INDEX =>\n $homecount = $this->homeGames[$homeid];\n $awaycount = $this->homeGames[$awayid];\n \n $this->head_to_head[$homeid][$awayid]++;\n\t\t//not the other way\n \n // echo \"$homecount IS <= $awaycount for hometeam: $homename, awayteam: $awayname \\n\";\n \n\t \t//$rec=$this->divisions_model->get_team_division($teamid,$this->season_id);\n //create game with empty timeslot \n \n $new_game_index = count($this->createdGames);\n $this->createdGames[$new_game_index] = array ( \n 'home_div' =>$homediv, \n 'home_id' =>$homeid, \n 'home_name' =>$homename, \n 'away_div' =>$awaydiv, \n 'away_id' =>$awayid, \n 'away_name' =>$awayname, \n 'match_pk' =>$match_pk, \n 'g_index'=>$new_game_index,\n 'venue_id' =>-1, \n 'facility_id' =>-1, \n 'timeslot'=> -1, 'game_date'=>'', 'start_time'=>'', 'end_time'=>'',\n 'date_timestamp'=>'',\n 'start_timestamp'=>'',\n 'end_timestamp'=>''\n );\n\n //count number of TOTAL home and away games, \n $this->homeGames[$homeid] = $this->homeGames[$homeid] +1;\n $this->awayGames[$awayid] = $this->awayGames[$awayid] +1;\n \n \n // i think totalGames is never used\n if(!isset( $this->totalGames[$homeid] ))\n\t $this->totalGames[$homeid]=0;\n\t \n\t if(!isset( $this->totalGames[$awayid] ))\n\t $this->totalGames[$awayid]=0;\n\t $this->totalGames[$homeid]++;\n\t \n\t $this->totalGames[$awayid]++;\n \n return $new_game_index;\n\n \n \n }", "private function _gather_unassigned_games()\n {\n \t$floating=array();\n \tif(!is_array($this->createdGames)) $this->createdGames=array();//in case of errrs - like if zero teams somethign was skipped\n\t\tforeach($this->createdGames as $i=>$g)\n\t\t{\n\t\t\tif($g['timeslot']==-2)\n\t\t\t{\n\t\t\t\t//$g['g_index']=$i;//self reference GEB\n\t\t\t\t$floating[]=$i;\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn $floating;\n }", "function getHeadToHeadMatches( $teamID ) {\n\n/* ... data declarations */\n $gameList = array();\n\n/* ... build the query */\n $this->db->select( 'GameID' );\n $teamList = join( \",\", $teamID );\n $whereClause = \"HomeTeamID IN (\".$teamList.\") AND VisitTeamID IN (\".$teamList.\") AND Status = 'PLAYED'\";\n $this->db->where( $whereClause );\n\n/* ... perform the query and pull up the results */\n $sqlQuery = $this->db->get( 'Games' );\n foreach ($sqlQuery->result_array() as $dbRow) {\n $gameList[] = $dbRow['GameID'];\n }\n\n/* ... time to go */\n return( $gameList );\n }", "function _getHeadToHeadDetails( $tiedTeams ) {\n\n/* ... data declarations */\n foreach ($tiedTeams as $teamID) {\n $h2hPoints[$teamID] = 0;\n $h2hDiff[$teamID] = 0;\n }\n\n/* ... get the list of games these teams played against each other */\n $h2hGames = $this->Model_Schedule->getHeadToHeadMatches( $tiedTeams );\n\n/* ... now for each game these teams played, figure out who to record as the winner (or a tie) and run diff */\n foreach ($h2hGames as $gameID) {\n $gameDetails = $this->Model_Schedule->gameResult( $gameID );\n if ($gameDetails['Result'] != \"TIE\") {\n $h2hPoints[$gameDetails['Winner']] += 2;\n $h2hDiff[$gameDetails['Winner']] += $gameDetails['RunDiff'];\n $h2hDiff[$gameDetails['Loser']] -= $gameDetails['RunDiff'];\n }\n else {\n $h2hPoints[$gameDetails['Winner']] += 1;\n $h2hPoints[$gameDetails['Loser']] += 1;\n }\n }\n\n/* ... sort the data */\n arsort( $h2hPoints );\n arsort( $h2hDiff );\n\n/* ... time to go */\n return( array( $h2hPoints, $h2hDiff ) );\n }", "public function getAllLeagueResults()\r\n\t{\r\n\t\tif (!isset($this->allleagueresults))\r\n\t\t{\r\n\t\t\t$onlyownteam = false;\r\n\t\t\t$this->calcSeasonStart($weekoffset, $daysahead);\r\n\t\t\t\r\n\t\t\t$this->allleagueresults = $this->getLeague()->getMatchResults($onlyownteam, $daysahead, $weekoffset);\r\n\t\t\t// descending sort on match date\r\n\t\t\tusort($this->allleagueresults, function ($match1, $match2) {\r\n\t\t\t if ($match1->wedstrijddatum == $match2->wedstrijddatum) return 0;\r\n\t\t\t return ($match1->wedstrijddatum > $match2->wedstrijddatum)? -1 : 1;\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn $this->allleagueresults;\r\n\t}", "private function _split_games_by_index($idx = 'start_timestamp')\n {\n \t$found = array();\n \tif(!is_array($this->createdGames)) $this->createdGames = array();//in case of errrs - like if zero teams somethign was skipped\n\t\tforeach($this->createdGames as $i=>$g)\n\t\t{\n\t\t\t$pk = $g[$idx];\n\t\t\tif(!isset($found[$pk])) $found[$pk] = array();\n\t\t\t\n\t\t\t$found[$pk][] = $g;\n \n\t\t}\n\t\treturn $found;\n }", "public static function allGames(){\n\n\t\t$games = DB::table('games')\n ->selectRaw('games.id,\n\t\t\t games.team_home,\n\t\t\t (select name from teams WHERE games.team_home=teams.id)as home_name,\n\t\t\t (select flag from teams WHERE games.team_home=teams.id)as home_flag,\n\t\t\t score_home,\n\t\t\t score_away, \n\t\t\t games.team_away, \n\t\t\t (select name from teams WHERE games.team_away=teams.id)as away_name,\n\t\t\t (select flag from teams WHERE games.team_away=teams.id)as away_flag, \n\t\t\t date_game, \n\t\t\t time_game, \n\t\t\t (select name from competitions WHERE games.competition_id=competitions.id)as competition_name, \n\t\t\t round ')\n ->orderByRaw('date_game DESC,time_game DESC,games.id DESC')\n // ->get();\n ->paginate(20);\n\t\treturn $games;\n\t}", "function crawl_games_per_season($param_season, $param_gameType, $param_team) {\n\t\n\t$base_link = 'http://www.nhl.com/ice/schedulebyseason.htm';\n\t\t\n\t$html_games = file_get_html(\"$base_link?season=$param_season&gameType=$param_gameType&team=$param_team\");\n\t\n\tif(!$html_games) {\n\t\techo 'GET HTML FALSE <br>';\n\t}\n\t\n\t$games_list = array();\n\t\n\t\n\tforeach($html_games->find('table[class=data schedTbl] tbody tr') as $match) {\n\t\t\n\t\t//Don't take into account where column is less than 6, filtering out header and blank rows.\n\t\tif(count($match->find('td')) == 6) {\n\t\t\t\n\t\t\t //Need to check if it's the FINAL result by checking if it starts with 'FINAL:'.\n\t\t\t //Additionally read out teams involved, determine winner/loser, and if there has been overtime.\n\t\t\t \n\t\t\t $item_result = $match->find('td.tvInfo', 0)->plaintext;\n\t\t\t $item_result_split = explode(' ', $item_result);\n\t\t\t \n\t\t\t \n\t\t\t if($item_result_split[1] == 'FINAL:') {\n\t\t\t \t\n\t\t\t\t$item['final'] = $item_result_split[1];\n\t\t\t\t$item['visiting_team'] = $item_result_split[3];\n\t\t\t\t$item['visiting_team_score'] = trim($item_result_split[4], '()');\n\t\t\t\t$item['home_team'] = $item_result_split[8];\n\t\t\t\t$item['home_team_score'] = trim($item_result_split[9], '()');\n\t\t\t\t$item['overtime'] = $item_result_split[10];\n\t\t\t\t \n\t\t\t\t$item_date = $match->find('td.date .skedStartDateSite', 0)->plaintext;\n\t\t\t\t$item['date'] = date(\"Y-m-d\", strtotime($item_date));\n\t\t\t\t \n\t\t\t\t//No need for retrieve teams directly, because we need to analyze result string above, and retrieve more information.\n\t\t\t\t//$item['visiting_team'] = $match->find('td.team', 0)->plaintext;\n\t\t\t\t//$item['home_team'] = $match->find('td.team', 1)->plaintext;\n\t\t\t\t \n\t\t\t\t//Read out the link to the \"Recap\" article.\n\t\t\t\t$item['recap'] = $match->find('td.skedLinks a', 0)->href;\n\t\t\t\t \n\t\t\t\t$games_list[] = $item;\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\n\t}\n\t\n\treturn $games_list;\n\n}", "public static function previousMatchDayGames()\n\t{\n\t\tif (self::hasTournamentBegun()) {\n\n\t\t\t$query = DB::table('match_days')\n\t\t\t\t->join('days', 'days.id', '=', 'match_days.day_id')\n\t\t\t\t->join('matches', 'matches.id', '=', 'match_days.match_id');\n\n\t\t\t$query->select(\n\t\t\t\t'days.id',\n\t\t\t\t'days.day',\n\n\t\t\t\t'match_days.match_id',\n\n\t\t\t\t'matches.type',\n\t\t\t\t'matches.home_team',\n\t\t\t\t'matches.away_team',\n\t\t\t\t'matches.home_result',\n\t\t\t\t'matches.away_result',\n\t\t\t\t'matches.penalty',\n\t\t\t\t'matches.result_text',\n\t\t\t\t'matches.date',\n\t\t\t\t'matches.stadium_id',\n\t\t\t\t'matches.lock_time',\n\t\t\t\t'matches.result_published'\n\t\t\t);\n\n\t\t\t$query->where('match_days.day_id', self::previousMatchDay());\n\n\t\t\treturn $query->get();\n\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "function get_record($team_id) {\n\t\t$query_wins = \"SELECT 1 FROM season \n\t\t\tWHERE (home_team_id='$team_id' AND home_score > away_score)\n\t\t\tOR (away_team_id='$team_id' AND away_score > home_score)\";\n\t\t$result_wins = mysql_query($query_wins);\n\t\t$team_wins = mysql_num_rows($result_wins);\n\t\tmysql_free_result($result_wins);\n\t\t\n\t\t$query_losses = \"SELECT 1 FROM season\n\t\t\tWHERE (home_team_id='$team_id' AND home_score < away_score)\n\t\t\tOR (away_team_id='$team_id' AND away_score < home_score)\";\n\t\t$result_losses = mysql_query($query_losses);\n\t\t$team_losses = mysql_num_rows($result_losses);\n\t\tmysql_free_result($result_losses);\n\t\t\n\t\t$query_ties = \"SELECT 1 FROM season\n\t\t\tWHERE (home_team_id='$team_id' OR away_team_id='$team_id')\n\t\t\tAND (away_score = home_score) AND (away_score IS NOT NULL)\"; \n\t\t$result_ties = mysql_query($query_ties);\n\t\t$team_ties = mysql_num_rows($result_ties);\n\t\tmysql_free_result($result_ties);\n\t\t\n\t\t$rec = array();\n\t\t$rec[] = $team_wins;\n\t\t$rec[] = $team_losses;\n\t\t$rec[] = $team_ties;\n\t\t\n\t\treturn $rec;\n\t}", "private function calculateHomeGamesPlayed()\n {\n return $this->homeGames->filter(function ($game) {\n return $game->isOver();\n })->count();\n }", "public function getMatches($sport, $league_ids, $time_range)\n\t{\n\t\tDB::connection()->enableQueryLog();\n\t\t$time_range\t\t\t=\t$time_range ? $time_range : config('bet_settings.maximum_hour',24*7);\n\t\t$sport_details\t\t=\tSport::where('slug',$sport)->first();\n\t\tif(isset($sport_details->id)){\n\t\t\t$where\t=\t[\n\t\t\t\t// 'bookmaker_id'\t=> \t$this->getBookmaker(),\n\t\t\t\t'market_id'\t=> \t$sport_details->market_id,\n\t\t\t\t'is_locked'\t=> \t0,\n\t\t\t\t'sport_id'\t=> $sport_details->id\n\t\t\t];\n\t\t\t$matches\t= \t$sport_details->matches()\n\t\t\t\t\t\t\t\t->whereIn('matches.league_id',$league_ids)\n\t\t\t\t\t\t\t\t->where('start_timestamp', '>=',strtotime('+'.config('bet_settings.hide_minute',0).' minutes'))\n\t\t\t\t\t\t\t\t->where('start_timestamp', '<=',strtotime('+'.$time_range.' hours'))\n\t\t\t\t\t\t\t\t->whereHas('odds', function($query) use($where){\n\t\t\t\t\t\t\t\t\t$query->select('id')->where($where)->limit(1);\n\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t->with('league.country','home_team','away_team')->orderBy('start_timestamp')\n\t\t\t\t\t\t\t\t->get();\n\t\t\t$league_wise_match_details\t\t\t=\t$matches->groupBy('league_id');\n\t\t\t$match_ids\t\t\t\t\t\t\t=\t$matches->unique('match_id')->pluck('match_id')->toArray();\n\t\t\t$odds_details\t\t\t\t\t\t=\tOdd::select('sport_id','bookmaker_id','odds_name','odds_value','market_extra_value','id','match_id')->where($where)->whereIn('match_id', $match_ids)->orderBy('bookmaker_id', 'ASC')->get()->groupBy('match_id')->map(function ($each_odds) {\n\t\t\t\t\t$flitered_each_odds = $each_odds->filter(function ($each_odd) use($each_odds) {\n\t\t\t\t\t \treturn $each_odd->bookmaker_id === $each_odds[0]->bookmaker_id;\n\t\t\t\t\t});\n\t\t\t\t\treturn $flitered_each_odds;\n\t\t\t\t});\n\n\t\t\t// foreach ($odds_details as $key => $value) {\n\t\t\t// \t$odds_collection = collect($value);\n\t\t\t// \t$odds_details_test[$key] = $odds_collection->keyBy('odds_name');\n\t\t\t// }\n\t\t\t// dd($odds_details_test);\n\t\t\t// a(DB::getQueryLog());\n\t\t\t$data['sport_details']\t\t\t\t=\t$sport_details;\n\t\t\t$data['league_wise_match_details']\t=\t$league_wise_match_details;\n\t\t\t// $data['match_wise_odds_details']\t=\t$odds_details_test;\n\t\t\t$data['match_wise_odds_details']\t=\t$odds_details;\n\t\t\treturn $data;\n\t\t}else {\n\t\t\tabort(404);\n\t\t}\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests the state machine getter and setter methods.
public function testGetSetStateMachine() { $stateMachine = $this->mock('Dhii\State\StateMachineInterface') ->transition() ->canTransition() ->new(); $subject = $this->createInstance(); $reflect = $this->reflect($subject); $reflect->_setStateMachine($stateMachine); $this->assertSame( $stateMachine, $reflect->_getStateMachine(), 'Set and retrieved state machines are not the same.' ); }
[ "public function testGetSetState()\n {\n $subject = $this->createInstance();\n $reflect = $this->reflect($subject);\n\n $reflect->_setState($state = uniqid('state-'));\n\n $this->assertSame($state, $reflect->_getState(), 'Set and retrieved states are not the same.');\n }", "public function testGetState()\n {\n $subject = $this->createInstance();\n $reflect = $this->reflect($subject);\n\n $stateMap = $this->createMap();\n\n $reflect->_init($stateMap);\n\n $this->assertSame($stateMap, $reflect->getState(), 'Set and retrieved state maps are not the same');\n }", "public function testMagicMethods() {\n\t\t$machine = new AStateMachine();\n\t\t$machine->setStates(array(\n\t\t\t\t\t\t\tnew ExampleEnabledState(\"enabled\",$machine),\n\t\t\t\t\t\t\tnew ExampleDisabledState(\"disabled\",$machine),\n\t\t\t\t\t\t\t));\n\t\t$machine->defaultStateName = \"enabled\";\n\t\t$this->assertTrue($machine->is(\"enabled\"));\n\t\t$this->assertFalse($machine->is(\"disabled\"));\n\t\t$this->assertTrue($machine->isEnabled);\n\t\t$this->assertTrue(isset($machine->testProperty));\n\t\t$machine->disable();\n\t\t$this->assertTrue($machine->is(\"disabled\"));\n\t\t$this->assertFalse($machine->is(\"enabled\"));\n\t\t$this->assertFalse($machine->isEnabled);\n\t\t$this->assertFalse(isset($machine->testProperty));\n\t}", "public function testSetGetStateCode()\n {\n $stateCode = '07';\n\n $location = new Location();\n\n $this->assertSame($location, $location->setStateCode($stateCode));\n $this->assertEquals($stateCode, $location->getStateCode());\n }", "public function testAddGetState()\n {\n $subject = $this->createInstance();\n $reflect = $this->reflect($subject);\n $state = uniqid('state-');\n\n $reflect->_addState($state);\n\n $this->assertContains($state, $reflect->_getStates(), 'Retrieved state list does not have state.');\n $this->assertArrayHasKey($state, $reflect->_getStates(), 'Retrieved state list does not have state key.');\n $this->assertEquals($state, $reflect->_getState($state), 'Retrieved and added states are not the same.');\n }", "public function testSetState()\n\t{\n\t\t$state = $this->getMockForAbstractClass('PNEngineState', array($this->object));\n\n\t\t$this->object->setState($state);\n\n\t\t$this->assertEquals($state, TestReflection::getValue($this->object, 'state'));\n\t}", "public function testGetSwitchState()\n {\n }", "public function testGetAndSetState()\n {\n $response = $this->response;\n $state = rand(1, 99);\n $response->setState($state);\n $this->assertSame($state, $response->getState());\n }", "public function testSetState()\n {\n $entity = TestEntity::__set_state(['foo' => 'bar', 'num' => 22, 'dyn' => 'woof']);\n\n $this->assertInstanceOf(TestEntity::class, $entity);\n\n $this->assertAttributeSame('bar', 'foo', $entity);\n $this->assertAttributeSame(22, 'num', $entity);\n\n $this->assertObjectNotHasAttribute('dyn', $entity);\n }", "public function testSettersGetters()\n {\n // Arrange\n $a = new Globals();\n\n // Act\n $b = $a->setApplication('Application');\n \n //get value back\n $c = $a->app();\n\n // Assert\n $this->assertEquals('Application', $c);\n \n // Arrange\n $a = new Globals();\n\n // Act\n $b = $a->setController('Controller');\n \n //get value back\n $c = $a->controller();\n\n // Assert\n $this->assertEquals('Controller', $c);\n \n // Arrange\n $a = new Globals();\n\n // Act\n $b = $a->setModule('Module');\n \n //get value back\n $c = $a->module();\n\n // Assert\n $this->assertEquals('Module', $c);\n \n }", "public function testGetStateKey()\n {\n $subject = $this->createInstance();\n $reflect = $this->reflect($subject);\n\n $state = uniqid('state-');\n\n $this->assertEquals(\n $state,\n $reflect->_getStateKey($state),\n 'Retrieved state key and given state string are not the same.'\n );\n }", "public function testSetState() {\n\n $obj = new CreatingAPIKeyResponse();\n\n $obj->setState(\"state\");\n $this->assertEquals(\"state\", $obj->getState());\n }", "public function test_transition_valid()\n\t{\n\t\t$sm = $this->get_statemachine_instance();\n\n\t\t$this->assertSame('pending', $sm->state());\n\n\t\t$sm->transition('active');\n\n\t\t$this->assertSame('active', $sm->state());\n\n\t\t$sm->transition('deleted');\n\n\t\t$this->assertSame('deleted', $sm->state());\n\t}", "public function testGettersAndSetters()\n {\n $this->price->setDescription('this is just a test string');\n $this->assertEquals('this is just a test string', $this->price->getDescription());\n\n $this->price->setValue(0.1337);\n $this->assertEquals(0.1337, $this->price->getValue());\n }", "public function testStateValidatesCorrectly()\n {\n $state_issued = $this->stateHandler->issue();\n $this->assertTrue($this->stateHandler->validate($state_issued));\n $this->assertNull($this->sessionStore->get(SessionStateHandler::STATE_NAME));\n\n }", "public function testAddGetStateStringable()\n {\n $subject = $this->createInstance();\n $reflect = $this->reflect($subject);\n $key = uniqid('state-');\n $state = $this->createStringable($key);\n\n $reflect->_addState($state);\n\n $list = $reflect->_getStates();\n\n $this->assertArrayHasKey($key, $list, 'Retrieved state list does not have state key.');\n $this->assertSame($state, $list[$key], 'State in list is not same as given stringable instance.');\n $this->assertEquals(\n $state,\n $reflect->_getState($key),\n 'State retrieved by key and added state are not the same.'\n );\n $this->assertEquals(\n $state,\n $reflect->_getState($state),\n 'State retrieved by instance and added state are not the same.'\n );\n }", "public function testGetStateHistory()\n {\n }", "public function test__ResetState() {\n\t\t// Set up dummy states\n\t\t$this->tester->invokeMethod( $this->_behavior, \"setPreviousCacheConfig\", array( array( \"foo\" ) ) );\n\t\t$this->tester->invokeMethod( $this->_behavior, \"setCacheConfig\", array( array( \"bar\" ) ) );\n\t\t$this->tester->invokeMethod( $this->_behavior, \"setRequestOptions\", array( array( \"baz\" ) ) );\n\t\t$this->tester->invokeMethod( $this->_behavior, \"setWasFoundInCache\", array( \"test\" ) );\n\n\t\t// Verify state\n\t\tverify( $this->_behavior->getPreviousCacheConfig() )->equals( array( \"foo\" ) );\n\t\tverify( $this->_behavior->getCacheConfig() )->equals( array( \"bar\" ) );\n\t\tverify( $this->_behavior->getRequestOptions() )->equals( array( \"baz\" ) );\n\t\tverify( $this->_behavior->wasFoundInCache() )->equals( \"test\" );\n\n\t\t// Reset state\n\t\t$this->tester->invokeMethod( $this->_behavior, \"resetState\" );\n\n\t\t// Verify state was reset\n\t\tverify( $this->_behavior->getPreviousCacheConfig() )->equals( array( \"bar\" ) );\n\t\tverify( $this->_behavior->getCacheConfig() )->equals( array() );\n\t\tverify( $this->_behavior->getCacheConfig() )->equals( array() );\n\t\tverify( $this->_behavior->wasFoundInCache() )->false();\n\t}", "public function testGetUpdateState(): void\n {\n $this->assertEquals($this->attributes->updatestate, \n $this->softwareUpdate->getUpdateState());\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/this function loads the different student registration pages INPUT > Form(View) name which is to be loaded RETURNS > NONE
public function loadPage($page_name){ $data['page'] = "Registration"; $data['title']="Student Registration"; $this->load->view('template/header',$data); $this->load->view('register/student/'.$page_name); $this->load->view('template/footer',$data); }
[ "public function loadRegistrationFourthPage(){\n $this->load->view('Registration/ApplicationFormPartFour');\n }", "public function load_registration() {\n\t\t$this->load->helper('form');\n\t\t$data['title'] = 'Registration Page';\n\t\t$data['collapsed_form'] = 'registration_form_tab';\n\t\t$this->load->view('template/header', $data);\n\t\t$this->load->view('template/navigation');\n\t\t$this->load->view('template/leftNavigation');\n\t\t$this->load->view('login/login_view');\n\t\t$this->load->view('template/footer');\n\t}", "function loadFromForm() \n {\t \t \n\t $this->formName = $_REQUEST['form_name']; \t \n\t \n// \t echo 'Inside load_from_form of main page: <pre>'.print_r($this->formValues,true).'</pre><br>';\t \n\t \n\t\tswitch($this->formName) {\n\t\t\t\n\t\t\tcase 'basicStaffForm':\n\t\t\t\t \n\t\t\t\t$this->active_subPage = $this->basic_form;\t\n\t\t\t\tbreak;\n\t\t\tcase 'scheduledActivityForm':\n\n\t\t\t\t$this->active_subPage = $this->optional_sheduled_activity_form;\t \n\t\t\t\tbreak;\t\t\t\n\t\t\tdefault:\n\t\t\t\tdie('VALID FORM NAME **NOT** FOUND; name = '.$this->formName);\n\t\t} \n\t\t$this->active_subPage->loadFromForm(); \n\t\t$this->form_submitted = true; \n \n }", "function load_exam_form()\n\n\t{\n\n\t\taccess_control($this);\n\n\t\t\n\n\t\t# Get the passed details into the url data array if any\n\n\t\t$urldata = $this->uri->uri_to_assoc(3, array('m', 'i','a'));\n\n\t\t# Pick all assigned data\n\n\t\t$data = assign_to_data($urldata);\n\n\t\t\n\n\t\t$data['classes'] = $this->classobj->get_classes();\n\n\t\t\n\n\t\t$data['terms'] = $this->terms->get_terms();\n\n \n\n #user is editing\n\n\t\tif(!empty($data['i']))\n\n\t\t{\n\n\t\t\t$examid = decryptValue($data['i']);\n\n\t\t\t\n\n\t\t\t$data['formdata'] = $examdetails = $this->Query_reader->get_row_as_array('search_exams', array('limittext'=>'', 'searchstring' => ' AND isactive = \"Y\" AND id = '.$examid));\n\n\t\t\t\n\n\t\t\t#Check if the exam belongs to the current user's school\n\n\t\t\tif($examdetails['school'] != $this->myschool['id']){\n\n\t\t\t\t$data['msg'] = \"ERROR: The exam details could not be loaded.\";\n\n\t\t\t\t$data['formdata'] = $examdetails = array ();\t\n\n\t\t\t}\n\n\t\t\t \n\n #Check if the user is simply viewing\n\n if(!empty($data['a']) && decryptValue($data['a']) == 'view')\n\n {\n\n $data['isview'] = \"Y\";\n\n }\n\n\t\t}\n\n\t\t\n\n\t\t$this->load->view('exams/exam_form_view', $data);\n\n\t}", "public function loadFormToAddStagiaire(){\n include 'views/addStagiaireForm.php';\n }", "function load_subject_form()\n\n\t{\n\n\t\taccess_control($this);\n\n\t\t\n\n\t\t# Get the passed details into the url data array if any\n\n\t\t$urldata = $this->uri->uri_to_assoc(3, array('m', 'i','a'));\n\n\t\t# Pick all assigned data\n\n\t\t$data = assign_to_data($urldata);\n\n\t\t\n\n\t\t$data['classes'] = $this->classobj->get_classes();\n\n \n\n #user is editing\n\n\t\tif(!empty($data['i']))\n\n\t\t{\n\n\t\t\t$subjectid = decryptValue($data['i']);\n\n\t\t\t\n\n\t\t\t$data['formdata'] = $this->Query_reader->get_row_as_array('search_subjects', array('isactive' => 'Y', 'limittext'=>'', 'searchstring' => ' AND id = '.$subjectid));\n\n\t\t\t\n\n\t\t\t#Get the subject papers if any\n\n\t\t\t$data['formdata']['papers'] = $this->db->query($this->Query_reader->get_query_by_code('search_papers', array('isactive' => 'Y', 'limittext'=>'', 'searchstring' => ' AND subject = '.$subjectid)))->result_array();\n\n\t\t\t\n\n\t\t\t#Check if the subject belongs to the current user's school\n\n\t\t\tif($data['formdata']['school'] != $this->myschool['id'])\n\n\t\t\t\t$data['formdata'] = array ();\t\n\n \n\n #Check if the user is simply viewing\n\n if(!empty($data['a']) && decryptValue($data['a']) == 'view')\n\n {\n\n $data['isview'] = \"Y\";\n\n }\n\n\t\t}\n\n\t\t\n\n\t\t$this->load->view('curriculum/subject_form_view', $data);\n\n\t}", "public function show_register_form()\n {\n\n // Check Session\n if (Session::get('send_code')) {\n $data = Session::get('send_code');\n $registration_code = getSerial();\n $username = generateUserName();\n\n // If Session has send_code then return to Route Switch at register name with value.\n return view('system.auth', ['route' => 'register'], compact('data', 'registration_code', 'username'))\n ->with('success', 'รหัสลงทะเบียนได้ส่งไปยังที่อยู่อีเมล์เรียบร้อย');\n } // If Not follow by condition form return to normal view to Route Switch at register name without any value.\n else {\n $data = [\n 'student_code' => null,\n 'student_email' => null,\n ];\n $registration_code = null;\n $username = null;\n return view('system.auth', ['route' => 'register'], compact('data', 'registration_code', 'username'));\n }\n\n\n }", "public function getFormNewInstalacion(){\r\n Obj::run()->View->render(\"formNewInstalacion\");\r\n }", "public function display_student_registration_form() {\n ob_start();\n\n wp_enqueue_style( 'student-reg-style' );\n wp_enqueue_script( 'student-reg-script' );\n\n require_once WSI_PATH . '/assets/templates/student-reg-template.php';\n\n $this->process_form();\n\n $html = ob_get_clean();\n\n return $html;\n }", "public function load_new_student_editor(){\n\n\t\tself::load_student_form( 'Add New Student' ); //Title is the minimum variable we need to use this function. \n\t\t\n\t}", "protected function loadCreateForm()\n {\n }", "function load_form ()\r\r\n {\r\r\n # Get the passed details into the url data array if any\r\r\n $urldata = $this->uri->uri_to_assoc(3, array('m', 'i', 'b'));\r\r\n\r\r\n # Pick all assigned data\r\r\n $data = assign_to_data($urldata);\r\r\n\r\r\n #check user access\r\r\n #1: for editing\r\r\n if (!empty($data['i'])) {\r\r\n check_user_access($this, 'view_bid_invitations', 'redirect');\r\r\n } #2: for creating\r\r\n else {\r\r\n check_user_access($this, 'view_bid_invitations', 'redirect');\r\r\n }\r\r\n\r\r\n if ($this->session->userdata('isadmin') == 'N') $userdetails = $this->db->get_where('users', array('userid' => $this->session->userdata('userid')))->result_array();\r\r\n\r\r\n #exit($this->db->last_query());\r\r\n\r\r\n #user is editing\r\r\n if (!empty($data['i'])) {\r\r\n $holiday_id = decryptValue($data['i']);\r\r\n $data['formdata'] = $this->Query_reader->get_row_as_array('search_table', array('table' => 'public_holidays', 'limittext' => '', 'orderby' => 'id', 'searchstring' => ' id=\"' . $holiday_id . '\" AND isactive=\"Y\"'));\r\r\n }\r\r\n\r\r\n $data['page_title'] = (!empty($data['i']) ? 'Edit public holiday' : 'Add public holiday');\r\r\n $data['current_menu'] = 'view_bid_invitations';\r\r\n $data['view_to_load'] = 'public_holiday/form';\r\r\n $data['view_data']['form_title'] = $data['page_title'];\r\r\n\r\r\n $this->load->view('dashboard_v', $data);\r\r\n\r\r\n }", "public function getFormNewRegInversion(){\r\n Obj::run()->View->render(\"formNewRegInversion\");\r\n }", "public function indexAction() {\n\t\t$form = $this->_getRegistrationForm();\n\t\t$this->view->form = $form;\n\t}", "public function formNewAsistenciaManual(){\r\n Obj::run()->View->render();\r\n }", "function load_grading_form()\n\n\t{\n\n\t\taccess_control($this);\n\n\t\t\n\n\t\t# Get the passed details into the url data array if any\n\n\t\t$urldata = $this->uri->uri_to_assoc(3, array('m', 'i','a'));\n\n\t\t\n\n\t\t# Pick all assigned data\n\n\t\t$data = assign_to_data($urldata);\n\n\t\t\n\n\t\t$data['classes'] = $this->classobj->get_classes();\n\n\t\t\n\n\t\t$data['terms'] = $this->terms->get_terms();\n\n \n\n #user is editing\n\n\t\tif(!empty($data['i']))\n\n\t\t{\n\n\t\t\t$gradingid = decryptValue($data['i']);\n\n\t\t\t\n\n\t\t\t$data['formdata'] = $gradingdetails = $this->Query_reader->get_row_as_array('search_grading', array('limittext'=>'', 'isactive' => 'Y', 'searchstring' => ' AND id = '.$gradingid));\n\n\t\t\t\n\n\t\t\t//get the grading details\n\n\t\t\t$data['grading_details'] = $this->db->query($this->Query_reader->get_query_by_code('search_grading_details', array('limittext'=>'', 'isactive' => 'Y', 'searchstring' => ' AND gradingscale = '.$gradingid)))\n\n\t\t\t\t\t\t\t\t\t\t->result_array();\t\t\t\n\n\t\t\t\n\n\t\t\t#Check if the exam belongs to the current user's school\n\n\t\t\tif($gradingdetails['school'] != $this->myschool['id']){\n\n\t\t\t\t$data['msg'] = \"ERROR: The grading scale details could not be loaded.\";\n\n\t\t\t\t$data['formdata'] = $examdetails = array ();\t\n\n\t\t\t}\n\n\t\t\t \n\n #Check if the user is simply viewing\n\n if(!empty($data['a']) && decryptValue($data['a']) == 'view')\n\n {\n\n $data['isview'] = \"Y\";\n\n }\n\n\t\t}\n\n\t\t\n\n\t\t$this->load->view('grading/grading_form_view', $data);\n\n\t}", "private function _add_teacher_form () {\r\n $this -> load -> view('templates/header', $this -> data);\r\n $this -> load -> view('templates/offcanvas-left', $this -> data);\r\n $this -> load -> view('admin/teacher/view_add_teacher', $this -> data);\r\n $this -> load -> view('templates/navigation', $this -> data);\r\n $this -> load -> view('templates/offcanvas-right', $this -> data);\r\n $this -> load -> view('templates/footer');\r\n }", "private function displayForm()\n {\n $LogInerrors = $this->errors;\n require '../signup.php';\n }", "public function getSchoolRegistration()\n {\n session()->put('previous_path', $this->dic->getUrlPath());\n $this->activityLogger->basicActivitySave(\n 'school_registration_page',\n 'Someone accessed school registration form page.',\n ['ip' => $this->request->ip()]\n );\n return view('user.register_as_school');\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set default for membership status based on presence of 'active_only' param
function setMembershipStatusDefaults(&$defaults, $fieldName, $values, $spec) { if (!empty($values['membership']['active_only'])) { return ''; } }
[ "function adjustMembershipStatusField(&$fields) {\n if (!empty($fields['membership'])) {\n if (isset($fields['membership']['status_id'])) {\n foreach ($fields['membership']['status_id']['IN'] as $status) {\n if (empty($status)) {\n $fields['membership']['active_only'] = 1;\n if (count($fields['membership']['status_id']['IN']) > 1) {\n CRM_Core_Session::setStatus(ts('You set \"any current status\" and specific statuses, specific statuses have been discarded'));\n }\n unset($fields['membership']['status_id']);\n continue;\n }\n }\n }\n }\n }", "public function setActiveOrNot() {\n\n $active = 0;\n\n if ($this->getMotivationTextForClient() != null && $this->getPersonalityTextForClient() != null &&\n ($this->getIdentificationForClient() != null || $this->getDrivingLicenceForClient() != null) && $this->getPhotoForClient() != null) {\n\n $active = 1;\n }\n $this->active = $active;\n $this->save(false);\n }", "public function setUserDefaultStatus($userDefaultStatus);", "public static function membership_status() {\r\n\t\tstatic $status = null;\r\n\r\n\t\t// Get the status.\r\n\t\tif ( is_null( $status ) ) {\r\n\t\t\t// Dashboard is active.\r\n\t\t\tif ( class_exists( 'WPMUDEV_Dashboard' ) ) {\r\n\t\t\t\t// Get membership type.\r\n\t\t\t\t$status = WPMUDEV_Dashboard::$api->get_membership_type();\r\n\t\t\t\t// Get available projects.\r\n\t\t\t\t$projects = WPMUDEV_Dashboard::$api->get_membership_projects();\r\n\r\n\t\t\t\t// Beehive single plan.\r\n\t\t\t\tif ( ( 'unit' === $status && ! in_array( 51, $projects, true ) ) || ( 'single' === $status && 51 !== $projects ) ) {\r\n\t\t\t\t\t$status = 'upgrade';\r\n\t\t\t\t} elseif ( 'free' === $status && WPMUDEV_Dashboard::$api->has_key() ) {\r\n\t\t\t\t\t// Check if API key is available but status is free, then it's expired.\r\n\t\t\t\t\t$status = 'expired';\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$status = 'free';\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * Filter to modify WPMUDEV membership status or user.\r\n\t\t *\r\n\t\t * @param string $status Status.\r\n\t\t *\r\n\t\t * @since 3.2.0\r\n\t\t */\r\n\t\treturn apply_filters( 'beehive_wpmudev_membership_status', $status );\r\n\t}", "public function changeStatus(){\r\n if ($this->m_status == 'active') {\r\n $this->m_status = 'innactive';\r\n }\r\n elseif ($this->m_status == 'innactive') {\r\n $this->m_status = 'active';\r\n }\r\n }", "public function _setStatusDefault($default) {\n if ('draft' === $default) {\n $this->_fields['online_status']['default'] = 0;\n }\n }", "function set_user_type($user_active)\n{\n\treturn ($user_active) ? USER_NORMAL : USER_INACTIVE;\n}", "public function initializeUserStatus()\n {\n // Automatic Login\n if ($memberId = $this->getRememberedMemberId())\n {\n $this->setMemberId($memberId);\n }\n\n // get a instance of Member or opAnonymousMember as the user\n opActivateBehavior::disable();\n $member = $this->getMember();\n opActivateBehavior::enable();\n\n // if user is (U3), or (U1) but rejected login\n if ($member instanceof opAnonymousMember || $member->getIsLoginRejected())\n {\n $this->logout();\n $isSNSMember = false;\n }\n else\n {\n // this value is true only if user is (U1)\n $isSNSMember = (bool)$member->getIsActive();\n }\n\n if ($isSNSMember)\n {\n $member->updateLastLoginTime();\n }\n\n $this->setIsSNSMember($isSNSMember);\n }", "public function setDefault($default) {\n if ($default) {\n $this->status = $this->status | VOIPUSERNUMBER_DEFAULT;\n }\n else {\n $this->status = $this->status ^ VOIPUSERNUMBER_DEFAULT;\n }\n }", "protected function setActiveState()\n {\n $this->isActive = $this->filterValue ? true : false;\n }", "public function setActive($value) {\n\t\t$this->_active = $value;\n\t}", "public function active_group_restriction(){\r\n $post_data = app('request')->body;\r\n if($post_data['current_status'] == 1){\r\n $new_status = 0;\r\n }else{\r\n $new_status = 1;\r\n }\r\n $update_meta = array();\r\n $update_meta['chat_meta_id'] = $post_data['chat_meta_id'];\r\n $update_meta[$post_data['restriction_type']] = $new_status;\r\n app('chat')->updateGroupChatMetaData($update_meta);\r\n return json_response([\"success\" => 'true', \"type\" => $post_data['restriction_type'], \"status\" => $new_status]);\r\n }", "public function setActive();", "public function setActive() {\n $this->_active = true;\n }", "public function setStatus( $active )\n\t\t{\n\t\t\t$this->_active = (bool) $active;\n\t\t}", "public function change_testimonials_status(){\n\t\tif ($this->checkLogin('A') == ''){\n\t\t\tredirect('admin');\n\t\t}else {\n\t\t\t$mode = $this->uri->segment(4,0);\n\t\t\t$user_id = $this->uri->segment(5,0);\n\t\t\t$status = ($mode == '0')?'InActive':'Active';\n\t\t\t$newdata = array('status' => $status);\n\t\t\t$condition = array('id' => $user_id);\n\t\t\t$this->testimonials_model->update_details(TESTIMONIALS,$newdata,$condition);\n\t\t\t$this->setErrorMessage('success','Contact Status Changed Successfully');\n\t\t\tredirect('admin/testimonials/display_testimonials_list');\n\t\t}\n\t}", "public function setUserActive($active = false) {\n $this->active = $active;\n }", "public function change_user_status(){\n\t\tif ($this->checkLogin('CA') == ''){\n\t\t\tredirect('deals_crm');\n\t\t}else {\n\t\t\t$mode = $this->uri->segment(4,0);\n\t\t\t$user_id = $this->uri->segment(5,0);\n\t\t\t$status = ($mode == '0')?'Inactive':'Active';\n\t\t\t$newdata = array('status' => $status);\n\t\t\t$condition = array('id' => $user_id);\n\t\t\t$this->user_model->update_details(USERS,$newdata,$condition);\n\t\t\t$this->setErrorMessage('success','User Status Changed Successfully');\n\t\t\tredirect('crmadmin/users/display_user_list');\n\t\t}\n\t}", "function setDefaultRole(){\r\n\t\t$role_id=decodeId($this->uri->segment(4,null));\r\n\t $role_status=decodeId($this->uri->segment(5,null)); \r\n\t\tif(!$this->role->isRoleVerified($role_id)){ // if not Available Location\r\n\t\t\tset_flash_message(ROLE_VERIFICATION_FAILED,'error');\r\n\t\t\tredirect(\"admincms/roles/\");\r\n\t\t}\r\n\t\t\r\n\t\tif($role_status==1){\r\n\t\t$data=array('is_default'=>FALSE);\t\t\t\t\t\t\r\n\t\t$this->general->updateData(TBL_MST_ROLES,array('is_default'=>TRUE),$data);\t\t\r\n\t\t$data=array('is_default'=>TRUE);\r\n\t\t$this->general->updateData(TBL_MST_ROLES,array('id'=>$role_id),$data);\t\t\r\n\t\tredirect(\"admincms/roles/\");\r\n\t\t}else{\r\n\t\t\tset_flash_message(OPS_THE_STAUS_FIELD_IS_INACTIVE,'error');\r\n\t\t\tredirect(\"admincms/roles/\");\r\n\t\t\t}\r\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
print update information for the baseband page
function printUpdateHTML($get) { # check whether the caspsr_baseband_controller is running $running = 0; $pid_file = $this->cfg["SERVER_CONTROL_DIR"]."/caspsr_baseband_controller.pid"; if (file_exists($pid_file)) $running++; $cmd = "pgrep -u dada -f '^perl.*server_caspsr_baseband_controller.pl'"; $output = array(); $lastline = exec($cmd, $output, $rval); if ($rval == 0) $running++; if ($running == 2) $output = "caspsr:::baseband active active\n"; else $output = "caspsr:::baseband inactive inactive\n"; $port = $this->cfg["CLIENT_DECIDB_PORT"]; for ($i=0; $i<$this->cfg["NUM_PWC"]; $i++) { $host = $this->cfg["PWC_".$i]; list ($socket, $result) = openSocket($host, $port); $eod = 0; if ($result == "ok") { $bytes_written = socketWrite($socket, "state\r\n"); $max = 30; while (!$eod && $max > 0) { list ($result, $response) = socketRead($socket); if ($response == "ERROR: socket closed before read") $eod = 1; if (strlen($response) > 1) { if ((strpos($response, "ok") !== FALSE) || (strpos($response, "fail") != FALSE)) $eod = 1; else $output .= $host.":::".$response."\n"; } $max--; } socket_close($socket); } else { $output .= $host.":::Could not connect to $host:$port\n"; } } echo $output; }
[ "function printUpdateHTML($get)\n {\n if ($get[\"type\"] == \"network_rates\") \n {\n\n # get information about the network interfaces\n $cmd = \"sar -n DEV 1 1 | grep Average\";\n $output = array();\n exec($cmd, $output);\n $results = \"\";\n\n foreach ($output as $line) \n {\n list ($junk, $dev, $rxpck, $txpck, $rxbyt, $txbyt, $rxcmp, $txcmp, $rxmcst) = split(\" +\", $line);\n\n $rx_mb = sprintf(\"%5.2f\", ($rxbyt/1045876));\n $tx_mb = sprintf(\"%5.2f\", ($txbyt/1045876));\n\n // swinburne VLAN\n if ($dev == \"eth1\")\n {\n $results .= \"SWIN:\".$rx_mb.\":\".$tx_mb.\"\\n\";\n }\n\n // PRKS Network\n if ($dev == \"eth3\") \n {\n $results .= \"PRKS:\".$rx_mb.\":\".$tx_mb.\"\\n\";\n }\n\n // BPSR Network\n if ($dev == \"eth3\")\n {\n $results .= \"BPSR:\".$rx_mb.\":\".$tx_mb.\"\\n\";\n }\n }\n echo $results;\n }\n\n if ($get[\"type\"] == \"disk_usage\") \n {\n $lines = array();\n\n # get a list of finished obseravations\n $cmd = \"cd /lfs/raid0/bpsr; du -sbL finished/P* swin/send/P* | awk -F/ '{print \\$1\\\" \\\"\\$(NF)}' | awk '{print \\$3\\\" \\\"\\$1}'\";\n exec($cmd, $lines);\n $html = \"FINISHED\";\n $results = array();\n for ($i=0; $i<count($lines); $i++)\n {\n list ($pid, $size) = split(\" \", $lines[$i]);\n if (!array_key_exists($pid, $results)) \n $results[$pid] = 0;\n $results[$pid] += $size;\n }\n $keys = array_keys($results);\n for ($i=0; $i<count($keys); $i++)\n {\n $html .= \":\".$keys[$i].\" \".sprintf(\"%0.2f\",($results[$keys[$i]]/1073741824)).\" GB\";\n }\n $html .= \"\\n\";\n\n # get a list of waiting for parkes archiving\n $lines = array();\n $results = array();\n $cmd = \"cd /lfs/raid0/bpsr/parkes/archive; du -sbL P* | awk '{print $2\\\" \\\"$1}'\";\n exec($cmd, $lines);\n for ($i=0; $i<count($lines); $i++)\n {\n list ($pid, $size) = split(\" \", $lines[$i]);\n if (!array_key_exists($pid, $results))\n $results[$pid] = 0;\n $results[$pid] += $size;\n }\n $html .= \"ARCHIVE\";\n $keys = array_keys($results);\n for ($i=0; $i<count($keys); $i++)\n {\n $html .= \":\".$keys[$i].\" \".sprintf(\"%0.2f\",($results[$keys[$i]]/1073741824)).\" GB\";\n }\n $html .= \"\\n\";\n\n # get a list of PIDs that have been archived\n $lines = array();\n $results = array();\n $cmd = \"cd /lfs/raid0/bpsr/archived; du -sbL P* | awk '{print $2\\\" \\\"$1}'\";\n exec($cmd, $lines);\n for ($i=0; $i<count($lines); $i++)\n {\n list ($pid, $size) = split(\" \", $lines[$i]);\n if (!array_key_exists($pid, $results))\n $results[$pid] = 0;\n $results[$pid] += $size;\n }\n $html .= \"ARCHIVED\";\n $keys = array_keys($results);\n for ($i=0; $i<count($keys); $i++)\n {\n $html .= \":\".$keys[$i].\" \".sprintf(\"%0.2f\",($results[$keys[$i]]/1073741824)).\" GB\";\n }\n $html .= \"\\n\";\n\n echo $html;\n\n }\n }", "function show_info_base($id_base,$write_in_base)\n{\n global $dev_server_bool;\n\t$req=requete(\"SELECT nom_base,`description`,`references`,owner FROM bases WHERE id_base='\".$id_base.\"'\");\n\t$response=fetch_array($req);\n\t\n\t//Keeping for later (print info base)\n\t$nom_base=$response[\"nom_base\"];\n\t$description=$response[\"description\"];\n\t$references=$response[\"references\"];\n\t$owner=$response[\"owner\"];\n\t/*Printing info about the base*/\n\tif (( ($owner==$_SESSION['id']) || ($_SESSION['admin'])) && ($dev_server_bool))\n\t{\n\t begin_box_js(_(\"Base\").\" \",\"info_base\",\"<i><a href='show.php?id_base=\".$_GET[\"id_base\"].\"'>\".$nom_base.\"</a><a href='update.php?id_base=\".$_GET[\"id_base\"].\"'><img src='images/design/edit.png' alt='\"._(\"Editer\").\"' title='\"._(\"Editer\").\"' width='20' height='20'/></a></i>\"); \n\t}\n\telse\n\t{\n\t begin_box_js(_(\"Base\").\" \",\"info_base\",\"<i><a href='show.php?id_base=\".$_GET[\"id_base\"].\"'>\".$nom_base.\"</a></i>\");\n\t}\n\t?>\n\t<tr>\n\t<td>\n\t<table class='tableau_info'>\n\t<?php\n\toutput_show_form($response,$_SESSION[\"mode\"],\"info\",\"base\");\n\t?>\n\t</table>\n\t</td>\n\t</tr>\n\t<?php\n\t\n\tend_box();\n}", "private function printBaseInterface()\n\t\t{\n // Initialize the aiowaffTailSyncMonitor class\n require_once( $this->the_plugin->cfg['paths']['plugin_dir_path'] . '/modules/synchronization/tail.php' );\n $syncTail = new aiowaffTailSyncMonitor($this->the_plugin);\n \n $syncTail->printBaseInterface( 'stats_prod' );\n\t\t}", "function updateOverview()\n\t{\n\t\t$this->getExtractionStatus();\n\t}", "function do_bin_info(array $querybin)\n{\n global $api_timezone;\n\n $response_mediatype = choose_mediatype(['application/json', 'text/html', 'text/plain']);\n\n switch ($response_mediatype) {\n case 'application/json':\n respond_with_json($querybin);\n break;\n\n case 'text/html':\n\n $script_url = $_SERVER['SCRIPT_URL'];\n $components = explode('/', $script_url);\n array_pop($components);\n $query_bin_list = implode('/', $components);\n\n html_begin(\"Query bin: \" . $querybin['bin'],\n [\n [\"Query Bins\", $query_bin_list],\n [$querybin['bin']]\n ]);\n\n echo \"<fieldset class=\\\"if_parameters\\\">\";\n echo \"<legend>Query bin information</legend>\\n\";\n $keys = array_keys($querybin);\n sort($keys);\n echo \"<table>\\n\";\n echo \"<tbody>\\n\";\n foreach ($keys as $key) {\n echo \"<tr><th>\";\n echo htmlspecialchars($key);\n echo \"</th><td>\";\n\n switch ($key) {\n case 'maxtime':\n case 'mintime':\n $t = $querybin[$key];\n if (isset($t)) {\n echo dt_format_html(dt_from_utc($t), $api_timezone);\n } else {\n echo '-';\n }\n break;\n default:\n echo htmlspecialchars($querybin[$key]);\n break;\n }\n echo \"</td></tr>\\n\";\n }\n echo \"</tbody>\\n\";\n echo \"</table>\\n\";\n\n echo \"<p>\";\n\n echo \"<a title=\\\"View tweets\\\" href=\\\"\";\n echo htmlspecialchars($querybin['bin']);\n echo \"/tweets\\\">Tweets</a>\";\n\n echo \" - \";\n\n echo \"<a title=\\\"View mentions\\\" href=\\\"\";\n echo htmlspecialchars($querybin['bin']);\n echo \"/mentions\\\">Mentions</a>\";\n\n echo \" - \";\n\n echo \"<a title=\\\"View hashtags\\\" href=\\\"\";\n echo htmlspecialchars($querybin['bin']);\n echo \"/hashtags\\\">Hashtags</a>\";\n\n echo \" - \";\n\n echo \"<a title=\\\"View URLs\\\" href=\\\"\";\n echo htmlspecialchars($querybin['bin']);\n echo \"/urls\\\">URLs</a>\";\n\n echo \"</p>\";\n\n echo \"</fieldset>\\n\";\n\n html_end();\n break;\n\n case 'text/plain':\n default:\n print(\"Query bin: {$querybin['bin']}\\n\");\n\n $keys = array_keys($querybin);\n sort($keys);\n foreach ($keys as $key) {\n switch ($key) {\n case 'bin':\n // skip: already displayed above\n break;\n case 'maxtime':\n case 'mintime':\n print(\" $key: \");\n $t = $querybin[$key];\n if (isset($t)) {\n print(dt_format_text(dt_from_utc($t), $api_timezone));\n } else {\n print('-');\n }\n print(\"\\n\");\n break;\n default:\n print(\" $key: $querybin[$key]\\n\");\n break;\n }\n }\n break;\n }\n}", "static function update() {\n\t\t\tglobal $parts,$_POST;\n\t\t\t$g = $parts[\"bills\"][\"settings\"];\n\t\t\t\n\t\t\tforeach ($_POST as $con=>$o) {\n\t\t\t\tif (isset($g[$con])) \n\t\t\t\t\t$g[$con] = $o;\n\t\t\t\tif ($con==\"dropable\")\n\t\t\t\t\t$g[$con] = (bool)$o;\n\t\t\t}\n\t\t\t\n\t\t\t$parts[\"bills\"][\"settings\"] = $g;\n\t\t\t\n\t\t\t$output = \"<?php \\n\".\"$\".\"parts = \".var_export($parts,true).\";\\n\\n\";\n\t\t\t\n\t\t\tfile_put_contents(\"conf/parts.inc.php\", $output);\n\t\t\t\t\t\t\n\t\t\treturn \"<div class='alert alert-info'>Bilgiler Güncellendi</div>\";\n\t\t}", "public function printStats()\n {\n print(\"============= FP-GROWTH 0.96r19 - STATS =============\");\n $temps = $this->endTime - $this->startTimestamp;\n print(\"\\n Transactions count from database : {$this->transactionCount}\");\n print(\"\\n Min support relative: $this->minSupportRelative\");\n print(\"\\n Max memory usage Kb: {$this->memmoryUsed}\");\n print(\"\\n Frequent itemsets count : {$this->itemsetCount}\");\n print(\"\\n Total time ~ {$temps} ms\");\n print(\"\\n===================================================\");\n }", "function block__upl_data_info(){\n $app =& Dataface_Application::getInstance();\n $record =& $app->getRecord();\n \n echo \"<table style='border:1 px solid black;border-radius:10px;text-align:center;' width='50%'>\";\n echo \"<tr><th>Station Type</th><th>inserted Records</th><th>updated Records</th></tr>\";\n echo \"<tr><td>Meteo</td><td>{$record->val('meteo_insert')}</td>\n <td>{$record->val('meteo_update')}</td></tr>\";\n echo \"<tr><td>Hydro</td><td>{$record->val('hydro_insert')}</td>\n <td>{$record->val('hydro_update')}</td></tr>\";\n echo \"</table>\";\n }", "function box_upgrade_info()\n\t{\n\t\tglobal $lang, $language;\n\t\tglobal $current_phpbb_version, $phpbb_version;\n\t\tglobal $current_ip_version, $ip_version;\n\n\t\techo('<br />' . \"\\n\");\n\t\t$phpbb_update = '';\n\t\tif ($current_phpbb_version == $phpbb_version)\n\t\t{\n\t\t\t//$box_message = $lang['phpBB_Version_UpToDate'];\n\t\t\t//$page_framework->box('green', 'green', $box_message);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$phpbb_update = '&amp;phpbb_update=true';\n\t\t\t// Comment \"Force phpBB update\" if you want to make all db updates all at once\n\t\t\t// Force phpBB update - BEGIN\n\t\t\t$box_message = $lang['phpBB_Version_NotUpToDate'] . '<br /><br />' . sprintf($lang['ClickUpdate'], '<a href=\"' . ip_functions::append_sid(THIS_FILE . '?mode=update_phpbb') . '\">', '</a>');\n\t\t\t$this->box('yellow', 'red', $box_message);\n\t\t\t$this->page_footer(false);\n\t\t\texit;\n\t\t\t// Force phpBB update - END\n\t\t}\n\t\t//echo('<br /><br />');\n\n\t\tif (($current_ip_version == $ip_version) && ($phpbb_update == ''))\n\t\t{\n\t\t\t$needs_update = false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$needs_update = true;\n\t\t\t$phpbb_string = '';\n\t\t\tif ($phpbb_update != '')\n\t\t\t{\n\t\t\t\t$phpbb_string = $lang['phpBB_Version_NotUpToDate'] . '<br /><br />';\n\t\t\t}\n\n\t\t\t$ip_string = $lang['IcyPhoenix_Version_NotUpToDate'] . '<br /><br />';\n\t\t\tif ($current_ip_version == $lang['NotInstalled'])\n\t\t\t{\n\t\t\t\t$ip_string = $lang['IcyPhoenix_Version_NotInstalled'] . '<br /><br />';\n\t\t\t}\n\t\t}\n\n\t\tif ($needs_update == false)\n\t\t{\n\t\t\t$box_message = $lang['IcyPhoenix_Version_UpToDate'];\n\t\t\t$this->box('green', 'green', $box_message);\n\t\t}\n\t\telseif (($needs_update == true) && version_compare($current_ip_version, '1.2.9.36', '<') && !defined('IP_DB_UPDATE'))\n\t\t{\n\t\t\t$this->box_upgrade_steps();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$box_message = $phpbb_string . $ip_string . sprintf($lang['ClickUpdate'], '<a href=\"' . ip_functions::append_sid(THIS_FILE . '?mode=update' . $phpbb_update) . '\">', '</a>');\n\t\t\t$this->box('yellow', 'red', $box_message);\n\t\t}\n\t\techo('<br class=\"clear\" />' . \"\\n\");\n\t\techo('<br /><br />' . \"\\n\");\n\t}", "function box_upgrade_info()\n\t{\n\t\tglobal $lang, $language;\n\t\tglobal $current_phpbb_version, $phpbb_version;\n\t\tglobal $current_ip_version, $ip_version;\n\n\t\techo('<br />' . \"\\n\");\n\t\t$phpbb_update = '';\n\t\tif ($current_phpbb_version == $phpbb_version)\n\t\t{\n\t\t\t//$box_message = $lang['phpBB_Version_UpToDate'];\n\t\t\t//$page_framework->box('green', 'green', $box_message);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$phpbb_update = '&amp;phpbb_update=true';\n\t\t\t// Comment \"Force phpBB update\" if you want to make all db updates all at once\n\t\t\t// Force phpBB update - BEGIN\n\t\t\t$box_message = $lang['phpBB_Version_NotUpToDate'] . '<br /><br />' . sprintf($lang['ClickUpdate'], '<a href=\"' . ip_functions::append_sid(THIS_FILE . '?mode=update_phpbb') . '\">', '</a>');\n\t\t\t$this->box('yellow', 'red', $box_message);\n\t\t\t$this->page_footer(false);\n\t\t\texit;\n\t\t\t// Force phpBB update - END\n\t\t}\n\t\t//echo('<br /><br />');\n\n\t\tif (($current_ip_version == $ip_version) && ($phpbb_update == ''))\n\t\t{\n\t\t\t$needs_update = false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$needs_update = true;\n\t\t\t$phpbb_string = '';\n\t\t\tif ($phpbb_update != '')\n\t\t\t{\n\t\t\t\t$phpbb_string = $lang['phpBB_Version_NotUpToDate'] . '<br /><br />';\n\t\t\t}\n\n\t\t\t$ip_string = $lang['IcyPhoenix_Version_NotUpToDate'] . '<br /><br />';\n\t\t\tif ($current_ip_version == $lang['NotInstalled'])\n\t\t\t{\n\t\t\t\t$ip_string = $lang['IcyPhoenix_Version_NotInstalled'] . '<br /><br />';\n\t\t\t}\n\t\t}\n\n\t\tif ($needs_update == false)\n\t\t{\n\t\t\t$box_message = $lang['IcyPhoenix_Version_UpToDate'];\n\t\t\t$this->box('green', 'green', $box_message);\n\t\t}\n\t\telseif (($needs_update == true) && version_compare($current_ip_version, '1.2.9.36', '<') && !defined('IP_DB_UPDATE'))\n\t\t{\n\t\t\t$this->box_upgrade_steps();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$box_message = $phpbb_string . $ip_string . sprintf($lang['ClickUpdate'], '<a href=\"' . ip_functions::append_sid(THIS_FILE . '?mode=update' . $phpbb_update) . '\">', '</a>');\n\t\t\t$this->box('yellow', 'red', $box_message);\n\t\t}\n\t\techo('<br clear=\"all\" />' . \"\\n\");\n\t\techo('<br /><br />' . \"\\n\");\n\t}", "protected function printVersionInfo() {\n\t\t// Why don't I just submit a PR instead of forking the tool? a) I don't think the project is active anymore,\n\t\t// b) Some of my changes might not be written well enough/deemed useful enough to include upstream\n\t\t$xfVer = XenForo_Application::$version;\n\t\t$this->printHeading(\"Version info\");\n\t\t$this->printMessage(\"XenForo-CLI by Naatan and robclancy. Forked by lol768.\" . PHP_EOL . \"Running CLI version \" . $this->_versionString . \" on XenForo $xfVer.\" . PHP_EOL);\n\n\t}", "public function update(): void\n {\n $this->temperature = $this->weatherData->getTemperature();\n $this->humidity = $this->weatherData->getHumidity();\n $this->pressure = $this->weatherData->getPressure();\n $this->display();\n }", "function perform_update() {\n $this->echo(\"Component:\", $this->component);\n $this->echo(\"New version:\", $this->new_version);\n $this->get_plugin_info();\n if ( $this->plugin_info ) {\n if ( $this->banner_low ) {\n $this->get_banner_low();\n } else {\n $this->download_assets();\n }\n\n $this->download_plugin_version();\n $this->update_installed_plugin();\n $this->update_oik_plugin();\n } else {\n $this->echo( \"Error:\",\"Not found.\" );\n }\n\n\t}", "public function displayStats()\n {\n // section 127-0-1-1--35dee990:156e03a0457:-8000:0000000000000902 begin\n // section 127-0-1-1--35dee990:156e03a0457:-8000:0000000000000902 end\n }", "public function updateReport()\n {\n $this->data['current_report'] = $this->xhprof->getReport();\n }", "public function getDetails()\n {\n echo $this->bookpage . \"\\n\";\n echo $this->bookcolor . \"\\n\";\n echo $this->bookVersion . \"\\n\";\n echo $this->bookSize . \"\\n\";\n }", "public static function printJsonUpdateStatus()\n {\n self::printJson(self::getUpdateStatus());\n }", "function printPage() {\n $this->printDebug($this->drupalGetContent());\n }", "public function debugDisplayFullInfo()\n\t{\n\t\techo '<pre>' . htmlentities($this->buffer) . '</pre>';\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets case guarantee disposition status
public function getCaseGuaranteeDisposition() { return $this->getCaseEntity()->getData('guarantee'); }
[ "public function getCaseGuaranteeDisposition()\n {\n return $this->_rootElement->find($this->caseGuaranteeDisposition)->getText();\n }", "private function checkCaseGuaranteeDisposition()\n {\n \\PHPUnit\\Framework\\Assert::assertEquals(\n $this->signifydData->getGuaranteeDisposition(),\n $this->orderView->getFraudProtectionBlock()->getCaseGuaranteeDisposition(),\n 'Case Guarantee Disposition status is wrong for order #' . $this->orderId\n );\n }", "public function getVestaGuaranteeStatus()\n {\n $guaranteeStatus = null;\n $currentOrder = $this->getOrder();\n $guaranteeRes = $currentOrder->getVestaGuaranteeStatus();\n switch ($guaranteeRes) {\n case \"0\":\n $guaranteeStatus = \"Declined\";\n break;\n case \"1\";\n $guaranteeStatus = \"Approved\";\n break;\n default:\n $guaranteeStatus = \"N/A\";\n break;\n }\n\n return $guaranteeStatus;\n }", "public function getOrderItemDisposition()\n {\n return $this->_fields['OrderItemDisposition']['FieldValue'];\n }", "public function getDispositionCode()\n {\n return $this->dispositionCode;\n }", "private function __getDeliveryStatus() {\n return $this->data->TrackDetails->StatusDescription;\n }", "public function get_status() {\n\t\tif ( $this->is_closed() ) {\n\t\t\treturn self::DEAL_STATUS_CLOSED;\n\t\t} elseif ( $this->is_pending() ) {\n\t\t\treturn self::DEAL_STATUS_PENDING;\n\t\t} elseif ( $this->is_open() ) {\n\t\t\treturn self::DEAL_STATUS_OPEN;\n\t\t} else {\n\t\t\treturn self::DEAL_STATUS_UNKNOWN;\n\t\t}\n\t}", "function getPurchaseInnerStatus(): ?string;", "public function getProduceStatus()\n {\n return $this->produceStatus;\n }", "public function getWeeeTaxDisposition();", "public function status()\n {\n $decisions = array(\n 'nominateAdmit',\n 'nominateDeny',\n 'finalAdmit',\n 'finalDeny',\n 'acceptOffer',\n 'declineOffer'\n );\n $final = '';\n foreach ($decisions as $decision) {\n if ($this->$decision) {\n $final = $decision;\n }\n }\n\n return $final;\n }", "public function getDeceasedStatus(): string\n {\n return $this->deceasedStatus;\n }", "public function getGuaranteeRequiredInd()\n {\n return $this->guaranteeRequiredInd;\n }", "public function getContentDisposition() {\n\t\t\treturn $this->contentDisposition;\n\t\t}", "public function getContentDisposition()\n {\n return $this->contentDisposition;\n }", "protected function _getOrderPaymentStatusFinal()\n {\n $sStatus = null;\n if ($this->_isOrderPaymentStatusFinal()) {\n $sStatus = $this->getOrder()->getPaymentStatus();\n }\n\n return $sStatus;\n }", "function getOrderStatus()\r\n {\r\n \treturn $this->order->status();\r\n }", "public function getStatus()\n\t{\n\t\tif ($this->status == \"due\")\n\t\t\treturn \"Due Now\";\n\t\telse if ($this->status == \"issued\")\n\t\t\treturn \"Issued\";\n\t\telse if ($this->status == \"refunded\")\n\t\t\treturn \"Refunded\";\n\t\t\n\t}", "public function getGuaranteePolicyIndicator()\n {\n return $this->guaranteePolicyIndicator;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Various parameters are passed into the Request, and using them, the coursework marks are calculated limit by default is 30 records, unless maximum has been specified by the user. If maximum has not been chosen, then the returned results will be determined by the offset and limit. If the download option has been chosen, the name of the file will be returned for the download to start otherwise an array of marks for students are returned
public function getStudentsCourseworkMarks(Request $request){ $courseId = $request->input('courseId'); $courseworkId = $request->input('courseworkId'); $studentNumber = $request->input('studentNumber'); $download = $request->input('download'); $limit = 30; $offsetRaw = $request->input('offset'); $offset = $offsetRaw*$limit; $students = []; if($studentNumber){ $usrs = User::where('student_number', 'like', '%'.$studentNumber.'%') ->orWhere('employee_id', 'like', '%'.$studentNumber.'%')->get(); if($usrs) { foreach ($usrs as $usr) { $students[] = UserCourseMap::where('user_id', $usr->id) ->where('course_id', $courseId)->first()->user; } } } else { if($offsetRaw == -1){ $users = UserCourseMap::where('course_id', $courseId)->get(); } else { $users = UserCourseMap::where('course_id', $courseId) ->limit($limit)->offset($offset)->get(); } if($users) { foreach ($users as $user) { $students[] = $user->user; } } } $course = Course::where('id', $courseId)->first(); $coursework = Coursework::where('id', $courseworkId)->first(); $subcourseworks = $coursework?$coursework->subcourseworks:[]; $columns = []; $results = []; foreach($subcourseworks as $subcwrk){ $columns[] = $subcwrk->name; } $results['columns'] = $columns; $marks = []; foreach ($students as $user){ $result = []; $result['student_number'] = $user->student_number; $result['employee_id'] = $user->employee_id; $courseworkTotalMark = 0.0; $subcourseworks = []; if($coursework) { foreach ($coursework->subcourseworks as $subcoursework) { $subcourseworkWeighting = $subcoursework->weighting_in_coursework; $subcourseworkN = 0.0; $subcourseworkD = 0.0; foreach ($subcoursework->sections as $section) { $subcourseworkD += $section->max_marks; $sectionMap = SectionUserMarkMap::where('user_id', $user->id) ->where('section_id', $section->id)->first(); $subcourseworkN += ($sectionMap ? $sectionMap->marks : 0); } $subcourseworkFinalMark = $subcourseworkD != 0 ? ($subcourseworkN * $subcourseworkWeighting) / $subcourseworkD : 0; $courseworkTotalMark += $subcourseworkFinalMark; $subcourseworks[] = round($subcourseworkFinalMark, 2); } } $result['subcourseworks'] = $subcourseworks; $result['total_marks'] = round($courseworkTotalMark, 2); $marks[] = $result; } $results['marks'] = $marks; if(!$download) { return Response::json($results); } else { $fileName = "coursework_marks_".$courseId.".csv"; $fullFileName = "generated_files/".$fileName; $myfile = fopen($fullFileName, "w"); $headers = ['Campus Id', 'Emplid']; foreach ($results['columns'] as $column) { $headers[] = $column; } $headers[] = 'Total'; fputcsv($myfile, $headers); foreach($results['marks'] as $result){ $line = [$result['student_number'], $result['employee_id']]; foreach ($result['subcourseworks'] as $subcoursework) { $line[] = $subcoursework; } $line[] = $result['total_marks']; fputcsv($myfile, $line); } fclose($myfile); return Response::json($fullFileName); } }
[ "public function getStudentsSubcourseworkMarks(Request $request){\n $courseId = $request->input('courseId');\n $courseworkId = $request->input('courseworkId');\n $subcourseworkId = $request->input('subcourseworkId');\n $studentNumber = $request->input('studentNumber');\n $download = $request->input('download');\n $limit = 30;\n $offsetRaw = $request->input('offset');\n $offset = $offsetRaw*$limit;\n\n $students = [];\n if($studentNumber){\n $usrs = User::where('student_number', 'like', '%'.$studentNumber.'%')\n ->orWhere('employee_id', 'like', '%'.$studentNumber.'%')->get();\n if($usrs) {\n foreach ($usrs as $usr) {\n $students[] = UserCourseMap::where('user_id', $usr->id)\n ->where('course_id', $courseId)->first()->user;\n }\n }\n } else {\n if($offsetRaw == -1){\n $users = UserCourseMap::where('course_id', $courseId)->get();\n } else {\n $users = UserCourseMap::where('course_id', $courseId)\n ->limit($limit)->offset($offset)->get();\n }\n if($users) {\n foreach ($users as $user) {\n $students[] = $user->user;\n }\n }\n }\n\n $course = Course::where('id', $courseId)->first();\n $coursework = Coursework::where('id', $courseworkId)->first();\n $subcoursework = SubCoursework::where('id', $subcourseworkId)->first();\n $sections = Section::where('subcoursework_id', $subcourseworkId)->get();\n\n $columns = [];\n $results = [];\n\n foreach($sections as $section){\n $columns[] = $section->name;\n }\n\n $results['columns'] = $columns;\n $records = [];\n\n foreach ($students as $user){\n $result = [];\n $result['student_number'] = $user->student_number;\n $result['employee_id'] = $user->employee_id;\n\n $subcourseworkWeighting = $subcoursework->weighting_in_coursework;\n $subcourseworkN = 0.0;\n $subcourseworkD = 0.0;\n $marks = [];\n foreach ($sections as $section) {\n $mark = [];\n $mark['id'] = $section->id;\n $sectionMap = SectionUserMarkMap::where('user_id', $user->id)\n ->where('section_id', $section->id)->first();\n $mark['numerator'] = $sectionMap? round($sectionMap->marks, 2):0;\n $mark['denominator'] = round($section->max_marks, 2);\n $subcourseworkD += $section->max_marks;\n $subcourseworkN += $mark['numerator'];\n $marks[] = $mark;\n }\n $subcourseworkFinalMark = $subcourseworkD!=0?($subcourseworkN*$subcourseworkWeighting)/$subcourseworkD:0;\n $result['sections'] = $marks;\n $result['total_num'] = round($subcourseworkN, 2);\n $result['total_den'] = round($subcourseworkD, 2);\n $result['percentage'] = round($subcourseworkD!=0?($subcourseworkN*100.0)/$subcourseworkD:0, 2);\n $result['weighted_marks'] = round($subcourseworkFinalMark, 2);\n $records[] = $result;\n }\n $results['marks'] = $records;\n\n if(!$download) {\n return Response::json($results);\n } else {\n $fileName = \"subcoursework_marks_\".$courseId.\".csv\";\n $fullFileName = \"generated_files/\".$fileName;\n\n $myfile = fopen($fullFileName, \"w\");\n\n $headers = ['Campus Id', 'Emplid'];\n foreach ($results['columns'] as $column) {\n $headers[] = $column;\n }\n $headers[] = 'Total Marks';\n $headers[] = 'Total Marks (%)';\n $headers[] = 'Weighted Marks';\n\n fputcsv($myfile, $headers);\n\n foreach($results['marks'] as $result){\n $line = [$result['student_number'], $result['employee_id']];\n foreach ($result['sections'] as $section) {\n $line[] = $section['numerator'] . '/' . $section['denominator'];\n }\n $line[] = $result['total_num']. '/' . $result['total_den'];\n $line[] = $result['percentage'];\n $line[] = $result['weighted_marks'];\n fputcsv($myfile, $line);\n }\n fclose($myfile);\n\n return Response::json($fullFileName);\n }\n\n }", "public function getStudentsMarks(Request $request){\n $studentNumber = $request->input('studentNumber');\n $courseId = $request->input('courseId');\n $download = $request->input('download');\n $offsetRaw = $request->input('offset');\n\n $returnResults = $this->getStudentMarksList($studentNumber, $courseId, $offsetRaw);\n\n if(!$download) {\n return Response::json($returnResults);\n } else {\n $studentsMarks = $returnResults[0];\n\n $fileName = \"class_year_marks_\".$courseId.\".csv\";\n $fullFileName = \"generated_files/\".$fileName;\n\n $myfile = fopen($fullFileName, \"w\");\n\n fputcsv($myfile, explode(', ','Campus Id, Emplid, Class Mark, Year Mark, DP Status, Final Grade'));\n\n foreach($studentsMarks as $result){\n $line = implode(', ', [$result['student_number'], $result['employee_id'], $result['class_mark'],\n $result['year_mark'], $result['dp_status'], $result['final_grade']]);\n fputcsv($myfile, explode(', ', $line));\n }\n fclose($myfile);\n\n return Response::json($fullFileName);\n }\n }", "public function getMarks(){\n\n\t\tif(Input::get('stream')){\n\t\t\t//get the list of the students that we need\n\t\t\t$students = StudentModel::select(array(\"id\",\"reg_number\",\"first_name\",\"middle_name\",\"last_name\"))\n\t\t\t\t\t\t\t\t\t->where('client_id = ?', $this->client_id)\n\t\t\t\t\t\t\t\t\t->where('archived != ?', true)\n\t\t\t\t\t\t\t\t\t->where('class_id = ?', Input::get('class'))\n\t\t\t\t\t\t\t\t\t->where('students.stream_id = ?', Input::get('stream'))\n\t\t\t\t\t\t\t\t\t->all()\n\t\t\t\t\t\t\t\t\t->result();\t\n\t\t}\n\t\telse{\n\t\t\t//get the list of the students that we need\n\t\t\t$students = StudentModel::select(array(\"id\",\"reg_number\",\"first_name\",\"middle_name\",\"last_name\"))\n\t\t\t\t\t\t\t\t\t->where('client_id = ?', $this->client_id)\n\t\t\t\t\t\t\t\t\t->where('archived != ?', true)\n\t\t\t\t\t\t\t\t\t->where('class_id = ?', Input::get('class'))\n\t\t\t\t\t\t\t\t\t->all()\n\t\t\t\t\t\t\t\t\t->result();\t\t\n\t\t}\n\n\t\t$marks = MarkModel::select(array(\"id\",\"student_id\",\"exam_id\",\"exam_score\",\"exam_percent\"))\n\t\t\t\t\t\t->where('client_id = ?', $this->client_id)\n\t\t\t\t\t\t->where('archived != ?', true)\n\t\t\t\t\t\t->where('class_id = ?', Input::get('class'))\n\t\t\t\t\t\t->where('subject_id = ?', Input::get('subject'))\n\t\t\t\t\t\t->where('exam_id = ?', Input::get('exam'))\n\t\t\t\t\t\t->where('term_id = ?', Input::get('term'))\n\t\t\t\t\t\t->where('exam_year = ?', Input::get('year'))\n\t\t\t\t\t\t->all()\n\t\t\t\t\t\t->result();\n\n\t\t$studentsList = array();\n\n\t\t//populate the class list of students with marks\n\t\tforeach ($students as $key => $stud) {\n\t\t\t$studentsList[\"ID\".$stud->id] = array(\n\t\t\t\t\t\"student_id\" => $stud->id,\n\t\t\t\t\t\"reg_number\" => $stud->reg_number,\n\t\t\t\t\t\"first_name\" => $stud->first_name,\n\t\t\t\t\t\"middle_name\" => $stud->middle_name,\n\t\t\t\t\t\"last_name\" => $stud->last_name,\n\t\t\t\t\t\"class_id\" => Input::get('class'),\n\t\t\t\t\t\"subject_id\" => Input::get('subject'),\n\t\t\t\t\t\"exam_id\" => Input::get('exam'),\n\t\t\t\t\t\"term_id\" => Input::get('term'),\n\t\t\t\t\t\"exam_year\" => Input::get('year'),\n\t\t\t\t\t\"exam_score\" => null,\n\t\t\t\t\t\"exam_percent\" => null\n\t\t\t\t);\n\t\t}\n\n\t\t//go through the list of available marks and add to each student\n\t\tforeach ($marks as $key => $mark) {\n\t\t\tif(isset($studentsList[\"ID\".$mark->student_id])){\n\t\t\t\t$studentsList[\"ID\".$mark->student_id][\"id\"] = $mark->id;\n\t\t\t\t$studentsList[\"ID\".$mark->student_id][\"exam_score\"] = $mark->exam_score;\n\t\t\t\t$studentsList[\"ID\".$mark->student_id][\"exam_percent\"] = $mark->exam_percent;\t\t\t\n\t\t\t}\t\n\t\t}\n\n\t\t//populate array list to return\n\t\t$studentMarks = array();\n\t\tforeach ($studentsList as $key => $student) {\n\t\t\t$studentMarks[] = $student;\n\t\t}\n\n\t\tView::renderJSON($studentMarks);\t\t\n\t}", "public function getStudentMarksList($conditions='',$limit='',$orderBy=''){\n\t global $REQUEST_DATA;\n\n\t if(trim($REQUEST_DATA['test'])==\"\" or trim($REQUEST_DATA['test'])==\"NT\"){\n\t $extCondition=\" AND b.testId IS NULL \";\n\t }\n\t else{\n\t\t$extCondition=\" AND b.testId = '\".$REQUEST_DATA['test'].\"'\";\n\t }\n\n\t global $sessionHandler;\n\t /*\n\t\t //get list of students having this subject as optional\n\t\t $extC= $this->getOptionalStudentList($REQUEST_DATA['classId'],$REQUEST_DATA['subject']);\n\t\t if($extC!=\"\"){\n\t\t\t $extC=\" a.studentId In ($extC) AND \";\n\t\t }\n\t */\n\t $group=((trim($REQUEST_DATA['group'])!=\"\"?trim($REQUEST_DATA['group']):0));\n\t $optionalGroup=0;\n\t if($group!=0){\n\t\t //check whether it is optional group or not\n\t\t $optGrArray=$this->checkOptionalGroup($group);\n\t\t if(count($optGrArray)>0 and is_array($optGrArray)){\n\t\t\t $optionalGroup=$optGrArray[0]['isOptional'];\n\t\t }\n\t\t else{\n\t\t\t $optionalGroup=0;\n\t\t }\n\t }\n\n\tif($optionalGroup==0){//if this group is not optional\n\t $query=\"select\n\t emp.employeeName,\n\t\t\t\t SUBSTRING_INDEX(SUBSTRING_INDEX(className,'\".CLASS_SEPRATOR.\"',4),'\".CLASS_SEPRATOR.\"',-2) AS className, SUBSTRING_INDEX(className,'\".CLASS_SEPRATOR.\"',-1) as periodName,\n\t\t\t\t subjectName, subjectCode,\n\t\t\t\t a.studentId,\n\t\t\t\t CONCAT(s.firstName,' ',s.lastName) AS studentName,\n\t\t\t\t s.rollNo,\n\t\t\t\t s.regNo,\n\t\t\t\t CONVERT(SUBSTRING(LEFT( s.rollNo, length(s.rollNo) - LENGTH(cl.rollNoSuffix)) , LENGTH( cl.rollNoPrefix ) +1), UNSIGNED) AS numericRollNo,\n\t\t\t\t IF(s.universityRollNo IS NULL OR s.universityRollNo='','\".NOT_APPLICABLE_STRING.\"',s.universityRollNo) AS universityRollNo,\n\t\t\t\t b.marksScored,\n\t\t\t\t c.subjectId ,\n\t\t\t\t b.marksScored,\n\t\t\t\t b.isMemberOfClass,\n\t\t\t\t b.isPresent,\n\t\t\t\t IF(b.testMarksId > 0, b.testMarksId,-1) AS testMarksId\n\t\t\t\t FROM\n\t\t\t\t employee emp,`subject` sub, class cl, student s , student_groups a\n\t\t\t\t LEFT JOIN \".TEST_MARKS_TABLE.\" b ON\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t a.studentId = b.studentId\n\t\t\t\t\t\t\t AND b.subjectId='\".$REQUEST_DATA['subject'].\"'\n\t\t\t\t\t\t\t $extCondition\n\t\t\t\t\t\t\t)\n\t\t\t\t LEFT JOIN \".TEST_TABLE.\" c ON\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t b.testId = c.testId\n\t\t\t\t\t\t\t AND c.subjectId='\".$REQUEST_DATA['subject'].\"'\n\t\t\t\t\t\t\t $extCondition\n\t\t\t\t\t\t\t)\n\t\t\t\t WHERE\n\t\t\t\t c.employeeId = emp.employeeId AND\n\t\t\t\t c.subjectId = sub.subjectId AND\n\t\t\t\t a.studentId=s.studentId\n\t\t\t\t AND s.classId = cl.classId\n\t\t\t\t AND a.classId = '\".$REQUEST_DATA['class'].\"'\n\t\t\t\t AND a.groupId ='\".$REQUEST_DATA['group'].\"'\n\t\t\t\t AND a.sessionId='\".$sessionHandler->getSessionVariable('SessionId').\"'\n\t\t\t\t AND a.instituteId='\".$sessionHandler->getSessionVariable('InstituteId').\"'\n\t\t\t\t ORDER BY $orderBy\n\t\t\t\t $limit\n\t\t\t\t \" ;\n\t }\n\telse{\n\t $query=\"select\n\t\t\t\t emp.employeeName,\n\t\t\t\t SUBSTRING_INDEX(SUBSTRING_INDEX(className,'\".CLASS_SEPRATOR.\"',4),'\".CLASS_SEPRATOR.\"',-2) AS className, SUBSTRING_INDEX(className,'\".CLASS_SEPRATOR.\"',-1) as periodName,\n\t\t\t\t a.studentId,\n\t\t\t\t subjectName, subjectCode,\n\t\t\t\t CONCAT(s.firstName,' ',s.lastName) AS studentName,\n\t\t\t\t s.rollNo,\n\t\t\t\t s.regNo,\n\t\t\t\t CONVERT(SUBSTRING(LEFT( s.rollNo, length(s.rollNo) - LENGTH(cl.rollNoSuffix)) , LENGTH( cl.rollNoPrefix ) +1), UNSIGNED) AS numericRollNo,\n\t\t\t\t IF(s.universityRollNo IS NULL OR s.universityRollNo='','\".NOT_APPLICABLE_STRING.\"',s.universityRollNo) AS universityRollNo,\n\t\t\t\t b.marksScored,\n\t\t\t\t c.subjectId ,\n\t\t\t\t b.marksScored,\n\t\t\t\t b.isMemberOfClass,\n\t\t\t\t b.isPresent,\n\t\t\t\t IF(b.testMarksId > 0, b.testMarksId,-1) AS testMarksId\n\t\t\t\t FROM\n\t\t\t\t employee emp, `subject` sub, class cl, student s , student_optional_subject a\n\t\t\t\t LEFT JOIN \".TEST_MARKS_TABLE.\" b ON\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t a.studentId = b.studentId\n\t\t\t\t\t\t\t AND b.subjectId='\".$REQUEST_DATA['subject'].\"'\n\t\t\t\t\t\t\t $extCondition\n\t\t\t\t\t\t\t)\n\t\t\t\t LEFT JOIN \".TEST_TABLE.\" c ON\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t b.testId = c.testId\n\t\t\t\t\t\t\t AND c.subjectId='\".$REQUEST_DATA['subject'].\"'\n\t\t\t\t\t\t\t $extCondition\n\t\t\t\t\t\t\t)\n\t\t\t\t WHERE\n\t\t\t\t c.employeeId = emp.employeeId AND\n\t\t\t\t a.subjectId = sub.subjectId AND\t\n\t\t\t\t a.studentId=s.studentId\n\t\t\t\t AND s.classId = cl.classId\n\t\t\t\t AND a.classId = '\".$REQUEST_DATA['class'].\"'\n\t\t\t\t AND a.groupId ='\".$REQUEST_DATA['group'].\"'\n\t\t\t\t AND a.subjectId ='\".$REQUEST_DATA['subject'].\"'\n\t\t\t\t AND cl.sessionId='\".$sessionHandler->getSessionVariable('SessionId').\"'\n\t\t\t\t AND cl.instituteId='\".$sessionHandler->getSessionVariable('InstituteId').\"'\n\t\t\t\t ORDER BY $orderBy\n\t\t\t\t $limit\n\t\t\t\t \" ;\n\t}\n\n\t\t\t\t//echo $query;\n\t\t return SystemDatabaseManager::getInstance()->executeQuery($query,\"Query: $query\");\n\t}", "public function getTestMarksList($conditions='',$limit='',$orderBy=''){\n\t \n global $REQUEST_DATA;\n global $sessionHandler; \n\n\t if(trim($REQUEST_DATA['test'])==\"\" or trim($REQUEST_DATA['test'])==\"NT\"){\n\t $extCondition=\" AND b.testId IS NULL \";\n\t }\n\t else{\n\t\t$extCondition=\" AND b.testId = \".$REQUEST_DATA['test'];\n\t }\n \n $roleId = $sessionHandler->getSessionVariable('RoleId'); \n $session1 ='';\n $session2 ='';\n if($roleId >= 2 && $roleId <=4) {\n $session1 = \" AND a.sessionId=\".$sessionHandler->getSessionVariable('SessionId');\n $session2 = \" AND cl.sessionId=\".$sessionHandler->getSessionVariable('SessionId');\n }\n\t /*\n\t\t //get list of students having this subject as optional\n\t\t $extC= $this->getOptionalStudentList($REQUEST_DATA['classId'],$REQUEST_DATA['subject']);\n\t\t if($extC!=\"\"){\n\t\t\t $extC=\" a.studentId In ($extC) AND \";\n\t\t }\n\t */\n\t $group=((trim($REQUEST_DATA['group'])!=\"\"?trim($REQUEST_DATA['group']):0));\n\t $optionalGroup=0;\n\t if($group!=0){\n\t\t //check whether it is optional group or not\n\t\t $optGrArray=$this->checkOptionalGroup($group);\n\t\t if(count($optGrArray)>0 and is_array($optGrArray)){\n\t\t\t $optionalGroup=$optGrArray[0]['isOptional'];\n\t\t }\n\t\t else{\n\t\t\t $optionalGroup=0;\n\t\t }\n\t }\n\n\tif($optionalGroup==0){//if this group is not optional\n\t $query=\"select\n\t\t\t\t a.studentId,\n\t\t\t\t CONCAT(s.firstName,' ',s.lastName) AS studentName,\n\t\t\t\t s.rollNo,\n\t\t\t\t s.regNo,\n\t\t\t\t CONVERT(SUBSTRING(LEFT( s.rollNo, length(s.rollNo) - LENGTH(cl.rollNoSuffix)) , LENGTH( cl.rollNoPrefix ) +1), UNSIGNED) AS numericRollNo,\n\t\t\t\t IF(s.universityRollNo IS NULL OR s.universityRollNo='','\".NOT_APPLICABLE_STRING.\"',s.universityRollNo) AS universityRollNo,\n\t\t\t\t b.marksScored,\n\t\t\t\t c.subjectId ,\n\t\t\t\t b.marksScored,\n\t\t\t\t b.isMemberOfClass,\n\t\t\t\t b.isPresent,\n\t\t\t\t IF(b.testMarksId > 0, b.testMarksId,-1) AS testMarksId\n\t\t\t\t FROM\n\t\t\t\t class cl, student s , student_groups a\n\t\t\t\t LEFT JOIN \".TEST_MARKS_TABLE.\" b ON\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t a.studentId = b.studentId\n\t\t\t\t\t\t\t AND b.subjectId=\".$REQUEST_DATA['subject'].\"\n\t\t\t\t\t\t\t $extCondition\n\t\t\t\t\t\t\t)\n\t\t\t\t LEFT JOIN \".TEST_TABLE.\" c ON\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t b.testId = c.testId\n\t\t\t\t\t\t\t AND c.subjectId=\".$REQUEST_DATA['subject'].\"\n\t\t\t\t\t\t\t $extCondition\n\t\t\t\t\t\t\t)\n\t\t\t\t WHERE\n\t\t\t\t a.studentId=s.studentId\n\t\t\t\t AND s.classId = cl.classId\n\t\t\t\t AND a.classId = \".$REQUEST_DATA['classId'].\"\n\t\t\t\t AND a.groupId =\".$REQUEST_DATA['group'].\"\n\t\t\t\t $session1\n\t\t\t\t AND a.instituteId=\".$sessionHandler->getSessionVariable('InstituteId').\"\n\t\t\t\t ORDER BY $orderBy\n\t\t\t\t $limit\n\t\t\t\t \" ;\n\t }\n\telse{\n\t $query=\"select\n\t\t\t\t a.studentId,\n\t\t\t\t CONCAT(s.firstName,' ',s.lastName) AS studentName,\n\t\t\t\t s.rollNo,\n\t\t\t\t s.regNo,\n\t\t\t\t CONVERT(SUBSTRING(LEFT( s.rollNo, length(s.rollNo) - LENGTH(cl.rollNoSuffix)) , LENGTH( cl.rollNoPrefix ) +1), UNSIGNED) AS numericRollNo,\n\t\t\t\t IF(s.universityRollNo IS NULL OR s.universityRollNo='','\".NOT_APPLICABLE_STRING.\"',s.universityRollNo) AS universityRollNo,\n\t\t\t\t b.marksScored,\n\t\t\t\t c.subjectId ,\n\t\t\t\t b.marksScored,\n\t\t\t\t b.isMemberOfClass,\n\t\t\t\t b.isPresent,\n\t\t\t\t IF(b.testMarksId > 0, b.testMarksId,-1) AS testMarksId\n\t\t\t\t FROM\n\t\t\t\t class cl, student s , student_optional_subject a\n\t\t\t\t LEFT JOIN \".TEST_MARKS_TABLE.\" b ON\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t a.studentId = b.studentId\n\t\t\t\t\t\t\t AND b.subjectId=\".$REQUEST_DATA['subject'].\"\n\t\t\t\t\t\t\t $extCondition\n\t\t\t\t\t\t\t)\n\t\t\t\t LEFT JOIN \".TEST_TABLE.\" c ON\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t b.testId = c.testId\n\t\t\t\t\t\t\t AND c.subjectId=\".$REQUEST_DATA['subject'].\"\n\t\t\t\t\t\t\t $extCondition\n\t\t\t\t\t\t\t)\n\t\t\t\t WHERE\n\t\t\t\t a.studentId=s.studentId\n\t\t\t\t AND s.classId = cl.classId\n\t\t\t\t AND a.classId = \".$REQUEST_DATA['classId'].\"\n\t\t\t\t AND a.groupId =\".$REQUEST_DATA['group'].\"\n\t\t\t\t AND a.subjectId =\".$REQUEST_DATA['subject'].\"\n\t\t\t\t $session2\n\t\t\t\t AND cl.instituteId=\".$sessionHandler->getSessionVariable('InstituteId').\"\n\t\t\t\t ORDER BY $orderBy\n\t\t\t\t $limit\n\t\t\t\t \" ;\n\t}\n\n\t\t\t\t//echo $query;\n\t\t return SystemDatabaseManager::getInstance()->executeQuery($query,\"Query: $query\");\n\t}", "public function getMarks(Request $request){\n $studentNumber = $request->input('studentNumber');\n $courseYear = $request->input('courseYear');\n $courseCode = $request->input('courseCode');\n\n $student = User::where('student_number', $studentNumber)->orWhere('employee_id', $studentNumber)->first();\n if(!$studentNumber || !$student){return [];}\n\n $deptMaps = Auth::user()->departmentMaps;\n $possibleCourses = [];\n foreach ($deptMaps as $deptMap) {\n foreach ($deptMap->department->courses as $crs) {\n if(($courseCode && $this->isSimilar($crs->code, $courseCode)) && ($courseYear && explode('-', $crs->start_date)[0]==$courseYear)) {\n $possibleCourses[] = $crs;\n } else if(!$courseCode && $courseYear && explode('-', $crs->start_date)[0]==$courseYear) {\n $possibleCourses[] = $crs;\n } else if(!$courseYear && $courseCode && $this->isSimilar($crs->code, $courseCode)){\n $possibleCourses[] = $crs;\n } else if(!$courseCode && !$courseYear) {\n $possibleCourses[] = $crs;\n }\n }\n }\n\n $courses = [];\n $userId = $student->id;\n foreach ($possibleCourses as $possibleCourse) {\n $courseId = $possibleCourse->id;\n $studentCourseMap = UserCourseMap::where('user_id', $userId)->where('course_id', $courseId)->first();\n if(!$studentCourseMap){\n continue;\n }\n $courses[] = $possibleCourse;\n }\n\n\n $results = [];\n foreach ($courses as $course){\n $classMark = 0.0;\n $yearMark = 0.0;\n $result = [];\n $result['courseName'] = $course->code;\n $result['year'] = $courseYear;\n $courseworks = [];\n $cwrks = $course->courseworks;\n\n\n // DP Calculation starts\n $subms = $course->subminimums;\n $subminimums = [];\n foreach ($subms as $subm) {\n if($subm->for_dp == 1){\n $subminimum = [];\n $subminimum['threshold'] = $subm->threshold;\n $rows = [];\n $rws = $subm->subminimumRows;\n foreach ($rws as $rw) {\n $row = [];\n $row['coursework_id'] = $rw->coursework_id;\n $row['subcoursework_id'] = $rw->subcoursework_id;\n $row['weighting'] = $rw->weighting;\n $rows[] = $row;\n }\n $subminimum['rows'] = $rows;\n $subminimums[] = $subminimum;\n }\n }\n $submCourseworks = [];\n // DP Calculation stops\n\n\n foreach ($cwrks as $cwrk){\n if($cwrk->display_to_students > (date('Y').'-'.date('m').'-'.date('d'))){\n continue;\n }\n\n $weightingYear = $cwrk->weighting_in_yearmark;\n $weightingClass = $cwrk->weighting_in_classrecord;\n\n $courseworkTotalMark = 0;\n\n $subcourseworks = [];\n $submSubcourseworks = [];\n\n foreach ($cwrk->subcourseworks as $subcwrk) {\n if($subcwrk->display_to_students > (date('Y').'-'.date('m').'-'.date('d'))){\n continue;\n }\n\n $subcoursework = [];\n $subcoursework['name'] = $subcwrk->name;\n $subcoursework['max_marks'] = round($subcwrk->max_marks, 2);\n $subcoursework['weighting'] = round($subcwrk->weighting_in_coursework, 2);\n\n $subcourseworkFinalMark = 0.0;\n $subcourseworkMarkN = 0.0;\n $subcourseworkMarkD = 0.0;\n\n $sections = [];\n foreach ($subcwrk->sections as $sctn){\n $mark = SectionUserMarkMap::where('section_id', $sctn->id)\n ->where('user_id', Auth::user()->id)->first();\n\n $mark = $mark? $mark->marks:0;\n\n $subcourseworkMarkD += $sctn->max_marks;\n $subcourseworkMarkN += $mark;\n\n $section['name'] = $sctn->name;\n $section['marks'] = round($mark, 2);\n $section['max_marks'] = round($sctn->max_marks, 2);\n $sections[] = $section;\n }\n $subcourseworkFinalMark = $subcourseworkMarkD==0?0:($subcourseworkMarkN/$subcourseworkMarkD)*$subcwrk->weighting_in_coursework;\n $subcoursework['numerator'] = round($subcourseworkMarkN, 2);\n $subcoursework['denominator'] = round($subcourseworkMarkD, 2);\n $subcoursework['weighted_marks'] = round($subcourseworkFinalMark, 2);\n $subcoursework['sections'] = $sections;\n $subcourseworks[] = $subcoursework;\n $courseworkTotalMark += $subcourseworkFinalMark;\n $submSubcourseworks[$subcwrk->id] = $subcourseworkMarkD!=0?($subcourseworkMarkN*100.0)/$subcourseworkMarkD:0;\n }\n\n $coursework['name'] = $cwrk->name;\n $coursework['subcourseworks'] = $subcourseworks;\n $coursework['total_marks'] = round($courseworkTotalMark, 2);\n $coursework['weighting_classrecord'] = round($cwrk->weighting_in_classrecord, 2);\n $coursework['weighting_yearmark'] = round($cwrk->weighting_in_yearmark, 2);\n $coursework['weighted_mark_class'] = round(($courseworkTotalMark * $weightingClass / 100.0), 2);\n $coursework['weighted_mark_year'] = round(($courseworkTotalMark * $weightingYear / 100.0), 2);\n $classMark += $coursework['weighted_mark_class'];\n $yearMark += $coursework['weighted_mark_year'];\n $courseworks[] = $coursework;\n\n $submCoursework = [];\n $submCoursework['total'] = $courseworkTotalMark;\n $submCoursework['subs'] = $submSubcourseworks;\n $submCourseworks[$cwrk->id] = $submCoursework;\n\n }\n $result['courseworks'] = $courseworks;\n $result['class_mark'] = round($classMark, 2);\n $result['year_mark'] = round($yearMark, 2);\n\n $finalGrade = UserCourseFinalGrade::where('user_id',Auth::user()->id)\n ->where('course_id', $course->id)->first();\n if($finalGrade){\n if($finalGrade->type_id == 1){\n $result['final_mark'] = round($yearMark, 2);\n } else {\n $result['final_mark'] = FinalGradeType::where('id', $finalGrade->type_id)->first()->name;\n }\n } else {\n $result['final_mark'] = round($yearMark, 2);\n }\n\n $result['dp_status'] = 'DP';\n// print_r($subminimums); print_r($submCourseworks); die();\n\n foreach ($subminimums as $subminimum) {\n $threshold = $subminimum['threshold'];\n $total = 0;\n foreach ($subminimum['rows'] as $row) {\n $cwrk = $submCourseworks[$row['coursework_id']];\n if($row['subcoursework_id'] && $row['subcoursework_id']!=-1){\n $subcwrkMarks = $cwrk['subs'][$row['subcoursework_id']];\n $total += ($subcwrkMarks*$row['weighting']/100.0);\n } else {\n $total += ($cwrk['total']*$row['weighting']/100.0);\n }\n }\n if($total<$threshold){\n $result['dp_status'] = 'DPR';\n break;\n }\n }\n\n $results[] = $result;\n }\n return $results;\n\n }", "public function get_marks(Request $request)\n {\n $studentId = $request->studentId;\n $marks = StudentDetail::select('id', 'english_score', 'math_score')->where('user_id', $studentId)->get();\n return response()->json(['status' => true, 'message' => 'Marks fetched!', 'marks' => $marks]);\n }", "public function Get_Document($type,$course_id,$instructor_id,$teacher_id,$semester,$year)\n {\n $semester_id = $this->DEADLINE->Search_Semester_id($semester,$year);\n //check responsible\n if($teacher_id != null)\n {\n $check_access = $this->Check_Access($teacher_id,$course_id);\n }\n else\n {\n $check_access = null;\n }\n if($type == 'evaluate')\n {\n $sql = \"SELECT ce.`course_evaluate_id`,ce.`exam_evaluate_id`,ce.`num_section`,ce.`credit_total`,ce.`course_id`,ce.`noorspe`,ce.`type`,ce.`type_other`,ce.`teacher_co`,ce.`absent`,ce.`syllabus`,ce.`submit_user_id`,ce.`submit_date`,cg.*,me.*,ee.* \";\n $sql .=\" FROM `course_evaluate` ce, `criterion_grade` cg, `measure_evaluate` me, `exam_evaluate` ee \";\n $sql .=\" WHERE ce.`criterion_grade_id` = cg.`criterion_grade_id` AND ce.`measure_evaluate_id` = me.`measure_evaluate_id` AND ce.`exam_evaluate_id` = ee.`exam_evaluate_id` AND ce.`course_id` = '\".$course_id.\"' AND `semester_id` = '\".$semester_id.\"'\";\n $result = $this->DB->Query($sql);\n if($result)\n {\n $data = $result[0];\n if($data['syllabus'] == null)\n {\n $data['syllabus'] = false;\n }\n }\n else\n {\n $data = false;\n }\n $data['student'] = array();\n if(isset($data['course_evaluate_id']))\n {\n $sql = \"SELECT `section`,`student` FROM `student_evaluate` WHERE `course_evaluate_id` = \".$data['course_evaluate_id'];\n $result = $this->DB->Query($sql);\n if($result)\n {\n for($i=0;$i<count($result);$i++)\n {\n $data['student'][$result[$i]['section'] -1] = $result[$i]['student'];\n }\n }\n }\n\n $data['exam_mid1_committee_lec'] = array();\n $sql = \"SELECT `teacher_id`,`name_type` FROM `exam_commitee` WHERE `exam_evaluate_id` = '\".$data['exam_evaluate_id'].\"' AND `type` = 'MID1' AND `type_commitee` = 'LEC' ORDER BY `updated_date` ASC\";\n $result = $this->DB->Query($sql);\n if($result)\n {\n for($i=0;$i<count($result);$i++)\n {\n $teacher_name = $this->PERSON->Get_Teacher_Name($result[$i]['teacher_id'],$result[$i]['name_type']);\n if($teacher_name != false)\n {\n $temp = explode(\" \",$teacher_name);\n $teacher_name = '';\n for($j=1;$j<count($temp);$j++)\n {\n $teacher_name .= $temp[$j].\" \";\n }\n $teacher_name = trim($teacher_name,\" \");\n }\n array_push($data['exam_mid1_committee_lec'],$teacher_name);\n }\n }\n\n $data['exam_mid1_committee_lab'] = array();\n $sql = \"SELECT `teacher_id`,`name_type` FROM `exam_commitee` WHERE `exam_evaluate_id` = '\".$data['exam_evaluate_id'].\"' AND `type` = 'MID1' AND `type_commitee` = 'LAB' ORDER BY `updated_date` ASC\";\n $result = $this->DB->Query($sql);\n if($result)\n {\n for($i=0;$i<count($result);$i++)\n {\n $teacher_name = $this->PERSON->Get_Teacher_Name($result[$i]['teacher_id'],$result[$i]['name_type']);\n if($teacher_name != false)\n {\n $temp = explode(\" \",$teacher_name);\n $teacher_name = '';\n for($j=1;$j<count($temp);$j++)\n {\n $teacher_name .= $temp[$j].\" \";\n }\n $teacher_name = trim($teacher_name,\" \");\n }\n array_push($data['exam_mid1_committee_lab'],$teacher_name);\n }\n }\n\n $data['exam_mid2_committee_lec'] = array();\n $sql = \"SELECT `teacher_id`,`name_type` FROM `exam_commitee` WHERE `exam_evaluate_id` = '\".$data['exam_evaluate_id'].\"' AND `type` = 'MID2' AND `type_commitee` = 'LEC' ORDER BY `updated_date` ASC\";\n $result = $this->DB->Query($sql);\n if($result)\n {\n for($i=0;$i<count($result);$i++)\n {\n $teacher_name = $this->PERSON->Get_Teacher_Name($result[$i]['teacher_id'],$result[$i]['name_type']);\n if($teacher_name != false)\n {\n $temp = explode(\" \",$teacher_name);\n $teacher_name = '';\n for($j=1;$j<count($temp);$j++)\n {\n $teacher_name .= $temp[$j].\" \";\n }\n $teacher_name = trim($teacher_name,\" \");\n }\n array_push($data['exam_mid2_committee_lec'],$teacher_name);\n }\n }\n\n $data['exam_mid2_committee_lab'] = array();\n $sql = \"SELECT `teacher_id`,`name_type` FROM `exam_commitee` WHERE `exam_evaluate_id` = '\".$data['exam_evaluate_id'].\"' AND `type` = 'MID2' AND `type_commitee` = 'LAB' ORDER BY `updated_date` ASC\";\n $result = $this->DB->Query($sql);\n if($result)\n {\n for($i=0;$i<count($result);$i++)\n {\n $teacher_name = $this->PERSON->Get_Teacher_Name($result[$i]['teacher_id'],$result[$i]['name_type']);\n if($teacher_name != false)\n {\n $temp = explode(\" \",$teacher_name);\n $teacher_name = '';\n for($j=1;$j<count($temp);$j++)\n {\n $teacher_name .= $temp[$j].\" \";\n }\n $teacher_name = trim($teacher_name,\" \");\n }\n array_push($data['exam_mid2_committee_lab'],$teacher_name);\n }\n }\n\n $data['exam_final_committee_lec'] = array();\n $sql = \"SELECT `teacher_id`,`name_type` FROM `exam_commitee` WHERE `exam_evaluate_id` = '\".$data['exam_evaluate_id'].\"' AND `type` = 'FINAL' AND `type_commitee` = 'LEC' ORDER BY `updated_date` ASC\";\n $result = $this->DB->Query($sql);\n if($result)\n {\n for($i=0;$i<count($result);$i++)\n {\n $teacher_name = $this->PERSON->Get_Teacher_Name($result[$i]['teacher_id'],$result[$i]['name_type']);\n if($teacher_name != false)\n {\n $temp = explode(\" \",$teacher_name);\n $teacher_name = '';\n for($j=1;$j<count($temp);$j++)\n {\n $teacher_name .= $temp[$j].\" \";\n }\n $teacher_name = trim($teacher_name,\" \");\n }\n array_push($data['exam_final_committee_lec'],$teacher_name);\n }\n }\n\n $data['exam_final_committee_lab'] = array();\n $sql = \"SELECT `teacher_id`,`name_type` FROM `exam_commitee` WHERE `exam_evaluate_id` = '\".$data['exam_evaluate_id'].\"' AND `type` = 'FINAL' AND `type_commitee` = 'LAB' ORDER BY `updated_date` ASC\";\n $result = $this->DB->Query($sql);\n if($result)\n {\n for($i=0;$i<count($result);$i++)\n {\n $teacher_name = $this->PERSON->Get_Teacher_Name($result[$i]['teacher_id'],$result[$i]['name_type']);\n if($teacher_name != false)\n {\n $temp = explode(\" \",$teacher_name);\n $teacher_name = '';\n for($j=1;$j<count($temp);$j++)\n {\n $teacher_name .= $temp[$j].\" \";\n }\n $teacher_name = trim($teacher_name,\" \");\n }\n array_push($data['exam_final_committee_lab'],$teacher_name);\n }\n }\n $data['teacher'] = array();\n $sql = \"SELECT `teacher_id`,`name_type` FROM `teacher_exam_evaluate` WHERE `course_eveluate_id` = \".$data['course_evaluate_id'].\" ORDER BY `updated_date` ASC\";\n $result = $this->DB->Query($sql);\n if($result)\n {\n for($i=0;$i<count($result);$i++)\n {\n $teacher_name = $this->PERSON->Get_Teacher_Name($result[$i]['teacher_id'],$result[$i]['name_type']);\n if($teacher_name != false)\n {\n $temp = explode(\" \",$teacher_name);\n $teacher_name = '';\n for($j=1;$j<count($temp);$j++)\n {\n $teacher_name .= $temp[$j].\" \";\n }\n $teacher_name = trim($teacher_name,\" \");\n }\n array_push($data['teacher'],$teacher_name);\n }\n }\n }\n else if($type == 'special')\n {\n $check_access = true;\n $lecture_detail = array();\n $sql = \"SELECT st.`topic_name`,st.`teaching_date`,st.`teaching_time_start`,st.`teaching_time_end`,st.`teaching_room` FROM `special_lecture_teach` st, `course_hire_special_instructor` ci \";\n $sql .= \"WHERE ci.`instructor_id` = \".$instructor_id.\" AND ci.`course_id` = '\".$course_id.\"' AND st.`hire_id` = ci.`hire_id` AND ci.`semester_id` = \".$semester_id;\n $result = $this->DB->Query($sql);\n if($result)\n {\n $numtable = count($result);\n for ($i=0; $i < count($result); $i++)\n {\n $lecture_detail[$i] = $result[$i];\n }\n }\n else\n {\n $numtable = 0;\n $data['lecture_detail'] = null;\n }\n $sql = \"SELECT si.`instructor_id`,si.`prefix`,si.`firstname`,si.`lastname`,si.`position`,si.`qualification`,si.`work_place`,si.`phone`,si.`phone_sub`,si.`phone_mobile`,si.`cv`,si.`email`,si.`invited`,ei.`level_teacher`,ei.`level_descript`,ei.`payment_method`,ei.`expense_lec_checked`,ei.`expense_lec_number`,ei.`expense_lec_hour`,ei.`expense_lec_cost`,ei.`expense_lab_checked`,ei.`expense_lab_number`,ei.`expense_lab_hour`,ei.`expense_lab_cost`,ei.`expense_plane_check`,ei.`expense_plane_depart`,ei.`expense_plane_arrive`,ei.`expense_plane_cost`,ei.`expense_taxi_check`,ei.`expense_taxi_depart`,ei.`expense_taxi_arrive`,ei.`expense_taxi_cost`,ei.`expense_car_check`,ei.`expense_car_distance`,ei.`expense_car_unit`,ei.`expense_car_cost`,ei.`expense_hotel_choice`,ei.`expense_hotel_per_night`,ei.`expense_hotel_number`,ei.`expense_hotel_cost`,ei.`cost_total`, ci.*\";\n $sql .= \" FROM `special_instructor` si,`expense_special_instructor` ei, `course_hire_special_instructor` ci \";\n $sql .= \"WHERE ci.`instructor_id` = \".$instructor_id.\" AND ci.`course_id` = '\".$course_id.\"' AND ci.`instructor_id` = si.`instructor_id` AND ci.`expense_id` = ei.`expense_id` AND ci.`semester_id` = \".$semester_id;\n $result = $this->DB->Query($sql);\n if($result)\n {\n $data = $result[0];\n if($data['cv'] == null)\n {\n $data['cv'] = false;\n }\n $data['num_table'] = $numtable;\n $data['lecture_detail'] = $lecture_detail;\n }\n else\n {\n $data = false;\n }\n }\n else\n {\n die(\"รูปแบบข้อมูลผิดพลาด กรุณาติดต่อผู้ดูแลระบบ\");\n }\n $data['ACCESS'] = $check_access;\n return $data;\n }", "public function read_student_marks($studentid, $batchid){\n $condition = \"student_id = \" . \"'\" . $studentid . \"' AND batch_id = '\" . $batchid . \"'\";\n $this->db->select('*');\n $this->db->from('student_mark_table');\n $this->db->where($condition);\n $query = $this->db->get();\n if($query->num_rows() > 0){\n $result_marks = $query->result();\n foreach ($result_marks as $key => $mark) {\n $result_marks[$key]->subject_name = $this->get_subject_byid($mark->subject_id)[0];\n }\n return $result_marks;\n }else{\n return(0);\n }\n }", "function aM() {\n\n\t\t$instituteID = $this->session->userdata('instituteID');\n\t\t$institute = $this->institute_m->get_institute_single(array('instituteID'=>$instituteID));\n\t\t$academic_yearID = $institute->academic_yearID;\n\n\t\t$examID \t= base64_decode($this->input->post('a'));\n\t\t$classesID \t= base64_decode($this->input->post('b'));\n\t\t$sectionID \t= base64_decode($this->input->post('c'));\n\t\t$subjectID \t= base64_decode($this->input->post('d'));\n\t\t$student \t= $this->input->post('e');\n\t\t$mark \t= $this->input->post('f');\n\n\t\t$marks = explode(',', $mark);\n\t\t$arr = explode(',', $student);\n\t\t$students = array();\n\t\t$check = array();\n\n\t\tforeach($arr as $student) {\n\t\t\t$students[] = base64_decode($student)/786786;\n\t\t}\n\n\t\tfor($i=0; $i<count($students);$i++) {\n\n\t\t\t$array = array(\n\t\t\t\t'instituteID'\t\t=> $instituteID,\n\t\t\t\t'academic_yearID'\t=> $academic_yearID,\n\t\t\t\t'studentID'\t\t\t=> $students[$i],\n\t\t\t\t'classesID'\t\t\t=> $classesID,\n\t\t\t\t'sectionID'\t\t\t=> $sectionID\n\t\t\t);\n\t\t\t$marks_list = $this->marks_list_m->get_marks_list_single($array);\n\t\t\t$marks_listID = $marks_list->marks_listID;\n\t\t\t\n\t\t\t##Checking if a row exists in marks table for corresponding marks_list\n\t\t\t$check_marks = array(\n\t\t\t\t'marks_listID' \t=> $marks_listID,\n\t\t\t\t'examID' \t\t=> $examID,\n\t\t\t\t'subjectID'\t\t=> $subjectID\n\t\t\t);\n\n\t\t\t$marks_row = $this->marks_m->get_marks_single($check_marks);\n\t\t\tif($marks_row) {\n\t\t\t\t$marksID = $marks_row->marksID;\n\t\t\t\t$marks_array = array(\n\t\t\t\t\t'mark'\t\t\t=> $marks[$i]\n\t\t\t\t);\n\t\t\t\t$check[$i] = $this->marks_m->updateMarks($marks_array, $marksID);\n\t\t\t}\n\t\t}\n\t\tif(array_sum($check) == count($students))\n\t\t\techo 'done';\n\t}", "function get_request_documents($code_student){\n\t\t\t$sql = \"SELECT sd.sdoc_id,max(sd.sdoc_fecharadicado) fradicado,concat(u.usua_nombres,' ',u.usua_apellidos) usuarioaten \n\t\t\t\t\tFROM solicitud_documentos sd\n\t\t\t\t\tINNER JOIN estudiante e \n\t\t\t\t\tON sd.estu_codigo = e.estu_codigo\n\t\t\t\t\tLEFT JOIN usuario u ON u.usua_id = sd.usua_id\n\t\t\t\t\tWHERE e.estu_codigo = '{$code_student}'\n\t\t\t\t\tAND sd.esol_id <> 6\n\t\t\t\t\tgroup by sd.sdoc_id,e.estu_codigo,u.usua_nombres,u.usua_apellidos\n\t\t\t\t\torder by sd.sdoc_id desc\";\n\t\t\t$result = $this->conn->query($sql);\n\t if ($result->num_rows > 0) {\n\t \t$rows = array();\n\t\t\t\twhile($row = $result->fetch_assoc()) {\n\t\t\t\t\t$rows[] = array_map('stripslashes',$row);\n\t\t\t\t} \n\t return $rows;\n\t } else {\n\t return NULL;\n\t }\t\t\t\n\t\t}", "protected function getSchoolsRequest($limit = null, $starting_after = null, $ending_before = null)\n {\n\n $resourcePath = '/schools';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($limit !== null) {\n $queryParams['limit'] = ObjectSerializer::toQueryValue($limit);\n }\n // query params\n if ($starting_after !== null) {\n $queryParams['starting_after'] = ObjectSerializer::toQueryValue($starting_after);\n }\n // query params\n if ($ending_before !== null) {\n $queryParams['ending_before'] = ObjectSerializer::toQueryValue($ending_before);\n }\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers= $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function get_course_students($params) {\n global $DB, $PAGE;\n\n if(isset($params['report_params'])) {\n $reportparams = json_decode($params['report_params'], true);\n } else {\n $reportparams = [];\n }\n\n $limit = 0;\n $offset = 0;\n\n /** Limit and offset */\n if(isset($reportparams['limit'])) {\n $limit = $reportparams['limit'];\n }\n\n if(isset($reportparams['offset'])) {\n $offset = $reportparams['offset'];\n }\n\n $where = \"cx.contextlevel = :courselvl AND cx.instanceid > 1\";\n $sqlparams = ['courselvl' => CONTEXT_COURSE];\n\n if (!empty($reportparams['courses'])) {\n $coursesfilter = new in_filter($reportparams['courses'], \"crsc\");\n $where .= ' AND cx.instanceid ' . $coursesfilter->get_sql();\n $sqlparams = array_merge($coursesfilter->get_params(), $sqlparams);\n }\n\n if ($reportparams['inactive_users'] == 0) {\n $enroljoin = 'JOIN {enrol} e ON e.courseid = c.id\n JOIN {user_enrolments} ue ON ue.userid = u.id AND ue.enrolid = e.id';\n $sqlenrolfilter = 'AND ue.status = 0';\n } else {\n $enroljoin = $sqlenrolfilter = '';\n }\n\n $rolefilter = new in_filter($this->get_student_roles(), \"srole\");\n list($sql, $sqlparams) = $this->buildSqlRequest(\n \"SELECT CONCAT(u.id, '_', c.id) AS unique_f, u.*, c.id AS course_id,\n c.shortname AS course_short_name, c.fullname AS course_full_name, gg.finalgrade AS grade, gi.grademax AS grademax\n FROM {context} cx\n JOIN {role_assignments} ra ON ra.contextid = cx.id AND\n ra.roleid \" . $rolefilter->get_sql() . \"\n JOIN {user} u ON u.id = ra.userid\n JOIN {course} c ON c.id = cx.instanceid\n {$enroljoin}\n LEFT JOIN {grade_items} gi ON gi.courseid = c.id AND gi.itemtype = 'course'\n LEFT JOIN {grade_grades} gg ON gg.itemid = gi.id AND gg.userid = u.id\n WHERE {$where} {$sqlenrolfilter}\n GROUP BY u.id, c.id, gg.finalgrade, gi.grademax\",\n array_merge($sqlparams, $rolefilter->get_params()),\n $reportparams\n );\n\n $students = $DB->get_records_sql($sql, $sqlparams, $offset, $limit);\n\n foreach($students as &$student) {\n $user_picture = new user_picture($student);\n $user_picture->size = 100;\n $student->picture = $user_picture->get_url($PAGE)->out();\n }\n\n return $students;\n }", "function download() {\n\n\t\t$this->autoRender=false;\n\n\t\t$option \t\t\t= $this->Session->read('option');\n\t\t$minCount \t\t\t= $this->Session->read('minCount');\n\t\t$filter \t\t\t= $this->Session->read('filter');\n\t\t$selectedDatasets\t= $this->Session->read('selectedDatasets');\n\t\t$counts\t\t\t\t= $this->Session->read('counts');\n\t\t$clusterMethod\t\t= $this->Session->read('clusterMethod');\n\t\t$distanceMatrix\t\t= $this->Session->read('distanceMatrix');\n\t\t$maxPvalue\t\t\t= $this->Session->read('maxPvalue');\n\n\t\t## handle download formats for various compare options\n\t\tif($option == ABSOLUTE_COUNTS || $option == RELATIVE_COUNTS || $option == HEATMAP_COUNTS || $option == MOSAIC_PLOT) {\n\t\t\t$title = \"Comparison Results\";\n\t\t\t$content = $this->Format->infoString($title,$selectedDatasets,$filter,$minCount);\n\t\t\t$content.= $this->Format->countResultsToDownloadString($counts,$selectedDatasets,$option);\t\t\t\t\n\t\t}\n\t\telseif($option == CHISQUARE) {\n\t\t\t$title = 'Comparison Results - Chi-Square Test of Independence';\n\t\t\t$content = $this->Format->infoString($title,$selectedDatasets,$filter,$minCount);\n\t\t\t$content.= $this->Format->twoWayTestResultsToDownloadString($counts,$selectedDatasets,$maxPvalue);\n\t\t}\n\t\telseif($option == FISHER) {\t\t\t\n\t\t\t$title = \"Comparison Results - Fisher's Exact Test\";\n\t\t\t$content = $this->Format->infoString($title,$selectedDatasets,$filter,$minCount);\n\t\t\t$content.= $this->Format->twoWayTestResultsToDownloadString($counts,$selectedDatasets,$maxPvalue);\n\t\t}\n\t\telseif($option == PROPORTION_TEST) {\t\t\t\n\t\t\t$title = \"Comparison Results - Equality of Proportions Test\";\n\t\t\t$content = $this->Format->infoString($title,$selectedDatasets,$filter,$minCount);\n\t\t\t$content.= $this->Format->twoWayTestResultsToDownloadString($counts,$selectedDatasets,$maxPvalue);\n\t\t}\t\t\n\t\telseif($option == METASTATS) {\n\t\t\t$title = \"Comparison Results - METASTATS non-parametric t-test\";\n\t\t\t$content = $this->Format->infoString($title,$selectedDatasets,$filter,$minCount);\n\t\t\t$content.= $this->Format->metatstatsResultsToDonwloadString($counts,$selectedDatasets,$maxPvalue);\n\t\t}\t\n\t\telseif($option == WILCOXON) {\n\t\t\t$title = \"Comparison Results - Wilcoxon Rank Sum Test\";\n\t\t\t$content = $this->Format->infoString($title,$selectedDatasets,$filter,$minCount);\n\t\t\t$content.= $this->Format->wilcoxonResultsToDonwloadString($counts,$selectedDatasets,$maxPvalue);\n\t\t}\t\n\t\t//plot options\n\t\telseif($option == HEATMAP_PLOT || $option == HIERARCHICAL_CLUSTER_PLOT || $option == MDS_PLOT) {\n\t\t\t$title = \"Comparison Results - $distanceMatrix Distance Matrix\";\n\t\t\t$content = $this->Format->infoString($title,$selectedDatasets,$filter,$minCount);\n\t\t\t$content .= $this->Session->read('distantMatrices');\t\t\n\t\t}\t\t\t\t\t\t\n\t\n\t\t$fileName = uniqid('jcvi_metagenomics_report_').'.txt';\n\t\t$this->Download->string($fileName,$content);\n\t}", "public function fetchStudentMarksheet()\n\t{\n\t\t\n\t\t$validator = array('success' => false, 'messages' => array(), 'html' => '');\n\n\t\t$validate_data = array(\n\t\t\tarray(\n\t\t\t\t'field' => 'className',\n\t\t\t\t'label' => 'Class',\n\t\t\t\t'rules' => 'required'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'field' => 'marksheetName',\n\t\t\t\t'label' => 'Marksheet',\n\t\t\t\t'rules' => 'required'\n\t\t\t)\n\t\t);\n\n\t\t$this->form_validation->set_rules($validate_data);\n\t\t$this->form_validation->set_error_delimiters('<p class=\"text-danger\">','</p>');\n\n\t\tif($this->form_validation->run() === true) {\t\n\t\t\t\t\t\n\t\t\t$validator['success'] = true;\n\t\t\t$validator['messages'] = \"Successfully added\";\n\n\t\t\t$classData = $this->model_classes->fetchClassData($this->input->post('className'));\n\t\t\t$marksheetNameData = $this->model_marksheet->fetchMarksheetDataByMarksheetId($this->input->post('marksheetName'));\n\t\t\t$sectionData = $this->model_section->fetchSectionDataByClass($this->input->post('className'));\n\t\t\t$validator['sectionData'] = $sectionData;\n\n\t\t\t$validator['html'] = '<div class=\"panel panel-default\">\t\t \t\n\t\t\t\t<div class=\"panel-heading\">Student Info</div>\n\t\t\t\t \n\t\t\t\t<div class=\"panel-body\">\t\t \n\t\t\t\t\t<div class=\"well well-sm\">\n\t\t\t\t\t\tClass : '.$classData['class_name'].' <br />\n\t\t\t\t\t\tMarksheet Name : '.$marksheetNameData['marksheet_name'].' <br />\n\t\t\t\t\t\t<input type=\"hidden\" id=\"marksheet_id\" value=\"'.$this->input->post('marksheetName').'\" />\n\t\t\t\t\t</div>\t\t\n\n\t\t\t\t\t<br /> \t\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<!-- Nav tabs -->\n\t\t\t\t\t \t<ul class=\"nav nav-tabs\" role=\"tablist\">\n\t\t\t\t\t \t<li role=\"presentation\" class=\"active\"><a href=\"#classStudent\" aria-controls=\"classStudent\" role=\"tab\" data-toggle=\"tab\">All Student</a></li>';\t\t\t\t\t \n\t\t\t\t\t \t$x = 1;\n\t\t\t \tforeach ($sectionData as $key => $value) { \t\n\t\t\t\t\t\t\t\t$validator['html'] .= '<li role=\"presentation\"><a href=\"#countSection'.$x.'\" aria-controls=\"countSection\" role=\"tab\" data-toggle=\"tab\"> Section ('.$value['section_name'].')</a></li>';\n\t\t\t\t\t\t\t\t$x++;\n\t\t\t\t\t\t\t} // /foreach \t\t\t\t\t \t\n\n\t\t\t\t\t \t$validator['html'] .= '</ul>\n\n\t\t\t\t\t \t<!-- Tab panes -->\n\t\t\t\t\t \t<div class=\"tab-content\">\n\t\t\t\t\t \t<div role=\"tabpanel\" class=\"tab-pane active\" id=\"classStudent\">\n \t\n\t\t\t\t \t<br /> <br />\n\n\t\t\t\t <table class=\"table table-bordered\" id=\"manageStudentTable\">\n\t\t\t\t <thead>\n\t\t\t\t <tr>\n\t\t\t\t <th>#</th>\n\t\t\t\t <th>Name</th>\n\t\t\t\t <th>Class</th>\n\t\t\t\t <th>Section</th>\t\t\t\t \n\t\t\t\t <th>Action</th>\n\t\t\t\t </tr>\n\t\t\t\t </thead>\n\t\t\t\t </table> \n\n\t\t\t\t </div>\n\t\t\t\t\t \t<!--/.all student-->\n\t\t\t\t\t \t'; \n\t\t\t \t$x = 1;\n\t\t\t\t\t\t\tforeach ($sectionData as $key => $value) {\n\t\t\t\t\t\t\t\t$validator['html'] .= '<div role=\"tabpanel\" class=\"tab-pane\" id=\"countSection'.$x.'\">\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t<br /> <br />\n\n\t\t\t\t\t\t\t\t\t<table class=\"table table-bordered classSectionStudentTable\" id=\"manageStudentTable'.$x.'\" style=\"width:100%;\">\n\t\t\t\t\t <thead>\n\t\t\t\t\t <tr>\n\t\t\t\t\t <th>#</th>\n\t\t\t\t\t <th>Name</th>\n\t\t\t\t\t <th>Class</th>\n\t\t\t\t\t <th>Section</th>\n\t\t\t\t\t <th>Action</th>\n\t\t\t\t\t </tr>\n\t\t\t\t\t </thead>\n\t\t\t\t\t </table> \n\n\t\t\t\t\t </div>';\n\t\t\t\t\t $x++;\n\t\t\t\t\t\t\t} // /foreach \n\t\t\t \n\t\t\t $validator['html'] .= '\n\t\t\t\t\t \t<!--/.section student-->\n\t\t\t\t\t \t</div>\n\t\t\t\t\t</div>\t\t\t\n\t\t\t\t\n\n\t\t\t</div>';\n\n\t\t} \t\n\t\telse {\n\t\t\t$validator['success'] = false;\n\t\t\tforeach ($_POST as $key => $value) {\n\t\t\t\t$validator['messages'][$key] = form_error($key);\n\t\t\t}\t\t\t\n\t\t} // /else\n\t\n\t\techo json_encode($validator);\n\n\t}", "public function submit_mark()\n {\n $year = Input::get('year');\n $term = Input::get('term');\n $class = Input::get('class');\n $section = Input::get('section');\n $u_id = Auth::user()->email;\n\n $std_no = count(StudentToSection::where('Class','=',$class)->where('Section','=',$section)->where('Year','=',$year)->get());\n $students = TStudentResult::where('class','=',$class)\n ->where('section','=',$section)\n ->where('academic_year','=',$year)\n ->orderby('st_id', 'ASC')->orderby('subject', 'ASC')->get();\n\n if(count($students)) {\n\n $sub_no = (count($students)) / $std_no;\n $cnt = 0;\n\n\n for ($i = 0; $i < $std_no; $i++) {\n $std = $i * $sub_no;\n $all_subject_total = 0;\n $cgpa = 0.00;\n $is_fail = 0;\n\n for ($j = 0; $j < $sub_no; $j++) {\n $result = $students[$cnt];\n $cnt++;\n $total = 0;\n\n $total += $result->h_total;\n\n if ($term == \"Final\") {\n $total += $result->f_total;\n\n $total = ceil($total / 2);\n\n }\n\n $rtotal = $result->total;\n $grade = GradingTable::where('total', '=', $rtotal)->where('highest_range', '>=', $total)->where('lowest_range', '<=', $total)->first();\n\n\n $grade_l = $grade->grade;\n $grade_p = $grade->gpa;\n\n $rcls = $result->class;\n\n if ($rcls != \"Nine\" && $rcls != \"Ten\") {\n if ($total < ($rtotal / 2)) {\n $grade_p = \"0.00\";\n $grade_l = \"F\";\n\n }\n }\n if ($grade_l == \"F\") $is_fail++;\n $cgpa += $grade_p;\n $all_subject_total += $total;\n\n }\n if ($is_fail) $std_cgpa = 0.00; else $std_cgpa = sprintf(\"%.2f\", $cgpa / $sub_no);\n\n $std_roll = Studentinfo::where('idstudentinfo', '=', $students[$std]->st_id)->pluck('student_roll');\n\n $student_marks = new StudentRank();\n\n $student_marks->student_id = $students[$std]->st_id;\n $student_marks->roll = $std_roll;\n $student_marks->class = $students[$std]->class;\n $student_marks->section = $students[$std]->section;\n $student_marks->term = $term;\n $student_marks->year = $students[$std]->academic_year;\n $student_marks->total_mark = $all_subject_total;\n $student_marks->cgpa = $std_cgpa;\n\n $student_marks->save();\n\n }\n /* Start Rasel's Work for Student Rank and Position */\n\n /* $marks = \"CREATE TABLE temp_rank SELECT d.*,c.ranks_temp FROM\n (SELECT cgpa,@rank:=@rank+1 ranks_temp FROM\n (SELECT DISTINCT cgpa FROM student_rank a\n WHERE term='$term' AND year = '$year' AND class = '$class' AND section = '$section'\n ORDER BY cgpa DESC) t,\n (SELECT @rank:=0 ) r ) c\n INNER JOIN student_rank d on c.cgpa =d.cgpa\n WHERE term='$term' AND year = '$year' AND class = '$class' AND section = '$section'\n ORDER BY c.ranks_temp ASC, total_mark DESC\";\n $stmt2 = DB::statement($marks); */\n\n $marks = \"CREATE TABLE temp_rank SELECT d.*,c.ranks_temp FROM\n (SELECT total_mark,@rank:=@rank+1 ranks_temp FROM\n (SELECT DISTINCT total_mark FROM student_rank a \n WHERE term='$term' AND year = '$year' AND class = '$class' AND section = '$section'\n ORDER BY total_mark DESC) t,\n (SELECT @rank:=0 ) r ) c\n INNER JOIN student_rank d on c.total_mark =d.total_mark\n WHERE term='$term' AND year = '$year' AND class = '$class' AND section = '$section'\n ORDER BY c.ranks_temp ASC, cgpa DESC\";\n $stmt2 = DB::statement($marks);\n\n $tmp = TmpRank::all();\n $counter = 0;\n\n foreach ($tmp as $st) {\n\n $sid = $st->student_id;\n\n\n if ($st->cgpa != 0.00) {\n $s = $st->ranks_temp;\n $counter++;\n $grade = $st->cgpa;\n\n if ($grade >= 5.00) {\n $g = \"A+\";\n } else if (($grade >= 4.00) && ($grade <= 4.99)) {\n $g = \"A\";\n } else if (($grade >= 3.50) && ($grade <= 3.99)) {\n $g = \"A-\";\n } else if (($grade >= 3.00) && ($grade <= 3.49)) {\n $g = \"B\";\n } else if (($grade >= 2.00) && ($grade <= 2.99)) {\n $g = \"C\";\n } else if (($grade >= 1.00) && ($grade <= 1.99)) {\n $g = \"D\";\n } else {\n $g = \"F\";\n }\n\n if ($term == 'Half Yearly') {\n if (($st->roll) == $s) {\n $comment = \"Good Result. Keep it up also in Final Term.\";\n } else if (($st->roll) > $s) {\n $comment = \"Excellent. Keep it up also in Final Term.\";\n } else {\n $comment = \"Try to concentrate more on your study for Final Term.\";\n }\n\n } else {\n if (($st->roll) == $s) {\n $comment = \"Good Result. Keep it up.\";\n } else if (($st->roll) > $s) {\n $comment = \"Excellent. You have done a good result.\";\n } else {\n $comment = \"Try to concentrate more on your study.\";\n }\n }\n\n $pass_type = \"pass\";\n\n } else {\n $s = \"N/A\";\n $counter = \"N/A\";\n $g = \"F\";\n\n if ($term == 'Half Yearly') {\n $comment = \"Not Satisfactory. Work hard for your improvement.\";\n } else {\n $comment = \"You are Failed.\";\n }\n\n $pass_type = \"fail\";\n }\n\n $sql = \"UPDATE `student_rank` SET `grade`='$g', `rank`='$s', `counter_position`= '$counter', `comment`='$comment', `pass_type`='$pass_type' WHERE `student_id` = $sid AND `term` = '$term' AND `year` = '$year'\";\n $stmt3 = DB::statement($sql);\n }\n\n $del = \"DROP TABLE IF EXISTS temp_rank\";\n $stmt9 = DB::statement($del);\n\n /* End Rasel's Work for Student Rank and Position */\n\n\n $pub = new PublishResult();\n\n $pub->class = $class;\n $pub->section = $section;\n $pub->year = $year;\n $pub->term = $term;\n $pub->approved = 'Y';\n $pub->approved_by = $u_id;\n $pub->published = 'N';\n $pub->save();\n\n $msg = \"Marks has been submitted\";\n }\n else $msg = \"Marks not submitted as there's appears to be a data error. Please contact with the system administrator.\";\n\n return Redirect::to('submit_marks')->with('shohag_msg',$msg);\n }", "public function getStudentCourseResourceList($studentId,$classId='',$conditions='', $orderBy=' subject',$limit=''){\r\n global $REQUEST_DATA;\r\n global $sessionHandler;\r\n //$studentId=( trim($REQUEST_DATA['id'])==\"\" ? 0 : trim($REQUEST_DATA['id']) );\r\n \r\n if($classId!='' and $classId!=0){\r\n $classCondition=\" AND stc.classId=\".add_slashes($classId); \r\n }\r\n \r\n $instituteId=$sessionHandler->getSessionVariable('InstituteId');\r\n $sessionId=$sessionHandler->getSessionVariable('SessionId');\r\n \r\n $query=\"SELECT courseResourceId,resourceName,description,subjectCode AS subject,\r\n IF(resourceUrl IS NULL,-1,resourceUrl) AS resourceUrl, \r\n IF(attachmentFile IS NULL,-1,attachmentFile) AS attachmentFile,\r\n employeeName,\r\n DATE_FORMAT(postedDate,'%d-%b-%Y') AS postedDate\r\n \r\n FROM \r\n course_resources,resource_category,subject,employee \r\n WHERE \r\n course_resources.resourceTypeId=resource_category.resourceTypeId\r\n AND\r\n course_resources.subjectId=subject.subjectId\r\n AND\r\n course_resources.employeeId=employee.employeeId\r\n AND\r\n course_resources.instituteId=$instituteId \r\n AND \r\n course_resources.sessionId=$sessionId\r\n AND \r\n resource_category.instituteId=$instituteId\r\n AND\r\n course_resources.subjectId \r\n IN \r\n (\r\n SELECT DISTINCT stc.subjectId\r\n\r\n FROM subject_to_class stc, student_groups sg\r\n\r\n WHERE \r\n\t\t\t\t\t sg.classId = stc.classId AND\r\n\t\t\t\t\t sg.instituteId=$instituteId AND \r\n\t\t\t\t\t sg.sessionId=$sessionId\r\n $classCondition\r\n )\r\n $conditions \r\n ORDER BY $orderBy \r\n $limit \" ; \r\n //echo $query; \r\n return SystemDatabaseManager::getInstance()->executeQuery($query,\"Query: $query\"); \r\n }", "public function fetchBatchWiseStudentForLogin() {\n\t\treturn $this->success($this->repo->fetchBatchWiseStudentForLogin($this->request->all()));\n\t}", "public function download()\n {\n $marks = $this->db->getMarksToDownload();\n\n if ($marks) {\n $this->uriTotal = count($marks);\n\n foreach ($marks as $mark) {\n $this->log->onDownloadEnqueue(array('uri' => $mark['uri']));\n $this->queue->add($mark['uri'], $mark);\n }\n\n Flow::setMaxRuntime($this->queue, 2 * $this->uriTotal);\n\n $this->queue->exec();\n\n return $marks;\n }\n\n return $marks;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a law type by shortname and name.
private function createLaw($shortname,$name) { $law = Law::firstOrCreate([ 'name' => $name ]); $law->shortname = $shortname; }
[ "function create($type_namespace_uri, $type_name){}", "public function newObject($type, $name = '');", "function createDataObject($type_namespace_uri, $type_name){}", "public static function create($name)\r\n {\r\n if(isset(self::$ALIAS[$name]))\r\n {\r\n $name = self::$ALIAS[$name];\r\n }\r\n\r\n return self::isSimpleType($name) ? new ckXsdSimpleType($name) : null;\r\n }", "abstract protected function createDefinition($name);", "static function create($name) {\n global $db;\n $query = $db->prepare(\"INSERT INTO ProductTypes (name) VALUES (:name)\");\n $query->bindParam(':name', $name, PDO::PARAM_STR);\n $query->execute();\n }", "function __construct($short_name){\n\t\t$this->set_short_name($short_name);\n\t}", "function rep_create_post_type() {\n\t/*$name = 'name';\n\n\tregister_post_type(\n\t\t$name,\n\t\tarray(\n\t\t\t'labels' => Rep\\Helpers\\post_type_labels( $name ),\n\t\t\t'public' => true,\n\t\t\t'publicly_queryable' => true,\n\t\t\t'show_ui' => true,\n\t\t\t'show_in_menu' => true,\n\t\t\t'query_var' => true,\n\t\t\t'capability_type' => 'post',\n\t\t\t'has_archive' => false,\n\t\t\t'hierarchical' => false,\n\t\t\t'menu_position' => 99,\n\t\t\t'supports' => array(\n\t\t\t\t'title',\n\t\t\t\t'editor',\n\t\t\t\t'thumbnail',\n\t\t\t\t'excerpt',\n\t\t\t\t'custom-fields',\n\t\t\t\t'page-attributes',\n\t\t\t)\n\t\t)\n\t);*/\n}", "public function __construct($name,$type);", "protected abstract function createNewFormType();", "public function testCreateNewType(){\n $params = [\n 'index' => $this->index,\n 'type' => $this->type,\n 'body' => [\n $this->type => [\n 'properties' => [\n 'name' => [\n 'type' => 'string'\n ],\n 'suggest' => [\n \"type\" => 'completion',\n 'index_analyzer' => 'simple',\n 'search_analyzer' => 'simple',\n 'payloads' => true\n ]\n ]\n ]\n ]\n ];\n\n // Update the index mapping\n \\RES::indices()->putMapping($params);\n }", "public function setShortName($shortName);", "public function __construct($name, $type, array $spell)\n {\n $this->name = $name;\n $this->type = $type;\n $this->data = $spell;\n }", "public static function createShort(): self\n {\n $const = new self();\n $const->stSpecType = self::ST_SHORT;\n \n return $const;\n }", "function wd_taxonomy($type){\n\treturn new WD_Creator_TaxonomyFieldsCreator($type);\n}", "public function __CONSTRUCT($type,$name) {\n $this->type = $type;\n $this->name = $name;\n $typeElement = new Element(\"input\",\"text\",\"listingType\",\"listingType\");\n $typeElement->setValue($this->type);\n $this->addRegisterElement($typeElement);\n }", "function pn_create_taxonomy($name, $title, $posttype){\n\tregister_taxonomy($name, $posttype,\n\t\tarray(\n\t\t\t'label' => $title,\n\t\t\t'rewrite' => array( 'slug' => $name ),\n\t\t\t'hierarchical' => true,\n\t\t)\n\t); \n}", "public function getObjectTypeByShortName ($typeName)\n {\n return $this->conn->selectFirst(array(\n 'table'=>'object_type_data',\n 'where'=>'short_name='.$this->conn->quote($typeName),\n ));\n }", "public static function make($type)\n {\n $field = 'Bdt\\Avetmiss\\Fields\\\\' . ucfirst($type);\n\n return new $field;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Activate Deactivate team member (all users)
public function activateDeactivateTeamMember( Request $request ) { $user = Auth::guard('user')->user(); $input = $request->all(); $validator = Validator::make($input,[ 'user_id' => ['required',Rule::exists('users','id')->where(function ($query) { return $query->where('deleted_at', '=', null); }),'numeric'], 'activation_status' => ['required','boolean'] ]); if($validator->fails()) { $ret = array('success'=>0, 'message'=> $validator->messages()->first()); return response()->json($ret); } if($user && $user->user_role == '1' && $user->id != $input['user_id']){ try { $updated = User::whereId($input['user_id'])->update(['is_active'=>$input['activation_status']]); $message = array('success'=>1,'message'=>$input['activation_status']?'User activated.':'User deactivated.' ,'activation_status'=>$input['activation_status']); return response()->json($message); } catch(Exception $e) { $message = array('success'=>0,'message'=>$e->getMessage()); return response()->json($message); } }else{ $message = array('success'=>0,'message'=>"User not found."); return response()->json($message); } }
[ "public function activateTeam(\\Illuminate\\Support\\Facades\\Request $request) \n {\n // Getting the request user\n $token = \\JWTAuth::getToken();\n $requestUser = \\JWTAuth::toUser($token);\n\n try {\n $team = \\App\\Team::findOrFail($request::get('id'));\n }\n catch(\\Exception $e) {\n $resp = new \\App\\Http\\Helpers\\ServiceResponse;\n $resp->Message = 'Team Not Found';\n $resp->Status = false;\n $resp->InnerData = (object)[];\n return response()->json($resp, 200);\n }\n\n // If the user is not an admin and the player is not destroying his own team return unauthorized\n if ($team->user_id != $requestUser->id && !\\App\\User::whereHas('roles', function ($query) {\n $query->where('name', '=', 'Admins');\n })->where('id', '=', $requestUser->id)->get()->count()) {\n $resp = new \\App\\Http\\Helpers\\ServiceResponse;\n $resp->Message = \"Unauthorized\";\n $resp->Status = false;\n $resp->InnerData = (object)[];\n return response()->json($resp, 200);\n }\n\n // Delete the invitations and the team\n try {\n // \\App\\Invitation::where('team_id', '=', $team->id)->delete();\n // $team->destroy($request::get('id'));\n $team->active_status = 0;\n $team->save();\n }\n catch(\\Exception $e) {\n $resp = new \\App\\Http\\Helpers\\ServiceResponse;\n $resp->Message = $e->getMessage();\n $resp->Status = false;\n $resp->InnerData = (object)[];\n return response()->json($resp, 200);\n }\n\n $resp = new \\App\\Http\\Helpers\\ServiceResponse;\n $resp->Message = \"Team Deleted Successfully\";\n $resp->Status = true;\n $resp->InnerData = (object)[];\n return response()->json($resp, 200);\n }", "public function inactivateAllMembers(){\n //echo \"inactivateAllMembers() called.<br/>\";\n \n $memberGroupId = $this->GetMemberGroupId();\n \n $sql = 'delete from userInGroups where group_id = :MemberGroupId';\n $statement = $this->getDbConn()->prepare($sql);\n $this->executeStatement($statement, array(':MemberGroupId' => $memberGroupId));\n }", "function deActivateAccount(){\n\t\t$userID = Auth::getUserID();\n\t\t$this->setStatus($userID,0);\n\t\t$this->logout();\n\t\t$this->send(true);\t\n\t}", "public function deactivateUser(){\n\n\t\tglobal $db;\n\t\t\n\t\t$db->SQL = \"UPDATE ebb_users SET active='0' WHERE Username='\".$this->user.\"' LIMIT 1\";\n\t\t$db->query();\n\t}", "public function unactivate()\n {\n $this->setFieldOnModels('activation', false);\n }", "public function activateAllParticipants()\n {\n $participants = $this->participants()->withTrashed()->get();\n foreach ($participants as $participant) {\n $participant->restore();\n }\n }", "public function deactivate()\n {\n $this->checkCSRFForm();\n $user = $this->getUser();\n $this->checkCurrentUser($user);\n\n $this->userModel->update(array(\n 'id' => $user['id'],\n 'twofactor_activated' => 0,\n 'twofactor_secret' => '',\n ));\n\n // Allow the user to test or disable the feature\n $this->userSession->disablePostAuthentication();\n\n $this->flash->success(t('User updated successfully.'));\n $this->response->redirect($this->helper->url->to('TwoFactorController', 'index', array('user_id' => $user['id'])), true);\n }", "public function reactivate()\n {\n $this->_CI->user_model->updateUser($this->getId(), array('active' => 1));\n $this->_user->active = 1;\n }", "public function activeVolunteer()\n {\n $this->volunteer->verificationCode->delete();\n $this->volunteer->is_actived = true;\n $this->volunteer->save();\n }", "public function testDeactivating()\n {\n $this->credential->deactivate();\n $this->assertFalse($this->credential->isActive());\n $this->assertFalse($this->credential->getToken()->isActive());\n }", "public function activate() {\r\n\t\t$this->updateUser(array(\"is_activated\" => 1));\r\n\t}", "public function deactivate()\n\t{\n\t\t$data = array(\n\t\t\t'active' => 0\n\t\t);\n\t\t$this->db->where('id', $this->input->post('id'));\n\t\t$this->db->update('users', $data);\n\t}", "public function action_activateaccount()\n\t{\n\t\tglobal $context, $modSettings;\n\n\t\tisAllowedTo('moderate_forum');\n\n\t\tif (isset($this->_req->query->save, $this->_profile['is_activated'])\n\t\t\t&& $this->_profile['is_activated'] != 1)\n\t\t{\n\t\t\trequire_once(SUBSDIR . '/Members.subs.php');\n\n\t\t\t// If we are approving the deletion of an account, we do something special ;)\n\t\t\tif ($this->_profile['is_activated'] == 4)\n\t\t\t{\n\t\t\t\tdeleteMembers($context['id_member']);\n\t\t\t\tredirectexit();\n\t\t\t}\n\n\t\t\t// Actually update this member now, as it guarantees the unapproved count can't get corrupted.\n\t\t\tapproveMembers(array('members' => array($context['id_member']), 'activated_status' => $this->_profile['is_activated']));\n\n\t\t\t// Log what we did?\n\t\t\tlogAction('approve_member', array('member' => $this->_memID), 'admin');\n\n\t\t\t// If we are doing approval, update the stats for the member just in case.\n\t\t\tif (in_array($this->_profile['is_activated'], array(3, 4, 13, 14)))\n\t\t\t{\n\t\t\t\tupdateSettings(array('unapprovedMembers' => ($modSettings['unapprovedMembers'] > 1 ? $modSettings['unapprovedMembers'] - 1 : 0)));\n\t\t\t}\n\n\t\t\t// Make sure we update the stats too.\n\t\t\trequire_once(SUBSDIR . '/Members.subs.php');\n\t\t\tupdateMemberStats();\n\t\t}\n\n\t\t// Leave it be...\n\t\tredirectexit('action=profile;u=' . $this->_memID . ';area=summary');\n\t}", "function dbReactivateTeam($TID)\n{\n dbUpdate(\"teams\", array(\"isActive\" => true), \"TID\", $TID);\n}", "public function deactivate() {\n $token = $this->input->get_post('token');\n \n // Check parameters\n if ($this->helperlib->hasEmptyParams(array($token))) {\n $this->outputlib->error($this->lang->line('error_missing_parameters'));\n return;\n }\n \n // Update user status to deactivated\n $query = \"\n UPDATE \".TABLE_USERS.\"\n SET status = 0\n WHERE token = ?\n \";\n $data = array($token);\n $this->db->query($query, $data);\n $this->outputlib->output(STATUS_OK, '', array());\n }", "public function deactivateUser()\n {\n $subscritpionData = $this->Subscription->find('all', array('conditions' => array('Subscription.is_active' => 0, 'Subscription.next_subscription_date' => date('Y-m-d'))));\n foreach ($subscritpionData as $subscription) {\n $nextDate = $subscription['Subscription']['next_subscription_date'];\n if (date('Y-m-d') == $nextDate) {\n $this->User->id = $subscription['Subscription']['user_id'];\n $this->User->saveField('deactivated_by_user', 1);\n $businessId = $this->BusinessOwner->findByUserId($subscription['Subscription']['user_id']);\n //Store previous group members information\n $gdata = $this->BusinessOwner->getMyGroupMemberList($this->Encryption->decode($businessId['Group']['id']),$subscription['Subscription']['user_id']);\n $prevMember = NULL;\n $prevRecord['PrevGroupRecord'] = array();\n foreach ($gdata as $key => $val) {\n $data['user_id'] = $subscription['Subscription']['user_id'];\n $data['group_id'] = $this->Encryption->decode($businessId['Group']['id']);\n $data['members_id'] = $key;\n array_push($prevRecord['PrevGroupRecord'],$data);\n }\n $this->PrevGroupRecord->saveAll($prevRecord['PrevGroupRecord']); \n $this->BusinessOwner->id = $this->Encryption->decode($businessId['BusinessOwner']['id']);\n $parts = explode(',', $businessId['Group']['group_professions']); \n while (($i = array_search($businessId['BusinessOwner']['profession_id'], $parts)) !== false) {\n unset($parts[$i]);\n }\n $updateProfessions = implode(',', $parts);\n $updateMember = $businessId['Group']['total_member'] - 1;\n\t\t\t\t$this->BusinessOwner->saveField('group_id', NULL);\n $this->Group->updateAll(array('Group.group_professions' => \"'\".$updateProfessions.\"'\", 'Group.total_member' => \"'\".$updateMember.\"'\"), array('Group.id' => $businessId['BusinessOwner']['group_id']));\n }\n }\n }", "function DeactivateSubscriber()\n\t\t{\t\t\t\t\t\t\t\t\n\t\t\t$_REQUEST['mode'] \t\t= \"DeactivateEmployer\";\n\t\t\t$this->oModel->DeactivateSubscriber($_REQUEST['identity']);\n\t\t\t//$this->oModel->DeactivateEmployerJobs($_REQUEST['identity']);\n\t\t\t$err=\"Successfully Deactivated.\";\n\t\t\t$this->ListSubscriber($err);\n\t\t}", "public function deactivateUser()\n {\n $subscritpionData = $this->Subscription->find('all', array('conditions' => array('Subscription.is_active' => 0, 'Subscription.next_subscription_date' => date('Y-m-d'))));\n foreach ($subscritpionData as $subscription) {\n $nextDate = $subscription['Subscription']['next_subscription_date'];\n if (date('Y-m-d') == $nextDate) {\n $this->User->id = $subscription['Subscription']['user_id'];\n $this->User->saveField('deactivated_by_user', 1);\n $businessId = $this->BusinessOwner->findByUserId($subscription['Subscription']['user_id']);\n \n //Store previous group members information\n $gdata = $this->BusinessOwner->getMyGroupMemberList($this->Encryption->decode($businessId['Group']['id']),$subscription['Subscription']['user_id']);\n $prevMember = NULL;\n $prevRecord['PrevGroupRecord'] = array();\n foreach($gdata as $key => $val) {\n $data['user_id'] = $subscription['Subscription']['user_id'];\n $data['group_id'] = $this->Encryption->decode($businessId['Group']['id']);\n $data['members_id'] = $key;\n array_push($prevRecord['PrevGroupRecord'],$data);\n }\n $this->PrevGroupRecord->saveAll($prevRecord['PrevGroupRecord']); \n $this->BusinessOwner->id = $this->Encryption->decode($businessId['BusinessOwner']['id']);\n $parts = explode(',', $businessId['Group']['group_professions']); \n while(($i = array_search($businessId['BusinessOwner']['profession_id'], $parts)) !== false) {\n unset($parts[$i]);\n }\n $updateProfessions = implode(',', $parts);\n $updateMember = $businessId['Group']['total_member'] - 1;\n\t\t\t\t$this->BusinessOwner->saveField('group_id', NULL);\n $this->Group->updateAll(array('Group.group_professions' => \"'\".$updateProfessions.\"'\",'Group.total_member' =>\"'\".$updateMember.\"'\"),array( 'Group.id' => $businessId['BusinessOwner']['group_id']));\n }\n }\n }", "public function deactivate(){\n $this->loadMissing('villas');\n DB::transaction(function(){\n foreach($this->villas as $villa){\n $villa->delete();\n }\n $this->user->delete();\n $this->delete();\n });\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a criteria object
protected function createCriteria($config = array()) { return new Criteria($config); }
[ "protected abstract function createCriteria();", "public static function criteria() : Criteria\n {\n return new Criteria(static::definition());\n }", "public function newCriteriaBuilder();", "public function createCriteria($data=array(), $config=array())\n\t{\n\t\t// Merge the default properties with the provided config\n\t\t$config = CMap::mergeArray(get_object_vars($this), $config);\n\t\t\n\t\treturn new AfDbCriteria($data, $config);\n\t}", "abstract public function getCriteria();", "public function getCriteriaBuilder();", "public function getCriteria();", "public function buildCriteria()\n\t{\n\t\t$criteria = new Criteria(OrgaoPeer::DATABASE_NAME);\n\n\t\tif ($this->isColumnModified(OrgaoPeer::CO_ORGAO)) $criteria->add(OrgaoPeer::CO_ORGAO, $this->co_orgao);\n\t\tif ($this->isColumnModified(OrgaoPeer::NO_ORGAO)) $criteria->add(OrgaoPeer::NO_ORGAO, $this->no_orgao);\n\t\tif ($this->isColumnModified(OrgaoPeer::NU_TELEFONE_ORGAO)) $criteria->add(OrgaoPeer::NU_TELEFONE_ORGAO, $this->nu_telefone_orgao);\n\t\tif ($this->isColumnModified(OrgaoPeer::SG_ORGAO)) $criteria->add(OrgaoPeer::SG_ORGAO, $this->sg_orgao);\n\n\t\treturn $criteria;\n\t}", "public function criteria(): SearchCriteriaModel\n\t{\n\t\treturn new SearchCriteriaModel;\n\t}", "public function __construct($criteria=null)\n\t{\n\t\tif(is_array($criteria))\n\t\t{\n\t\t\tif(isset($criteria['conditions']))\n\t\t\t\tforeach($criteria['conditions'] as $fieldName=>$cond)\n\t\t\t\t{\n\t\t\t\t\t$operator = strtolower(array_shift($cond));\n\t\t\t\t\t$value = array_shift($cond);\n\t\t\t\t\tcall_user_func_array(array($this, $fieldName), array($operator, $value));\n\t\t\t\t}\n\t\t\tif(isset($criteria['select']))\n\t\t\t\t$this->select($criteria['select']);\n\t\t\tif(isset($criteria['limit']))\n\t\t\t\t$this->limit($criteria['limit']);\n\t\t\tif(isset($criteria['offset']))\n\t\t\t\t$this->offset($criteria['offset']);\n\t\t\tif(isset($criteria['sort']))\n\t\t\t\t$this->setSort($criteria['sort']);\n\t\t}\n\t}", "public function createSearch()\n\t{\n\t\t$conn = $this->dbm->acquire( $this->dbname );\n\t\t$search = new \\Aimeos\\MW\\Criteria\\SQL( $conn );\n\t\t$this->dbm->release( $conn, $this->dbname );\n\n\t\treturn $search;\n\t}", "protected function getCriteriaDao() {\n return new Tracker_Report_Criteria_OpenList_ValueDao();\n }", "public static function create(array $criteria) \n {\n $instance = new self;\n $reflection = new ReflectionClass($instance);\n\n foreach ($criteria as $name => $param) {\n\n if (in_array($name, array('having', 'where'))) {\n $param = self::castConditionsList($param);\n } elseif ($name == 'joins') {\n $param = self::castJoinsList($param);\n }\n\n $property = $reflection->getProperty($name);\n $property->setAccessible(true);\n $property->setValue($instance, $param);\n }\n \n return $instance;\n }", "public function applyCriteria();", "public function buildPkeyCriteria()\n\t{\n\t\t$criteria = new Criteria(CorredorPeer::DATABASE_NAME);\n\n\t\t$criteria->add(CorredorPeer::ID, $this->id);\n\n\t\treturn $criteria;\n\t}", "public function buildPkeyCriteria()\n\t{\n\t\t$criteria = new Criteria(PersonnePeer::DATABASE_NAME);\n\n\t\t$criteria->add(PersonnePeer::ID, $this->id);\n\n\t\treturn $criteria;\n\t}", "public function buildCriteria()\n {\n $criteria = new Criteria(JuizesTableMap::DATABASE_NAME);\n\n if ($this->isColumnModified(JuizesTableMap::COL_ID)) {\n $criteria->add(JuizesTableMap::COL_ID, $this->id);\n }\n if ($this->isColumnModified(JuizesTableMap::COL_NOME)) {\n $criteria->add(JuizesTableMap::COL_NOME, $this->nome);\n }\n if ($this->isColumnModified(JuizesTableMap::COL_TELEFONE)) {\n $criteria->add(JuizesTableMap::COL_TELEFONE, $this->telefone);\n }\n if ($this->isColumnModified(JuizesTableMap::COL_CIDADE_ID)) {\n $criteria->add(JuizesTableMap::COL_CIDADE_ID, $this->cidade_id);\n }\n\n return $criteria;\n }", "public function buildCriteria()\n {\n $criteria = new Criteria(FeedbackPeer::DATABASE_NAME);\n\n if ($this->isColumnModified(FeedbackPeer::ID)) $criteria->add(FeedbackPeer::ID, $this->id);\n if ($this->isColumnModified(FeedbackPeer::TRICK_ID)) $criteria->add(FeedbackPeer::TRICK_ID, $this->trick_id);\n if ($this->isColumnModified(FeedbackPeer::ACTION_ID)) $criteria->add(FeedbackPeer::ACTION_ID, $this->action_id);\n if ($this->isColumnModified(FeedbackPeer::PERCENT)) $criteria->add(FeedbackPeer::PERCENT, $this->percent);\n if ($this->isColumnModified(FeedbackPeer::WEIGHT)) $criteria->add(FeedbackPeer::WEIGHT, $this->weight);\n if ($this->isColumnModified(FeedbackPeer::MAX)) $criteria->add(FeedbackPeer::MAX, $this->max);\n if ($this->isColumnModified(FeedbackPeer::INVERTED)) $criteria->add(FeedbackPeer::INVERTED, $this->inverted);\n if ($this->isColumnModified(FeedbackPeer::MISTAKE)) $criteria->add(FeedbackPeer::MISTAKE, $this->mistake);\n\n return $criteria;\n }", "abstract protected function getDefaultCriteria(): Criteria;" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create and setup QLabel lblQuantidadeProduzida
public function lblQuantidadeProduzida_Create($strControlId = null, $strFormat = null) { $this->lblQuantidadeProduzida = new QLabel($this->objParentObject, $strControlId); $this->lblQuantidadeProduzida->Name = QApplication::Translate('Quantidade Produzida'); $this->lblQuantidadeProduzida->Text = $this->objBalancoPecas->QuantidadeProduzida; $this->lblQuantidadeProduzida->Required = true; $this->lblQuantidadeProduzida->Format = $strFormat; return $this->lblQuantidadeProduzida; }
[ "public function lblQuantidade_Create($strControlId = null, $strFormat = null) {\n\t\t\t$this->lblQuantidade = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblQuantidade->Name = QApplication::Translate('Quantidade');\n\t\t\t$this->lblQuantidade->Text = $this->objCostureiraTempoReal->Quantidade;\n\t\t\t$this->lblQuantidade->Required = true;\n\t\t\t$this->lblQuantidade->Format = $strFormat;\n\t\t\treturn $this->lblQuantidade;\n\t\t}", "public function lblQuantidadePanos_Create($strControlId = null, $strFormat = null) {\n\t\t\t$this->lblQuantidadePanos = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblQuantidadePanos->Name = QApplication::Translate('Quantidade Panos');\n\t\t\t$this->lblQuantidadePanos->Text = $this->objComandoPeca->QuantidadePanos;\n\t\t\t$this->lblQuantidadePanos->Required = true;\n\t\t\t$this->lblQuantidadePanos->Format = $strFormat;\n\t\t\treturn $this->lblQuantidadePanos;\n\t\t}", "public function lblPeso_Create($strControlId = null) {\n\t\t\t$this->lblPeso = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblPeso->Name = QApplication::Translate('Peso');\n\t\t\t$this->lblPeso->Text = $this->objFichas->Peso;\n\t\t\treturn $this->lblPeso;\n\t\t}", "public function lblPrecio_Create($strControlId = null) {\n\t\t\t$this->lblPrecio = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblPrecio->Name = QApplication::Translate('Precio');\n\t\t\t$this->lblPrecio->Text = $this->objFichas->Precio;\n\t\t\t$this->lblPrecio->Required = true;\n\t\t\treturn $this->lblPrecio;\n\t\t}", "public function lblQuantidadeDisponivel_Create($strControlId = null, $strFormat = null) {\n\t\t\t$this->lblQuantidadeDisponivel = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblQuantidadeDisponivel->Name = QApplication::Translate('Quantidade Disponivel');\n\t\t\t$this->lblQuantidadeDisponivel->Text = $this->objBalancoAcoes->QuantidadeDisponivel;\n\t\t\t$this->lblQuantidadeDisponivel->Required = true;\n\t\t\t$this->lblQuantidadeDisponivel->Format = $strFormat;\n\t\t\treturn $this->lblQuantidadeDisponivel;\n\t\t}", "public function lblPeso_Create($strControlId = null, $strFormat = null) {\n\t\t\t$this->lblPeso = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblPeso->Name = QApplication::Translate('Peso');\n\t\t\t$this->lblPeso->Text = $this->objComandoPeca->Peso;\n\t\t\t$this->lblPeso->Format = $strFormat;\n\t\t\treturn $this->lblPeso;\n\t\t}", "public function lblValor6_Create($strControlId = null, $strFormat = null) {\n\t\t\t$this->lblValor6 = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblValor6->Name = QApplication::Translate('Valor 6');\n\t\t\t$this->lblValor6->Text = $this->objEncuestas->Valor6;\n\t\t\t$this->lblValor6->Required = true;\n\t\t\t$this->lblValor6->Format = $strFormat;\n\t\t\treturn $this->lblValor6;\n\t\t}", "public function lblPeso_Create($strControlId = null, $strFormat = null) {\n\t\t\t$this->lblPeso = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblPeso->Name = QApplication::Translate('Peso');\n\t\t\t$this->lblPeso->Text = $this->objTecidoRendimento->Peso;\n\t\t\t$this->lblPeso->Required = true;\n\t\t\t$this->lblPeso->Format = $strFormat;\n\t\t\treturn $this->lblPeso;\n\t\t}", "protected function lblId_Create() {\n\t\t\t$this->lblId = new QLabel($this);\n\t\t\t$this->lblId->Name = QApplication::Translate('Id');\n\t\t\tif ($this->blnEditMode)\n\t\t\t\t$this->lblId->Text = $this->objOperation->Id;\n\t\t\telse\n\t\t\t\t$this->lblId->Text = 'N/A';\n\t\t}", "public function lblProcesada_Create($strControlId = null) {\n\t\t\t$this->lblProcesada = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblProcesada->Name = QApplication::Translate('Procesada');\n\t\t\t$this->lblProcesada->Text = ($this->objFichas->Procesada) ? QApplication::Translate('Yes') : QApplication::Translate('No');\n\t\t\treturn $this->lblProcesada;\n\t\t}", "public function lblPeso_Create($strControlId = null, $strFormat = null) {\n\t\t\t$this->lblPeso = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblPeso->Name = QApplication::Translate('Peso');\n\t\t\t$this->lblPeso->Text = $this->objReferenciaRendimento->Peso;\n\t\t\t$this->lblPeso->Required = true;\n\t\t\t$this->lblPeso->Format = $strFormat;\n\t\t\treturn $this->lblPeso;\n\t\t}", "public function lblValor_Create($strControlId = null) {\n\t\t\t$this->lblValor = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblValor->Name = QApplication::Translate('Valor');\n\t\t\t$this->lblValor->Text = $this->objFichasItemValor->Valor;\n\t\t\t$this->lblValor->Required = true;\n\t\t\treturn $this->lblValor;\n\t\t}", "public function lblPredeterminada_Create($strControlId = null, $strFormat = null) {\n\t\t\t$this->lblPredeterminada = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblPredeterminada->Name = QApplication::Translate('Predeterminada');\n\t\t\t$this->lblPredeterminada->Text = $this->objNotasImagenes->Predeterminada;\n\t\t\t$this->lblPredeterminada->Required = true;\n\t\t\t$this->lblPredeterminada->Format = $strFormat;\n\t\t\treturn $this->lblPredeterminada;\n\t\t}", "public function lblPosicion_Create($strControlId = null) {\n\t\t\t$this->lblPosicion = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblPosicion->Name = QApplication::Translate('Posicion');\n\t\t\t$this->lblPosicion->Text = $this->objFichas->Posicion;\n\t\t\treturn $this->lblPosicion;\n\t\t}", "public function lblValor1_Create($strControlId = null, $strFormat = null) {\n\t\t\t$this->lblValor1 = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblValor1->Name = QApplication::Translate('Valor 1');\n\t\t\t$this->lblValor1->Text = $this->objEncuestas->Valor1;\n\t\t\t$this->lblValor1->Required = true;\n\t\t\t$this->lblValor1->Format = $strFormat;\n\t\t\treturn $this->lblValor1;\n\t\t}", "public function lblQuantityGiven_Create($strControlId = null, $strFormat = null) {\n\t\t\t$this->lblQuantityGiven = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblQuantityGiven->Name = QApplication::Translate('Quantity Given');\n\t\t\t$this->lblQuantityGiven->Text = $this->objDonation->QuantityGiven;\n\t\t\t$this->lblQuantityGiven->Format = $strFormat;\n\t\t\treturn $this->lblQuantityGiven;\n\t\t}", "public function lblPRODUCTOCostoUnitario_Create($strControlId = null) {\n\t\t\t$this->lblPRODUCTOCostoUnitario = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblPRODUCTOCostoUnitario->Name = QApplication::Translate('P R O D U C T O Costo Unitario');\n\t\t\t$this->lblPRODUCTOCostoUnitario->Text = $this->objListaProducto->PRODUCTOCostoUnitario;\n\t\t\treturn $this->lblPRODUCTOCostoUnitario;\n\t\t}", "public function lblOpcion6_Create($strControlId = null) {\n\t\t\t$this->lblOpcion6 = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblOpcion6->Name = QApplication::Translate('Opcion 6');\n\t\t\t$this->lblOpcion6->Text = $this->objEncuestas->Opcion6;\n\t\t\t$this->lblOpcion6->Required = true;\n\t\t\treturn $this->lblOpcion6;\n\t\t}", "public function lblVolumen_Create($strControlId = null, $strFormat = null) {\n\t\t\t$this->lblVolumen = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblVolumen->Name = QApplication::Translate('Volumen');\n\t\t\t$this->lblVolumen->Text = $this->objProducto->Volumen;\n\t\t\t$this->lblVolumen->Format = $strFormat;\n\t\t\treturn $this->lblVolumen;\n\t\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Travel information items. Travel invoice may have one or more travel information items containing departure date, return date, destinations and travel purpose. ,
public function getTravelInformationItems(): ?TravelInformationItemsCollection;
[ "function getLineItemDetails() {\n global $order, $currencies, $order_totals, $order_total_modules;\n $optionsST = array();\n $optionsLI = array();\n $onetimeSum = 0;\n $onetimeTax = 0;\n $creditsApplied = 0;\n $creditsTax_applied = 0;\n $sumOfLineItems = 0;\n $sumOfLineTax = 0;\n $time = date('Y-m-d H:i:s');\n\n // prepare subtotals\n for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) {\n if ($order_totals[$i]['code'] == 'ot_subtotal') $optionsST['ITEMAMT'] = round($order_totals[$i]['value'],2);\n if ($order_totals[$i]['code'] == 'ot_tax') $optionsST['TAXAMT'] = round($order_totals[$i]['value'],2);\n if ($order_totals[$i]['code'] == 'ot_shipping') $optionsST['SHIPPINGAMT'] = round($order_totals[$i]['value'],2);\n if ($order_totals[$i]['code'] == 'ot_total') $optionsST['AMT'] = round($order_totals[$i]['value'],2);\n $optionsST['HANDLINGAMT'] = 0;\n global $$order_totals[$i]['code'];\n if (isset($$order_totals[$i]['code']->credit_class) && $$order_totals[$i]['code']->credit_class == true) $creditsApplied += round($order_totals[$i]['value'],2);\n // treat all other OT's as if they're related to handling fees\n ////robbie 增加 ot_big_orderd 不放在HandingAMT中处理,直接在ITEMAMT中扣除\n if (!in_array($order_totals[$i]['code'], array('ot_total','ot_subtotal','ot_tax','ot_shipping', 'ot_big_orderd' ,'ot_cash_account')) \n && !(isset($$order_totals[$i]['code']->credit_class) && $$order_totals[$i]['code']->credit_class == true)) {\n $optionsST['HANDLINGAMT'] += $order_totals[$i]['value'];\n }elseif ($order_totals[$i]['code'] == 'ot_big_orderd'){\n \t$optionsST['ITEMAMT'] -= round($order_totals[$i]['value'],2);\n }elseif ($order_totals[$i]['code'] == 'ot_cash_account'){\n \t$optionsST['ITEMAMT'] -= round($order_totals[$i]['value'],2);\n }\n \n// if (!in_array($order_totals[$i]['code'], array('ot_total','ot_subtotal','ot_tax','ot_shipping')) \n// && !(isset($$order_totals[$i]['code']->credit_class) && $$order_totals[$i]['code']->credit_class == true)) {\n// $optionsST['HANDLINGAMT'] += $order_totals[$i]['value'];\n// }\n }\n\n // Move shipping tax amount from Tax subtotal into Shipping subtotal for submission to PayPal\n $module = substr($_SESSION['shipping']['id'], 0, strpos($_SESSION['shipping']['id'], '_'));\n if (zen_not_null($order->info['shipping_method'])) {\n if ($GLOBALS[$module]->tax_class > 0) {\n $shipping_tax_basis = (!isset($GLOBALS[$module]->tax_basis)) ? STORE_SHIPPING_TAX_BASIS : $GLOBALS[$module]->tax_basis;\n $shippingOnBilling = zen_get_tax_rate($GLOBALS[$module]->tax_class, $order->billing['country']['id'], $order->billing['zone_id']);\n $shippingOnDelivery = zen_get_tax_rate($GLOBALS[$module]->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);\n if ($shipping_tax_basis == 'Billing') {\n $shipping_tax = $shippingOnBilling;\n } elseif ($shipping_tax_basis == 'Shipping') {\n $shipping_tax = $shippingOnDelivery;\n } else {\n if (STORE_ZONE == $order->billing['zone_id']) {\n $shipping_tax = $shippingOnBilling;\n } elseif (STORE_ZONE == $order->delivery['zone_id']) {\n $shipping_tax = $shippingOnDelivery;\n } else {\n $shipping_tax = 0;\n }\n }\n $taxAdjustmentForShipping = zen_calculate_tax($order->info['shipping_cost'], $shipping_tax);\n $optionsST['SHIPPINGAMT'] += $taxAdjustmentForShipping;\n $optionsST['TAXAMT'] -= $taxAdjustmentForShipping;\n }\n }\n\n // loop thru all products to display quantity and price. Appends *** if out-of-stock.\n for ($i=0, $n=sizeof($order->products), $k=0; $i<$n; $i++, $k++) {\n $optionsLI[\"L_NUMBER$k\"] = $order->products[$i]['model'];\n $optionsLI[\"L_QTY$k\"] = (int)$order->products[$i]['qty'];\n $optionsLI[\"L_NAME$k\"] = $order->products[$i]['name'];\n $optionsLI[\"L_NAME$k\"] .= (zen_get_products_stock($order->products[$i]['id']) - $order->products[$i]['qty'] < 0 ? STOCK_MARK_PRODUCT_OUT_OF_STOCK : '');\n\n // if there are attributes, loop thru them and add to description\n if (isset($order->products[$i]['attributes']) && sizeof($order->products[$i]['attributes']) > 0 ) {\n for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) {\n $optionsLI[\"L_NAME$k\"] .= \"\\n \" . $order->products[$i]['attributes'][$j]['option'] . \n ': ' . $order->products[$i]['attributes'][$j]['value'];\n } // end loop\n } // endif attribute-info\n\n $optionsLI[\"L_AMT$k\"] = $order->products[$i]['final_price'];\n $optionsLI[\"L_TAXAMT$k\"] = zen_calculate_tax($order->products[$i]['final_price'], $order->products[$i]['tax']);\n\n // track one-time charges\n if ($order->products[$i]['onetime_charges'] != 0 ) {\n $onetimeSum += $order->products[$i]['onetime_charges'];\n $onetimeTax += zen_calculate_tax($order->products[$i]['onetime_charges'], $order->products[$i]['tax']);\n }\n\n // Replace & and = with * if found. \n $optionsLI[\"L_NAME$k\"] = str_replace(array('&','='), '*', $optionsLI[\"L_NAME$k\"]);\n $optionsLI[\"L_NAME$k\"] = zen_clean_html($optionsLI[\"L_NAME$k\"], 'strong');\n\n // reformat properly\n $optionsLI[\"L_NUMBER$k\"] = substr($optionsLI[\"L_NUMBER$k\"], 0, 127);\n $optionsLI[\"L_NAME$k\"] = substr($optionsLI[\"L_NAME$k\"], 0, 127);\n $optionsLI[\"L_AMT$k\"] = $optionsLI[\"L_AMT$k\"];\n $optionsLI[\"L_TAXAMT$k\"] = round($optionsLI[\"L_TAXAMT$k\"],2);\n\n } // end for loopthru all products\n\n if ($onetimeSum > 0) {\n $i++; $k++;\n $optionsLI[\"L_NUMBER$k\"] = $k;\n $optionsLI[\"L_NAME$k\"] = 'One-Time Charges';\n $optionsLI[\"L_AMT$k\"] = $onetimeSum;\n $optionsLI[\"L_TAXAMT$k\"] = $onetimeTax;\n $optionsLI[\"L_QTY$k\"] = 1;\n }\n\n // handle discounts such as gift certificates and coupons\n if ($creditsApplied > 0) {\n $optionsST['HANDLINGAMT'] -= $creditsApplied;\n }\n\n // add all one-time charges\n $optionsST['ITEMAMT'] += $onetimeSum;\n\n //ensure things are not negative\n $optionsST['HANDLINGAMT'] = abs(strval($optionsST['HANDLINGAMT']));\n\n // ensure all numbers are non-negative\n if (is_array($optionsST)) foreach ($optionsST as $key=>$value) {\n $optionsST[$key] = abs(strval($value));\n }\n if (is_array($optionsLI)) foreach ($optionsLI as $key=>$value) {\n if (strstr($key, 'AMT')) $optionsLI[$key] = abs(strval($value));\n }\n\n // subtotals have to add up to AMT\n // Thus, if there is a discrepancy, make adjustment to HANDLINGAMT:\n $st = $optionsST['ITEMAMT'] + $optionsST['TAXAMT'] + $optionsST['SHIPPINGAMT'] + $optionsST['HANDLINGAMT'];\n if ($st != $optionsST['AMT']) $optionsST['HANDLINGAMT'] += strval($optionsST['AMT'] - $st);\n\n\n/* //PayPal API spec contradicts itself ... and apparently neither of these \"requirements\" are enforced. \n //Thus skipping this section for now:\n\n // according to API specs, these cannot be set if they contain zero values, so unset if they are zero:\n if ($optionsST['TAXAMT'] == 0) unset($optionsST['TAXAMT']);\n if ($optionsST['SHIPPINGAMT'] == 0) unset($optionsST['SHIPPINGAMT']);\n if ($optionsST['HANDLINGAMT'] == 0) unset($optionsST['HANDLINGAMT']);\n // set missing subtotals if they are zero values, since all must be submitted\n if (!isset($optionsST['TAXAMT'])) $optionsST['TAXAMT'] = 0;\n if (!isset($optionsST['SHIPPINGAMT'])) $optionsST['SHIPPINGAMT'] = 0;\n if (!isset($optionsST['HANDLINGAMT'])) $optionsST['HANDLINGAMT'] = 0;\n*/\n\n // Since the PayPal spec cannot handle mathematically mismatched values caused by one-time charges,\n // must drop line-item details if any one-time charges apply to this order:\n // if there are any discounts in this order, do NOT supply line-item details\n if ($onetimeSum > 0) $optionsLI = array();\n\n // Do sanity check -- if any of the line-item subtotal math doesn't add up properly, skip line-item details,\n // so that the order can go through even though PayPal isn't being flexible to handle Zen Cart's diversity\n for ($j=0; $j<$k; $j++) {\n $itemAMT = $optionsLI[\"L_AMT$j\"];\n $itemTAX = $optionsLI[\"L_TAXAMT$j\"];\n $itemQTY = $optionsLI[\"L_QTY$j\"];\n $sumOfLineItems += ($itemQTY * $itemAMT);\n $sumOfLineTax += round(($itemQTY * $itemTAX),2);\n }\n\n if ((float)$optionsST['ITEMAMT'] != (float)strval($sumOfLineItems)) {\n $optionsLI = array();\n $this->zcLog('getLineItemDetails 1', $time.\"\\t in \". __FILE__ . \" on line \" . __LINE__ . \" \\t\\n\". 'Order Subtotal does not match sum of line-item prices. Line-item-details skipped.' . \"\\n\" . (float)$optionsST['ITEMAMT'] . ' ' . (float)$sumOfLineItems);\n //die('ITEMAMT != $sumOfLineItems ' . $optionsST['ITEMAMT'] . ' ' . $sumOfLineItems);\n }\n if ((float)$optionsST['TAXAMT'] != (float)strval($sumOfLineTax)) {\n $optionsLI = array();\n $this->zcLog('getLineItemDetails 2', $time.\"\\t in \". __FILE__ . \" on line \" . __LINE__ . \" \\t\\n\". 'Tax Subtotal does not match sum of taxes for line-items. Line-item-details skipped.' . \"\\n\" . $optionsST['TAXAMT'] . ' ' . $sumOfLineTax);\n //die('TAXAMT != $sumofLineTax ' . $optionsST['TAXAMT'] . ' ' . $sumOfLineTax);\n }\n\n $this->zcLog('getLineItemDetails 3', $time.\"\\t in \". __FILE__ . \" on line \" . __LINE__ . \" \\t\\n\". 'LineItemDetails: ' . \"\\n\" . ($creditsApplied ? 'Credits apply to this order, so all line-item details are NOT being submitted. Thus, the following data is REDUNDANT' . \"\\n\" : '') . 'Details:' . print_r(array_merge($optionsST, $optionsLI), true) . \"\\n\\n\" . 'DEFAULT_CURRENCY = ' . DEFAULT_CURRENCY . \"\\nSESSION['currency'] = \" . $_SESSION['currency'] . \"\\n\" . \"order->info['currency'] = \" . $order->info['currency'] . \"\\n\\$currencies->currencies[\\$_SESSION['currency']]['value'] = \" . $currencies->currencies[$_SESSION['currency']]['value'] . \"\\n\" . print_r($currencies, true));\n\n // if not default currency, do not send subtotals or line-item details\n if (DEFAULT_CURRENCY != $order->info['currency']) {\n $this->zcLog('getLineItemDetails 4', $time.\"\\t in \". __FILE__ . \" on line \" . __LINE__ . \" \\t\\n\". 'Not using default currency. Thus, no line-item details can be submitted.');\n return array();\n }\n if ($currencies->currencies[$_SESSION['currency']]['value'] != 1) {\n $this->zcLog('getLineItemDetails 5', $time.\"\\t in \". __FILE__ . \" on line \" . __LINE__ . \" \\t\\n\". 'currency val not equal to 1.0000 - cannot proceed without coping with currency conversions. Aborting line-item details.');\n return array();\n }\n\n // if there are any discounts in this order, do not supply subtotals or line-item details\n if (strval($creditsApplied) > 0) return array();\n //$this->zcLog('getLineItemDetails 6', 'no credits - okay');\n\n // if subtotals are not adding up correctly, then skip sending any line-item or subtotal details to PayPal\n $st = round(strval($optionsST['ITEMAMT'] + $optionsST['TAXAMT'] + $optionsST['SHIPPINGAMT'] + $optionsST['HANDLINGAMT']),2);\n $stDiff = strval($optionsST['AMT'] - $st);\n $stDiffRounded = strval(abs($st) - abs(round($optionsST['AMT'],2)));\n\n // by wangyuan for a paypal error\n // tidy up all values so that they comply with proper format (number_format(xxxx,2) for PayPal US use )\n if (!defined('PAYPALWPP_SKIP_LINE_ITEM_DETAIL_FORMATTING') || PAYPALWPP_SKIP_LINE_ITEM_DETAIL_FORMATTING != 'true') {\n if (is_array($optionsST)) foreach ($optionsST as $key=>$value) {\n \t \n $optionsST[$key] = number_format(abs($value), 2, '.', '');\n }\n // by wangyuan for paypal\n\t if($optionsST['HANDLINGAMT'] == $optionsST['SHIPPINGAMT'] && $stDiffRounded == 0){\n\t\t unset($optionsST['HANDLINGAMT'],$optionsST['SHIPPINGAMT']);\n\t\t }\n\t\t // end\n if (is_array($optionsLI)) foreach ($optionsLI as $key=>$value) {\n if (strstr($key, 'AMT')) $optionsLI[$key] = number_format(abs($value), 2, '.', '');\n }\n }\n //end\n\n $this->zcLog('getLineItemDetails 7', $time.\"\\t in \". __FILE__ . \" on line \" . __LINE__ . \" \\t\\n\". 'checking subtotals... '. \"\\nitemamt: \" . $optionsST['ITEMAMT'] . \"\\ntaxamt: \" . $optionsST['TAXAMT'] . \"\\nshippingamt: \" . $optionsST['SHIPPINGAMT'] . \"\\nhandlingamt: \" . $optionsST['HANDLINGAMT'] . \"\\n-------------------\\nsubtotal: \" . number_format($st, 2) . \"\\nAMT: \" . $optionsST['AMT'] . \"\\n-------------------\\ndifference: \" . $stDiff . ' (abs+rounded: ' . $stDiffRounded . ')');\n\n if ( $stDiffRounded != 0) return array(); //die('bad subtotals'); //return array();\n $this->zcLog('getLineItemDetails 8', $time.\"\\t in \". __FILE__ . \" on line \" . __LINE__ . \" \\t\\n\". 'subtotals balance - okay');\n\n if (abs($optionsST['HANDLINGAMT']) == 0) unset($optionsST['HANDLINGAMT']);\n\n // Send Subtotal and LineItem results back to be submitted to PayPal\n return array_merge($optionsST, $optionsLI);\n }", "private function getdeliveryinfo($tracking_id, $courier)\n\t{\n\t\t// $courier = 'air21';\n\t\t\n\t\t// TODO : map API statuses with the ff :\n\t\t// Initiated\n\t\t// Pick-up\n\t\t// In-Transit\n\t\t// Delivered\n\t\t$this->load->library('GlobeWebService', '', 'api_globe');\n\t\t$data['status'] = 'success';\n\t\tswitch ( strtolower($courier) ) {\n\t\t\tcase 'air21' :\n\t\t\t\t\t$temp = $this->api_globe->air21($tracking_id);\n\t\t\t\t\t$data['tracking_id'] = $temp['reference'];\n\n\t\t\t\t\tswitch ($temp[0]['code']) {\n\t\t\t\t\t\tcase 'POD' :\n\t\t\t\t\t\tcase 'RUD' :\n\t\t\t\t\t\t\t\t$status_id = 'Delivered'; break;\n\t\t\t\t\t\tcase 'VAN' :\n\t\t\t\t\t\tcase 'SIP' :\n\t\t\t\t\t\t\t\t$status_id = 'In-transit'; break;\n\t\t\t\t\t\tcase 'ROP' :\n\t\t\t\t\t\t\t\t$status_id = 'Pick-up'; break;\n\t\t\t\t\t\tcase 'SOP' :\n\t\t\t\t\t\tcase 'MDE' : \n\t\t\t\t\t\t\t\t$status_id = 'Initiated'; break;\n\t\t\t\t\t\tdefault : break;\n\t\t\t\t\t}\n\n\t\t\t\t\t$data['delivery_status_id'] = $status_id; // TODO : map with the basic 4 status \n\t\t\t\t\t$data['delivery_dest'] = $temp[0]['post_location'];\n\t\t\t\t\t$data['shipment_date'] = $temp[0]['post_date'];\n\t\t\t\t\t$data['est_delivery_date'] = '';\n\t\t\t\t\t$data['shipment_dest'] = $temp[0]['status'];\n\t\t\t\t\tbreak;\n\t\t\tcase 'ximex' : \n\t\t\t\t\t$temp = $this->api_globe->ximex($tracking_id); \n\t\t\t\t\t$_data = json_decode($temp, true);\n\t\t\t\t\t$temp = $_data['item'];\n\n\t\t\t\t\t$data['tracking_id'] = $temp['id'];\n\t\t\t\t\t$data['delivery_status_id'] = $temp['description'];\n\t\t\t\t\t$data['delivery_dest'] = $temp['location'];\n\t\t\t\t\t$data['shipment_date'] = '';\n\t\t\t\t\t$data['est_delivery_date'] = '';\n\t\t\t\t\t$data['shipment_dest'] = $temp['location'];\n\t\t\t\t\tbreak;\n\t\t\tdefault : $data = array(); break;\n\t\t}\n\n\t\t$data['status'] = 'error';\n\t\treturn $data;\n\t}", "protected abstract function getTravelReport();", "function arrival_details($resObj_or_id, $user_level=0) {\n $resObj = any2obj('reservation', $resObj_or_id); \n $fields=array(); \n //if($resObj->property_type == 'shortstay') list($airport_pickup_ok, $airport_pickup_fee) = pickup_ok_fee($resObj->apt_id); \n $arrival_str = implode(' - ', array_filter(array(phrase($resObj->arrival_method, CAPITALIZE), $resObj->arrival_number, strip_sec($resObj->arrival_time), $resObj->arrival_notes)));\n if($arrival_str) $fields[phrase('arrival_information', CAPITALIZE)] = $arrival_str;\n $fields[phrase('checkin_time', CAPITALIZE)] = $resObj->arrival_property ? strip_sec($resObj->arrival_property) : \"???\";\n \n // if($airport_pickup_ok) $fields[phrase('airport_pickup', CAPITALIZE)]= $resObj->airport_pickup ? phrase('yes', CAPITALIZE) : phrase('no', CAPITALIZE);\n return $fields;\n}", "public function travels(){\r\n $userId = Witt::getUserId();\r\n\r\n $sql = \"SELECT * FROM travel WHERE user_id = :user_id\";\r\n //provozierte Fehler --> abfangen\r\n //$sql = \"SELECT * FROM travels WHERE user_id = :user_id\";\r\n $result = $this->getStatement($sql, array(0 => array('name' => 'user_id', 'value' => $userId, 'param' => \"PARAM_INT\")));\r\n $travels = array();\r\n foreach($result as $row){\r\n $travels[$row['travel_id']] = array(\r\n 'travel_id' => $row['travel_id'],\r\n 'user_id' => $userId,\r\n 'name' => $row['name'],\r\n 'description' => $row['description'],\r\n 'locations' => $row['location'],\r\n 'startdate' => $row['startdate'],\r\n 'enddate' => $row['enddate'],\r\n );\r\n }\r\n $this->viewVariables = array('travels' => $travels);\r\n \r\n }", "public function addLineItem($params) {\r\n \r\n $i = count($this->lineItems) + 1;\r\n $prefix = \"LV3_ITEM${i}_\"; // VALUE REQUIRED IN:\r\n $this->lineItems[] = array( // USA | CANADA\r\n \"${prefix}UNIT_COST\" => $params['unitCost'], // * *\r\n \"${prefix}QUANTITY\" => $params['quantity'], // * *\r\n \"${prefix}ITEM_SKU\" => $params['itemSKU'] ?? '', // *\r\n \"${prefix}ITEM_DESCRIPTOR\" => $params['descriptor'] ?? '', // * *\r\n \"${prefix}COMMODITY_CODE\" => $params['commodityCode'] ?? '', // * *\r\n \"${prefix}PRODUCT_CODE\" => $params['productCode'] ?? '', // *\r\n \"${prefix}MEASURE_UNITS\" => $params['measureUnits'] ?? '', // * *\r\n \"${prefix}ITEM_DISCOUNT\" => $params['itemDiscount'] ?? '', // *\r\n \"${prefix}TAX_RATE\" => $params['taxRate'] ?? '', // *\r\n \"${prefix}GOODS_TAX_RATE\" => $params['goodsTaxRate'] ?? '', // *\r\n \"${prefix}TAX_AMOUNT\" => $params['taxAmount'] ?? '', // *\r\n \"${prefix}GOODS_TAX_AMOUNT\" => $params['goodsTaxAmount'] ?? '', // *\r\n \"${prefix}CITY_TAX_RATE\" => $params['cityTaxRate'] ?? '', \r\n \"${prefix}CITY_TAX_AMOUNT\" => $params['cityTaxAmount'] ?? '', \r\n \"${prefix}COUNTY_TAX_RATE\" => $params['countyTaxRate'] ?? '', \r\n \"${prefix}COUNTY_TAX_AMOUNT\" => $params['countyTaxAmount'] ?? '', \r\n \"${prefix}STATE_TAX_RATE\" => $params['stateTaxRate'] ?? '', \r\n \"${prefix}STATE_TAX_AMOUNT\" => $params['stateTaxAmount'] ?? '', \r\n \"${prefix}CUST_SKU\" => $params['custSKU'] ?? '', \r\n \"${prefix}CUST_PO\" => $params['custPO'] ?? '', \r\n \"${prefix}SUPPLEMENTAL_DATA\" => $params['supplementalData'] ?? '', \r\n \"${prefix}GL_ACCOUNT_NUMBER\" => $params['glAccountNumber'] ?? '', \r\n \"${prefix}DIVISION_NUMBER\" => $params['divisionNumber'] ?? '', \r\n \"${prefix}PO_LINE_NUMBER\" => $params['poLineNumber'] ?? '', \r\n \"${prefix}LINE_ITEM_TOTAL\" => $params['lineItemTotal'] ?? '' // *\r\n );\r\n }", "public function currentTrip() {\n $productId = $fromdate = $todate = $dateTimeStatus = $cancelStatus = array ();\n $customer = Mage::getSingleton ( 'customer/session' )->getCustomer ();\n $cusId = $customer->getId ();\n $todayData = Mage::getModel ( 'core/date' )->timestamp ( time () );\n $todayDate = date ( 'Y-m-d', $todayData );\n $result = Mage::getModel ( 'airhotels/airhotels' )->getCollection ()->addFieldToFilter ( 'order_status', 1 )->addFieldToFilter ( 'fromdate', array (\n 'lteq' => $todayDate \n ) )->addFieldToFilter ( 'todate', array (\n 'gteq' => $todayDate \n ) )->addFieldToFilter ( 'customer_id', $cusId )->setOrder ( 'id', 'DESC' );\n foreach ( $result as $res ) {\n $dayflag = 0;\n if (! empty ( $res ['checkin_time'] )) {\n if (strtotime ( $res ['checkin_time'] ) < Mage::getModel ( 'core/date' )->timestamp ( time () ) && strtotime ( $res ['checkout_time'] ) > Mage::getModel ( 'core/date' )->timestamp ( time () )) {\n $dayflag = 1;\n }\n } else {\n $dayflag = 1;\n }\n if ($dayflag == 1) {\n if (! empty ( $res ['checkin_time'] )) {\n $fromdate [] = $res ['checkin_time'];\n $dateTimeStatus [] = 1;\n } else {\n $fromdate [] = $res ['fromdate'];\n $dateTimeStatus [] = 0;\n }\n if (! empty ( $res ['checkout_time'] )) {\n $todate [] = $res ['checkout_time'];\n } else {\n $todate [] = $res ['todate'];\n }\n $productId [] = $res ['entity_id'];\n $cancelStatus [] = $res ['cancel_order_status'];\n }\n }\n /**\n * Return an array.\n */\n return array (\n $productId,\n $fromdate,\n $todate,\n $cancelStatus,\n $dateTimeStatus \n );\n }", "public function getShipmentDetails();", "function save_flight_booking_itinerary_details(\r\n\t$app_reference, $segment_indicator, $airline_code, $airline_name, $flight_number, $fare_class, $from_airport_code, $from_airport_name,\r\n\t$to_airport_code, $to_airport_name, $departure_datetime, $arrival_datetime, $status, $operating_carrier, $attributes,\r\n\t$FareRestriction, $FareBasisCode, $FareRuleDetail, $airline_pnr, $cabin_baggage, $checkin_baggage, $is_refundable)\r\n\t{\r\n\t\t$data['app_reference'] = $app_reference;\r\n\t\t$data['segment_indicator'] = $segment_indicator;\r\n\t\t$data['airline_code'] = $airline_code;\r\n\t\t$data['airline_name'] = $airline_name;\r\n\t\t$data['flight_number'] = $flight_number;\r\n\t\t$data['fare_class'] = $fare_class;\r\n\t\t$data['from_airport_code'] = $from_airport_code;\r\n\t\t$data['from_airport_name'] = $from_airport_name;\r\n\t\t$data['to_airport_code'] = $to_airport_code;\r\n\t\t$data['to_airport_name'] = $to_airport_name;\r\n\t\t$data['departure_datetime'] = $departure_datetime;\r\n\t\t$data['arrival_datetime'] = $arrival_datetime;\r\n\t\t$data['status'] = $status;\r\n\t\t$data['operating_carrier'] = $operating_carrier;\r\n\t\t$data['attributes'] = $attributes;\r\n\t\t$data['FareRestriction'] = $FareRestriction;\r\n\t\t$data['FareBasisCode'] = $FareBasisCode;\r\n\t\t$data['FareRuleDetail'] = $FareRuleDetail;\r\n\t\t$data['cabin_baggage'] = $cabin_baggage;\r\n\t\t$data['checkin_baggage'] = $checkin_baggage;\r\n\t\t$data['is_refundable'] = $is_refundable;\r\n\t\t$data['airline_pnr'] = $airline_pnr;\r\n\t\t\r\n\t\t$this->custom_db->insert_record('flight_booking_itinerary_details', $data);\r\n\t}", "public function getInfoDepotItem($id) {\n // TODO: implement this stub\n }", "public function getTravelWarrantDetails($id)\n {\n try\n {\n //call getCompanyId method from UserRepository to get company id\n $company_id = $this->getCompanyId();\n\n $warrant = TravelWarrant::with('creator', 'user', 'vehicle')\n ->where('company_id', '=', $company_id)->where('id', '=', $id)->first();\n\n //if warrant doesn't exist return error status\n if (!$warrant)\n {\n return ['status' => 0];\n }\n\n //format start and end date\n $warrant->start_date = date('d.m.Y.', strtotime($warrant->start_date));\n $warrant->end_date = date('d.m.Y.', strtotime($warrant->end_date));\n\n //get wages\n $wages = WarrantWage::with('wageWage', 'wageCountry')\n ->select('id', 'wage_id', DB::raw('DATE_FORMAT(wage_date, \"%d.%m.%Y.\") AS date'), 'country',\n DB::raw('DATE_FORMAT(start_time, \"%d.%m.%Y.\") AS departure_date'),\n DB::raw('DATE_FORMAT(start_time, \"%H:%i\") AS departure_time'),\n DB::raw('DATE_FORMAT(end_time, \"%d.%m.%Y.\") AS arrival_date'),\n DB::raw('DATE_FORMAT(end_time, \"%H:%i\") AS arrival_time'), 'wage',\n DB::raw('time_to_sec(TIMEDIFF(end_time, start_time)) / 3600 AS hours'))\n ->where('warrant_id', '=', $id)->get();\n\n //get directions\n $directions = Direction::select('id', DB::raw('DATE_FORMAT(direction_date, \"%d.%m.%Y.\") AS date'),\n 'transport_type', 'start_location', 'end_location', 'distance', 'km_price')\n ->where('warrant_id', '=', $id)->get();\n\n //get costs\n $costs = Cost::select('id', DB::raw('DATE_FORMAT(cost_date, \"%d.%m.%Y.\") AS date'), 'cost_type',\n 'description', 'sum', 'non_costs')\n ->where('warrant_id', '=', $id)->get();\n\n //add travel warrant details to warrant array\n $warrant_array['warrant'] = $warrant;\n $warrant_array['wages'] = $wages;\n $warrant_array['directions'] = $directions;\n $warrant_array['costs'] = $costs;\n\n return ['status' => 1, 'data' => $warrant_array];\n }\n catch (Exception $exp)\n {\n return ['status' => 0];\n }\n }", "function _restructure_international_flight_data($flight_data, $search_criteria){\r\n\t\r\n\t\t$ret = array();\r\n\t\r\n\t\tif(!empty($flight_data)){\r\n\t\t\tforeach ($flight_data as $flight){\r\n\t\r\n\t\t\t\tif ($flight['PriceInfo'][0]['ADT_Fare'] > 0){\r\n\t\r\n\t\t\t\t\t$flight['departure_time_index'] = get_departure_time_index($flight);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t$first_route = $flight['RouteInfo'][0];\r\n\t\t\t\t\t// used for sort flight by Flight Company\r\n\t\t\t\t\t$flight['FlightCode'] = $first_route['Airlines'].'-'.$first_route['FlightCodeNum'];\r\n\t\r\n\t\t\t\t\t// set information of depart flightss\r\n\t\t\t\t\t$depart_routes = get_inter_flight_routes($flight['RouteInfo'], FLIGHT_TYPE_DEPART);\r\n\t\t\t\t\t$flight_depart['TimeFrom'] = $depart_routes[0]['TimeFrom']; // first route time-from\r\n\t\t\t\t\t$flight_depart['DayFrom'] = $depart_routes[0]['DayFrom']; // first route day-from\r\n\t\t\t\t\t$flight_depart['MonthFrom'] = $depart_routes[0]['MonthFrom']; // first route month-from\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t$flight_depart['TimeTo'] = $depart_routes[count($depart_routes)-1]['TimeTo']; // last rout time-to\r\n\t\t\t\t\t$flight_depart['DayTo'] = $depart_routes[count($depart_routes)-1]['DayTo']; // first route day-to\r\n\t\t\t\t\t$flight_depart['MonthTo'] = $depart_routes[count($depart_routes)-1]['MonthTo']; // first route month-to\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t$flight_depart['Airlines'] = $depart_routes[0]['Airlines'];\r\n\t\t\t\t\t$flight_depart['FlightCode'] = $depart_routes[0]['FlightCode'];\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t$flight_depart['Stop'] = count($depart_routes) - 1;\r\n\t\t\t\t\t$flight_depart['StopTxt'] = $flight_depart['Stop'] == 0 ? lang('direct') : $flight_depart['Stop'].' '.lang('stop');\r\n\t\t\t\t\t$flight_depart['RouteInfo'] = $depart_routes;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t$flight['flight_depart'] = $flight_depart;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t// set information of depart flightss\r\n\t\t\t\t\t$return_routes = get_inter_flight_routes($flight['RouteInfo'], FLIGHT_TYPE_RETURN);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tif(count($return_routes) > 0){\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t$flight_return['TimeFrom'] = $return_routes[0]['TimeFrom']; // first route time-from\r\n\t\t\t\t\t\t$flight_return['DayFrom'] = $return_routes[0]['DayFrom']; // first route day-from\r\n\t\t\t\t\t\t$flight_return['MonthFrom'] = $return_routes[0]['MonthFrom']; // first route month-from\r\n\t\r\n\t\t\t\t\t\t$flight_return['TimeTo'] = $return_routes[count($return_routes)-1]['TimeTo']; // last rout time-to\r\n\t\t\t\t\t\t$flight_return['DayTo'] = $return_routes[count($return_routes)-1]['DayTo']; // first route day-to\r\n\t\t\t\t\t\t$flight_return['MonthTo'] = $return_routes[count($return_routes)-1]['MonthTo']; // first route month-to\r\n\t\r\n\t\t\t\t\t\t$flight_return['Airlines'] = $return_routes[0]['Airlines'];\r\n\t\t\t\t\t\t$flight_return['FlightCode'] = $return_routes[0]['FlightCode'];\r\n\t\r\n\t\t\t\t\t\t$flight_return['Stop'] = count($return_routes) - 1;\r\n\t\t\t\t\t\t$flight_return['StopTxt'] = $flight_return['Stop'] == 0 ? lang('direct') : $flight_return['Stop'].' '.lang('stop');\r\n\t\t\t\t\t\t$flight_return['RouteInfo'] = $return_routes;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t$flight['flight_return'] = $flight_return;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t$flight['Airlines'] = get_airline_codes_of_flight($flight['RouteInfo']);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t$fare = $flight['PriceInfo'][0]['ADT_Fare'];\r\n\t\t\t\t\t$from_code = $search_criteria['From_Code'];\r\n\t\t\t\t\t$to_code = $search_criteria['To_Code'];\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t$flight['PriceFrom'] = calculate_discount_fare($flight['Airlines'], $from_code, $to_code, $fare);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tif($fare != $flight['PriceFrom']){\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t$flight['PriceOrigin'] = $fare;\r\n\t\r\n\t\t\t\t\t\t$adt = $search_criteria['ADT'];\r\n\t\t\t\t\t\t$chd = $search_criteria['CHD'];\r\n\t\t\t\t\t\t$inf = $search_criteria['INF'];\r\n\t\r\n\t\t\t\t\t\t$total_fare = $flight['PriceInfo'][0]['ADT_Fare'] * $adt + $flight['PriceInfo'][0]['CHD_Fare'] * $chd + $flight['PriceInfo'][0]['INF_Fare'] * $inf;\r\n\t\r\n\t\t\t\t\t\t$total_discount = $total_fare - calculate_discount_fare($flight['Airlines'], $from_code, $to_code, $total_fare);\r\n\t\r\n\t\t\t\t\t\t$total_discount = bpv_format_currency($total_discount, false);\r\n\t\r\n\t\t\t\t\t\t$flight['DiscountNote'] = lang_arg('fare_discount', $total_discount, ($adt + $chd + $inf));\r\n\t\t\t\t\t}\r\n\t\r\n\t\t\t\t\t$ret[] = $flight;\r\n\t\r\n\t\t\t\t}\r\n\t\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\tif(count($ret) > 0){\r\n\t\t\tusort($ret, array($this, 'sort_price_inter_asc'));\r\n\t\t}\r\n\t\r\n\t\treturn $ret;\r\n\t}", "public function getLineItemInfo()\n {\n return $this->line_item_info;\n }", "abstract public function parseDepartureInfos(array $_departureInfos, int $_vehicleType): array;", "function get_current_item_info_post_data(){\r\n\r\n\t$CI =& get_instance();\r\n\r\n\t// current booking item\r\n\t$current_item_info = array();\r\n\r\n\t$current_item_info['service_id'] = $CI->input->post('current_service_id');\r\n\r\n\t$current_item_info['service_type'] = $CI->input->post('current_service_type');\r\n\r\n\t$current_item_info['url_title'] = $CI->input->post('current_service_url_title');\r\n\r\n\t$current_item_info['is_main_service'] = $CI->input->post('current_service_is_main_service');\r\n\r\n\t$current_item_info['is_main_service'] = $current_item_info['is_main_service'] == 1 ? true : false;\r\n\r\n\t$current_item_info['normal_discount'] = $CI->input->post('current_service_normal_discount');\r\n\r\n\t$current_item_info['destination_id'] = $CI->input->post('current_service_destination_id');\r\n\r\n\t$current_item_info['is_booked_it'] = $CI->input->post('current_service_is_booked_it');\r\n\r\n\t$current_item_info['is_booked_it'] = $current_item_info['is_booked_it'] == 1 ? true : false;\r\n\r\n\t$current_item_info['start_date'] = $CI->input->post('start_date');\r\n\r\n\t$current_item_info['parent_id'] = $CI->input->post('parent_id');\r\n\r\n\treturn $current_item_info;\r\n}", "private function addLineItemsToInvoice($data){\n $lineItems = [];\n $counter = 1;\n foreach($data as $lineData) {\n $lineItem = [];\n $lineItem['LineNum'] = $counter;\n $lineItem['Description'] = IndexSanityCheckHelper::indexSanityCheck('description', $lineData);\n\n if (array_key_exists('item_id', $lineData)) {\n $lineItem['Amount'] = IndexSanityCheckHelper::indexSanityCheck('amount', $lineData);\n $lineItem['DetailType'] = 'SalesItemLineDetail';\n $lineItem['SalesItemLineDetail'] = [];\n $lineItem['SalesItemLineDetail']['Qty'] = IndexSanityCheckHelper::indexSanityCheck('quantity', $lineData);\n $lineItem['SalesItemLineDetail']['UnitPrice'] = IndexSanityCheckHelper::indexSanityCheck('unit_amount', $lineData);\n $lineItem['SalesItemLineDetail']['ItemRef']['value'] = IndexSanityCheckHelper::indexSanityCheck('item_id', $lineData);\n $lineItem['SalesItemLineDetail']['TaxCodeRef']['value'] = IndexSanityCheckHelper::indexSanityCheck('tax_id', $lineData);\n $lineItem['SalesItemLineDetail']['DiscountRate'] = IndexSanityCheckHelper::indexSanityCheck('discount_rate', $lineData);\n $lineItem['SalesItemLineDetail']['TaxInclusiveAmt'] = IndexSanityCheckHelper::indexSanityCheck('tax_inclusive_amount', $lineData);\n } else {\n $lineItem['Amount'] = IndexSanityCheckHelper::indexSanityCheck('amount', $lineData);\n $lineItem['DetailType'] = 'SalesItemLineDetail';\n $lineItem['SalesItemLineDetail'] = [];\n $lineItem['SalesItemLineDetail']['Qty'] = IndexSanityCheckHelper::indexSanityCheck('quantity', $lineData);\n $lineItem['SalesItemLineDetail']['UnitPrice'] = IndexSanityCheckHelper::indexSanityCheck('unit_amount', $lineData);\n $lineItem['SalesItemLineDetail']['TaxCodeRef']['value'] = IndexSanityCheckHelper::indexSanityCheck('tax_id', $lineData);\n $lineItem['SalesItemLineDetail']['DiscountRate'] = IndexSanityCheckHelper::indexSanityCheck('discount_rate', $lineData);\n $lineItem['SalesItemLineDetail']['TaxInclusiveAmt'] = IndexSanityCheckHelper::indexSanityCheck('tax_inclusive_amount', $lineData);\n }\n $counter++;\n array_push($lineItems, $lineItem);\n }\n if ($this->getDiscountRate()) {\n if ($this->getDiscountRate() > 0) {\n $discountLineItem = [];\n $discountLineItem['LineNum'] = $counter;\n $discountLineItem['Description'] = '';\n $discountLineItem['Amount'] = $this->getDiscountAmount();\n $discountLineItem['DetailType'] = 'DiscountLineDetail';\n $discountLineItem['DiscountLineDetail']['PercentBased'] = true;\n $discountLineItem['DiscountLineDetail']['DiscountPercent'] = $this->getDiscountRate();\n array_push($lineItems, $discountLineItem);\n }\n }\n else if ($this->getDiscountAmount()) {\n if ($this->getDiscountAmount() > 0) {\n $discountLineItem = [];\n $discountLineItem['LineNum'] = $counter;\n $discountLineItem['Description'] = '';\n $discountLineItem['Amount'] = $this->getDiscountAmount();\n $discountLineItem['DetailType'] = 'DiscountLineDetail';\n $discountLineItem['DiscountLineDetail']['PercentBased'] = false;\n array_push($lineItems, $discountLineItem);\n }\n }\n return $lineItems;\n }", "public function addNewInfoDepotItem($item) {\n // TODO: implement this stub\n }", "public function report_item_pt_post()\n {\n //Location info\n $location_info['address'] = $this->post('location_address');\n $location_info['name'] = $this->post('location_name');\n $location_info['id'] = $this->post('location_id');\n $location_info['latitude'] = $this->post('location_latitude');\n $location_info['longitude'] = $this->post('location_longitude');\n\n $type = $this->post('type');\n\n $location_brgy = $this->post('location_brgy');\n\n switch ($type) {\n case \"Lost\":\n /*IF LOST ITEM*/\n $lost_item['item_name'] = $this->post('item_name');\n $lost_item['date_lost'] = $this->post('date_lost');\n $lost_item['item_category'] = $this->post('item_category');\n $lost_item['location_id'] = $this->post('location_id');\n $lost_item['account_id'] = $this->post('account_id');\n\n //Nullable\n $lost_item['brand'] = $this->post('brand') != null ? $this->post('brand') : \"\";\n $lost_item['item_color'] = $this->post('item_color') != null ? $this->post('item_color') : \"\";\n $lost_item['item_description'] = $this->post('item_description') != null ? $this->post('item_description') : \"\";\n $lost_item['reward'] = $this->post('reward') != null ? $this->post('reward') : 0;\n $lost_item['additional_location_info'] = $this->post('additional_location_info');\n\n $id = '';\n $reported_by = '';\n $brgy_user_id = $this->post('brgy_user_id');\n if (isset($brgy_user_id )) {\n $valid_account = $this->barangay->get_brgyuser_details(array('id' => $brgy_user_id ));\n $id = $brgy_user_id;\n $reported_by = 2;\n $lost_item['account_id'] = $brgy_user_id;\n } else {\n $valid_account = $this->account->get(array('id' => $this->post('account_id')));\n $id = $this->post('account_id');\n $reported_by = 1;\n $lost_item['account_id'] = $this->post('account_id');\n }\n if ($valid_account) {\n $upload_result = $this->do_image_upload(\"item_images\", \"uploads/lost\");\n\n if ($upload_result) {\n $images_details = array();\n $insert_result = $this->lost_item->insert($lost_item); //Insert New Lost Item\n $item = array(\n 'item_id' => $insert_result,\n 'type' => $type,\n 'location_brgy_covered' => $location_brgy,\n 'status' => 'New',\n 'report_type' => 'Personal Thing',\n 'reported_by' => $reported_by,\n 'account_id' => $id\n );\n\n $item_id = $this->item->insert($item);\n\n for ($i = 0; $i < count($upload_result); $i++) {\n $images_details[$i]['item_id'] = $item_id;\n $images_details[$i]['file_name'] = $upload_result[$i]['file_name'];\n $images_details[$i]['file_path'] = 'uploads/lost/' . $upload_result[$i]['file_name'];\n }\n\n $this->item->insert_item_images($images_details);\n\n $con['id'] = $location_info['id'];\n $location_exist = $this->item_location->get($con);\n if (!$location_exist) {\n $this->item_location->insert($location_info);\n }\n\n } else {\n $this->response(\"Image Upload Error Occurred\", REST_Controller::HTTP_BAD_REQUEST);\n }\n } else {\n //Account Not Found\n $this->response(\"Account Not Found\", REST_Controller::HTTP_BAD_REQUEST);\n }\n break;\n case \"Found\":\n /*IF FOUND ITEM */\n $found_item['item_name'] = $this->post('item_name');\n $found_item['date_found'] = $this->post('date_found');\n $found_item['item_category'] = $this->post('item_category');\n $found_item['location_id'] = $this->post('location_id');\n //Nullable\n $found_item['brand'] = $this->post('brand') != null ? $this->post('brand') : \"\";\n $found_item['item_color'] = $this->post('item_color') != null ? $this->post('item_color') : \"\";\n $found_item['item_description'] = $this->post('item_description') != null ? $this->post('item_description') : \"\";\n $found_item['additional_location_info'] = $this->post('additional_location_info');\n\n $id = '';\n $reported_by = '';\n $brgy_user_id = $this->post('brgy_user_id');\n if (isset($brgy_user_id )) {\n $valid_account = $this->barangay->get_brgyuser_details(array('id' => $brgy_user_id ));\n $id = $brgy_user_id;\n $reported_by = 2;\n $found_item['account_id'] = $brgy_user_id;\n } else {\n $valid_account = $this->account->get(array('id' => $this->post('account_id')));\n $id = $this->post('account_id');\n $reported_by = 1;\n $found_item['account_id'] = $this->post('account_id');\n }\n\n if ($valid_account) {\n $upload_result = $this->do_image_upload(\"item_images\", \"uploads/found\");\n if ($upload_result) {\n $images_details = array();\n $insert_result = $this->found_item->insert($found_item); //Insert New Lost Item\n $item = array(\n 'item_id' => $insert_result,\n 'type' => $type,\n 'location_brgy_covered' => $location_brgy,\n 'status' => 'New',\n 'report_type' => 'Personal Thing',\n 'reported_by' => $reported_by,\n 'account_id' => $id\n );\n\n $item_id = $this->item->insert($item);\n\n for ($i = 0; $i < count($upload_result); $i++) {\n $images_details[$i]['item_id'] = $item_id;\n $images_details[$i]['file_name'] = $upload_result[$i]['file_name'];\n $images_details[$i]['file_path'] = 'uploads/found/' . $upload_result[$i]['file_name'];\n }\n\n $this->item->insert_item_images($images_details);\n\n $con['id'] = $location_info['id'];\n $location_exist = $this->item_location->get($con);\n if (!$location_exist) {\n $this->item_location->insert($location_info);\n }\n\n //Add to repository if the item is go be surrendered to brgy\n $is_surrendered = $this->post('s');\n if ($is_surrendered) {\n $repository['brgy_id'] = $this->post('barangay_id');\n $repository['item_id'] = $item_id;\n $repository['item_received'] = 2; // Value = No\n $this->repository->insert($repository);\n }\n $match_results = $this->match_making_process($item_id, $found_item['account_id']);\n $this->notification_process($item_id, $match_results); // Save and Send notification\n\n } else {\n $this->response(\"Image Upload Error Occurred\", REST_Controller::HTTP_BAD_REQUEST);\n }\n } else {\n //Account Not Found\n $this->response(\"Account Not Found\", REST_Controller::HTTP_BAD_REQUEST);\n }\n break;\n }\n }", "abstract function getListTransportation();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Filter buffer by line number range
public function filterByLineBetween(int $min_line, int $max_line) : self { $this->buffer = array_filter($this->buffer, function(LogMessage $msg) use($min_line, $max_line){ return $msg->getLine() >= $min_line && $msg->getLine() <= $max_line; }); return $this; }
[ "public function filter($buffer);", "protected function getLineFromFileFilter(): \\Twig_Filter\n {\n return new \\Twig_Filter('getLineFromFile', function ($fileName, $lineNumber) {\n return $this->getLineFromFile($fileName, $lineNumber);\n });\n }", "private function extractLineNumbers(string $buffer): void\n {\n $this->sourcePositions = [0 => 0];\n $prev = 0;\n\n while (($pos = strpos($buffer, \"\\n\", $prev)) !== false) {\n $this->sourcePositions[] = $pos;\n $prev = $pos + 1;\n }\n\n $this->sourcePositions[] = \\strlen($buffer);\n\n if (substr($buffer, -1) !== \"\\n\") {\n $this->sourcePositions[] = \\strlen($buffer) + 1;\n }\n }", "function CLIENT_filterLinesFromLiveScreenRecording($in)\n{\n\t$filters = array('Warning: Permanently added' , 'There is no screen to be attached matching m23install.', 'tcsetattr: Input/output error', 'Write failed: Connection reset by peer', 'bash: warning: setlocale', 'cannot change locale', \"Warning: Permanently\", \"stdin: is not a tty\", \"stdin is not a terminal\", \"mesg: ttyname\", 'lost connection', 'Permission denied');\n\n\tforeach ($filters as $filter)\n\t\tif (false !== strpos ($in, $filter))\n\t\t\treturn('');\n\n\treturn($in);\n}", "function getLines($filename, $start, $end) {\n if (!file_exists(\"data/$filename\")) {\n return false;\n }\n\n $result = array();\n\n // Starts at line 1\n $count = 1;\n\n $handle = fopen(\"data/$filename\", \"r\");\n\n if (!$handle) {\n return null;\n }\n\n // Iterate over all the file until the end range or end of file\n while($count <= $end && !feof($handle)) {\n $data = fgets($handle);\n\n // Adds only specific line range to result array\n if ($count >= $start && $count <= $end) {\n $result[] = $data;\n }\n\n $count++;\n }\n\n fclose($handle);\n\n return $result;\n}", "public function scanForVariables(File $file, LineRange $range);", "function apply_filter_range2runs( $range, $logbook_in ) {\r\n\r\n\t/* Translate the range into a dictionary of runs. This is going to be\r\n\t * our filter. Run numbers will be the keys. And each key will have True\r\n\t * as the corresponding value.\r\n\t */ \r\n\t$runs2allow = array();\r\n\tforeach( explode( ',', $range ) as $subrange ) {\r\n\r\n\t\t/* Check if this is just a number or a subrange: <begin>-<end>\r\n\t\t */\r\n\t\t$pair = explode( '-', $subrange );\r\n\t\tswitch( count( $pair )) {\r\n\t\t\tcase 1:\r\n\t\t\t\t$runs2allow[$pair[0]] = True;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2:\r\n\t\t\t\tif( $pair[0] >= $pair[1] )\r\n\t\t\t\t\tdie( \"illegal subrange: \".$pair[0].\"-\".$pair[1] );\r\n\t\t\t\tfor( $run = $pair[0]; $run <= $pair[1]; $run++ )\r\n\t\t\t\t\t$runs2allow[$run] = True;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tdie( 'illegal syntax of the runs range' );\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t/* Apply the filter\r\n\t */\r\n\t$out = array();\r\n\tforeach( $logbook_in as $run ) {\r\n\t\t$runum = $run->num();\r\n\t\tif( array_key_exists( $runum, $runs2allow ))\r\n\t\t\tarray_push( $out, $run );\r\n\t}\r\n\r\n\treturn $out;\r\n}", "public function bindFromLinesFilter($filter)\n {\n $this->networksApi = $this->container->get('navitia.networks');\n $this->setApi($this->networksApi);\n $coverage = $this->api->generateRequest();\n $coverage->setPathFilter($filter);\n return $this->bindFromLines($coverage);\n }", "public function getFilterByLineRef()\n {\n return $this->filterByLineRef;\n }", "public function filter(\\SplFileObject $file);", "function CopyAllowLine(){}", "public function rangeFilter()\n {\n $this->assertSame($this->filterBuilder, $this->filterBuilder->inRange(1, 4));\n $rangeFilterDecorator = $this->filterBuilder->getDecoratedFilter();\n $this->assertInstanceOf('stubRangeFilterDecorator', $rangeFilterDecorator);\n $this->assertEquals(1, $rangeFilterDecorator->getMinValidator()->getValue());\n $this->assertEquals('VALUE_TOO_SMALL', $rangeFilterDecorator->getMinErrorId());\n $this->assertEquals(4, $rangeFilterDecorator->getMaxValidator()->getValue());\n $this->assertEquals('VALUE_TOO_GREAT', $rangeFilterDecorator->getMaxErrorId());\n $this->assertSame($this->mockFilter, $rangeFilterDecorator->getDecoratedFilter());\n }", "public static function getEnvironment($file, $line, $range)\n {\n $result = [];\n $buffer = file($file, FILE_IGNORE_NEW_LINES);\n if ($buffer !== false) {\n // We're shifting the ordinal number by one to make it the same as the line number\n array_unshift($buffer, null);\n unset($buffer[0]);\n $result = array_slice($buffer, max(0, $line - $range - 1), 2 * $range + 1, true);\n }\n\n return $result;\n }", "protected static function getLines($buffer) { \r\n $lines = preg_split(\"/\\r?\\n|\\r/\", $buffer);\r\n return $lines;\r\n }", "public static function _lines($value, $field, $min_lines, $max_lines) {\n\t\t$num_lines = substr_count($value, \"\\n\") + 1;\n\t\treturn $num_lines >= $min_lines && $num_lines <= $max_lines;\n\t}", "public function filterByLevel($level) : self\n {\n $this->buffer = array_filter($this->buffer, function(LogMessage $msg) use($level){\n return $msg->getLevel() === $level;\n });\n\n return $this;\n }", "function apply_filter_range2runs ($range, $logbook_in) {\r\n\r\n $out = array() ;\r\n\r\n $min_runnum = null ;\r\n $max_runnum = null ;\r\n \r\n foreach ($logbook_in as $run) {\r\n $runum = $run->num() ;\r\n $min_runnum = $min_runnum ? min(array($min_runnum, $runum)) : $runum;\r\n $max_runnum = $max_runnum ? max(array($max_runnum, $runum)) : $runum;\r\n }\r\n \r\n /* Proceed to teh filter only if the input list of runs isn't empty */\r\n\r\n if ($min_runnum && $max_runnum) {\r\n\r\n /* Translate the range into a dictionary of runs. This is going to be\r\n * our filter. Run numbers will be the keys. And each key will have True\r\n * as the corresponding value. */ \r\n\r\n $runs2allow = array() ;\r\n foreach (explode(',', $range) as $subrange) {\r\n\r\n /* Check if this is just a number or a subrange: <begin>-<end>\r\n */\r\n $pair = explode('-', $subrange) ;\r\n switch (count($pair)) {\r\n case 1:\r\n $runs2allow[$pair[0]] = True;\r\n break;\r\n case 2:\r\n $begin_run = $min_runnum;\r\n if ($pair[0]) {\r\n $begin_run = intval($pair[0]) ;\r\n if (!$begin_run) throw new DataPortalexception(__METHOD__, \"illegal run '\".$pair[0].\"' subrange: '\".$subrange.\"'\") ;\r\n }\r\n $end_run = $max_runnum;\r\n if ($pair[1]) {\r\n $end_run = intval($pair[1]) ;\r\n if (!$end_run) throw new DataPortalexception(__METHOD__, \"illegal run '\".$pair[1].\"' subrange: '\".$subrange.\"'\") ;\r\n }\r\n if ($begin_run >= $end_run) throw new DataPortalexception(__METHOD__, \"illegal subrange: '\".$subrange.\"'\") ;\r\n if ($begin_run < $min_runnum) throw new DataPortalexception(__METHOD__, \"non-existing begin run in subrange: '\".$subrange.\"'\") ;\r\n if ($end_run > $max_runnum) throw new DataPortalexception(__METHOD__, \"non-existing end run in subrange: '\".$subrange.\"'\") ;\r\n\r\n for ($run = $begin_run; $run <= $end_run; $run++)\r\n $runs2allow[$run] = True;\r\n break;\r\n default:\r\n throw new DataPortalexception(\r\n __METHOD__, 'illegal syntax of the runs range') ;\r\n }\r\n }\r\n\r\n /* Apply the filter */\r\n\r\n foreach ($logbook_in as $run) {\r\n $runum = $run->num() ;\r\n if (array_key_exists($runum, $runs2allow))\r\n array_push($out, $run) ;\r\n }\r\n }\r\n return $out;\r\n }", "public function replace(LineRange $range, array $newLines);", "public function testComAdobeCqDamCfmImplContentRewriterParRangeFilter() {\n\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns an optional with the given $object. If $object is null, throws an InvalidArgumentException.
public static function of(object $object): Optional { if(is_null($object)) { throw new \InvalidArgumentException("Given object cannot be null"); } return new Optional($object); }
[ "public static function ensureIsNotNull($obj)\n {\n if (is_null($obj)) {\n $msg = msg('Provided object must not be NULL.');\n throw new InvalidArgumentException($msg);\n }\n\n return $obj;\n }", "function optional($value): Optional\n{\n return Optional::ofNullable($value);\n}", "public function get_object( $object ) {\r\n\r\n\t\tif( ! class_exists( $this->query_object_type ) )\r\n\t\t\treturn null;\r\n\r\n\t\tif( $object instanceof $this->query_object_type )\r\n\t\t\t$_object = $object;\r\n\r\n\t\telseif( is_object( $object ) )\r\n\t\t\t$_object = new $this->query_object_type( $object );\r\n\r\n\t\telse {\r\n\r\n\t\t\t$object = $this->get( $object );\r\n\r\n\t\t\tif( is_null( $object ) )\r\n\t\t\t\t$_object = null;\r\n\t\t\telse\r\n\t\t\t\t$_object = new $this->query_object_type( $object );\r\n\r\n\t\t}\r\n\t\t\r\n\t\treturn $_object;\r\n\r\n\t}", "public function getOneFromObject($object);", "public function publicMethodWithNullableObjectReturn(): ?object\n {\n return $this->publicNullableObject;\n }", "function object_get($object, $property, $default = null, $force = false){\n\tif(is_object($object)){\n\n\t\t// is $object a subclass of Eloquent?\n\t\t(is_subclass_of($object, 'Laravel\\Database\\Eloquent\\Model')) ? $eloquent=true : $eloquent=false;\n\t\t\n\t\t//will be supressed in eloquent case, no need to complicate things\n\t\tif(property_exists($object, $property) || $force){\n\t\t\t$value = (!$force) ? $object->$property : @$object->$property;\n\t\t\tif($value == null && $force){\n\t\t\t\treturn $default;\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn $value;\n\t\t\t}\n\t\t}\n\t\tif($eloquent){\n\t\t\t$value = $object->$property;\n\t\t\t/*if($value==null && method_exists($object, $property)){\n\t\t\t\treturn call_user_func(array($object, $property));\n\t\t\t}*/\n\t\t\treturn ( $value != null ) ? $value : $default;\n\t\t}\n\t\tif(method_exists($object, $property)){\n\t\t\treturn call_user_func(array($object, $property));\n\t\t}\n\t}\n\treturn $default;\n}", "protected function nullable(Generic $o= null) { return $o; }", "public function optional();", "public static function createFromObject(?\\stdClass $data): ?ShippingOption\n {\n if (is_null($data)) {\n return null;\n }\n $object = new ShippingOption(\n $data->id,\n $data->title,\n LabeledPrice::createFromObjectList($data->prices)\n );\n\n\n return $object;\n }", "public function equals(Optional $object)\n {\n return $object instanceof None;\n }", "public function createHelper($object)\n {\n $class = get_class($object);\n\n switch ($class) {\n case AuraRequest::class:\n return new RequestHelper($object);\n case AuraRequest\\Content::class:\n return new RequestContentHelper($object);\n case AuraRequest\\Headers::class:\n return new RequestHeadersHelper($object);\n case AuraRequest\\Method::class:\n return new RequestMethodHelper($object);\n case AuraRequest\\Url::class:\n return new RequestUrlHelper($object);\n case AuraResponse::class:\n return new ResponseHelper($object);\n case AuraResponse\\Headers::class:\n return new ResponseHeadersHelper($object);\n case AuraResponse\\Status::class:\n return new ResponseStatusHelper($object);\n default:\n throw new InvalidArgumentException('unsupported object');\n }\n }", "public function __getObject__($object)\r\n {\r\n $base_type = $this->__getType__($object);\r\n if (isset($this->_objects[$base_type]))\r\n {\r\n return $this->_objects[$base_type];\r\n }\r\n\r\n $derived_type = $this->_getDerivedTypes($base_type);\r\n $this->_derived_types[$derived_type] = $base_type;\r\n\r\n if (isset($this->_objects[$derived_type]))\r\n {\r\n $this->_objects[$base_type] =& $this->_objects[$derived_type];\r\n return $this->_objects[$derived_type];\r\n }\r\n\r\n $type_name = $base_type;\r\n if ($base_type === 'NULL')\r\n {\r\n $type_name = self::PROTOCOL_NULL;\r\n }\r\n if ($base_type === 'double')\r\n {\r\n $type_name = self::PROTOCOL_FLOAT;\r\n } \r\n throw new \\BadMethodCallException(\"The type '{$type_name}' has not been extended for protocol '{$this->_interface}'\"); \r\n }", "function object_get($object, $key, $default = null)\n {\n if (is_null($key) || trim($key) == '') {\n return $object;\n }\n\n foreach (explode('.', $key) as $segment) {\n if (! is_object($object) || ! isset($object->{$segment})) {\n return value($default);\n }\n\n $object = $object->{$segment};\n }\n\n return $object;\n }", "function object_get($object, $key, $default = null)\n {\n if (is_null($key) || trim($key) == '') {\n return $object;\n }\n\n foreach (explode('.', $key) as $segment) {\n if (!is_object($object) || !isset($object->{$segment})) {\n return value($default);\n }\n\n $object = $object->{$segment};\n }\n\n return $object;\n }", "function getf(&$object, $key=null) {\n if (is_object($object)) {\n return $object->$key;\n } elseif (is_array($object) and isset($object[$key])) {\n return $object[$key];\n } else {\n return null;\n }\n }", "function object_get($object, $key, $default = null)\n {\n if (is_null($key) || trim($key) == '') {\n return $object;\n }\n\n foreach (explode('.', $key) as $segment) {\n if (!is_object($object) || !isset($object->{$segment})) {\n return $default;\n }\n\n $object = $object->{$segment};\n }\n\n return $object;\n }", "public static function assertObject($object) {\n\t\tif (! is_object ( $object )) {\n\t\t\treturn self::throwException ( 'object' , $object);\n\t\t}\n\t}", "public static function catchHelper(&$object) {\n\t\t$class = get_class($object);\n\t\tif(isset(self::$objectNames[$class])) {\n\t\t\t$object = new Helper($object, self::$objectNames[$class]);\n\t\t\treturn;\n\t\t}\n\t\treturn null;\n\t}", "public static function fetch($object, $element, $default)\n {\n if (is_array($object)) {\n $return = (isset($object[$element])) ? $object[$element] : $default;\n } elseif (is_object($object)) {\n $return = (isset($object->$element)) ? $object->$element : $default;\n } else {\n $return = $default;\n }\n return $return;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Flags that show the intended use for the key.
public function getKeyUsageFlags() { return ipworksencrypt_keymgr_get($this->handle, 15 ); }
[ "public function hasKeyUsage(): bool\n {\n return $this->has(Ext\\Extension::OID_KEY_USAGE);\n }", "protected function set_use_key() {\n\t\t$this->use_key = false;\n\t}", "protected function set_use_key() {\n\t\t$this->use_key = true;\n\t}", "final public function areKeysUsed()\r\n\t{\r\n\t\treturn $this->useKeys;\r\n\t}", "public function hasExtendedKeyUsage(): bool\n {\n return $this->has(Ext\\Extension::OID_EXT_KEY_USAGE);\n }", "public function getUseFlags() {\n\t\t\treturn array_keys($this->arrUseFlags($this->getTree().\"/profiles/use.desc\"));\n\t\t}", "public function setKeyUsage($val)\n {\n $this->_propDict[\"keyUsage\"] = $val;\n return $this;\n }", "public function getExtendedKeyUsages()\n {\n if (array_key_exists(\"extendedKeyUsages\", $this->_propDict)) {\n return $this->_propDict[\"extendedKeyUsages\"];\n } else {\n return null;\n }\n }", "public function keysOnlyUsedDuringCreation()\n {\n \treturn $this->keysOnlyUsedDuringCreation;\n }", "static function option_key(): string { return 'acyear'; }", "public static function isKeyMandatory();", "public function isShowKeys()\n {\n return $this->showKeys;\n }", "public function getUseFlg()\n {\n return $this->use_flg;\n }", "public function isPossibleKey() {\n return !$this->getDynamicBase()\n && !in_array($this->getType(), array('boolean', 'date', 'text'))\n && $this->isStored()\n && !$this->isMultivalued();\n }", "public static function hackKeys(){\n if(self::$requiresDone) return;\n self::$publicAuthKeys = true;\n }", "public function allowed_setting_keys($key)\n {\n }", "public function getShortKey(): string\n {\n return substr($this->key, 0, 10);\n }", "public function getShortKey(): string\n {\n return substr($this->key, 0, 4);\n }", "public function display_option_client_key() {\n $client_key = $this->options['client_key'];\n $this->display_input_text_field('client_key', $client_key);\n?>\nThe key that the server requires for authentication, passed in the <code><?php esc_attr_e($this->plugin->query_var()); ?></code> parameter.\n<?php\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests store a newly created user in storage.
public function testStore() { // User without permissions $route = route('api.user.store'); $this->assertRejectsUnauthorizedAccessToRoute($route, 'post', 'api'); // User with permissions $user = $this->createUser(['permissions' => ['use-access-module', 'user-create']]); $this->actingAs($user, 'api'); // Test with incomplete data $response = $this->post($route); $response->assertStatus(422); $response->assertJsonValidationErrors(['name']); // Test with complete data $data = factory(User::class)->raw(['role' => $this->createUser()->getRole()->getId()]); $response = $this->post($route, $data); $response->assertStatus(201); $response->assertJsonStructure(['id', 'created']); $response->assertJson(['created' => true]); }
[ "public function testShouldStoreANewUserInTheDatabase()\n {\n $this->post('/api/v1/users/signup', [\n 'firstname' => 'Adebola',\n 'lastname' => 'Akinlabi',\n 'email' => 'adebola.akinlabi@gmail.com',\n 'password' => '1234'\n ]);\n\n // dd($res);\n $this\n ->seeStatusCode(201)\n ->seeJson(['status' => 'success'])\n ->seeInDatabase('users',['email' => 'adebola.akinlabi@gmail.com']);\n\n }", "public function testAdministrator_is_able_to_store_users_success()\n {\n $user = factory(\\App\\User::class)->create();\n $this->actingAs($user)\n ->visit('/users/create')\n ->type('Foo', 'name')\n ->type('foo@mail.com', 'email')\n ->type('secret', 'password')\n ->type('secret', 'password_confirmation')\n ->type('Dilo Malang', 'address')\n ->type('08771623', 'phone')\n ->press('Submit')\n ->seeInDatabase('users', ['name' => 'Foo', 'email' => 'foo@mail.com'])\n ->see('Data has been saved successfully');\n }", "public function testSaveUser()\n {\n\t\t$user = $this->userService->saveUser('test');\n\t\t$this->assertEquals('test', $user->name);\n\t\t$this->assertEquals('',false);\n }", "public function test_if_store_method_can_assert_data_with_correctly_attributes() {\n $user = $this->getFakerUser();\n\n $this->postJson('/api/v1/users', $user);\n\n $this->assertDatabaseHas('users', [\n 'name' => $user['name'],\n 'email' => $user['email'],\n 'CPF' => $user['CPF'],\n 'birthday' => $user['birthday'],\n ]);\n }", "public function testStore()\n {\n // as guest\n {\n $response = $this->post(\n route('todos.store')\n );\n\n $response->assertRedirect(\n route('login')\n );\n }\n\n // as connected user\n {\n $response = $this->actingAs(\n $this->someone_who_does\n )->post(\n route('todos.store'), [\n '_token' => csrf_token(),\n 'title' => 'foo',\n 'content' => 'bar'\n ]\n );\n\n $stored = Todo::orderBy('id', 'desc')->first();\n\n $response->assertRedirect(\n route('todos.show', [$stored])\n );\n\n $this->assertDatabaseHas('todos', [\n 'id' => $stored->id\n ]);\n\n ($deleted = $stored)->forceDelete();\n\n $this->assertDatabaseMissing('todos', [\n 'id' => $deleted->id\n ]);\n }\n }", "public function a_new_user_can_be_created(): void\n {\n $this->assertInstanceOf(\n User::class,\n $user = app(UserFactory::class)->create()\n );\n\n $this->assertDatabaseHas('users', [\n 'id' => $user->id,\n ]);\n }", "public function testCreate()\n {\n TestUtil::setupCassette('users/create.yml');\n\n $user = self::$client->user->create([\n 'name' => 'Test User',\n ]);\n\n $this->assertInstanceOf(User::class, $user);\n $this->assertStringMatchesFormat('user_%s', $user->id);\n $this->assertEquals('Test User', $user->name);\n\n // Delete the user once done so we don't pollute with hundreds of child users\n self::$client->user->delete($user->id);\n }", "public function test_user_was_made()\n {\n $user = User::factory()->create();\n $this->assertTrue($user->id != 0);\n }", "public function test_creating_a_new_user()\n {\n $response = $this->postUser();\n\n $response\n ->assertStatus(201)\n ->assertJson([\n 'message' => 'Usuário criado com sucesso!',\n 'data' => [\n 'type' => 0,\n 'name' => 'John Doe',\n 'cpf_cnpj' => '12345678901',\n 'email' => 'john.doe@email.com',\n ]\n ]);\n }", "protected function storeUser()\n {\n $this->repo->store($this->user);\n $this->flush();\n }", "public function testSaveUser()\n {\n $user = new User();\n $user->setAttributes(['username' => 'bob','auth_key' => 'hdsjhfdjskafffas','password_hash' => 'hdksajhfjksahfash','created_at' => '1273828282','updated_at' => '1273828282','status' => '10','email' => 'bob@gmail.com']);\n $user->save(false);\n $this->assertEquals('bob',$user->getAttribute('username'));\n $this->assertEquals('hdsjhfdjskafffas',$user->getAttribute('auth_key'));\n $this->assertEquals('hdksajhfjksahfash',$user->getAttribute('password_hash'));\n $this->assertEquals('1273828282',$user->getAttribute('created_at'));\n $this->assertEquals('1273828282',$user->getAttribute('updated_at'));\n $this->assertEquals('1273828282',$user->getAttribute('updated_at'));\n $this->assertEquals('10',$user->getAttribute('status'));\n $this->assertEquals('bob@gmail.com',$user->getAttribute('email'));\n $this->tester->canSeeRecord('frontend\\models\\User',array('username'=>'bob','auth_key' => 'hdsjhfdjskafffas','password_hash' => 'hdksajhfjksahfash','created_at' => '1273828282','updated_at' => '1273828282','status' => '10','email' => 'bob@gmail.com'));\n }", "public function testIsNewUserInDatabase()\n {\n\n $this->seeInDatabase('users', ['email' => 'mt@email.com']);\n }", "private function create_test_user() {\n global $CFG;\n require_once($CFG->dirroot.'/elis/program/lib/data/user.class.php');\n\n $user = new user(array(\n 'username' => 'testuserusername',\n 'email' => 'testuser@email.com',\n 'idnumber' => 'testuseridnumber',\n 'firstname' => 'testuserfirstname',\n 'lastname' => 'testuserlastname',\n 'country' => 'CA'\n ));\n $user->save();\n }", "public function testCreateUser() {\n\t\t$user = $this->createUser();\n\n\t\t$this->actingAs($user)\n\t\t\t->get('/api/v1/authenticate')\n\t\t\t->receiveJson()\n\t\t\t->seeJsonStructure([\n\t\t\t\t'user' => [\n\t\t\t\t\t'id',\n\t\t\t\t\t'email',\n\t\t\t\t\t'first_name',\n\t\t\t\t\t'last_name',\n\t\t\t\t\t'created_at',\n\t\t\t\t\t'updated_at',\n\t\t\t\t],\n\t\t\t]);\n\t}", "public function store()\n {\n $user = new User;\n\n return $this->saveUser($user);\n }", "public function create_test_user()\n {\n DB::table('users')->insert([\n 'name' => 'Cypress Test',\n 'email' => 'test@cypress.dev',\n 'password' => bcrypt('test'),\n ]);\n }", "public function testAddNewUserEx() {\n\n try {\n $newUser = new User();\n $newUser->setUserId(1);\n $newUser->setLoginName('testuser1');\n $newUser->setPassword(md5('password123'));\n $newUser->setUserTypeId(1);\n\n $userCreated = $this->userManagementDao->addUser($newUser);\n } catch (Exception $ex) {\n return;\n }\n $this->fail('An expected exception has not been raised.');\n }", "public function testStoreSuccess()\n {\n [$owner, $reporter] = User::factory(2)->create();\n\n // POST data\n $data = [\n 'owner_id' => $owner->id,\n 'reporter_id' => $reporter->id,\n 'title' => $this->faker->text(30),\n 'description' => $this->faker->text(500),\n ];\n\n // Create the task\n $nextId = $this->postJson('api/tasks', $data)\n ->assertStatus(200)\n ->assertJsonStructure(['id'])\n ->json('id');\n\n // Get created task\n $task = Task::find($nextId);\n\n // Check database\n $this->assertDatabaseHas(app(Task::class)->getTable(), $task->only([\n 'owner_id',\n 'reporter_id',\n 'title',\n 'description',\n ]));\n }", "public function test_create_wallet_as_user()\n {\n $user = User::factory()->create();\n\n $response = $this->actingAs($user)\n ->post(route('api.wallets.store'), [\n 'name' => 'My wallet 1',\n 'is_active' => true\n ]);\n\n $response->assertStatus(201)\n ->assertJsonStructure([\n 'data' => [\n 'id',\n 'name',\n 'balance',\n 'is_active',\n 'created_at',\n 'updated_at'\n ]\n ]);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check for single, "toggle" calendars and set display lists and session values appropriately.
protected function _checkToggleCalendars() { global $prefs, $registry; if (($calId = Horde_Util::getFormData('toggle_calendar')) !== null) { if (strncmp($calId, 'remote_', 7) === 0) { $calId = substr($calId, 7); if (($key = array_search($calId, $this->_displayRemote)) === false) { $this->_displayRemote[] = $calId; } else { unset($this->_displayRemote[$key]); } $prefs->setValue('display_remote_cals', serialize($this->_displayRemote)); } elseif ((strncmp($calId, 'external_', 9) === 0 && ($calId = substr($calId, 9))) || (strncmp($calId, 'tasklists_', 10) === 0 && ($calId = substr($calId, 10)))) { if (($key = array_search($calId, $this->_displayExternal)) === false) { $this->_displayExternal[] = $calId; } else { unset($this->_displayExternal[$key]); } $prefs->setValue('display_external_cals', serialize($this->_displayExternal)); if (strpos($calId, 'tasks/') === 0) { $tasklists = array(); foreach ($this->_displayExternal as $id) { if (strpos($id, 'tasks/') === 0) { $tasklists[] = substr($id, 6); } } try { $registry->tasks->setDisplayedTasklists($tasklists); } catch (Horde_Exception $e) {} } } elseif (strncmp($calId, 'holiday_', 8) === 0) { $calId = substr($calId, 8); if (($key = array_search($calId, $this->_displayHolidaysInternal)) === false) { $this->_displayHolidaysInternal[] = $calId; } else { unset($this->_displayHolidaysInternal[$key]); } $prefs->setValue('holiday_drivers', serialize($this->_displayHolidaysInternal)); } elseif (strncmp($calId, 'resource_', 9) === 0) { $calId = substr($calId, 9); if (($key = array_search($calId, $this->_displayResource)) === false) { $this->_displayResource[] = $calId; } else { unset($this->_displayResource[$key]); } $prefs->setValue('display_resource_cals', serialize($this->_displayResource)); } elseif (($key = array_search($calId, $this->_displayCalendars)) === false) { $this->_displayCalendars[] = $calId; } else { unset($this->_displayCalendars[$key]); } $prefs->setValue('display_cals', serialize($this->_displayCalendars)); } }
[ "public function initCheckedCalendars() {\n\t\t$user = User::model()->findByPk(Yii::app()->user->getId());\n\t\tif($user->showCalendars == null) { // calendar list not initialized?\n\t\t\t$showCalendars = array(\n\t\t\t\t'userCalendars'=>array('Anyone', $user->username), \n\t\t\t\t'groupCalendars'=>array(),\n\t\t\t\t'sharedCalendars'=>array(),\n\t\t\t\t'googleCalendars'=>array()\n\t\t\t);\n\t\t\t$user->showCalendars = json_encode($showCalendars);\n\t\t\t\n\t\t\t$user->update();\n\t\t}\n\t}", "function procShowCalendar() {\n\t\tglobal $session, $form;\n\t\t$_SESSION[ 'showmonth'] = $_POST[ 'showmonth'];\n\t\t$_SESSION[ 'showyear'] = $_POST[ 'showyear'];\n\t\t$_SESSION[ 'subshowcal'] = $_POST[ 'subshowcal'];\n\t\t$_SESSION[ 'value_array'] = $_POST;\n\t\t$_SESSION[ 'error_array'] = $form->getErrorArray();\n\t\theader(\"Location: \".$session->referrer.\"?page=\".$session->page);\n\t}", "public function setDisplayCalendar($value) {\n $this->displayCalendar = $value;\n }", "function display_calendar ()\n\t\t{\t\n\t\t\tif (!$this->authentication->logged_in (\"admin\"))\n\t\t\t\tredirect(\"admin\");\n\t\t\t\n\t\t\t//calls DML for processing data\n\t\t\tif($_POST)\n\t\t\t\t$this->_dbEventProcessor();\n\t\t\t\n\t\t\t//gets the region and subregion for filter purpose\n\t\t\t$this->_get_regions_subregions();\n\t\t\t\n\t\t\t// gets the calendar (month || year)\n\t\t\tif(isset($_POST['hdnTimeid']) && $_POST['hdnTimeid']!=0)\n\t\t\t\t$time = $_POST['hdnTimeid'];\n\t\t\telse \n\t\t\t\t$time = strtotime('-8 hour');\n\t\t\t\n\t\t\t$this->gen_contents['sec_timing'] = $time;\n\t\t\t\n\t\t\t$_POST['sltSearchRegion'] = '';\n\t\t\t$_POST['sltSearchSubregion'] = '';\n\t\t\t//selected search options are saved to a variable\n\t\t\tif($_POST){\n\t\t\t\t$this->gen_contents['region_search'] \t= $_POST['sltSearchRegion'];\n\t\t\t\t$this->gen_contents['subregion_search'] = $_POST['sltSearchSubregion'];\n\t\t\t}\n\t\t\t\n\t\t\t//helps to change the mode of calendar by choosing the link from subregion list out \n\t\t\tif($this->session->userdata('CLASS')){\n\t\t\t\t$this->gen_contents['class_mode'] \t= 1;\n\t\t\t\t$this->gen_contents['title']\t\t= 'Class Management';\n\t\t\t\t$this->gen_contents['page_title']\t= 'Class Management';\n\t\t\t}\n\t\t\t\t\n\t\t\t// we call _date function to get all the details of calendar n its event\n\t\t\t$this->gen_contents = array_merge($this->gen_contents,$this->_date($time));\n\t\t\t\n\t\t\t//default listing events for the current date\n\t\t\t//'hdnCurrentDate' field stores the date fo today onload\n\t\t\t//once a date is choosen to list the events or for adding the hidden filed will contain that date\n\t\t\t//after traversing the calendar and when returned back to the current month default listing should be provided\n\t\t\tif(isset($_POST['hdnCurrentDate'])){\n\t\t\t\t$this->gen_contents['hdnCurrentDate'] \t= date('Y/m/d',strtotime($_POST['hdnCurrentDate'])); \n\t\t\t\t\n\t\t\t\tif(($this->gen_contents['actual_month_year'] == $this->gen_contents['current_month_year']) && $_POST['hdnCurrentDate'] == ''){\n\t\t\t\t\t$this->gen_contents['hdnCurrentDate'] \t= $this->gen_contents['today'];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$this->_template('display_calendar',$this->gen_contents);\n\t\t}", "function DisplayCalendarOfEvents()\r\n\t{\r\n\t\tglobal $_SETTINGS;\r\n\t\techo \"<div id='calendar'></div>\";\t\r\n\t}", "public function calendars()\n\t{\n\t\t// -------------------------------------\n\t\t// Load 'em up\n\t\t// -------------------------------------\n\n\t\t$this->load_calendar_datetime();\n\t\t$this->load_calendar_parameters();\n\n\t\t// -------------------------------------\n\t\t// Prep the parameters\n\t\t// -------------------------------------\n\n\t\t$params = array(\n\t\t\tarray(\n\t\t\t\t'name' => 'category',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'string',\n\t\t\t\t'multi' => TRUE\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'site_id',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'integer',\n\t\t\t\t'min_value' => 1,\n\t\t\t\t'multi' => TRUE,\n\t\t\t\t'default' => $this->data->get_site_id()\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'calendar_id',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'integer',\n\t\t\t\t'min_value' => 1,\n\t\t\t\t'multi' => TRUE,\n\t\t\t\t'not' => TRUE\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'calendar_name',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'string',\n\t\t\t\t'multi' => TRUE,\n\t\t\t\t'not' => TRUE\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'status',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'string',\n\t\t\t\t'multi' => TRUE,\n\t\t\t\t'default' => 'open'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'date_range_start',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'date'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'date_range_end',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'date'\n\t\t\t)\n\t\t);\n\n\t\t//ee()->TMPL->log_item('Calendar: Processing parameters');\n\n\t\t$this->add_parameters($params);\n\n\t\t// -------------------------------------\n\t\t// Convert calendar_name to calendar_id\n\t\t// -------------------------------------\n\n\t\tif ($this->P->value('calendar_id') == '' AND\n\t\t\t$this->P->value('calendar_name') != '')\n\t\t{\n\t\t\t$ids = $this->data->get_calendar_id_from_name(\n\t\t\t\t$this->P->value('calendar_name'),\n\t\t\t\tNULL,\n\t\t\t\t$this->P->params['calendar_name']['details']['not']\n\t\t\t);\n\n\t\t\tif ( empty( $ids ) )\n\t\t\t{\n\t\t\t\t//ee()->TMPL->log_item('Calendar: No results for\n\t\t\t\t//calendar name provided, bailing');\n\t\t\t\treturn $this->no_results();\n\t\t\t}\n\n\t\t\t$this->P->set('calendar_id', implode('|', $ids));\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// Determine which calendars this user has permission to view\n\t\t// and modify the parameters accordingly.\n\t\t// -------------------------------------\n\n\t\t// TODO\n\n\t\t// -------------------------------------\n\t\t// Fetch the basics\n\t\t// -------------------------------------\n\n\t\t$data = $this->data->fetch_calendars_basics(\n\t\t\t$this->P->value('site_id'),\n\t\t\t$this->P->value('calendar_id'),\n\t\t\t$this->P->params['calendar_id']['details']['not']\n\t\t);\n\n\t\t// -------------------------------------\n\t\t// If no data, then give 'em no_results\n\t\t// -------------------------------------\n\n\t\tif (($total_results = count($data)) == 0)\n\t\t{\n\t\t\t//ee()->TMPL->log_item('Calendar: No results, bailing');\n\t\t\treturn $this->no_results();\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// Ensure date_range_start <= date_range_end\n\t\t// -------------------------------------\n\n\t\tif ($this->P->value('date_range_start') !== FALSE AND\n\t\t\t$this->P->value('date_range_end') !== FALSE)\n\t\t{\n\t\t\tif ($this->P->value('date_range_start', 'ymd') > $this->P->value('date_range_end', 'ymd'))\n\t\t\t{\n\t\t\t\t$temp = $this->P->params['date_range_start']['value'];\n\t\t\t\t$this->P->set('date_range_start', $this->P->params['date_range_end']['value']);\n\t\t\t\t$this->P->set('date_range_end', $temp);\n\t\t\t\tunset($temp);\n\t\t\t}\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// This will come in handy later\n\t\t// -------------------------------------\n\n\t\t$calendar_array = array();\n\t\tforeach ($data as $k => $arr)\n\t\t{\n\t\t\t$calendar_array[] = $arr['calendar_id'];\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// Date range params? Then we need to do a lot more work.\n\t\t// -------------------------------------\n\n\t\tif ($this->P->value('date_range_start') !== FALSE OR\n\t\t\t$this->P->value('date_range_end') !== FALSE)\n\t\t{\n\t\t\t//ee()->TMPL->log_item('Calendar: Calculating date ranges');\n\t\t\t$min = ($this->P->value('date_range_start') !== FALSE) ?\n\t\t\t\t\t\t$this->P->value('date_range_start', 'ymd') :\n\t\t\t\t\t\t0;\n\n\t\t\t$max = ($this->P->value('date_range_end') !== FALSE) ?\n\t\t\t\t$this->P->value('date_range_end', 'ymd') :\n\t\t\t\t0;\n\n\t\t\t$calendar_array = $this->data->fetch_calendars_with_events_in_date_range(\n\t\t\t\t$min,\n\t\t\t\t$max,\n\t\t\t\t$calendar_array,\n\t\t\t\t$this->P->value('status')\n\t\t\t);\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// No calendars? No results.\n\t\t// -------------------------------------\n\n\t\tif (empty($calendar_array))\n\t\t{\n//ee()->TMPL->log_item('Calendar: No calendars, bailing');\n\t\t\treturn $this->no_results();\n\t\t}\n\n\t\t//\t----------------------------------------\n\t\t//\tInvoke Channel class\n\t\t//\t----------------------------------------\n\n\t\tif ( ! class_exists('Channel') )\n\t\t{\n\t\t\trequire PATH_MOD.'/channel/mod.channel.php';\n\t\t}\n\n\t\t$channel = new Channel();\n\n\t\t//need to remove limit here so huge amounts of events work\n\t\t$channel->limit = 1000000;\n\n\t\t// --------------------------------------------\n\t\t// Invoke Pagination for EE 2.4 and Above\n\t\t// --------------------------------------------\n\n\t\t$channel = $this->add_pag_to_channel($channel);\n\n\t\t// -------------------------------------\n\t\t// Prepare parameters\n\t\t// -------------------------------------\n\n\t\tee()->TMPL->tagparams['entry_id'] = implode('|', $calendar_array);\n\t\tee()->TMPL->tagparams['channel'] = CALENDAR_CALENDARS_CHANNEL_NAME;\n\n\t\t// -------------------------------------\n\t\t// Pre-process related data\n\t\t// -------------------------------------\n\n\t\tif (version_compare($this->ee_version, '2.6.0', '<'))\n\t\t{\n\n\t\t\tee()->TMPL->tagdata = ee()->TMPL->assign_relationship_data(\n\t\t\t\tee()->TMPL->tagdata\n\t\t\t);\n\t\t\tee()->TMPL->var_single = array_merge(\n\t\t\t\tee()->TMPL->var_single,\n\t\t\t\tee()->TMPL->related_markers\n\t\t\t);\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// Execute needed methods\n\t\t// -------------------------------------\n\n\t\t$channel->fetch_custom_channel_fields();\n\n\t\t$channel->fetch_custom_member_fields();\n\n\t\t// --------------------------------------------\n\t\t// Pagination Tags Parsed Out\n\t\t// --------------------------------------------\n\n\t\t$this->fetch_pagination_data($channel);\n\n\t\t// -------------------------------------\n\t\t// Querification\n\t\t// -------------------------------------\n\n\t\t$channel->build_sql_query();\n\n\t\tif ($channel->sql == '')\n\t\t{\n\t\t\treturn $this->no_results();\n\t\t}\n\n\t\t$channel->query = ee()->db->query($channel->sql);\n\n\t\tif ($channel->query->num_rows() == 0)\n\t\t{\n//ee()->TMPL->log_item('Calendar: Channel module says no results, bailing');\n\t\t\treturn $this->no_results();\n\t\t}\n\n\t\t$channel->query->result\t= $channel->query->result_array();\n\n\t\t// -------------------------------------------\n\t\t// 'calendar_calendars_channel_query' hook.\n\t\t// - Do something with the channel query\n\n\t\tif (ee()->extensions->active_hook('calendar_calendars_channel_query') === TRUE)\n\t\t{\n\t\t\t$channel->query = ee()->extensions->call('calendar_calendars_channel_query', $channel->query, $calendar_array);\n\t\t\tif (ee()->extensions->end_script === TRUE) return;\n\t\t}\n\t\t//\n\t\t// -------------------------------------------\n\n\t\t// -------------------------------------\n\t\t// Inject Calendar-specific variables\n\t\t// -------------------------------------\n\n\t\t//ee()->TMPL->log_item('Calendar: Adding Calendar variables');\n\n\t\t$aliases = array(\n\t\t\t'title'\t\t\t=> 'calendar_title',\n\t\t\t'url_title'\t\t=> 'calendar_url_title',\n\t\t\t'entry_id'\t\t=> 'calendar_id',\n\t\t\t'author_id'\t\t=> 'calendar_author_id',\n\t\t\t'author'\t\t=> 'calendar_author',\n\t\t\t'status'\t\t=> 'calendar_status'\n\t\t);\n\n\t\t//custom variables with the letters 'url' are borked in\n\t\t//EE 2.6. Bug reported, but this should fix.\n\t\t//https://support.ellislab.com/bugs/detail/19337\n\t\tif (version_compare($this->ee_version, '2.6.0', '>='))\n\t\t{\n\t\t\t$aliases['url_title'] = 'calendar_borked_title';\n\n\t\t\tee()->TMPL->var_single['calendar_borked_title'] = 'calendar_borked_title';\n\n\t\t\tunset(ee()->TMPL->var_single['calendar_url_title']);\n\n\t\t\tee()->TMPL->tagdata = str_replace(\n\t\t\t\tarray(\n\t\t\t\t\tLD . 'calendar_url_title' . RD,\n\t\t\t\t\t'\"calendar_url_title\"',\n\t\t\t\t\t\"'calendar_url_title'\"\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\tLD . 'calendar_borked_title' . RD,\n\t\t\t\t\t'\"calendar_borked_title\"',\n\t\t\t\t\t\"'calendar_borked_title'\"\n\n\t\t\t\t),\n\t\t\t\tee()->TMPL->tagdata\n\t\t\t);\n\t\t}\n\n\t\tforeach ($channel->query->result as $k => $row)\n\t\t{\n\t\t\t$channel->query->result[$k]['author'] = ($row['screen_name'] != '') ?\n\t\t\t\t\t\t\t\t\t\t$row['screen_name'] : $row['username'];\n\n\t\t\tforeach ($aliases as $old => $new)\n\t\t\t{\n\t\t\t\t$channel->query->result[$k][$new] = $channel->query->result[$k][$old];\n\t\t\t}\n\t\t}\n\n\t\t//\t----------------------------------------\n\t\t//\tRedeclare\n\t\t//\t----------------------------------------\n\t\t//\tWe will reassign the $channel->query->result with our\n\t\t//\treordered array of values.\n\t\t//\t----------------------------------------\n\n\t\t$channel->query->result_array = $channel->query->result;\n\n\t\t// --------------------------------------------\n\t\t// Typography\n\t\t// --------------------------------------------\n\n\t\tee()->load->library('typography');\n\t\tee()->typography->initialize();\n\t\tee()->typography->convert_curly = FALSE;\n\n\t\t$channel->fetch_categories();\n\n\t\t// -------------------------------------\n\t\t// Parse\n\t\t// -------------------------------------\n\n\t\t//ee()->TMPL->log_item('Calendar: Parsing, via channel module');\n\n\n\n\t\t$channel->parse_channel_entries();\n\n\t\t// -------------------------------------\n\t\t// Paginate\n\t\t// -------------------------------------\n\n\t\t$channel = $this->add_pagination_data($channel);\n\n\t\t// -------------------------------------\n\t\t// Related entries\n\t\t// -------------------------------------\n\n\t\t//ee()->TMPL->log_item('Calendar: Parsing related entries, via Weblog module');\n\n\t\tif (version_compare($this->ee_version, '2.6.0', '<'))\n\t\t{\n\t\t\tif (count(ee()->TMPL->related_data) > 0 AND\n\t\t\t\tcount($channel->related_entries) > 0)\n\t\t\t{\n\t\t\t\t$channel->parse_related_entries();\n\t\t\t}\n\n\t\t\tif (count(ee()->TMPL->reverse_related_data) > 0 AND\n\t\t\t\tcount($channel->reverse_related_entries) > 0)\n\t\t\t{\n\t\t\t\t$channel->parse_reverse_related_entries();\n\t\t\t}\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// Send 'em home\n\t\t// -------------------------------------\n\n\t\t$tagdata = $channel->return_data;\n\n\t\t//ee()->TMPL->log_item('Calendar: Done!');\n\n\t\t//on the off chance someone just wrote the word\n\t\t//'calendar_url_title', we should fix that before\n\t\t//output. (See above calendar_url_title fix)\n\t\tif (version_compare($this->ee_version, '2.6.0', '>='))\n\t\t{\n\t\t\t$tagdata = str_replace(\n\t\t\t\tarray(\n\t\t\t\t\tLD . 'calendar_borked_title' . RD,\n\t\t\t\t\t'\"calendar_borked_title\"',\n\t\t\t\t\t\"'calendar_borked_title'\"\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\tLD . 'calendar_url_title' . RD,\n\t\t\t\t\t'\"calendar_url_title\"',\n\t\t\t\t\t\"'calendar_url_title'\"\n\t\t\t\t),\n\t\t\t\t$tagdata\n\t\t\t);\n\t\t}\n\n\t\treturn $tagdata;\n\n\t}", "public function calendar()\n {\n $this->response->html($this->helper->layout->admin('admin/setting/calendar', [\n 'title' => t('Admin').' &raquo; '.t('Calendar settings'),\n ]));\n }", "private function czr_fn_set_the_events_calendar_compat() {\r\n /*\r\n * Are we in the Events list context?\r\n */\r\n if ( ! ( function_exists( 'czr_fn_is_tec_events_list' ) ) ) {\r\n function czr_fn_is_tec_events_list() {\r\n return function_exists( 'tribe_is_event_query' ) && tribe_is_event_query() && is_post_type_archive();\r\n }\r\n }\r\n /*\r\n * Are we in single Event context?\r\n */\r\n if ( ! ( function_exists( 'czr_fn_is_tec_single_event' ) ) ) {\r\n function czr_fn_is_tec_single_event() {\r\n return function_exists( 'tribe_is_event_query' ) && tribe_is_event_query() && is_single();\r\n }\r\n }\r\n\r\n\r\n // Events archive is displayed, wrongly, with our post lists classes, we have to prevent this\r\n add_filter( 'czr_is_list_of_posts', 'czr_fn_tec_disable_post_list');\r\n function czr_fn_tec_disable_post_list( $bool ) {\r\n return czr_fn_is_tec_events_list() ? false : $bool;\r\n }\r\n\r\n\r\n // Force the tax name in the breadcrumb when list of events shown as 'Month'\r\n // The Events Calendar adds a filter on post_type_archive_title with __return_false callback\r\n // for their own reasons. This impacts on our breadcrumb 'cause we use the function post_type_archive_title() to build up the trail arg in posty_type_archives contexts.\r\n // What we do here is unhooking their callback before the breadcrumb is built and re-hook it after it has been displayed\r\n add_action( 'wp_head', 'czr_fn_tec_allow_display_breadcrumb_in_month_view');\r\n function czr_fn_tec_allow_display_breadcrumb_in_month_view() {\r\n if ( ! ( czr_fn_is_tec_events_list() && function_exists( 'tribe_is_month' ) && tribe_is_month() ) )\r\n return;\r\n\r\n add_filter( 'czr_breadcrumb_trail_args', 'czr_fn_tec_unhook_empty_post_type_archive_title');\r\n function czr_fn_tec_unhook_empty_post_type_archive_title( $args = null ) {\r\n remove_filter( 'post_type_archive_title', '__return_false', 10 );\r\n return $args;\r\n }\r\n add_filter( 'czr_breadcrumb_trail_display', 'czr_fn_tec_rehook_empty_post_type_archive_title', PHP_INT_MAX );\r\n function czr_fn_tec_rehook_empty_post_type_archive_title( $breadcrumb = null ) {\r\n add_filter( 'post_type_archive_title', '__return_false', 10 );\r\n return $breadcrumb;\r\n }\r\n }\r\n\r\n /*\r\n * Avoid php smartload image php parsing in events list content\r\n * See: https://github.com/presscustomizr/hueman/issues/285\r\n */\r\n add_filter( 'czr_disable_img_smart_load', 'czr_fn_tec_disable_img_smart_load_events_list', 999, 2);\r\n function czr_fn_tec_disable_img_smart_load_events_list( $_bool, $parent_filter ) {\r\n if ( 'the_content' == $parent_filter && czr_fn_is_tec_events_list() )\r\n return true;//disable\r\n return $_bool;\r\n }\r\n\r\n }", "private function calendar()\n {\n $calendars = array_map(\n function( $item ){ return basename( $item, '.png' ); },\n array_values ( Kohana::list_files( 'images' . DIRECTORY_SEPARATOR . 'calendar', [ DOCROOT ] ) )\n );\n \n $m = date( 'm' );\n $y = date( 'Y' );\n\n $actual = array_search( sprintf( '%d_%s', $y, $m ), $calendars );\n\n $this->_page->content = View::factory( 'front/tplt/front_tplt_calendar',\n [\n 'actual' => $actual,\n 'months' => __( 'months' ),\n 'm' => $m,\n 'y' => $y,\n 'calendars' => $calendars\n ] );\n\n array_push( $this->styles, 'almafont', 'magnific-popup' );\n\n array_push( $this->scripts, 'magnific-popup', 'calendar' );\n }", "function ical() {\n $this->response->notFound();\n\n// if ($this->logged_user->isFeedUser()) {\n// $filter = $this->logged_user->projects()->getVisibleTypesFilter(Project::STATUS_ACTIVE, get_completable_project_object_types());\n// if($filter) {\n// $objects = ProjectObjects::find(array(\n// 'conditions' => array($filter . ' AND completed_on IS NULL AND state >= ? AND visibility >= ?', STATE_VISIBLE, $this->logged_user->getMinVisibility()),\n// 'order' => 'priority DESC',\n// ));\n// render_icalendar(lang('Global Calendar'), $objects, true);\n// die();\n// } else {\n// $this->response->notFound();\n// } // if\n// } else {\n// $this->response->forbidden();\n// } //if\n }", "function show_events_cal() {\n global $txtf;\n\n $structure = $this->vars['structure'];\n $content = $this->vars['content'];\n $day = $this->vars['day'];\n $month = $this->vars['month'];\n $year = $this->vars['year'];\n $hour = $this->vars['hour'];\n $minute = $this->vars['minute'];\n\n $sq = new sql;\n\n if ($this->vars[\"structure\"] && !$this->vars[\"content\"]) {\n $this->url_page = $_SERVER['PHP_SELF'] . \"?structure=\".$this->vars[\"structure\"];\n }\n else if ($this->vars[\"structure\"] && $this->vars[\"content\"]) {\n $this->url_page = $_SERVER['PHP_SELF'] . \"?structure=\".$this->vars[\"structure\"].\"&content=\".$this->vars[\"content\"];\n }\n else {\n $this->url_page = \"?\";\n }\n\n if (!$this->url) {\n $this->url = $this->url_page;\n }\n\n if (!ereg(\"\\?\", $this->url)) $this->url .= \"?\";\n if (!ereg(\"\\?\", $this->url_page)) $this->url_page .= \"?\";\n\n\n $month_name = array (\"\", $txtf->display(\"month_1\"), $txtf->display(\"month_2\"), $txtf->display(\"month_3\"), $txtf->display(\"month_4\"), $txtf->display(\"month_5\"), $txtf->display(\"month_6\"), $txtf->display(\"month_7\"), $txtf->display(\"month_8\"), $txtf->display(\"month_9\"), $txtf->display(\"month_10\"), $txtf->display(\"month_11\"), $txtf->display(\"month_12\"));\n $day_name = array($txtf->display(\"day_1\"), $txtf->display(\"day_2\"), $txtf->display(\"day_3\"), $txtf->display(\"day_4\"), $txtf->display(\"day_5\"), $txtf->display(\"day_6\"), $txtf->display(\"day_0\"));\n\n $datime = time();\n\n if(!isset($month) || !is_numeric($month)) {\n $month = date(\"n\", $datime);\n }\n\n if(!isset($year) || !is_numeric($year)) {\n $year = date(\"Y\", $datime);\n }\n\n if ($month == date(\"n\",$datime) && $year == date(\"Y\",$datime)) {\n $today = date(\"j\", $datime);\n }\n\n if(!isset($hour)) $hour = date(\"H\");\n if(!isset($minute)) $minute = date(\"i\");\n\n // ########################################\n\n // instantiate template class\n $tpl = new template;\n $tpl->setCacheLevel($this->cachelevel);\n $tpl->setCacheTtl($this->cachetime);\n $usecache = checkParameters();\n\n $dirname_this = dirname($_SERVER[\"PHP_SELF\"]);\n\n if (substr($dirname_this, -5) == \"admin\" && basename($_SERVER[\"PHP_SELF\"]) != \"index.php\") {\n $template = $this->template;\n }\n else {\n $template = $GLOBALS[\"templates_\".$this->language][$this->tmpl][1] . \"/\" . $this->template;\n }\n\n $tpl->setInstance($_SERVER['PHP_SELF'].\"?language=\".$this->language.\"&module=calendar&day=$day&month=$month&year=$year\");\n $tpl->setTemplateFile($template);\n\n // PAGE CACHED\n if ($tpl->isCached($template) == true && $usecache == true) {\n $GLOBALS[\"caching\"][] = \"calendar\";\n if ($GLOBALS[\"modera_debug\"] == true) {\n return \"<!-- module calendar cached -->\\n\" . $tpl->parse();\n }\n else {\n return $tpl->parse();\n }\n }\n\n $lastmonth = $month - 1;\n $lastyear = $year;\n if ($lastmonth < 1) { $lastmonth = 12; $lastyear = $year - 1; }\n $tpl->addDataItem(\"URL_PREVIOUS\", $this->url . \"&year=$lastyear&month=$lastmonth\");\n\n $nextmonth = $month + 1;\n $nextyear = $year;\n if ($nextmonth > 12) { $nextmonth = 1; $nextyear = $year + 1; }\n $tpl->addDataItem(\"URL_NEXT\", $this->url . \"&year=$nextyear&month=$nextmonth\");\n $tpl->addDataItem(\"CURRENT_MONTH\", $month_name[$month] . \" \" . $year);\n\n $wdays = \"<th class=\\\"static\\\">\" . $txtf->display(\"week_short\") . \"</th>\\n\";\n for ($c = 0; $c < 7; $c++) {\n $wdays .= \"<th>\".substr($day_name[$c],0,1).\"</th>\\n\";\n }\n\n $tpl->addDataItem(\"WEEKDAYS\", $wdays);\n\n // ####\n // Initial empty days\n $c = 1;\n $firstmonday = date(\"w\", mktime(0,0,0,$month, 1, $year));\n if ($firstmonday == 0) $firstmonday = 7;\n $dayz = \"<tr>\\n\";\n // WEEK NUMBER\n if ($c != $firstmonday) {\n $wn = date(\"W\", mktime(0, 0, 0, $month, $c, $year)) + 0;\n $dayz .= \"<td class=\\\"static\\\">\" . $wn . \"</td>\\n\";\n\n while ($firstmonday > $c) {\n $dayz .= \"<td>&nbsp;</td>\\n\";\n $c++;\n }\n }\n // ####\n\n for ($c = 1; $c <= 31; $c++) {\n $wd = date(\"w\", mktime(0, 0, 0, $month, $c, $year));\n if (!$wd) {\n $wd = 7;\n }\n\n // TODAY\n if($c == $today) {\n $daystyle = \"today\";\n }\n elseif($c != $today) {\n $daystyle = \"\";\n }\n if ($wd == 6 || $wd == 7) {\n $daystyle = ($daystyle ? $daystyle . \" \" : \"\") . \"sunday\";\n }\n\n\n // SELECTED DAY\n// if ($c == $day) { $daystyle = \"selected\"; }\n\n if ($wd == 1) { // monday\n $dayz .= \"<tr>\\n\";\n // WEEK NUMBER\n $wn = date(\"W\", mktime(0, 0, 0, $month, $c, $year)) + 0;\n $dayz .= \"<td class=\\\"static\\\">\" . $wn . \"</td>\\n\";\n }\n\n if (checkdate($month, $c, $year)) {\n if (is_array($this->events[$year][$month][$c])) {\n $dayz .= \"<td class=\\\"$daystyle\\\"><a href=\\\"\".$this->url.\"&day=\".$c.\"&month=\".$month.\"&year=\".$year.\"\\\"><b>$c</b></a></td>\\n\";\n }\n else {\n $dayz .= \"<td class=\\\"$daystyle\\\"><a href=\\\"\".$this->url.\"&day=\".$c.\"&month=\".$month.\"&year=\".$year.\"\\\">$c</a></td>\\n\";\n }\n }\n\n if ($wd == 7) { // sunday\n $dayz .= \"</tr>\\n\";\n }\n }\n\n if ($wd < 7) {\n for ($i = $wd; $i <= 7; $i++) {\n $dayz .= \"<td>&nbsp;</td>\\n\";\n }\n $dayz .= \"</tr>\\n\";\n }\n\n $tpl->addDataItem(\"DAYS\", $dayz);\n\n $f_hour = \"\";\n for ($c = 0; $c < 24; $c++) {\n if ($c < 10) $z = \"0\" . $c;\n else { $z = $c; }\n if ($hour == $z) $sel = \"selected\";\n else { $sel = \"\"; }\n $f_hour .= \"<option value=\\\"$z\\\" $sel>$z</option>\\n\";\n }\n $f_minute = \"\";\n for ($c = 0; $c < 60; $c = $c + 5) {\n if ($c < 10) $z = \"0\" . $c;\n else { $z = $c; }\n if ($minute == $z) $sel = \"selected\";\n else { $sel = \"\"; }\n $f_minute .= \"<option value=\\\"$z\\\" $sel>$z</option>\\n\";\n }\n\n // Hours\n $tpl->addDataItem(\"HOURS\", $f_hour);\n // Minutes\n $tpl->addDataItem(\"MINUTES\", $f_minute);\n\n if (!$day) $day = date(\"j\");\n\n $tpl->addDataItem(\"DAY\", $day);\n $tpl->addDataItem(\"MONTH\", $month);\n $tpl->addDataItem(\"YEAR\", $year);\n $tpl->addDataItem(\"HOUR\", $hour);\n $tpl->addDataItem(\"MINUTE\", $minute);\n $tpl->addDataItem(\"FIELD\", $this->field);\n $tpl->addDataItem(\"TYPE\", $_GET[\"type\"]);\n\n // ####\n return $tpl->parse();\n\n }", "public function action_calendar()\n\t{\n\t\tglobal $txt, $context, $modSettings, $options;\n\n\t\t// Permissions, permissions, permissions.\n\t\tisAllowedTo('calendar_view');\n\n\t\t// This is gonna be needed...\n\t\ttheme()->getTemplates()->load('Calendar');\n\n\t\t// You can't do anything if the calendar is off.\n\t\tif (empty($modSettings['cal_enabled']))\n\t\t{\n\t\t\tthrow new Exception('calendar_off', false);\n\t\t}\n\n\t\tif (empty($modSettings['cal_limityear']))\n\t\t{\n\t\t\t$modSettings['cal_limityear'] = 20;\n\t\t}\n\n\t\t// Set the page title to mention the calendar ;).\n\t\t$context['page_title'] = $txt['calendar'];\n\t\t$context['sub_template'] = 'show_calendar';\n\n\t\t// Is this a week view?\n\t\t$context['view_week'] = isset($_GET['viewweek']);\n\t\t$context['cal_minyear'] = $modSettings['cal_minyear'];\n\t\t$context['cal_maxyear'] = date('Y') + $modSettings['cal_limityear'];\n\n\t\t// Don't let search engines index weekly calendar pages.\n\t\tif ($context['view_week'])\n\t\t{\n\t\t\t$context['robot_no_index'] = true;\n\t\t}\n\n\t\t// Get the current day of month...\n\t\trequire_once(SUBSDIR . '/Calendar.subs.php');\n\t\t$today = getTodayInfo();\n\n\t\t// If the month and year are not passed in, use today's date as a starting point.\n\t\t$curPage = array(\n\t\t\t'day' => isset($_REQUEST['day']) ? (int) $_REQUEST['day'] : $today['day'],\n\t\t\t'month' => isset($_REQUEST['month']) ? (int) $_REQUEST['month'] : $today['month'],\n\t\t\t'year' => isset($_REQUEST['year']) ? (int) $_REQUEST['year'] : $today['year']\n\t\t);\n\n\t\t// Make sure the year and month are in valid ranges.\n\t\tif ($curPage['month'] < 1 || $curPage['month'] > 12)\n\t\t{\n\t\t\tthrow new Exception('invalid_month', false);\n\t\t}\n\n\t\tif ($curPage['year'] < $context['cal_minyear'] || $curPage['year'] > $context['cal_maxyear'])\n\t\t{\n\t\t\tthrow new Exception('invalid_year', false);\n\t\t}\n\n\t\t// If we have a day clean that too.\n\t\tif ($context['view_week'])\n\t\t{\n\t\t\tif ($curPage['day'] > 31 || !mktime(0, 0, 0, $curPage['month'], $curPage['day'], $curPage['year']))\n\t\t\t{\n\t\t\t\tthrow new Exception('invalid_day', false);\n\t\t\t}\n\t\t}\n\n\t\t// Load all the context information needed to show the calendar grid.\n\t\t$calendarOptions = array(\n\t\t\t'start_day' => !empty($options['calendar_start_day']) ? $options['calendar_start_day'] : 0,\n\t\t\t'show_birthdays' => in_array($modSettings['cal_showbdays'], array(1, 2)),\n\t\t\t'show_events' => in_array($modSettings['cal_showevents'], array(1, 2)),\n\t\t\t'show_holidays' => in_array($modSettings['cal_showholidays'], array(1, 2)),\n\t\t\t'show_week_num' => true,\n\t\t\t'short_day_titles' => false,\n\t\t\t'show_next_prev' => true,\n\t\t\t'show_week_links' => true,\n\t\t\t'size' => 'large',\n\t\t);\n\n\t\t// Load up the main view.\n\t\tif ($context['view_week'])\n\t\t{\n\t\t\t$context['calendar_grid_main'] = getCalendarWeek($curPage['month'], $curPage['year'], $curPage['day'], $calendarOptions);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$context['calendar_grid_main'] = getCalendarGrid($curPage['month'], $curPage['year'], $calendarOptions);\n\t\t}\n\n\t\t// Load up the previous and next months.\n\t\t$calendarOptions['show_birthdays'] = $calendarOptions['show_events'] = $calendarOptions['show_holidays'] = false;\n\t\t$calendarOptions['short_day_titles'] = true;\n\t\t$calendarOptions['show_next_prev'] = false;\n\t\t$calendarOptions['show_week_links'] = false;\n\t\t$calendarOptions['size'] = 'small';\n\t\t$context['calendar_grid_current'] = getCalendarGrid($curPage['month'], $curPage['year'], $calendarOptions);\n\n\t\t// Only show previous month if it isn't pre-January of the min-year\n\t\tif ($context['calendar_grid_current']['previous_calendar']['year'] > $context['cal_minyear'] || $curPage['month'] != 1)\n\t\t{\n\t\t\t$context['calendar_grid_prev'] = getCalendarGrid($context['calendar_grid_current']['previous_calendar']['month'], $context['calendar_grid_current']['previous_calendar']['year'], $calendarOptions);\n\t\t}\n\n\t\t// Only show next month if it isn't post-December of the max-year\n\t\tif ($context['calendar_grid_current']['next_calendar']['year'] < $context['cal_maxyear'] || $curPage['month'] != 12)\n\t\t{\n\t\t\t$context['calendar_grid_next'] = getCalendarGrid($context['calendar_grid_current']['next_calendar']['month'], $context['calendar_grid_current']['next_calendar']['year'], $calendarOptions);\n\t\t}\n\n\t\t// Basic template stuff.\n\t\t$context['can_post'] = allowedTo('calendar_post');\n\t\t$context['current_day'] = $curPage['day'];\n\t\t$context['current_month'] = $curPage['month'];\n\t\t$context['current_year'] = $curPage['year'];\n\t\t$context['show_all_birthdays'] = isset($_GET['showbd']);\n\n\t\t// Set the page title to mention the month or week, too\n\t\t$context['page_title'] .= ' - ' . ($context['view_week'] ? sprintf($txt['calendar_week_title'], $context['calendar_grid_main']['week_number'], ($context['calendar_grid_main']['week_number'] == 53 ? $context['current_year'] - 1 : $context['current_year'])) : $txt['months'][$context['current_month']] . ' ' . $context['current_year']);\n\n\t\t// Load up the linktree!\n\t\t$context['linktree'][] = array(\n\t\t\t'url' => getUrl('action', ['action' => 'calendar']),\n\t\t\t'name' => $txt['calendar']\n\t\t);\n\n\t\t// Add the current month to the linktree.\n\t\t$context['linktree'][] = array(\n\t\t\t'url' => getUrl('action', ['action' => 'calendar', 'year' => $context['current_year'], 'month' => $context['current_month']]),\n\t\t\t'name' => $txt['months'][$context['current_month']] . ' ' . $context['current_year']\n\t\t);\n\n\t\t// If applicable, add the current week to the linktree.\n\t\tif ($context['view_week'])\n\t\t{\n\t\t\t$context['linktree'][] = array(\n\t\t\t\t'url' => getUrl('action', ['action' => 'calendar', 'year' => $context['current_year'], 'month' => $context['current_month'], 'day' => $context['current_day'], 'viewweek']),\n\t\t\t\t'name' => $txt['calendar_week'] . ' ' . $context['calendar_grid_main']['week_number']\n\t\t\t);\n\t\t}\n\n\t\t// Build the calendar button array.\n\t\t$context['calendar_buttons'] = array(\n\t\t\t'post_event' => array(\n\t\t\t\t'test' => 'can_post',\n\t\t\t\t'text' => 'calendar_post_event',\n\t\t\t\t'lang' => true,\n\t\t\t\t'url' => getUrl('action', ['action' => 'calendar', 'sa' => 'post', 'year' => $context['current_year'], 'month' => $context['current_month'], '{session_data}'])\n\t\t\t),\n\t\t);\n\n\t\t// Allow mods to add additional buttons here\n\t\tcall_integration_hook('integrate_calendar_buttons');\n\t}", "function printCalendarContents() {\n\t\t$client = $this->businessLogic->client;\n\t $this->putCalendarTitle($client);\n\t $eventsForCalendar = $this->businessLogic->getEventsForCalendar(htmlspecialchars($_GET['showThisCalendar']));\n\t foreach ($eventsForCalendar as $event) {\n\t $this->putEventListElement($event);\n\t }\n\t}", "function manage_states($set_states=NULL)\n\t{\n\t\t$states = $states_session = $GLOBALS['egw']->session->appsession('session_data','calendar');\n\n\t\t// retrieve saved states from prefs\n\t\tif(!$states)\n\t\t{\n\t\t\t$states = unserialize($this->bo->cal_prefs['saved_states']);\n\t\t}\n\t\t// only look at _REQUEST, if we are in the bcalendar (prefs and admin show our sidebox menu too!)\n\t\tif (is_null($set_states))\n\t\t{\n\t\t\t$set_states = substr($_GET['menuaction'],0,9) == 'bcalendar.' ? $_REQUEST : array();\n\t\t}\n\t\tif (!$states['date'] && $states['year'] && $states['month'] && $states['day'])\n\t\t{\n\t\t\t$states['date'] = $this->bo->date2string($states);\n\t\t}\n\n\t\tforeach(array(\n\t\t\t'date' => $this->bo->date2string($this->bo->now_su),\n\t\t\t'cat_id' => 0,\n\t\t\t'filter' => 'all',\n\t\t\t'owner' => $this->user,\n\t\t\t'save_owner' => 0,\n\t\t\t'sortby' => 'category',\n\t\t\t'planner_days'=> 0,\t// full month\n\t\t\t'view' => $this->bo->cal_prefs['defaultcalendar'],\n\t\t\t'listview_days'=> '',\t// no range\n\t\t) as $state => $default)\n\t\t{\n\t\t\tif (isset($set_states[$state]))\n\t\t\t{\n\t\t\t\tif ($state == 'owner')\n\t\t\t\t{\n\t\t\t\t\t// only change the owners of the same resource-type as given in set_state[owner]\n\t\t\t\t\t$set_owners = explode(',',$set_states['owner']);\n\t\t\t\t\tif ((string)$set_owners[0] === '0')\t// set exactly the specified owners (without the 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$set_states['owner'] = substr($set_states['owner'],2);\n\t\t\t\t\t}\n\t\t\t\t\telse\t// change only the owners of the given type\n\t\t\t\t\t{\n\t\t\t\t\t\t$res_type = is_numeric($set_owners[0]) ? false : $set_owners[0][0];\n\t\t\t\t\t\t$owners = explode(',',$states['owner'] ? $states['owner'] : $default);\n\t\t\t\t\t\tforeach($owners as $key => $owner)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (!$res_type && is_numeric($owner) || $res_type && $owner[0] == $res_type)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tunset($owners[$key]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!$res_type || !in_array($res_type.'0',$set_owners))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$owners = array_merge($owners,$set_owners);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$set_states['owner'] = implode(',',$owners);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// for the uiforms class (eg. edit), dont store the (new) owner, as it might change the view\n\t\t\t\tif (substr($_GET['menuaction'],0,25) == 'bcalendar.bcalendar_uiforms')\n\t\t\t\t{\n\t\t\t\t\t$this->owner = $set_states[$state];\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$states[$state] = $set_states[$state];\n\t\t\t}\n\t\t\telseif (!is_array($states) || !isset($states[$state]))\n\t\t\t{\n\t\t\t\t$states[$state] = $default;\n\t\t\t}\n\t\t\tif ($state == 'date')\n\t\t\t{\n\t\t\t\t$date_arr = $this->bo->date2array($states['date']);\n\t\t\t\tforeach(array('year','month','day') as $name)\n\t\t\t\t{\n\t\t\t\t\t$this->$name = $states[$name] = $date_arr[$name];\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->$state = $states[$state];\n\t\t}\n\t\tif (substr($this->view,0,8) == 'planner_')\n\t\t{\n\t\t\t$states['sortby'] = $this->sortby = $this->view == 'planner_cat' ? 'category' : 'user';\n\t\t\t$states['view'] = $this->view = 'planner';\n\t\t}\n\t\t// set the actual view as return_to\n\t\tif (isset($_GET['menuaction']))\n\t\t{\n\t\t\tlist($app,$class,$func) = explode('.',$_GET['menuaction']);\n\t\t\tif ($func == 'index')\n\t\t\t{\n\t\t\t\t$func = $this->view; $this->view = 'index';\t// switch to the default view\n\t\t\t}\n\t\t}\n\t\telse\t// eg. bcalendar/index.php\n\t\t{\n\t\t\t$func = $this->view;\n\t\t\t$class = $this->view == 'listview' ? 'calendar_uilist' : 'calendar_uiviews';\n\t\t}\n\t\tif ($class == 'calendar_uiviews' || $class == 'calendar_uilist')\n\t\t{\n\t\t\t// if planner_start_with_group is set in the users prefs: switch owner for planner to planner_start_with_group and back\n\t\t\tif ($this->cal_prefs['planner_start_with_group'])\n\t\t\t{\n\t\t\t\tif ($this->cal_prefs['planner_start_with_group'] > 0) $this->cal_prefs['planner_start_with_group'] *= -1;\t// fix old 1.0 pref\n\n\t\t\t\tif (!$states_session && !$_GET['menuaction']) $this->view = '';\t\t// first call to bcalendar\n\n\t\t\t\tif ($func == 'planner' && $this->view != 'planner' && $this->owner == $this->user)\n\t\t\t\t{\n\t\t\t\t\t//echo \"<p>switched for planner to {$this->cal_prefs['planner_start_with_group']}, view was $this->view, func=$func, owner was $this->owner</p>\\n\";\n\t\t\t\t\t$states['save_owner'] = $this->save_owner = $this->owner;\n\t\t\t\t\t$states['owner'] = $this->owner = $this->cal_prefs['planner_start_with_group'];\n\t\t\t\t}\n\t\t\t\telseif ($func != 'planner' && $this->view == 'planner' && $this->owner == $this->cal_prefs['planner_start_with_group'] && $this->save_owner)\n\t\t\t\t{\n\t\t\t\t\t//echo \"<p>switched back to $this->save_owner, view was $this->view, func=$func, owner was $this->owner</p>\\n\";\n\t\t\t\t\t$states['owner'] = $this->owner = $this->save_owner;\n\t\t\t\t\t$states['save_owner'] = $this->save_owner = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->view = $states['view'] = $func;\n\t\t}\n\t\t$this->view_menuaction = $this->view == 'listview' ? 'bcalendar.bcalendar_uilist.listview' : 'bcalendar.bcalendar_uiviews.'.$this->view;\n\n\t\tif ($this->debug > 0 || $this->debug == 'manage_states') $this->bo->debug_message('uical::manage_states(%1) session was %2, states now %3',True,$set_states,$states_session,$states);\n\t\t// save the states in the session only when we are in bcalendar\n\t\tif ($GLOBALS['egw_info']['flags']['currentapp']=='calendar')\n\t\t{\n\t\t\t$GLOBALS['egw']->session->appsession('session_data','calendar',$states);\n\t\t\t// save defined states into the user-prefs\n\t\t\tif(!empty($states) && is_array($states))\n\t\t\t{\n\t\t\t\t$saved_states = serialize(array_intersect_key($states,array_flip($this->states_to_save)));\n\t\t\t\tif ($saved_states != $this->cal_prefs['saved_states'])\n\t\t\t\t{\n\t\t\t\t\t$GLOBALS['egw']->preferences->add('calendar','saved_states',$saved_states);\n\t\t\t\t\t$GLOBALS['egw']->preferences->save_repository(false,'user',true);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function getCalendar($sheet_complex,$create_opening_url='',$add_opening_text='',$direct_display=false)\n{\n\n $cal_display_html = '<div class=\"full_calendar\">';\n $day_counter = 0;\n\n $opening_index = 0;\n $openings_list_display = '';\n\n // these need to reflect the CSS values - ugly hack, I know...\n $day_height = 36;\n $dow_heading_height = 18;\n $cell_border = 1;\n $cell_padding = 4;\n\n $height_of_day_cells = $day_height + 2*$cell_border + 2*$cell_padding;\n $height_of_dow_header = $dow_heading_height + 2*$cell_border + 2*$cell_padding;\n\n $cal_start = firstOfMonth_timeAsDate($sheet_complex->s_date_opens);\n $sus_start_ymd = ymd($sheet_complex->s_date_opens);\n $cal_cur = $cal_start;\n $cal_end = lastOfMonth_timeAsDate($sheet_complex->s_date_closes);\n $sus_end_ymd = ymd($sheet_complex->s_date_closes);\n $today_ymd = ymd();\n\n //log_debug(0,$cal_start);\n //log_debug(0,$cal_start_ymd);\n //log_debug(0,$cal_end);\n //log_debug(0,$cal_end_ymd);\n\n // Handle case where there are openings prior to the cal start by\n // skipping earlier openings - this happend, e.g., when a user updates\n // a sheet from a prior semester to start at the current semester but\n // they still have many openings from the old semester.\n $loop_limit = 10000; // just in case something unforeseen causes an otherwise infinite loop\n if (property_exists($sheet_complex,'openings') && (count($sheet_complex->openings) >= 0)) {\n while (($opening_index < $loop_limit) && ($sheet_complex->openings[$opening_index]->o_dateymd < $sus_start_ymd)) {\n $opening_index++;\n }\n }\n if ($opening_index >= $loop_limit) {\n log_debug(0,\"Sign-up Sheet WARNING: possible infinite loop scenario aborted; opening_index > loop_limit in cal_lib\");\n }\n\n // now do that actual calendar\n while ($cal_cur <= $cal_end)\n {\n $cal_cur_dow = (date('N',$cal_cur) % 7) + 1; // shift sunday to first day of week\n $cal_cur_ymd = ymd($cal_cur);\n $cal_cur_y_m_d = ymd($cal_cur,'-');\n\n if (isFirstOfMonth($cal_cur)) // close out the previous month and set up a new one\n {\n if ($day_counter > 0)\n {\n $cal_display_html .= finishWeekFrom(date('N',$cal_cur)%7);\n $cal_display_html .= '</div>'; // close month grid\n }\n\n // num rows in a month = (first dow (0 based) + last day in month + 7) div 7\n $num_week_rows = getNumWeekRowsInMonth($cal_cur);\n $mon_vert_size = ($num_week_rows * $height_of_day_cells) + $height_of_dow_header - (2*$cell_border);\n $month_title = implode('<br/>',str_split(strtoupper(date('M Y',$cal_cur))));\n\n $cal_display_html .= '<div class=\"month_title\" style=\"height: '.$mon_vert_size.'px;\"><p>'.$month_title.'</p></div>';\n $cal_display_html .= '<div class=\"month_grid\" style=\"height: '.$mon_vert_size.'px;\">';\n $cal_display_html .= dowHeaders();\n $cal_display_html .= startWeekAt($cal_cur_dow);\n $day_counter = $cal_cur_dow;\n }\n\n // get info for the day\n $day_text = date('j',$cal_cur);\n $day_class = getDayCellClass($cal_cur,$sus_start_ymd,$sus_end_ymd);\n $openings_info_list = '';\n $openings_mini_times = getNewOpeningMinitimes();\n //print_r($sheet_complex); // DEBUGGING\n\n if (isset($sheet_complex->openings) && $sheet_complex->openings)\n {\n\t //log_debug(-1,\"opening_index = \".$opening_index);\n\t // log_debug(-1,\"count(sheet_complex->openings) = \". count($sheet_complex->openings));\n\t //log_debug(-1,\"sheet_complex->openings[opening_index]->o_dateymd = \".$sheet_complex->openings[$opening_index]->o_dateymd);\n\t //log_debug(-1,\"cal_cur_ymd = \".$cal_cur_ymd);\n while (($opening_index < count($sheet_complex->openings)) && ($sheet_complex->openings[$opening_index]->o_dateymd == $cal_cur_ymd))\n {\n $openings_info_list .= '<li>'.openingDisplay($sheet_complex->openings[$opening_index],($create_opening_url && $add_opening_text),$sheet_complex->s_flag_private_signups).'</li>';\n if (preg_match('/(\\d+):(\\d+)/',$sheet_complex->openings[$opening_index]->o_begin_time_h24_m,$matches))\n {\n debug(5,\"matches[0] is \".$matches[0]);\n debug(5,\"matches[1] is \".$matches[1]);\n debug(5,\"matches[1] + matches[2]/60 is \".($matches[1] + $matches[2]/60));\n $eft_hour = round($matches[1] + $matches[2]/60);\n debug(5,\"eft_hour is $eft_hour\");\n if ($eft_hour == 24) { $eft_hour = 23; }\n $openings_mini_times[$eft_hour] = 1;\n $dur = $sheet_complex->openings[$opening_index]->o_dur_seconds / 3600; // duration in hours\n debug(5,\"dur is $dur\");\n while (($eft_hour < 23) && ($dur > 1))\n {\n $eft_hour++;\n $dur--;\n $openings_mini_times[$eft_hour] = 1;\n }\n } else\n {\n error(\"failed to match time in {$sheet_complex->openings[$opening_index]->o_begin_time_h24_m}\");\n }\n $opening_index++;\n }\n if ($openings_info_list)\n {\n $day_class .= ' day_has_openings';\n }\n }\n $add_opening = '';\n if ($create_opening_url && $add_opening_text && (! preg_match('/inactive/',$day_class)) )\n {\n $add_opening = link_to_popup_window ($create_opening_url.'&day='.$cal_cur_ymd.'&action=newopening', 'createopening', $add_opening_text,\n 480, 640, 'Create Sign-up Openings',\n 'location=0,directories=0,menubar=0,scrollbars=1',true); // dev code - shows scroll bars, for live set to 0\n }\n\n // actually output the day cell\n //$cal_display_html .= '<div id=\"day_'.ymd($cal_cur).'\" class=\"'.$day_class.'\">'. $day_text . $add_opening;\n $cal_display_html .= '<div id=\"day_'.ymd($cal_cur).'\" class=\"'.$day_class.'\">';\n if ($openings_info_list)\n {\n //$cal_display_html .= \"( )\";\n $openings_info = '<div id=\"openings_on_'.$cal_cur_ymd.'\" class=\"openings_summary_box\">'\n .'<div class=\"opening_day_heading\">'.$cal_cur_y_m_d.'</div>'\n .'<ul class=\"openings_list openings_list_'.$cal_cur_ymd.'\">'.$openings_info_list.'</ul>'\n .\"</div>\\n\";\n //$cal_display_html .= getOpeningMinitimesDisplay($cal_cur_ymd,$openings_mini_times) . $openings_info;\n $cal_display_html .= getOpeningMinitimesDisplay($cal_cur_ymd,$openings_mini_times,$openings_info);\n }\n $cal_display_html .= $day_text . '<br/>'. $add_opening;\n $cal_display_html .= '</div>'; // <!-- end day cell -->\n\n // end week if necessary\n if (($day_counter > 0) && ($day_counter % 7 == 0))\n {\n $cal_display_html .= \"</div>\\n\".'<div class=\"week_row\">';\n }\n\n // finished with this day, on to the next\n $day_counter++;\n $cal_cur = dayAfter_timeAsDate($cal_cur);\n } // end while ($cal_cur <= $cal_end)\n\n $cal_display_html .= finishWeekFrom(date('N',$cal_cur)%7);\n //$cal_display_html .= dowHeaders();\n $cal_display_html .= \"</div>\\n\"; // end month grid\n $cal_display_html .= \"</div>\\n\"; // end full calendar\n\n if ($cal_display_html && $direct_display)\n {\n echo $cal_display_html;\n return ($cal_display_html != '');\n }\n return $cal_display_html;\n}", "public function testUpdateCalendar()\n {\n }", "function show_personal_agenda()\n{\n\tglobal $tbl_personal_agenda;\n\tglobal $MonthsLong, $charset;\n\tglobal $_user;\n\t// The SQL statement that retrieves all the personal agenda items of this user\n\t$sql = \"SELECT * FROM \".$tbl_personal_agenda.\" WHERE user='\".$_user['user_id'].\"' ORDER BY date DESC\";\n\t$result = api_sql_query($sql, __FILE__, __LINE__);\n\t// variable initialisation\n\t$month_bar = \"\";\n\t// setting the default day, month and year\n\tif (!$_GET['day'] AND !$_GET['month'] AND !$_GET['year'])\n\t{\n\t\t$today = getdate();\n\t\t$year = $today['year'];\n\t\t$month = $today['mon'];\n\t\t$day = $today['mday'];\n\t}\n\t$export_icon = api_get_path('WEB_IMG_PATH').'export.png';\n\t$export_icon_low = api_get_path('WEB_IMG_PATH').'export_low_fade.png';\n\t$export_icon_high = api_get_path('WEB_IMG_PATH').'export_high_fade.png';\n\n\t// starting the table output\n\techo \"<table id=\\\"agenda_list\\\">\\n\";\n\n\tif (Database::num_rows($result) > 0)\n\t{\n\t\twhile ($myrow = Database::fetch_array($result))\n\t\t{\n\t\t\t/*--------------------------------------------------\n\t\t\t\t\tdisplay: the month bar\n\t\t\t --------------------------------------------------*/\n\t\t\tif ($month_bar != date(\"m\", strtotime($myrow[\"date\"])).date(\"Y\", strtotime($myrow[\"date\"])))\n\t\t\t{\n\t\t\t\t$month_bar = date(\"m\", strtotime($myrow[\"date\"])).date(\"Y\", strtotime($myrow[\"date\"]));\n\t\t\t\techo \"<tr><td class=\\\"title\\\" colspan=\\\"2\\\" class=\\\"month\\\" valign=\\\"top\\\">\".$MonthsLong[date(\"n\", strtotime($myrow[\"date\"])) - 1].\" \".date(\"Y\", strtotime($myrow[\"date\"])).\"</td></tr>\\n\";\n\t\t\t}\n\t\t\t// highlight: if a date in the small calendar is clicked we highlight the relevant items\n\t\t\t$db_date = (int) date(\"d\", strtotime($myrow[\"date\"])).date(\"n\", strtotime($myrow[\"date\"])).date(\"Y\", strtotime($myrow[\"date\"]));\n\t\t\tif ($_GET[\"day\"].$_GET[\"month\"].$_GET[\"year\"] <> $db_date)\n\t\t\t{\n\t\t\t\t$style = \"data\";\n\t\t\t\t$text_style = \"text\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$style = \"datanow\";\n\t\t\t\t$text_style = \"text\";\n\t\t\t}\n\t\t\t/*--------------------------------------------------\n\t\t\t \t\t\tdisplay: date and time\n\t\t\t --------------------------------------------------*/\n\t\t\techo \"\\t<tr>\\n\\t\\t\";\n\t\t\techo '<td class=\"'.$style.'\">';\n\t\t\t// adding an internal anchor\n\t\t\techo \"<a name=\\\"\".$myrow[\"id\"].\"\\\"></a>\";\n\t\t\techo date(\"d\", strtotime($myrow[\"date\"])).\" \".$MonthsLong[date(\"n\", strtotime($myrow[\"date\"])) - 1].\" \".date(\"Y\", strtotime($myrow[\"date\"])).\"&nbsp;\";\n\t\t\techo ucfirst(strftime(get_lang(\"timeNoSecFormat\"), strtotime($myrow[\"date\"])));\n\t\t\techo \"</td>\";\n\t\t\techo '<td class=\"'.$style.'\">';\n\t\t\techo '<a class=\"ical_export\" href=\"ical_export.php?type=personal&id='.$myrow['id'].'&class=confidential\" title=\"'.get_lang('ExportiCalConfidential').'\"><img src=\"'.$export_icon_high.'\" alt=\"'.get_lang('ExportiCalConfidential').'\"/></a>';\n\t\t\techo '<a class=\"ical_export\" href=\"ical_export.php?type=personal&id='.$myrow['id'].'&class=private\" title=\"'.get_lang('ExportiCalPrivate').'\"><img src=\"'.$export_icon_low.'\" alt=\"'.get_lang('ExportiCalPrivate').'\"/></a>';\n\t\t\techo '<a class=\"ical_export\" href=\"ical_export.php?type=personal&id='.$myrow['id'].'&class=public\" title=\"'.get_lang('ExportiCalPublic').'\"><img src=\"'.$export_icon.'\" alt=\"'.get_lang('ExportiCalPublic').'\"/></a>';\n\t\t\techo \"\\n\\t\\t</td>\\n\\t\";\n\t\t\techo \"</tr>\";\n\t\t\t/*--------------------------------------------------\n\t\t\t \t\t\tdisplay: the title\n\t\t\t --------------------------------------------------*/\n\t\t\techo \"<tr>\";\n\t\t\techo '<td class=\"'.$style.'\" colspan=\"2\">';\n\t\t\techo Security::remove_XSS($myrow['title']);\n\t\t\techo \"\\n\\t\\t</td>\\n\\t\";\n\t\t\techo \"</tr>\\n\";\n\t\t\t/*--------------------------------------------------\n\t\t\t \t\t\tdisplay: the content\n\t\t\t --------------------------------------------------*/\n\t\t\t$content = $myrow['text'];\n\t\t\t$content = make_clickable($content);\n\t\t\t$content = text_filter($content);\n\t\t\techo \"\\t<tr>\\n\\t\\t<td class=\\\"\".$text_style.\"\\\" colspan='2'>\";\n\t\t\techo $content;\n\t\t\techo \"</td></tr>\";\n\t\t\t/*--------------------------------------------------\n\t\t\t \t\t\tdisplay: the edit / delete icons\n\t\t\t --------------------------------------------------*/\n\t\t\techo \"\\t<tr>\\n\\t\\t<td class=\\\"\".$text_style.\"\\\" colspan='2'>\";\n\t\t\techo \"<a href=\\\"myagenda.php?action=edit_personal_agenda_item&amp;id=\".$myrow['id'].\"\\\"><img src=\\\"../img/edit.gif\\\" border=\\\"0\\\" alt=\\\"\".get_lang('Edit').\"\\\" /></a>\";\n\t\t\techo \"<a href=\\\"\".api_get_self().\"?action=delete&amp;id=\".$myrow['id'].\"\\\" onclick=\\\"javascript:if(!confirm('\".addslashes(htmlentities(get_lang('ConfirmYourChoice'),ENT_QUOTES,$charset)).\"')) return false;\\\"><img src=\\\"../img/delete.gif\\\" border=\\\"0\\\" alt=\\\"\".get_lang('Delete').\"\\\" /></a>\";\n\t\t\techo \"</td></tr>\";\n\t\t}\n\t}\n\telse\n\t{\n\t\techo '<tr><td colspan=\"2\">'.get_lang('NoAgendaItems').'</td></tr>';\n\t}\n\techo \"</table>\\n\";\n}", "function evo_cal_hidden(){\r\n\t\t\tif(function_exists('evo_cal_hidden')){\treturn (evo_cal_hidden())? true: false;\t}\r\n\t\t\treturn ( !empty($eventon->frontend->evo_options['evcal_cal_hide']) && $eventon->frontend->evo_options['evcal_cal_hide']=='yes')? true: false;\r\n\t\t}", "public function events_calendar_options() {\n\t\t$this->render_option_tabs( $this::get_pagetype_tab( 'tribe_events' ) );\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create an initial result set by executing the joins and picking fields.
protected function executeJoins() { // @TODO add support for all_fields. $fields = array(); foreach ($this->fields as $field_info) { $this->fieldsWithTable[$field_info['table'] . '.' . $field_info['field']] = $field_info; $fields[$field_info['table']][$field_info['field']] = NULL; } $results = array(); foreach ($this->tables as $table_alias => $table_info) { if (isset($table_info['join type'])) { $new_rows = array(); foreach ($results as $row) { $joined = FALSE; foreach ($this->databaseContents[$table_info['table']] as $candidate_row) { if ($row[$table_info['original_table_alias']][$table_info['original_field']] == $candidate_row[$table_info['added_field']]) { $joined = TRUE; $new_rows[] = $this->getNewRow($table_alias, $fields, $candidate_row, $row); } } if (!$joined && $table_info['join type'] == 'LEFT') { $new_rows[] = array($table_alias => $fields[$table_alias]) + $row; } } $results = $new_rows; } else { foreach ($this->databaseContents[$table_info['table']] as $candidate_row) { $results[] = $this->getNewRow($table_alias, $fields, $candidate_row); } } } return $results; }
[ "abstract protected function _createResultSet($results);", "public function selectQueryWithJoin() {\n\t\t\t// Replace markers in the condition\n\t\t$conditionForTtContent = self::finalizeCondition(self::$fullConditionForTable);\n\t\t$conditionForPages = self::finalizeCondition('###BASE_CONDITION### AND ###WORKSPACE_CONDITION###', 'pages');\n\t\t$additionalSelectFieldsForTtContent = $this->prepareAdditionalFields('tt_content');\n\t\t$additionalSelectFieldsForPages = $this->prepareAdditionalFields('pages', FALSE);\n\t\t$expectedResult = 'SELECT tt_content.uid, tt_content.header, pages.title AS tt_content$title, tt_content.pid, pages.uid AS pages$uid, pages.pid AS pages$pid, tt_content.sys_language_uid' . $additionalSelectFieldsForTtContent . $additionalSelectFieldsForPages . ' FROM tt_content AS tt_content INNER JOIN pages AS pages ON pages.uid = tt_content.pid AND ' . $conditionForPages . 'WHERE ' . $conditionForTtContent;\n\n\t\t$query = 'SELECT uid,header,pages.title AS tt_content.title FROM tt_content INNER JOIN pages ON pages.uid = tt_content.pid';\n\t\t$this->sqlParser->parseQuery($query);\n\t\t$this->sqlParser->setProviderData($this->settings);\n\t\t$this->sqlParser->addTypo3Mechanisms();\n\t\t$actualResult = $this->sqlParser->buildQuery();\n\n\t\t$this->assertEquals($expectedResult, $actualResult);\n\t}", "function getRecordset(){\n\t\t$this->afterInit();\n\t\t$this->prepareSql();\n\t\t$this->beforeExecuteSql();\n\t\t$this->executeSql();\n\t\tif ($this->metaDataFlag) $this->defineMetaData(); // generataes metadata in $this->metaData property\n\t}", "private function joins()\r\n {\r\n /* SELECT* FROM DOCUMENT WHERE DOCUMENT.\"id\" IN ( SELECT ID FROM scholar WHERE user_company_id = 40 )*/\r\n\r\n $query = EyufScholar::find()\r\n ->select('id')\r\n ->where([\r\n 'user_company_id' => 40\r\n ])\r\n ->sql();\r\n\r\n $table = EyufDocument::find()\r\n ->where('\"id\" IN ' . $query)\r\n ->all();\r\n\r\n $second = EyufDocument::findAll(EyufScholar::find()\r\n ->select('id')\r\n ->where([\r\n 'user_company_id' => 40\r\n ])\r\n );\r\n\r\n vdd($second);\r\n }", "protected function _init() {\n\t\tparent::_init();\n\n\t\tif (!$this->_result) {\n\t\t\treturn;\n\t\t}\n\t\t$this->_columns = $this->_columnMap();\n\n\t\tif (!$this->_query) {\n\t\t\treturn;\n\t\t}\n\t\t$this->_keyIndex = $this->_keyIndex();\n\n\t\t$this->_dependencies = Set::expand(Set::normalize(\n\t\t\tarray_filter(array_keys($this->_columns))\n\t\t));\n\t\t$this->_relationships = $this->_query->relationships();\n\t}", "function joinWithResultSet(&$otherResultSet) \n\t{\n\t\tif($this->debug) echo(\"joinWithResultSet BEGIN<br>\") ;\n\t\tif($this->getRowCount()<1) {\n\t\t\tdebug_print(\"Joining emtpy ResultSet (results in empty ResultSet)\");\n\t\t}\n\t\t\t\n\t\t$newResultSet=new ResultSet();\n\t\t// columns\n\t\t$newResultSet->setColumnNames(array_merge ($this->getColumnNames(), $otherResultSet->getColumnNames()));\n\t\t$newResultSet->setColumnAliases(array_merge ($this->getColumnAliases(), $otherResultSet->getColumnAliases()));\n\t\t$newResultSet->setColumnTables(array_merge ($this->getColumnTables(), $otherResultSet->getColumnTables()));\n\t\t$newResultSet->setColumnTableAliases(array_merge ($this->getColumnTableAliases(), $otherResultSet->getColumnTableAliases()));\n\t\t$newResultSet->setColumnTypes(array_merge ($this->getColumnTypes(), $otherResultSet->getColumnTypes()));\n\t\t$newResultSet->setColumnDefaultValues(array_merge ($this->getColumnDefaultValues(), $otherResultSet->getColumnDefaultValues()));\n\t\t$newResultSet->setColumnFunctions(array_merge ($this->getColumnFunctions(), $otherResultSet->getColumnFunctions()));\n\t\t$newResultSet->colFuncsExecuted=(array_merge ($this->colFuncsExecuted, $otherResultSet->colFuncsExecuted));\n\t\t\n\t\t$otherResultSet->reset();\n\t\t$this->reset();\n\t\t$newResultSet->reset();\n\t\t\n\t\twhile($this->next()) \n\t\t{\n\t\t\t$otherResultSet->reset();\n\t\t\twhile($otherResultSet->next()) \n\t\t\t{\n\t\t\t\t$row=array_merge($this->getCurrentValues(),$otherResultSet->getCurrentValues());\n\t\t\t\t$newResultSet->appendRow($row);\n\t\t\t}\n\t\t}\n\t\treturn $newResultSet;\n\t}", "protected function join_temporary_results($data)\n {\n foreach ($this->requested as $requested_key => $request) {\n $order_by = [];\n $order_inside_array = [];\n $pivot_table = null;\n $relation = $this->relationships[$request['request']];\n $this->load->model($relation['foreign_model'], $relation['foreign_model_name']);\n $foreign_key = $relation['foreign_key'];\n $local_key = $relation['local_key'];\n $foreign_table = $relation['foreign_table'];\n $type = $relation['relation'];\n $relation_key = $relation['relation_key'];\n \n if ($type == 'has_many_pivot') {\n $pivot_table = $relation['pivot_table'];\n $pivot_local_key = $relation['pivot_local_key'];\n $pivot_foreign_key = $relation['pivot_foreign_key'];\n $get_relate = $relation['get_relate'];\n }\n\n if (array_key_exists('order_inside', $request['parameters'])) {\n //$order_inside = $request['parameters']['order_inside'];\n $elements = explode(',', $request['parameters']['order_inside']);\n foreach ($elements as $element) {\n $order = explode(' ', $element);\n if (sizeof($order)==2) {\n $order_inside_array[] = array(trim($order[0]), trim($order[1]));\n } else {\n $order_inside_array[] = array(trim($order[0]), 'desc');\n }\n }\n }\n\n\n $local_key_values = [];\n foreach ($data as $key => $element) {\n if (isset($element[$local_key]) and !empty($element[$local_key])) {\n $id = $element[$local_key];\n $local_key_values[$key] = $id;\n }\n }\n if (!$local_key_values) {\n $data[$key][$relation_key] = null;\n continue;\n }\n if (!isset($pivot_table)) {\n $sub_results = $this->{$relation['foreign_model_name']};\n $select = [];\n $select[] = '`'.$foreign_table.'`.`'.$foreign_key.'`';\n if (!empty($request['parameters'])) {\n if (array_key_exists('fields', $request['parameters'])) {\n if ($request['parameters']['fields'] == '*count*') {\n $the_select = '*count*';\n $sub_results = (isset($the_select)) ? $sub_results->fields($the_select) : $sub_results;\n $sub_results = $sub_results->fields($foreign_key);\n } else {\n $fields = explode(',', $request['parameters']['fields']);\n foreach ($fields as $field) {\n $select[] = (strpos($field, '.') === false) ? '`' . $foreign_table . '`.`' . trim($field) . '`' : trim($field);\n }\n $the_select = implode(',', $select);\n $sub_results = (isset($the_select)) ? $sub_results->fields($the_select) : $sub_results;\n }\n }\n if (array_key_exists('fields', $request['parameters']) && ($request['parameters']['fields']=='*count*')) {\n $sub_results->group_by('`' . $foreign_table . '`.`' . $foreign_key . '`');\n }\n \n if (array_key_exists('where', $request['parameters']) || array_key_exists('non_exclusive_where', $request['parameters'])) {\n $the_where = array_key_exists('where', $request['parameters']) ? 'where' : 'non_exclusive_where';\n }\n \n $sub_results = isset($the_where) ? $sub_results->where($request['parameters'][$the_where], null, null, false, false, true) : $sub_results;\n\n if (isset($order_inside_array)) {\n foreach ($order_inside_array as $order_by_inside) {\n $sub_results = $sub_results->order_by($order_by_inside[0], $order_by_inside[1]);\n }\n }\n\n //Add nested relation\n if (array_key_exists('with', $request['parameters'])) {\n // Do we have many nested relation\n if (is_array($request['parameters']['with']) && isset($request['parameters']['with'][0])&& is_array($request['parameters']['with'][0])) {\n foreach ($request['parameters']['with'] as $with) {\n $with_relation = array_shift($with);\n $sub_results->with($with_relation, array($with));\n }\n } else {\n $with_relation = array_shift($request['parameters']['with']);\n $sub_results->with($with_relation, array($request['parameters']['with']));\n }\n }\n }\n\n $sub_results = $sub_results->where($foreign_key, $local_key_values)->all();\n } else {\n $this->database->join($pivot_table, $foreign_table.'.'.$foreign_key.' = '.$pivot_table.'.'.$pivot_foreign_key, 'left');\n $this->database->join($this->table, $pivot_table.'.'.$pivot_local_key.' = '.$this->table.'.'.$local_key, 'left');\n $this->database->select($foreign_table.'.'.$foreign_key);\n $this->database->select($pivot_table.'.'.$pivot_local_key);\n if (!empty($request['parameters'])) {\n if (array_key_exists('fields', $request['parameters'])) {\n if ($request['parameters']['fields'] == '*count*') {\n $this->database->select('COUNT(`'.$foreign_table.'`.`'.$foreign_key.'`) as counted_rows, `' . $foreign_table . '`.`' . $foreign_key . '`', false);\n } else {\n $fields = explode(',', $request['parameters']['fields']);\n $select = array();\n foreach ($fields as $field) {\n $select[] = (strpos($field, '.') === false) ? '`' . $foreign_table . '`.`' . trim($field) . '`' : trim($field);\n }\n $the_select = implode(',', $select);\n $this->database->select($the_select);\n }\n }\n\n if (array_key_exists('where', $request['parameters']) || array_key_exists('non_exclusive_where', $request['parameters'])) {\n $the_where = array_key_exists('where', $request['parameters']) ? 'where' : 'non_exclusive_where';\n\n $this->database->where($request['parameters'][$the_where], null, null, false, false, true);\n }\n }\n \n $this->database->where_in($pivot_table.'.'.$pivot_local_key, $local_key_values);\n\n if (!empty($order_inside_array)) {\n $order_inside_str = '';\n foreach ($order_inside_array as $order_by_inside) {\n $order_inside_str .= (strpos($order_by_inside[0], '.')=== false) ? '`'.$foreign_table.'`.`'.$order_by_inside[0].' '.$order_by_inside[1] : $order_by_inside[0].' '.$order_by_inside[1];\n $order_inside_str .= ',';\n }\n $order_inside_str = rtrim($order_inside_str, \",\");\n $this->database->order_by($order_inside_str);\n }\n $sub_results = $this->database->get($foreign_table)->result_array();\n $this->database->reset_query();\n }\n\n if (isset($sub_results) && !empty($sub_results)) {\n $subs = [];\n foreach ($sub_results as $result) {\n $result_array = (array)$result;\n $the_foreign_key = $result_array[$foreign_key];\n if (isset($pivot_table)) {\n $the_local_key = $result_array[$pivot_local_key];\n if (isset($get_relate) and $get_relate === true) {\n $subs[$the_local_key][$the_foreign_key] = $this->{$relation['foreign_model']}->where($foreign_key, $result[$foreign_key])->get();\n } else {\n $subs[$the_local_key][$the_foreign_key] = $result;\n }\n } else {\n if ($type == 'has_one') {\n $subs[$the_foreign_key] = $result;\n } else {\n $subs[$the_foreign_key][] = $result;\n }\n }\n }\n $sub_results = $subs;\n\n foreach ($local_key_values as $key => $value) {\n if (array_key_exists($value, $sub_results)) {\n $data[$key][$relation_key] = $sub_results[$value];\n } else {\n if (array_key_exists('where', $request['parameters'])) {\n unset($data[$key]);\n }\n }\n }\n } else {\n $data[$key][$relation_key] = null;\n }\n if (array_key_exists('order_by', $request['parameters'])) {\n $elements = explode(',', $request['parameters']['order_by']);\n if (sizeof($elements) == 2) {\n $order_by[$relation_key] = array(trim($elements[0]), trim($elements[1]));\n } else {\n $order_by[$relation_key] = array(trim($elements[0]), 'desc');\n }\n }\n unset($this->requested[$requested_key]);\n }\n if (!empty($order_by)) {\n foreach ($order_by as $field => $row) {\n list($key, $value) = $row;\n $data = $this->_build_sorter($data, $field, $key, $value);\n }\n }\n return $data;\n }", "abstract public function hydrateResultSet($stmt);", "protected function join_temporary_results($data)\n {\n $order_by = array();\n $order_inside_array = array();\n //$order_inside = '';\n foreach($this->_requested as $requested_key => $request)\n {\n $pivot_table = NULL;\n $relation = $this->_relationships[$request['request']];\n $this->load->model($relation['foreign_model'],$relation['foreign_model_name']);\n $foreign_key = $relation['foreign_key'];\n $local_key = $relation['local_key'];\n $foreign_table = $relation['foreign_table'];\n $type = $relation['relation'];\n $relation_key = $relation['relation_key'];\n if($type=='has_many_pivot')\n {\n $pivot_table = $relation['pivot_table'];\n $pivot_local_key = $relation['pivot_local_key'];\n $pivot_foreign_key = $relation['pivot_foreign_key'];\n $get_relate = $relation['get_relate'];\n }\n\n if(array_key_exists('order_inside',$request['parameters']))\n {\n //$order_inside = $request['parameters']['order_inside'];\n $elements = explode(',', $request['parameters']['order_inside']);\n foreach($elements as $element)\n {\n $order = explode(' ',$element);\n if(sizeof($order)==2)\n {\n $order_inside_array[] = array(trim($order[0]), trim($order[1]));\n }\n else\n {\n $order_inside_array[] = array(trim($order[0]), 'desc');\n }\n }\n\n }\n\n\n $local_key_values = array();\n foreach($data as $key => $element)\n {\n if(isset($element[$local_key]) and !empty($element[$local_key]))\n {\n $id = $element[$local_key];\n $local_key_values[$key] = $id;\n }\n }\n if(!$local_key_values)\n {\n $data[$key][$relation_key] = NULL;\n continue;\n }\n if(!isset($pivot_table))\n {\n $sub_results = $this->{$relation['foreign_model_name']};\n $select = array();\n $select[] = '`'.$foreign_table.'`.`'.$foreign_key.'`';\n if(!empty($request['parameters']))\n {\n if(array_key_exists('fields',$request['parameters']))\n {\n if($request['parameters']['fields'] == '*count*')\n {\n $the_select = '*count*';\n $sub_results = (isset($the_select)) ? $sub_results->fields($the_select) : $sub_results;\n $sub_results = $sub_results->fields($foreign_key);\n }\n else\n {\n $fields = explode(',', $request['parameters']['fields']);\n foreach ($fields as $field)\n {\n $select[] = (strpos($field,'.')===FALSE) ? '`' . $foreign_table . '`.`' . trim($field) . '`' : trim($field);\n }\n $the_select = implode(',', $select);\n $sub_results = (isset($the_select)) ? $sub_results->fields($the_select) : $sub_results;\n }\n\n }\n if(array_key_exists('fields',$request['parameters']) && ($request['parameters']['fields']=='*count*'))\n {\n $sub_results->group_by('`' . $foreign_table . '`.`' . $foreign_key . '`');\n }\n if(array_key_exists('where',$request['parameters']) || array_key_exists('non_exclusive_where',$request['parameters']))\n {\n $the_where = array_key_exists('where', $request['parameters']) ? 'where' : 'non_exclusive_where';\n }\n $sub_results = isset($the_where) ? $sub_results->where($request['parameters'][$the_where],NULL,NULL,FALSE,FALSE,TRUE) : $sub_results;\n\n if(isset($order_inside_array))\n {\n foreach($order_inside_array as $order_by_inside)\n {\n $sub_results = $sub_results->order_by($order_by_inside[0],$order_by_inside[1]);\n }\n }\n\n //Add nested relation\n if(array_key_exists('with',$request['parameters']))\n {\n // Do we have many nested relation\n if(is_array($request['parameters']['with']) && isset($request['parameters']['with'][0])&& is_array($request['parameters']['with'][0]))\n {\n foreach ($request['parameters']['with'] as $with)\n {\n $with_relation = array_shift($with);\n $sub_results->with($with_relation, array($with));\n }\n }\n else // single nested relation\n {\n $with_relation = array_shift($request['parameters']['with']);\n $sub_results->with($with_relation,array($request['parameters']['with']));\n }\n }\n }\n\n $sub_results = $sub_results->where($foreign_key, $local_key_values)->get_all();\n }\n else\n {\n $this->_database->join($pivot_table, $foreign_table.'.'.$foreign_key.' = '.$pivot_table.'.'.$pivot_foreign_key, 'left');\n $this->_database->join($this->table, $pivot_table.'.'.$pivot_local_key.' = '.$this->table.'.'.$local_key,'left');\n $this->_database->select($foreign_table.'.'.$foreign_key);\n $this->_database->select($pivot_table.'.'.$pivot_local_key);\n if(!empty($request['parameters']))\n {\n if(array_key_exists('fields',$request['parameters']))\n {\n if($request['parameters']['fields'] == '*count*')\n {\n $this->_database->select('COUNT(`'.$foreign_table.'`.`'.$foreign_key.'`) as counted_rows, `' . $foreign_table . '`.`' . $foreign_key . '`', FALSE);\n }\n else\n {\n\n $fields = explode(',', $request['parameters']['fields']);\n $select = array();\n foreach ($fields as $field) {\n $select[] = (strpos($field,'.')===FALSE) ? '`' . $foreign_table . '`.`' . trim($field) . '`' : trim($field);\n }\n $the_select = implode(',', $select);\n $this->_database->select($the_select);\n }\n }\n\n if(array_key_exists('where',$request['parameters']) || array_key_exists('non_exclusive_where',$request['parameters']))\n {\n $the_where = array_key_exists('where',$request['parameters']) ? 'where' : 'non_exclusive_where';\n\n $this->_database->where($request['parameters'][$the_where],NULL,NULL,FALSE,FALSE,TRUE);\n }\n }\n $this->_database->where_in($pivot_table.'.'.$pivot_local_key,$local_key_values);\n\n if(!empty($order_inside_array))\n {\n $order_inside_str = '';\n foreach($order_inside_array as $order_by_inside)\n {\n $order_inside_str .= (strpos($order_by_inside[0],',')=== false) ? '`'.$foreign_table.'`.`'.$order_by_inside[0].' '.$order_by_inside[1] : $order_by_inside[0].' '.$order_by_inside[1];\n $order_inside_str .= ',';\n }\n $order_inside_str = rtrim($order_inside_str, \",\");\n $this->_database->order_by(rtrim($order_inside_str,\",\"));\n }\n $sub_results = $this->_database->get($foreign_table)->result_array();\n $this->_database->reset_query();\n }\n\n if(isset($sub_results) && !empty($sub_results)) {\n $subs = array();\n\n foreach ($sub_results as $result) {\n $result_array = (array)$result;\n $the_foreign_key = $result_array[$foreign_key];\n if(isset($pivot_table))\n {\n $the_local_key = $result_array[$pivot_local_key];\n if(isset($get_relate) and $get_relate === TRUE)\n {\n $subs[$the_local_key][$the_foreign_key] = $this->{$relation['foreign_model']}->where($foreign_key, $result[$foreign_key])->get();\n }\n else\n {\n $subs[$the_local_key][$the_foreign_key] = $result;\n }\n }\n else\n {\n if ($type == 'has_one') {\n $subs[$the_foreign_key] = $result;\n } else {\n $subs[$the_foreign_key][] = $result;\n }\n }\n\n\n }\n $sub_results = $subs;\n\n foreach($local_key_values as $key => $value)\n {\n if(array_key_exists($value,$sub_results))\n {\n $data[$key][$relation_key] = $sub_results[$value];\n }\n else\n {\n if(array_key_exists('where',$request['parameters']))\n {\n unset($data[$key]);\n }\n }\n }\n }\n else\n {\n $data[$key][$relation_key] = NULL;\n }\n if(array_key_exists('order_by',$request['parameters']))\n {\n $elements = explode(',', $request['parameters']['order_by']);\n if(sizeof($elements)==2)\n {\n $order_by[$relation_key] = array(trim($elements[0]), trim($elements[1]));\n }\n else\n {\n $order_by[$relation_key] = array(trim($elements[0]), 'desc');\n }\n }\n unset($this->_requested[$requested_key]);\n }\n if(!empty($order_by))\n {\n foreach($order_by as $field => $row)\n {\n list($key, $value) = $row;\n $data = $this->_build_sorter($data, $field, $key, $value);\n }\n }\n return $data;\n }", "function mFetch_initialize ( ) {\n\t\t$rta =& $this->refTableAlias;\n\t\t$field_csv = $rta.'.'.implode( ','.$rta.'.', $this->refAllFields );\n\t\t$query = $this->get_reference_select_clause ( $field_csv );\n\t\t$this->dbRes = $GLOBALS['TYPO3_DB']->sql_query ( $query );\n\t}", "abstract protected function _createResultSet($items);", "private function populate() {\n if (isset($this->sqlFromWhere))\n return;\n\n $this->sqlFromWhere = [];\n $this->fromWhereParamFilters = [];\n\n if ($this->a & self::A_LOOKUP_TABLE == 0) {\n $this->whereParams = [];\n return;\n }\n\n $this->parseWheres();\n $this->whereParams[self::FILTER_LIMIT] = [$this->offset, $this->count];\n $this->whereParams[self::FILTER_LIMIT_SUM] = [$this->offset + $this->count];\n\n\n if ($this->a & self::A_BLOCK_TABLE) {\n /** @var string[] $wheres */\n $wheres = [self::FILTER_TIME, self::FILTER_USER, self::FILTER_WORLD, self::FILTER_COORDS, self::FILTER_ROLLBACK];\n /** @var string $sql */\n $sql = \"FROM `\" . $this->prefix . \"block` AS c\"\n . \" LEFT JOIN `\" . $this->prefix . \"user` AS u ON c.user = u.rowid LEFT JOIN `\" . $this->prefix . \"world` AS w ON c.wid = w.rowid\";\n\n if ($this->a & (self::A_BLOCK_MATERIAL)) {\n $sql .= \" LEFT JOIN `\" . $this->prefix . \"material_map` AS mm ON c.action<>3 AND c.type=mm.rowid\";\n if ($this->useBlockdata)\n $sql .= \" LEFT JOIN `\" . $this->prefix . \"blockdata_map` AS dm ON c.data<>0 AND c.action<>3 AND c.data=dm.rowid\";\n $wheres[] = self::FILTER_MATERIAL;\n }\n if ($this->a & self::A_KILL) {\n $sql .= \" LEFT JOIN `\" . $this->prefix . \"entity_map` AS em ON c.action=3 AND c.type<>0 AND c.type=em.rowid\";\n $sql .= \" LEFT JOIN `\" . $this->prefix . \"user` AS um ON c.data<>0 AND c.action=3 AND c.type=0 AND c.data=um.rowid\";\n $wheres[] = self::FILTER_ENTITY;\n }\n\n // If action=0, 1, 2, and 3 are not on at the same time\n $a = null;\n if (($this->a & self::A_BLOCK_TABLE) != self::A_BLOCK_TABLE) {\n $aList = [];\n if ($this->a & self::A_BLOCK_MINE)\n $aList[] = \"0\";\n if ($this->a & self::A_BLOCK_PLACE)\n $aList[] = \"1\";\n if ($this->a & self::A_CLICK)\n $aList[] = \"2\";\n if ($this->a & self::A_KILL)\n $aList[] = \"3\";\n $a = \"c.action IN (\" . join(\",\", $aList) . \")\";\n }\n\n $this->sqlFromWhere[self::BLOCK] = $sql . $this->generateWhere(self::BLOCK, $wheres, $a);\n }\n\n if ($this->a & self::A_CONTAINER_TABLE) {\n /** @var string[] $wheres */\n $wheres = [self::FILTER_TIME, self::FILTER_USER, self::FILTER_WORLD, self::FILTER_COORDS, self::FILTER_ROLLBACK, self::FILTER_MATERIAL];\n /** @var string $sql */\n $sql = \"FROM `\" . $this->prefix . \"container` AS c\"\n . \" LEFT JOIN `\" . $this->prefix . \"user` AS u ON c.user=u.rowid LEFT JOIN `\" . $this->prefix . \"world` AS w ON c.wid=w.rowid\"\n . \" LEFT JOIN `\" . $this->prefix . \"material_map` AS mm ON c.action<>3 AND c.type=mm.rowid\";\n $a = null;\n if (($this->a & self::A_CONTAINER_TABLE) != self::A_CONTAINER_TABLE) {\n if ($this->a & self::A_CONTAINER_OUT)\n $a = \"c.action=0\";\n if ($this->a & self::A_CONTAINER_IN)\n $a = \"c.action=1\";\n }\n\n $this->sqlFromWhere[self::CONTAINER] = $sql . $this->generateWhere(self::CONTAINER, $wheres, $a);\n }\n\n if ($this->a & self::A_CHAT) {\n /** @var string[] $wheres */\n $wheres = [self::FILTER_TIME, self::FILTER_USER, self::W_KEYWORD_MESSAGE];\n /** @var string $sql */\n $sql = \"FROM `\" . $this->prefix . \"chat` AS c\"\n . \" LEFT JOIN `\" . $this->prefix . \"user` AS u ON c.user=u.rowid\";\n\n $this->sqlFromWhere[self::CHAT] = $sql . $this->generateWhere(self::CHAT, $wheres);\n }\n\n if ($this->a & self::A_COMMAND) {\n /** @var string[] $wheres */\n $wheres = [self::FILTER_TIME, self::FILTER_USER, self::W_KEYWORD_MESSAGE];\n /** @var string $sql */\n $sql = \"FROM `\" . $this->prefix . \"command` AS c\"\n . \" LEFT JOIN `\" . $this->prefix . \"user` AS u ON c.user=u.rowid\";\n\n $this->sqlFromWhere[self::COMMAND] = $sql . $this->generateWhere(self::COMMAND, $wheres);\n }\n\n if ($this->a & self::A_SESSION) {\n /** @var string[] $wheres */\n $wheres = [self::FILTER_TIME, self::FILTER_USER, self::FILTER_WORLD, self::FILTER_COORDS];\n /** @var string $sql */\n $sql = \"FROM `\" . $this->prefix . \"session` AS c\"\n . \" LEFT JOIN `\" . $this->prefix . \"user` AS u ON c.user=u.rowid LEFT JOIN `\" . $this->prefix . \"world` AS w ON c.wid=w.rowid\";\n\n $this->sqlFromWhere[self::SESSION] = $sql . $this->generateWhere(self::SESSION, $wheres);\n }\n\n if ($this->a & self::A_USERNAME) {\n /** @var string[] $wheres */\n $wheres = [self::FILTER_TIME, self::FILTER_USER, self::W_KEYWORD_USER];\n /** @var string $sql */\n $sql = \"FROM `\" . $this->prefix . \"username_log` AS c\"\n . \" LEFT JOIN `\" . $this->prefix . \"user` AS u ON c.uuid=u.uuid\";\n\n $this->sqlFromWhere[self::USERNAME] = $sql . $this->generateWhere(self::USERNAME, $wheres);\n }\n }", "static function fetch($conditions = [ ], $joins = [ ], $debug = false) {\n\t\t\tself::$bind_params = [ ];\n\t\t\t$table = self::getTableName();\n\t\t\t$cols = &self::getTableCols();\n\t\t\t\n\t\t\tif ((is_array($conditions) && count($conditions) == 0) ||\n\t\t\t\t(!is_array($conditions) && !($conditions instanceof Condition))) {\n\t\t\t\t$res = new TMResult(TMResult::InvalidConditions);\n\t\t\t\treturn $res;\n\t\t\t}\n\t\t\t$errors = self::validateConditions($conditions);\n\t\t\tif (count($errors)) {\n\t\t\t\t$res = new TMResult(TMResult::InvalidConditions);\n\t\t\t\t$res->errors = $errors;\n\t\t\t\treturn $res;\n\t\t\t}\n\t\t\t\n\t\t\tforeach($cols as $colname => $col) {\n\t\t\t\t$s = $col->type == 'timestamp' ? \"unix_timestamp(a.$colname)\" : \"a.$colname\";\n\t\t\t\t$q []= \"$s as a_{$colname}\";\n\t\t\t}\n\t\t\t$query_select_columns = [ implode(', ', $q) ];\n\t\t\t\n\t\t\t$query_from_tables = [ ];\n\t\t\t$query_joins = [ ];\n\t\t\t$i = 0;\n\t\t\t\n\t\t\t$add_join = function(&$join, &$parent = null) use (&$i, &$query_select_columns, &$query_joins, &$add_join) {\n\t\t\t\t$join->prefix = $prefix = chr(98 + $i++);\n\t\t\t\t$join->parent = $parent;\n\t\t\t\t$join->stalled = false;\n\t\t\t\t$parent_prefix = ($parent ? $parent->prefix : 'a');\n\t\t\t\t\n\t\t\t\t$cla = $join->class;\n\t\t\t\t$jtable = $cla::getTableName();\n\t\t\t\t$cols = $cla::getTableCols();\n\t\t\t\t\n\t\t\t\t$q = [ ];\n\t\t\t\tforeach ($cols as $colname => $col) {\n\t\t\t\t\t$s = ($col->type == 'timestamp' ? \"unix_timestamp($prefix.$colname)\" : \"$prefix.$colname\");\n\t\t\t\t\t$q []= \"$s as {$prefix}_{$colname}\";\n\t\t\t\t}\n\t\t\t\t$query_select_columns []= implode(', ', $q);\n\t\t\t\t\n\t\t\t\t$join_conditions = [ ];\n\t\t\t\tforeach ($join->cols as $k => $v) {\n\t\t\t\t\tif (is_string($k)) $join_conditions []= \"$parent_prefix.$k = $prefix.$v\";\n\t\t\t\t\telse $join_conditions []= \"$parent_prefix.$v = $prefix.$v\";\n\t\t\t\t}\n\t\t\t\t$query_joins []= \"left join $jtable as $prefix on \" . implode(' and ', $join_conditions);\n\t\t\t\t\n\t\t\t\tforeach($join->joins as $k => &$j) {\n\t\t\t\t\tif (!($j instanceof Join)) unset($join->joins[$k]);\n\t\t\t\t\telse $add_join($j, $join);\n\t\t\t\t}\n\t\t\t};\n\t\t\t\n\t\t\tif (!is_array($joins)) $joins = [ $joins ];\n\t\t\tforeach ($joins as $k => &$j) {\n\t\t\t\tif (!($j instanceof Join)) unset($joins[$k]);\n\t\t\t\telse $add_join($j);\n\t\t\t}\n\t\t\n\t\t\t$query_select_columns = implode(', ', $query_select_columns);\n\t\t\t$query_joins = implode(' ', $query_joins);\n\t\t\t\n\t\t\t$cond = self::getCondStr_AndAddBindParams($conditions, 'a');\n\t\t\t\n\t\t\t$q = \"select $query_select_columns from $table as a $query_joins $cond\";\n\t\t\tif ($debug) var_dump($q);\n\t\t\t$st = self::$pdo->prepare($q);\n\t\t\t\n\t\t\tself::bindBindParams($st);\n\t\t\t\n\t\t\t$r = $st->execute();\n\t\t\tif ($r === false) {\n\t\t\t\t$res = new TMResult(TMResult::InternalError);\n\t\t\t\t$res->errors = $st->errorInfo();\n\t\t\t\treturn $res;\n\t\t\t}\n\t\t\t\n\t\t\t$base_objs = [ ];\n\t\t\t$increments_from_stalled_joins = [ ];\n\t\t\t\n\t\t\t$destall = function(&$join) use (&$increments_from_stalled_joins, &$destall) {\n\t\t\t\tforeach($join->joins as &$_j)\n\t\t\t\t\t$destall($_j);\n\t\t\t\t$join->stalled = false;\n\t\t\t\tunset($increments_from_stalled_joins[$join->prefix]);\n\t\t\t};\n\t\t\t\n\t\t\t$recursively_add_row = function(&$j, &$parent_obj) use (&$row, &$increments_from_stalled_joins, &$destall, &$recursively_add_row) {\n\t\t\t\tif ($j->stalled) return;\n\t\t\t\t\n\t\t\t\t$cla = $j->class;\n\t\t\t\t$table = $cla::getTableName();\n\t\t\t\t$prefix = $j->prefix;\n\t\t\t\t\n\t\t\t\t$cols = $cla::getTableCols();\n\t\t\t\t$col_keys = array_keys($cols);\n\t\t\t\t$id_column = array_shift($col_keys);\n\t\t\t\tif ($row[\"{$prefix}_$id_column\"] == null) {\n\t\t\t\t\t$j->stalled = true;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (isset($parent_obj->$table)) $n = count($parent_array = $parent_obj->$table);\n\t\t\t\telse $n = 0;\n\t\t\t\t\n\t\t\t\t// Check for cyclic repetition\n\t\t\t\tif ($n > 1 and !$parent_array[0]->wouldDifferFromRow($row, $prefix)) {\n\t\t\t\t\t$j->stalled = true;\n\t\t\t\t\t$increments_from_stalled_joins[$prefix] = $n;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// If new, add, destall descendants, & recurse\n\t\t\t\tif (!$n or $parent_array[$n - 1]->wouldDifferFromRow($row, $prefix)) {\n\t\t\t\t\t$obj = $cla::objFromRow($row, $prefix);\n\t\t\t\t\tif (!$obj) ; // Bad\n\t\t\t\t\t\n\t\t\t\t\t$parent_obj->appendToArray($table, $obj);\n\t\t\t\t\tforeach ($j->joins as &$_j) $destall($_j);\n\t\t\t\t\tforeach ($j->joins as &$_j) $recursively_add_row($_j, $obj);\n\t\t\t\t}\n\t\t\t};\n\t\t\t\n\t\t\t$row = $st->fetch(PDO::FETCH_ASSOC);\n\t\t\twhile ($row) {\n\t\t\t\t$n = count($base_objs);\n\t\t\t\tif (!$n or $base_objs[$n - 1]->wouldDifferFromRow($row, 'a')) {\n\t\t\t\t\tif (!$obj = self::objFromRow($row, 'a'))\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t$base_objs []= &$obj;\n\t\t\t\t\tforeach ($joins as &$_j) $destall($_j);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t$obj = &$base_objs[$n - 1];\n\t\t\t\t\n\t\t\t\tforeach($joins as &$_j)\n\t\t\t\t\t$recursively_add_row($_j, $obj);\n\t\t\t\t$inc = 1;\n\t\t\t\tforeach($increments_from_stalled_joins as $x) $inc *= $x;\n\t\t\t\tfor ($i=0; $i < $inc; $i++)\n\t\t\t\t\t$row = $st->fetch(PDO::FETCH_ASSOC);\n\t\t\t\tunset($obj);\n\t\t\t}\n\t\t\t\n\t\t\t$res = new TMResult(TMResult::Success);\n\t\t\t$res->result = &$base_objs;\n\t\t\treturn $res;\n\t\t}", "public function getResults(){\n $stmt = $this->db->prepare(\"select data.*,\n link.*,\n info.* \n FROM data \n INNER JOIN link ON (link.data_id = data.id)\n INNER JOIN info ON (info.id = link.info_id)\");\n }", "abstract protected function initQuery();", "protected function _initSelectFields()\n {\n $columns = $this->_select->getPart(Zend_Db_Select::COLUMNS);\n $columnsToSelect = array();\n foreach ($columns as $columnEntry) {\n list($correlationName, $column, $alias) = $columnEntry;\n if ($correlationName !== 'main_table') { // Add joined fields to select\n if ($column instanceof Zend_Db_Expr) {\n $column = $column->__toString();\n }\n $key = ($alias !== null ? $alias : $column);\n $columnsToSelect[$key] = $columnEntry;\n }\n }\n\n $columns = $columnsToSelect;\n\n $columnsToSelect = array_keys($columnsToSelect);\n\n if ($this->_fieldsToSelect !== null) {\n $insertIndex = 0;\n foreach ($this->_fieldsToSelect as $alias => $field) {\n if (!is_string($alias)) {\n $alias = null;\n }\n\n if ($field instanceof Zend_Db_Expr) {\n $column = $field->__toString();\n } else {\n $column = $field;\n }\n\n if (($alias !== null && in_array($alias, $columnsToSelect)) ||\n // If field already joined from another table\n ($alias === null && isset($alias, $columnsToSelect))) {\n continue;\n }\n\n $columnEntry = array('main_table', $field, $alias);\n array_splice($columns, $insertIndex, 0, array($columnEntry)); // Insert column\n $insertIndex ++;\n\n }\n } else {\n array_unshift($columns, array('main_table', '*', null));\n }\n\n $this->_select->setPart(Zend_Db_Select::COLUMNS, $columns);\n\n return $this;\n }", "protected function joinTemporaryResults($data)\n {\n $order_by = array();\n $order_inside_array = array();\n //$order_inside = '';\n $this->_database->reset_query();\n foreach($this->_requested as $requested_key => $request)\n {\n $pivot_table = NULL;\n $relation = $this->_relationships[$request['request']];\n $this->load->model($relation['foreign_model']);\n $foreign_model_name = (substr($relation['foreign_model'],strpos($relation['foreign_model'],'/')>0?strpos($relation['foreign_model'],'/')+1:0));\n $foreign_key = $relation['foreign_key'];\n $local_key = $relation['local_key'];\n $foreign_table = $relation['foreign_table'];\n $type = $relation['relation'];\n $relation_key = $relation['relation_key'];\n if($type=='has_many_pivot')\n {\n $pivot_table = $relation['pivot_table'];\n $pivot_local_key = $relation['pivot_local_key'];\n $pivot_foreign_key = $relation['pivot_foreign_key'];\n $get_relate = $relation['get_relate'];\n }\n\n if(array_key_exists('order_inside',$request['parameters']))\n {\n //$order_inside = $request['parameters']['order_inside'];\n $elements = explode(',', $request['parameters']['order_inside']);\n foreach($elements as $element)\n {\n $order = explode(' ',$element);\n if(sizeof($order)==2)\n {\n $order_inside_array[] = array(trim($order[0]), trim($order[1]));\n }\n else\n {\n $order_inside_array[] = array(trim($order[0]), 'desc');\n }\n }\n\n }\n\n\n $local_key_values = array();\n foreach($data as $key => $element)\n {\n if(isset($element[$local_key]) and !empty($element[$local_key]))\n {\n $id = $element[$local_key];\n $local_key_values[$key] = $id;\n }\n }\n if(!$local_key_values)\n {\n $data[$key][$relation_key] = NULL;\n continue;\n }\n if(!isset($pivot_table))\n {\n $sub_results = $this->{$foreign_model_name};\n $select = array();\n $select[] = '`'.$foreign_table.'`.`'.$foreign_key.'`';\n if(!empty($request['parameters']))\n {\n if(array_key_exists('fields',$request['parameters']))\n {\n if($request['parameters']['fields'] == '*count*')\n {\n $the_select = '*count*';\n $sub_results = (isset($the_select)) ? $sub_results->fields($the_select) : $sub_results;\n $sub_results = $sub_results->fields($foreign_key);\n }\n else\n {\n $fields = explode(',', $request['parameters']['fields']);\n foreach ($fields as $field)\n {\n $select[] = (strpos($field,'.')===FALSE) ? '`' . $foreign_table . '`.`' . trim($field) . '`' : trim($field);\n }\n $the_select = implode(',', $select);\n $sub_results = (isset($the_select)) ? $sub_results->fields($the_select) : $sub_results;\n }\n\n }\n if(array_key_exists('fields',$request['parameters']) && ($request['parameters']['fields']=='*count*'))\n {\n $sub_results->groupBy('`' . $foreign_table . '`.`' . $foreign_key . '`');\n }\n if(array_key_exists('where',$request['parameters']) || array_key_exists('non_exclusive_where',$request['parameters']))\n {\n $the_where = array_key_exists('where', $request['parameters']) ? 'where' : 'non_exclusive_where';\n }\n $sub_results = isset($the_where) ? $sub_results->where($request['parameters'][$the_where],NULL,NULL,FALSE,FALSE,TRUE) : $sub_results;\n\n if(isset($order_inside_array))\n {\n foreach($order_inside_array as $order_by_inside)\n {\n $sub_results = $sub_results->order_by($order_by_inside[0],$order_by_inside[1]);\n }\n }\n\n //Add nested relation\n if(array_key_exists('with',$request['parameters']))\n {\n // Do we have many nested relation\n if(is_array($request['parameters']['with']) && isset($request['parameters']['with'][0]))\n {\n foreach ($request['parameters']['with'] as $with)\n {\n $with_relation = array_shift($with);\n $sub_results->with($with_relation, array($with));\n }\n }\n else // single nested relation\n {\n $with_relation = array_shift($request['parameters']['with']);\n $sub_results->with($with_relation,array($request['parameters']['with']));\n }\n }\n }\n\n $sub_results = $sub_results->where($foreign_key, $local_key_values)->getAll();\n }\n else\n {\n $this->_database->join($pivot_table, $foreign_table.'.'.$foreign_key.' = '.$pivot_table.'.'.$pivot_foreign_key, 'left');\n $this->_database->join($this->table, $pivot_table.'.'.$pivot_local_key.' = '.$this->table.'.'.$local_key,'left');\n $this->_database->select($foreign_table.'.'.$foreign_key);\n $this->_database->select($pivot_table.'.'.$pivot_local_key);\n if(!empty($request['parameters']))\n {\n if(array_key_exists('fields',$request['parameters']))\n {\n if($request['parameters']['fields'] == '*count*')\n {\n $this->_database->select('COUNT(`'.$foreign_table.'`*) as result, `' . $foreign_table . '`.`' . $foreign_key . '`', FALSE);\n }\n else\n {\n\n $fields = explode(',', $request['parameters']['fields']);\n $select = array();\n foreach ($fields as $field) {\n $select[] = (strpos($field,'.')===FALSE) ? '`' . $foreign_table . '`.`' . trim($field) . '`' : trim($field);\n }\n $the_select = implode(',', $select);\n $this->_database->select($the_select);\n }\n }\n\n if(array_key_exists('where',$request['parameters']) || array_key_exists('non_exclusive_where',$request['parameters']))\n {\n $the_where = array_key_exists('where',$request['parameters']) ? 'where' : 'non_exclusive_where';\n\n $this->_database->where($request['parameters'][$the_where],NULL,NULL,FALSE,FALSE,TRUE);\n }\n }\n $this->_database->where_in($pivot_table.'.'.$pivot_local_key,$local_key_values);\n\n if(!empty($order_inside_array))\n {\n $order_inside_str = '';\n foreach($order_inside_array as $order_by_inside)\n {\n $order_inside_str .= (strpos($order_by_inside[0],',')=== false) ? '`'.$foreign_table.'`.`'.$order_by_inside[0].' '.$order_by_inside[1] : $order_by_inside[0].' '.$order_by_inside[1];\n $order_inside_str .= ',';\n }\n $order_inside_str = rtrim($order_inside_str, \",\");\n $this->_database->order_by(rtrim($order_inside_str,\",\"));\n }\n $sub_results = $this->_database->get($foreign_table)->result_array();\n $this->_database->reset_query();\n }\n\n if(isset($sub_results) && !empty($sub_results)) {\n $subs = array();\n\n foreach ($sub_results as $result) {\n $result_array = (array)$result;\n $the_foreign_key = $result_array[$foreign_key];\n if(isset($pivot_table))\n {\n $the_local_key = $result_array[$pivot_local_key];\n if(isset($get_relate) and $get_relate === TRUE)\n {\n //$subs[$the_local_key][$the_foreign_key] = $this->{$foreign_model_name}->where($local_key, $result[$local_key])->get();\n $subs[$the_local_key][$the_foreign_key] = $this->{$foreign_model_name}->where($foreign_key, $result[$foreign_key])->get();\n }\n else\n {\n $subs[$the_local_key][$the_foreign_key] = $result;\n }\n }\n else\n {\n if ($type == 'has_one') {\n $subs[$the_foreign_key] = $result;\n } else {\n $subs[$the_foreign_key][] = $result;\n }\n }\n\n\n }\n $sub_results = $subs;\n\n foreach($local_key_values as $key => $value)\n {\n if(array_key_exists($value,$sub_results))\n {\n $data[$key][$relation_key] = $sub_results[$value];\n }\n else\n {\n if(array_key_exists('where',$request['parameters']))\n {\n unset($data[$key]);\n }\n }\n }\n }\n else\n {\n $data[$key][$relation_key] = NULL;\n }\n if(array_key_exists('order_by',$request['parameters']))\n {\n $elements = explode(',', $request['parameters']['order_by']);\n if(sizeof($elements)==2)\n {\n $order_by[$relation_key] = array(trim($elements[0]), trim($elements[1]));\n }\n else\n {\n $order_by[$relation_key] = array(trim($elements[0]), 'desc');\n }\n }\n unset($this->_requested[$requested_key]);\n }\n if(!empty($order_by))\n {\n foreach($order_by as $field => $row)\n {\n list($key, $value) = $row;\n $data = $this->_buildSorter($data, $field, $key, $value);\n }\n }\n return $data;\n }", "public function executeJoin()\n {\n\n /** @var Join $join */\n foreach ($this->joins as $join) {\n $table = $join->getTable();\n\n $mode = $join->getMode();\n\n /** @var DataSet $joiningDataSet */\n $joiningDataSet = $this->__globalizeDataSet($table->getName(), $table->__getDataSet());\n\n if ($mode == AB_JOIN_RIGHT) {\n $rightDataSet = $this->dataSet;\n $leftDataSet = $joiningDataSet;\n } else {\n $rightDataSet = $joiningDataSet;\n $leftDataSet = $this->dataSet;\n }\n\n $joinedSet = new DataSet();\n\n $leftAliases = $leftDataSet->getAliases();\n $rightAliases = $rightDataSet->getAliases();\n\n foreach ($leftAliases as $leftAliase) {\n $joinedSet->newColumn($leftAliase);\n }\n\n foreach ($rightAliases as $rightAliase) {\n if (!in_array($rightAliase, $leftAliases)) {\n $joinedSet->newColumn($rightAliase);\n }\n }\n\n $leftDataSetCount = $leftDataSet->getCount();\n $rightDataSetCount = $rightDataSet->getCount();\n\n for ($i = 0; $i < $leftDataSetCount; $i++) {\n $leftRow = $leftDataSet->getRow($i);\n\n $foundOneRight = false;\n for ($j = 0; $j < $rightDataSetCount; $j++) {\n if (!($foundOneRight && $mode != AB_JOIN_INNER)) {\n $rightRow = $rightDataSet->getRow($j);\n\n $tmpDataSet = $this->makeNewSetByDualRows($leftRow, $rightRow);\n\n $on = $join->getOnCluase();\n\n $matched = $on->setDataSet($tmpDataSet)->execute(0);\n\n if ($matched) {\n if ($mode != AB_JOIN_OUTER) {\n $foundOneRight = true;\n }\n\n $newSet = $this->makeNewSetByDualRows($leftRow, $rightRow);\n\n $joinedSet->mergeDataSet($newSet);\n } elseif ($mode != AB_JOIN_INNER && $j == $rightDataSetCount - 1 && $i == $leftDataSetCount - 1) {\n $newSet = $this->makeNewSetByDualRows($leftRow, $rightRow->newNullRow(count($rightAliases)));\n\n $joinedSet->mergeDataSet($newSet);\n\n if ($mode == AB_JOIN_OUTER) {\n $newSet = $this->makeNewSetByDualRows($leftRow->newNullRow(count($leftAliases)), $rightRow);\n\n $joinedSet->mergeDataSet($newSet);\n }\n }\n }\n }\n }\n\n $this->dataSet = $joinedSet;\n }\n }", "public function process()\n\t{\n\t\t$this->_prepareTables($this->statement->getTable());\n\t\t$this->_prepareColumns($this->statement->getColumns());\n\t\t$this->_prepareOrderBy($this->statement->getOrderBy());\n\t\t$this->_prepareGroupBy($this->statement->getGroupBy());\n\t\t$this->_prepareDistinct($this->statement->isDistinct());\n\t\t$this->_prepareHaving($this->statement->getHaving());\n\t\t$this->_prepareCondition($this->statement->getCondition());\n\t\t$this->_prepareJoin($this->statement->getJoin());\n\t\t$this->_prepareLimit($this->statement->getLimit());\n\n\t\t$query = 'SELECT' . $this->distinct . $this->columns . 'FROM' . $this->tables . $this->join . $this->condition\n\t\t . $this->groupBy . $this->having . $this->orderBy . $this->limit;\n\n\t\treturn rtrim($query) . ';';\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The index is the value in this case
public function value($index) { return $index; }
[ "public function getValueIndex()\n {\n return $this->valueIndex;\n }", "public function getCell($index) {return $this->values[$index];}", "public function getValue($index){\n\t\treturn $this->values[$index];\n\t}", "public function getIndex0(): int;", "public function get(int $index): mixed;", "public function get(int $index);", "public function GetDataValue( $index ) {\n\n\treturn $this->m_a_values[ $index ];\n\n }", "function extractByIndex($p_index)\n {\n }", "function getByIndex($index)\n {\n }", "function get($index)\n\t{\n\t\t$content = $this->read();\n\t\t$elm = $content['data'][$index];\n\t\t$elm['index'] = $index;\t\t\n\t\treturn $elm;\t\t\n\t}", "public function get (int $index) : Object;", "public function getForecastElement($index)\n{\nreturn $this->forecast[$index];\n}", "public function getArgument($index);", "public function getSingleValueIndex($key);", "abstract public function set(int $index, $value);", "public function get_index() {\n return $this->get_prop( 'index' );\n }", "public function getSearchIndexValue() {\n\t\treturn self::SEARCH_INDEX_DELIMITER.implode(self::SEARCH_INDEX_DELIMITER, $this->getValue()).self::SEARCH_INDEX_DELIMITER;\n\t}", "public function getItemIndex();", "function getArrayValue($arrValues, $index) {\n $ret = NULL;\n foreach($arrValues[$index] as $key => $value) {\n if($key == 'value') {\n $ret = $value;\n }\n }\n return $ret;\n}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get specific data from a tag object
function get_tag_data( $tag, $key ) { if (!empty($tag)) return $tag->$key; else echo 'ERROR: There is no data in the tag object.'; die; }
[ "function radius_get_tagged_attr_data($data)\n{\n}", "public function get_tag();", "public function readTag() {}", "function &gettag_info($tag)\r\n\t{\r\n\t\treturn $this->tag_information[strtolower($tag)];\r\n\t}", "public function offsetGet($tag)\n {\n return $this->entries[$tag];\n }", "public function getTaggedWith($tag)\n {\n \t$data = $this->getData();\n \t\n \tforeach ($data as $index => $image)\n \t{\n \t\tif ($image->hasTag($tag))\n \t\t{\n \t\t\treturn $image;\n \t\t}\n \t}\n \t\n \treturn null;\n }", "public function getData(string $tag) {\n if (!isset($this->data[$tag])) {\n foreach ($this->chainedProviders as $provider) {\n $data = $provider->getData($tag);\n if ($data !== false) {\n return $data;\n }\n }\n return false;\n }\n $data = $this->data[$tag];\n if (is_string($data)) {\n return $data;\n }\n try {\n return (string)$data;\n } catch (\\Exception $ex) {\n return false;\n }\n }", "function getTagData() {\n\t\treturn $this->row;\n\t}", "public function getTag()\n {\n }", "public function getTag()\n {\n return $this->get(self::tag);\n }", "function getTagInfo(&$text, $tag, $handler) {\r\n // Test if the text contains the tag at all.\r\n $rx = '/\\[' . $tag . '([^\\]]*)\\](.*?)\\[\\/' . $tag . '\\]/';\r\n \r\n preg_match_all($rx, $text, $matches, PREG_SET_ORDER);\r\n \r\n if (count($matches) == 0)\r\n return null;\r\n\r\n foreach ($matches as $match) {\r\n // Fill in array info.\r\n $result = array();\r\n $result['__name'] = $tag;\r\n $result['__tag'] = $match[0];\r\n $result['__value'] = $match[2];\r\n $result['__attributes'] = array();\r\n \r\n // Search for attributes.\r\n $attributes = trim($match[1]);\r\n \r\n if (strlen($attributes) > 0) {\r\n preg_match_all('/(\\w+)=\"(.*?)\"/', $attributes, $attributeMatches, PREG_SET_ORDER);\r\n \r\n // Fill the result with key/value pairs.\r\n foreach ($attributeMatches as $key => $value) {\r\n $result['__attributes'][$value[1]] = $value[2];\r\n }\r\n }\r\n \r\n $handler($text, $result);\r\n }\r\n}", "public function get_data()\r\n\t{\r\n\t\treturn $this->get_attr('data');\r\n\t}", "private function retrieve_tag_description()\n {\n }", "public function getTag ()\n {\n return $this->tag;\n }", "abstract protected function parsingTag();", "public function fetch_tags() {\n $getID3 = new \\getID3;\n $fileInfo = $getID3->analyze($this->path);\n\n // Get all the common tags\n /* if (isset($fileInfo['tags_html'])) {\n $this->tags = $fileInfo['tags_html']['id3v2'];\n }*/\n // Adding the cover art if it is available\n if (isset($fileInfo['comments']['picture'])) {\n $this->tags['image'] = $fileInfo['comments']['picture'][0];\n }\n }", "public function get_inside_data();", "public function getTag($tag)\n {\n return Tag::find($tag);\n }", "public function getItemTagName();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check if temporary directory exist and create if not exist
private function prepareTempDirectory() { $path = $this->getTempDirPath(); if (!is_dir($path)) mkdir($path, 0777, true); }
[ "public function createTemporaryDirectory() {\n if (function_exists('sys_get_temp_dir')) {\n $baseDirectory = sys_get_temp_dir();\n } elseif (file_exists('/tmp') &&\n is_dir('/tmp') &&\n is_writeable('/tmp')\n ) {\n $baseDirectory = '/tmp';\n } elseif (is_writeable(dirname(__FILE__))) {\n $baseDirectory = dirname(__FILE__);\n } elseif (is_writeable('./')) {\n $baseDirectory = realpath('./');\n } else {\n $this->skipTest('Can not get writeable directory for file system functions.');\n }\n $counter = 0;\n do {\n $rand = substr(base64_encode(rand()), 0, -2);\n if (substr($baseDirectory, -1) == DIRECTORY_SEPARATOR) {\n $temporaryDirectory = $baseDirectory.'testfs.'.$rand;\n } else {\n $temporaryDirectory = $baseDirectory.DIRECTORY_SEPARATOR.'testfs.'.$rand;\n }\n } while (++$counter < 10 &&\n file_exists($temporaryDirectory) &&\n is_dir($temporaryDirectory));\n $this->_temporaryDirectory = $temporaryDirectory;\n if (file_exists($this->_temporaryDirectory) &&\n is_dir($this->_temporaryDirectory)\n ) {\n $directory = $this->_temporaryDirectory;\n $this->_temporaryDirectory = '';\n $this->fail('Test directory \"'.$directory.'\" did already exists.');\n return FALSE;\n } else {\n $oldMask = umask(0);\n mkdir($this->_temporaryDirectory, 0777, TRUE);\n $this->_temporaryDirectories[] = $this->_temporaryDirectory;\n umask($oldMask);\n return $this->_temporaryDirectory;\n }\n }", "protected function makeSureTempPathExists() {\n\t\t$workingDir = $this->getTempPath();\n\n\t\t// Check if the working/temporary directory exists\n\t\tif (!file_exists($workingDir)) {\n\t\t\t@mkdir($workingDir);\n\n\t\t\tif (!file_exists($workingDir)) {\n\t\t\t\tthrow new \\RuntimeException('Working directory \"' . $workingDir . '\" doesn\\'t exists and can not be created', 1359541465);\n\t\t\t}\n\t\t}\n\t}", "private function makeTmpDir()\n {\n $tmpDir = $this->getTempDir();\n\n // Directory already exists, return true\n if (is_dir($tmpDir)) {\n return true;\n }\n\n // dir doesn't exist, make it\n return mkdir($tmpDir);\n }", "public function createTempFolder()\n {\n if( ! is_dir($this->getTempFolder())) {\n mkdir($this->getTempFolder(), 0777);\n }\n }", "private function createTempFolder()\n {\n if (!is_dir($this->passRealPath)) {\n Storage::disk('passgenerator')->makeDirectory($this->passRelativePath);\n }\n }", "private function createTemporaryDirectory() {\n\n\t\tdo {\n\t\t\t$path = sprintf(\"%s/%s\",self::$temporary_directory_prefix,uniqid(\"mysqld-\"));\n\t\t} while(file_exists($path) && $tries++ < 10);\n\n\t\tif(file_exists($path)) {\n\t\t\tthrow new \\RuntimeException(sprintf(\"failed to create a temporary directory after %s attempts\",$tries));\n\t\t}\n\n\t\tif(mkdir($path)) {\n\t\t\tchmod($path,0777);\n\t\t\tif(posix_getuid() === 0) {\n\t\t\t\tchown($path,\"mysql\");\n\t\t\t}\n\t\t\treturn $path;\n\t\t}\n\n\t\treturn null;\n\t}", "private function createNewTempdir(){\n $tempdirname = '';\n do{\n $tempdirname = uniqid('temp_',true);\n }while(file_exists(FRONTEND_ABSDIRPATH.ARTICLEIMAGESPATH.$tempdirname));\n\n if(@mkdir(FRONTEND_ABSDIRPATH.ARTICLEIMAGESPATH.$tempdirname)){\n mkdir(FRONTEND_ABSDIRPATH.ARTICLEIMAGESPATH.$tempdirname.DIRECTORY_SEPARATOR.'gallery');\n }else{\n die(json_encode(array('state'=>'error','data'=> $this->text('e28').': '.FRONTEND_ABSDIRPATH.ARTICLEIMAGESPATH.'!')));\n }\n return $tempdirname;\n }", "public function createTemporaryDirectoryPath();", "public function createTempDirectory()\n {\n unlink($file = $this->createTempFile());\n mkdir($file);\n\n return $file;\n }", "private function createTmpPath() {\n $this->message->update(\"Creating a working directory.\");\n\n $dir = md5(mktime());\n mkdir($this->getUploadPath() . '/' . $dir);\n $this->tmpPath = $this->getUploadPath() . '/' . $dir;\n copy($this->file, $this->tmpPath . '/' . basename($this->file));\n $this->workingFile = $this->tmpPath . '/' . basename($this->file);\n }", "protected function createTmpDir()\n {\n mkdir($this->getTargetPath());\n }", "protected function createTempDirectory()\n {\n $ds = DIRECTORY_SEPARATOR;\n $tmp = sys_get_temp_dir() . $ds . \"Semvertest\" . mt_rand(0, 1000);\n if (file_exists($tmp) && is_dir($tmp)) {\n `rm $tmp -r`;\n }\n mkdir($tmp);\n if (is_dir($tmp)) {\n $this->tmps[] = $tmp;\n return $tmp;\n }\n throw new \\AccessDeniedException(\"Could not create tmp directory $tmp\");\n }", "public function assertDefaultPhpTempPathWritable() {\n\t\t$result = false;\n\t\t$path = $this->getDefaultPhpTempPath() . DIRECTORY_SEPARATOR . 'ssreqcheck-test';\n\t\t$result = @mkdir($path);\n\t\tif($result) rmdir($path);\n\t\treturn $result;\n\t}", "protected function assertTemporaryDirectoryNotExists(): void\n {\n static::assertFalse(file_exists(storage_path('app/_backup-temp')));\n }", "protected function createTemporaryDirectory()\n {\n $prefix = (\n 'configwriter-'\n . (new \\ReflectionClass($this))->getShortName()\n . '-'\n . $this->getName()\n );\n $attemps = 5;\n $path = sprintf(\n \"%s%s%s.%d\",\n sys_get_temp_dir(),\n DIRECTORY_SEPARATOR,\n $prefix,\n random_int(10000000, 99999999)\n );\n\n do {\n if (@mkdir($path)) {\n return $path;\n }\n } while (0 < --$attemps);\n\n throw new RuntimeException(\n sprintf('Failed to create temporary directory [%s]', $path)\n );\n }", "public static function ensureUploadsAndTmpFolderExist()\r\n\t{\r\n\t\tFilesystem::makeDirectory(\"public/assets/uploads\");\r\n\r\n\t\t// ensure tmp directory exist\r\n\t\tFilesystem::makeDirectory(\"public/assets/uploads/tmp\");\r\n\t}", "protected function initTmpDirectory()\n {\n $this->tmpDirectory = sys_get_temp_dir().'/antidot/';\n $this->tmpErrorDirectory = $this->tmpDirectory.'error/';\n if(!is_dir($this->tmpDirectory)) {\n mkdir($this->tmpDirectory, 0775);\n mkdir($this->tmpErrorDirectory, 0775);\n }\n }", "function tempFolder() {\n\t\t$tempLoc = $this->tempFolder;\n\t\tif (!file_exists($tempLoc)) @mkdir($tempLoc);\n\t\tif (file_exists($tempLoc) && is_writeable($tempLoc)) return true;\n\t\treturn false;\n\t}", "public function createTemporaryDirectoryPath()\n {\n return $this->factoryByPlatform()\n ->create(sys_get_temp_dir());\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Elimina un usuario JuradoProfesional. Parametros: $login Atributo a comprobar, login del usuario que se quiere eliminar. Return: Devuelve TRUE si se ha podido eliminar el usuario JuradoProfesional.
function eliminarJuradoProfesional($login){ $usuario = new Usuarios(); $juradoProfesional = new JuradoProfesional(); $res1 = $usuario->recuperar($login); $res2 = $juradoProfesional->recuperar($login); if($res1 && $res2){ $res1 = $usuario->eliminar($login); $res2 = $juradoProfesional->eliminar($login); } return ($res1 && $res2); }
[ "public function eliminar(Usuario $usuario, Skill $skill)\n {\n return $usuario->id_usuario === $skill->id_usuario;\n }", "public function addRemoveUser($login) {\n $login = self::protectDB($login);\n if (!$login) {\n return false;\n }\n\n if ($this->isOccupant($login)) {\n if (eF_deleteTableData('module_whiteboard_user_to_groups', \"login = '$login' AND gkey = '{$this->gkey}'\")) {\n\n $this->history(Group::CHANGE_USER, 'remove: ' . $login);\n return 0;\n } else {\n return false;\n }\n } else {\n $fields = array(\n 'login' => $login,\n 'gkey' => $this->gkey\n );\n\n if (eF_insertTableData('module_whiteboard_user_to_groups', $fields)) {\n\n $this->history(Group::CHANGE_USER, 'add: ' . $login);\n return 1;\n } else {\n return false;\n }\n }\n }", "function delUser($login){ // A changer !!!!!!! il faudrait donner idUser plutot que le login\n\t$lien=connectDB();\n\t\t$query='DELETE FROM users WHERE login =\"'.$login.'\"' ;//verifier si user deja exist\n\t\t$call=mysql_query($query)or die(mysql_error());\n\tmysql_close();//fermer la BDD\n\treturn true;\n}", "public static function supprimer(){\n\t\tif(Utilisateur::isAllowed(parent::$_pdo,PROFIL_SUPERVISEUR)){\t// Les droits minimums pour la suppression des utilisateurs sont celui du profil superviseur\n\t\t\t$id = parent::$_request->getVar('id');\t// Récupération de l'identifiant de l'utilisateur à supprimer\n\t\t\tif(isset($id)){\n\t\t\t\tif($_SESSION['user_id'] != $id){\t\t\t\t\t\n\t\t\t\t\t$user = Utilisateur::load(parent::$_pdo, $id);\t// Chargement de l'objet utilisateur\n\t\t\t\t\tif ($user != null) {\n\t\t\t\t\t\tif(Utilisateur::isAllowed(parent::$_pdo,$user->getUserLevel())){\n\t\t\t\t\t\t\t/* Vérification de l'absence de preparation en attente ou en cours */\n\t\t\t\t\t\t\t$erreur = false;\n\t\t\t\t\t\t\t$arrayPrepas = Preparation::selectByUtilisateur(parent::$_pdo, $user);\n\t\t\t\t\t\t\tforeach($arrayPrepas as $prepa){\n\t\t\t\t\t\t\t\tif ($prepa -> getEtat() < 2)\n\t\t\t\t\t\t\t\t\t$erreur = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif($erreur){\n\t\t\t\t\t\t\t\tparent::$_response->addVar('txt_erreur'\t, gettext('Impossible de supprimer cet utilisateur car il poss&egrave;de des pr&eacute;parations en attente ou en cours.'));\n\t\t\t\t\t\t\t\tparent::$_response->addVar('txt_retour'\t, gettext('Retour'));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t/* Suppression de l'utilisateur */\n\t\t\t\t\t\t\t\tif ($user->delete()) {\n\t\t\t\t\t\t\t\t\t$photosDir = './images/photos/';\n\t\t\t\t\t\t\t\t\t$photo \t\t= $user->getPhoto();\n\t\t\t\t\t\t\t\t\tif ($photo != 'default.png')\n\t\t\t\t\t\t\t\t\t\tunlink($photosDir . $photo);\t// Supprimer la photo de profil de l'utilisateur\n\t\t\t\t\t\t\t\t\t$log \t= '[' . date('d/m/Y:H:i:s') . '] -- ' . gettext('Suppression de l\\'utilisateur ') .$login .gettext(' par ').$_SESSION['user_login'].\"\\r\\n\";\n\t\t\t\t\t\t\t\t\t$logFile = '../application/logs/'.date('m-Y').'-user.log';\n\t\t\t\t\t\t\t\t\twriteLog($log, $logFile);\n\t\t\t\t\t\t\t\t\t/* Redirection vers la page gestion des utilisateurs */\n\t\t\t\t\t\t\t\t\theader('Location: '. APPLICATION_PATH . 'utilisateur/gerer') or die('deleting problem');\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tthrow new Exception(gettext('Impossible de supprimmer un utilisateur'),4);\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\telse {\n\t\t\t\t\t\t/* Redirection vers la page gestion des utilisateurs */\n\t\t\t\t\t\theader('Location: '. APPLICATION_PATH . 'utilisateur/gerer') or die('deleting problem');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t/* Redirection vers la page gestion des utilisateurs */\n\t\t\t\t\theader('Location: '. APPLICATION_PATH . 'utilisateur/gerer') or die('deleting problem');\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tthrow new Exception(gettext('Un param&egrave;tre est manquant pour effectuer l\\'action demand&eacute;e'),3);\n\t\t\t}\n\t\t}\n\t}", "public static function userDel($user):bool{\n $query = \"DELETE FROM usuarios WHERE Cuenta = ?\";\n $stmt = self::$dbh->prepare($query);\n $stmt->bindValue(1, strtolower($user));\n $stmt->setFetchMode(PDO::FETCH_ASSOC);\n if($stmt->execute()){\n return true;\n }\n return false;\n }", "function delProfForAdmin ($prof) {\n\t$bdd = connectionDB ();\n\n\t$reponse = $bdd->exec(\"DELETE FROM `professeurs` WHERE `id`=$prof\");\n\n\tif ($reponse == FALSE){\n header('Location:admin?es=15');//echec suppression prof\n\t}\n\n header('Location:admin?es=16');//succes suppression prof\n}", "public function DeleteLogin($uid)\n {\n $stmt = Database::Prepare('delete', 'DELETE FROM ul_logins WHERE id=?');\n if (!Database::BindExec(\n $stmt,\n null, // output\n array( // input\n &$uid,\n 'int'\n )\n )\n ) {\n Database::Fail();\n return AbstractLoginBackend::BACKEND_ERROR;\n }\n\n if ($stmt->rowCount() == 0) {\n return AbstractLoginBackend::NO_SUCH_USER;\n }\n\n return true;\n }", "public function removePlayer($login) {\n\t\tunset($this->players[$login]);\n\t}", "function remove_user() {\n\t\t$success = FALSE;\n\t\t$status = clean( $_POST[ 'status' ] );\n\t\t$user = clean( $_POST[ 'account' ] );\n\n\t\t// Special case, no more checks.\n\t\tif( ( $_SESSION[ 'rem_user' ] == 'Y' ) && ( $_SESSION[ 'loggedin' ] == $_SERVER[ 'REMOTE_ADDR' ] ) )\t{\n\t\t\t$rem = \"UPDATE `GO-user` SET `active`='$status' WHERE `email`='$user'\";\n\t\t\tquery_db( $rem );\n\t\t\t$success = TRUE;\n\t\t}\n\t\telse {\n\t\t\t$_SESSION[ 'error_mess' ] = 'insuffient_rights_violation';\n\t\t}\n\n\t\treturn $success;\n\t}", "function _remove_visit_user()\n {\n $this->haltIfLackingPermission('manage_vusers');\n list($sessionid, $personid) = explode('-', $this->arg('SHPKEY'));\n\n $chk = $this->db->pq(\"SELECT personid FROM session_has_person WHERE sessionid=:1 AND personid=:2\", array($sessionid, $personid));\n if (!sizeof($chk))\n $this->_error('The specified user is not registered on that visit');\n\n $this->db->pq(\"DELETE FROM session_has_person \n WHERE sessionid=:1 and personid=:2\", array($sessionid, $personid));\n\n $this->_output(1);\n }", "public function eliminar_profesor( $id ) {\r\n\t\t\t$this->manejador_bd->eliminar( 'usuarios', 'matricula', $id );\r\n\t\t\t$this->manejador_bd->eliminar( 'profesores', 'matricula', $id );\r\n\t\t}", "public function delete(User $user, Professor $professor)\n {\n return true;\n }", "function aclDelUser($user){\n\t\t$query=\"DELETE from ACL where\n\t\t\tacl_username='$user'\";\n\t\tif((!$this->db->doQuery($query))){\n\t\t\treturn false;\n\t\t}\n\t\telse return true;\n\t}", "function delete_user()\n {\n \n //return true if successful\n }", "public function delete(User $user, SmallProfile $smallProfile)\n {\n return (string)Auth::user()->id === $smallProfile->user_id;\n }", "public function loginIsFree($login)\n\t{\n\t\tif(empty($login)) return false;\n\t\t$logtest=$this->getUsers(array(\"login\" => $login));\n\t\tif(count($logtest)>0) return false;\n\t\treturn true;\t\t\n\t}", "public function deleteProfilAction($request)\n {\n if($this->_authModule->isConnected())\n {\n if($this->_authModule->getLogin() == $this->_user && $this->_user == $_SESSION['currentUser']['auth'] )\n {\n if($response = $this->_adminModel->deleteUserProfil($this->_user))\n {\n $result['success'] = \"votre profil viens d'etre supprimé\";\n echo json_encode($result);\n }\n }\n elseif($this->_authModule->getRang() == 2)\n {\n if($response = $this->_adminModel->deleteUserProfil($this->_user))\n {\n $result['admin'] = \"le profil viens d'etre supprimmé\";\n echo json_encode($result);\n\n }\n }\n else\n {\n $result['error'] = \"Vous n'etes pas autorisez à effectuer cette action\";\n echo json_encode($result);\n return false;\n }\n }\n }", "public function delete(User $user, Skills $skills){\n return Auth::check() && ($user->admin);\n }", "function pro_user_remove() {\n if (user_exists()) {\n $db = db_connect();\n \t$sql = 'UPDATE users SET pro=0 WHERE bc_id=' . db_clean($db, user_id());\n \tdb_query($db, $sql);\n \tdb_disconnect($db);\n }\n}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Operation getOrganizationSamlRoles List the SAML roles for this organization
public function getOrganizationSamlRoles($organization_id) { list($response) = $this->getOrganizationSamlRolesWithHttpInfo($organization_id); return $response; }
[ "public function getOrganizationSamlRolesAsync($organization_id)\n {\n return $this->getOrganizationSamlRolesAsyncWithHttpInfo($organization_id)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "public function getOrganizationSaml($organization_id)\n {\n list($response) = $this->getOrganizationSamlWithHttpInfo($organization_id);\n return $response;\n }", "public function getRoles()\n {\n $user = $this->user();\n if ($user)\n {\n $userRoles = $user->roles;\n if (count($userRoles))\n {\n foreach ($userRoles as $role) {\n $roles = $role->slug;\n }\n }\n }\n\n return $roles;\n }", "public function auManagerRosterShiftGetRolesWithHttpInfo($business_id, string $contentType = self::contentTypes['auManagerRosterShiftGetRoles'][0])\n {\n $request = $this->auManagerRosterShiftGetRolesRequest($business_id, $contentType);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n (int) $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? (string) $e->getResponse()->getBody() : null\n );\n } catch (ConnectException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n (int) $e->getCode(),\n null,\n null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n (string) $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n\n switch($statusCode) {\n case 200:\n if ('\\OpenAPI\\Client\\Model\\RosterShiftRole[]' === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n if ('\\OpenAPI\\Client\\Model\\RosterShiftRole[]' !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\OpenAPI\\Client\\Model\\RosterShiftRole[]', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }\n\n $returnType = '\\OpenAPI\\Client\\Model\\RosterShiftRole[]';\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\OpenAPI\\Client\\Model\\RosterShiftRole[]',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "public function getOrganizationSamlAsync($organization_id)\n {\n return $this->getOrganizationSamlAsyncWithHttpInfo($organization_id)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "public function getOrganizationSamlRolesAsyncWithHttpInfo($organization_id)\n {\n $returnType = 'object';\n $request = $this->getOrganizationSamlRolesRequest($organization_id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public function getRoles()\n\t{\n\t\t$roles = array_map(function($value)\n\t\t{\n\t\t\treturn Html::a($value, $value->links['self']);\n\t\t}, $this->entity->roles);\n\n\t\treturn join('<br>', $roles);\n\t}", "public function getAllRoles();", "public function getRoles() {\n return DB::getAll(\n DB::T(DB::ROLE),\n new DBCondIn(\n 'id',\n DB::prepGetAll(\n DB::T(DB::ROLE_PERMISSION),\n new DBCond('permission', $this),\n array('role')\n )));\n }", "public function getIdentityRoles();", "protected function getRoles()\n\t{\n\t\tif ($this->session !== null || $this->config->getAuthenticationType() == Config::AUTH_USER)\n\t\t{\n\t\t\t$actor_type = 'user';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$actor_type = 'application';\n\t\t}\n\t\t\n\t\t$roles = $this->loadRolesFromCache($actor_type);\n\t\t\n\t\tif ($roles === false)\n\t\t{\n\t\t\t$roles = $this->loadRolesFromApi($actor_type);\n\t\t\t\n\t\t\t// Store it in the cache\n\t\t\t$this->token_cache->set($this->rolesCacheKey($actor_type), $roles);\n\t\t}\n\t\t\n\t\treturn $roles;\n\t}", "static function getRoles() {\n global $user;\n $mdb2 = getConnection();\n\n $group_id = $user->getGroup();\n $org_id = $user->org_id;\n $sql = \"select * from tt_roles\".\n \" where group_id = $group_id and org_id = $org_id and status is not null\";\n $res = $mdb2->query($sql);\n if (is_a($res, 'PEAR_Error')) return false;\n while ($val = $res->fetchRow()) {\n $roles[] = $val;\n }\n return $roles;\n }", "private function getUserRoles() {\n $account = \\Drupal::currentUser();\n\n return $account->getRoles();\n }", "public function getRoleList() {\n\t\t$t_role = new ca_user_roles();\n\t\treturn $t_role->getRoleList();\n\t}", "public function get_roles()\r\n {\r\n return $this->roles;\r\n }", "public function getRoles()\n {\n $roles = [];\n foreach ($this->secured_routes as $secured_route) {\n $roles[] = $this->routeToRoleConverter->generateRoleForRoute($secured_route);\n }\n\n return $roles;\n }", "public function getAllRoles(){\r\n return $this->roleControllerActionAcl->getRoles();\r\n }", "protected function allRoles()\n {\n $company = $this->getCompanyId();\n return Role::findByCompany($company);\n }", "public function getOrganizationSamlRoleWithHttpInfo($organization_id, $saml_role_id)\n {\n $returnType = 'object';\n $request = $this->getOrganizationSamlRoleRequest($organization_id, $saml_role_id);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n 'object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Operation templateTestTemplateAsyncWithHttpInfo Tests document templates
public function templateTestTemplateAsyncWithHttpInfo($dto) { $returnType = '\Swagger\Client\Model\OutboundDocumentFile[]'; $request = $this->templateTestTemplateRequest($dto); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = $responseBody->getContents(); if ($returnType !== 'string') { $content = json_decode($content); } } return [ ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; }, function ($exception) { $response = $exception->getResponse(); $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( '[%d] Error connecting to the API (%s)', $statusCode, $exception->getRequest()->getUri() ), $statusCode, $response->getHeaders(), $response->getBody() ); } ); }
[ "public function getTemplatesAsyncWithHttpInfo()\n {\n $returnType = '\\KlippaOCRAPI\\Model\\GetTemplatesBody';\n $request = $this->getTemplatesRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public function getPolicyTemplatesAsyncWithHttpInfo()\n {\n $returnType = '\\OpenAPI\\Client\\Model\\TemplateMetadataResponse[]';\n $request = $this->getPolicyTemplatesRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }", "public function getTemplatesAsyncWithHttpInfo()\n {\n $returnType = '\\PDFGeneratorAPI\\Model\\InlineResponse200';\n $request = $this->getTemplatesRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public function testGetTemplate()\n {\n /* get user */\n $user = \\App\\User::find(1);\n\n /* get template */\n $template = \\App\\Template::orderBy('created_at', 'desc')->first();\n\n /* send request */\n $this->actingAs($user)->get('/api/templates/' . $template->id);\n\n /* check status code */\n $this->seeStatusCode(200);\n\n /* check response structure */\n $this->seeJsonStructure([\n 'data' => [\n 'type',\n 'id',\n 'attributes' => [\n 'name',\n 'checklist' => [\n 'description',\n 'due_interval',\n 'due_unit',\n ],\n 'items' => [\n '*' => [\n 'description',\n 'urgency',\n 'due_interval',\n 'due_unit',\n ],\n ],\n ],\n ],\n ]);\n }", "public function createMessageTemplateAsyncWithHttpInfo($message_template = null)\n {\n $returnType = '\\KnetikCloud\\Model\\MessageTemplateResource';\n $request = $this->createMessageTemplateRequest($message_template);\n\n return $this->client->sendAsync($request)->then(function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }, function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n \"[$statusCode] Error connecting to the API ({$exception->getRequest()->getUri()})\",\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n });\n }", "public function docServerGetTemplatesWithHttpInfo()\n {\n // parse inputs\n $resourcePath = \"/DocServer/getTemplates\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept(['application/xml', 'application/json']);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/x-www-form-urlencoded']);\n\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('token');\n if (strlen($apiKey) !== 0) {\n $queryParams['token'] = $apiKey;\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'GET',\n $queryParams,\n $httpBody,\n $headerParams,\n null,\n '/DocServer/getTemplates'\n );\n\n return [null, $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n\n throw $e;\n }\n }", "public function getRoleTemplatesAsyncWithHttpInfo()\n {\n $returnType = '\\OpenAPI\\Client\\Model\\TemplateMetadataResponse[]';\n $request = $this->getRoleTemplatesRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }", "public function createUserTemplateAsyncWithHttpInfo($user_template_resource = null)\n {\n $returnType = '\\KnetikCloud\\Model\\TemplateResource';\n $request = $this->createUserTemplateRequest($user_template_resource);\n\n return $this->client->sendAsync($request)->then(function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }, function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n \"[$statusCode] Error connecting to the API ({$exception->getRequest()->getUri()})\",\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n });\n }", "public function createVideoTemplateAsyncWithHttpInfo($video_template_resource = null)\n {\n $returnType = '\\KnetikCloud\\Model\\TemplateResource';\n $request = $this->createVideoTemplateRequest($video_template_resource);\n\n return $this->client->sendAsync($request)->then(function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }, function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n \"[$statusCode] Error connecting to the API ({$exception->getRequest()->getUri()})\",\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n });\n }", "public function createTemplateAsyncWithHttpInfo($name, $html)\n {\n $returnType = 'array<string,mixed>';\n $request = $this->createTemplateRequest($name, $html);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }", "public function detailsTemplateAsyncWithHttpInfo($id)\n {\n $returnType = '\\PandaDoc\\Client\\Model\\TemplateDetailsResponse';\n $request = $this->detailsTemplateRequest($id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }", "public function getRoleTemplatesWithHttpInfo()\n {\n $request = $this->getRoleTemplatesRequest();\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw ApiException::fromRequestException($e);\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n (string) $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n\n switch($statusCode) {\n case 200:\n if ('\\OpenAPI\\Client\\Model\\TemplateMetadataResponse[]' === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\OpenAPI\\Client\\Model\\TemplateMetadataResponse[]', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n case 401:\n if ('\\OpenAPI\\Client\\Model\\ProblemDetails' === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\OpenAPI\\Client\\Model\\ProblemDetails', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }\n\n $returnType = '\\OpenAPI\\Client\\Model\\TemplateMetadataResponse[]';\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\OpenAPI\\Client\\Model\\TemplateMetadataResponse[]',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 401:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\OpenAPI\\Client\\Model\\ProblemDetails',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "public function createTemplateAsyncWithHttpInfo($create_template_options, string $contentType = self::contentTypes['createTemplate'][0])\n {\n $returnType = '\\MailSlurp\\Models\\TemplateDto';\n $request = $this->createTemplateRequest($create_template_options, $contentType);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }", "public function restReportsKeyFiguresConfigTemplatesGetAsyncWithHttpInfo()\n {\n $returnType = 'object[]';\n $request = $this->restReportsKeyFiguresConfigTemplatesGetRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public function jobTemplateCreateAsyncWithHttpInfo($project_id, $job_template_create_parameters, $x_phrase_app_otp = null)\n {\n $returnType = 'object';\n $request = $this->jobTemplateCreateRequest($project_id, $job_template_create_parameters, $x_phrase_app_otp);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public function getVideoTemplateAsyncWithHttpInfo($id)\n {\n $returnType = '\\KnetikCloud\\Model\\TemplateResource';\n $request = $this->getVideoTemplateRequest($id);\n\n return $this->client->sendAsync($request)->then(function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }, function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n \"[$statusCode] Error connecting to the API ({$exception->getRequest()->getUri()})\",\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n });\n }", "public function createDeviceTemplateAsyncWithHttpInfo($device_template_resource = null)\n {\n $returnType = '\\KnetikCloud\\Model\\TemplateResource';\n $request = $this->createDeviceTemplateRequest($device_template_resource);\n\n return $this->client->sendAsync($request)->then(function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }, function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n \"[$statusCode] Error connecting to the API ({$exception->getRequest()->getUri()})\",\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n });\n }", "public function listTemplatesAsyncWithHttpInfo($q = null, $shared = null, $deleted = null, $count = null, $page = null, $id = null, $folderUuid = null, $tag = null)\n {\n $returnType = '\\PandaDoc\\Client\\Model\\TemplateListResponse';\n $request = $this->listTemplatesRequest($q, $shared, $deleted, $count, $page, $id, $folderUuid, $tag);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }", "public function getAchievementTemplateAsyncWithHttpInfo($id)\n {\n $returnType = '\\KnetikCloud\\Model\\TemplateResource';\n $request = $this->getAchievementTemplateRequest($id);\n\n return $this->client->sendAsync($request)->then(function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }, function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n \"[$statusCode] Error connecting to the API ({$exception->getRequest()->getUri()})\",\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n });\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Class Functions Function Returns the URL for the primary Social Site or an empty string
private function _getSocialSiteUrl() { $sqlStr = readResource(SQL_DIR . '/site/getSocialUrl.sql'); $rslt = doSQLQuery($sqlStr); if ( is_array($rslt) ) { foreach ( $rslt as $Row ) { return NoNull($Row['social_url']); } } return ''; }
[ "private function siteUrl(): string\n {\n return get_home_url();\n }", "private function get_site_url() {\n static $site_url = null;\n\n if ( is_null( $site_url ) ) {\n $site_url = Warpdrive::get_option( 'siteurl' );\n $site_url = rtrim( $site_url, '/' );\n }\n\n return $site_url;\n }", "public function getSocialUrl(): string {\n\t\treturn ($this->socialUrl);\n\t}", "public function getUrlMain() {\n return $this->siteUrl;\n }", "public function getUrl() {\n\t\treturn $this->siteURL;\n\t}", "public function getCurrentSiteUrl()\n {\n return Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);\n }", "function get_site_url() {\n\t$protocol = (isSet($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https' : 'http';\n\treturn $protocol . '://' . $_SERVER['HTTP_HOST'];\n}", "public function getSiteURL()\n {\n return $this->config->get('site.url').$this->config->get('site.dir');\n }", "function trueSiteUrl() {\n\t\treturn $GLOBALS[\"trueSiteUrl\"];\n\t}", "public function getUserWebsiteUrl()\r\n {\r\n return $this->user_website_url;\r\n }", "public function getUserWebsiteUrl()\n\t{\n\t\treturn $this->user_website_url;\n\t}", "public function getFrontPageUrl();", "public function getSiteLink()\n {\n return $this->siteLink;\n }", "public function getPublisher() {\n\t\tif ( ! aioseo()->options->social->profiles->sameUsername->enable ) {\n\t\t\treturn aioseo()->options->social->profiles->urls->facebookPageUrl;\n\t\t}\n\n\t\t$username = aioseo()->options->social->profiles->sameUsername->username;\n\t\treturn ( $username && in_array( 'facebookPageUrl', aioseo()->options->social->profiles->sameUsername->included, true ) )\n\t\t\t? 'https://facebook.com/' . $username\n\t\t\t: '';\n\t}", "function site_url(){\n\treturn config( 'site.url' );\n}", "public function get_reference_site_url() {\n\t\treturn $this->filter_reference_url();\n\t}", "public function getURL() {\n return getSiteURL() . \"profile/\" . $this->guid;\n }", "public function getWebsite();", "public function getSiteBaseUrl();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get restaurant auth token
protected function getRestaurantToken() { return $this->container->getParameter('io_auth_token'); }
[ "public function get_auth_token() {\n $arg = json_encode($_REQUEST);\n return `../web/registermo $arg`;\n }", "function getToken() {\n\t\treturn $_GET['token'];\n\t}", "public function requestToken();", "public function fetchAuthToken();", "function get_auth_token()\r\n\t{\r\n\t\t//get_auth_token\r\n\t\t$data = $this->custom_db->single_table_records('temp_cache', '*', array('domain_list_fk' => get_domain_auth_id(), 'type' => 'travelyaari'));\r\n\t\tif ($data['status']== SUCCESS_STATUS) {\r\n\t\t\treturn $data['data'][0];\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "protected function token()\r\n\t{\r\n\t\treturn 'laradev_auth';\r\n\t}", "public function getToken(){\n \n $http = $this->getRequest();\n \n $http->write(Zend_Http_Client::GET, $this->getApiUrlToken(), '1.1', array(), '');\n \n $data = $http->read();\n \n $token = Mage::helper('core')->jsonDecode($data)['token'];\n \n if($token == 'Usuario e senha invalidos!'){ \n $this->_helper()->registerLog('TOKEN Allin: Usuario e senha invalidos!');\n return;\n }\n \n return $token; \n }", "public function bearerToken();", "protected function getRequestToken() {\n\t\treturn filter_input(INPUT_GET, 'oauth_token');\n\t}", "public function fetchRequestToken();", "public static function get_token() {\n\t\t$token = get_option( 'eventbrite_token' );\n\t\tif ( $token )\n\t\t\treturn Keyring::init()->get_token_store()->get_token( array( 'type' => 'access', 'id' => array_shift( $token ) ) );\n\t\treturn false;\n\t}", "public function getCustomerToken();", "public function GetAuthToken()\r\n\t{\r\n\t\t//return $this->storer->LoadAuthToken();\r\n\t\treturn $this->auth_token;\r\n\t}", "public function token(){\r\n\r\n\r\n $app = Application::model()->findByAttributes(array('id'=>Yii::app()->params['app_own_id']));\r\n /** @var User $user */\r\n $user = User::model()->findByPk(Yii::app()->siteUser->getId());\r\n if(!$user)\r\n YiiRestler::error(403,Yii::t('api','Can\\'t get token'));\r\n $token = $user->getToken($app,true);\r\n $ret = $token->toArray();\r\n //$ret['user_id'] = Yii::app()->siteUser->getId();\r\n return $ret;\r\n }", "protected function authToken() {\n\t\treturn $this->encrypt(\n\t\t\tDelectusModule::client_token(),\n\t\t\tDelectusModule::client_salt()\n\t\t);\n\t}", "public function getAuthToken()\n {\n return $this->auth_token;\n }", "public function getClientToken();", "public function getTokenForRequest () {\n\t\t$token = $this->request->bearerToken();\n\n\t\treturn $token;\n\t}", "public function getToken()\n {\n $authHeader = $this->request->getHeader('Authorization');\n $authQuery = $this->request->getQuery('token');\n return $authQuery ? $authQuery : $this->parseBearerValue($authHeader);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get default controller to use
public static function getDefaultController() { return self::$defaultController; }
[ "public function getDefaultController()\n {\n\treturn $this->defaultController;\n }", "public static function getDefaultController() {\n\n\t \t return self::$defaultController;\n\t }", "public function defaultController()\n {\n $config = App::instance()->config();\n\n if (isset($config['view'])) {\n $viewConfig = $config['view'];\n if (isset($viewConfig['default_controller'])) {\n return $viewConfig['default_controller'];\n }\n }\n\n return 'charcoal/app/template/generic';\n }", "private function getDefaultController(): Controller {\n\t\t$default_controller_class = $this->controller_namespace . self::DEFAULT_CONTROLLER;\n\n\t\treturn $this->instanceController( $default_controller_class );\n\t}", "public function getDefaultControllerName();", "public function getDefaultControllerName()\n {\n return $this->defaultController;\n }", "public function getDefaultControllerName()\n {\n return $this->_defaultController;\n }", "function getDefaultControllerName() {\n return Angie::getConfig('system.default_controller');\n }", "public function getDefaultControllerName()\n\t{\n\t\treturn $this->_defaults[ 'controller' ];\n\t}", "public function getController() {\n if (!empty($this->path[0])) {\n // Check if there is a path\n $controller = $this->path[0];\n if (file_exists('controller/' . $controller . 'Controller.php')) {\n // Check if there is a controller\n $this->controller = $controller;\n }\n else {\n // We will set the default controller to be used\n $this->controller = $this->standardController;\n }\n }\n\n else {\n $this->controller = $this->standardController;\n }\n }", "function default_controller(){\n return defined('Default_index') ? Default_index : 'index';\n }", "public function getDefaultControllerName()\r\n {\r\n return $this->defaultControllerName;\r\n }", "public static function getController() {\n\n $controller_segment = Url::segment(0);\n return (!empty($controller_segment)) ? $controller_segment : 'home';\n }", "private function _load_default_controller(){\n\t\trequire_once('app/controller/index.php');\n\t\t$default_controller = new Index();\n\t\t$default_controller->index();\n\t}", "public static function main_controller() {\n return Request::main()->controller_instance;\n }", "private static function get_controller()\n\t{\n\t\tif (Controller::$current !== null)\n\t\t\treturn Controller::$current;\n\t}", "public function getBaseController()\n {\n if ($this->def->getService() === null ||\n $this->def->getService()->getBaseController() === null) {\n return 'RestController';\n }\n\n return $this->def->getService()->getBaseController();\n }", "public function getController()\n\t{\t\t\n\t\tif ($this->controller)\n\t\t{\n\t\t\t$_GET['controller'] = $this->controller;\n\t\t\treturn $this->controller;\n\t\t}\n\t\n\t\t$controller = Tools::getValue('controller');\n\t\n\t\tif (isset($controller) && is_string($controller) && preg_match('/^([0-9a-z_-]+)\\?(.*)=(.*)$/Ui', $controller, $m))\n\t\t{\n\t\t\t$controller = $m[1];\n\t\t\tif (isset($_GET['controller']))\n\t\t\t\t$_GET[$m[2]] = $m[3];\n\t\t\telse if (isset($_POST['controller']))\n\t\t\t\t$_POST[$m[2]] = $m[3];\n\t\t}\n\t\n\t\t// Use routes ? (for url rewriting)\n\t\tif ($this->use_routes && !$controller)\n\t\t{\n\t\t\tif (!$this->request_uri)\n\t\t\t\treturn strtolower($this->controller_not_found);\n\t\t\t$controller = $this->controller_not_found;\n\n\t\t\t// Add empty route as last route to prevent this greedy regexp to match request uri before right time\n\t\t\tif ($this->empty_route)\n\t\t\t\t$this->addRoute($this->empty_route['routeID'], $this->empty_route['rule'], $this->empty_route['controller']);\n\n\t\t\tif (isset($this->routes))\n\t\t\t\tforeach ($this->routes as $route)\n\t\t\t\t\tif (preg_match($route['regexp'], $this->request_uri, $m))\n\t\t\t\t\t{\n\t\t\t\t\t\t// Route found ! Now fill $_GET with parameters of uri\n\t\t\t\t\t\tforeach ($m as $k => $v)\n\t\t\t\t\t\t\tif (!is_numeric($k))\n\t\t\t\t\t\t\t\t$_GET[$k] = $v;\n\t\n\t\t\t\t\t\t$controller = $route['controller'] ? $route['controller'] : $_GET['controller'];\n\t\t\t\t\t\tif (!empty($route['params']))\n\t\t\t\t\t\t\tforeach ($route['params'] as $k => $v)\n\t\t\t\t\t\t\t\t$_GET[$k] = $v;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\tif ($controller == 'index' || $this->request_uri == '/index.php')\n\t\t\t\t$controller = $this->default_controller;\n\t\t\t$this->controller = $controller;\n\t\t}\n\t\t// Default mode, take controller from url\n\t\telse\n\t\t\t$this->controller = $controller;\n\n\t\t$this->controller = str_replace('-', '', $this->controller);\n\t\t$_GET['controller'] = $this->controller;\n\t\treturn $this->controller;\n\t}", "static function current_controller() {\r\n static $current_controller;\r\n\r\n if (!isset($current_controller)) {\r\n $class_name = self::current_controller_class();\r\n if ($class_name && class_exists($class_name)) {\r\n $current_controller = new $class_name();\r\n }\r\n else {\r\n $current_controller = new ctrl_page_404();\r\n }\r\n }\r\n\r\n return $current_controller;\r\n\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Operation deleteTagWithHttpInfo Deletes a Tag from an Opportunity
public function deleteTagWithHttpInfo($id, $tag_name) { // verify the required parameter 'id' is set if ($id === null) { throw new \InvalidArgumentException('Missing the required parameter $id when calling deleteTag'); } // verify the required parameter 'tag_name' is set if ($tag_name === null) { throw new \InvalidArgumentException('Missing the required parameter $tag_name when calling deleteTag'); } // parse inputs $resourcePath = "/Opportunities/{id}/Tags/{tagName}"; $httpBody = ''; $queryParams = array(); $headerParams = array(); $formParams = array(); $_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'text/json')); if (!is_null($_header_accept)) { $headerParams['Accept'] = $_header_accept; } $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/json')); // path params if ($id !== null) { $resourcePath = str_replace( "{" . "id" . "}", $this->apiClient->getSerializer()->toPathValue($id), $resourcePath ); } // path params if ($tag_name !== null) { $resourcePath = str_replace( "{" . "tagName" . "}", $this->apiClient->getSerializer()->toPathValue($tag_name), $resourcePath ); } // default format to json $resourcePath = str_replace("{format}", "json", $resourcePath); // for model (json/xml) if (isset($_tempBody)) { $httpBody = $_tempBody; // $_tempBody is the method argument, if present } elseif (count($formParams) > 0) { $httpBody = $formParams; // for HTTP post (form) } // make the API Call try { list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( $resourcePath, 'DELETE', $queryParams, $httpBody, $headerParams, null, '/Opportunities/{id}/Tags/{tagName}' ); return array(null, $statusCode, $httpHeader); } catch (ApiException $e) { switch ($e->getCode()) { } throw $e; } }
[ "public function topologyTagUuidDeleteWithHttpInfo($topotaguuid)\n {\n $request = $this->topologyTagUuidDeleteRequest($topotaguuid);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n return [null, $statusCode, $response->getHeaders()];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n throw $e;\n }\n }", "public function deleteShipmentTagWithHttpInfo($shipment_id, $shipment_tag)\n {\n \n // verify the required parameter 'shipment_id' is set\n if ($shipment_id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $shipment_id when calling deleteShipmentTag');\n }\n // verify the required parameter 'shipment_tag' is set\n if ($shipment_tag === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $shipment_tag when calling deleteShipmentTag');\n }\n \n // parse inputs\n $resourcePath = \"/beta/shipment/{shipmentId}/tag/{shipmentTag}\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array());\n \n \n \n // path params\n \n if ($shipment_id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"shipmentId\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($shipment_id),\n $resourcePath\n );\n }// path params\n \n if ($shipment_tag !== null) {\n $resourcePath = str_replace(\n \"{\" . \"shipmentTag\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($shipment_tag),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n \n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n \n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('API-Key');\n if (strlen($apiKey) !== 0) {\n $headerParams['API-Key'] = $apiKey;\n }\n \n \n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath, 'DELETE',\n $queryParams, $httpBody,\n $headerParams\n );\n \n return array(null, $statusCode, $httpHeader);\n \n } catch (ApiException $e) {\n switch ($e->getCode()) { \n }\n \n throw $e;\n }\n }", "public function deleteVendorTagWithHttpInfo($vendor_id, $vendor_tag)\n {\n \n // verify the required parameter 'vendor_id' is set\n if ($vendor_id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $vendor_id when calling deleteVendorTag');\n }\n // verify the required parameter 'vendor_tag' is set\n if ($vendor_tag === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $vendor_tag when calling deleteVendorTag');\n }\n \n // parse inputs\n $resourcePath = \"/beta/vendor/{vendorId}/tag/{vendorTag}\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array());\n \n \n \n // path params\n \n if ($vendor_id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"vendorId\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($vendor_id),\n $resourcePath\n );\n }// path params\n \n if ($vendor_tag !== null) {\n $resourcePath = str_replace(\n \"{\" . \"vendorTag\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($vendor_tag),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n \n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n \n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('API-Key');\n if (strlen($apiKey) !== 0) {\n $headerParams['API-Key'] = $apiKey;\n }\n \n \n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath, 'DELETE',\n $queryParams, $httpBody,\n $headerParams\n );\n \n return array(null, $statusCode, $httpHeader);\n \n } catch (ApiException $e) {\n switch ($e->getCode()) { \n }\n \n throw $e;\n }\n }", "public function teamDeleteWithHttpInfo()\n {\n $request = $this->teamDeleteRequest();\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n $this->response = $response;\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n (int) $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? (string) $e->getResponse()->getBody() : null\n );\n } catch (ConnectException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n (int) $e->getCode(),\n null,\n null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n (string) $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n\n return [null, $statusCode, $response->getHeaders()];\n } catch (ApiException $e) {\n $statusCode = $e->getCode();\n\n $rangeCodeLeft = (int) (substr('4XX', 0, 1) . '00');\n $rangeCodeRight = (int) (substr('4XX', 0, 1) . '99');\n if ($statusCode >= $rangeCodeLeft && $statusCode <= $rangeCodeRight) {\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Dropbox\\Sign\\Model\\ErrorResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n }\n\n throw $e;\n }\n }", "public function deleteWarehouseTagWithHttpInfo($warehouse_id, $warehouse_tag)\n {\n \n // verify the required parameter 'warehouse_id' is set\n if ($warehouse_id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $warehouse_id when calling deleteWarehouseTag');\n }\n // verify the required parameter 'warehouse_tag' is set\n if ($warehouse_tag === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $warehouse_tag when calling deleteWarehouseTag');\n }\n \n // parse inputs\n $resourcePath = \"/beta/warehouse/{warehouseId}/tag/{warehouseTag}\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array());\n \n \n \n // path params\n \n if ($warehouse_id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"warehouseId\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($warehouse_id),\n $resourcePath\n );\n }// path params\n \n if ($warehouse_tag !== null) {\n $resourcePath = str_replace(\n \"{\" . \"warehouseTag\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($warehouse_tag),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n \n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n \n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('API-Key');\n if (strlen($apiKey) !== 0) {\n $headerParams['API-Key'] = $apiKey;\n }\n \n \n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath, 'DELETE',\n $queryParams, $httpBody,\n $headerParams\n );\n \n return array(null, $statusCode, $httpHeader);\n \n } catch (ApiException $e) {\n switch ($e->getCode()) { \n }\n \n throw $e;\n }\n }", "public function deleteJobTimeActivityTagWithHttpInfo($job_time_activity_id, $job_time_activity_tag)\n {\n $returnType = '';\n $request = $this->deleteJobTimeActivityTagRequest($job_time_activity_id, $job_time_activity_tag);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n return [null, $statusCode, $response->getHeaders()];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n throw $e;\n }\n }", "public function deleteOrderLineActivityTagWithHttpInfo($order_line_activity_id, $order_line_activity_tag)\n {\n \n // verify the required parameter 'order_line_activity_id' is set\n if ($order_line_activity_id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $order_line_activity_id when calling deleteOrderLineActivityTag');\n }\n // verify the required parameter 'order_line_activity_tag' is set\n if ($order_line_activity_tag === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $order_line_activity_tag when calling deleteOrderLineActivityTag');\n }\n \n // parse inputs\n $resourcePath = \"/beta/orderLineActivity/{orderLineActivityId}/tag/{orderLineActivityTag}\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array());\n \n \n \n // path params\n \n if ($order_line_activity_id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"orderLineActivityId\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($order_line_activity_id),\n $resourcePath\n );\n }// path params\n \n if ($order_line_activity_tag !== null) {\n $resourcePath = str_replace(\n \"{\" . \"orderLineActivityTag\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($order_line_activity_tag),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n \n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n \n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('API-Key');\n if (strlen($apiKey) !== 0) {\n $headerParams['API-Key'] = $apiKey;\n }\n \n \n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath, 'DELETE',\n $queryParams, $httpBody,\n $headerParams\n );\n \n return array(null, $statusCode, $httpHeader);\n \n } catch (ApiException $e) {\n switch ($e->getCode()) { \n }\n \n throw $e;\n }\n }", "public function deleteInvoiceWorksheetTagWithHttpInfo($invoice_worksheet_id, $invoice_worksheet_tag)\n {\n $returnType = '';\n $request = $this->deleteInvoiceWorksheetTagRequest($invoice_worksheet_id, $invoice_worksheet_tag);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n return [null, $statusCode, $response->getHeaders()];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n throw $e;\n }\n }", "public function deleteBusinessTransactionTagWithHttpInfo($business_transaction_id, $business_transaction_tag)\n {\n $returnType = '';\n $request = $this->deleteBusinessTransactionTagRequest($business_transaction_id, $business_transaction_tag);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n return [null, $statusCode, $response->getHeaders()];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n throw $e;\n }\n }", "public function productsIdTagsFkDeleteWithHttpInfo($id, $fk)\n {\n // verify the required parameter 'id' is set\n if ($id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $id when calling productsIdTagsFkDelete');\n }\n // verify the required parameter 'fk' is set\n if ($fk === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $fk when calling productsIdTagsFkDelete');\n }\n // parse inputs\n $resourcePath = \"/Products/{id}/tags/{fk}\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/json','application/x-www-form-urlencoded','application/xml','text/xml'));\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"id\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($id),\n $resourcePath\n );\n }\n // path params\n if ($fk !== null) {\n $resourcePath = str_replace(\n \"{\" . \"fk\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($fk),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token');\n if (strlen($apiKey) !== 0) {\n $queryParams['access_token'] = $apiKey;\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'DELETE',\n $queryParams,\n $httpBody,\n $headerParams,\n null,\n '/Products/{id}/tags/{fk}'\n );\n\n return array(null, $statusCode, $httpHeader);\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n\n throw $e;\n }\n }", "public function deletePerpetualInventoryLogTagWithHttpInfo($perpetual_inventory_log_id, $perpetual_inventory_log_tag)\n {\n $returnType = '';\n $request = $this->deletePerpetualInventoryLogTagRequest($perpetual_inventory_log_id, $perpetual_inventory_log_tag);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n return [null, $statusCode, $response->getHeaders()];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n throw $e;\n }\n }", "public function deleteScheduledPlanLogTagWithHttpInfo($scheduled_plan_log_id, $scheduled_plan_log_tag)\n {\n $returnType = '';\n $request = $this->deleteScheduledPlanLogTagRequest($scheduled_plan_log_id, $scheduled_plan_log_tag);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n return [null, $statusCode, $response->getHeaders()];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n throw $e;\n }\n }", "public function deleteWithHttpInfo($request)\n {\n $request = $this->deleteRequest($request);\n \n $response = $this->callClient($request);\n return [null, $response->getStatusCode(), $response->getHeaders()];\n }", "public function deleteWarehouseDocumentTagWithHttpInfo($warehouse_document_id, $warehouse_document_tag)\n {\n \n // verify the required parameter 'warehouse_document_id' is set\n if ($warehouse_document_id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $warehouse_document_id when calling deleteWarehouseDocumentTag');\n }\n // verify the required parameter 'warehouse_document_tag' is set\n if ($warehouse_document_tag === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $warehouse_document_tag when calling deleteWarehouseDocumentTag');\n }\n \n // parse inputs\n $resourcePath = \"/beta/warehouseDocument/{warehouseDocumentId}/tag/{warehouseDocumentTag}\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array());\n \n \n \n // path params\n \n if ($warehouse_document_id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"warehouseDocumentId\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($warehouse_document_id),\n $resourcePath\n );\n }// path params\n \n if ($warehouse_document_tag !== null) {\n $resourcePath = str_replace(\n \"{\" . \"warehouseDocumentTag\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($warehouse_document_tag),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n \n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n \n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('API-Key');\n if (strlen($apiKey) !== 0) {\n $headerParams['API-Key'] = $apiKey;\n }\n \n \n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath, 'DELETE',\n $queryParams, $httpBody,\n $headerParams\n );\n \n return array(null, $statusCode, $httpHeader);\n \n } catch (ApiException $e) {\n switch ($e->getCode()) { \n }\n \n throw $e;\n }\n }", "public function deleteReplenishmentTagWithHttpInfo($replenishment_id, $replenishment_tag)\n {\n $returnType = '';\n $request = $this->deleteReplenishmentTagRequest($replenishment_id, $replenishment_tag);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n return [null, $statusCode, $response->getHeaders()];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n throw $e;\n }\n }", "public function deleteFulfillmentProcessLogTagWithHttpInfo($fulfillment_process_log_id, $fulfillment_process_log_tag)\n {\n $returnType = '';\n $request = $this->deleteFulfillmentProcessLogTagRequest($fulfillment_process_log_id, $fulfillment_process_log_tag);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n return [null, $statusCode, $response->getHeaders()];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n throw $e;\n }\n }", "public function deleteFulfillmentProcessTagWithHttpInfo($fulfillment_process_id, $fulfillment_process_tag)\n {\n $returnType = '';\n $request = $this->deleteFulfillmentProcessTagRequest($fulfillment_process_id, $fulfillment_process_tag);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n return [null, $statusCode, $response->getHeaders()];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n throw $e;\n }\n }", "public function deleteOmsOrderTagWithHttpInfo($oms_order_id, $oms_order_tag)\n {\n $returnType = '';\n $request = $this->deleteOmsOrderTagRequest($oms_order_id, $oms_order_tag);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n return [null, $statusCode, $response->getHeaders()];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n throw $e;\n }\n }", "public function deleteBillingCodeActivityTagWithHttpInfo($billing_code_activity_id, $billing_code_activity_tag)\n {\n \n // verify the required parameter 'billing_code_activity_id' is set\n if ($billing_code_activity_id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $billing_code_activity_id when calling deleteBillingCodeActivityTag');\n }\n // verify the required parameter 'billing_code_activity_tag' is set\n if ($billing_code_activity_tag === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $billing_code_activity_tag when calling deleteBillingCodeActivityTag');\n }\n \n // parse inputs\n $resourcePath = \"/beta/billingCodeActivity/{billingCodeActivityId}/tag/{billingCodeActivityTag}\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array());\n \n \n \n // path params\n \n if ($billing_code_activity_id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"billingCodeActivityId\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($billing_code_activity_id),\n $resourcePath\n );\n }// path params\n \n if ($billing_code_activity_tag !== null) {\n $resourcePath = str_replace(\n \"{\" . \"billingCodeActivityTag\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($billing_code_activity_tag),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n \n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n \n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('API-Key');\n if (strlen($apiKey) !== 0) {\n $headerParams['API-Key'] = $apiKey;\n }\n \n \n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath, 'DELETE',\n $queryParams, $httpBody,\n $headerParams\n );\n \n return array(null, $statusCode, $httpHeader);\n \n } catch (ApiException $e) {\n switch ($e->getCode()) { \n }\n \n throw $e;\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Show the notice on the next admin page that's visited by the current user. The notice will be shown only once. More accurately, this shows the notice the next time the admin_notices hook is called in the context of the current user, whether that happens during this page load or the next, or a week later. The intended use is for form handlers that redirect to another page, plugin activation hooks and other callbacks that can't display a notice in the usual way.
public function showOnNextPage() { if (!is_user_logged_in()) { return $this; } //Schedule the notice to appear on the next page. add_user_meta( get_current_user_id(), static::DELAYED_NOTICE_OPTION, wp_slash($this->toJson()), false ); return $this; }
[ "public static function action_admin_notices() {\r\n\t\tGFCommon::display_dismissible_message( false, 'site-wide' );\r\n\t}", "public static function admin_notices() {\n\t\t// Show tracker notice after 24 hours from installed time.\n\t\tif ( self::get_installed_time() > strtotime( '-24 hours' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( '1' === get_option( 'elementor_tracker_notice' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( self::is_allow_track() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! current_user_can( 'manage_options' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$elementor_pages = new \\WP_Query( [\n\t\t\t'post_type' => 'any',\n\t\t\t'post_status' => 'publish',\n\t\t\t'fields' => 'ids',\n\t\t\t'update_post_meta_cache' => false,\n\t\t\t'update_post_term_cache' => false,\n\t\t\t'meta_key' => '_elementor_edit_mode',\n\t\t\t'meta_value' => 'builder',\n\t\t] );\n\n\t\tif ( 2 > $elementor_pages->post_count ) {\n\t\t\treturn;\n\t\t}\n\n\t\tself::$notice_shown = true;\n\n\t\t// TODO: Skip for development env.\n\t\t$optin_url = wp_nonce_url( add_query_arg( 'elementor_tracker', 'opt_into' ), 'opt_into' );\n\t\t$optout_url = wp_nonce_url( add_query_arg( 'elementor_tracker', 'opt_out' ), 'opt_out' );\n\n\t\t$tracker_description_text = __( 'Love using Elementor? Become a super contributor by opting in to our anonymous plugin data collection and to our updates. We guarantee no sensitive data is collected.', 'elementor' );\n\n\t\t/**\n\t\t * Tracker admin description text.\n\t\t *\n\t\t * Filters the admin notice text for anonymous data collection.\n\t\t *\n\t\t * @since 1.0.0\n\t\t *\n\t\t * @param string $tracker_description_text Description text displayed in admin notice.\n\t\t */\n\t\t$tracker_description_text = apply_filters( 'elementor/tracker/admin_description_text', $tracker_description_text );\n\t\t?>\n\t\t<div class=\"notice updated elementor-message\">\n\t\t\t<div class=\"elementor-message-inner\">\n\t\t\t\t<div class=\"elementor-message-icon\">\n\t\t\t\t\t<div class=\"e-logo-wrapper\">\n\t\t\t\t\t\t<i class=\"eicon-elementor\" aria-hidden=\"true\"></i>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"elementor-message-content\">\n\t\t\t\t\t<p><?php echo esc_html( $tracker_description_text ); ?> <a href=\"https://go.elementor.com/usage-data-tracking/\" target=\"_blank\"><?php echo __( 'Learn more.', 'elementor' ); ?></a></p>\n\t\t\t\t\t<p class=\"elementor-message-actions\">\n\t\t\t\t\t\t<a href=\"<?php echo $optin_url; ?>\" class=\"button button-primary\"><?php echo __( 'Sure! I\\'d love to help', 'elementor' ); ?></a>&nbsp;<a href=\"<?php echo $optout_url; ?>\" class=\"button-secondary\"><?php echo __( 'No thanks', 'elementor' ); ?></a>\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t}", "public function general_admin_notice()\n {\n if (isset($_GET['page']) && 'optimizer-3000' == $_GET['page'] && isset($_REQUEST['settings-updated'])) {\n echo '<div class=\"notice notice-success is-dismissible\"><p>'.__('Settings saved.').'</p></div>';\n }\n }", "function dpsp_admin_notices() {\n\n\t\t// Exit if settings updated is not present\n\t\tif( !isset( $_GET['settings-updated'] ) )\n\t\t\treturn;\n\n\t\t$admin_page = ( isset( $_GET['page'] ) ? $_GET['page'] : '' );\n\n\t\t// Show these notices only on dpsp pages\n\t\tif( strpos( $admin_page, 'dpsp' ) === false || $admin_page == 'dpsp-register-version' )\n\t\t\treturn;\n\n\t\t// Get messages\n\t\t$message_id = ( isset( $_GET['dpsp_message_id'] ) ? $_GET['dpsp_message_id'] : 0 );\n\t\t$message \t= dpsp_get_admin_notice_message( $message_id );\n\n\t\t$class = ( isset( $_GET['dpsp_message_class'] ) ? $_GET['dpsp_message_class'] : 'updated' );;\n\n\t\tif( isset( $message ) ) {\n\n\t\t\techo '<div class=\"dpsp-admin-notice notice is-dismissible ' . esc_attr( $class ) . '\">';\n\t \techo '<p>' . esc_attr( $message ) . '</p>';\n\t echo '</div>';\n\t\t}\n\n\t}", "public function admin_message() {\n\t\t\tif ( ! empty( $_GET['page'] ) && $_GET['page'] == 'edd-payment-moderation' ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( current_user_can( 'view_shop_reports' ) && $this->count_pending() ) {\n\n\t\t\t\t$plural = $this->count_pending() >= 2 ? 's' : '';\n\t\t\t\tadd_settings_error( 'eddfm-notices', 'edd-receipt-added', sprintf( __( 'You have %s possible <a href=\"%s\">fraudulent payment%s</a>.', 'edd-fm' ), $this->count_pending(), admin_url( 'edit.php?post_type=download&page=edd-payment-moderation' ), $plural ), 'error' );\n\t\t\t}\n\n\t\t\tsettings_errors( 'eddfm-notices' );\n\t\t}", "public function notices_action() {\n\t\t// Set update notice dismissal, so that the notice is no longer shown\n\t\tif ( isset( $_GET['aione_update_notice'] ) && $_GET['aione_update_notice'] ) {\n\t\t\tadd_user_meta( $this->current_user->ID, 'aione_update_notice', '1', true );\n\t\t}\n\t}", "public function activation_admin_notice() {\n\t\t\tglobal $pagenow;\n\t\t\tif ( is_admin() && ( 'themes.php' === $pagenow ) && isset( $_GET['activated'] ) ) {\n\t\t\t\tadd_action( 'admin_notices', array( $this, 'welcome_admin_notice' ), 99 );\n\t\t\t}\n\t\t}", "function mcluhan_admin_notices() {\n\t\tif ( isset( $_GET['activated'] ) && true == $_GET['activated'] && 'mcluhan' == get_option( 'template' ) && get_option( 'posts_per_page' ) < 999 ) : ?>\n\n\t\t\t<div class=\"notice notice-info is-dismissible\">\n\t\t\t\t<?php /* Translators: %1$1s = opening link to the demo site, %2$2s = closing link tag, %3$3s = link to the reading options, %4$4s = closing link tag */ ?>\n\t\t\t\t<p><?php printf( _x( 'To make McLuhan display like the %1$1sdemo site%2$2s, with all posts listed on archive pages, you need to change the \"Blog pages show at most\" setting in %3$3sSettings > Reading%4$4s to a value exceeding the number of posts on your site.', 'Translators: %1$1s = opening link to the demo site, %2$2s = closing link tag, %3$3s = link to the reading options, %4$4s = closing link tag', 'mcluhan' ), '<a href=\"https://www.andersnoren.se/themes/mcluhan/\">', '</a>', '<a href=\"' . admin_url( 'options-reading.php' ) . '\">', '</a>' ); ?></p>\n\t\t\t</div>\n\n\t\t\t<?php\n\t\tendif;\n\n\t}", "public function storefront_welcome_admin_notice() {\n\t\t?>\n\t\t\t<div class=\"updated fade\">\n\t\t\t\t<p><?php echo sprintf( esc_html__( 'Thanks for choosing Storefront! You can read hints and tips on how get the most out of your new theme on the %swelcome screen%s.', 'storefront' ), '<a href=\"' . esc_url( admin_url( 'themes.php?page=storefront-welcome' ) ) . '\">', '</a>' ); ?></p>\n\t\t\t\t<p><a href=\"<?php echo esc_url( admin_url( 'themes.php?page=storefront-welcome' ) ); ?>\" class=\"button\" style=\"text-decoration: none;\"><?php _e( 'Get started with Storefront', 'storefront' ); ?></a></p>\n\t\t\t</div>\n\t\t<?php\n\t}", "public function admin_notices() {\n\t\t$user = wp_get_current_user();\n\n\t\t// Return if the provider is not enabled.\n\t\tif ( ! in_array( __CLASS__, Two_Factor_Core::get_enabled_providers_for_user( $user->ID ) ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Return if we are not out of codes.\n\t\tif ( $this->is_available_for_user( $user ) ) {\n\t\t\treturn;\n\t\t}\n\t\t?>\n\t\t<div class=\"error\">\n\t\t\t<p>\n\t\t\t\t<span><?php printf( // WPCS: XSS OK.\n\t\t\t\t\t__( 'Two-Factor: You are out of backup codes and need to <a href=\"%s\">regenerate!</a>', 'it-l10n-ithemes-security-pro' ),\n\t\t\t\t\tesc_url( get_edit_user_link( $user->ID ) . '#two-factor-backup-codes' )\n\t\t\t\t); ?><span>\n\t\t\t</p>\n\t\t</div>\n\t\t<?php\n\t}", "public function show_dashboard_notices() {\n $current_page = get_current_screen();\n if ('dashboard' === $current_page->base && metaslider_user_sees_notices($this->plugin)) {\n\n // Override the delay to show the thankyou notice on activation\n // if (!empty($_GET['ms_activated'])) {\n\t // $lite_notices = $this->lite_notices();\n\t // $this->notices_content['thankyou'] = $lite_notices['thankyou'];\n // }\n echo $this->do_notice(false, 'dashboard', true); \n }\n }", "public function _show_admin_notices() {\n\t\tforeach ( $this->admin_notices as $i => $notice ) {\n\t\t\t$classes = [\n\t\t\t\t'laborator-notice',\n\t\t\t\t'notice',\n\t\t\t\t'notice-' . $notice['type'],\n\t\t\t];\n\n\t\t\tif ( $notice['dismissible'] ) {\n\t\t\t\t$classes[] = 'is-dismissible';\n\t\t\t}\n\t\t\t?>\n <div <?php kalium_class_attr( $classes ); ?>>\n\t\t\t\t<?php echo wpautop( $notice['message'] ); ?>\n </div>\n\t\t\t<?php\n\t\t}\n\t}", "public function admin_notices() {\n if ( ! function_exists('get_current_screen')) {\n return;\n }\n $screen = get_current_screen();\n if ($screen->id !== 'edit-vf_cache') {\n return;\n }\n\n if (VF_Cache::is_disabled()) {\n printf('<div class=\"%1$s\"><p>%2$s %3$s</p></div>',\n esc_attr('notice notice-error'),\n esc_html__('The Content Hub cache is currently disabled', 'vfwp'),\n ' <a href=\"'\n . admin_url('admin.php?page=vf-settings')\n . '\" class=\"button button-small\">'\n . esc_html__('View Settings', 'vfwp')\n . '</a>'\n );\n }\n }", "function admin_notices() {\n\n\t\t\t// vars\n\t\t\t$view = array(\n\t\t\t\t'button_text' => __( 'Upgrade Database', 'acf' ),\n\t\t\t\t'button_url' => admin_url( 'index.php?page=acf-upgrade' ),\n\t\t\t\t'confirm' => true,\n\t\t\t);\n\n\t\t\t// view\n\t\t\tacf_get_view( 'upgrade/notice', $view );\n\t\t}", "protected function addAdminNoticeConfigNeeded()\n {\n global $pagenow;\n $options = $this->getOptions();\n $di = $this->di;\n \n if (!$options->isInitialized()) {\n if (!($pagenow == 'admin.php' && isset($_GET['page']) && $_GET['page'] == 'imoneza')) { // so if any page BUT the imoneza config page\n add_action('admin_notices', function() use ($di) {\n if (current_user_can('manage_options')) {\n $view = $di['view'];\n $view->setView('admin/notify-config-needed');\n echo $view();\n }\n });\n }\n }\n }", "public function all_admin_notices_users_notice() {\n\t\tglobal $pagenow;\n\n\t\tif ('users.php' != $pagenow) return;\n\n\t\t$admin_login = get_site_option('updraftplus_clone_admin_only_login');\n\n\t\t?>\n\t\t<div id=\"updraftplus_temporary_clone-usernotice\" class=\"updated\">\n\t\t\t<h1><?php _e('UpdraftPlus temporary clone user login settings:', 'updraftplus'); ?></h1>\n\t\t\t<p><?php _e('You can forbid non-admins logins to this cloned site by checking the checkbox below', 'updraftplus'); ?></p>\n\t\t\t<input type=\"checkbox\" name=\"updraftplus_clone_admin_only\" value=\"1\" <?php if ($admin_login) echo 'checked=\"checked\"'; ?> onclick=\"jQuery.post('<?php echo admin_url('admin-ajax.php'); ?>', {action: 'updraftplus_user_notice_ajax', subaction: 'admin_only_login', nonce: '<?php echo wp_create_nonce('updraftplus_admin_only_login');?>', admin_only_login: jQuery(this).is(':checked') });\"> <?php _e('Allow only administrators to log in', 'updraftplus'); ?><br>\n\t\t</div>\n\t\t<?php\n\t}", "public function render_delayed_admin_notices() {\n\t\t$this->render_admin_notices( false );\n\t}", "public function admin_notices() {\n\t\t$socialflow_params = filter_input_array( INPUT_GET );\n\t\tglobal $socialflow;\n\t\tif ( isset( $socialflow_params['page'] ) && $this->slug === $socialflow_params['page'] && isset( $socialflow_params['settings-updated'] ) && $socialflow_params['settings-updated'] ) {\n\t\t\t$socialflow->render_view( 'notice/options-updated' );\n\t\t}\n\t}", "function pilau_admin_notices() {\n\n}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add a decimal based search condition, referenced against one or more columns. Automatically escapes the passed data as a decimal value. If multiple fieldnames are passed, it will perform an OR check against them all.
function whereDecimalInRange($fieldname, $from=null, $to=null, $precision=2) { $param_from = $this->createParam(number_format($from, $precision, '.', '')); $param_to = $this->createParam(number_format($to, $precision, '.', '')); if (!is_array($fieldname)) $fieldname = array($fieldname); $out = array(); foreach ($fieldname as $f) { if (!is_null($from) && !is_null($to)) { $out[] = "(`$f` >= $param_from AND `$fieldname` <= $param_to)"; } elseif (!is_null($from)) { $out[] = "`$f` >= $param_from"; } elseif (!is_null($to)) { $out[] = "`$f` <= $param_to"; } } switch (count($out)) { case 0: break; case 1: $this->where[] = reset($out); break; default: $this->where[] = '('.implode(' OR ', $out).')'; break; } return $this; }
[ "function _sqlWhereColumn($column, $values, $isnumeric=true){\n\nif($values!=\"all\"){\n //priprava promennych\n $values=_arrayRemoveValue(explode(\"-\", $values), \"\");\n $values_count=count($values);\n $sql=\"\";\n $counter=1;\n\n //cyklus\n foreach($values as $value){\n \n //zpracovani hodnoty\n if($isnumeric){$value=intval($value);}\n else{$value=\"'\"._safeStr($value).\"'\";}\n\n //prirazeni k dotazu\n $sql.=$column.\"=\".$value;\n if($counter!=$values_count){$sql.=\" OR \";}\n\n $counter++;\n }\n}\nelse{\n $sql=\"1\";\n}\n\nreturn $sql;\n}", "public function where_or() {\n\t\t\t\t\n\t\t$criteria = $this->prep_args(func_get_args());\n\t\t\n\t\t$or = array();\n\t\tforeach((array) $criteria as $field => $value) {\n\t\t\t\n\t\t\tif(!preg_match('/[\\(\\)<=>!]+/', $field) && stripos($field, ' IS ') === FALSE) {\n\t\t\t\t$operator = (is_null($value))? 'IS' : '=';\n\t\t\t\t$field = array_pop($this->escape_col_names($field)).\" \".$operator;\n\t\t\t}\n\t\t\t\n\t\t\tif(is_null($value) && stripos($field, ' IS ') !== FALSE) {\n\t\t\t\t# WHERE `field` IS NOT NULL\n\t\t\t\t$or[] = \"$field NULL\";\n\t\t\t}\n\t\t\telseif(is_null($value)) {\n\t\t\t\t# WHERE `field` IS NULL\n\t\t\t\t$or[] = \"$field NULL\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\t# WHERE `field` = 'val\\\\ue'\n\t\t\t\t# WHERE `field` = 3\n\t\t\t\t$or[] = sprintf(\"$field %s\", $this->escape($value, $this->connection->get_escape_options() | DatabaseConnection::ESCAPE_QUOTE));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Create our subclause, and add it to the WHERE array\n\t\t$this->where[] = \"(\" . implode(' OR ', $or) . \")\";\n\t\t\n\t\treturn $this;\n\t}", "protected function applySearch() {\n if (empty($this->searchQuery) || empty($this->searchFields)) {\n return;\n }\n\n $value = '%' . $this->searchQuery . '%';\n\n $condition = '';\n foreach ($this->searchFields as $field) {\n $condition .= ($condition == '' ? '' : ' OR ') . '{' . $field . '} LIKE %1%';\n }\n\n $this->query->addCondition($condition, $value);\n }", "public function andWhere($column, $operator = '', $value = '');", "public function where() {\r\n\t\t$args = func_get_args();\r\n\t\t$expr = array_shift($args);\r\n\t\tarray_push($this->_wheres, '(' . $this->_parameterize($expr, $args) . ')');\r\n\t\t$this->_dirty = true;\r\n\t}", "public function prepare_field_filter_statement($column = '', $value = '')\n\t{\n\t\t// Carrega controlador CI para uso de funcoes internas\n\t\t$CI =& get_instance();\n\t\t$CI->load->library('acme/validation');\n\t\t\n\t\t// Só acrescenta a linha caso o valor do campo seja diferente de vazio\n\t\tif($value != '')\n\t\t{\n\t\t\tif($CI->validation->is_integer_($value) || $CI->validation->is_float_($value))\n\t\t\t{\n\t\t\t\treturn \" AND $column = $value\";\n\t\t\t}\n\t\t\n\t\t\telseif($CI->validation->is_alfa($value))\n\t\t\t{\n\t\t\t\treturn \" AND $column LIKE '%\" . $this->db->escape_like_str($value) . \"%'\";\n\t\t\t}\n\t\t\n\t\t\telseif($CI->validation->is_currency($value))\n\t\t\t{\n\t\t\t\treturn \" AND $column = '\" . $value . \"'\";\n\t\t\t}\n\t\t\t\n\t\t\telseif(isset($value)) \n\t\t\t{\n\t\t\t\treturn \" AND $column LIKE '%\" . $this->db->escape_like_str($value) . \"%'\";\n\t\t\t}\n\t\t}\n\t}", "abstract protected function BuildWhereFromFields($search_fields);", "function _grAPI_getWhereForSearchFields($options) {\r\n $seenQueries = [];\r\n $andConditions = [];\r\n $schema = $options['_schema'];\r\n foreach ($_REQUEST as $name => $values) {\r\n if (!is_array($values)) { $values = [$values]; } // convert single values to arrays so we can process everything the same way\r\n if (!$values || $values[0] == '') { continue; } // skip fields with empty values\r\n\r\n $suffixList = '_min|_max|_match|_keyword|_prefix|_query|_empty';\r\n if (empty($options['searchSuffixRequired'])) { $suffixList .= '|'; }\r\n\r\n if (!preg_match(\"/^(.+?)($suffixList)\\z/\", $name, $matches)) { continue; } // skip fields without search suffixes\r\n $fieldnamesAsCSV = $matches[1];\r\n $searchType = $matches[2];\r\n $fieldnames = explode(',',$fieldnamesAsCSV);\r\n $orConditions = [];\r\n\r\n foreach ($fieldnames as $fieldnameString) {\r\n foreach ($values as $value) {\r\n\r\n // get field value for date searches.\r\n // don't do the date search if the suffix is actually part of the field name.\r\n if (preg_match(\"/^(.+?)_(year|month|day)\\z/\", $fieldnameString, $matches) && !is_array(@$schema[$fieldnameString])) {\r\n $fieldname = $matches[1];\r\n $dateValue = $matches[2];\r\n if (!is_array(@$schema[$fieldname])) { continue; } // skip invalid fieldnames\r\n if ($dateValue == 'year') { $fieldValue = \"YEAR(`$fieldname`)\"; }\r\n elseif ($dateValue == 'month') { $fieldValue = \"MONTH(`$fieldname`)\"; }\r\n elseif ($dateValue == 'day') { $fieldValue = \"DAYOFMONTH(`$fieldname`)\"; }\r\n else { die(\"unknown date value '$dateValue'!\"); }\r\n }\r\n\r\n // get field value for everything else\r\n else {\r\n if (!is_array(@$schema[$fieldnameString])) { continue; } // skip invalid fieldnames\r\n $fieldValue = '`' .str_replace('.', '`.`', $fieldnameString). '`'; // quote bare fields and qualified fieldnames (table.field)\r\n }\r\n\r\n // add conditions\r\n $fieldSchema = @$schema[$fieldnameString];\r\n $isMultiList = @$fieldSchema['type'] == 'list' && (@$fieldSchema['listType'] == 'pulldownMulti' || @$fieldSchema['listType'] == 'checkboxes');\r\n $valueAsNumberOnly = (float) preg_replace('/[^\\d\\.]/', '', $value);\r\n if (@$fieldSchema['type'] == 'date' && strlen($valueAsNumberOnly) == 8) { // add time to dates without it\r\n if ($searchType == '_min') { $valueAsNumberOnly .= '000000'; } // match from start of day\r\n if ($searchType == '_max') { $valueAsNumberOnly .= '240000'; } // match to end of day\r\n }\r\n\r\n if (!$fieldValue) { die(\"No fieldValue defined!\"); }\r\n if ($searchType == '_min') { $orConditions[] = \"$fieldValue+0 >= $valueAsNumberOnly\"; }\r\n else if ($searchType == '_max') { $orConditions[] = \"$fieldValue+0 <= $valueAsNumberOnly\"; }\r\n else if ($searchType == '_match' || $searchType == '') {\r\n // for single value lists: match exact column value\r\n // for multi value lists: match one of the multiple values or exact column value (to support single value-lists that were converted to multi-value)\r\n $thisCondition = \"$fieldValue = '\" .mysql_escape($value). \"'\";\r\n if ($isMultiList) { $thisCondition = \"($thisCondition OR $fieldValue LIKE '%\\\\t\" .mysql_escape($value). \"\\\\t%')\"; }\r\n $orConditions[] = $thisCondition;\r\n }\r\n else if ($searchType == '_keyword') { $orConditions[] = \"$fieldValue LIKE '%\" .mysql_escape($value, true). \"%'\"; }\r\n else if ($searchType == '_prefix') { $orConditions[] = \"$fieldValue LIKE '\" .mysql_escape($value, true). \"%'\"; }\r\n else if ($searchType == '_query') {\r\n if (@$seenQueries[\"$fieldnamesAsCSV=$searchType\"]++) { continue; } // only add each query once since we're add all fields at once\r\n $orConditions[] = _grAPI_getWhereForSearchQuery($values[0], $fieldnames, $schema);\r\n }\r\n else if ($searchType == '_empty') { $orConditions[] = \"$fieldValue = ''\"; }\r\n else { die(\"Unknown search type '$searchType'!\"); }\r\n }\r\n }\r\n\r\n $condition = join(' OR ', $orConditions);\r\n if ($condition) { $andConditions[] = \"($condition)\"; }\r\n\r\n }\r\n\r\n //\r\n $searchWhere = join(\" AND \", $andConditions);\r\n if (!empty($options['searchMatchRequired']) && !$searchWhere) { $searchWhere = \"false\"; } // don't return anything if no search criteria\r\n\r\n //\r\n return $searchWhere;\r\n}", "function AdvancedSearchWhere() {\r\n\t\tglobal $Security;\r\n\t\t$sWhere = \"\";\r\n\t\tif (!$Security->CanSearch()) return \"\";\r\n\t\t$this->BuildSearchSql($sWhere, $this->fld_booking_ai_id, FALSE); // fld_booking_ai_id\r\n\t\t$this->BuildSearchSql($sWhere, $this->fld_pickup_point, FALSE); // fld_pickup_point\r\n\t\t$this->BuildSearchSql($sWhere, $this->fld_customer_name, FALSE); // fld_customer_name\r\n\t\t$this->BuildSearchSql($sWhere, $this->fld_mobile_no, FALSE); // fld_mobile_no\r\n\t\t$this->BuildSearchSql($sWhere, $this->fld_booking_datetime, FALSE); // fld_booking_datetime\r\n\t\t$this->BuildSearchSql($sWhere, $this->fld_coupon_code, FALSE); // fld_coupon_code\r\n\t\t$this->BuildSearchSql($sWhere, $this->fld_driver_rating, FALSE); // fld_driver_rating\r\n\t\t$this->BuildSearchSql($sWhere, $this->fld_customer_feedback, FALSE); // fld_customer_feedback\r\n\t\t$this->BuildSearchSql($sWhere, $this->fld_is_cancelled, FALSE); // fld_is_cancelled\r\n\t\t$this->BuildSearchSql($sWhere, $this->fld_total_fare, FALSE); // fld_total_fare\r\n\t\t$this->BuildSearchSql($sWhere, $this->fld_booked_driver_id, FALSE); // fld_booked_driver_id\r\n\t\t$this->BuildSearchSql($sWhere, $this->fld_is_approved, FALSE); // fld_is_approved\r\n\t\t$this->BuildSearchSql($sWhere, $this->fld_is_completed, FALSE); // fld_is_completed\r\n\t\t$this->BuildSearchSql($sWhere, $this->fld_is_active, FALSE); // fld_is_active\r\n\t\t$this->BuildSearchSql($sWhere, $this->fld_created_on, FALSE); // fld_created_on\r\n\t\t$this->BuildSearchSql($sWhere, $this->fld_dropoff_point, FALSE); // fld_dropoff_point\r\n\t\t$this->BuildSearchSql($sWhere, $this->fld_estimated_time, FALSE); // fld_estimated_time\r\n\t\t$this->BuildSearchSql($sWhere, $this->fld_estimated_fare, FALSE); // fld_estimated_fare\r\n\t\t$this->BuildSearchSql($sWhere, $this->fld_brn_no, FALSE); // fld_brn_no\r\n\t\t$this->BuildSearchSql($sWhere, $this->fld_journey_type, FALSE); // fld_journey_type\r\n\t\t$this->BuildSearchSql($sWhere, $this->fld_vehicle_type, FALSE); // fld_vehicle_type\r\n\t\t$this->BuildSearchSql($sWhere, $this->fld_vehicle_mode, FALSE); // fld_vehicle_mode\r\n\r\n\t\t// Set up search parm\r\n\t\tif ($sWhere <> \"\") {\r\n\t\t\t$this->Command = \"search\";\r\n\t\t}\r\n\t\tif ($this->Command == \"search\") {\r\n\t\t\t$this->fld_booking_ai_id->AdvancedSearch->Save(); // fld_booking_ai_id\r\n\t\t\t$this->fld_pickup_point->AdvancedSearch->Save(); // fld_pickup_point\r\n\t\t\t$this->fld_customer_name->AdvancedSearch->Save(); // fld_customer_name\r\n\t\t\t$this->fld_mobile_no->AdvancedSearch->Save(); // fld_mobile_no\r\n\t\t\t$this->fld_booking_datetime->AdvancedSearch->Save(); // fld_booking_datetime\r\n\t\t\t$this->fld_coupon_code->AdvancedSearch->Save(); // fld_coupon_code\r\n\t\t\t$this->fld_driver_rating->AdvancedSearch->Save(); // fld_driver_rating\r\n\t\t\t$this->fld_customer_feedback->AdvancedSearch->Save(); // fld_customer_feedback\r\n\t\t\t$this->fld_is_cancelled->AdvancedSearch->Save(); // fld_is_cancelled\r\n\t\t\t$this->fld_total_fare->AdvancedSearch->Save(); // fld_total_fare\r\n\t\t\t$this->fld_booked_driver_id->AdvancedSearch->Save(); // fld_booked_driver_id\r\n\t\t\t$this->fld_is_approved->AdvancedSearch->Save(); // fld_is_approved\r\n\t\t\t$this->fld_is_completed->AdvancedSearch->Save(); // fld_is_completed\r\n\t\t\t$this->fld_is_active->AdvancedSearch->Save(); // fld_is_active\r\n\t\t\t$this->fld_created_on->AdvancedSearch->Save(); // fld_created_on\r\n\t\t\t$this->fld_dropoff_point->AdvancedSearch->Save(); // fld_dropoff_point\r\n\t\t\t$this->fld_estimated_time->AdvancedSearch->Save(); // fld_estimated_time\r\n\t\t\t$this->fld_estimated_fare->AdvancedSearch->Save(); // fld_estimated_fare\r\n\t\t\t$this->fld_brn_no->AdvancedSearch->Save(); // fld_brn_no\r\n\t\t\t$this->fld_journey_type->AdvancedSearch->Save(); // fld_journey_type\r\n\t\t\t$this->fld_vehicle_type->AdvancedSearch->Save(); // fld_vehicle_type\r\n\t\t\t$this->fld_vehicle_mode->AdvancedSearch->Save(); // fld_vehicle_mode\r\n\t\t}\r\n\t\treturn $sWhere;\r\n\t}", "protected function addConditionsForOrder(array &$conditions) {\n\t\tif (!isset($_POST['search-sort-by']))\n\t\t\treturn;\n\n\t\tif ($_POST['search-sort-by'] == 'pace') {\n\t\t\t$conditions[] = '`t`.`distance` > 0';\n\t\t} elseif ($_POST['search-sort-by'] == 'gradient') {\n\t\t\t$conditions[] = '`t`.`distance` > 0';\n\t\t\t$conditions[] = '`t`.`elevation` > 0';\n } elseif ($_POST['search-sort-by'] == 'flight_time' || $_POST['search-sort-by'] == 'flight_ratio') {\n $conditions[] = '`t`.`cadence` > 0';\n $conditions[] = '`t`.`groundcontact` > 0';\n\t\t} elseif (in_array($_POST['search-sort-by'], $this->KeysThatShouldIgnoreZero)) {\n\t\t\t$conditions[] = '`t`.`'.$_POST['search-sort-by'].'` != 0';\n\t\t} elseif (in_array($_POST['search-sort-by'], $this->KeysThatShouldIgnoreNull)) {\n\t\t\t$conditions[] = '`t`.`'.$_POST['search-sort-by'].'` IS NOT NULL';\n\t\t}\n\t}", "function AdvancedSearchWhere() {\r\n\t\tglobal $Security;\r\n\t\t$sWhere = \"\";\r\n\t\tif (!$Security->CanSearch()) return \"\";\r\n\t\t$this->BuildSearchSql($sWhere, $this->Id_Venta_Eq, FALSE); // Id_Venta_Eq\r\n\t\t$this->BuildSearchSql($sWhere, $this->FechaVenta, FALSE); // FechaVenta\r\n\t\t$this->BuildSearchSql($sWhere, $this->Id_Tienda, FALSE); // Id_Tienda\r\n\t\t$this->BuildSearchSql($sWhere, $this->Id_Tel_SIM, FALSE); // Id_Tel_SIM\r\n\t\t$this->BuildSearchSql($sWhere, $this->Id_Cliente, FALSE); // Id_Cliente\r\n\t\t$this->BuildSearchSql($sWhere, $this->Num_IMEI, FALSE); // Num_IMEI\r\n\t\t$this->BuildSearchSql($sWhere, $this->Num_ICCID, FALSE); // Num_ICCID\r\n\t\t$this->BuildSearchSql($sWhere, $this->Num_CEL, FALSE); // Num_CEL\r\n\t\t$this->BuildSearchSql($sWhere, $this->Descripcion_SIM, FALSE); // Descripcion_SIM\r\n\t\t$this->BuildSearchSql($sWhere, $this->Reg_Venta_Movi, FALSE); // Reg_Venta_Movi\r\n\t\t$this->BuildSearchSql($sWhere, $this->Monto_Recarga_Movi, FALSE); // Monto_Recarga_Movi\r\n\t\t$this->BuildSearchSql($sWhere, $this->Folio_Recarga_Movi, FALSE); // Folio_Recarga_Movi\r\n\t\t$this->BuildSearchSql($sWhere, $this->ImprimirNotaVenta, FALSE); // ImprimirNotaVenta\r\n\t\t$this->BuildSearchSql($sWhere, $this->Serie_NotaVenta, FALSE); // Serie_NotaVenta\r\n\t\t$this->BuildSearchSql($sWhere, $this->Numero_NotaVenta, FALSE); // Numero_NotaVenta\r\n\t\t$this->BuildSearchSql($sWhere, $this->Imprimirpapeleta, FALSE); // Imprimirpapeleta\r\n\t\t$this->BuildSearchSql($sWhere, $this->FolioImpresoPapeleta, FALSE); // FolioImpresoPapeleta\r\n\t\t$this->BuildSearchSql($sWhere, $this->Maneja_Papeleta, FALSE); // Maneja_Papeleta\r\n\t\t$this->BuildSearchSql($sWhere, $this->Maneja_Activacion_Movi, FALSE); // Maneja_Activacion_Movi\r\n\t\t$this->BuildSearchSql($sWhere, $this->Con_SIM, FALSE); // Con_SIM\r\n\r\n\t\t// Set up search parm\r\n\t\tif ($sWhere <> \"\") {\r\n\t\t\t$this->Command = \"search\";\r\n\t\t}\r\n\t\tif ($this->Command == \"search\") {\r\n\t\t\t$this->Id_Venta_Eq->AdvancedSearch->Save(); // Id_Venta_Eq\r\n\t\t\t$this->FechaVenta->AdvancedSearch->Save(); // FechaVenta\r\n\t\t\t$this->Id_Tienda->AdvancedSearch->Save(); // Id_Tienda\r\n\t\t\t$this->Id_Tel_SIM->AdvancedSearch->Save(); // Id_Tel_SIM\r\n\t\t\t$this->Id_Cliente->AdvancedSearch->Save(); // Id_Cliente\r\n\t\t\t$this->Num_IMEI->AdvancedSearch->Save(); // Num_IMEI\r\n\t\t\t$this->Num_ICCID->AdvancedSearch->Save(); // Num_ICCID\r\n\t\t\t$this->Num_CEL->AdvancedSearch->Save(); // Num_CEL\r\n\t\t\t$this->Descripcion_SIM->AdvancedSearch->Save(); // Descripcion_SIM\r\n\t\t\t$this->Reg_Venta_Movi->AdvancedSearch->Save(); // Reg_Venta_Movi\r\n\t\t\t$this->Monto_Recarga_Movi->AdvancedSearch->Save(); // Monto_Recarga_Movi\r\n\t\t\t$this->Folio_Recarga_Movi->AdvancedSearch->Save(); // Folio_Recarga_Movi\r\n\t\t\t$this->ImprimirNotaVenta->AdvancedSearch->Save(); // ImprimirNotaVenta\r\n\t\t\t$this->Serie_NotaVenta->AdvancedSearch->Save(); // Serie_NotaVenta\r\n\t\t\t$this->Numero_NotaVenta->AdvancedSearch->Save(); // Numero_NotaVenta\r\n\t\t\t$this->Imprimirpapeleta->AdvancedSearch->Save(); // Imprimirpapeleta\r\n\t\t\t$this->FolioImpresoPapeleta->AdvancedSearch->Save(); // FolioImpresoPapeleta\r\n\t\t\t$this->Maneja_Papeleta->AdvancedSearch->Save(); // Maneja_Papeleta\r\n\t\t\t$this->Maneja_Activacion_Movi->AdvancedSearch->Save(); // Maneja_Activacion_Movi\r\n\t\t\t$this->Con_SIM->AdvancedSearch->Save(); // Con_SIM\r\n\t\t}\r\n\t\treturn $sWhere;\r\n\t}", "public function orWhere($column, $operator = '', $value = '');", "private function getWhereConditions(){\n\n if( $this->mDataProp == false && !isset($this->controller->paginate['fields']) && empty($this->fields) ){\n throw new Exception(\"Field list is not set. Please set the fields so I know how to build where statement.\");\n }\n\n $conditions = array();\n\n\n if($this->mDataProp == true){\n for($i=0;$i<$this->controller->request->query['iColumns'];$i++){\n if(!isset($this->controller->request->query['bSearchable_'.$i]) || $this->controller->request->query['bSearchable_'.$i] == true){\n $fields[] = $this->controller->request->query['mDataProp_'.$i];\n }\n }\n }\n else if(!empty($this->fields) || !empty($this->controller->paginate['fields']) ){\n $fields = !empty($this->fields) ? $this->fields : $this->controller->paginate['fields'];\n }\n\n foreach($fields as $x => $column){\n\n // only create conditions on bSearchable fields\n if( $this->controller->request->query['bSearchable_'.$x] == 'true' ){\n\n if($this->mDataProp == true){\n $conditions['OR'][] = array(\n $this->controller->request->query['mDataProp_'.$x].' LIKE' => '%'.$this->controller->request->query['sSearch'].'%'\n );\n }\n else{\n\n list($table, $field) = explode('.', $column);\n\n // attempt using definitions in $model->validate to build intelligent conditions\n if( $this->conditionsByValidate == 1 && array_key_exists($column,$this->model->validate) ){\n\n if( !empty($this->controller->paginate['contain']) ){\n if(array_key_exists($table, $this->controller->paginate['contain']) && in_array($field, $this->controller->paginate['contain'][$table]['fields'])){\n $conditions[$table]['conditions'][] = $this->conditionByDataType($column);\n }\n }\n else{\n $conditions['OR'][] = $this->conditionByDataType($column);\n }\n }\n else{\n\n if( !empty($this->controller->paginate['contain']) ){\n if(array_key_exists($table, $this->controller->paginate['contain']) && in_array($field, $this->controller->paginate['contain'][$table]['fields'])){\n $conditions[$table]['conditions'][] = $column.' LIKE \"%'.$this->controller->request->query['sSearch'].'%\"';\n }\n }\n else{\n $conditions['OR'][] = array(\n $column.' LIKE' => '%'.$this->controller->request->query['sSearch'].'%'\n );\n }\n }\n }\n }\n }\n return $conditions;\n }", "function db_search($table_name, $field_name, $where_field_name, $where_field_comp, $where_field_value, $where_logical, &$field_value, &$errors) {\n\trequire_once(\"php/MYDB.php\");\n\t\n\t// Initialize error message\n\t$errors=\"\";\n\t\n\t// Check that table_name is not empty\n\tif ($table_name==\"\") {\n\t\t$errors=\"Error in the parameters given\";\n\t\treturn FALSE;\n\t}\n\t\n\t// Check length of tables given in parameters\n\t$l_field_name=count($field_name);\n\t$l_where_field_name=count($where_field_name);\n\t$l_where_field_comp=count($where_field_comp);\n\t$l_where_field_value=count($where_field_value);\n\t$l_where_logical=count($where_logical);\n\tif ($l_where_field_name!=$l_where_field_comp || $l_where_field_name!=$l_where_field_value || $l_where_field_name!=$l_where_logical+1 || $l_field_name==0) {\n\t\t$errors=\"Error in the parameters given\";\n\t\treturn FALSE;\n\t}\n\t\n\t// Connect to database\n\t$conn=db_connect();\n\n\t// Prepare SQL query\n\t// Select fields\n\t$sql=\"SELECT \".$conn->escapeSimple($field_name[0]);\n\t// Other fields to select\n\tif ($l_field_name>=1) {\n\t\t// Loop on fields\n\t\tfor ($i=1; $i<$l_field_name; $i++) {\n\t\t\t$sql.=\", \".$conn->escapeSimple($field_name[$i]);\n\t\t}\n\t}\n\t// From table\n\t$sql.=\" FROM \".$conn->escapeSimple($table_name);\n\t// Start where conditions\n\tif ($l_where_field_name!=0) {\n\t\t$sql.=\" WHERE \".$conn->escapeSimple($where_field_name[0]);\n\t\tswitch ($where_field_comp[0]) {\n\t\t\tcase \"=\":\n\t\t\t\t// = '...'\n\t\t\t\t$sql.=\"= '\".$conn->escapeSimple($where_field_value[0]).\"'\";\n\t\t\t\tbreak;\n\t\t\tcase \"%LIKE\":\n\t\t\t\t// LIKE '%...'\n\t\t\t\t$sql.=\" LIKE '%\".$conn->escapeSimple($where_field_value[0]).\"'\";\n\t\t\t\tbreak;\n\t\t\tcase \"LIKE%\":\n\t\t\t\t// LIKE '...%'\n\t\t\t\t$sql.=\" LIKE '\".$conn->escapeSimple($where_field_value[0]).\"%'\";\n\t\t\t\tbreak;\n\t\t\tcase \"%LIKE%\":\n\t\t\t\t// LIKE '%...%'\n\t\t\t\t$sql.=\" LIKE '%\".$conn->escapeSimple($where_field_value[0]).\"%'\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$errors=\"Error in comparative operators given\";\n\t\t\t\treturn FALSE;\n\t\t}\n\t}\n\t// Other where conditions\n\tif ($l_where_field_name>=1) {\n\t\t// Loop on conditions\n\t\tfor ($i=1; $i<$l_where_field_name; $i++) {\n\t\t\tswitch ($where_logical[$i-1]) {\n\t\t\t\tcase \"AND\":\n\t\t\t\t\t$sql.=\" AND \";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"OR\":\n\t\t\t\t\t$sql.=\" OR \";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$errors=\"Error in logical operators given\";\n\t\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t\t$sql.=$conn->escapeSimple($where_field_name[$i]);\n\t\t\tswitch ($where_field_comp[$i]) {\n\t\t\t\tcase \"=\":\n\t\t\t\t\t// = '...'\n\t\t\t\t\t$sql.=\"= '\".$conn->escapeSimple($where_field_value[$i]).\"'\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"%LIKE\":\n\t\t\t\t\t// LIKE '%...'\n\t\t\t\t\t$sql.=\" LIKE '%\".$conn->escapeSimple($where_field_value[$i]).\"'\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"LIKE%\":\n\t\t\t\t\t// LIKE '...%'\n\t\t\t\t\t$sql.=\" LIKE '\".$conn->escapeSimple($where_field_value[$i]).\"%'\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"%LIKE%\":\n\t\t\t\t\t// LIKE '%...%'\n\t\t\t\t\t$sql.=\" LIKE '%\".$conn->escapeSimple($where_field_value[$i]).\"%'\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$errors=\"Error in comparative operators given\";\n\t\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t}\n\t\n\t// Process SQL query\n//\t$sql=mb_convert_encoding($sql,\"ISO-8859-1\",\"UTF-8\");\n\t$result=$conn->query($sql);\n\t\n\t// If there was an error, stop and display message\n\tif(@DB::isError($result)){\n\t\t$errors=$result->getMessage().\" | SQL = \".$sql;\n\t\treturn FALSE;\n\t}\n\t\n\t// Get result\n\t$field_value=array();\n\t// Number of results\n\t$j=0;\n\twhile($rs = $result->fetchRow(DB_FETCHMODE_ASSOC)) {\n\t\t// Initialize variable\n\t\t$field_value[$j]=array();\n\t\t\n\t\t// Loop on fields\n\t\tfor ($i=0; $i<$l_field_name; $i++) {\n\t\t\t$field_value[$j][$i]=$rs[$field_name[$i]];\n\t\t}\n\t\t\n\t\t// Prepare to reloop\n\t\t$j++;\n\t}\n\t\n\t// Disconnect\n\t$conn->disconnect();\n\t\n\treturn TRUE;\n}", "public function addCondition($condition, $fieldname = \"\");", "protected function prepareSearch(){\n\n if($this->search && count($this->searchableFields)){\n $fields = implode(' LIKE ? OR ',$this->searchableFields);\n $values = array_fill(0, count($this->searchableFields), $this->search);\n $this->Model->where(\"($fields LIKE ?)\",$values);\n }//if\n\n }", "public function addWhere() {\n\t\tif (!empty($this->config['where'])) {\n\t\t\t$where = $this->modx->fromJson($this->config['where']);\n\t\t\t$where = $this->replaceTVCondition($where);\n\t\t\t$this->query->where($where);\n\n\t\t\t$condition = array();\n\t\t\tforeach ($where as $k => $v) {\n\t\t\t\tif (is_array($v)) {$condition[] = $k.'('.implode(',',$v).')';}\n\t\t\t\telse {$condition[] = $k.'='.$v;}\n\t\t\t}\n\t\t\t$this->addTime('Added where condition: <b>' .implode(', ',$condition).'</b>');\n\t\t}\n\t\tif (!empty($this->config['having'])) {\n\t\t\t$having = $this->modx->fromJson($this->config['having']);\n\t\t\t$having = $this->replaceTVCondition($having);\n\t\t\t$this->query->having($having);\n\n\t\t\t$condition = array();\n\t\t\tforeach ($having as $k => $v) {\n\t\t\t\tif (is_array($v)) {$condition[] = $k.'('.implode(',',$v).')';}\n\t\t\t\telse {$condition[] = $k.'='.$v;}\n\t\t\t}\n\t\t\t$this->addTime('Added having condition: <b>' .implode(', ',$condition).'</b>');\n\t\t}\n\t}", "function createWhere($columnNames) {\n\n //extracts data from $_POST\n $extractedPost = array();\n for ($i=0; $i<count($columnNames); $i++) {\n if (isset($_POST[$columnNames[$i] ] ) ) {\n $extractedPost[$i] = $_POST[$columnNames[$i] ];\n } else {\n $extractedPost[$i] = '';\n }\n }\n\n //Generates a where statement as long as the array $selectdata is long\n $whereState = \"\";\n for ($i=0; $i<count($extractedPost); $i++) {\n if (isset($extractedPost[$i]) ) {\n //if there is no data inside $selectdata then add nothing to the where statement.\n if ($extractedPost[$i] == \"\") {\n\n //else if there is Data inside $selectdata but no where statement yet then\n //(set the where statement and add the first condition)\n } else if ($extractedPost[$i] <> \"\" && $whereState == \"\") {\n $whereState = \" WHERE \" . $columnNames[$i] . ' LIKE \"%' . $extractedPost[$i] . '%\"';\n\n //else if there is data and an already existing where statement\n } else {\n $whereState .= \" AND \" . $columnNames[$i] . ' LIKE \"%' . $extractedPost[$i] . '%\"';\n }\n }\n }\n return $whereState;\n}", "public function where($column, $operator = '', $value = '');" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
SPAM Functions SPAM Functions SPAM Functions Return the last spam record
public function spamGetLast() { $sql="SELECT * FROM log_spam ORDER BY id DESC LIMIT 1;"; $q = $this->db->query($sql) or die( $this->db->error ); if (!$q->num_rows) { return false; } return $q->fetch_assoc(); }
[ "public function findLastSending();", "public function populate_akismet_spam_report() {\n global $DB;\n\n $record = array();\n $record['original_id'] = $this->post->id;\n $record['is_spam'] = '1';\n\n if ($akismetrecord = $DB->get_record('block_spam_deletion_akismet', $record, 'id')) {\n // Already in the queue, dont add again.\n return $akismetrecord->id;\n }\n\n $spammer = $DB->get_record('user', array('id' => $this->post->userid));\n $postip = $this->get_ip_post_created_from();\n\n $record['user_ip'] = $postip ? $postip : $spammer->lastip;\n $record['user_agent'] = ''; // No chance, we dont log this.\n $record['comment_author'] = fullname($spammer);\n $record['comment_author_email'] = $spammer->email;\n $record['comment_author_url'] = $spammer->url;\n $record['comment_content'] = $this->post->subject.\"\\n\".$this->post->message;\n\n return $DB->insert_record('block_spam_deletion_akismet', $record);\n }", "function _check_stopforumspam($user_ip,$username=NULL,$email=NULL)\n{\n\t// http://www.stopforumspam.com/usage\n\n\t$confidence_level=mixed();\n\t$status=ANTISPAM_RESPONSE_UNLISTED;\n\n\t// Do the query with every detail we have\n\trequire_code('files');\n\trequire_code('character_sets');\n\t$key=get_option('stopforumspam_api_key');\n\t$url='http://www.stopforumspam.com/api?f=serial&unix&confidence&ip='.urlencode($user_ip);\n\tif (!is_null($username)) $url.='&username='.urlencode(convert_to_internal_encoding($username,get_charset(),'utf-8'));\n\tif (!is_null($email)) $url.='&email='.urlencode(convert_to_internal_encoding($email,get_charset(),'utf-8'));\n\tif ($key!='') $url.='&api_key='.urlencode($key); // Key not needed for read requests, but give it as a courtesy\n\t$_result=http_download_file($url,NULL,false);\n\n\tsecure_serialized_data($_result);\n\n\t$result=@unserialize($_result);\n\tif ($result!==false)\n\t{\n\t\tif ($result['success'])\n\t\t{\n\t\t\tforeach (array('username','email','ip') as $criterion)\n\t\t\t{\n\t\t\t\tif (array_key_exists($criterion,$result))\n\t\t\t\t{\n\t\t\t\t\t$c=$result[$criterion];\n\t\t\t\t\tif ($c['appears']==1)\n\t\t\t\t\t{\n\t\t\t\t\t\t$_confidence_level=$c['confidence']/100.0;\n\n\t\t\t\t\t\t$spam_stale_threshold=intval(get_option('spam_stale_threshold'));\n\t\t\t\t\t\t$days_ago=floatval(time()-intval($c['lastseen']))/(24.0*60.0*60.0);\n\t\t\t\t\t\tif ($days_ago<=floatval($spam_stale_threshold))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$status=ANTISPAM_RESPONSE_ACTIVE;\n\n\t\t\t\t\t\t\tif (($confidence_level===NULL) || ($_confidence_level>$confidence_level))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$confidence_level=$_confidence_level;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($status!=ANTISPAM_RESPONSE_ACTIVE) // If not found an active one yet\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$status=ANTISPAM_RESPONSE_STALE;\n\n\t\t\t\t\t\t\t\tif (($confidence_level===NULL) || ($_confidence_level>$confidence_level))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$confidence_level=$_confidence_level;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// NB: frequency figure is ignored, not used in our algorithm\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else\n\t\t{\n\t\t\trequire_code('failure');\n\t\t\t$error=do_lang('_ERROR_CHECKING_FOR_SPAMMERS','stopforumspam.com',$result['error'],$user_ip);\n\t\t\trelay_error_notification($error,false,'error_occurred');\n\t\t\treturn array(ANTISPAM_RESPONSE_ERROR,$confidence_level);\n\t\t}\n\t} else\n\t{\n\t\trequire_code('failure');\n\t\t$error=do_lang('ERROR_CHECKING_FOR_SPAMMERS','stopforumspam.com',$user_ip);\n\t\trelay_error_notification($error,false,'error_occurred');\n\t\treturn array(ANTISPAM_RESPONSE_ERROR,$confidence_level);\n\t}\n\n\treturn array($status,$confidence_level);\n}", "public function runSpam() {\n $this->query = db_select(\"signatures\", \"s\");\n $this->query->fields(\"s\", $this->rows['spam'][\"database\"]['signatures']);\n $this->query->isNotNull(\"s.comments\");\n if ($this->sort && $this->sort['column'] !== \"spam rating\") {\n $this->query->orderBy($this->sort['column'], $this->sort['direction']);\n }\n $this->countQuery = clone $this->query;\n $this->tables[] = \"signatures\";\n $results = $this->query->execute();\n $outResults = array();\n $spamRatingCache = cache_get(\"campaigner_reports_spam_ratings\");\n $spamRatings = $spamRatingCache ? $spamRatingCache->data : array();\n if (!empty($results)) {\n // Do this here as we need to filter small values of spam\n $filter = new SpamFilter();\n foreach ($results as $result) {\n if (isset($spamRatings[$result->id])) {\n $result->SpamRating = $spamRatings[$result->id];\n }\n else {\n $result->SpamRating = (int) (100 * $filter->checkForSpam($result->comments));\n\n $spamRatings[$result->id] = $result->SpamRating;\n }\n if ($result->SpamRating <> 0) {\n $outResults[] = $result;\n }\n }\n }\n if (!$this->sort || $this->sort['column'] === \"spam rating\") {\n usort($outResults, \"campaigner_report_sort_by_spam_rating\");\n }\n $this->count = count($outResults);\n // set the cache for the next hour\n cache_set(\"campaigner_reports_spam_ratings\", $spamRatings, \"cache\", time() + 3600);\n return $outResults;\n }", "function _check_stopforumspam($user_ip, $username = null, $email = null)\n{\n // http://www.stopforumspam.com/usage\n\n $confidence_level = mixed();\n $status = ANTISPAM_RESPONSE_UNLISTED;\n\n // Do the query with every detail we have\n require_code('files');\n require_code('character_sets');\n $key = get_option('stopforumspam_api_key');\n $url = 'http://www.stopforumspam.com/api?f=serial&unix&confidence&ip=' . urlencode($user_ip);\n if (!is_null($username)) {\n $url .= '&username=' . urlencode(convert_to_internal_encoding($username, get_charset(), 'utf-8'));\n }\n if (!is_null($email)) {\n $url .= '&email=' . urlencode(convert_to_internal_encoding($email, get_charset(), 'utf-8'));\n }\n if ($key != '') {\n $url .= '&api_key=' . urlencode($key); // Key not needed for read requests, but give it as a courtesy\n }\n $_result = http_download_file($url, null, false);\n\n secure_serialized_data($_result);\n\n $result = @cms_unserialize($_result);\n if ($result !== false) {\n if ($result['success']) {\n foreach (array('username', 'email', 'ip') as $criterion) {\n if (array_key_exists($criterion, $result)) {\n $c = $result[$criterion];\n if ($c['appears'] == 1) {\n $_confidence_level = $c['confidence'] / 100.0;\n\n $spam_stale_threshold = intval(get_option('spam_stale_threshold'));\n $days_ago = floatval(time() - intval($c['lastseen'])) / (24.0 * 60.0 * 60.0);\n if ($days_ago <= floatval($spam_stale_threshold)) {\n $status = ANTISPAM_RESPONSE_ACTIVE;\n\n if (($confidence_level === null) || ($_confidence_level > $confidence_level)) {\n $confidence_level = $_confidence_level;\n }\n } else {\n if ($status != ANTISPAM_RESPONSE_ACTIVE) { // If not found an active one yet\n $status = ANTISPAM_RESPONSE_STALE;\n\n if (($confidence_level === null) || ($_confidence_level > $confidence_level)) {\n $confidence_level = $_confidence_level;\n }\n }\n }\n // NB: frequency figure is ignored, not used in our algorithm\n }\n }\n }\n } else {\n require_code('failure');\n $error = do_lang('_ERROR_CHECKING_FOR_SPAMMERS', 'stopforumspam.com', $result['error'], $user_ip);\n relay_error_notification($error, false, 'error_occurred');\n return array(ANTISPAM_RESPONSE_ERROR, $confidence_level);\n }\n } else {\n require_code('failure');\n $error = do_lang('ERROR_CHECKING_FOR_SPAMMERS', 'stopforumspam.com', $user_ip);\n relay_error_notification($error, false, 'error_occurred');\n return array(ANTISPAM_RESPONSE_ERROR, $confidence_level);\n }\n\n return array($status, $confidence_level);\n}", "function spamTrap(){\t\tif($this->filter_spam){\n\t\t\tif(!$this->spam_threshold){\n\t\t\t\t$this->spam_threshold = 5;\n\t\t\t}\n\t\t\t\n\t\t\t// Check some junk indicators here\n\t\t\t$spam_score = 0;\n\t\t\t\n\t\t\t// Check for session values as well?\n\t\t\t// This eval here does not work, because the session has already been set!\n\t\t\t//if(session_id()){\n\t\t\t//\t$spam_score -= 10;\n\t\t\t//}\n\t\t\tforeach($this->formdata as $key=>$value) {\n\t\t\t\t// Link for link spam hrefs, etc\n\t\t\t\tif(preg_match_all(\"!\\[(link|url)=\\S*\\].*?\\[/(\\\\1)\\]!im\" , $value , $spam_matches , PREG_SET_ORDER)){\n\t\t\t\t\t$spam_score += (count($spam_matches) * 3);\n\t\t\t\t}\n\t\t\t\tif(preg_match(\"!bcc:|cc:|\\n|\\r!i\" , $value , $null)){\n\t\t\t\t\t$spam_score = $spamscore + 5;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($spam_score >= $this->spam_threshold){\n\t\t\t\treturn 0;\n\t\t\t} else {\n\t\t\t\treturn 1;\n\t\t\t}\t\t\n\t\t} else {\n\t\t\treturn 1;\n\t\t}\n\t\t\n\t}", "public function getLastPadReminderSent();", "public function mostraUltimaMensagem()\n { \n $arMsgSessao = $_SESSION['msg'];\n $stUltimaMensagem = $arMsgSessao[count($arMsgSessao)-1];\n return $stUltimaMensagem;\n }", "public function grabLastSentEmail()\n {\n $this->seeEmailIsSent();\n $messages = $this->grabSentEmails();\n return end($messages);\n }", "protected function _sendSpam()\n\t{\n\t\tif( !$this->request['cid'] )\n\t\t{\n\t\t\t$this->registry->output->showError( 'spam_no_cid', 10646, null, null, 404 );\n\t\t}\n\t\t\n\t\tif( !$this->settings['blog_akismet_key'] )\n\t\t{\n\t\t\t$this->registry->output->showError( 'spam_no_akismet', 10647 );\n\t\t}\n\t\t\n\t\t/* Load AKI */\n\t\t$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir('blog') . '/sources/lib/akismet.class.php', 'Akismet', 'blog' );\n\t\t$akismet = new $classToLoad( $this->settings['board_url'], $this->settings['blog_akismet_key'] );\n\t\t\n\t\tif ( ! $akismet->isKeyValid() )\n\t\t{\n\t\t\t$this->registry->output->showError( 'spam_wrongkey_akismet', 10647.1 );\n\t\t}\n\t\t\n\t\t$cid = intval( $this->request['cid'] );\n\t\t\n\t\tif( $this->request['trackback'] == 1 )\n\t\t{\n\t\t\t$tb = $this->DB->buildAndFetch( array( 'select'\t=> 'tb.*',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'from'\t\t=> array( 'blog_trackback' => 'tb' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t'where'\t\t=> 'tb.trackback_id=' . $cid,\n\t\t\t\t\t\t\t\t\t\t\t\t\t'add_join'\t=> array( array( 'select' => 'e.blog_id, e.entry_name_seo',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'from' => array( 'blog_entries' => 'e' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'where' => 'e.entry_id=tb.entry_id',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'type' => 'left' ) )\n\t\t\t\t\t\t\t\t\t\t\t)\t\t);\n\n\t\t\tif ( empty($tb['trackback_id']) )\n\t\t\t{\n\t\t\t\t$this->registry->output->showError( 'spam_no_tb', 10648, null, null, 404 );\n\t\t\t}\n\t\t\t\n\t\t\t/* Setup data */\n\t\t\t$akismet->setCommentType( 'trackback' );\n\t\t\t$akismet->setCommentAuthor( '' );\n\t\t\t$akismet->setCommentAuthorEmail( '' );\n\t\t\t$akismet->setCommentContent( $tb['trackback_excerpt'] );\n\t\t\t$akismet->setPermalink( $this->registry->output->buildUrl( \"app=blog&amp;module=display&amp;section=blog&amp;blogid={$tb['blog_id']}&amp;showentry={$tb['entry_id']}\" ) );\n\t\t\t$akismet->setUserIP( $tb['ip_address'] );\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$akismet->submitSpam();\n\t\t\t}\n\t\t\tcatch( Exception $e ) {}\n\t\t\t\n\t\t\t$this->registry->output->redirectScreen( $this->lang->words['spam_reported'], $this->settings['base_url'] . \"app=blog&amp;module=display&amp;section=blog&amp;blogid={$tb['blog_id']}&amp;showentry={$tb['entry_id']}&amp;st={$this->request['st']}\", $tb['entry_name_seo'], 'showentry' );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$thecomment = $this->DB->buildAndFetch( array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'select'\t=> 'c.*',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'from'\t\t=> array( 'blog_comments' => 'c' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t'where'\t\t=> 'c.comment_id=' . $cid,\n\t\t\t\t\t\t\t\t\t\t\t\t\t'add_join'\t=> array( array( 'select' => 'e.blog_id, e.entry_name_seo',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'from' => array( 'blog_entries' => 'e' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'where' => 'e.entry_id=c.entry_id',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'type' => 'left' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t array( 'select' => 'm.email',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'from' => array( 'members' => 'm' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'where' => 'm.member_id=c.member_id',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'type' => 'left' ) )\n\t\t\t\t\t\t\t\t\t\t\t)\t\t);\n\n\t\t\tif ( empty($thecomment['comment_id']) )\n\t\t\t{\n\t\t\t\t$this->registry->output->showError( 'spam_no_comment', 10649, null, null, 404 );\n\t\t\t}\n\t\t\t\n\t\t\t/* Setup data */\n\t\t\t$akismet->setCommentType( 'comment' );\n\t\t\t$akismet->setCommentAuthor( $thecomment['member_name'] );\n\t\t\t$akismet->setCommentAuthorEmail( $thecomment['email'] );\n\t\t\t$akismet->setCommentContent( $thecomment['comment_text'] );\n\t\t\t$akismet->setPermalink( $this->registry->output->buildUrl( \"app=blog&amp;module=display&amp;section=blog&amp;blogid={$tb['blog_id']}&amp;showentry={$tb['entry_id']}\" ) );\n\t\t\t$akismet->setUserIP( $thecomment['ip_address'] );\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$akismet->submitSpam();\n\t\t\t}\n\t\t\tcatch( Exception $e ) {}\n\t\t\t\n\t\t\t$this->registry->output->redirectScreen( $this->lang->words['spam_reported'], $this->settings['base_url'] . \"app=blog&amp;module=display&amp;section=blog&amp;blogid={$thecomment['blog_id']}&amp;showentry={$thecomment['entry_id']}&amp;st={$this->request['st']}#comment{$thecomment['comment_id']}\", $tb['entry_name_seo'], 'showentry' );\n\t\t}\n\t}", "public function getLastMessageID() {}", "function bbp_get_spam_status_id()\n{\n}", "public function reportSpam()\n {\n $Token = $this->request->getParsedBody()[$this->TokenInputName];\n if ($Token == '') {\n return 'error';\n }\n if ($this->FormID == '') {\n return 'error';\n }\n\n $fields['Token'] = $Token;\n $fields['FormID'] = $this->FormID;\n $fields['RequestType'] = 'ReportSpam';\n $fields['ResponseType'] = '2';\n\n $response = $this->sendRequest($fields);\n if (empty($response) !== true) {\n return $response;\n } else {\n return false;\n }\n }", "function checkDBSpammer($check_ip, $check_name, $check_mail, $test = false)\r\n{\r\n\tglobal $sourcedir, $modSettings;\r\n\r\n\t//$remoteXML = 'http://www.stopforumspam.com/api?' . ('127.0.0.1' != $check_ip ? \"ip={$check_ip}&\" : '') . 'username=' . urlencode($check_name) . '&email=' . $check_mail;\r\n\t$remoteXML = 'http://www.stopforumspam.com/api?' . ('127.0.0.1' != $check_ip ? ($modSettings['stopspammer_check_ip'] ? 'ip=' . $check_ip . '&' : '') : '') . ($modSettings['stopspammer_check_name'] ? 'username=' . urlencode($check_name) . '&' : '') . ($modSettings['stopspammer_check_mail'] ? 'email=' . $check_mail : '');\r\n\r\n\t// Try to download.\r\n\trequire_once($sourcedir . '/Subs-Package.php');\r\n\t$down_ok = fetch_web_data($remoteXML);\r\n\r\n\t// Test Host Connection\r\n\tif ($test) return (bool)$down_ok;\r\n\r\n\t// Connection Failed\r\n\tif (!$down_ok)\r\n\t\tif ($modSettings['stopspammer_faildb']) \r\n\t\t\treturn ('1' == $modSettings['stopspammer_faildb'] ? 0 : 8);\r\n\t\telse \r\n\t\t\tfatal_lang_error('stopspammer_error');\r\n\r\n\t// Limit Exceded?\r\n\tif (strpos($down_ok, 'rate limit exceeded')) // || \tstrpos($down_ok, '<error>')\r\n\t\tif (allowedTo('moderate_forum')) // Is Logged? // Moderate Forum?\r\n\t\t\tfatal_lang_error('stopspammer_limitexceded');\r\n\t\telse\r\n\t\t\treturn 8;\r\n\r\n\t// Procesing XML\r\n\tpreg_match_all('~<type>(\\w+)</type>[\\n\\s]*<appears>(\\w+)</appears>~', $down_ok, $q_is_spammer);\r\n\r\n\t$suma = 0;\r\n\tforeach ($q_is_spammer[1] as $key => $value)\r\n\t\t$suma += ('yes' == $q_is_spammer[2][$key]) << ('ip' == $value ? 0 : ('username' == $value ? 1 : 2));\r\n\r\n\treturn $suma;\r\n}", "function spidersLastSeen()\n{\n\t$db = database();\n\n\t$spider_last_seen = array();\n\t$db->query('', '\n\t\tSELECT \n\t\t\tid_spider, MAX(last_seen) AS last_seen_time\n\t\tFROM {db_prefix}log_spider_stats\n\t\tGROUP BY id_spider',\n\t\tarray()\n\t)->fetch_callback(\n\t\tfunction ($row) use (&$spider_last_seen) {\n\t\t\t$spider_last_seen[$row['id_spider']] = $row['last_seen_time'];\n\t\t}\n\t);\n\n\treturn $spider_last_seen;\n}", "function CountNewInSpam () {\n global $zFOCUSUSER;\n\n $NotificationTable = $this->messageNotification->TableName;\n $InformationTable = $this->messageInformation->TableName;\n\n // Count notifications.\n $query = \"SELECT COUNT($NotificationTable.tID) \" .\n \"AS CountResult \" .\n \"FROM $NotificationTable \" .\n \"WHERE $NotificationTable.Standing = \" . MESSAGE_UNREAD . \" \" .\n \"AND $NotificationTable.Location = \" . FOLDER_SPAM . \" \" . \n \"AND userAuth_uID = \" . $zFOCUSUSER->uID;\n\n $this->Query ($query);\n $this->FetchArray();\n $total = $this->CountResult;\n\n // Count stored messages.\n $query = \"SELECT COUNT($InformationTable.tID) \" .\n \"AS CountResult \" .\n \"FROM $InformationTable \" .\n \"WHERE $InformationTable.Standing = \" . MESSAGE_UNREAD . \" \" .\n \"AND $InformationTable.Location = \" . FOLDER_SPAM . \" \" . \n \"AND userAuth_uID = \" . $zFOCUSUSER->uID;\n\n $this->Query ($query);\n $this->FetchArray();\n\n // Add for total.\n $total += $this->CountResult;\n\n return ($total);\n\n }", "public function getSpam()\n {\n $value = $this->get(self::SPAM);\n return $value === null ? (double)$value : $value;\n }", "public function getSpamWord() {\n\t\treturn $this->spamWord;\n\t}", "protected function getLastEmail() {\n $sent_emails = $this->getMails();\n $sent_email = end($sent_emails);\n $this->debug($sent_email);\n return $sent_email;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
generate notifications when a CS is removed by an admin => inform the admins of the channel and the user
private function createNotificationForChannelSubscriptionRemovalByAdminEvent(NotificationEvent $notificationEvent) { $recipients = []; $recipients[] = $notificationEvent->getEventAuthor(); $recipients[] = $notificationEvent->getChannelSubscription()->getUser(); foreach ($notificationEvent->getChannelSubscription()->getChannel()->getAdminUsers() as $adminUser) { if (!in_array($adminUser, $recipients)) { $recipients[] = $adminUser; } } $this->createNotificationForArrayOfUser($recipients, $notificationEvent); }
[ "public function channelsRemoval()\n {\n $inactive_channels = Channel::where('created_at', '<=', Carbon::now()->subMonths(2))\n ->whereDoesntHave('submissions', function ($query) {\n $query->where('created_at', '>=', Carbon::now()->subMonths(2));\n })->get();\n\n foreach ($inactive_channels as $channel) {\n $mods = $channel->moderators;\n\n foreach ($mods as $user) {\n if ($user->confirmed) {\n \\Mail::to($user->email)->queue(new ChannelRemovalWarning($user, $channel));\n }\n }\n }\n\n session()->flash('status', $inactive_channels->count().' channels are going to get a warning email. ');\n\n return back();\n }", "protected function connectedAccountRemoved(): void\n {\n Notification::make()\n ->title(__('filament-companies::default.notifications.connected_account_removed.title'))\n ->success()\n ->body(__('filament-companies::default.notifications.connected_account_removed.body'))\n ->send();\n }", "private static function remove_admin_notices()\n {\n }", "private static function remove_admin_notices() {\n\t\tinclude_once dirname( __FILE__ ) . '/admin/class-evf-admin-notices.php';\n\t\tEVF_Admin_Notices::remove_all_notices();\n\t}", "public function delete_subscribers(){\n\t\tif ($this->checkLogin('A') == ''){\n\t\t\tredirect(ADMIN_ENC_URL);\n\t\t}else {\n\t\t\t$user_id = $this->uri->segment(4,0);\n\t\t\t$condition = array('_id' => MongoID($user_id));\n\t\t\t$this->templates_model->commonDelete(NEWSLETTER_SUBSCRIBER,$condition);\n\t\t\t$this->setErrorMessage('success','Subscribers deleted successfully','admin_template_subcriber_delate');\n\t\t\tredirect(ADMIN_ENC_URL.'/templates/display_subscribers_list');\n\t\t}\n\t}", "function _elgg_admin_prepare_admin_notification_remove_admin($hook, $type, $return_value, $params) {\n\n\tif (!($return_value instanceof \\Elgg\\Notifications\\Notification)) {\n\t\treturn;\n\t}\n\n\t$recipient = elgg_extract('recipient', $params);\n\t$object = elgg_extract('object', $params);\n\t$actor = elgg_extract('sender', $params);\n\t$language = elgg_extract('language', $params);\n\n\tif (!($recipient instanceof ElggUser) || !($object instanceof ElggUser) || !($actor instanceof ElggUser)) {\n\t\treturn;\n\t}\n\n\tif ($recipient->getGUID() === $object->getGUID()) {\n\t\t// recipient is the user being acted on, this is handled elsewhere\n\t\treturn;\n\t}\n\n\t$site = elgg_get_site_entity();\n\n\t$return_value->subject = elgg_echo('admin:notification:remove_admin:admin:subject', [$site->name], $language);\n\t$return_value->body = elgg_echo('admin:notification:remove_admin:admin:body', [\n\t\t$recipient->name,\n\t\t$actor->name,\n\t\t$object->name,\n\t\t$site->name,\n\t\t$object->getURL(),\n\t\t$site->getURL(),\n\t], $language);\n\n\t$return_value->url = elgg_normalize_url('admin/users/admins');\n\n\treturn $return_value;\n}", "public function general_removal($message = \"\")\r\n\t\t{\r\n\t\t\t$this->check_login();\r\n\t\t\t\r\n\t\t\t$data['message'] = $message;\r\n\t\t\t$data['admin_info'] = $this->admin_model->getUsernames(5);\r\n\r\n\t\t\t$this->load->view($this->admin_views . 'sidebar');\r\n\t\t\t$this->load->view($this->admin_views . 'Account Removal/remove_general_body', $data);\r\n\t\t}", "function plugin_user_delete_mailchimp($uid)\r\n{\r\n global $_CONF_MLCH;\r\n\r\n if ($_CONF_MLCH['del_user_unsub']) {\r\n MLCH_unsubscribe($uid);\r\n }\r\n}", "public function communityDeleted($args)\n {\n // TODO: Implement communityDeleted().\n }", "function removeDeleteConcurrence()\n{\n\tglobal $modSettings, $board, $context;\n\n\t$recycled_enabled = !empty($modSettings['recycle_enable']) && !empty($modSettings['recycle_board']);\n\n\tif ($recycled_enabled && !empty($board))\n\t{\n\t\t// Trying to removed from the recycle bin\n\t\tif (!isset($_GET['confirm_delete']) && $modSettings['recycle_board'] == $board)\n\t\t{\n\t\t\tif (isset($_REQUEST['msg']))\n\t\t\t{\n\t\t\t\t$confirm_url = getUrl('action', ['action' => 'deletemsg', 'confirm_delete', 'topic' => $context['current_topic'] . '.0', 'msg' => $_REQUEST['msg'], '{session_data}']);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$confirm_url = getUrl('action', ['action' => 'removetopic2', 'confirm_delete', 'topic' => $context['current_topic'] . '.0', '{session_data}']);\n\t\t\t}\n\n\t\t\t// Give them a prompt before we remove the message\n\t\t\tthrow new \\ElkArte\\Exceptions\\Exception('post_already_deleted', false, array($confirm_url));\n\t\t}\n\t}\n}", "function mit_sendemail_caldelete($e)\r\n {\r\n\r\n global $mit_calendar_email, $mit_eventcal_adminurl;\r\n\r\n // Notify the Creator...\r\n\r\n $mit_title = mit_gg($e, e_title);\r\n $mit_email = mit_g($e, e_email);\r\n\r\n $str = \"<html><head><title>Email</title></head><body>\";\r\n $str = $str.\"The Westgate Event <b>\".$mit_title.\"</b>\".\" has just been deleted from the Event listings.<br>\";\r\n $str = $str.\"Please remove it from the <a href='\".$mit_eventcal_adminurl.\"'>Westgate Events Calendar</a> at your earliest convenience.<br>\";\r\n $str = $str.\"<br>** The above email is automatically generated **<br></body></html>\\n\\n\";\r\n\r\n $str = wordwrap($str,70,\"\\n \");\r\n $str = str_replace(\"\\r\\n\",\"\\n\",$str);\r\n $str = str_replace(\"\\n\\r\",\"\\n\",$str);\r\n $str = str_replace(\"\\r\",\"\\n\",$str);\r\n $str = str_replace(\"\\n\",\"\\n \",$str);\r\n\r\n $email_text = $str;\r\n\r\n send_mail(\r\n 'Westgate Scripting','westgate-gc@mit.edu', // sender name & email\r\n $mit_email, // recipient email\r\n \"[Westgate Calendar] Event '\".$mit_title.\"' requires deleting\", // subject\r\n $email_text); // body\r\n\r\n \r\n }", "function irc_channels_delete( int $channel_id ) : string\n{\n // Require moderator rights to run this action\n user_restrict_to_moderators();\n\n // Check if the required files have been included\n require_included_file('integrations.lang.php');\n\n // Sanitize the channel's id\n $channel_id = sanitize($channel_id, 'int', 0);\n\n // Check if the channel exists\n if(!$channel_id || !database_row_exists('irc_channels', $channel_id))\n return __('irc_channels_delete_error');\n\n // Fetch the channel's data before deleting it\n $dchannel = mysqli_fetch_array(query(\" SELECT irc_channels.name AS 'c_name' ,\n irc_channels.channel_type AS 'c_type' ,\n irc_channels.languages AS 'c_lang' ,\n irc_channels.description_en AS 'c_desc_en' ,\n irc_channels.description_fr AS 'c_desc_fr'\n FROM irc_channels\n WHERE irc_channels.id = '$channel_id' \"));\n\n // Hard delete the channel\n query(\" DELETE FROM irc_channels\n WHERE irc_channels.id = '$channel_id' \");\n\n // Prepare data for the activity logs\n $mod_username = user_get_username();\n $channel_name_raw = $dchannel['c_name'];\n $channel_name = sanitize($dchannel['c_name'], 'string');\n $channel_type = irc_channels_type_get($dchannel['c_type']);\n\n // Activity logs\n $modlog = log_activity( 'irc_channels_delete' ,\n is_moderators_only: true ,\n activity_summary_en: $channel_name ,\n moderator_username: $mod_username );\n\n // Detailed activity logs\n log_activity_details($modlog, 'Channel description (EN)', 'Description du canal (EN)', $dchannel['c_desc_en']);\n log_activity_details($modlog, 'Channel description (FR)', 'Description du canal (FR)', $dchannel['c_desc_fr']);\n log_activity_details($modlog, \"Channel type\", \"Type de canal\", $channel_type['name_en']);\n log_activity_details($modlog, \"Channel language(s)\", \"Langue(s) du canal\", $dchannel['c_lang']);\n\n // IRC bot message\n irc_bot_send_message(\"IRC channel $channel_name_raw has been deleted from the channel list by $mod_username - \".$GLOBALS['website_url'].\"pages/social/irc?channels\", 'mod');\n\n // Return that all went well\n return __('irc_channels_delete_ok');\n}", "private function unsubscribe()\n {\n $this->botman->hears('unsubscribe', function(BotMan $bot) {\n $userId = $bot->getUser()->getId();\n Subscriber::where('telegram_user_id', $userId)->delete();\n $bot->reply('You have just unsubscribed from our updates!');\n });\n }", "function on_remove_handler()\n{\n\tglobal $g_obj_assign_ta_manager, $g_str_ta_id;\n\t\n\t$arr_course_list = PageHandler::get_post_value( 'CourseId' );\t\n\t\n\tif ( $arr_course_list == null )\n\t{\n\t\tMessageHandler::add_message( MSG_FAIL, \"Please select at least one professor\" );\n\t\treturn;\n\t}\n\t\n\t$arr_success = array();\n\t$arr_fail = array();\n\t\n\tforeach( $arr_course_list as $int_course_id )\n\t{\n\t\tif ( $g_obj_assign_ta_manager->unassign_TA( $g_str_ta_id, $int_course_id ) )\n\t\t{\n\t\t\tarray_push( $arr_success, $int_course_id );\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\tarray_push( $arr_fail, $int_course_id );\n\t\t}\n\t}\n\t\n\tif ( count( $arr_success ) != 0 )\n\t{\n\t\tMessageHandler::add_message( MSG_SUCCESS, 'Successfully removed the TA from ' . count( $arr_success ) . ' course(s)' );\n\t}\n\t\n\tif ( count( $arr_fail ) != 0 )\n\t{\n\t\tMessageHandler::add_message( MSG_FAIL, 'Failed to remove the TA from ' . count( $arr_fail ) . ' course(s)' );\n\t}\n}", "function remove_yoastseo_notifications() {\n\tif ( ! class_exists( 'Yoast_Notification_Center' ) ) {\n\t\treturn;\n\t}\n\n\tremove_action( 'admin_notices', array(\n\t\tYoast_Notification_Center::get(),\n\t\t'display_notifications'\n\t) );\n\tremove_action( 'all_admin_notices', array(\n\t\tYoast_Notification_Center::get(),\n\t\t'display_notifications'\n\t) );\n}", "public function resetAdminNotifications();", "function eventUserCleanCode(){\n\t\tglobal $sql;\n\t\t$totaldeleted = 0;\n\t\t// Security Check\n\t\tif(!security::hasAccess(\"Edit Users\"))\n\t\t\treturn;\n\t\t\n\t\t// Start off by selecting the guild column from dkp_settings\n\t\t$dkpusersdata = $sql->Query(\"SELECT guild FROM dkp_users\");\n\n\t\t// With all of the guild ids in an array we will now loop through them and check to see if that guild exists in dkp_guilds\n\t\t// If the guild does not exist then delete all data from dkp_settings that contains that guild\n\t\twhile($row= mysqli_fetch_array($dkpusersdata))\n\t\t{\n\t\t\t$guildid = $row[\"guild\"];\n\n\t\t\t// Search through dkp_settings to see if that guild exists\n\t\t\t$guildresult = $sql->Query(\"SELECT id FROM dkp_guilds WHERE id=$guildid LIMIT 1\");\n\n \t\t\tif($row = mysqli_fetch_array($guildresult)) \n\t\t\t{//if we did return a record\n \t\t\t\t// Do nothing at this time.\n \t\t\t}\n\t\t\telse\n\t\t\t{\n \n\t\t\t\t// Delete all records from dkp_users with this guild id\n\t\t\t\t$sql->Query(\"DELETE from dkp_users WHERE guild = '$guildid'\");\t\t\t\t\n\t\t\t\t$totaldeleted = $totaldeleted + 1;\n\t\t\t}\n\t\t\n\t\t}\n\n\n\n\t\techo (\"FINISHED CLEANING DKP_USERS!\");\n\t\techo (\"Deleted \".$totaldeleted);\n\t}", "public function actionCheck() {\n\t\t$users = $this->getUserReminders();\n\t\tif(empty($users)) { echo \"No users need reminding.\"; exit; }\n\t\t\n\t\t$subject = 'You have files on CINCH! marked for deletion';\n\t\t\t\n\t\t$message = \"You have files marked for deletion from Cinch!\\r\\n\";\n\t\t$message .= \"They will be deleted 10 days from now.\\r\\n\";\n\t\t$message .= \"If you haven't done so please retrieve your downloads soon from http://cinch.nclive.org.\\r\\n\";\n\t\t$message .= \"\\r\\n\";\n\t\t$message .= \"Thanks, from your CINCH administrators\";\n\t\t\n\t\tforeach($users as $user) {\n\t\t\t$mail_sent = $this->mail_user->UserMail($user['user_id'], $subject, $message);\n\t\t\tif($mail_sent) {\n\t\t\t\t$this->reminderSent($user['id']);\n\t\t\t}\n\t\t}\n\t}", "function getUninstallMessage() {\n return lang('Module will be deactivated. All discussions from all projects will be deleted');\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the Workspace instance.
public function getWorkspace() { return $this->workspace; }
[ "public function getWorkspace() {\n\t\treturn $this->workspace;\n\t}", "public function getWorkspace()\n {\n return $this->hasOne(Workspace::class, ['id' => 'workspace_id']);\n }", "public function getWorkspace() {\r\n\t\treturn ($this->crWorkspace);\r\n\t}", "public function activeWorkspace()\n {\n return $this->workspaces()->first();\n }", "public function getWorkspace() {\n\t\treturn $this->nodeData->getWorkspace();\n\t}", "public function getActiveWorkspace() {\n return $this->workspaceManager->getActiveWorkspace();\n }", "public function getWorkspace() {}", "public function getPersonalWorkspace()\n {\n $workspaceName = $this->getPersonalWorkspaceName();\n if ($workspaceName !== null) {\n return $this->workspaceRepository->findOneByName($this->getPersonalWorkspaceName());\n }\n }", "public function workspace(): WorkspaceAspect\n {\n return $this->rootContext->getAspect('workspace');\n }", "protected function getWorkspaceService() {}", "public function getWorkspaceDetails() {\n return ClientWorkspace::select('id', 'workspace_id')->first();\n }", "public function getWorkspaceId() {\n return $this->_workspace_id;\n }", "public function getWorkshop()\n\t{\n\t\tif(!$this->_workshop)\n\t\t\t$this->_workshop = Workshop::findById($this->workshop_id);\n\t\treturn $this->_workshop;\n\t}", "public function getActiveWorkspace();", "public function getCloudWorkspace()\n {\n return $this->readOneof(2);\n }", "public function getWorkspaceName() {\n\t\treturn $this->workspaceName;\n\t}", "function getWorkSpaceLocation() {\n return $this->workspaceLocation;\n }", "public function getWorkspaceName()\n {\n return $this->_variables['application']['workspace'];\n }", "public function getWorkflowInstance()\n {\n if (!$this->currentInstance) {\n $this->currentInstance = $this->getWorkflowService()->getWorkflowFor($this->owner);\n }\n\n return $this->currentInstance;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the isOrganizationDefault This can only be set to true for a single tenantwide policy which will apply to all scopes and roles. Set the scopeId to / and scopeType to Directory. Supports $filter (eq, ne).
public function setIsOrganizationDefault($val) { $this->_propDict["isOrganizationDefault"] = boolval($val); return $this; }
[ "public static function setDefaultScope($scope)\n {\n static::$defaultScope = is_array($scope) ? implode(' ', $scope) : $scope;\n }", "function hcommons_set_default_scope_society() {\n\t\tif ( bp_is_groups_directory() || ( bp_is_members_directory() && NEU_DEFAULT_SOCIETY !== self::$society_id ) ) {\n\t\t\t$object_name = bp_current_component();\n\t\t\t$cookie_name = 'bp-' . $object_name . '-scope';\n\n\t\t\tif ( ! isset( $_COOKIE[ $cookie_name ] ) ) {\n\t\t\t\tsetcookie( $cookie_name, 'society', null, '/' );\n\t\t\t\t// unless the $_COOKIE global is updated in addition to the actual cookie above,\n\t\t\t\t// bp will not use the value for the first pageload.\n\t\t\t\t$_COOKIE[ $cookie_name ] = 'society';\n\t\t\t}\n\t\t}\n\t}", "public function setDefaultScope($defaultScope)\n\t{\n\t\t$this->defaultScope = $defaultScope;\n\n\t\treturn $this;\n\t}", "public function setIsOrganizationDefault(?bool $value): void {\n $this->getBackingStore()->set('isOrganizationDefault', $value);\n }", "public function getDefaultScopeId();", "public static function setDefaultCriteriaFilter()\r\n\t{\r\n\t\tif ( self::$s_criteria_filter == null )\r\n\t\t\tself::$s_criteria_filter = new criteriaFilter ();\r\n\t\t\r\n\t\t$c = new myCriteria(); \r\n\t\t$c->addAnd ( DistributionProfilePeer::PROVIDER_TYPE, DistributionProviderType::GENERIC); \r\n\t\t$c->addAnd ( DistributionProfilePeer::STATUS, DistributionProfileStatus::DELETED, Criteria::NOT_EQUAL);\r\n\t\tself::$s_criteria_filter->setFilter ( $c );\r\n\t}", "public function setScope($scope): self\n {\n if (blank($scope)) {\n $scope = 'https://graph.microsoft.com/.default';\n }\n\n if ($scope == 'https://graph.microsoft.com/.default') {\n $this->scope = $scope;\n\n return $this;\n }\n\n if (Str::startsWith($scope, 'api://') && Str::endsWith($scope, '/.default')) {\n $this->scope = $scope;\n\n return $this;\n }\n\n $this->scope = \"api://{$scope}/.default\";\n\n return $this;\n }", "public static function registerDefaultScopes()\n {\n self::registerScope('none', new Scope\\None());\n self::registerScope('request', new Scope\\Request());\n self::registerScope('session', new Scope\\Session());\n }", "public function setDefaultQuerySettings(\n \\TYPO3\\CMS\\Extbase\\Persistence\\Generic\\QuerySettingsInterface $defaultQuerySettings\n ) {\n // Not necessary for doctrine based repository\n }", "protected function getDefaultScopes()\n {\n return $this->scopes;\n }", "public function getDefaultScope();", "protected function getDefaultScopes()\n {\n return $this->defaultScopes;\n }", "public function getDefaultScope()\n\t{\n\t\treturn $this->getOauthProvider()->getDefaultScope();\n\t}", "protected function applyDefaultFiltering()\n\t{\n\t\tif (empty($this->filters) && !empty($this->defaultFilters)) {\n\t\t\t$this->filters = $this->defaultFilters;\n\t\t}\n\t}", "public static function setDefaultCriteriaFilter()\n\t{\n\t\tif(self::$s_criteria_filter == null)\n\t\t\tself::$s_criteria_filter = new criteriaFilter();\n\t\t\n\t\t$c = new myCriteria(); \n\t\tself::$s_criteria_filter->setFilter($c);\n\t}", "public function setDefaultOrgID( $aOrgID )\n\t{\n\t\t$this->mDefaultOrgID = ( !empty($aOrgID) ) ? $aOrgID : AuthModel::ORG_ID_4_ROOT;\n\t\treturn $this;\n\t}", "protected function getDefaultScopes() {\n return [];\n }", "public function setDefault(bool $default): TaxGroupInterface;", "public function setDefaultFilter ($filterName) {\n $this->mFilter[\"_DEFAULT_\"] = $this->mFilter[$filterName];\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
(PHP 5, PECL OCI8 &gt;= 1.1.0) Compares two LOB/FILE locators for equality
function oci_lob_is_equal( #[LanguageLevelTypeAware(['8.0' => 'OCILob'], default: 'OCI_Lob')] $lob1, #[LanguageLevelTypeAware(['8.0' => 'OCILob'], default: 'OCI_Lob')] $lob2 ) {}
[ "function oci_lob_is_equal (OCI_Lob $lob1, OCI_Lob $lob2) {}", "function oci_lob_is_equal (OCI-Lob $lob1, OCI-Lob $lob2) {}", "function cubrid_lob2_import($lob_identifier, string $file_name): bool {}", "function cubrid_lob2_tell($lob_identifier): int {}", "function dbx_compare($row_x, $row_y, $columnname, $flags = null) {}", "function cubrid_lob2_seek($lob_identifier, int $offset, int $origin = CUBRID_CURSOR_CURRENT): void\n{\n error_clear_last();\n $safeResult = \\cubrid_lob2_seek($lob_identifier, $offset, $origin);\n if ($safeResult === false) {\n throw CubridException::createFromPhpError();\n }\n}", "public function should_match_two_identical_docs_differing_in_url_scheme_port_and_path() {\n\t\t$file = 'html-3';\n\t\t$one = $two = $this->getSourceFileContents($file);\n\n\t\t$this->currentUrl = 'https://www.theaveragedev.com:8080/some/path';\n\t\t$two = $this->replaceExampleUrlIn($two);\n\t\t$driver = $this->make_instance();\n\n\t\t$driver->match($one, $driver->evalCode($two));\n\t}", "function files_are_equal($a, $b)\n{\n if(filesize($a) !== filesize($b))\n return false;\n\n // Check if content is different\n $ah = fopen($a, 'rb');\n $bh = fopen($b, 'rb');\n\n $result = true;\n while(!feof($ah))\n {\n if(fread($ah, 8192) != fread($bh, 8192))\n {\n $result = false;\n break;\n }\n }\n fclose($ah);\n fclose($bh);\n\n return $result;\n}", "function files_are_equal($a, $b)\n{\n if(filesize($a) !== filesize($b))\n return false;\n\n // Check if content is different\n $ah = fopen($a, 'rb');\n $bh = fopen($b, 'rb');\n\n $result = true;\n while(!feof($ah))\n {\n if(fread($ah, 8192) != fread($bh, 8192))\n {\n $result = false;\n break;\n }\n }\n\n fclose($ah);\n fclose($bh);\n\n return $result;\n}", "function files_are_equal($a, $b){\r\n if(filesize($a) !== filesize($b))\r\n return false;\r\n\r\n // Check if content is different\r\n $ah = fopen($a, 'rb');\r\n $bh = fopen($b, 'rb');\r\n\r\n $result = true;\r\n while(!feof($ah))\r\n {\r\n if(fread($ah, 8192) != fread($bh, 8192))\r\n {\r\n $result = false;\r\n break;\r\n }\r\n }\r\n\r\n fclose($ah);\r\n fclose($bh);\r\n\r\n return $result;\r\n }", "function files_are_equal($a, $b) {\n if(filesize($a) !== filesize($b))\n return false;\n\n // Check if content is different\n $ah = fopen($a, 'rb');\n $bh = fopen($b, 'rb');\n\n $result = true;\n while(!feof($ah))\n {\n if(fread($ah, 8192) != fread($bh, 8192))\n {\n $result = false;\n break;\n }\n }\n\n fclose($ah);\n fclose($bh);\n\n return $result;\n}", "function files_are_equal($a, $b)\n{\n if(filesize($a) !== filesize($b))\n return 0;\n\n // Check if content is different\n $ah = fopen($a, 'rb');\n $bh = fopen($b, 'rb');\n\n $result = 1;\n while(!feof($ah))\n {\n if(fread($ah, 8192) != fread($bh, 8192))\n {\n $result = 0;\n break;\n }\n }\n\n fclose($ah);\n fclose($bh);\n\n return $result;\n}", "function cubrid_lob_close(array $lob_identifier_array): bool {}", "function files_identical($fn1, $fn2)\n{\n if (filetype($fn1) !== filetype($fn2))\n return FALSE;\n if (filesize($fn1) !== filesize($fn2))\n return FALSE;\n if (!$fp1 = fopen($fn1, 'rb'))\n return FALSE;\n if (!$fp2 = fopen($fn2, 'rb')) {\n fclose($fp1);\n return FALSE;\n }\n $same = TRUE;\n while (!feof($fp1) and !feof($fp2))\n if (fread($fp1, READ_LEN) !== fread($fp2, READ_LEN)) {\n $same = FALSE;\n break;\n }\n\n if (feof($fp1) !== feof($fp2))\n $same = FALSE;\n fclose($fp1);\n fclose($fp2);\n return $same;\n}", "function cubrid_lob2_tell64($lob_identifier): string\n{\n error_clear_last();\n $safeResult = \\cubrid_lob2_tell64($lob_identifier);\n if ($safeResult === false) {\n throw CubridException::createFromPhpError();\n }\n return $safeResult;\n}", "public function should_match_two_identical_docs_differing_by_urls() {\n\t\t$file = 'html-3';\n\t\t$one = $two = $this->getSourceFileContents($file);\n\n\t\t$this->currentUrl = 'http://www.theaveragedev.com';\n\t\t$two = $this->replaceExampleUrlIn($two);\n\t\t$driver = $this->make_instance();\n\n\t\t$driver->match($one, $driver->evalCode($two));\n\t}", "protected static function compareObjectsByFileID($a, $b) {\n\t\t\t$cmp = strcmp($a[self::VCITEM_FILEID_POS], $b[self::VCITEM_FILEID_POS]);\n\t\t\tif ($cmp == 0) {\n\t\t\t\t// let's hope the interpreter optimizes this\n\t\t\t\t$ta = $a[self::VCITEM_TYPE_POS];\n\t\t\t\t$tb = $b[self::VCITEM_TYPE_POS];\n\t\t\t\t$cmp = ($ta == $tb) ? 0 : (($ta < $tb) ? -1 : 1);\n\t\t\t}\n\t\t\treturn $cmp;\n\t\t}", "function isSameFile($path1, $path2) {\n\treturn realpath($path1) == realpath($path2);\n}", "public function should_match_two_identical_docs_differing_in_url_and_scheme() {\n\t\t$file = 'html-3';\n\t\t$one = $two = $this->getSourceFileContents($file);\n\n\t\t$this->currentUrl = 'https://www.theaveragedev.com';\n\t\t$two = $this->replaceExampleUrlIn($two);\n\t\t$driver = $this->make_instance();\n\n\t\t$driver->match($one, $driver->evalCode($two));\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if the given user is a member of this group.
public function hasMember($user = null): bool;
[ "public function isMember(UserObject $userObject){\n if(empty($this->members)){\n CoreLog::debug('Group does not have members when isMember is called');\n return false;\n }\n\n if(empty($userObject)) return false;\n\n /** @var UserGroupMemberObject $member */\n foreach($this->members as $member){\n if($member->getUserObject() == null) continue;\n if($member->getUserObject()->getId() == $userObject->getId()){\n return true;\n }\n }\n return false;\n }", "function isMember($user)\n {\n $usres = $this->get_member_list();\n foreach ($usres as $u)\n if ($u->getId() == $user->getId())\n return true;\n return false;\n }", "public function isMember($user) {\n return $this->isUser($user) and $this->id == $user->team_id;\n }", "public function isMember(User $user) : bool\n {\n foreach ($this->members as $member) {\n if ($member->id == $user->id) {\n return true;\n }\n }\n\n return false;\n }", "protected function checkIfuserIsMemberOf()\n {\n $log = sfContext::getInstance()->getLogger();\n $result = array();\n $log->log('{sfSSOValidator} check if user has an authorized CN');\n if( is_array(sfConfig::get('app_sf_guard_sso_authorized_cn')) )\n {\n $groups = sfConfig::get('app_sf_guard_sso_authorized_cn');\n foreach($groups as $group)\n {\n if(sfPlexcel::isMemberOf($group))\n {\n $log->log('{sfSSOValidator} user is a member of '.$group);\n return true;\n }\n $log->log('{sfSSOValidator} user is NOT a member of '.$group);\n }\n throw new sfValidatorError($this, 'invalid_groups_not_authorized');\n }\n $log->log('{sfSSOValidator} user not a member of authorized groups');\n return false;\n }", "public function hasAccess(&$user) {\n require_once(\"includes/User.php\");\n \n foreach($this->mGroups as $group) {\n if(in_array($group, $user->mGroups)){\n return true;\n }\n }\n \n if (in_array($user->getName(), $this->mUsers)) {\n return true;\n }\n \n return false;\n }", "function is_course_group_member($course_group, $user);", "public function IsValidForCurrentUser()\n {\n $bIsValidForUser = false;\n $bIsValidGroup = false;\n\n $shippingGroupDataAccess = $this->getShippingGroupDataAccess();\n $aUserGroups = $shippingGroupDataAccess->getPermittedUserGroupIds($this->id);\n if (!is_array($aUserGroups) || count($aUserGroups) < 1) {\n $bIsValidGroup = true;\n } else {\n $oUser = TdbDataExtranetUser::GetInstance();\n $bIsValidGroup = $oUser->InUserGroups($aUserGroups);\n }\n\n // now check user id\n if ($bIsValidGroup) {\n $aUserList = $shippingGroupDataAccess->getPermittedUserIds($this->id);\n if (!is_array($aUserList) || count($aUserList) < 1) {\n $bIsValidForUser = true;\n } else {\n $oUser = TdbDataExtranetUser::GetInstance();\n $bIsValidForUser = in_array($oUser->id, $aUserList);\n }\n }\n\n return $bIsValidForUser && $bIsValidGroup;\n }", "public function memberOf(string $usergroup_name) : bool;", "public function hasUser($user)\n {\n return $this->users->contains($user) || $user->ownsTeam($this);\n }", "public function is_user_active_member($user, $group){\n\t\tif($user->exists() && $group->exists()){\n\t\t\t// Populate the users groups if not already done:\n\t\t\tif(!$user->are_groups_populated()){\n\t\t\t\t$user->populate_groups();\n\t\t\t}\n\t\t\t// Retrieve groups user is currently active with:\n\t\t\t$users_active_groups = $user->get_groups();\n\t\t\t// If users has no active groups then return false:\n\t\t\tif(!$user->get_groups()){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// Got this far? There's at least one group to check then:\n\t\t\tforeach($users_active_groups as $active_group){\n\t\t\t\tif($active_group->data()->id == $group->data()->id)\n\t\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public function isMember($organization, $user) {\n\t\treturn ($this->request('/orgs/'.$organization.'/members/'.$user, 'GET', array(), true) == '204') ? true : false;\n\t}", "public function isMemberOf($group)\n\t{\n\t\t$cursor = $this->site->db->query(\"SELECT * FROM user_group\n\t\t\t\t\t\t\t\t\t\t WHERE group_name = '\".$this->site->db->escape($group).\"'\n\t\t\t\t\t\t\t\t\t\t AND user_id = '\".$this->get($this->primaryKey).\"'\");\n\t\tif ($cursor->num_rows > 0)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "protected function userIsMemberInAtLeastOneRequiredGroup($user) {\n\t\t$requiredGroups = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::intExplode(',', $this->requiredGroups, TRUE);\n\t\tforeach ($requiredGroups as $requiredGroupUid) {\n\t\t\tif ($requiredGroupUid === self::GROUP_UID_ANY_USER) {\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t\tif (isset($user->groupData['uid'][$requiredGroupUid])) {\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t}\n\t\treturn FALSE;\n\t}", "function isInGroup($user, $group)\n{\n\tglobal $db;\n\n\t$ret = $db->query('select * from group_user where group_user_user=' . $user . ' and group_user_group=' . $group);\n\n\tif(count($ret))\n\t\treturn true;\n\telse\n\t\treturn false;\n}", "public function isMember($userId = \"\")\n {\n\n // Take current userid if none is given\n if ($userId == \"\")\n $userId = Yii::app()->user->id;\n\n $membership = $this->getMembership($userId);\n\n if ($membership != null && $membership->status == RoomMembership::STATUS_MEMBER)\n return true;\n\n return false;\n }", "public function isOwner(UserObject $userObject){\n if(empty($this->owners)){\n CoreLog::debug('Group does not have owners when isOwner is called');\n return false;\n }\n /** @var UserObject $member */\n foreach($this->owners as $owner){\n if($owner->getId() == $userObject->getId()){\n return true;\n }\n }\n return false;\n }", "public static function is_member()\n {\n static $is_member = NULL;\n if (NULL !== $is_member)\n return ($is_member);\n\n $role = self::_get_role();\n // banned, and registered/verified but not approved users are not full members\n if ('ban' === $role || 'register' === $role || 'verified' === $role)\n return ($is_member = FALSE);\n\n // TODO: use current_user_can() when/if we create capabilities\n//\t\tif (current_user_can('peepso_member'))\n//\t\t\treturn ($is_member = FALSE);\n\n return ($is_member = TRUE);\n }", "function wc_memberships_is_user_member( $user_id = null, $membership_plan = null, $cache = true ) {\n\treturn wc_memberships()->get_user_memberships_instance()->is_user_member( $user_id, $membership_plan, false, $cache );\n}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Relation with `petugas` table in `Petugas` model.
public function petugas() { return $this->belongsTo(\App\Models\Petugas::class, 'petugas_id', 'id'); }
[ "public function getPetugas()\n {\n return $this->hasOne(Petugas::className(), ['id' => 'id_petugas']);\n }", "public function getPetugas()\n {\n return $this->hasMany(Petugas::className(), ['id_bagian' => 'id']);\n }", "public function getAduanPetugas()\n {\n return $this->hasMany(AduanPetugas::className(), ['id_aduan' => 'id']);\n }", "public function penyanyi()\n {\n return $this->belongsTo(Petugas::class, 'penyanyi_id');\n }", "public function pet()\n {\n return $this->belongsTo(Pet::class, 'pet_id', 'id');\n }", "public function personas()\n {\n //return $this->belongsToMany('App\\Persona');\n return $this->belongsToMany('App\\Persona', 'pedidos', 'vianda_id', 'persona_id');\n }", "public function viandas()\n {\n //return $this->belongsToMany('App\\Vianda');\n return $this->belongsToMany('App\\Vianda', 'pedidos', 'vianda_id', 'persona_id');\n }", "public function getPessoas()\n {\n return $this->hasMany(Pessoas::className(), ['posto_id' => 'id']);\n }", "public function varietas_padi()\n {\n return $this->belongsTo(VarietasPadi::class, 'id_varietas_padi');\n }", "public function pet()\n {\n $this->belongsTo('App\\Petz', 'resource_id');\n }", "public function getPizzas()\n {\n return $this->hasMany(Pizza::className(), ['id' => 'pizza_id'])\n ->via('pizzaIngredients'); // the relationship needs the junction table to work\n }", "public function pegawai()\n {\n return $this->hasMany('App\\Pegawai', 'kode_eselon2', 'kode_eselon2');\n }", "public function puesto()\n {\n return $this->belongsTo('App\\Models\\Puesto','puesto_id','id');\n }", "public function peoples(){\n return $this->hasMany(People::class);\n }", "public function pessoa(){\n return $this->belongsTo(Pessoa::class);\n }", "public function peoples()\n {\n return $this->hasMany(People::class);\n }", "public function pizzas()\n {\n return $this->belongsToMany('App\\Models\\Pizza', 'pizza_ingredients');\n }", "public function puertas()\n {\n return $this->belongsToMany('App\\Puerta','horario_invitado','invitados_id', 'puertas_id')->withPivot('targeta_rfid','desde','hasta');\n }", "public function getMataPelajarans()\n {\n return $this->hasMany(MataPelajaran::className(), ['id_kelas' => 'id_kelas']);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Show hud part (need to have control of it using manialinksGetHudPartControl) (see manialinksHideHudPart for parameters)
function manialinksShowHudPart($plugin,$hudpart,$login){ manialinksSetHudPart($plugin,$hudpart,$login,false); }
[ "function manialinksGetHudPartControl($plugin,$hudpart){\n\tglobal $_mldebug,$_HudControl;\n\tif(isset($_HudControl[$hudpart])){\n\t\tif($_mldebug>1) console(\"Hud $hudpart controlled by $plugin (was {$_HudControl[$hudpart]}).\"); \n\t\t$_HudControl[$hudpart] = $plugin;\n\t\tif($plugin === true)\n\t\t\tmanialinksShowHudPart(true,$hudpart,true);\n\t\telse\n\t\t\tmanialinksHideHudPart(true,$hudpart,true);\n\n\t}else{\n\t\tif($_mldebug>0) console(\"Hud $hudpart unknown !\"); \n\t}\n}", "function showSlot() {\n\t\tif (!empty($this->subSections['Image'])\n\t\t || !empty($this->subSections['Text'])\n\t\t || !empty($this->subSections['Title'])) {\n\t\t\t//Display the Plugin\n\t\t\t$this->framework('Outer', $this->mergeFields, $this->subSections);\n\t\t}\n\t}", "public function part($id){\n\t\t$data['part']=$this->part_model->get_part_by_id($id);\n\t\tif($data['part']==null){\n\t\t\tredirect('not_found');\n\t\t}\n\t\t$this->load->g_template(\"display_part\",$data);\n\t}", "function display_admpanel($aseco, $player) {\n\n\t// build manialink\n\t$xml = $player->panels['admin'];\n\n\t//$aseco->console_text($xml);\n\t$aseco->client->addCall('SendDisplayManialinkPageToLogin', array($player->login, $xml, 0, false));\n}", "function socialit_hide_show($parts){\r\n\t$topic = get_topic(get_topic_id());\r\n\tif($topic && bb_current_user_can('delete_topic', $topic->topic_id)){\r\n\t\tif(bb_get_topicmeta($topic->topic_id, 'hide_socialit') == 'true'){\r\n\t\t\t$display = esc_html( __('Show Social It Menu', 'socialit') );\r\n\t\t\t$uri = socialit_get_current_url().\"?socialit_hide_show=1&shs_opt=1&tid=\".$topic->topic_id;\r\n\t\t} else {\r\n\t\t\t$display = esc_html( __('Hide Social It Menu', 'socialit') );\r\n\t\t\t$uri = socialit_get_current_url().\"?socialit_hide_show=1&shs_opt=2&tid=\".$topic->topic_id;\r\n\t\t}\r\n\t\t$uri = esc_url(bb_nonce_url($uri, 'socialit_hide_show_'.$topic->topic_id));\r\n\t\t$parts[] = '[<a href=\"' . $uri . '\">' . $display . '</a>]';\r\n\t\treturn $parts;\r\n\t}\r\n\treturn $parts;\r\n}", "public function showAction(Annonce_appart $annonce_appart) {\n\n $user = $this->getUser();\n $deleteForm = $this->createDeleteForm($annonce_appart);\n\n return $this->render('annonce_appart/show.html.twig', array(\n 'user' => $user,\n 'annonce_appart' => $annonce_appart,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function showDefinition()\n {\n $this->tabs->setSubTabActive('show_definition');\n $definition = ($this->definition === NULL) ? new srCertificateDefinition() : $this->definition;\n $this->form = new srCertificateDefinitionFormGUI($this, $definition);\n $this->tpl->setContent($this->form->getHTML());\n if ($this->definition) {\n $this->showPreviewCertificateInToolbar();\n }\n }", "function showSlot() {\n\t\tif ($this->setting('show_labels')) {\n\t\t\t$this->showSections['show_labels'] = true;\n\t\t}\n\t\t$this->getContentItemMetaData();\n\t\t$this->framework('Outer',$this->mergeFields,$this->showSections);\n\t}", "function IsShown(){}", "function bpfit_walk_subtab_show_screen() {\n\t\t\tadd_action( 'bp_template_title', array($this, 'bpfit_walk_subtab_function_to_show_title') );\n\t\t\tadd_action( 'bp_template_content', array($this, 'bpfit_walk_subtab_function_to_show_content') );\n\t\t\tbp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );\n\t\t}", "protected function _showPanel(){\n if(isset($this->options['direction']['showPanel']) && $this->options['direction']['showPanel']){\n return 'directionsDisplay.setPanel(document.getElementById(\"' . $this->options['direction']['panelContainer'] . '\"));';\n }\n }", "public function showRemovePartPanel($sender,$param)\r\n {\r\n \t$partInstanceId = $this->kitDataList->DataKeys[$sender->Parent->ItemIndex];\r\n \t$partInstance = Factory::service(\"PartInstance\")->getPartInstance($partInstanceId);\r\n \tif(!$partInstance instanceof PartInstance)\r\n \t\treturn $this->onError(\"Invalid part. Please Contact \". Config::get(\"SupportHandling\",\"Contact\") .\" on \". Config::get(\"SupportHandling\",\"Phone\") .\" or \". Config::get(\"SupportHandling\",\"Email\") .\"! \");\r\n\r\n \tif($param != null)\r\n\t\t\t$itemIndex = $sender->Parent->ItemIndex;\r\n\t\telse\r\n\t\t\t$itemIndex = 0;\r\n\r\n\t\t$this->kitDataList->SelectedItemIndex = -1;\r\n\t\t$this->kitDataList->EditItemIndex = $itemIndex;\r\n \t$this->loadPartsList();\r\n\r\n \t$this->kitDataList->getEditItem()->removingPartInstance_SerialNo->Text=$partInstance;\r\n \t$this->kitDataList->getEditItem()->removingPartInstance_Id->Value=$partInstanceId;\r\n \t$this->kitDataList->getEditItem()->targetWarehouseId->Value=\"\";\r\n }", "function display_introduction_section($tool) {\n\t\t$is_allowed_to_edit = api_is_allowed_to_edit ();\n\t\t$moduleId = $tool;\n\t\tif (api_get_setting ( 'enable_tool_introduction' ) == 'true' || $tool == TOOL_COURSE_HOMEPAGE) {\n\t\t\tinclude (api_get_path ( INCLUDE_PATH ) . \"introductionSection.inc.php\");\n\t\t}\n\t}", "public function showUi();", "public function dont_show_part_links(){\n \t$this->show_part_links=false;\n }", "public function show_heading( $show )\n {\n $this->show_heading = $show;\n }", "function ncurses_show_panel($panel) {}", "function IsShownOnScreen(){}", "public function showToMegaMenu()\n {\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generate queries / synonym_queries function returns an array of queries like the following example synonym_queries ("buy a phone") it returns : an array where elements are the following : [0]=> purchase phone, [1]=>order phone, [2]=>buy cellular ...etc ! The stop words as you see are skipped
function synonym_queries($search_query, $stop_words_array) { $query = array(); $queries = array(); foreach (explode(" ", $search_query) as $single_word) { if (!in_array($single_word, $stop_words_array)) { $query[] = $single_word; } } $q = implode(" ", $query); foreach ($query as $key => $word) { // Get synonyms $synonyms = WordnetApi::_new($word) -> getSynonyms(); foreach ($synonyms as $synonym) { echo $synonym."<br/>"; if (true == word_exists($synonym)) { $nq = str_replace($word, $synonym, $q); if (!in_array($nq, $queries)) { $queries[] = $nq; } } // end if(word_exists($synonym)) } // end foreach ($synonyms as $synonym){ }// end foreach ($query as $key=>$word) return $queries; }
[ "public function synonyms() {\n if (empty($this->keywords)) return '';\n \n $db = Zend_Registry::get('db');\n $result = array();\n $descriptorFinder = new Descriptors();\n $keyword_arr = explode('|', $this->keywords);\n foreach ($keyword_arr as $v) {\n $where = $db->quoteInto(\"headingtext = ?\", $v);\n $syn = $descriptorFinder->fetchRow($where)->synonyms;\n if (!empty($syn))\n $result[] = $syn;\n }\n return join(', ', $result);\n }", "public function getSynonyms();", "public function getSynonyms(){\n $page = file_get_contents(\"http://wordnetweb.princeton.edu/perl/webwn?s=\" . $this->word);\n preg_match_all(\"/\\;s=([a-z]+)/\", $page, $matches);\n if(isset($matches[1])){\n return array_unique($matches[1]);\n }\n return array($this->word);\n }", "function getSearchTerms()\n {\n $searchTerms = \"\";\n $continuation = \"\";\n\n foreach ($this->queryArray as $element => $value) {\n $searchTerms .= $continuation . (($element != \"q\") ? (ucfirst($element) . \" \") : \"\") . \"<strong>$value</strong>\";\n $continuation = \" and \";\n }\n\n return $searchTerms;\n }", "protected function generateQueryPart()\n\n {\n $query_part =[['bool'=>[\"must\"=> [\n ['multi_match' => [\n 'query' => $this->query,\n 'fields' => $this->searchFields,\n 'operator' => 'and',\n 'type' => $this->queryType]],\n\n [\"constant_score\" => [\n \"filter\" =>[\n \"missing\" => [ \"field\"=>\"datasetDistributions.primary\" ]\n ]]\n ]]]]]\n ;\n //$expan_query = $this->getSynonyms();\n //$expan_query=[];\n\n if(sizeof($this->synonymsArray)==0){\n return $query_part;\n }\n $all_synsquery = ['bool'=>['must'=>[]]];\n foreach(array_keys($this->synonymsArray) as $key){\n $synmquery = ['bool'=>['should'=>[]]];\n foreach ($this->synonymsArray[$key] as $query ) {\n array_push($synmquery['bool']['should'], ['bool'=>[\"must\"=> [\n ['multi_match' => [\n 'query' => $query,\n 'fields' => $this->searchFields,\n 'operator' => 'and',\n ]],\n\n [\"constant_score\" => [\n \"filter\" =>[\n \"missing\" => [ \"field\"=>\"datasetDistributions.primary\" ]\n ]]\n ]]]]);\n }\n array_push($all_synsquery['bool']['must'],$synmquery);\n }\n\n array_push($query_part,$all_synsquery);\n return $query_part;\n }", "public function exportSynonymList()\n {\n $result = array();\n $this->addFieldToFilter('synonym_for', array('notnull' => true));\n $this->addFieldToSelect(array('query_text', 'synonym_for'));\n $adapter = $this->getConnection();\n $data = $adapter->fetchAll($this->getSelect());\n foreach ($data as $currentTerm) {\n $currentTerm['synonym_for'] = sprintf('%s, %s', $currentTerm['query_text'], $currentTerm['synonym_for']);\n $result[] = sprintf(\"%s => %s\", $currentTerm['query_text'], $currentTerm['synonym_for']);\n }\n\n return $result;\n }", "function db_synonyms_popup() {\n\tglobal $DB, $CFG;\n\t$start_time = microtime(true);\n\techo 'STARTING PROCESS: <br/><br/>';\n\t//$words = $DB->get_records('wn_word');\n\t\n\t//$sql = 'SELECT * FROM ' . $CFG->prefix . 'wn_word2 WHERE lemma NOT IN (SELECT lemma FROM ' . $CFG->prefix . 'wn_synonyms' . ')';\n\t//$sql = 'SELECT * FROM ' . $CFG->prefix . 'wn_word2';\n\t$sql = 'SELECT * FROM ' . $CFG->prefix . 'wn_word WHERE lemma NOT IN (SELECT lemma FROM ' . $CFG->prefix . 'wn_synonyms' . ')';\t\n\t$words = $DB->get_records_sql($sql);\n\t//$i = 0;\n\tforeach ($words as $word) {\n\t\ttry {\n\t\t\n\t\t/*\n\t\tif ($DB->record_exists('wn_synonyms', array ('lemma' => $word->lemma))) {\n\t\t\tcontinue;\n\t\t} */\n\t\t\n\t\t$wobj = new Word();\n\t\t$wobj->original = $word->lemma;\n\t\t$wobj->modified = $wobj->original;\n\t\t$syn = get_synonyms($wobj);\n\t\t$synonyms = \"\"; // string of synonyms\n\t\t$first = true;\n\t\tforeach ($syn as $s) {\n\t\t\t$str = strtolower($s);\n\t\t\tif ($first) {\n\t\t\t\t$first = false;\n\t\t\t\t$synonyms .= $str;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$synonyms .= '|' . $str;\n\t\t\t}\n\t\t\t//$i++;\n\t\t\t//echo 'Processed ' . $i . ' words! Last was: ' . $word->lemma . '<br/>'; \n\t\t}\n\t\t\n\t\t$store = new stdClass();\n\t\t$store->wordno = $word->wordno;\n\t\t$store->lemma = $word->lemma;\n\t\t$store->synonyms = $synonyms;\n\t\t$DB->insert_record('wn_synonyms', $store);\n\t\t}\n\t\tcatch (Exception $e) {\n\t\t\techo 'Exception ' . $e->getMessage() . '<br/>';\n\t\t\tcontinue;\t\n\t\t}\n\t}\n\t\n\techo '<br/>PROCESS DONE IN: ' . (microtime(true) - $start_time) . ' seconds<br/>';\n}", "public function genSearchWords($query)\n {\n preg_match_all('/([a-zа-яё]+)/ui', mb_strtoupper($query, \"UTF-8\"), $search_words);\n $words = $this->morphy->getPseudoRoot($search_words[1], $type = 'IGNORE_PREDICT');\n $s_words = [];\n\n foreach ($words as $k => $w) {\n if (!$w) {\n $w[0] = $k;\n }\n if (mb_strlen($w[0], \"UTF-8\") > 2) {\n $s_words[] = $w[0];\n }\n }\n\n $request = implode('* ', $s_words) . '*';\n return $request;\n }", "abstract public function getSpellingSuggestions();", "function getFTIwords() {\n\t\t$bits = $this->words;\n\t\tforeach ($this->phrases as $p) {\n\t\t\t$bits[] = '('.implode ('&', explode (' ', $p)).')';\n\t\t}\n\t\tif ($this->isExact) {\n\t\t\t$query = implode('&', $bits);\n\t\t} else {\n\t\t\t$query = implode('|', $bits);\n\t\t}\n\t\treturn $query;\n\t}", "static function getSynonyms( $aTerm ) {\r\n\t\t\tswitch ( $aTerm ) {\r\n\t\t\t\tcase 'aaldenberg': return array( 'aldenberg' );\r\n\t\t\t\tcase 'aalders': return array( 'alders','aldershof' );\r\n\t\t\t\tcase 'aalmers': return array( 'aylmer' );\r\n\t\t\t\tcase 'aaltink': return array( 'alduino' );\r\n\t\t\t\tcase 'aarens': return array( 'arnesen' );\r\n\t\t\t\tcase 'aarts': return array( 'aartsen','aartsma','arts','artz' );\r\n\t\t\t\tcase 'aartsen': return array( 'aarts' );\r\n\t\t\t\tcase 'aartsma': return array( 'aarts' );\r\n\t\t\t\tcase 'abatangelo': return array( 'abbatangelo' );\r\n\t\t\t\tcase 'abatantuono': return array( 'abbatantuono' );\r\n\t\t\t\tcase 'abate': return array( 'abbate' );\r\n\t\t\t\tcase 'abategiovanni': return array( 'abatescianni' );\r\n\t\t\t\tcase 'abatescianni': return array( 'abategiovanni' );\r\n\t\t\t\tcase 'abba': return array( 'abbà' );\r\n\t\t\t\tcase 'abbadelli': return array( 'abbatelli' );\r\n\t\t\t\tcase 'abbatangelo': return array( 'abatangelo' );\r\n\t\t\t\tcase 'abbatantuono': return array( 'abatantuono' );\r\n\t\t\t\tcase 'abbate': return array( 'abate','abbott','abt' );\r\n\t\t\t\tcase 'abbatelli': return array( 'abbadelli' );\r\n\t\t\t\tcase 'abbing': return array( 'abbingh','abbink' );\r\n\t\t\t\tcase 'abbingh': return array( 'abbing' );\r\n\t\t\t\tcase 'abbink': return array( 'abbing' );\r\n\t\t\t\tcase 'abbott': return array( 'abbate' );\r\n\t\t\t\tcase 'abbà': return array( 'abba' );\r\n\t\t\t\tcase 'abel': return array( 'abelli' );\r\n\t\t\t\tcase 'abelen': return array( 'abeln' );\r\n\t\t\t\tcase 'abelli': return array( 'abel' );\r\n\t\t\t\tcase 'abello': return array( 'abelló' );\r\n\t\t\t\tcase 'abelló': return array( 'abello' );\r\n\t\t\t\tcase 'abeln': return array( 'abelen' );\r\n\t\t\t\tcase 'abraham': return array( 'abrahams','abrahamsen','abrahamson','abrahamsson','abram','abrami','abramo','abrams','abramsen','abramson','abramsson','avraham' );\r\n\t\t\t\tcase 'abrahams': return array( 'abraham' );\r\n\t\t\t\tcase 'abrahamsen': return array( 'abraham' );\r\n\t\t\t\tcase 'abrahamson': return array( 'abraham' );\r\n\t\t\t\tcase 'abrahamsson': return array( 'abraham' );\r\n\t\t\t\tcase 'abram': return array( 'abraham' );\r\n\t\t\t\tcase 'abrami': return array( 'abraham' );\r\n\t\t\t\tcase 'abramo': return array( 'abraham' );\r\n\t\t\t\tcase 'abrams': return array( 'abraham' );\r\n\t\t\t\tcase 'abramsen': return array( 'abraham' );\r\n\t\t\t\tcase 'abramson': return array( 'abraham' );\r\n\t\t\t\tcase 'abramsson': return array( 'abraham' );\r\n\t\t\t\tcase 'abt': return array( 'abbate' );\r\n\t\t\t\tcase 'acardi': return array( 'accardi' );\r\n\t\t\t\tcase 'accardi': return array( 'acardi','accardo' );\r\n\t\t\t\tcase 'accardo': return array( 'accardi' );\r\n\t\t\t\tcase 'acciai': return array( 'acciaio' );\r\n\t\t\t\tcase 'acciaio': return array( 'acciai' );\r\n\t\t\t\tcase 'acconci': return array( 'acconcio' );\r\n\t\t\t\tcase 'acconcio': return array( 'acconci' );\r\n\t\t\t\tcase 'accorsi': return array( 'accorso' );\r\n\t\t\t\tcase 'accorso': return array( 'accorsi','accursio' );\r\n\t\t\t\tcase 'accursio': return array( 'accorso' );\r\n\t\t\t\tcase 'achthoven': return array( 'agthoven' );\r\n\t\t\t\tcase 'acker': return array( 'akker' );\r\n\t\t\t\tcase 'ackerman': return array( 'akerman' );\r\n\t\t\t\tcase 'ackermann': return array( 'akkerman' );\r\n\t\t\t\tcase 'adam': return array( 'adamić','ádám' );\r\n\t\t\t\tcase 'adamczak': return array( 'adamczyk' );\r\n\t\t\t\tcase 'adamczyk': return array( 'adamczak','adamik','adams','adamsen','adamson','adamsson','adamík' );\r\n\t\t\t\tcase 'adami': return array( 'adamić' );\r\n\t\t\t\tcase 'adamik': return array( 'adamczyk','adamík' );\r\n\t\t\t\tcase 'adamić': return array( 'adam','adami','adamo' );\r\n\t\t\t\tcase 'adamo': return array( 'adamić' );\r\n\t\t\t\tcase 'adams': return array( 'adamczyk' );\r\n\t\t\t\tcase 'adamsen': return array( 'adamczyk' );\r\n\t\t\t\tcase 'adamson': return array( 'adamczyk' );\r\n\t\t\t\tcase 'adamsson': return array( 'adamczyk' );\r\n\t\t\t\tcase 'adamík': return array( 'adamczyk','adamik' );\r\n\t\t\t\tcase 'adcock': return array( 'atchison' );\r\n\t\t\t\tcase 'addison': return array( 'adkins','aitken','atkins','atkinson' );\r\n\t\t\t\tcase 'adkins': return array( 'addison' );\r\n\t\t\t\tcase 'adolfs': return array( 'adolfsson','adolvsson' );\r\n\t\t\t\tcase 'adolfsson': return array( 'adolfs' );\r\n\t\t\t\tcase 'adolvsson': return array( 'adolfs' );\r\n\t\t\t\tcase 'adriaans': return array( 'adriaansen' );\r\n\t\t\t\tcase 'adriaansen': return array( 'adriaans' );\r\n\t\t\t\tcase 'aerssens': return array( 'arkema' );\r\n\t\t\t\tcase 'africani': return array( 'africano' );\r\n\t\t\t\tcase 'africano': return array( 'africani' );\r\n\t\t\t\tcase 'agema': return array( 'aikema' );\r\n\t\t\t\tcase 'agnelli': return array( 'agnellini' );\r\n\t\t\t\tcase 'agnellini': return array( 'agnelli' );\r\n\t\t\t\tcase 'agocs': return array( 'agócs' );\r\n\t\t\t\tcase 'agosti': return array( 'agostini','augustin','augustine' );\r\n\t\t\t\tcase 'agostini': return array( 'agosti' );\r\n\t\t\t\tcase 'agthoven': return array( 'achthoven' );\r\n\t\t\t\tcase 'agócs': return array( 'agocs' );\r\n\t\t\t\tcase 'ahearn': return array( 'ahearne' );\r\n\t\t\t\tcase 'ahearne': return array( 'ahearn' );\r\n\t\t\t\tcase 'ahlstroem': return array( 'ahlström' );\r\n\t\t\t\tcase 'ahlstrom': return array( 'ahlström' );\r\n\t\t\t\tcase 'ahlström': return array( 'ahlstroem','ahlstrom' );\r\n\t\t\t\tcase 'ahmad': return array( 'ahmed' );\r\n\t\t\t\tcase 'ahmed': return array( 'ahmad' );\r\n\t\t\t\tcase 'aikema': return array( 'agema' );\r\n\t\t\t\tcase 'airo': return array( 'airò' );\r\n\t\t\t\tcase 'airò': return array( 'airo' );\r\n\t\t\t\tcase 'aitken': return array( 'addison' );\r\n\t\t\t\tcase 'akerman': return array( 'ackerman','åkerman' );\r\n\t\t\t\tcase 'akker': return array( 'acker' );\r\n\t\t\t\tcase 'akkerman': return array( 'ackermann','akkermans' );\r\n\t\t\t\tcase 'akkermans': return array( 'akkerman' );\r\n\t\t\t\tcase 'akselsen': return array( 'axelsen','axelsson' );\r\n\t\t\t\tcase 'alan': return array( 'allan','allen' );\r\n\t\t\t\tcase 'albani': return array( 'albano' );\r\n\t\t\t\tcase 'albano': return array( 'albani' );\r\n\t\t\t\tcase 'alberda': return array( 'alberdingk','alberink','albers','albert','alberts','albertsen','albertson','albertsson','albrecht','albrechtsson','albrecktsson','albrektson','albrektsson','albring','alfero','aliberti' );\r\n\t\t\t\tcase 'alberdingk': return array( 'alberda' );\r\n\t\t\t\tcase 'alberghi': return array( 'alberghini','alberici','alberighi','albricci','albrici','alferink' );\r\n\t\t\t\tcase 'alberghini': return array( 'alberghi' );\r\n\t\t\t\tcase 'alberici': return array( 'alberghi' );\r\n\t\t\t\tcase 'alberighi': return array( 'alberghi' );\r\n\t\t\t\tcase 'alberink': return array( 'alberda' );\r\n\t\t\t\tcase 'albers': return array( 'alberda' );\r\n\t\t\t\tcase 'albert': return array( 'alberda' );\r\n\t\t\t\tcase 'alberts': return array( 'alberda' );\r\n\t\t\t\tcase 'albertsen': return array( 'alberda' );\r\n\t\t\t\tcase 'albertson': return array( 'alberda' );\r\n\t\t\t\tcase 'albertsson': return array( 'alberda' );\r\n\t\t\t\tcase 'albini': return array( 'albinson' );\r\n\t\t\t\tcase 'albinson': return array( 'albini','albinsson' );\r\n\t\t\t\tcase 'albinsson': return array( 'albinson' );\r\n\t\t\t\tcase 'albrecht': return array( 'alberda' );\r\n\t\t\t\tcase 'albrechtsson': return array( 'alberda' );\r\n\t\t\t\tcase 'albrecktsson': return array( 'alberda' );\r\n\t\t\t\tcase 'albrektson': return array( 'alberda' );\r\n\t\t\t\tcase 'albrektsson': return array( 'alberda' );\r\n\t\t\t\tcase 'albricci': return array( 'alberghi' );\r\n\t\t\t\tcase 'albrici': return array( 'alberghi' );\r\n\t\t\t\tcase 'albring': return array( 'alberda' );\r\n\t\t\t\tcase 'aldebrandi': return array( 'altoviti' );\r\n\t\t\t\tcase 'aldenberg': return array( 'aaldenberg' );\r\n\t\t\t\tcase 'alders': return array( 'aalders' );\r\n\t\t\t\tcase 'aldershof': return array( 'aalders' );\r\n\t\t\t\tcase 'alduino': return array( 'aaltink','alting','altink' );\r\n\t\t\t\tcase 'aleksandrov': return array( 'alexandersen' );\r\n\t\t\t\tcase 'alesci': return array( 'alescio' );\r\n\t\t\t\tcase 'alescio': return array( 'alesci','alesi','alesio','alessi' );\r\n\t\t\t\tcase 'aleshire': return array( 'alscher' );\r\n\t\t\t\tcase 'alesi': return array( 'alescio' );\r\n\t\t\t\tcase 'alesini': return array( 'alexandersen' );\r\n\t\t\t\tcase 'alesio': return array( 'alescio' );\r\n\t\t\t\tcase 'alessandri': return array( 'alexandersen' );\r\n\t\t\t\tcase 'alessi': return array( 'alescio' );\r\n\t\t\t\tcase 'alexander': return array( 'alexandersen' );\r\n\t\t\t\tcase 'alexandersen': return array( 'aleksandrov','alesini','alessandri','alexander','alexanderson','alexandersson','alexandrescu' );\r\n\t\t\t\tcase 'alexanderson': return array( 'alexandersen' );\r\n\t\t\t\tcase 'alexandersson': return array( 'alexandersen' );\r\n\t\t\t\tcase 'alexandrescu': return array( 'alexandersen' );\r\n\t\t\t\tcase 'alferink': return array( 'alberghi' );\r\n\t\t\t\tcase 'alfero': return array( 'alberda' );\r\n\t\t\t\tcase 'alfredson': return array( 'alfredsson' );\r\n\t\t\t\tcase 'alfredsson': return array( 'alfredson' );\r\n\t\t\t\tcase 'alfson': return array( 'alfsson' );\r\n\t\t\t\tcase 'alfsson': return array( 'alfson','alves' );\r\n\t\t\t\tcase 'aliberti': return array( 'alberda' );\r\n\t\t\t\tcase 'aling': return array( 'alink' );\r\n\t\t\t\tcase 'alink': return array( 'aling' );\r\n\t\t\t\tcase 'allan': return array( 'alan' );\r\n\t\t\t\tcase 'allegri': return array( 'allegro' );\r\n\t\t\t\tcase 'allegro': return array( 'allegri' );\r\n\t\t\t\tcase 'allen': return array( 'alan' );\r\n\t\t\t\tcase 'almassy': return array( 'almássy' );\r\n\t\t\t\tcase 'almássy': return array( 'almassy' );\r\n\t\t\t\tcase 'alo': return array( 'aloia','alò' );\r\n\t\t\t\tcase 'aloi': return array( 'aloia' );\r\n\t\t\t\tcase 'aloia': return array( 'alo','aloi','alò' );\r\n\t\t\t\tcase 'alscher': return array( 'aleshire' );\r\n\t\t\t\tcase 'althaus': return array( 'althuis' );\r\n\t\t\t\tcase 'althuis': return array( 'althaus' );\r\n\t\t\t\tcase 'alting': return array( 'alduino' );\r\n\t\t\t\tcase 'altink': return array( 'alduino' );\r\n\t\t\t\tcase 'altoviti': return array( 'aldebrandi' );\r\n\t\t\t\tcase 'alvarez': return array( 'álvarez' );\r\n\t\t\t\tcase 'alves': return array( 'alfsson' );\r\n\t\t\t\tcase 'alò': return array( 'alo','aloia' );\r\n\t\t\t\tcase 'amador': return array( 'amadori','amatore' );\r\n\t\t\t\tcase 'amadori': return array( 'amador' );\r\n\t\t\t\tcase 'amatore': return array( 'amador' );\r\n\t\t\t\tcase 'ambrogi': return array( 'ambrosi' );\r\n\t\t\t\tcase 'ambrosi': return array( 'ambrogi' );\r\n\t\t\t\tcase 'andersen': return array( 'anderson','andersson','andre','andreas','andreasen','andreasson','andreev','andres','andreu','andrews','andrewson','andries','andriessen','andringa','andrysiak','andré','andréasson','andrés' );\r\n\t\t\t\tcase 'anderson': return array( 'andersen' );\r\n\t\t\t\tcase 'andersson': return array( 'andersen' );\r\n\t\t\t\tcase 'andonov': return array( 'anthonyson' );\r\n\t\t\t\tcase 'andre': return array( 'andersen','andré' );\r\n\t\t\t\tcase 'andreas': return array( 'andersen' );\r\n\t\t\t\tcase 'andreasen': return array( 'andersen' );\r\n\t\t\t\tcase 'andreasson': return array( 'andersen','andréasson' );\r\n\t\t\t\tcase 'andreev': return array( 'andersen' );\r\n\t\t\t\tcase 'andres': return array( 'andersen' );\r\n\t\t\t\tcase 'andreu': return array( 'andersen' );\r\n\t\t\t\tcase 'andrews': return array( 'andersen' );\r\n\t\t\t\tcase 'andrewson': return array( 'andersen' );\r\n\t\t\t\tcase 'andries': return array( 'andersen' );\r\n\t\t\t\tcase 'andriessen': return array( 'andersen' );\r\n\t\t\t\tcase 'andringa': return array( 'andersen' );\r\n\t\t\t\tcase 'andrysiak': return array( 'andersen' );\r\n\t\t\t\tcase 'andré': return array( 'andersen','andre' );\r\n\t\t\t\tcase 'andréasson': return array( 'andersen','andreasson' );\r\n\t\t\t\tcase 'andrés': return array( 'andersen','andres' );\r\n\t\t\t\tcase 'anema': return array( 'annema' );\r\n\t\t\t\tcase 'angelov': return array( 'anghelescu','angioli' );\r\n\t\t\t\tcase 'anghelescu': return array( 'angelov' );\r\n\t\t\t\tcase 'angioli': return array( 'angelov' );\r\n\t\t\t\tcase 'annema': return array( 'anema' );\r\n\t\t\t\tcase 'ansaldi': return array( 'ansel' );\r\n\t\t\t\tcase 'ansel': return array( 'ansaldi','anselmetti','anselmi' );\r\n\t\t\t\tcase 'anselmetti': return array( 'ansel' );\r\n\t\t\t\tcase 'anselmi': return array( 'ansel' );\r\n\t\t\t\tcase 'antal': return array( 'antall' );\r\n\t\t\t\tcase 'antall': return array( 'antal' );\r\n\t\t\t\tcase 'antema': return array( 'antuma' );\r\n\t\t\t\tcase 'anthonsen': return array( 'anthonyson' );\r\n\t\t\t\tcase 'anthonyson': return array( 'andonov','anthonsen','antonelli','antonescu','antonini','antonino','antoniou','antonis','antonise','antonisen','antonov','antonsen','antunez','antúnez' );\r\n\t\t\t\tcase 'antonelli': return array( 'anthonyson' );\r\n\t\t\t\tcase 'antonescu': return array( 'anthonyson' );\r\n\t\t\t\tcase 'antonini': return array( 'anthonyson' );\r\n\t\t\t\tcase 'antonino': return array( 'anthonyson' );\r\n\t\t\t\tcase 'antoniou': return array( 'anthonyson' );\r\n\t\t\t\tcase 'antonis': return array( 'anthonyson' );\r\n\t\t\t\tcase 'antonise': return array( 'anthonyson' );\r\n\t\t\t\tcase 'antonisen': return array( 'anthonyson' );\r\n\t\t\t\tcase 'antonov': return array( 'anthonyson' );\r\n\t\t\t\tcase 'antonsen': return array( 'anthonyson' );\r\n\t\t\t\tcase 'antuma': return array( 'antema' );\r\n\t\t\t\tcase 'antunez': return array( 'anthonyson','antúnez' );\r\n\t\t\t\tcase 'antúnez': return array( 'anthonyson','antunez' );\r\n\t\t\t\tcase 'apeldoorn': return array( 'appeldoorn' );\r\n\t\t\t\tcase 'appeldoorn': return array( 'apeldoorn' );\r\n\t\t\t\tcase 'araujo': return array( 'araújo' );\r\n\t\t\t\tcase 'araújo': return array( 'araujo' );\r\n\t\t\t\tcase 'ardiccioni': return array( 'ardizzone' );\r\n\t\t\t\tcase 'ardizzone': return array( 'ardiccioni' );\r\n\t\t\t\tcase 'arends': return array( 'arendse' );\r\n\t\t\t\tcase 'arendse': return array( 'arends','arendsen','arents','arentz','arntz','arntzen','arntzenius' );\r\n\t\t\t\tcase 'arendsen': return array( 'arendse' );\r\n\t\t\t\tcase 'arents': return array( 'arendse' );\r\n\t\t\t\tcase 'arentz': return array( 'arendse' );\r\n\t\t\t\tcase 'ariesen': return array( 'arissen' );\r\n\t\t\t\tcase 'arissen': return array( 'ariesen' );\r\n\t\t\t\tcase 'arkema': return array( 'aerssens' );\r\n\t\t\t\tcase 'armando': return array( 'armani' );\r\n\t\t\t\tcase 'armani': return array( 'armando' );\r\n\t\t\t\tcase 'armannsson': return array( 'ármannsson' );\r\n\t\t\t\tcase 'armbruester': return array( 'armbrüster' );\r\n\t\t\t\tcase 'armbruster': return array( 'armbrüster' );\r\n\t\t\t\tcase 'armbrüster': return array( 'armbruester','armbruster' );\r\n\t\t\t\tcase 'arnesen': return array( 'aarens' );\r\n\t\t\t\tcase 'arnold': return array( 'arnolfi' );\r\n\t\t\t\tcase 'arnolfi': return array( 'arnold' );\r\n\t\t\t\tcase 'arntz': return array( 'arendse' );\r\n\t\t\t\tcase 'arntzen': return array( 'arendse' );\r\n\t\t\t\tcase 'arntzenius': return array( 'arendse' );\r\n\t\t\t\tcase 'arreola': return array( 'arriola' );\r\n\t\t\t\tcase 'arriola': return array( 'arreola' );\r\n\t\t\t\tcase 'arterberry': return array( 'arterbury' );\r\n\t\t\t\tcase 'arterbury': return array( 'arterberry' );\r\n\t\t\t\tcase 'arthur': return array( 'arthurson','arthursson' );\r\n\t\t\t\tcase 'arthurson': return array( 'arthur' );\r\n\t\t\t\tcase 'arthursson': return array( 'arthur' );\r\n\t\t\t\tcase 'arts': return array( 'aarts' );\r\n\t\t\t\tcase 'artz': return array( 'aarts' );\r\n\t\t\t\tcase 'arud': return array( 'årud' );\r\n\t\t\t\tcase 'asis': return array( 'asís' );\r\n\t\t\t\tcase 'asjes': return array( 'askes' );\r\n\t\t\t\tcase 'askes': return array( 'asjes','assies' );\r\n\t\t\t\tcase 'assies': return array( 'askes' );\r\n\t\t\t\tcase 'asís': return array( 'asis' );\r\n\t\t\t\tcase 'atchison': return array( 'adcock' );\r\n\t\t\t\tcase 'atkins': return array( 'addison' );\r\n\t\t\t\tcase 'atkinson': return array( 'addison' );\r\n\t\t\t\tcase 'atteberry': return array( 'auteberry' );\r\n\t\t\t\tcase 'attwater': return array( 'atwater' );\r\n\t\t\t\tcase 'attwood': return array( 'atwood' );\r\n\t\t\t\tcase 'atwater': return array( 'attwater' );\r\n\t\t\t\tcase 'atwood': return array( 'attwood' );\r\n\t\t\t\tcase 'augustin': return array( 'agosti' );\r\n\t\t\t\tcase 'augustine': return array( 'agosti' );\r\n\t\t\t\tcase 'auteberry': return array( 'atteberry' );\r\n\t\t\t\tcase 'avagyan': return array( 'avakian' );\r\n\t\t\t\tcase 'avakian': return array( 'avagyan' );\r\n\t\t\t\tcase 'avraham': return array( 'abraham' );\r\n\t\t\t\tcase 'axelsen': return array( 'akselsen' );\r\n\t\t\t\tcase 'axelsson': return array( 'akselsen' );\r\n\t\t\t\tcase 'aylmer': return array( 'aalmers' );\r\n\t\t\t\tcase 'azzara': return array( 'azzarà' );\r\n\t\t\t\tcase 'azzarà': return array( 'azzara' );\r\n\t\t\t\tcase 'baanders': return array( 'banderas' );\r\n\t\t\t\tcase 'baarda': return array( 'berti' );\r\n\t\t\t\tcase 'babić': return array( 'babič' );\r\n\t\t\t\tcase 'babič': return array( 'babić' );\r\n\t\t\t\tcase 'bach': return array( 'beck','becke' );\r\n\t\t\t\tcase 'bachman': return array( 'bachmann' );\r\n\t\t\t\tcase 'bachmann': return array( 'bachman' );\r\n\t\t\t\tcase 'bachvarov': return array( 'buchvarov' );\r\n\t\t\t\tcase 'backer': return array( 'becker','bäcker' );\r\n\t\t\t\tcase 'baecker': return array( 'becker','bäcker' );\r\n\t\t\t\tcase 'baehr': return array( 'bähr' );\r\n\t\t\t\tcase 'bager': return array( 'baker','bakker' );\r\n\t\t\t\tcase 'baggi': return array( 'baggio' );\r\n\t\t\t\tcase 'baggio': return array( 'baggi' );\r\n\t\t\t\tcase 'baghdasaryan': return array( 'baghdassarian' );\r\n\t\t\t\tcase 'baghdassarian': return array( 'baghdasaryan' );\r\n\t\t\t\tcase 'bagley': return array( 'beasley','buckley' );\r\n\t\t\t\tcase 'bahr': return array( 'bähr' );\r\n\t\t\t\tcase 'baier': return array( 'bayer','beyer' );\r\n\t\t\t\tcase 'bain': return array( 'bone' );\r\n\t\t\t\tcase 'baines': return array( 'banes' );\r\n\t\t\t\tcase 'baker': return array( 'bager' );\r\n\t\t\t\tcase 'bakker': return array( 'bager' );\r\n\t\t\t\tcase 'bako': return array( 'bakó' );\r\n\t\t\t\tcase 'bakó': return array( 'bako' );\r\n\t\t\t\tcase 'balazs': return array( 'balázs','blažek' );\r\n\t\t\t\tcase 'baldini': return array( 'baldinotti' );\r\n\t\t\t\tcase 'baldinotti': return array( 'baldini','baldwin' );\r\n\t\t\t\tcase 'baldwin': return array( 'baldinotti' );\r\n\t\t\t\tcase 'balint': return array( 'bálint' );\r\n\t\t\t\tcase 'balog': return array( 'balogh' );\r\n\t\t\t\tcase 'balogh': return array( 'balog' );\r\n\t\t\t\tcase 'balázs': return array( 'balazs','blažek' );\r\n\t\t\t\tcase 'bambach': return array( 'baumbach' );\r\n\t\t\t\tcase 'banderas': return array( 'baanders' );\r\n\t\t\t\tcase 'banes': return array( 'baines' );\r\n\t\t\t\tcase 'banik': return array( 'baník' );\r\n\t\t\t\tcase 'banister': return array( 'bannister' );\r\n\t\t\t\tcase 'bannister': return array( 'banister' );\r\n\t\t\t\tcase 'baník': return array( 'banik' );\r\n\t\t\t\tcase 'barany': return array( 'bárány' );\r\n\t\t\t\tcase 'barath': return array( 'baráth' );\r\n\t\t\t\tcase 'barber': return array( 'barbieri' );\r\n\t\t\t\tcase 'barbieri': return array( 'barber' );\r\n\t\t\t\tcase 'bardakci': return array( 'bardakçi' );\r\n\t\t\t\tcase 'bardakçi': return array( 'bardakci' );\r\n\t\t\t\tcase 'barends': return array( 'behrend' );\r\n\t\t\t\tcase 'barnet': return array( 'barnett' );\r\n\t\t\t\tcase 'barnett': return array( 'barnet' );\r\n\t\t\t\tcase 'barr': return array( 'barre' );\r\n\t\t\t\tcase 'barre': return array( 'barr' );\r\n\t\t\t\tcase 'barret': return array( 'barrett' );\r\n\t\t\t\tcase 'barrett': return array( 'barret' );\r\n\t\t\t\tcase 'barsotti': return array( 'barzetti' );\r\n\t\t\t\tcase 'barta': return array( 'bartha','bárta' );\r\n\t\t\t\tcase 'bartalotti': return array( 'bartolomeo' );\r\n\t\t\t\tcase 'bartha': return array( 'barta','bartoš','bárta' );\r\n\t\t\t\tcase 'bartolomei': return array( 'bartolomeo' );\r\n\t\t\t\tcase 'bartolomeo': return array( 'bartalotti','bartolomei' );\r\n\t\t\t\tcase 'bartos': return array( 'bartosz' );\r\n\t\t\t\tcase 'bartosz': return array( 'bartos' );\r\n\t\t\t\tcase 'bartoš': return array( 'bartha' );\r\n\t\t\t\tcase 'bartram': return array( 'bertrand' );\r\n\t\t\t\tcase 'barzetti': return array( 'barsotti' );\r\n\t\t\t\tcase 'baráth': return array( 'barath' );\r\n\t\t\t\tcase 'bass': return array( 'bassi' );\r\n\t\t\t\tcase 'bassi': return array( 'bass','basso' );\r\n\t\t\t\tcase 'basso': return array( 'bassi' );\r\n\t\t\t\tcase 'bates': return array( 'batts' );\r\n\t\t\t\tcase 'bathory': return array( 'báthory' );\r\n\t\t\t\tcase 'batori': return array( 'bátori' );\r\n\t\t\t\tcase 'batts': return array( 'bates' );\r\n\t\t\t\tcase 'bauer': return array( 'boer','buhr' );\r\n\t\t\t\tcase 'baumbach': return array( 'bambach' );\r\n\t\t\t\tcase 'baumer': return array( 'beumer' );\r\n\t\t\t\tcase 'baumgaertner': return array( 'baumgartner','baumgärtner' );\r\n\t\t\t\tcase 'baumgarten': return array( 'baumgartner' );\r\n\t\t\t\tcase 'baumgartner': return array( 'baumgaertner','baumgarten','baumgärtner','bumgarner' );\r\n\t\t\t\tcase 'baumgärtner': return array( 'baumgaertner','baumgartner' );\r\n\t\t\t\tcase 'bayer': return array( 'baier' );\r\n\t\t\t\tcase 'beake': return array( 'beck' );\r\n\t\t\t\tcase 'bean': return array( 'bohn','boon' );\r\n\t\t\t\tcase 'beasley': return array( 'bagley' );\r\n\t\t\t\tcase 'beattie': return array( 'beatty' );\r\n\t\t\t\tcase 'beatty': return array( 'beattie' );\r\n\t\t\t\tcase 'beck': return array( 'bach','beake' );\r\n\t\t\t\tcase 'becke': return array( 'bach' );\r\n\t\t\t\tcase 'becker': return array( 'backer','baecker','bäcker' );\r\n\t\t\t\tcase 'becket': return array( 'beckett' );\r\n\t\t\t\tcase 'beckett': return array( 'becket' );\r\n\t\t\t\tcase 'behrend': return array( 'barends','behrends','bernat' );\r\n\t\t\t\tcase 'behrends': return array( 'behrend' );\r\n\t\t\t\tcase 'behringer': return array( 'beranger','beringer','béranger','béringer' );\r\n\t\t\t\tcase 'beirne': return array( 'berne' );\r\n\t\t\t\tcase 'beitel': return array( 'beutel' );\r\n\t\t\t\tcase 'belanger': return array( 'bélanger' );\r\n\t\t\t\tcase 'bellandi': return array( 'bellandini' );\r\n\t\t\t\tcase 'bellandini': return array( 'bellandi' );\r\n\t\t\t\tcase 'bellerose': return array( 'belrose' );\r\n\t\t\t\tcase 'bello': return array( 'belo' );\r\n\t\t\t\tcase 'bellomi': return array( 'bellomo' );\r\n\t\t\t\tcase 'bellomo': return array( 'bellomi','belluomo' );\r\n\t\t\t\tcase 'belluomo': return array( 'bellomo' );\r\n\t\t\t\tcase 'belmont': return array( 'belmonte' );\r\n\t\t\t\tcase 'belmonte': return array( 'belmont' );\r\n\t\t\t\tcase 'belo': return array( 'bello' );\r\n\t\t\t\tcase 'belrose': return array( 'bellerose' );\r\n\t\t\t\tcase 'bendtsen': return array( 'benitez','bentsen','benítez' );\r\n\t\t\t\tcase 'beneš': return array( 'benn' );\r\n\t\t\t\tcase 'bengochea': return array( 'bengoechea' );\r\n\t\t\t\tcase 'bengoechea': return array( 'bengochea' );\r\n\t\t\t\tcase 'bengtsdotter': return array( 'bengtsson' );\r\n\t\t\t\tcase 'bengtsson': return array( 'bengtsdotter' );\r\n\t\t\t\tcase 'benitez': return array( 'bendtsen','benítez' );\r\n\t\t\t\tcase 'benn': return array( 'beneš' );\r\n\t\t\t\tcase 'bennet': return array( 'bennett' );\r\n\t\t\t\tcase 'bennett': return array( 'bennet' );\r\n\t\t\t\tcase 'benscoter': return array( 'bunschoten' );\r\n\t\t\t\tcase 'bentsen': return array( 'bendtsen' );\r\n\t\t\t\tcase 'benítez': return array( 'bendtsen','benitez' );\r\n\t\t\t\tcase 'beranek': return array( 'beránek' );\r\n\t\t\t\tcase 'beranger': return array( 'behringer','béranger' );\r\n\t\t\t\tcase 'bergstroem': return array( 'bergström' );\r\n\t\t\t\tcase 'bergstrom': return array( 'bergström' );\r\n\t\t\t\tcase 'bergström': return array( 'bergstroem','bergstrom' );\r\n\t\t\t\tcase 'beringer': return array( 'behringer' );\r\n\t\t\t\tcase 'bermudez': return array( 'bermúdez' );\r\n\t\t\t\tcase 'bermúdez': return array( 'bermudez' );\r\n\t\t\t\tcase 'bernard': return array( 'bernhard','bernhardsson' );\r\n\t\t\t\tcase 'bernat': return array( 'behrend' );\r\n\t\t\t\tcase 'berne': return array( 'beirne','byrne','o broin','ó broin' );\r\n\t\t\t\tcase 'bernhard': return array( 'bernard' );\r\n\t\t\t\tcase 'bernhardsson': return array( 'bernard' );\r\n\t\t\t\tcase 'berti': return array( 'baarda' );\r\n\t\t\t\tcase 'bertrand': return array( 'bartram' );\r\n\t\t\t\tcase 'beránek': return array( 'beranek' );\r\n\t\t\t\tcase 'beulens': return array( 'boelens','bullens' );\r\n\t\t\t\tcase 'beumer': return array( 'baumer' );\r\n\t\t\t\tcase 'beutel': return array( 'beitel' );\r\n\t\t\t\tcase 'beverley': return array( 'beverly' );\r\n\t\t\t\tcase 'beverly': return array( 'beverley' );\r\n\t\t\t\tcase 'beyer': return array( 'baier' );\r\n\t\t\t\tcase 'bianchi': return array( 'bianco' );\r\n\t\t\t\tcase 'bianco': return array( 'bianchi' );\r\n\t\t\t\tcase 'biondi': return array( 'biondo' );\r\n\t\t\t\tcase 'biondo': return array( 'biondi' );\r\n\t\t\t\tcase 'bird': return array( 'byrd' );\r\n\t\t\t\tcase 'biro': return array( 'bíró' );\r\n\t\t\t\tcase 'bishop': return array( 'biskup' );\r\n\t\t\t\tcase 'biskup': return array( 'bishop' );\r\n\t\t\t\tcase 'bisset': return array( 'bissette' );\r\n\t\t\t\tcase 'bissette': return array( 'bisset' );\r\n\t\t\t\tcase 'bjarnesen': return array( 'bjoernsson','bjornsson','björnsson' );\r\n\t\t\t\tcase 'bjoerk': return array( 'björk' );\r\n\t\t\t\tcase 'bjoerkman': return array( 'björkman' );\r\n\t\t\t\tcase 'bjoernsson': return array( 'bjarnesen','björnsson' );\r\n\t\t\t\tcase 'bjork': return array( 'björk' );\r\n\t\t\t\tcase 'bjorkman': return array( 'björkman' );\r\n\t\t\t\tcase 'bjornsson': return array( 'bjarnesen','björnsson' );\r\n\t\t\t\tcase 'björk': return array( 'bjoerk','bjork' );\r\n\t\t\t\tcase 'björkman': return array( 'bjoerkman','bjorkman' );\r\n\t\t\t\tcase 'björnsson': return array( 'bjarnesen','bjoernsson','bjornsson' );\r\n\t\t\t\tcase 'black': return array( 'blake' );\r\n\t\t\t\tcase 'blackbourne': return array( 'blackburn' );\r\n\t\t\t\tcase 'blackburn': return array( 'blackbourne' );\r\n\t\t\t\tcase 'blaha': return array( 'bláha' );\r\n\t\t\t\tcase 'blaise': return array( 'blažek' );\r\n\t\t\t\tcase 'blake': return array( 'black' );\r\n\t\t\t\tcase 'blakeslee': return array( 'blakesley' );\r\n\t\t\t\tcase 'blakesley': return array( 'blakeslee' );\r\n\t\t\t\tcase 'blanc': return array( 'blanchett' );\r\n\t\t\t\tcase 'blanchard': return array( 'blanxart' );\r\n\t\t\t\tcase 'blanchet': return array( 'blanchett' );\r\n\t\t\t\tcase 'blanchett': return array( 'blanc','blanchet' );\r\n\t\t\t\tcase 'blanxart': return array( 'blanchard' );\r\n\t\t\t\tcase 'blažek': return array( 'balazs','balázs','blaise' );\r\n\t\t\t\tcase 'bloxam': return array( 'bloxham' );\r\n\t\t\t\tcase 'bloxham': return array( 'bloxam' );\r\n\t\t\t\tcase 'bláha': return array( 'blaha' );\r\n\t\t\t\tcase 'boatwright': return array( 'botwright' );\r\n\t\t\t\tcase 'bocker': return array( 'böcker' );\r\n\t\t\t\tcase 'bodnar': return array( 'bodnár' );\r\n\t\t\t\tcase 'bodnár': return array( 'bodnar' );\r\n\t\t\t\tcase 'boecker': return array( 'böcker' );\r\n\t\t\t\tcase 'boehler': return array( 'böhler' );\r\n\t\t\t\tcase 'boehm': return array( 'böhm' );\r\n\t\t\t\tcase 'boehme': return array( 'böhme' );\r\n\t\t\t\tcase 'boehmer': return array( 'böhmer' );\r\n\t\t\t\tcase 'boelens': return array( 'beulens' );\r\n\t\t\t\tcase 'boer': return array( 'bauer' );\r\n\t\t\t\tcase 'boesch': return array( 'bosch','bösch' );\r\n\t\t\t\tcase 'boesch ': return array( 'bösch ' );\r\n\t\t\t\tcase 'boettcher': return array( 'böttcher' );\r\n\t\t\t\tcase 'bogdanić': return array( 'bogdanov' );\r\n\t\t\t\tcase 'bogdanov': return array( 'bogdanić','bogdanović' );\r\n\t\t\t\tcase 'bogdanović': return array( 'bogdanov' );\r\n\t\t\t\tcase 'bognar': return array( 'bognár' );\r\n\t\t\t\tcase 'bognár': return array( 'bognar' );\r\n\t\t\t\tcase 'bohler': return array( 'böhler' );\r\n\t\t\t\tcase 'bohm': return array( 'böhm' );\r\n\t\t\t\tcase 'bohme': return array( 'böhme' );\r\n\t\t\t\tcase 'bohmer': return array( 'böhmer' );\r\n\t\t\t\tcase 'bohn': return array( 'bean' );\r\n\t\t\t\tcase 'bokor': return array( 'bokori' );\r\n\t\t\t\tcase 'bokori': return array( 'bokor' );\r\n\t\t\t\tcase 'bolivar': return array( 'bolívar' );\r\n\t\t\t\tcase 'bolívar': return array( 'bolivar' );\r\n\t\t\t\tcase 'bonaccorsi': return array( 'bonaccorso' );\r\n\t\t\t\tcase 'bonaccorso': return array( 'bonaccorsi' );\r\n\t\t\t\tcase 'bone': return array( 'bain','boone' );\r\n\t\t\t\tcase 'bonham': return array( 'bonhomme','bonomo' );\r\n\t\t\t\tcase 'bonhomme': return array( 'bonham' );\r\n\t\t\t\tcase 'bonnaire': return array( 'bonner' );\r\n\t\t\t\tcase 'bonner': return array( 'bonnaire' );\r\n\t\t\t\tcase 'bonomo': return array( 'bonham' );\r\n\t\t\t\tcase 'boon': return array( 'bean','boone' );\r\n\t\t\t\tcase 'boone': return array( 'bone','boon' );\r\n\t\t\t\tcase 'borbely': return array( 'borbély' );\r\n\t\t\t\tcase 'borbély': return array( 'borbely' );\r\n\t\t\t\tcase 'borchard': return array( 'borchardt' );\r\n\t\t\t\tcase 'borchardt': return array( 'borchard' );\r\n\t\t\t\tcase 'bosch': return array( 'boesch','bosco','bösch' );\r\n\t\t\t\tcase 'bosco': return array( 'bosch','bosque' );\r\n\t\t\t\tcase 'bosque': return array( 'bosco' );\r\n\t\t\t\tcase 'bottcher': return array( 'böttcher' );\r\n\t\t\t\tcase 'botwright': return array( 'boatwright' );\r\n\t\t\t\tcase 'bourke': return array( 'burke' );\r\n\t\t\t\tcase 'bourreau': return array( 'bureau' );\r\n\t\t\t\tcase 'bover': return array( 'boveri' );\r\n\t\t\t\tcase 'boveri': return array( 'bover' );\r\n\t\t\t\tcase 'boyadjiev': return array( 'boyadzhiev' );\r\n\t\t\t\tcase 'boyadzhiev': return array( 'boyadjiev' );\r\n\t\t\t\tcase 'braden': return array( 'o bradain','ó bradáin' );\r\n\t\t\t\tcase 'brahms': return array( 'bramson' );\r\n\t\t\t\tcase 'brams': return array( 'bramson' );\r\n\t\t\t\tcase 'bramson': return array( 'brahms','brams' );\r\n\t\t\t\tcase 'brand': return array( 'brandt','brant' );\r\n\t\t\t\tcase 'brandt': return array( 'brand' );\r\n\t\t\t\tcase 'brankovich': return array( 'branković' );\r\n\t\t\t\tcase 'branković': return array( 'brankovich','brankovič' );\r\n\t\t\t\tcase 'brankovič': return array( 'branković' );\r\n\t\t\t\tcase 'brant': return array( 'brand' );\r\n\t\t\t\tcase 'braun': return array( 'braune' );\r\n\t\t\t\tcase 'braune': return array( 'braun','bruhn','brun','brune' );\r\n\t\t\t\tcase 'breckenridge': return array( 'breckinridge' );\r\n\t\t\t\tcase 'breckinridge': return array( 'breckenridge' );\r\n\t\t\t\tcase 'breen': return array( 'o braoin','ó braoin' );\r\n\t\t\t\tcase 'brennan': return array( 'o braonain','ó braonáin' );\r\n\t\t\t\tcase 'bret': return array( 'brett' );\r\n\t\t\t\tcase 'brett': return array( 'bret' );\r\n\t\t\t\tcase 'brice': return array( 'bryce' );\r\n\t\t\t\tcase 'brittain': return array( 'britton' );\r\n\t\t\t\tcase 'britton': return array( 'brittain' );\r\n\t\t\t\tcase 'brodie': return array( 'brody' );\r\n\t\t\t\tcase 'brody': return array( 'brodie' );\r\n\t\t\t\tcase 'brook': return array( 'brooke','brooks' );\r\n\t\t\t\tcase 'brooke': return array( 'brook' );\r\n\t\t\t\tcase 'brooks': return array( 'brook' );\r\n\t\t\t\tcase 'brose': return array( 'broz' );\r\n\t\t\t\tcase 'brown': return array( 'browne' );\r\n\t\t\t\tcase 'browne': return array( 'brown' );\r\n\t\t\t\tcase 'broz': return array( 'brose' );\r\n\t\t\t\tcase 'broż': return array( 'brož' );\r\n\t\t\t\tcase 'brož': return array( 'broż' );\r\n\t\t\t\tcase 'bruhn': return array( 'braune' );\r\n\t\t\t\tcase 'brun': return array( 'braune' );\r\n\t\t\t\tcase 'brune': return array( 'braune' );\r\n\t\t\t\tcase 'bryan': return array( 'o briain','ó briain' );\r\n\t\t\t\tcase 'bryce': return array( 'brice' );\r\n\t\t\t\tcase 'buchvarov': return array( 'bachvarov' );\r\n\t\t\t\tcase 'buckley': return array( 'bagley' );\r\n\t\t\t\tcase 'budai': return array( 'buday' );\r\n\t\t\t\tcase 'buday': return array( 'budai' );\r\n\t\t\t\tcase 'bueki': return array( 'büki' );\r\n\t\t\t\tcase 'buhr': return array( 'bauer' );\r\n\t\t\t\tcase 'buki': return array( 'büki' );\r\n\t\t\t\tcase 'bukoski': return array( 'bukowski' );\r\n\t\t\t\tcase 'bukowski': return array( 'bukoski' );\r\n\t\t\t\tcase 'bul': return array( 'bull' );\r\n\t\t\t\tcase 'bulgarelli': return array( 'bulgari' );\r\n\t\t\t\tcase 'bulgari': return array( 'bulgarelli' );\r\n\t\t\t\tcase 'bull': return array( 'bul' );\r\n\t\t\t\tcase 'bullens': return array( 'beulens' );\r\n\t\t\t\tcase 'bumgarner': return array( 'baumgartner' );\r\n\t\t\t\tcase 'bunschoten': return array( 'benscoter' );\r\n\t\t\t\tcase 'bureau': return array( 'bourreau' );\r\n\t\t\t\tcase 'burke': return array( 'bourke' );\r\n\t\t\t\tcase 'burns': return array( 'byrnes' );\r\n\t\t\t\tcase 'byrd': return array( 'bird' );\r\n\t\t\t\tcase 'byrne': return array( 'berne' );\r\n\t\t\t\tcase 'byrnes': return array( 'burns' );\r\n\t\t\t\tcase 'bystroem': return array( 'byström' );\r\n\t\t\t\tcase 'bystrom': return array( 'byström' );\r\n\t\t\t\tcase 'byström': return array( 'bystroem','bystrom' );\r\n\t\t\t\tcase 'bálint': return array( 'balint' );\r\n\t\t\t\tcase 'bárta': return array( 'barta','bartha' );\r\n\t\t\t\tcase 'bárány': return array( 'barany' );\r\n\t\t\t\tcase 'báthory': return array( 'bathory' );\r\n\t\t\t\tcase 'bátori': return array( 'batori' );\r\n\t\t\t\tcase 'bäcker': return array( 'backer','baecker','becker' );\r\n\t\t\t\tcase 'bähr': return array( 'baehr','bahr' );\r\n\t\t\t\tcase 'bélanger': return array( 'belanger' );\r\n\t\t\t\tcase 'béranger': return array( 'behringer','beranger' );\r\n\t\t\t\tcase 'béringer': return array( 'behringer','beringer' );\r\n\t\t\t\tcase 'bíró': return array( 'biro' );\r\n\t\t\t\tcase 'böcker': return array( 'bocker','boecker' );\r\n\t\t\t\tcase 'böhler': return array( 'boehler','bohler' );\r\n\t\t\t\tcase 'böhm': return array( 'boehm','bohm' );\r\n\t\t\t\tcase 'böhme': return array( 'boehme','bohme' );\r\n\t\t\t\tcase 'böhmer': return array( 'boehmer','bohmer' );\r\n\t\t\t\tcase 'bösch': return array( 'boesch','bosch' );\r\n\t\t\t\tcase 'bösch ': return array( 'boesch ','bosch ' );\r\n\t\t\t\tcase 'böttcher': return array( 'boettcher','bottcher' );\r\n\t\t\t\tcase 'büki': return array( 'bueki','buki' );\r\n\t\t\t\tcase 'callaghan': return array( 'o ceallachain','ó ceallacháin' );\r\n\t\t\t\tcase 'cantu': return array( 'cantù','cantú' );\r\n\t\t\t\tcase 'cantù': return array( 'cantu' );\r\n\t\t\t\tcase 'cantú': return array( 'cantu' );\r\n\t\t\t\tcase 'caomhanach': return array( 'caomhánach' );\r\n\t\t\t\tcase 'caomhánach': return array( 'caomhanach' );\r\n\t\t\t\tcase 'carbone': return array( 'carboni' );\r\n\t\t\t\tcase 'carboni': return array( 'carbone' );\r\n\t\t\t\tcase 'cardoso': return array( 'cardozo' );\r\n\t\t\t\tcase 'cardozo': return array( 'cardoso' );\r\n\t\t\t\tcase 'carey': return array( 'cary' );\r\n\t\t\t\tcase 'carlsen': return array( 'carlson','carlsson' );\r\n\t\t\t\tcase 'carlson': return array( 'carlsen' );\r\n\t\t\t\tcase 'carlsson': return array( 'carlsen' );\r\n\t\t\t\tcase 'carmody': return array( 'o cearmada','ó cearmada' );\r\n\t\t\t\tcase 'caron': return array( 'charron' );\r\n\t\t\t\tcase 'carpenter': return array( 'charpentier' );\r\n\t\t\t\tcase 'carran': return array( 'curran' );\r\n\t\t\t\tcase 'carstensen': return array( 'christensen','christians','christiansen','christianson','christinsen','christison','christoffersen','christopher','christophers','christopherson' );\r\n\t\t\t\tcase 'cary': return array( 'carey' );\r\n\t\t\t\tcase 'casal': return array( 'casale' );\r\n\t\t\t\tcase 'casale': return array( 'casal' );\r\n\t\t\t\tcase 'cassidy': return array( 'o caiside','ó caiside' );\r\n\t\t\t\tcase 'castell': return array( 'castelo','castillo','castle' );\r\n\t\t\t\tcase 'castellano': return array( 'castilla' );\r\n\t\t\t\tcase 'castelo': return array( 'castell' );\r\n\t\t\t\tcase 'castilla': return array( 'castellano' );\r\n\t\t\t\tcase 'castillo': return array( 'castell' );\r\n\t\t\t\tcase 'castle': return array( 'castell' );\r\n\t\t\t\tcase 'catalan': return array( 'catalano','catalán' );\r\n\t\t\t\tcase 'catalano': return array( 'catalan','catalán' );\r\n\t\t\t\tcase 'catalán': return array( 'catalan','catalano' );\r\n\t\t\t\tcase 'cavan': return array( 'cavanah' );\r\n\t\t\t\tcase 'cavanagh': return array( 'cavanaugh' );\r\n\t\t\t\tcase 'cavanah': return array( 'cavan' );\r\n\t\t\t\tcase 'cavanaugh': return array( 'cavanagh' );\r\n\t\t\t\tcase 'chan': return array( 'chen' );\r\n\t\t\t\tcase 'charpentier': return array( 'carpenter' );\r\n\t\t\t\tcase 'charron': return array( 'caron' );\r\n\t\t\t\tcase 'chaudhari': return array( 'chaudhary' );\r\n\t\t\t\tcase 'chaudhary': return array( 'chaudhari','chaudhri','chaudhuri','choudhary','choudhury','chowdhury' );\r\n\t\t\t\tcase 'chaudhri': return array( 'chaudhary' );\r\n\t\t\t\tcase 'chaudhuri': return array( 'chaudhary' );\r\n\t\t\t\tcase 'chavarria': return array( 'chavarría' );\r\n\t\t\t\tcase 'chavarría': return array( 'chavarria' );\r\n\t\t\t\tcase 'chaves': return array( 'chavez','chávez' );\r\n\t\t\t\tcase 'chavez': return array( 'chaves','chávez' );\r\n\t\t\t\tcase 'chen': return array( 'chan' );\r\n\t\t\t\tcase 'cheung': return array( 'chong' );\r\n\t\t\t\tcase 'chmela': return array( 'chmiel' );\r\n\t\t\t\tcase 'chmiel': return array( 'chmela' );\r\n\t\t\t\tcase 'choe': return array( 'choi' );\r\n\t\t\t\tcase 'choi': return array( 'choe' );\r\n\t\t\t\tcase 'chong': return array( 'cheung' );\r\n\t\t\t\tcase 'chou': return array( 'chow' );\r\n\t\t\t\tcase 'choudhary': return array( 'chaudhary' );\r\n\t\t\t\tcase 'choudhury': return array( 'chaudhary' );\r\n\t\t\t\tcase 'chow': return array( 'chou' );\r\n\t\t\t\tcase 'chowdhury': return array( 'chaudhary' );\r\n\t\t\t\tcase 'christensen': return array( 'carstensen' );\r\n\t\t\t\tcase 'christians': return array( 'carstensen' );\r\n\t\t\t\tcase 'christiansen': return array( 'carstensen' );\r\n\t\t\t\tcase 'christianson': return array( 'carstensen' );\r\n\t\t\t\tcase 'christinsen': return array( 'carstensen' );\r\n\t\t\t\tcase 'christison': return array( 'carstensen' );\r\n\t\t\t\tcase 'christoffersen': return array( 'carstensen' );\r\n\t\t\t\tcase 'christopher': return array( 'carstensen' );\r\n\t\t\t\tcase 'christophers': return array( 'carstensen' );\r\n\t\t\t\tcase 'christopherson': return array( 'carstensen' );\r\n\t\t\t\tcase 'chvatal': return array( 'chvátal' );\r\n\t\t\t\tcase 'chvátal': return array( 'chvatal' );\r\n\t\t\t\tcase 'chávez': return array( 'chaves','chavez' );\r\n\t\t\t\tcase 'cinege': return array( 'czinege' );\r\n\t\t\t\tcase 'claasen': return array( 'claesson','clausen','colijn' );\r\n\t\t\t\tcase 'claesson': return array( 'claasen' );\r\n\t\t\t\tcase 'clark': return array( 'clarke','clarkson' );\r\n\t\t\t\tcase 'clarke': return array( 'clark' );\r\n\t\t\t\tcase 'clarkson': return array( 'clark' );\r\n\t\t\t\tcase 'clausen': return array( 'claasen' );\r\n\t\t\t\tcase 'cleary': return array( 'clery' );\r\n\t\t\t\tcase 'clemens': return array( 'clemensen' );\r\n\t\t\t\tcase 'clemensen': return array( 'clemens' );\r\n\t\t\t\tcase 'clery': return array( 'cleary' );\r\n\t\t\t\tcase 'cock': return array( 'cox' );\r\n\t\t\t\tcase 'cocks': return array( 'cox' );\r\n\t\t\t\tcase 'coemans': return array( 'coumans' );\r\n\t\t\t\tcase 'coghlan': return array( 'coughlan' );\r\n\t\t\t\tcase 'coke': return array( 'cook' );\r\n\t\t\t\tcase 'colijn': return array( 'claasen' );\r\n\t\t\t\tcase 'colombo': return array( 'columbo' );\r\n\t\t\t\tcase 'colon': return array( 'colón' );\r\n\t\t\t\tcase 'columbo': return array( 'colombo' );\r\n\t\t\t\tcase 'colón': return array( 'colon' );\r\n\t\t\t\tcase 'combs': return array( 'coombs' );\r\n\t\t\t\tcase 'connell': return array( 'o conaill','ó conaill' );\r\n\t\t\t\tcase 'connelly': return array( 'connolly' );\r\n\t\t\t\tcase 'connolly': return array( 'connelly' );\r\n\t\t\t\tcase 'constantin': return array( 'constantinescu' );\r\n\t\t\t\tcase 'constantinescu': return array( 'constantin' );\r\n\t\t\t\tcase 'cook': return array( 'coke','cooke','cuocco','cuoco' );\r\n\t\t\t\tcase 'cooke': return array( 'cook' );\r\n\t\t\t\tcase 'coombs': return array( 'combs' );\r\n\t\t\t\tcase 'cooney': return array( 'o cuana','ó cuana' );\r\n\t\t\t\tcase 'corcoran': return array( 'o corcrain','ó corcráin' );\r\n\t\t\t\tcase 'corey': return array( 'cory' );\r\n\t\t\t\tcase 'corra': return array( 'corrà' );\r\n\t\t\t\tcase 'corrà': return array( 'corra' );\r\n\t\t\t\tcase 'cory': return array( 'corey' );\r\n\t\t\t\tcase 'costa': return array( 'coste' );\r\n\t\t\t\tcase 'costantini': return array( 'costanzo' );\r\n\t\t\t\tcase 'costanzo': return array( 'costantini' );\r\n\t\t\t\tcase 'coste': return array( 'costa','cuesta' );\r\n\t\t\t\tcase 'cote': return array( 'côté' );\r\n\t\t\t\tcase 'coughlan': return array( 'coghlan','coughlin','o cochlain','ó cochláin' );\r\n\t\t\t\tcase 'coughlin': return array( 'coughlan' );\r\n\t\t\t\tcase 'coumans': return array( 'coemans' );\r\n\t\t\t\tcase 'courtenay': return array( 'courtney' );\r\n\t\t\t\tcase 'courtney': return array( 'courtenay' );\r\n\t\t\t\tcase 'cox': return array( 'cock','cocks' );\r\n\t\t\t\tcase 'crespi': return array( 'crespo','crisp' );\r\n\t\t\t\tcase 'crespo': return array( 'crespi' );\r\n\t\t\t\tcase 'crisp': return array( 'crespi' );\r\n\t\t\t\tcase 'croce': return array( 'crouch' );\r\n\t\t\t\tcase 'cross': return array( 'crouch' );\r\n\t\t\t\tcase 'crouch': return array( 'croce','cross','cruz' );\r\n\t\t\t\tcase 'crusan': return array( 'cruyssen' );\r\n\t\t\t\tcase 'cruyssen': return array( 'crusan' );\r\n\t\t\t\tcase 'cruz': return array( 'crouch' );\r\n\t\t\t\tcase 'csaszar': return array( 'császár' );\r\n\t\t\t\tcase 'császár': return array( 'csaszar' );\r\n\t\t\t\tcase 'cuellar': return array( 'cuéllar' );\r\n\t\t\t\tcase 'cuesta': return array( 'coste' );\r\n\t\t\t\tcase 'cuijper': return array( 'cuijpers' );\r\n\t\t\t\tcase 'cuijpers': return array( 'cuijper' );\r\n\t\t\t\tcase 'cuocco': return array( 'cook' );\r\n\t\t\t\tcase 'cuoco': return array( 'cook' );\r\n\t\t\t\tcase 'curran': return array( 'carran' );\r\n\t\t\t\tcase 'cuéllar': return array( 'cuellar' );\r\n\t\t\t\tcase 'czinege': return array( 'cinege' );\r\n\t\t\t\tcase 'côté': return array( 'cote' );\r\n\t\t\t\tcase 'd\\'angelo': return array( 'de angelis' );\r\n\t\t\t\tcase 'd\\'antonio': return array( 'di antonio' );\r\n\t\t\t\tcase 'd\\'cruz': return array( 'd\\'cruze' );\r\n\t\t\t\tcase 'd\\'cruze': return array( 'd\\'cruz' );\r\n\t\t\t\tcase 'daalman': return array( 'daalmans','daelman','daelmans','dahlman','dahlmans' );\r\n\t\t\t\tcase 'daalmans': return array( 'daalman' );\r\n\t\t\t\tcase 'dabney': return array( 'daubney' );\r\n\t\t\t\tcase 'daelman': return array( 'daalman' );\r\n\t\t\t\tcase 'daelmans': return array( 'daalman' );\r\n\t\t\t\tcase 'dahlman': return array( 'daalman' );\r\n\t\t\t\tcase 'dahlmans': return array( 'daalman' );\r\n\t\t\t\tcase 'daley': return array( 'daly' );\r\n\t\t\t\tcase 'daly': return array( 'daley' );\r\n\t\t\t\tcase 'danailov': return array( 'danielov' );\r\n\t\t\t\tcase 'danell': return array( 'daniel','daniell','dannel','danniel','danniell','deniel','dennel','dennell' );\r\n\t\t\t\tcase 'daniau': return array( 'deniau' );\r\n\t\t\t\tcase 'daniel': return array( 'danell' );\r\n\t\t\t\tcase 'daniell': return array( 'danell' );\r\n\t\t\t\tcase 'danielov': return array( 'danailov' );\r\n\t\t\t\tcase 'daniels': return array( 'danielsen','danielson','danielsson' );\r\n\t\t\t\tcase 'danielsen': return array( 'daniels' );\r\n\t\t\t\tcase 'danielson': return array( 'daniels' );\r\n\t\t\t\tcase 'danielsson': return array( 'daniels' );\r\n\t\t\t\tcase 'dannel': return array( 'danell' );\r\n\t\t\t\tcase 'danniel': return array( 'danell' );\r\n\t\t\t\tcase 'danniell': return array( 'danell' );\r\n\t\t\t\tcase 'darby': return array( 'derby' );\r\n\t\t\t\tcase 'daubney': return array( 'dabney' );\r\n\t\t\t\tcase 'davidsen': return array( 'davidson' );\r\n\t\t\t\tcase 'davidson': return array( 'davidsen' );\r\n\t\t\t\tcase 'davies': return array( 'davis' );\r\n\t\t\t\tcase 'davin': return array( 'devin','devine','o dubhain','ó dubháin' );\r\n\t\t\t\tcase 'davis': return array( 'davies' );\r\n\t\t\t\tcase 'de angelis': return array( 'd\\'angelo' );\r\n\t\t\t\tcase 'deasmhumhain': return array( 'desmond' );\r\n\t\t\t\tcase 'deasun': return array( 'deasún' );\r\n\t\t\t\tcase 'deasún': return array( 'deasun' );\r\n\t\t\t\tcase 'dedrick': return array( 'dietrich' );\r\n\t\t\t\tcase 'delaney': return array( 'dolan' );\r\n\t\t\t\tcase 'delany': return array( 'dolan' );\r\n\t\t\t\tcase 'demetriou': return array( 'dimitriou','dimitrov','dumitrescu','dumitru' );\r\n\t\t\t\tcase 'deniau': return array( 'daniau' );\r\n\t\t\t\tcase 'deniel': return array( 'danell' );\r\n\t\t\t\tcase 'dennel': return array( 'danell' );\r\n\t\t\t\tcase 'dennell': return array( 'danell' );\r\n\t\t\t\tcase 'derby': return array( 'darby' );\r\n\t\t\t\tcase 'derichs': return array( 'dirchs' );\r\n\t\t\t\tcase 'derrick': return array( 'derricks','dierickx','dircks','dirckx','dirix','dirks','dirkse','dirkx' );\r\n\t\t\t\tcase 'derricks': return array( 'derrick' );\r\n\t\t\t\tcase 'derrickson': return array( 'dircksens','dirksen' );\r\n\t\t\t\tcase 'desmond': return array( 'deasmhumhain' );\r\n\t\t\t\tcase 'devin': return array( 'davin' );\r\n\t\t\t\tcase 'devine': return array( 'davin' );\r\n\t\t\t\tcase 'devlin': return array( 'o doibhilin','ó doibhilin' );\r\n\t\t\t\tcase 'di antonio': return array( 'd\\'antonio' );\r\n\t\t\t\tcase 'diaz': return array( 'díaz' );\r\n\t\t\t\tcase 'dickens': return array( 'dickenson','dickinson' );\r\n\t\t\t\tcase 'dickenson': return array( 'dickens' );\r\n\t\t\t\tcase 'dickinson': return array( 'dickens' );\r\n\t\t\t\tcase 'dickson': return array( 'dixon' );\r\n\t\t\t\tcase 'dierickx': return array( 'derrick' );\r\n\t\t\t\tcase 'dietrich': return array( 'dedrick' );\r\n\t\t\t\tcase 'dimitriou': return array( 'demetriou' );\r\n\t\t\t\tcase 'dimitrov': return array( 'demetriou' );\r\n\t\t\t\tcase 'dirchs': return array( 'derichs' );\r\n\t\t\t\tcase 'dircks': return array( 'derrick' );\r\n\t\t\t\tcase 'dircksens': return array( 'derrickson' );\r\n\t\t\t\tcase 'dirckx': return array( 'derrick' );\r\n\t\t\t\tcase 'dirix': return array( 'derrick' );\r\n\t\t\t\tcase 'dirks': return array( 'derrick' );\r\n\t\t\t\tcase 'dirkse': return array( 'derrick' );\r\n\t\t\t\tcase 'dirksen': return array( 'derrickson' );\r\n\t\t\t\tcase 'dirkx': return array( 'derrick' );\r\n\t\t\t\tcase 'dixon': return array( 'dickson' );\r\n\t\t\t\tcase 'dolan': return array( 'delaney','delany' );\r\n\t\t\t\tcase 'donaghue': return array( 'donoghue' );\r\n\t\t\t\tcase 'donalds': return array( 'donaldson' );\r\n\t\t\t\tcase 'donaldson': return array( 'donalds' );\r\n\t\t\t\tcase 'donoghue': return array( 'donaghue' );\r\n\t\t\t\tcase 'donohoe': return array( 'donohue' );\r\n\t\t\t\tcase 'donohue': return array( 'donohoe' );\r\n\t\t\t\tcase 'doran': return array( 'o deorain','ó deoráin' );\r\n\t\t\t\tcase 'dougherty': return array( 'o dochartaigh','ó dochartaigh' );\r\n\t\t\t\tcase 'douglas': return array( 'douglass' );\r\n\t\t\t\tcase 'douglass': return array( 'douglas' );\r\n\t\t\t\tcase 'draganov': return array( 'dragomirov' );\r\n\t\t\t\tcase 'dragomirov': return array( 'draganov' );\r\n\t\t\t\tcase 'dragov': return array( 'dragović' );\r\n\t\t\t\tcase 'dragović': return array( 'dragov' );\r\n\t\t\t\tcase 'drees': return array( 'dreese','dries' );\r\n\t\t\t\tcase 'dreese': return array( 'drees' );\r\n\t\t\t\tcase 'dreesen': return array( 'dreesens','dreessen','dreessens','driessen' );\r\n\t\t\t\tcase 'dreesens': return array( 'dreesen' );\r\n\t\t\t\tcase 'dreessen': return array( 'dreesen' );\r\n\t\t\t\tcase 'dreessens': return array( 'dreesen' );\r\n\t\t\t\tcase 'dries': return array( 'drees' );\r\n\t\t\t\tcase 'driessen': return array( 'dreesen' );\r\n\t\t\t\tcase 'duerr': return array( 'durr','dürr' );\r\n\t\t\t\tcase 'dumitrescu': return array( 'demetriou' );\r\n\t\t\t\tcase 'dumitru': return array( 'demetriou' );\r\n\t\t\t\tcase 'duncan': return array( 'duncanson' );\r\n\t\t\t\tcase 'duncanson': return array( 'duncan' );\r\n\t\t\t\tcase 'dupond': return array( 'dupont' );\r\n\t\t\t\tcase 'dupont': return array( 'dupond' );\r\n\t\t\t\tcase 'durand': return array( 'durant' );\r\n\t\t\t\tcase 'durandi': return array( 'durándi' );\r\n\t\t\t\tcase 'durant': return array( 'durand' );\r\n\t\t\t\tcase 'durnin': return array( 'o doirnain','ó doirnáin' );\r\n\t\t\t\tcase 'durr': return array( 'duerr','dürr' );\r\n\t\t\t\tcase 'durándi': return array( 'durandi' );\r\n\t\t\t\tcase 'díaz': return array( 'diaz' );\r\n\t\t\t\tcase 'dürr': return array( 'duerr','durr' );\r\n\t\t\t\tcase 'easom': return array( 'eason' );\r\n\t\t\t\tcase 'eason': return array( 'easom' );\r\n\t\t\t\tcase 'eberhardt': return array( 'everhart' );\r\n\t\t\t\tcase 'eccleston': return array( 'ecclestone' );\r\n\t\t\t\tcase 'ecclestone': return array( 'eccleston' );\r\n\t\t\t\tcase 'echevarria': return array( 'echevarría' );\r\n\t\t\t\tcase 'echevarría': return array( 'echevarria' );\r\n\t\t\t\tcase 'echeverria': return array( 'echeverría' );\r\n\t\t\t\tcase 'echeverría': return array( 'echeverria' );\r\n\t\t\t\tcase 'edwards': return array( 'edwardson' );\r\n\t\t\t\tcase 'edwardson': return array( 'edwards' );\r\n\t\t\t\tcase 'eerkens': return array( 'erckens' );\r\n\t\t\t\tcase 'ekmekci': return array( 'ekmekçi' );\r\n\t\t\t\tcase 'ekmekçi': return array( 'ekmekci' );\r\n\t\t\t\tcase 'eliot': return array( 'eliott','elliot','elliott' );\r\n\t\t\t\tcase 'eliott': return array( 'eliot' );\r\n\t\t\t\tcase 'elliot': return array( 'eliot' );\r\n\t\t\t\tcase 'elliott': return array( 'eliot' );\r\n\t\t\t\tcase 'ellison': return array( 'ellisson' );\r\n\t\t\t\tcase 'ellisson': return array( 'ellison' );\r\n\t\t\t\tcase 'elmer': return array( 'elmersson' );\r\n\t\t\t\tcase 'elmersson': return array( 'elmer' );\r\n\t\t\t\tcase 'elwin': return array( 'elwyn' );\r\n\t\t\t\tcase 'elwyn': return array( 'elwin' );\r\n\t\t\t\tcase 'emile': return array( 'émile' );\r\n\t\t\t\tcase 'emmet': return array( 'emmett' );\r\n\t\t\t\tcase 'emmett': return array( 'emmet' );\r\n\t\t\t\tcase 'engstroem': return array( 'engström' );\r\n\t\t\t\tcase 'engstrom': return array( 'engström' );\r\n\t\t\t\tcase 'engström': return array( 'engstroem','engstrom' );\r\n\t\t\t\tcase 'erckens': return array( 'eerkens','erkens' );\r\n\t\t\t\tcase 'erickson': return array( 'ericson','ericsson','eriksen','eriksson' );\r\n\t\t\t\tcase 'ericson': return array( 'erickson' );\r\n\t\t\t\tcase 'ericsson': return array( 'erickson' );\r\n\t\t\t\tcase 'eriksen': return array( 'erickson' );\r\n\t\t\t\tcase 'eriksson': return array( 'erickson' );\r\n\t\t\t\tcase 'erkens': return array( 'erckens' );\r\n\t\t\t\tcase 'escarcega': return array( 'escárcega' );\r\n\t\t\t\tcase 'escarra': return array( 'escarrà' );\r\n\t\t\t\tcase 'escarrà': return array( 'escarra' );\r\n\t\t\t\tcase 'escárcega': return array( 'escarcega' );\r\n\t\t\t\tcase 'espina': return array( 'espino' );\r\n\t\t\t\tcase 'espino': return array( 'espina' );\r\n\t\t\t\tcase 'espinosa': return array( 'espinoza' );\r\n\t\t\t\tcase 'espinoza': return array( 'espinosa' );\r\n\t\t\t\tcase 'esteves': return array( 'estéves' );\r\n\t\t\t\tcase 'estevez': return array( 'estévez' );\r\n\t\t\t\tcase 'estéves': return array( 'esteves' );\r\n\t\t\t\tcase 'estévez': return array( 'estevez' );\r\n\t\t\t\tcase 'etxebarria': return array( 'etxeberria' );\r\n\t\t\t\tcase 'etxeberria': return array( 'etxebarria' );\r\n\t\t\t\tcase 'evans': return array( 'evanson' );\r\n\t\t\t\tcase 'evanson': return array( 'evans' );\r\n\t\t\t\tcase 'evered': return array( 'everett' );\r\n\t\t\t\tcase 'everett': return array( 'evered' );\r\n\t\t\t\tcase 'everhart': return array( 'eberhardt' );\r\n\t\t\t\tcase 'fabbro': return array( 'favero' );\r\n\t\t\t\tcase 'fabian': return array( 'fábián' );\r\n\t\t\t\tcase 'faerber': return array( 'färber' );\r\n\t\t\t\tcase 'fannon': return array( 'finnin','o fionnain','ó fionnáin' );\r\n\t\t\t\tcase 'farago': return array( 'faragó' );\r\n\t\t\t\tcase 'faragó': return array( 'farago' );\r\n\t\t\t\tcase 'farber': return array( 'färber' );\r\n\t\t\t\tcase 'farrell': return array( 'friel' );\r\n\t\t\t\tcase 'faust': return array( 'fausti' );\r\n\t\t\t\tcase 'fausti': return array( 'faust' );\r\n\t\t\t\tcase 'favero': return array( 'fabbro' );\r\n\t\t\t\tcase 'favre': return array( 'favreau' );\r\n\t\t\t\tcase 'favreau': return array( 'favre' );\r\n\t\t\t\tcase 'feher': return array( 'fehér' );\r\n\t\t\t\tcase 'fehér': return array( 'feher' );\r\n\t\t\t\tcase 'feld': return array( 'feldt' );\r\n\t\t\t\tcase 'feldt': return array( 'feld' );\r\n\t\t\t\tcase 'felix': return array( 'félix' );\r\n\t\t\t\tcase 'fernandez': return array( 'fernández' );\r\n\t\t\t\tcase 'fernández': return array( 'fernandez' );\r\n\t\t\t\tcase 'ferrara': return array( 'ferrari' );\r\n\t\t\t\tcase 'ferrari': return array( 'ferrara','ferraro','ferreiro','ferrer','ferrero' );\r\n\t\t\t\tcase 'ferraro': return array( 'ferrari' );\r\n\t\t\t\tcase 'ferreiro': return array( 'ferrari' );\r\n\t\t\t\tcase 'ferrer': return array( 'ferrari' );\r\n\t\t\t\tcase 'ferrero': return array( 'ferrari' );\r\n\t\t\t\tcase 'ferro': return array( 'fierro' );\r\n\t\t\t\tcase 'fierro': return array( 'ferro' );\r\n\t\t\t\tcase 'filep': return array( 'filippi','fueloep','fulop','fülöp' );\r\n\t\t\t\tcase 'filipek': return array( 'filipowski' );\r\n\t\t\t\tcase 'filipov': return array( 'filipović','filippov' );\r\n\t\t\t\tcase 'filipović': return array( 'filipov' );\r\n\t\t\t\tcase 'filipowski': return array( 'filipek','flipse','flipsen' );\r\n\t\t\t\tcase 'filippi': return array( 'filep' );\r\n\t\t\t\tcase 'filippov': return array( 'filipov' );\r\n\t\t\t\tcase 'finnegan': return array( 'o fionnagain','ó fionnagáin' );\r\n\t\t\t\tcase 'finnin': return array( 'fannon' );\r\n\t\t\t\tcase 'fischer': return array( 'fisher' );\r\n\t\t\t\tcase 'fisher': return array( 'fischer' );\r\n\t\t\t\tcase 'flanagan': return array( 'flanagon' );\r\n\t\t\t\tcase 'flanagon': return array( 'flanagan','o flannagain','ó flannagáin' );\r\n\t\t\t\tcase 'flipse': return array( 'filipowski' );\r\n\t\t\t\tcase 'flipsen': return array( 'filipowski' );\r\n\t\t\t\tcase 'flynn': return array( 'o floinn','ó floinn' );\r\n\t\t\t\tcase 'foerstner': return array( 'forst','förstner' );\r\n\t\t\t\tcase 'forest': return array( 'forester' );\r\n\t\t\t\tcase 'forester': return array( 'forest','forestier','forrest' );\r\n\t\t\t\tcase 'forestier': return array( 'forester' );\r\n\t\t\t\tcase 'forrest': return array( 'forester' );\r\n\t\t\t\tcase 'forst': return array( 'foerstner','forstner','förstner' );\r\n\t\t\t\tcase 'forstner': return array( 'forst','förstner' );\r\n\t\t\t\tcase 'fortuin': return array( 'fortuyn' );\r\n\t\t\t\tcase 'fortuyn': return array( 'fortuin' );\r\n\t\t\t\tcase 'francis': return array( 'francois','franjić','françois' );\r\n\t\t\t\tcase 'franco': return array( 'frank' );\r\n\t\t\t\tcase 'francois': return array( 'francis','françois' );\r\n\t\t\t\tcase 'franjić': return array( 'francis' );\r\n\t\t\t\tcase 'frank': return array( 'franco','franke' );\r\n\t\t\t\tcase 'franke': return array( 'frank' );\r\n\t\t\t\tcase 'franklin': return array( 'franklyn' );\r\n\t\t\t\tcase 'franklyn': return array( 'franklin' );\r\n\t\t\t\tcase 'françois': return array( 'francis','francois' );\r\n\t\t\t\tcase 'fraser': return array( 'frazier' );\r\n\t\t\t\tcase 'frazier': return array( 'fraser' );\r\n\t\t\t\tcase 'frederiksen': return array( 'friedrich' );\r\n\t\t\t\tcase 'friedrich': return array( 'frederiksen' );\r\n\t\t\t\tcase 'friel': return array( 'farrell' );\r\n\t\t\t\tcase 'fry': return array( 'frye' );\r\n\t\t\t\tcase 'frye': return array( 'fry' );\r\n\t\t\t\tcase 'fueloep': return array( 'filep','fülöp' );\r\n\t\t\t\tcase 'fuerst': return array( 'fürst' );\r\n\t\t\t\tcase 'fulop': return array( 'filep','fülöp' );\r\n\t\t\t\tcase 'furst': return array( 'fürst' );\r\n\t\t\t\tcase 'fylan': return array( 'o faolain','ó faoláin' );\r\n\t\t\t\tcase 'fábián': return array( 'fabian' );\r\n\t\t\t\tcase 'färber': return array( 'faerber','farber' );\r\n\t\t\t\tcase 'félix': return array( 'felix' );\r\n\t\t\t\tcase 'förstner': return array( 'foerstner','forst','forstner' );\r\n\t\t\t\tcase 'fülöp': return array( 'filep','fueloep','fulop' );\r\n\t\t\t\tcase 'fürst': return array( 'fuerst','furst' );\r\n\t\t\t\tcase 'gaal': return array( 'gaál' );\r\n\t\t\t\tcase 'gabrielli': return array( 'gabriels' );\r\n\t\t\t\tcase 'gabriels': return array( 'gabrielli','gabrielson','gavrilović','gavrilyuk' );\r\n\t\t\t\tcase 'gabrielson': return array( 'gabriels' );\r\n\t\t\t\tcase 'gaertner': return array( 'gardiner' );\r\n\t\t\t\tcase 'gal': return array( 'gál' );\r\n\t\t\t\tcase 'garber': return array( 'gerber' );\r\n\t\t\t\tcase 'garcia': return array( 'garcía' );\r\n\t\t\t\tcase 'garcía': return array( 'garcia' );\r\n\t\t\t\tcase 'gardenar': return array( 'gardiner' );\r\n\t\t\t\tcase 'gardener': return array( 'gardiner' );\r\n\t\t\t\tcase 'gardiner': return array( 'gaertner','gardenar','gardener','gardner','gardyner','gartner','gärtner' );\r\n\t\t\t\tcase 'gardner': return array( 'gardiner' );\r\n\t\t\t\tcase 'gardonyi': return array( 'gárdonyi' );\r\n\t\t\t\tcase 'gardyner': return array( 'gardiner' );\r\n\t\t\t\tcase 'garey': return array( 'gary' );\r\n\t\t\t\tcase 'garnet': return array( 'garnett' );\r\n\t\t\t\tcase 'garnett': return array( 'garnet' );\r\n\t\t\t\tcase 'garrard': return array( 'gerhard','gerhardsson','gerhardt','girard' );\r\n\t\t\t\tcase 'garret': return array( 'garrett','garrod' );\r\n\t\t\t\tcase 'garrett': return array( 'garret' );\r\n\t\t\t\tcase 'garrod': return array( 'garret' );\r\n\t\t\t\tcase 'garry': return array( 'gary' );\r\n\t\t\t\tcase 'gartner': return array( 'gardiner','gärtner' );\r\n\t\t\t\tcase 'garver': return array( 'gerber' );\r\n\t\t\t\tcase 'gary': return array( 'garey','garry','geary' );\r\n\t\t\t\tcase 'gaspar': return array( 'gaspari','gašpar' );\r\n\t\t\t\tcase 'gaspari': return array( 'gaspar' );\r\n\t\t\t\tcase 'gavrilović': return array( 'gabriels' );\r\n\t\t\t\tcase 'gavrilyuk': return array( 'gabriels' );\r\n\t\t\t\tcase 'gaál': return array( 'gaal' );\r\n\t\t\t\tcase 'gašpar': return array( 'gaspar','gáspár' );\r\n\t\t\t\tcase 'geary': return array( 'gary' );\r\n\t\t\t\tcase 'geelen': return array( 'gelen' );\r\n\t\t\t\tcase 'geelens': return array( 'gelens' );\r\n\t\t\t\tcase 'geels': return array( 'giles' );\r\n\t\t\t\tcase 'gehrig': return array( 'gerig' );\r\n\t\t\t\tcase 'geisler': return array( 'geiszler' );\r\n\t\t\t\tcase 'geissler': return array( 'geiszler' );\r\n\t\t\t\tcase 'geiszler': return array( 'geisler','geissler' );\r\n\t\t\t\tcase 'geißler': return array( 'geiszler' );\r\n\t\t\t\tcase 'gelen': return array( 'geelen' );\r\n\t\t\t\tcase 'gelens': return array( 'geelens' );\r\n\t\t\t\tcase 'gerber': return array( 'garber','garver','gerver' );\r\n\t\t\t\tcase 'gerhard': return array( 'garrard' );\r\n\t\t\t\tcase 'gerhardsson': return array( 'garrard' );\r\n\t\t\t\tcase 'gerhardt': return array( 'garrard' );\r\n\t\t\t\tcase 'gerig': return array( 'gehrig' );\r\n\t\t\t\tcase 'germain': return array( 'germano' );\r\n\t\t\t\tcase 'germano': return array( 'germain' );\r\n\t\t\t\tcase 'geroux': return array( 'giroux','géroux' );\r\n\t\t\t\tcase 'gerst': return array( 'gerstle' );\r\n\t\t\t\tcase 'gerstle': return array( 'gerst' );\r\n\t\t\t\tcase 'gerver': return array( 'gerber' );\r\n\t\t\t\tcase 'giles': return array( 'geels' );\r\n\t\t\t\tcase 'girard': return array( 'garrard' );\r\n\t\t\t\tcase 'giroux': return array( 'geroux','géroux' );\r\n\t\t\t\tcase 'giugovaz': return array( 'giùgovaz' );\r\n\t\t\t\tcase 'giùgovaz': return array( 'giugovaz' );\r\n\t\t\t\tcase 'gladwin': return array( 'gladwyn' );\r\n\t\t\t\tcase 'gladwyn': return array( 'gladwin' );\r\n\t\t\t\tcase 'glen': return array( 'glenn' );\r\n\t\t\t\tcase 'glenn': return array( 'glen' );\r\n\t\t\t\tcase 'glockner': return array( 'glöckner' );\r\n\t\t\t\tcase 'gloeckner': return array( 'glöckner' );\r\n\t\t\t\tcase 'glöckner': return array( 'glockner','gloeckner' );\r\n\t\t\t\tcase 'goeransson': return array( 'göransson' );\r\n\t\t\t\tcase 'goeroeg': return array( 'görög' );\r\n\t\t\t\tcase 'gomes': return array( 'gomez' );\r\n\t\t\t\tcase 'gomez': return array( 'gomes' );\r\n\t\t\t\tcase 'gomolka': return array( 'gomulka' );\r\n\t\t\t\tcase 'gomulka': return array( 'gomolka' );\r\n\t\t\t\tcase 'gonzales': return array( 'gonzalez' );\r\n\t\t\t\tcase 'gonzalez': return array( 'gonzales' );\r\n\t\t\t\tcase 'goransson': return array( 'göransson' );\r\n\t\t\t\tcase 'gorecki': return array( 'gorka','górka' );\r\n\t\t\t\tcase 'gorka': return array( 'gorecki','górka' );\r\n\t\t\t\tcase 'gorog': return array( 'görög' );\r\n\t\t\t\tcase 'gorski': return array( 'górski' );\r\n\t\t\t\tcase 'gott': return array( 'gotti' );\r\n\t\t\t\tcase 'gotti': return array( 'gott' );\r\n\t\t\t\tcase 'graeme': return array( 'graham' );\r\n\t\t\t\tcase 'graham': return array( 'graeme','grahame' );\r\n\t\t\t\tcase 'grahame': return array( 'graham' );\r\n\t\t\t\tcase 'granville': return array( 'grenville' );\r\n\t\t\t\tcase 'gray': return array( 'grey' );\r\n\t\t\t\tcase 'grec': return array( 'greco' );\r\n\t\t\t\tcase 'greco': return array( 'grec' );\r\n\t\t\t\tcase 'green': return array( 'greene' );\r\n\t\t\t\tcase 'greene': return array( 'green' );\r\n\t\t\t\tcase 'greer': return array( 'grier' );\r\n\t\t\t\tcase 'gregory': return array( 'grigorescu','grigorov' );\r\n\t\t\t\tcase 'grenville': return array( 'granville' );\r\n\t\t\t\tcase 'grey': return array( 'gray' );\r\n\t\t\t\tcase 'grier': return array( 'greer' );\r\n\t\t\t\tcase 'grigorescu': return array( 'gregory' );\r\n\t\t\t\tcase 'grigorov': return array( 'gregory' );\r\n\t\t\t\tcase 'groeszel': return array( 'größel' );\r\n\t\t\t\tcase 'groos': return array( 'grosse' );\r\n\t\t\t\tcase 'gros': return array( 'grossi','grosso' );\r\n\t\t\t\tcase 'gross': return array( 'grosse' );\r\n\t\t\t\tcase 'grosse': return array( 'groos','gross','grosz','grósz' );\r\n\t\t\t\tcase 'grossi': return array( 'gros' );\r\n\t\t\t\tcase 'grosso': return array( 'gros' );\r\n\t\t\t\tcase 'grosz': return array( 'grosse','groß','grósz' );\r\n\t\t\t\tcase 'grosze': return array( 'große' );\r\n\t\t\t\tcase 'groszel': return array( 'großel','größel' );\r\n\t\t\t\tcase 'groszer': return array( 'großer' );\r\n\t\t\t\tcase 'groß': return array( 'grosz' );\r\n\t\t\t\tcase 'große': return array( 'grosze' );\r\n\t\t\t\tcase 'großel': return array( 'groszel' );\r\n\t\t\t\tcase 'großer': return array( 'groszer' );\r\n\t\t\t\tcase 'gruenewald': return array( 'grünewald' );\r\n\t\t\t\tcase 'grunewald': return array( 'grünewald' );\r\n\t\t\t\tcase 'grósz': return array( 'grosse','grosz' );\r\n\t\t\t\tcase 'größel': return array( 'groeszel','groszel' );\r\n\t\t\t\tcase 'grünewald': return array( 'gruenewald','grunewald' );\r\n\t\t\t\tcase 'guenther': return array( 'gunther','günther' );\r\n\t\t\t\tcase 'guerin': return array( 'guérin' );\r\n\t\t\t\tcase 'guerrero': return array( 'guerriero' );\r\n\t\t\t\tcase 'guerriero': return array( 'guerrero' );\r\n\t\t\t\tcase 'gulyas': return array( 'gulyás' );\r\n\t\t\t\tcase 'gulyás': return array( 'gulyas' );\r\n\t\t\t\tcase 'gunnarsen': return array( 'gunnarsson' );\r\n\t\t\t\tcase 'gunnarsson': return array( 'gunnarsen' );\r\n\t\t\t\tcase 'gunther': return array( 'guenther','günther' );\r\n\t\t\t\tcase 'gutierrez': return array( 'gutiérrez' );\r\n\t\t\t\tcase 'gutiérrez': return array( 'gutierrez' );\r\n\t\t\t\tcase 'guérin': return array( 'guerin' );\r\n\t\t\t\tcase 'gál': return array( 'gal' );\r\n\t\t\t\tcase 'gárdonyi': return array( 'gardonyi' );\r\n\t\t\t\tcase 'gáspár': return array( 'gaspar','gašpar' );\r\n\t\t\t\tcase 'gärtner': return array( 'gaertner','gardiner','gartner' );\r\n\t\t\t\tcase 'géroux': return array( 'geroux','giroux' );\r\n\t\t\t\tcase 'górka': return array( 'gorecki','gorka' );\r\n\t\t\t\tcase 'górski': return array( 'gorski' );\r\n\t\t\t\tcase 'göransson': return array( 'goeransson','goransson' );\r\n\t\t\t\tcase 'görög': return array( 'goeroeg','gorog' );\r\n\t\t\t\tcase 'günther': return array( 'guenther','gunther' );\r\n\t\t\t\tcase 'haanraads': return array( 'haanraadts','haanraats','haenraets','hanraets' );\r\n\t\t\t\tcase 'haanraadts': return array( 'haanraads' );\r\n\t\t\t\tcase 'haanraats': return array( 'haanraads' );\r\n\t\t\t\tcase 'haas': return array( 'haase' );\r\n\t\t\t\tcase 'haase': return array( 'haas','hase' );\r\n\t\t\t\tcase 'hadaway': return array( 'hathaway' );\r\n\t\t\t\tcase 'haden': return array( 'hayden' );\r\n\t\t\t\tcase 'haenraets': return array( 'haanraads' );\r\n\t\t\t\tcase 'hafner': return array( 'havener' );\r\n\t\t\t\tcase 'hailey': return array( 'haley' );\r\n\t\t\t\tcase 'haines': return array( 'haynes' );\r\n\t\t\t\tcase 'hajos': return array( 'hajós' );\r\n\t\t\t\tcase 'hajós': return array( 'hajos' );\r\n\t\t\t\tcase 'halasz': return array( 'halász' );\r\n\t\t\t\tcase 'haley': return array( 'hailey','hayley' );\r\n\t\t\t\tcase 'hall': return array( 'halle' );\r\n\t\t\t\tcase 'halle': return array( 'hall' );\r\n\t\t\t\tcase 'halász': return array( 'halasz' );\r\n\t\t\t\tcase 'hambledon': return array( 'hambleton' );\r\n\t\t\t\tcase 'hambleton': return array( 'hambledon' );\r\n\t\t\t\tcase 'hameldon': return array( 'hamilton' );\r\n\t\t\t\tcase 'hamilton': return array( 'hameldon' );\r\n\t\t\t\tcase 'hanegan': return array( 'hanigan','hannigan','hannigen','o hannagain','ó hannagáin' );\r\n\t\t\t\tcase 'hanigan': return array( 'hanegan' );\r\n\t\t\t\tcase 'hannigan': return array( 'hanegan' );\r\n\t\t\t\tcase 'hannigen': return array( 'hanegan' );\r\n\t\t\t\tcase 'hanraets': return array( 'haanraads' );\r\n\t\t\t\tcase 'hansen': return array( 'hanson' );\r\n\t\t\t\tcase 'hanson': return array( 'hansen','hansson' );\r\n\t\t\t\tcase 'hansson': return array( 'hanson' );\r\n\t\t\t\tcase 'haraldsson': return array( 'haroldson' );\r\n\t\t\t\tcase 'hardie': return array( 'hardy' );\r\n\t\t\t\tcase 'hardy': return array( 'hardie' );\r\n\t\t\t\tcase 'harlan': return array( 'harland' );\r\n\t\t\t\tcase 'harland': return array( 'harlan' );\r\n\t\t\t\tcase 'harmaajaervi': return array( 'harmaajärvi' );\r\n\t\t\t\tcase 'harmaajarvi': return array( 'harmaajärvi' );\r\n\t\t\t\tcase 'harmaajärvi': return array( 'harmaajaervi','harmaajarvi' );\r\n\t\t\t\tcase 'harman': return array( 'harmon' );\r\n\t\t\t\tcase 'harmon': return array( 'harman','herman','hermann','hermansen','hermanson','hermansson','herrmann' );\r\n\t\t\t\tcase 'haroldson': return array( 'haraldsson' );\r\n\t\t\t\tcase 'hase': return array( 'haase' );\r\n\t\t\t\tcase 'hathaway': return array( 'hadaway','hatheway','hathoway' );\r\n\t\t\t\tcase 'hatheway': return array( 'hathaway' );\r\n\t\t\t\tcase 'hathoway': return array( 'hathaway' );\r\n\t\t\t\tcase 'havelka': return array( 'havliček','havlíček' );\r\n\t\t\t\tcase 'havener': return array( 'hafner' );\r\n\t\t\t\tcase 'havliček': return array( 'havelka','havlíček' );\r\n\t\t\t\tcase 'havlíček': return array( 'havelka','havliček' );\r\n\t\t\t\tcase 'haward': return array( 'hayward','howard' );\r\n\t\t\t\tcase 'hawking': return array( 'hawkins' );\r\n\t\t\t\tcase 'hawkins': return array( 'hawking' );\r\n\t\t\t\tcase 'hayden': return array( 'haden' );\r\n\t\t\t\tcase 'hayley': return array( 'haley' );\r\n\t\t\t\tcase 'haynes': return array( 'haines' );\r\n\t\t\t\tcase 'hayward': return array( 'haward' );\r\n\t\t\t\tcase 'headley': return array( 'hedley' );\r\n\t\t\t\tcase 'hebert': return array( 'hibbert','hébert' );\r\n\t\t\t\tcase 'hedley': return array( 'headley' );\r\n\t\t\t\tcase 'heffernan': return array( 'o hifearnain','ó hifearnáin' );\r\n\t\t\t\tcase 'hegedus': return array( 'hegedûs' );\r\n\t\t\t\tcase 'hegedûs': return array( 'hegedus' );\r\n\t\t\t\tcase 'heijman': return array( 'heijmans' );\r\n\t\t\t\tcase 'heijmans': return array( 'heijman' );\r\n\t\t\t\tcase 'heikki': return array( 'hicks' );\r\n\t\t\t\tcase 'heiman': return array( 'heyman' );\r\n\t\t\t\tcase 'heimans': return array( 'henningsen' );\r\n\t\t\t\tcase 'heinrich': return array( 'heinrichs' );\r\n\t\t\t\tcase 'heinrichs': return array( 'heinrich','henriksen','henriques','henryson','hinrichs' );\r\n\t\t\t\tcase 'heintze': return array( 'hintzen' );\r\n\t\t\t\tcase 'henderson': return array( 'hendriks' );\r\n\t\t\t\tcase 'hendriks': return array( 'henderson','hendrikx','hendrix','hendry' );\r\n\t\t\t\tcase 'hendrikx': return array( 'hendriks' );\r\n\t\t\t\tcase 'hendrix': return array( 'hendriks' );\r\n\t\t\t\tcase 'hendry': return array( 'hendriks' );\r\n\t\t\t\tcase 'henningsen': return array( 'heimans','heymans' );\r\n\t\t\t\tcase 'henriksen': return array( 'heinrichs' );\r\n\t\t\t\tcase 'henriques': return array( 'heinrichs' );\r\n\t\t\t\tcase 'henryson': return array( 'heinrichs' );\r\n\t\t\t\tcase 'herbert': return array( 'herberts','herbertson','herbertsson' );\r\n\t\t\t\tcase 'herberts': return array( 'herbert' );\r\n\t\t\t\tcase 'herbertson': return array( 'herbert' );\r\n\t\t\t\tcase 'herbertsson': return array( 'herbert' );\r\n\t\t\t\tcase 'herceg': return array( 'herczeg','herczog','herzog' );\r\n\t\t\t\tcase 'herczeg': return array( 'herceg' );\r\n\t\t\t\tcase 'herczog': return array( 'herceg' );\r\n\t\t\t\tcase 'herman': return array( 'harmon' );\r\n\t\t\t\tcase 'hermann': return array( 'harmon' );\r\n\t\t\t\tcase 'hermansen': return array( 'harmon' );\r\n\t\t\t\tcase 'hermanson': return array( 'harmon' );\r\n\t\t\t\tcase 'hermansson': return array( 'harmon' );\r\n\t\t\t\tcase 'herrera': return array( 'herrero' );\r\n\t\t\t\tcase 'herrero': return array( 'herrera' );\r\n\t\t\t\tcase 'herrmann': return array( 'harmon' );\r\n\t\t\t\tcase 'hershey': return array( 'hirsch' );\r\n\t\t\t\tcase 'herzog': return array( 'herceg' );\r\n\t\t\t\tcase 'heyman': return array( 'heiman' );\r\n\t\t\t\tcase 'heymans': return array( 'henningsen' );\r\n\t\t\t\tcase 'hibbert': return array( 'hebert','hébert' );\r\n\t\t\t\tcase 'hicks': return array( 'heikki' );\r\n\t\t\t\tcase 'hill': return array( 'hull' );\r\n\t\t\t\tcase 'hines': return array( 'hynes' );\r\n\t\t\t\tcase 'hinrichs': return array( 'heinrichs' );\r\n\t\t\t\tcase 'hintzen': return array( 'heintze' );\r\n\t\t\t\tcase 'hirsch': return array( 'hershey' );\r\n\t\t\t\tcase 'hoang': return array( 'hoàng','huang' );\r\n\t\t\t\tcase 'hobbes': return array( 'hobbs' );\r\n\t\t\t\tcase 'hobbs': return array( 'hobbes' );\r\n\t\t\t\tcase 'hobson': return array( 'hopkins','hopson' );\r\n\t\t\t\tcase 'hoedemaeker': return array( 'hoedemaekers','hoedemaker','hoedemakers','hutmacher' );\r\n\t\t\t\tcase 'hoedemaekers': return array( 'hoedemaeker' );\r\n\t\t\t\tcase 'hoedemaker': return array( 'hoedemaeker' );\r\n\t\t\t\tcase 'hoedemakers': return array( 'hoedemaeker' );\r\n\t\t\t\tcase 'hoefler': return array( 'höfler' );\r\n\t\t\t\tcase 'hoelzer': return array( 'holzer','hölzer' );\r\n\t\t\t\tcase 'hoffman': return array( 'hoffmann' );\r\n\t\t\t\tcase 'hoffmann': return array( 'hoffman','hofmann','huffman','huffmann' );\r\n\t\t\t\tcase 'hofler': return array( 'höfler' );\r\n\t\t\t\tcase 'hofmann': return array( 'hoffmann' );\r\n\t\t\t\tcase 'hogan': return array( 'o hogain','ó hógáin' );\r\n\t\t\t\tcase 'holgersen': return array( 'holgersson' );\r\n\t\t\t\tcase 'holgersson': return array( 'holgersen' );\r\n\t\t\t\tcase 'holguin': return array( 'holguín' );\r\n\t\t\t\tcase 'holguín': return array( 'holguin' );\r\n\t\t\t\tcase 'holland': return array( 'hollands','howland' );\r\n\t\t\t\tcase 'hollands': return array( 'holland' );\r\n\t\t\t\tcase 'holmstroem': return array( 'holmström' );\r\n\t\t\t\tcase 'holmstrom': return array( 'holmström' );\r\n\t\t\t\tcase 'holmström': return array( 'holmstroem','holmstrom' );\r\n\t\t\t\tcase 'holt': return array( 'hult' );\r\n\t\t\t\tcase 'holzer': return array( 'hoelzer','hölzer' );\r\n\t\t\t\tcase 'honeysett': return array( 'hunnisett' );\r\n\t\t\t\tcase 'hopkins': return array( 'hobson' );\r\n\t\t\t\tcase 'hopson': return array( 'hobson' );\r\n\t\t\t\tcase 'horn': return array( 'horne' );\r\n\t\t\t\tcase 'horne': return array( 'horn' );\r\n\t\t\t\tcase 'hornick': return array( 'hornik' );\r\n\t\t\t\tcase 'hornik': return array( 'hornick' );\r\n\t\t\t\tcase 'horvat': return array( 'horvatinčić' );\r\n\t\t\t\tcase 'horvath': return array( 'horváth' );\r\n\t\t\t\tcase 'horvatinčić': return array( 'horvat' );\r\n\t\t\t\tcase 'horváth': return array( 'horvath' );\r\n\t\t\t\tcase 'howard': return array( 'haward' );\r\n\t\t\t\tcase 'howland': return array( 'holland' );\r\n\t\t\t\tcase 'hoàng': return array( 'hoang','huang' );\r\n\t\t\t\tcase 'huang': return array( 'hoang','hoàng' );\r\n\t\t\t\tcase 'huber': return array( 'hüber' );\r\n\t\t\t\tcase 'hudson': return array( 'hutson' );\r\n\t\t\t\tcase 'hueber': return array( 'hüber' );\r\n\t\t\t\tcase 'huffman': return array( 'hoffmann' );\r\n\t\t\t\tcase 'huffmann': return array( 'hoffmann' );\r\n\t\t\t\tcase 'hull': return array( 'hill' );\r\n\t\t\t\tcase 'hult': return array( 'holt' );\r\n\t\t\t\tcase 'hunnisett': return array( 'honeysett' );\r\n\t\t\t\tcase 'hutmacher': return array( 'hoedemaeker' );\r\n\t\t\t\tcase 'hutson': return array( 'hudson' );\r\n\t\t\t\tcase 'hynes': return array( 'hines' );\r\n\t\t\t\tcase 'hébert': return array( 'hebert','hibbert' );\r\n\t\t\t\tcase 'höfler': return array( 'hoefler','hofler' );\r\n\t\t\t\tcase 'hölzer': return array( 'hoelzer','holzer' );\r\n\t\t\t\tcase 'hüber': return array( 'huber','hueber' );\r\n\t\t\t\tcase 'ibanez': return array( 'ibáñez' );\r\n\t\t\t\tcase 'ibbot': return array( 'ibbott' );\r\n\t\t\t\tcase 'ibbott': return array( 'ibbot' );\r\n\t\t\t\tcase 'ibáñez': return array( 'ibanez' );\r\n\t\t\t\tcase 'ignacz': return array( 'ignácz' );\r\n\t\t\t\tcase 'ignatiev': return array( 'ignatov' );\r\n\t\t\t\tcase 'ignatov': return array( 'ignatiev' );\r\n\t\t\t\tcase 'ignácz': return array( 'ignacz' );\r\n\t\t\t\tcase 'iliescu': return array( 'illes','illés' );\r\n\t\t\t\tcase 'illes': return array( 'iliescu','illés' );\r\n\t\t\t\tcase 'illés': return array( 'iliescu','illes' );\r\n\t\t\t\tcase 'iniguez': return array( 'iñíguez' );\r\n\t\t\t\tcase 'ionesco': return array( 'ionescu' );\r\n\t\t\t\tcase 'ionescu': return array( 'ionesco' );\r\n\t\t\t\tcase 'irvin': return array( 'irvine','irving' );\r\n\t\t\t\tcase 'irvine': return array( 'irvin' );\r\n\t\t\t\tcase 'irving': return array( 'irvin' );\r\n\t\t\t\tcase 'ivanov': return array( 'ivanović' );\r\n\t\t\t\tcase 'ivanović': return array( 'ivanov' );\r\n\t\t\t\tcase 'iñíguez': return array( 'iniguez' );\r\n\t\t\t\tcase 'jacobs': return array( 'jacobse','jacobsen','jacobson','jakobsen' );\r\n\t\t\t\tcase 'jacobse': return array( 'jacobs' );\r\n\t\t\t\tcase 'jacobsen': return array( 'jacobs' );\r\n\t\t\t\tcase 'jacobson': return array( 'jacobs' );\r\n\t\t\t\tcase 'jaeger': return array( 'jager' );\r\n\t\t\t\tcase 'jaervi': return array( 'järvi' );\r\n\t\t\t\tcase 'jaervinen': return array( 'järvinen' );\r\n\t\t\t\tcase 'jager': return array( 'jaeger' );\r\n\t\t\t\tcase 'jakobsen': return array( 'jacobs' );\r\n\t\t\t\tcase 'jameson': return array( 'jamison' );\r\n\t\t\t\tcase 'jamison': return array( 'jameson' );\r\n\t\t\t\tcase 'janiček': return array( 'janz' );\r\n\t\t\t\tcase 'jankovic': return array( 'jankovics','janković','jankovič' );\r\n\t\t\t\tcase 'jankovics': return array( 'jankovic' );\r\n\t\t\t\tcase 'janković': return array( 'jankovic' );\r\n\t\t\t\tcase 'jankovič': return array( 'jankovic' );\r\n\t\t\t\tcase 'jans': return array( 'janz' );\r\n\t\t\t\tcase 'jansen': return array( 'jansens','jansing','jansingh','jansink','janson','janssen','janssens','jansson','janzen','jenkins','jensen','jensson','joensson','johannsson','johansen','johansson','johnson','johnsson','jonsson','jóhannsson','jönsson' );\r\n\t\t\t\tcase 'jansens': return array( 'jansen' );\r\n\t\t\t\tcase 'jansing': return array( 'jansen' );\r\n\t\t\t\tcase 'jansingh': return array( 'jansen' );\r\n\t\t\t\tcase 'jansink': return array( 'jansen' );\r\n\t\t\t\tcase 'janson': return array( 'jansen' );\r\n\t\t\t\tcase 'janssen': return array( 'jansen' );\r\n\t\t\t\tcase 'janssens': return array( 'jansen' );\r\n\t\t\t\tcase 'jansson': return array( 'jansen' );\r\n\t\t\t\tcase 'janz': return array( 'janiček','jans','jeanes','jinks','johns','jones' );\r\n\t\t\t\tcase 'janzen': return array( 'jansen' );\r\n\t\t\t\tcase 'jarvi': return array( 'järvi' );\r\n\t\t\t\tcase 'jarvinen': return array( 'järvinen' );\r\n\t\t\t\tcase 'jarvis': return array( 'jervis' );\r\n\t\t\t\tcase 'jaskolski': return array( 'jaskulski' );\r\n\t\t\t\tcase 'jaskulski': return array( 'jaskolski' );\r\n\t\t\t\tcase 'jaso': return array( 'jasso' );\r\n\t\t\t\tcase 'jasso': return array( 'jaso' );\r\n\t\t\t\tcase 'jeanes': return array( 'janz' );\r\n\t\t\t\tcase 'jeffers': return array( 'jefferson' );\r\n\t\t\t\tcase 'jefferson': return array( 'jeffers','jeffries' );\r\n\t\t\t\tcase 'jeffries': return array( 'jefferson' );\r\n\t\t\t\tcase 'jenkins': return array( 'jansen' );\r\n\t\t\t\tcase 'jensen': return array( 'jansen' );\r\n\t\t\t\tcase 'jensson': return array( 'jansen' );\r\n\t\t\t\tcase 'jephson': return array( 'jepson' );\r\n\t\t\t\tcase 'jepson': return array( 'jephson' );\r\n\t\t\t\tcase 'jervis': return array( 'jarvis' );\r\n\t\t\t\tcase 'jewel': return array( 'jewell' );\r\n\t\t\t\tcase 'jewell': return array( 'jewel' );\r\n\t\t\t\tcase 'jinks': return array( 'janz' );\r\n\t\t\t\tcase 'jo': return array( 'jó' );\r\n\t\t\t\tcase 'joensson': return array( 'jansen','jönsson' );\r\n\t\t\t\tcase 'johannsson': return array( 'jansen','jóhannsson' );\r\n\t\t\t\tcase 'johansen': return array( 'jansen' );\r\n\t\t\t\tcase 'johansson': return array( 'jansen' );\r\n\t\t\t\tcase 'johns': return array( 'janz' );\r\n\t\t\t\tcase 'johnson': return array( 'jansen' );\r\n\t\t\t\tcase 'johnsson': return array( 'jansen' );\r\n\t\t\t\tcase 'joiner': return array( 'joyner' );\r\n\t\t\t\tcase 'jonas': return array( 'jónás' );\r\n\t\t\t\tcase 'jonasen': return array( 'jonasson' );\r\n\t\t\t\tcase 'jonasson': return array( 'jonasen' );\r\n\t\t\t\tcase 'jonckers': return array( 'jonkers' );\r\n\t\t\t\tcase 'jones': return array( 'janz' );\r\n\t\t\t\tcase 'jonker': return array( 'jonkers' );\r\n\t\t\t\tcase 'jonkers': return array( 'jonckers','jonker','jonkheer' );\r\n\t\t\t\tcase 'jonkheer': return array( 'jonkers' );\r\n\t\t\t\tcase 'jonsson': return array( 'jansen' );\r\n\t\t\t\tcase 'joo': return array( 'joó' );\r\n\t\t\t\tcase 'jorda': return array( 'jordà' );\r\n\t\t\t\tcase 'jordà': return array( 'jorda' );\r\n\t\t\t\tcase 'jorgensen': return array( 'jørgensen' );\r\n\t\t\t\tcase 'josephs': return array( 'josephson' );\r\n\t\t\t\tcase 'josephson': return array( 'josephs' );\r\n\t\t\t\tcase 'joyner': return array( 'joiner' );\r\n\t\t\t\tcase 'joó': return array( 'joo' );\r\n\t\t\t\tcase 'juarez': return array( 'juárez' );\r\n\t\t\t\tcase 'juhasz': return array( 'juhász' );\r\n\t\t\t\tcase 'juhász': return array( 'juhasz' );\r\n\t\t\t\tcase 'jung': return array( 'junge' );\r\n\t\t\t\tcase 'junge': return array( 'jung' );\r\n\t\t\t\tcase 'jurić': return array( 'juriša' );\r\n\t\t\t\tcase 'juriša': return array( 'jurić' );\r\n\t\t\t\tcase 'juárez': return array( 'juarez' );\r\n\t\t\t\tcase 'jäger': return array( 'jaeger','jager' );\r\n\t\t\t\tcase 'järvi': return array( 'jaervi','jarvi' );\r\n\t\t\t\tcase 'järvinen': return array( 'jaervinen','jarvinen' );\r\n\t\t\t\tcase 'jó': return array( 'jo' );\r\n\t\t\t\tcase 'jóhannsson': return array( 'jansen','johannsson' );\r\n\t\t\t\tcase 'jónás': return array( 'jonas' );\r\n\t\t\t\tcase 'jönsson': return array( 'jansen','joensson','jonsson' );\r\n\t\t\t\tcase 'jørgensen': return array( 'jorgensen' );\r\n\t\t\t\tcase 'kadar': return array( 'kádár' );\r\n\t\t\t\tcase 'kaestner': return array( 'kästner' );\r\n\t\t\t\tcase 'kaeufer': return array( 'kaufer','käufer' );\r\n\t\t\t\tcase 'kalmar': return array( 'kalmár' );\r\n\t\t\t\tcase 'kalmár': return array( 'kalmar' );\r\n\t\t\t\tcase 'karim': return array( 'karimi' );\r\n\t\t\t\tcase 'karimi': return array( 'karim' );\r\n\t\t\t\tcase 'karlsen': return array( 'karlsson' );\r\n\t\t\t\tcase 'karlsson': return array( 'karlsen' );\r\n\t\t\t\tcase 'karpathy': return array( 'kárpáthy' );\r\n\t\t\t\tcase 'karpati': return array( 'kárpáti' );\r\n\t\t\t\tcase 'karpaty': return array( 'kárpáty' );\r\n\t\t\t\tcase 'karstensen': return array( 'kristensen','kristiansen','kristoffersen' );\r\n\t\t\t\tcase 'kaspar': return array( 'kaspersen','kasprzak' );\r\n\t\t\t\tcase 'kaspersen': return array( 'kaspar' );\r\n\t\t\t\tcase 'kasprzak': return array( 'kaspar' );\r\n\t\t\t\tcase 'kastner': return array( 'kästner' );\r\n\t\t\t\tcase 'kato': return array( 'kató' );\r\n\t\t\t\tcase 'kató': return array( 'kato' );\r\n\t\t\t\tcase 'kaufer': return array( 'kaeufer','käufer' );\r\n\t\t\t\tcase 'kauffmann': return array( 'kaufman' );\r\n\t\t\t\tcase 'kaufman': return array( 'kauffmann' );\r\n\t\t\t\tcase 'kavanagh': return array( 'kavanaugh' );\r\n\t\t\t\tcase 'kavanaugh': return array( 'kavanagh' );\r\n\t\t\t\tcase 'kay': return array( 'key' );\r\n\t\t\t\tcase 'kecskemeti': return array( 'kecskeméti' );\r\n\t\t\t\tcase 'kecskeméti': return array( 'kecskemeti' );\r\n\t\t\t\tcase 'keir': return array( 'kerr' );\r\n\t\t\t\tcase 'kelemen': return array( 'klements' );\r\n\t\t\t\tcase 'kelley': return array( 'kelly' );\r\n\t\t\t\tcase 'kelly': return array( 'kelley' );\r\n\t\t\t\tcase 'kemeny': return array( 'kemény' );\r\n\t\t\t\tcase 'kemp': return array( 'kempf' );\r\n\t\t\t\tcase 'kempf': return array( 'kemp' );\r\n\t\t\t\tcase 'kemény': return array( 'kemeny' );\r\n\t\t\t\tcase 'kendal': return array( 'kendall' );\r\n\t\t\t\tcase 'kendall': return array( 'kendal' );\r\n\t\t\t\tcase 'kermit': return array( 'kermode' );\r\n\t\t\t\tcase 'kermode': return array( 'kermit' );\r\n\t\t\t\tcase 'kerr': return array( 'keir' );\r\n\t\t\t\tcase 'kertesz': return array( 'kertész' );\r\n\t\t\t\tcase 'kertész': return array( 'kertesz' );\r\n\t\t\t\tcase 'kerwar': return array( 'kerwer' );\r\n\t\t\t\tcase 'kerwer': return array( 'kerwar' );\r\n\t\t\t\tcase 'kevins': return array( 'kevinson' );\r\n\t\t\t\tcase 'kevinson': return array( 'kevins' );\r\n\t\t\t\tcase 'key': return array( 'kay' );\r\n\t\t\t\tcase 'kimberley': return array( 'kimberly' );\r\n\t\t\t\tcase 'kimberly': return array( 'kimberley' );\r\n\t\t\t\tcase 'king': return array( 'koenig','konig','könig' );\r\n\t\t\t\tcase 'kiraly': return array( 'király' );\r\n\t\t\t\tcase 'király': return array( 'kiraly' );\r\n\t\t\t\tcase 'kis': return array( 'kiss' );\r\n\t\t\t\tcase 'kiss': return array( 'kis' );\r\n\t\t\t\tcase 'kitchen': return array( 'kitchens' );\r\n\t\t\t\tcase 'kitchens': return array( 'kitchen' );\r\n\t\t\t\tcase 'klaasen': return array( 'klasson' );\r\n\t\t\t\tcase 'klassen': return array( 'klasson' );\r\n\t\t\t\tcase 'klasson': return array( 'klaasen','klassen','klausen','kolijn' );\r\n\t\t\t\tcase 'klausen': return array( 'klasson' );\r\n\t\t\t\tcase 'klements': return array( 'kelemen' );\r\n\t\t\t\tcase 'klerk': return array( 'klerken' );\r\n\t\t\t\tcase 'klerken': return array( 'klerk','klerks','klerkse','klerkx','klerx' );\r\n\t\t\t\tcase 'klerks': return array( 'klerken' );\r\n\t\t\t\tcase 'klerkse': return array( 'klerken' );\r\n\t\t\t\tcase 'klerkx': return array( 'klerken' );\r\n\t\t\t\tcase 'klerx': return array( 'klerken' );\r\n\t\t\t\tcase 'klima': return array( 'klimy' );\r\n\t\t\t\tcase 'klimek': return array( 'klímek' );\r\n\t\t\t\tcase 'klimy': return array( 'klima' );\r\n\t\t\t\tcase 'klímek': return array( 'klimek' );\r\n\t\t\t\tcase 'knef': return array( 'kneib' );\r\n\t\t\t\tcase 'kneib': return array( 'knef' );\r\n\t\t\t\tcase 'knepp': return array( 'knopf','knopp' );\r\n\t\t\t\tcase 'knopf': return array( 'knepp' );\r\n\t\t\t\tcase 'knopp': return array( 'knepp' );\r\n\t\t\t\tcase 'knudsen': return array( 'knutsen','knutson','knutsson' );\r\n\t\t\t\tcase 'knutsen': return array( 'knudsen' );\r\n\t\t\t\tcase 'knutson': return array( 'knudsen' );\r\n\t\t\t\tcase 'knutsson': return array( 'knudsen' );\r\n\t\t\t\tcase 'kobor': return array( 'kóbor' );\r\n\t\t\t\tcase 'koc': return array( 'koç' );\r\n\t\t\t\tcase 'koch': return array( 'kock' );\r\n\t\t\t\tcase 'kock': return array( 'koch' );\r\n\t\t\t\tcase 'koehl': return array( 'kohl','köhl' );\r\n\t\t\t\tcase 'koehler': return array( 'kohler','köhler' );\r\n\t\t\t\tcase 'koemans': return array( 'koumans' );\r\n\t\t\t\tcase 'koenig': return array( 'king','könig' );\r\n\t\t\t\tcase 'koenigsmann': return array( 'königsmann' );\r\n\t\t\t\tcase 'koever': return array( 'kövér' );\r\n\t\t\t\tcase 'kohl': return array( 'koehl','köhl' );\r\n\t\t\t\tcase 'kohler': return array( 'koehler','köhler' );\r\n\t\t\t\tcase 'kolen': return array( 'koolen' );\r\n\t\t\t\tcase 'kolijn': return array( 'klasson' );\r\n\t\t\t\tcase 'kollen': return array( 'koolen' );\r\n\t\t\t\tcase 'konig': return array( 'king','könig' );\r\n\t\t\t\tcase 'konigsmann': return array( 'königsmann' );\r\n\t\t\t\tcase 'kool': return array( 'koole' );\r\n\t\t\t\tcase 'koole': return array( 'kool' );\r\n\t\t\t\tcase 'koolen': return array( 'kolen','kollen' );\r\n\t\t\t\tcase 'koszorus': return array( 'koszorús' );\r\n\t\t\t\tcase 'koszorús': return array( 'koszorus' );\r\n\t\t\t\tcase 'koumans': return array( 'koemans' );\r\n\t\t\t\tcase 'kovac': return array( 'kovach','kovacs','kovách','kovács' );\r\n\t\t\t\tcase 'kovach': return array( 'kovac','kovách' );\r\n\t\t\t\tcase 'kovacs': return array( 'kovac','kovács' );\r\n\t\t\t\tcase 'kovats': return array( 'kováts' );\r\n\t\t\t\tcase 'kovač': return array( 'kovař','kováč','kovář' );\r\n\t\t\t\tcase 'kovař': return array( 'kovač','kovář' );\r\n\t\t\t\tcase 'kover': return array( 'kövér' );\r\n\t\t\t\tcase 'kovách': return array( 'kovac','kovach' );\r\n\t\t\t\tcase 'kovács': return array( 'kovac','kovacs' );\r\n\t\t\t\tcase 'kováts': return array( 'kovats' );\r\n\t\t\t\tcase 'kováč': return array( 'kovač' );\r\n\t\t\t\tcase 'kovář': return array( 'kovač','kovař' );\r\n\t\t\t\tcase 'koç': return array( 'koc' );\r\n\t\t\t\tcase 'kraemer': return array( 'kramr','krämer' );\r\n\t\t\t\tcase 'kramer': return array( 'kramr','krämer' );\r\n\t\t\t\tcase 'kramr': return array( 'kraemer','kramer','krämer' );\r\n\t\t\t\tcase 'kraus': return array( 'krause','krauss','kruse' );\r\n\t\t\t\tcase 'krause': return array( 'kraus' );\r\n\t\t\t\tcase 'krauss': return array( 'kraus' );\r\n\t\t\t\tcase 'krausz': return array( 'krauß' );\r\n\t\t\t\tcase 'krauß': return array( 'krausz' );\r\n\t\t\t\tcase 'kristensen': return array( 'karstensen' );\r\n\t\t\t\tcase 'kristiansen': return array( 'karstensen' );\r\n\t\t\t\tcase 'kristoffersen': return array( 'karstensen' );\r\n\t\t\t\tcase 'kroeger': return array( 'kruger','kröger' );\r\n\t\t\t\tcase 'kroger': return array( 'kruger','kröger' );\r\n\t\t\t\tcase 'krol': return array( 'król' );\r\n\t\t\t\tcase 'krueger': return array( 'kruger','krüger' );\r\n\t\t\t\tcase 'krueger ': return array( 'krüger ' );\r\n\t\t\t\tcase 'kruger': return array( 'kroeger','kroger','krueger','kröger','krüger' );\r\n\t\t\t\tcase 'kruger ': return array( 'krüger ' );\r\n\t\t\t\tcase 'kruse': return array( 'kraus' );\r\n\t\t\t\tcase 'krämer': return array( 'kraemer','kramer','kramr' );\r\n\t\t\t\tcase 'król': return array( 'krol' );\r\n\t\t\t\tcase 'kröger': return array( 'kroeger','kroger','kruger' );\r\n\t\t\t\tcase 'krüger': return array( 'krueger','kruger' );\r\n\t\t\t\tcase 'krüger ': return array( 'krueger ','kruger ' );\r\n\t\t\t\tcase 'kuchler': return array( 'küchler' );\r\n\t\t\t\tcase 'kucuk': return array( 'küçük' );\r\n\t\t\t\tcase 'kuechler': return array( 'küchler' );\r\n\t\t\t\tcase 'kuecuek': return array( 'küçük' );\r\n\t\t\t\tcase 'kundakci': return array( 'kundakçi' );\r\n\t\t\t\tcase 'kundakçi': return array( 'kundakci' );\r\n\t\t\t\tcase 'kunkel': return array( 'kunkle' );\r\n\t\t\t\tcase 'kunkle': return array( 'kunkel' );\r\n\t\t\t\tcase 'kádár': return array( 'kadar' );\r\n\t\t\t\tcase 'kárpáthy': return array( 'karpathy' );\r\n\t\t\t\tcase 'kárpáti': return array( 'karpati' );\r\n\t\t\t\tcase 'kárpáty': return array( 'karpaty' );\r\n\t\t\t\tcase 'kästner': return array( 'kaestner','kastner' );\r\n\t\t\t\tcase 'käufer': return array( 'kaeufer','kaufer' );\r\n\t\t\t\tcase 'kóbor': return array( 'kobor' );\r\n\t\t\t\tcase 'köhl': return array( 'koehl','kohl' );\r\n\t\t\t\tcase 'köhler': return array( 'koehler','kohler' );\r\n\t\t\t\tcase 'könig': return array( 'king','koenig','konig' );\r\n\t\t\t\tcase 'königsmann': return array( 'koenigsmann','konigsmann' );\r\n\t\t\t\tcase 'kövér': return array( 'koever','kover' );\r\n\t\t\t\tcase 'küchler': return array( 'kuchler','kuechler' );\r\n\t\t\t\tcase 'küçük': return array( 'kucuk','kuecuek' );\r\n\t\t\t\tcase 'laakkonen': return array( 'laaksonen' );\r\n\t\t\t\tcase 'laaksonen': return array( 'laakkonen' );\r\n\t\t\t\tcase 'laberenz': return array( 'lafrentz' );\r\n\t\t\t\tcase 'lacey': return array( 'lacy' );\r\n\t\t\t\tcase 'laconi': return array( 'làconi' );\r\n\t\t\t\tcase 'lacy': return array( 'lacey' );\r\n\t\t\t\tcase 'lafrentz': return array( 'laberenz','lafrenz','leverenz','lieberenz' );\r\n\t\t\t\tcase 'lafrenz': return array( 'lafrentz' );\r\n\t\t\t\tcase 'lagana': return array( 'laganà' );\r\n\t\t\t\tcase 'laganà': return array( 'lagana' );\r\n\t\t\t\tcase 'lagomarsino': return array( 'lagomarsìno' );\r\n\t\t\t\tcase 'lagomarsìno': return array( 'lagomarsino' );\r\n\t\t\t\tcase 'lagounov': return array( 'lagunov' );\r\n\t\t\t\tcase 'lagunov': return array( 'lagounov' );\r\n\t\t\t\tcase 'lam': return array( 'lim' );\r\n\t\t\t\tcase 'lambert': return array( 'lamberti' );\r\n\t\t\t\tcase 'lamberti': return array( 'lambert' );\r\n\t\t\t\tcase 'landi': return array( 'lando' );\r\n\t\t\t\tcase 'lando': return array( 'landi' );\r\n\t\t\t\tcase 'lang': return array( 'lange' );\r\n\t\t\t\tcase 'lange': return array( 'lang' );\r\n\t\t\t\tcase 'langlais': return array( 'langley','langlois' );\r\n\t\t\t\tcase 'langley': return array( 'langlais' );\r\n\t\t\t\tcase 'langlois': return array( 'langlais' );\r\n\t\t\t\tcase 'lannon': return array( 'lennon','o leannain','ó leannáin' );\r\n\t\t\t\tcase 'larenz': return array( 'laurenz' );\r\n\t\t\t\tcase 'larsen': return array( 'larson','larsson' );\r\n\t\t\t\tcase 'larson': return array( 'larsen' );\r\n\t\t\t\tcase 'larsson': return array( 'larsen' );\r\n\t\t\t\tcase 'laska': return array( 'láska' );\r\n\t\t\t\tcase 'laszlo': return array( 'lászló' );\r\n\t\t\t\tcase 'lau': return array( 'liu' );\r\n\t\t\t\tcase 'laurent': return array( 'lewerentz','lorentz' );\r\n\t\t\t\tcase 'laurenz': return array( 'larenz','lawerenz','lawrence','lawrenz','lewerenz','lohrenz','lorenz','lorenzen' );\r\n\t\t\t\tcase 'lauritsen': return array( 'lauritz','loritz' );\r\n\t\t\t\tcase 'lauritz': return array( 'lauritsen' );\r\n\t\t\t\tcase 'lauwers': return array( 'loris' );\r\n\t\t\t\tcase 'law': return array( 'low','lowe' );\r\n\t\t\t\tcase 'lawerenz': return array( 'laurenz' );\r\n\t\t\t\tcase 'lawrence': return array( 'laurenz' );\r\n\t\t\t\tcase 'lawrenz': return array( 'laurenz' );\r\n\t\t\t\tcase 'layton': return array( 'leyton' );\r\n\t\t\t\tcase 'lazar': return array( 'lazzari','lázár' );\r\n\t\t\t\tcase 'lazzari': return array( 'lazar','lázár' );\r\n\t\t\t\tcase 'le': return array( 'lê' );\r\n\t\t\t\tcase 'leavitt': return array( 'levitt' );\r\n\t\t\t\tcase 'lecuyer': return array( 'lécuyer' );\r\n\t\t\t\tcase 'lefevre': return array( 'lefévre' );\r\n\t\t\t\tcase 'lefévre': return array( 'lefevre' );\r\n\t\t\t\tcase 'leggieri': return array( 'leggièri' );\r\n\t\t\t\tcase 'leggièri': return array( 'leggieri' );\r\n\t\t\t\tcase 'leitz': return array( 'leitzke','ludwig' );\r\n\t\t\t\tcase 'leitzke': return array( 'leitz' );\r\n\t\t\t\tcase 'lemieux': return array( 'lémieux' );\r\n\t\t\t\tcase 'lemmi': return array( 'lèmmi' );\r\n\t\t\t\tcase 'lennon': return array( 'lannon' );\r\n\t\t\t\tcase 'lennox': return array( 'lenox' );\r\n\t\t\t\tcase 'lenox': return array( 'lennox' );\r\n\t\t\t\tcase 'leon': return array( 'leone','leoni','lyon' );\r\n\t\t\t\tcase 'leonard': return array( 'leonardsen' );\r\n\t\t\t\tcase 'leonardsen': return array( 'leonard','leonardson','leonardsson' );\r\n\t\t\t\tcase 'leonardson': return array( 'leonardsen' );\r\n\t\t\t\tcase 'leonardsson': return array( 'leonardsen' );\r\n\t\t\t\tcase 'leone': return array( 'leon' );\r\n\t\t\t\tcase 'leoni': return array( 'leon' );\r\n\t\t\t\tcase 'lesley': return array( 'leslie' );\r\n\t\t\t\tcase 'leslie': return array( 'lesley' );\r\n\t\t\t\tcase 'lester': return array( 'lister' );\r\n\t\t\t\tcase 'leveque': return array( 'lévêque' );\r\n\t\t\t\tcase 'leverenz': return array( 'lafrentz' );\r\n\t\t\t\tcase 'levesque': return array( 'lévesque' );\r\n\t\t\t\tcase 'levitt': return array( 'leavitt' );\r\n\t\t\t\tcase 'lewerentz': return array( 'laurent' );\r\n\t\t\t\tcase 'lewerenz': return array( 'laurenz' );\r\n\t\t\t\tcase 'leyton': return array( 'layton' );\r\n\t\t\t\tcase 'lieberenz': return array( 'lafrentz' );\r\n\t\t\t\tcase 'lim': return array( 'lam','lin' );\r\n\t\t\t\tcase 'lin': return array( 'lim' );\r\n\t\t\t\tcase 'lindon': return array( 'lyndon' );\r\n\t\t\t\tcase 'lindsay': return array( 'lindsey' );\r\n\t\t\t\tcase 'lindsey': return array( 'lindsay' );\r\n\t\t\t\tcase 'lindstroem': return array( 'lindström' );\r\n\t\t\t\tcase 'lindstrom': return array( 'lindström' );\r\n\t\t\t\tcase 'lindström': return array( 'lindstroem','lindstrom' );\r\n\t\t\t\tcase 'linton': return array( 'lynton' );\r\n\t\t\t\tcase 'linwood': return array( 'lynwood' );\r\n\t\t\t\tcase 'lister': return array( 'lester' );\r\n\t\t\t\tcase 'liu': return array( 'lau' );\r\n\t\t\t\tcase 'llewellyn': return array( 'llywelyn' );\r\n\t\t\t\tcase 'llywelyn': return array( 'llewellyn' );\r\n\t\t\t\tcase 'loefgren': return array( 'löfgren' );\r\n\t\t\t\tcase 'loewe': return array( 'löwe' );\r\n\t\t\t\tcase 'lofgren': return array( 'löfgren' );\r\n\t\t\t\tcase 'lohrenz': return array( 'laurenz' );\r\n\t\t\t\tcase 'long': return array( 'longo' );\r\n\t\t\t\tcase 'longo': return array( 'long','lungu' );\r\n\t\t\t\tcase 'lorentz': return array( 'laurent' );\r\n\t\t\t\tcase 'lorenz': return array( 'laurenz' );\r\n\t\t\t\tcase 'lorenzen': return array( 'laurenz' );\r\n\t\t\t\tcase 'loris': return array( 'lauwers' );\r\n\t\t\t\tcase 'loritz': return array( 'lauritsen' );\r\n\t\t\t\tcase 'lovasz': return array( 'lovász' );\r\n\t\t\t\tcase 'lovel': return array( 'lovell' );\r\n\t\t\t\tcase 'lovell': return array( 'lovel' );\r\n\t\t\t\tcase 'lovász': return array( 'lovasz' );\r\n\t\t\t\tcase 'low': return array( 'law' );\r\n\t\t\t\tcase 'lowe': return array( 'law','löwe' );\r\n\t\t\t\tcase 'lucassen': return array( 'lukeson' );\r\n\t\t\t\tcase 'ludwig': return array( 'leitz' );\r\n\t\t\t\tcase 'lukacs': return array( 'lukić','lukács' );\r\n\t\t\t\tcase 'lukeson': return array( 'lucassen' );\r\n\t\t\t\tcase 'lukić': return array( 'lukacs','lukska','lukács' );\r\n\t\t\t\tcase 'lukska': return array( 'lukić' );\r\n\t\t\t\tcase 'lukács': return array( 'lukacs','lukić' );\r\n\t\t\t\tcase 'lundgren': return array( 'lundquist' );\r\n\t\t\t\tcase 'lundquist': return array( 'lundgren' );\r\n\t\t\t\tcase 'lungu': return array( 'longo' );\r\n\t\t\t\tcase 'lyndon': return array( 'lindon' );\r\n\t\t\t\tcase 'lynton': return array( 'linton' );\r\n\t\t\t\tcase 'lynwood': return array( 'linwood' );\r\n\t\t\t\tcase 'lyon': return array( 'leon' );\r\n\t\t\t\tcase 'làconi': return array( 'laconi' );\r\n\t\t\t\tcase 'láska': return array( 'laska' );\r\n\t\t\t\tcase 'lászló': return array( 'laszlo' );\r\n\t\t\t\tcase 'lázár': return array( 'lazar','lazzari' );\r\n\t\t\t\tcase 'lèmmi': return array( 'lemmi' );\r\n\t\t\t\tcase 'lécuyer': return array( 'lecuyer' );\r\n\t\t\t\tcase 'lémieux': return array( 'lemieux' );\r\n\t\t\t\tcase 'lévesque': return array( 'levesque' );\r\n\t\t\t\tcase 'lévêque': return array( 'leveque' );\r\n\t\t\t\tcase 'lê': return array( 'le' );\r\n\t\t\t\tcase 'löfgren': return array( 'loefgren','lofgren' );\r\n\t\t\t\tcase 'löwe': return array( 'loewe','lowe' );\r\n\t\t\t\tcase 'ma': return array( 'mah' );\r\n\t\t\t\tcase 'maas': return array( 'maes','mas','masi','mašek' );\r\n\t\t\t\tcase 'mac alastair': return array( 'mcalister' );\r\n\t\t\t\tcase 'mac an aba': return array( 'mcnab' );\r\n\t\t\t\tcase 'mac an tsaoir': return array( 'macintyre' );\r\n\t\t\t\tcase 'mac aodhagain': return array( 'mac aodhagáin' );\r\n\t\t\t\tcase 'mac aodhagáin': return array( 'mac aodhagain' );\r\n\t\t\t\tcase 'mac caba': return array( 'mac cába','mccabe' );\r\n\t\t\t\tcase 'mac cleirich': return array( 'mac cléirich','macclery' );\r\n\t\t\t\tcase 'mac cléirich': return array( 'mac cleirich','macclery' );\r\n\t\t\t\tcase 'mac cnaimhin': return array( 'mac cnáimhín' );\r\n\t\t\t\tcase 'mac cnáimhín': return array( 'mac cnaimhin' );\r\n\t\t\t\tcase 'mac coinnich': return array( 'mackenzie' );\r\n\t\t\t\tcase 'mac coluim': return array( 'maccallion' );\r\n\t\t\t\tcase 'mac cormaic': return array( 'mccormick' );\r\n\t\t\t\tcase 'mac cába': return array( 'mac caba','mccabe' );\r\n\t\t\t\tcase 'mac daibheid': return array( 'mac daibhéid','mcdevitt' );\r\n\t\t\t\tcase 'mac daibhéid': return array( 'mac daibheid','mcdevitt' );\r\n\t\t\t\tcase 'mac diarmada': return array( 'macdermott' );\r\n\t\t\t\tcase 'mac domhnaill': return array( 'mcdaniel' );\r\n\t\t\t\tcase 'mac duibhshithe': return array( 'mac duibhshíthe' );\r\n\t\t\t\tcase 'mac duibhshíthe': return array( 'mac duibhshithe' );\r\n\t\t\t\tcase 'mac ealair': return array( 'mckellar' );\r\n\t\t\t\tcase 'mac gilleain': return array( 'maclean' );\r\n\t\t\t\tcase 'mac giolla eoin': return array( 'maclean' );\r\n\t\t\t\tcase 'mac giolla fhaolain': return array( 'mac giolla fhaoláin' );\r\n\t\t\t\tcase 'mac giolla fhaoláin': return array( 'mac giolla fhaolain' );\r\n\t\t\t\tcase 'mac griogair': return array( 'macgregor' );\r\n\t\t\t\tcase 'mac leoid': return array( 'mac leòid','macleod' );\r\n\t\t\t\tcase 'mac leòid': return array( 'mac leoid','macleod' );\r\n\t\t\t\tcase 'mac maghnuis': return array( 'magnusson' );\r\n\t\t\t\tcase 'mac mathghamhna': return array( 'macmathan' );\r\n\t\t\t\tcase 'mac naoimhin': return array( 'mac naoimhín' );\r\n\t\t\t\tcase 'mac naoimhín': return array( 'mac naoimhin' );\r\n\t\t\t\tcase 'mac neachtain': return array( 'mcnaughton' );\r\n\t\t\t\tcase 'mac neill': return array( 'mac néill','macneil' );\r\n\t\t\t\tcase 'mac niall': return array( 'macneil' );\r\n\t\t\t\tcase 'mac néill': return array( 'mac neill','macneil' );\r\n\t\t\t\tcase 'mac pharlain': return array( 'macfarland' );\r\n\t\t\t\tcase 'mac reachtain': return array( 'mccracken' );\r\n\t\t\t\tcase 'mac ruaidhri': return array( 'mac ruaidhrí' );\r\n\t\t\t\tcase 'mac ruaidhrí': return array( 'mac ruaidhri' );\r\n\t\t\t\tcase 'mac uileagoid': return array( 'mac uileagóid','mcelligott' );\r\n\t\t\t\tcase 'mac uileagóid': return array( 'mac uileagoid','mcelligott' );\r\n\t\t\t\tcase 'macangus': return array( 'maccance' );\r\n\t\t\t\tcase 'macbride': return array( 'mcbride' );\r\n\t\t\t\tcase 'maccailin': return array( 'maccailín','maccallion' );\r\n\t\t\t\tcase 'maccailín': return array( 'maccailin','maccallion' );\r\n\t\t\t\tcase 'maccallion': return array( 'mac coluim','maccailin','maccailín','maccallum' );\r\n\t\t\t\tcase 'maccallum': return array( 'maccallion' );\r\n\t\t\t\tcase 'maccance': return array( 'macangus','macginnis','macguinness','mag aonghuis','mcginnis','mcguinness' );\r\n\t\t\t\tcase 'macchruim': return array( 'maccrum' );\r\n\t\t\t\tcase 'macclellan': return array( 'macclelland','mcclellan','mcclelland' );\r\n\t\t\t\tcase 'macclelland': return array( 'macclellan' );\r\n\t\t\t\tcase 'macclery': return array( 'mac cleirich','mac cléirich','mccleary' );\r\n\t\t\t\tcase 'macconnell': return array( 'mcconnell' );\r\n\t\t\t\tcase 'maccrum': return array( 'macchruim','maccrumb' );\r\n\t\t\t\tcase 'maccrumb': return array( 'maccrum' );\r\n\t\t\t\tcase 'macdaniel': return array( 'mcdaniel' );\r\n\t\t\t\tcase 'macdermott': return array( 'mac diarmada','mcdermott' );\r\n\t\t\t\tcase 'macdonald': return array( 'mcdaniel' );\r\n\t\t\t\tcase 'macdougall': return array( 'mcdougall' );\r\n\t\t\t\tcase 'maceachern': return array( 'mceachern' );\r\n\t\t\t\tcase 'macek': return array( 'macias','macías' );\r\n\t\t\t\tcase 'macentire': return array( 'macintyre' );\r\n\t\t\t\tcase 'macey': return array( 'macy' );\r\n\t\t\t\tcase 'macfarland': return array( 'mac pharlain','macfarlane','mcfarland','mcfarlane' );\r\n\t\t\t\tcase 'macfarlane': return array( 'macfarland' );\r\n\t\t\t\tcase 'macginnis': return array( 'maccance' );\r\n\t\t\t\tcase 'macgowan': return array( 'mcgowan' );\r\n\t\t\t\tcase 'macgregor': return array( 'mac griogair','mcgregor' );\r\n\t\t\t\tcase 'macgrory': return array( 'mccreery','mccrory' );\r\n\t\t\t\tcase 'macguinness': return array( 'maccance' );\r\n\t\t\t\tcase 'macguire': return array( 'maguire','mcguire' );\r\n\t\t\t\tcase 'machan': return array( 'machán' );\r\n\t\t\t\tcase 'machán': return array( 'machan' );\r\n\t\t\t\tcase 'macias': return array( 'macek','macías' );\r\n\t\t\t\tcase 'macintyre': return array( 'mac an tsaoir','macentire','mcintyre' );\r\n\t\t\t\tcase 'maciver': return array( 'mciver' );\r\n\t\t\t\tcase 'mackay': return array( 'magee' );\r\n\t\t\t\tcase 'mackenna': return array( 'mackenny','mckenna','mckinney' );\r\n\t\t\t\tcase 'mackenny': return array( 'mackenna' );\r\n\t\t\t\tcase 'mackenzie': return array( 'mac coinnich','mckenzie' );\r\n\t\t\t\tcase 'maclean': return array( 'mac gilleain','mac giolla eoin','mclain','mclean' );\r\n\t\t\t\tcase 'macleod': return array( 'mac leoid','mac leòid','mcleod' );\r\n\t\t\t\tcase 'macmathan': return array( 'mac mathghamhna' );\r\n\t\t\t\tcase 'macneil': return array( 'mac neill','mac niall','mac néill','mcneal','mcneil','mcneill','mcniall','mcniel' );\r\n\t\t\t\tcase 'macon': return array( 'maçon' );\r\n\t\t\t\tcase 'macqueen': return array( 'mcqueen' );\r\n\t\t\t\tcase 'macrae': return array( 'mccrae' );\r\n\t\t\t\tcase 'macwilliam': return array( 'mcwilliam' );\r\n\t\t\t\tcase 'macy': return array( 'macey','massey' );\r\n\t\t\t\tcase 'macías': return array( 'macek','macias' );\r\n\t\t\t\tcase 'maddison': return array( 'madison' );\r\n\t\t\t\tcase 'madison': return array( 'maddison' );\r\n\t\t\t\tcase 'madsen': return array( 'matheson' );\r\n\t\t\t\tcase 'maekelae': return array( 'mäkelä' );\r\n\t\t\t\tcase 'maekinen': return array( 'mäkinen' );\r\n\t\t\t\tcase 'maes': return array( 'maas' );\r\n\t\t\t\tcase 'maessen': return array( 'masin','masson' );\r\n\t\t\t\tcase 'mag aonghuis': return array( 'maccance' );\r\n\t\t\t\tcase 'mag shamhradhain': return array( 'mag shamhradháin' );\r\n\t\t\t\tcase 'mag shamhradháin': return array( 'mag shamhradhain' );\r\n\t\t\t\tcase 'magalhaes': return array( 'magalhães' );\r\n\t\t\t\tcase 'magalhães': return array( 'magalhaes' );\r\n\t\t\t\tcase 'magee': return array( 'mackay','mccoy','mcgee','mckay' );\r\n\t\t\t\tcase 'magnusson': return array( 'mac maghnuis' );\r\n\t\t\t\tcase 'maguire': return array( 'macguire' );\r\n\t\t\t\tcase 'mah': return array( 'ma' );\r\n\t\t\t\tcase 'maier': return array( 'meir' );\r\n\t\t\t\tcase 'makela': return array( 'mäkelä' );\r\n\t\t\t\tcase 'makinen': return array( 'mäkinen' );\r\n\t\t\t\tcase 'malley': return array( 'o maille','ó máille' );\r\n\t\t\t\tcase 'mallon': return array( 'malone' );\r\n\t\t\t\tcase 'malloye': return array( 'molloy','mulloy' );\r\n\t\t\t\tcase 'malone': return array( 'mallon','mollown','o maoil eoin','ó maoil eoin' );\r\n\t\t\t\tcase 'man': return array( 'moon','mun' );\r\n\t\t\t\tcase 'marchand': return array( 'merchant' );\r\n\t\t\t\tcase 'mardh': return array( 'mårdh' );\r\n\t\t\t\tcase 'marek': return array( 'mark','marko','markó','merckx' );\r\n\t\t\t\tcase 'maria': return array( 'marie','maría' );\r\n\t\t\t\tcase 'mariani': return array( 'marion' );\r\n\t\t\t\tcase 'marie': return array( 'maria','marušić','maría' );\r\n\t\t\t\tcase 'marino': return array( 'marion' );\r\n\t\t\t\tcase 'marion': return array( 'mariani','marino' );\r\n\t\t\t\tcase 'mark': return array( 'marek' );\r\n\t\t\t\tcase 'marko': return array( 'marek','markó' );\r\n\t\t\t\tcase 'markov': return array( 'marković' );\r\n\t\t\t\tcase 'marković': return array( 'markov' );\r\n\t\t\t\tcase 'markusson': return array( 'marquez','márquez' );\r\n\t\t\t\tcase 'markwardt': return array( 'marquardt' );\r\n\t\t\t\tcase 'markó': return array( 'marek','marko' );\r\n\t\t\t\tcase 'marlow': return array( 'marlowe' );\r\n\t\t\t\tcase 'marlowe': return array( 'marlow' );\r\n\t\t\t\tcase 'marquardt': return array( 'markwardt','marquering','marquerink' );\r\n\t\t\t\tcase 'marquering': return array( 'marquardt' );\r\n\t\t\t\tcase 'marquerink': return array( 'marquardt' );\r\n\t\t\t\tcase 'marquez': return array( 'markusson','márquez' );\r\n\t\t\t\tcase 'martel': return array( 'martell' );\r\n\t\t\t\tcase 'martell': return array( 'martel','martelli' );\r\n\t\t\t\tcase 'martelli': return array( 'martell' );\r\n\t\t\t\tcase 'marti': return array( 'martí' );\r\n\t\t\t\tcase 'martin': return array( 'martinek' );\r\n\t\t\t\tcase 'martinek': return array( 'martin','martinelli','martinez','martinov','martins','martinson','martinsson','marton','martínek','martínez','mertens','mortensen','márton' );\r\n\t\t\t\tcase 'martinelli': return array( 'martinek' );\r\n\t\t\t\tcase 'martinez': return array( 'martinek','martínez' );\r\n\t\t\t\tcase 'martinov': return array( 'martinek' );\r\n\t\t\t\tcase 'martins': return array( 'martinek' );\r\n\t\t\t\tcase 'martinson': return array( 'martinek' );\r\n\t\t\t\tcase 'martinsson': return array( 'martinek' );\r\n\t\t\t\tcase 'marton': return array( 'martinek','márton' );\r\n\t\t\t\tcase 'martí': return array( 'marti' );\r\n\t\t\t\tcase 'martínek': return array( 'martinek' );\r\n\t\t\t\tcase 'martínez': return array( 'martinek','martinez' );\r\n\t\t\t\tcase 'maruska': return array( 'maruška' );\r\n\t\t\t\tcase 'marušić': return array( 'marie' );\r\n\t\t\t\tcase 'maruška': return array( 'maruska' );\r\n\t\t\t\tcase 'maría': return array( 'maria','marie' );\r\n\t\t\t\tcase 'mas': return array( 'maas' );\r\n\t\t\t\tcase 'maselnik': return array( 'máselník' );\r\n\t\t\t\tcase 'masi': return array( 'maas' );\r\n\t\t\t\tcase 'masin': return array( 'maessen' );\r\n\t\t\t\tcase 'mason': return array( 'masson' );\r\n\t\t\t\tcase 'massey': return array( 'macy' );\r\n\t\t\t\tcase 'masson': return array( 'maessen','mason' );\r\n\t\t\t\tcase 'mateu': return array( 'mathieu','matić' );\r\n\t\t\t\tcase 'mateus': return array( 'matoušek' );\r\n\t\t\t\tcase 'matheson': return array( 'madsen','mathewson','mathiasen','mathieson','matthewson','matthiasen','mattsson' );\r\n\t\t\t\tcase 'mathews': return array( 'matoušek' );\r\n\t\t\t\tcase 'mathewson': return array( 'matheson' );\r\n\t\t\t\tcase 'mathiasen': return array( 'matheson' );\r\n\t\t\t\tcase 'mathieson': return array( 'matheson' );\r\n\t\t\t\tcase 'mathieu': return array( 'mateu' );\r\n\t\t\t\tcase 'matić': return array( 'mateu' );\r\n\t\t\t\tcase 'matoušek': return array( 'mateus','mathews','matthews','matějka','metz' );\r\n\t\t\t\tcase 'matsuoka': return array( 'matsushita' );\r\n\t\t\t\tcase 'matsushita': return array( 'matsuoka' );\r\n\t\t\t\tcase 'matthews': return array( 'matoušek' );\r\n\t\t\t\tcase 'matthewson': return array( 'matheson' );\r\n\t\t\t\tcase 'matthiasen': return array( 'matheson' );\r\n\t\t\t\tcase 'mattsson': return array( 'matheson' );\r\n\t\t\t\tcase 'matějka': return array( 'matoušek' );\r\n\t\t\t\tcase 'mayer': return array( 'meir' );\r\n\t\t\t\tcase 'mayes': return array( 'mašek' );\r\n\t\t\t\tcase 'maynard': return array( 'meinhardt' );\r\n\t\t\t\tcase 'maçon': return array( 'macon' );\r\n\t\t\t\tcase 'mašek': return array( 'maas','mayes' );\r\n\t\t\t\tcase 'mcafee': return array( 'mcfee','mcphee' );\r\n\t\t\t\tcase 'mcalister': return array( 'mac alastair' );\r\n\t\t\t\tcase 'mcbride': return array( 'macbride' );\r\n\t\t\t\tcase 'mccabe': return array( 'mac caba','mac cába' );\r\n\t\t\t\tcase 'mccleary': return array( 'macclery' );\r\n\t\t\t\tcase 'mcclellan': return array( 'macclellan' );\r\n\t\t\t\tcase 'mcclelland': return array( 'macclellan' );\r\n\t\t\t\tcase 'mcconnell': return array( 'macconnell' );\r\n\t\t\t\tcase 'mccormick': return array( 'mac cormaic' );\r\n\t\t\t\tcase 'mccoy': return array( 'magee' );\r\n\t\t\t\tcase 'mccracken': return array( 'mac reachtain' );\r\n\t\t\t\tcase 'mccrae': return array( 'macrae','mcrae' );\r\n\t\t\t\tcase 'mccreery': return array( 'macgrory' );\r\n\t\t\t\tcase 'mccrory': return array( 'macgrory' );\r\n\t\t\t\tcase 'mccune': return array( 'mcewan','mckowen' );\r\n\t\t\t\tcase 'mcdaniel': return array( 'mac domhnaill','macdaniel','macdonald','mcdonald' );\r\n\t\t\t\tcase 'mcdermott': return array( 'macdermott' );\r\n\t\t\t\tcase 'mcdevitt': return array( 'mac daibheid','mac daibhéid' );\r\n\t\t\t\tcase 'mcdonald': return array( 'mcdaniel' );\r\n\t\t\t\tcase 'mcdougall': return array( 'macdougall' );\r\n\t\t\t\tcase 'mceachern': return array( 'maceachern' );\r\n\t\t\t\tcase 'mcelligott': return array( 'mac uileagoid','mac uileagóid' );\r\n\t\t\t\tcase 'mcewan': return array( 'mccune' );\r\n\t\t\t\tcase 'mcfarland': return array( 'macfarland' );\r\n\t\t\t\tcase 'mcfarlane': return array( 'macfarland' );\r\n\t\t\t\tcase 'mcfee': return array( 'mcafee' );\r\n\t\t\t\tcase 'mcgee': return array( 'magee' );\r\n\t\t\t\tcase 'mcginnis': return array( 'maccance' );\r\n\t\t\t\tcase 'mcgowan': return array( 'macgowan' );\r\n\t\t\t\tcase 'mcgregor': return array( 'macgregor' );\r\n\t\t\t\tcase 'mcguinness': return array( 'maccance' );\r\n\t\t\t\tcase 'mcguire': return array( 'macguire' );\r\n\t\t\t\tcase 'mcintyre': return array( 'macintyre' );\r\n\t\t\t\tcase 'mciver': return array( 'maciver' );\r\n\t\t\t\tcase 'mckay': return array( 'magee' );\r\n\t\t\t\tcase 'mckellar': return array( 'mac ealair' );\r\n\t\t\t\tcase 'mckenna': return array( 'mackenna' );\r\n\t\t\t\tcase 'mckenzie': return array( 'mackenzie' );\r\n\t\t\t\tcase 'mckinney': return array( 'mackenna' );\r\n\t\t\t\tcase 'mckowen': return array( 'mccune' );\r\n\t\t\t\tcase 'mclain': return array( 'maclean' );\r\n\t\t\t\tcase 'mclean': return array( 'maclean' );\r\n\t\t\t\tcase 'mcleod': return array( 'macleod' );\r\n\t\t\t\tcase 'mcnab': return array( 'mac an aba','mcnabb' );\r\n\t\t\t\tcase 'mcnabb': return array( 'mcnab' );\r\n\t\t\t\tcase 'mcnaughton': return array( 'mac neachtain' );\r\n\t\t\t\tcase 'mcneal': return array( 'macneil' );\r\n\t\t\t\tcase 'mcneil': return array( 'macneil' );\r\n\t\t\t\tcase 'mcneill': return array( 'macneil' );\r\n\t\t\t\tcase 'mcniall': return array( 'macneil' );\r\n\t\t\t\tcase 'mcniel': return array( 'macneil' );\r\n\t\t\t\tcase 'mcphee': return array( 'mcafee' );\r\n\t\t\t\tcase 'mcqueen': return array( 'macqueen' );\r\n\t\t\t\tcase 'mcrae': return array( 'mccrae' );\r\n\t\t\t\tcase 'mcwilliam': return array( 'macwilliam' );\r\n\t\t\t\tcase 'meaney': return array( 'mooney' );\r\n\t\t\t\tcase 'meeuwes': return array( 'meeuwis' );\r\n\t\t\t\tcase 'meeuwessen': return array( 'meeuweszen','meeuwissen','meeuwsen' );\r\n\t\t\t\tcase 'meeuweszen': return array( 'meeuwessen' );\r\n\t\t\t\tcase 'meeuwis': return array( 'meeuwes' );\r\n\t\t\t\tcase 'meeuwissen': return array( 'meeuwessen' );\r\n\t\t\t\tcase 'meeuwsen': return array( 'meeuwessen' );\r\n\t\t\t\tcase 'meier': return array( 'meir' );\r\n\t\t\t\tcase 'meinhardt': return array( 'maynard' );\r\n\t\t\t\tcase 'meir': return array( 'maier','mayer','meier','meyer' );\r\n\t\t\t\tcase 'meisner': return array( 'meissner' );\r\n\t\t\t\tcase 'meissner': return array( 'meisner' );\r\n\t\t\t\tcase 'mendel': return array( 'mendelsohn' );\r\n\t\t\t\tcase 'mendelsohn': return array( 'mendel','mendelssohn' );\r\n\t\t\t\tcase 'mendelssohn': return array( 'mendelsohn' );\r\n\t\t\t\tcase 'mendez': return array( 'méndez' );\r\n\t\t\t\tcase 'merchant': return array( 'marchand' );\r\n\t\t\t\tcase 'merckx': return array( 'marek' );\r\n\t\t\t\tcase 'merle': return array( 'merlo' );\r\n\t\t\t\tcase 'merlo': return array( 'merle' );\r\n\t\t\t\tcase 'merrick': return array( 'merricks','meyrick','morce','morris','morrish','morriss','morse' );\r\n\t\t\t\tcase 'merricks': return array( 'merrick' );\r\n\t\t\t\tcase 'mertens': return array( 'martinek' );\r\n\t\t\t\tcase 'meszaros': return array( 'mészáros' );\r\n\t\t\t\tcase 'metz': return array( 'matoušek' );\r\n\t\t\t\tcase 'meyer': return array( 'meir' );\r\n\t\t\t\tcase 'meyrick': return array( 'merrick' );\r\n\t\t\t\tcase 'michael': return array( 'micheli' );\r\n\t\t\t\tcase 'michaels': return array( 'michaelson','michelakakis','michelakis','michelakos','mikaelsson','mikkelsen' );\r\n\t\t\t\tcase 'michaelson': return array( 'michaels' );\r\n\t\t\t\tcase 'michel': return array( 'micheli' );\r\n\t\t\t\tcase 'michelakakis': return array( 'michaels' );\r\n\t\t\t\tcase 'michelakis': return array( 'michaels' );\r\n\t\t\t\tcase 'michelakos': return array( 'michaels' );\r\n\t\t\t\tcase 'micheli': return array( 'michael','michel' );\r\n\t\t\t\tcase 'mihailović': return array( 'mihaylov' );\r\n\t\t\t\tcase 'mihajlović': return array( 'mikhailov' );\r\n\t\t\t\tcase 'mihaylov': return array( 'mihailović' );\r\n\t\t\t\tcase 'mikaelsson': return array( 'michaels' );\r\n\t\t\t\tcase 'mikhailov': return array( 'mihajlović' );\r\n\t\t\t\tcase 'mikkelsen': return array( 'michaels' );\r\n\t\t\t\tcase 'milani': return array( 'milano' );\r\n\t\t\t\tcase 'milano': return array( 'milani' );\r\n\t\t\t\tcase 'miles': return array( 'myles' );\r\n\t\t\t\tcase 'millard': return array( 'millward' );\r\n\t\t\t\tcase 'miller': return array( 'moeller','moller','mueller','muller','möller','møller','müller' );\r\n\t\t\t\tcase 'milligan': return array( 'mulligan' );\r\n\t\t\t\tcase 'millward': return array( 'millard' );\r\n\t\t\t\tcase 'minett': return array( 'mynatt' );\r\n\t\t\t\tcase 'mishra': return array( 'misra' );\r\n\t\t\t\tcase 'misra': return array( 'mishra' );\r\n\t\t\t\tcase 'moeller': return array( 'miller','möller' );\r\n\t\t\t\tcase 'mohammed': return array( 'muhammad' );\r\n\t\t\t\tcase 'mohren': return array( 'mooren' );\r\n\t\t\t\tcase 'moller': return array( 'miller','möller','møller' );\r\n\t\t\t\tcase 'mollown': return array( 'malone' );\r\n\t\t\t\tcase 'molloy': return array( 'malloye' );\r\n\t\t\t\tcase 'molnar': return array( 'molnár' );\r\n\t\t\t\tcase 'molnár': return array( 'molnar' );\r\n\t\t\t\tcase 'monaghan': return array( 'o manachain','ó manacháin' );\r\n\t\t\t\tcase 'monday': return array( 'mondy' );\r\n\t\t\t\tcase 'mondo': return array( 'monet','monette' );\r\n\t\t\t\tcase 'mondy': return array( 'monday' );\r\n\t\t\t\tcase 'monet': return array( 'mondo' );\r\n\t\t\t\tcase 'monette': return array( 'mondo' );\r\n\t\t\t\tcase 'monroe': return array( 'munro','munroe' );\r\n\t\t\t\tcase 'montagna': return array( 'montagne' );\r\n\t\t\t\tcase 'montagne': return array( 'montagna' );\r\n\t\t\t\tcase 'monte': return array( 'monti' );\r\n\t\t\t\tcase 'monti': return array( 'monte' );\r\n\t\t\t\tcase 'moon': return array( 'man' );\r\n\t\t\t\tcase 'mooney': return array( 'meaney' );\r\n\t\t\t\tcase 'moore': return array( 'moreau' );\r\n\t\t\t\tcase 'mooren': return array( 'mohren','morin' );\r\n\t\t\t\tcase 'moores': return array( 'moors' );\r\n\t\t\t\tcase 'moors': return array( 'moores' );\r\n\t\t\t\tcase 'mooshian': return array( 'moushian' );\r\n\t\t\t\tcase 'morales': return array( 'moralez' );\r\n\t\t\t\tcase 'moralez': return array( 'morales' );\r\n\t\t\t\tcase 'moray': return array( 'murray' );\r\n\t\t\t\tcase 'morce': return array( 'merrick' );\r\n\t\t\t\tcase 'moreau': return array( 'moore' );\r\n\t\t\t\tcase 'morel': return array( 'morello' );\r\n\t\t\t\tcase 'morello': return array( 'morel' );\r\n\t\t\t\tcase 'morin': return array( 'mooren' );\r\n\t\t\t\tcase 'morison': return array( 'morrison' );\r\n\t\t\t\tcase 'morris': return array( 'merrick' );\r\n\t\t\t\tcase 'morrish': return array( 'merrick' );\r\n\t\t\t\tcase 'morrison': return array( 'morison' );\r\n\t\t\t\tcase 'morriss': return array( 'merrick' );\r\n\t\t\t\tcase 'morse': return array( 'merrick' );\r\n\t\t\t\tcase 'mortensen': return array( 'martinek' );\r\n\t\t\t\tcase 'moushian': return array( 'mooshian' );\r\n\t\t\t\tcase 'mueller': return array( 'miller','müller' );\r\n\t\t\t\tcase 'muhammad': return array( 'mohammed' );\r\n\t\t\t\tcase 'mullane': return array( 'mullen' );\r\n\t\t\t\tcase 'mullen': return array( 'mullane','o maolain','ó maoláin' );\r\n\t\t\t\tcase 'muller': return array( 'miller','müller' );\r\n\t\t\t\tcase 'mulligan': return array( 'milligan' );\r\n\t\t\t\tcase 'mulloy': return array( 'malloye' );\r\n\t\t\t\tcase 'mulryan': return array( 'o maoil riain','ó maoil riain' );\r\n\t\t\t\tcase 'mun': return array( 'man' );\r\n\t\t\t\tcase 'munro': return array( 'monroe' );\r\n\t\t\t\tcase 'munroe': return array( 'monroe' );\r\n\t\t\t\tcase 'murdoch': return array( 'murdock' );\r\n\t\t\t\tcase 'murdock': return array( 'murdoch' );\r\n\t\t\t\tcase 'murray': return array( 'moray' );\r\n\t\t\t\tcase 'myles': return array( 'miles' );\r\n\t\t\t\tcase 'mynatt': return array( 'minett' );\r\n\t\t\t\tcase 'márquez': return array( 'markusson','marquez' );\r\n\t\t\t\tcase 'márton': return array( 'martinek','marton' );\r\n\t\t\t\tcase 'máselník': return array( 'maselnik' );\r\n\t\t\t\tcase 'mäkelä': return array( 'maekelae','makela' );\r\n\t\t\t\tcase 'mäkinen': return array( 'maekinen','makinen' );\r\n\t\t\t\tcase 'mårdh': return array( 'mardh' );\r\n\t\t\t\tcase 'méndez': return array( 'mendez' );\r\n\t\t\t\tcase 'mészáros': return array( 'meszaros' );\r\n\t\t\t\tcase 'möller': return array( 'miller','moeller','moller' );\r\n\t\t\t\tcase 'møller': return array( 'miller','moller' );\r\n\t\t\t\tcase 'müller': return array( 'miller','mueller','muller' );\r\n\t\t\t\tcase 'naess': return array( 'næss' );\r\n\t\t\t\tcase 'naggi': return array( 'naggia' );\r\n\t\t\t\tcase 'naggia': return array( 'naggi' );\r\n\t\t\t\tcase 'nakajima': return array( 'nakashima' );\r\n\t\t\t\tcase 'nakamura': return array( 'nishimura' );\r\n\t\t\t\tcase 'nakashima': return array( 'nakajima' );\r\n\t\t\t\tcase 'nana': return array( 'nani' );\r\n\t\t\t\tcase 'nani': return array( 'nana','nanni' );\r\n\t\t\t\tcase 'nanni': return array( 'nani' );\r\n\t\t\t\tcase 'naoumov': return array( 'naumov' );\r\n\t\t\t\tcase 'nardi': return array( 'nardo' );\r\n\t\t\t\tcase 'nardo': return array( 'nardi' );\r\n\t\t\t\tcase 'narvaez': return array( 'narváez' );\r\n\t\t\t\tcase 'narváez': return array( 'narvaez' );\r\n\t\t\t\tcase 'nascimbene': return array( 'nascimbeni' );\r\n\t\t\t\tcase 'nascimbeni': return array( 'nascimbene' );\r\n\t\t\t\tcase 'nathans': return array( 'nathanson' );\r\n\t\t\t\tcase 'nathanson': return array( 'nathans' );\r\n\t\t\t\tcase 'naumov': return array( 'naoumov' );\r\n\t\t\t\tcase 'navratil': return array( 'navrátil' );\r\n\t\t\t\tcase 'navrátil': return array( 'navratil' );\r\n\t\t\t\tcase 'neal': return array( 'neil','o neill','ó néill' );\r\n\t\t\t\tcase 'neil': return array( 'neal' );\r\n\t\t\t\tcase 'nelson': return array( 'nielson' );\r\n\t\t\t\tcase 'nemec': return array( 'nemeček' );\r\n\t\t\t\tcase 'nemet': return array( 'német' );\r\n\t\t\t\tcase 'nemeth': return array( 'németh' );\r\n\t\t\t\tcase 'nemeček': return array( 'nemec' );\r\n\t\t\t\tcase 'neri': return array( 'nieri' );\r\n\t\t\t\tcase 'neuman': return array( 'neumann' );\r\n\t\t\t\tcase 'neumann': return array( 'neuman' );\r\n\t\t\t\tcase 'nevin': return array( 'niven' );\r\n\t\t\t\tcase 'ng': return array( 'ngo','ngô' );\r\n\t\t\t\tcase 'ngo': return array( 'ng' );\r\n\t\t\t\tcase 'nguyen': return array( 'nguyễn' );\r\n\t\t\t\tcase 'nguyễn': return array( 'nguyen' );\r\n\t\t\t\tcase 'ngô': return array( 'ng','ngo' );\r\n\t\t\t\tcase 'nichols': return array( 'nicholson','nicolas','nicolescu','nicolson','niklasson','nikolajsen' );\r\n\t\t\t\tcase 'nicholson': return array( 'nichols' );\r\n\t\t\t\tcase 'nicolai': return array( 'nikolić','nikula' );\r\n\t\t\t\tcase 'nicolas': return array( 'nichols' );\r\n\t\t\t\tcase 'nicolescu': return array( 'nichols' );\r\n\t\t\t\tcase 'nicolson': return array( 'nichols' );\r\n\t\t\t\tcase 'nielsen': return array( 'nilsson' );\r\n\t\t\t\tcase 'nielson': return array( 'nelson' );\r\n\t\t\t\tcase 'nieri': return array( 'neri' );\r\n\t\t\t\tcase 'nifterick': return array( 'nifterik' );\r\n\t\t\t\tcase 'nifterik': return array( 'nifterick','niftrik' );\r\n\t\t\t\tcase 'niftrik': return array( 'nifterik' );\r\n\t\t\t\tcase 'niklasson': return array( 'nichols' );\r\n\t\t\t\tcase 'nikolaev': return array( 'nikolov' );\r\n\t\t\t\tcase 'nikolajsen': return array( 'nichols' );\r\n\t\t\t\tcase 'nikolić': return array( 'nicolai' );\r\n\t\t\t\tcase 'nikolov': return array( 'nikolaev' );\r\n\t\t\t\tcase 'nikula': return array( 'nicolai' );\r\n\t\t\t\tcase 'nilsen': return array( 'nilsson' );\r\n\t\t\t\tcase 'nilsson': return array( 'nielsen','nilsen' );\r\n\t\t\t\tcase 'nishimura': return array( 'nakamura' );\r\n\t\t\t\tcase 'niven': return array( 'nevin' );\r\n\t\t\t\tcase 'noel': return array( 'nowell' );\r\n\t\t\t\tcase 'nolan': return array( 'o nuallain','ó nualláin' );\r\n\t\t\t\tcase 'normanson': return array( 'normansson' );\r\n\t\t\t\tcase 'normansson': return array( 'normanson' );\r\n\t\t\t\tcase 'norup': return array( 'nørup' );\r\n\t\t\t\tcase 'novak': return array( 'novák' );\r\n\t\t\t\tcase 'novaček': return array( 'nováček' );\r\n\t\t\t\tcase 'novák': return array( 'novak' );\r\n\t\t\t\tcase 'nováček': return array( 'novaček' );\r\n\t\t\t\tcase 'nowell': return array( 'noel' );\r\n\t\t\t\tcase 'nunez': return array( 'núñez' );\r\n\t\t\t\tcase 'nystroem': return array( 'nyström' );\r\n\t\t\t\tcase 'nystrom': return array( 'nyström' );\r\n\t\t\t\tcase 'nyström': return array( 'nystroem','nystrom' );\r\n\t\t\t\tcase 'næss': return array( 'naess' );\r\n\t\t\t\tcase 'német': return array( 'nemet' );\r\n\t\t\t\tcase 'németh': return array( 'nemeth' );\r\n\t\t\t\tcase 'nørup': return array( 'norup' );\r\n\t\t\t\tcase 'núñez': return array( 'nunez' );\r\n\t\t\t\tcase 'o baoghill': return array( 'ó baoghill' );\r\n\t\t\t\tcase 'o bradaigh': return array( 'ó brádaigh' );\r\n\t\t\t\tcase 'o bradain': return array( 'braden','ó bradáin' );\r\n\t\t\t\tcase 'o braoin': return array( 'breen','ó braoin' );\r\n\t\t\t\tcase 'o braonain': return array( 'brennan','ó braonáin' );\r\n\t\t\t\tcase 'o briain': return array( 'bryan','ó briain' );\r\n\t\t\t\tcase 'o broin': return array( 'berne','ó broin' );\r\n\t\t\t\tcase 'o buachalla': return array( 'ó buachalla' );\r\n\t\t\t\tcase 'o caiside': return array( 'cassidy','ó caiside' );\r\n\t\t\t\tcase 'o caoimh': return array( 'ó caoimh' );\r\n\t\t\t\tcase 'o caoimhain': return array( 'ó caoimháin' );\r\n\t\t\t\tcase 'o caoindealbhain': return array( 'ó caoindealbháin' );\r\n\t\t\t\tcase 'o cathain': return array( 'ó catháin' );\r\n\t\t\t\tcase 'o cathasaigh': return array( 'ó cathasaigh' );\r\n\t\t\t\tcase 'o ceallachain': return array( 'callaghan','ó ceallacháin' );\r\n\t\t\t\tcase 'o ceallaigh': return array( 'ó ceallaigh' );\r\n\t\t\t\tcase 'o cearmada': return array( 'carmody','ó cearmada' );\r\n\t\t\t\tcase 'o ceithearnaigh': return array( 'ó ceithearnaigh' );\r\n\t\t\t\tcase 'o ciardha': return array( 'ó ciardha' );\r\n\t\t\t\tcase 'o cinneidigh': return array( 'ó cinnéidigh' );\r\n\t\t\t\tcase 'o cleirigh': return array( 'ó cléirigh' );\r\n\t\t\t\tcase 'o cnaimhin': return array( 'ó cnáimhín' );\r\n\t\t\t\tcase 'o cochlain': return array( 'coughlan','ó cochláin' );\r\n\t\t\t\tcase 'o coigligh': return array( 'ó coigligh' );\r\n\t\t\t\tcase 'o coileain': return array( 'ó coileáin' );\r\n\t\t\t\tcase 'o conaill': return array( 'connell','ó conaill' );\r\n\t\t\t\tcase 'o conchobhair': return array( 'ó conchobhair' );\r\n\t\t\t\tcase 'o conghalaigh': return array( 'ó conghalaigh' );\r\n\t\t\t\tcase 'o corcrain': return array( 'corcoran','ó corcráin' );\r\n\t\t\t\tcase 'o corraidhin': return array( 'ó corraidhín' );\r\n\t\t\t\tcase 'o cuana': return array( 'cooney','ó cuana' );\r\n\t\t\t\tcase 'o cuidighthigh': return array( 'ó cuidighthigh' );\r\n\t\t\t\tcase 'o cuilinn': return array( 'ó cuilinn' );\r\n\t\t\t\tcase 'o cuinn': return array( 'ó cuinn' );\r\n\t\t\t\tcase 'o dalaigh': return array( 'ó dálaigh' );\r\n\t\t\t\tcase 'o damhain': return array( 'ó damháin' );\r\n\t\t\t\tcase 'o deorain': return array( 'doran','ó deoráin' );\r\n\t\t\t\tcase 'o diomasaigh': return array( 'ó díomasaigh' );\r\n\t\t\t\tcase 'o dochartaigh': return array( 'dougherty','ó dochartaigh' );\r\n\t\t\t\tcase 'o doibhilin': return array( 'devlin','ó doibhilin' );\r\n\t\t\t\tcase 'o doirnain': return array( 'durnin','ó doirnáin' );\r\n\t\t\t\tcase 'o domhnaill': return array( 'ó domhnaill' );\r\n\t\t\t\tcase 'o donnchadha': return array( 'ó donnchadha' );\r\n\t\t\t\tcase 'o donndubhain': return array( 'ó donndubháin' );\r\n\t\t\t\tcase 'o donnghaile': return array( 'ó donnghaile' );\r\n\t\t\t\tcase 'o dubhain': return array( 'davin','ó dubháin' );\r\n\t\t\t\tcase 'o dubhghaill': return array( 'ó dubhghaill' );\r\n\t\t\t\tcase 'o dubhshlain': return array( 'ó dubhshláin' );\r\n\t\t\t\tcase 'o dubhshlaine': return array( 'ó dubhshláine' );\r\n\t\t\t\tcase 'o dubhthaigh': return array( 'ó dubhthaigh' );\r\n\t\t\t\tcase 'o faolain': return array( 'fylan','ó faoláin' );\r\n\t\t\t\tcase 'o fearghail': return array( 'ó fearghail' );\r\n\t\t\t\tcase 'o fionnagain': return array( 'finnegan','ó fionnagáin' );\r\n\t\t\t\tcase 'o fionnain': return array( 'fannon','ó fionnáin' );\r\n\t\t\t\tcase 'o flannagain': return array( 'flanagon','ó flannagáin' );\r\n\t\t\t\tcase 'o floinn': return array( 'flynn','ó floinn' );\r\n\t\t\t\tcase 'o frighil': return array( 'ó frighil' );\r\n\t\t\t\tcase 'o gallchobhair': return array( 'ó gallchobhair' );\r\n\t\t\t\tcase 'o gormain': return array( 'ó gormáin' );\r\n\t\t\t\tcase 'o hallmhurain': return array( 'ó hallmhuráin' );\r\n\t\t\t\tcase 'o hannagain': return array( 'hanegan','ó hannagáin' );\r\n\t\t\t\tcase 'o haodha': return array( 'ó haodha' );\r\n\t\t\t\tcase 'o heachthighearna': return array( 'ó heachthighearna' );\r\n\t\t\t\tcase 'o heaghra': return array( 'ó heaghra' );\r\n\t\t\t\tcase 'o heideain': return array( 'ó héideáin' );\r\n\t\t\t\tcase 'o heidhin': return array( 'ó heidhin' );\r\n\t\t\t\tcase 'o heidin': return array( 'ó héidín' );\r\n\t\t\t\tcase 'o heidirsceoil': return array( 'ó heidirsceóil' );\r\n\t\t\t\tcase 'o hicidhe': return array( 'ó hícidhe' );\r\n\t\t\t\tcase 'o hifearnain': return array( 'heffernan','ó hifearnáin' );\r\n\t\t\t\tcase 'o hogain': return array( 'hogan','ó hógáin' );\r\n\t\t\t\tcase 'o huiginn': return array( 'ó huiginn' );\r\n\t\t\t\tcase 'o laoghaire': return array( 'ó laoghaire' );\r\n\t\t\t\tcase 'o leannain': return array( 'lannon','ó leannáin' );\r\n\t\t\t\tcase 'o loingsigh': return array( 'ó loingsigh' );\r\n\t\t\t\tcase 'o luain': return array( 'ó luain' );\r\n\t\t\t\tcase 'o madaidhin': return array( 'ó madaidhín' );\r\n\t\t\t\tcase 'o maille': return array( 'malley','ó máille' );\r\n\t\t\t\tcase 'o manachain': return array( 'monaghan','ó manacháin' );\r\n\t\t\t\tcase 'o maoil eoin': return array( 'malone','ó maoil eoin' );\r\n\t\t\t\tcase 'o maoil riain': return array( 'mulryan','ó maoil riain' );\r\n\t\t\t\tcase 'o maoilsheachlainn': return array( 'ó maoilsheachlainn' );\r\n\t\t\t\tcase 'o maol aodha': return array( 'ó maol aodha' );\r\n\t\t\t\tcase 'o maol dhomhnaigh': return array( 'ó maol dhomhnaigh' );\r\n\t\t\t\tcase 'o maolain': return array( 'mullen','ó maoláin' );\r\n\t\t\t\tcase 'o maolmhuaidh': return array( 'ó maolmhuaidh' );\r\n\t\t\t\tcase 'o maonaigh': return array( 'ó maonaigh' );\r\n\t\t\t\tcase 'o marcaigh': return array( 'ó marcaigh' );\r\n\t\t\t\tcase 'o mathghamhna': return array( 'ó mathghamhna' );\r\n\t\t\t\tcase 'o meadhra': return array( 'ó meadhra' );\r\n\t\t\t\tcase 'o meara': return array( 'ó meara' );\r\n\t\t\t\tcase 'o mochain': return array( 'ó mocháin' );\r\n\t\t\t\tcase 'o muircheartach': return array( 'ó muircheartach' );\r\n\t\t\t\tcase 'o murchadha': return array( 'ó murchadha' );\r\n\t\t\t\tcase 'o neill': return array( 'neal','ó néill' );\r\n\t\t\t\tcase 'o nuallain': return array( 'nolan','ó nualláin' );\r\n\t\t\t\tcase 'o rabhartaigh': return array( 'rafferty','ó rabhartaigh' );\r\n\t\t\t\tcase 'o raghailligh': return array( 'ó raghailligh' );\r\n\t\t\t\tcase 'o riagain': return array( 'regan','ó ríagáin' );\r\n\t\t\t\tcase 'o riain': return array( 'ryan','ó riain' );\r\n\t\t\t\tcase 'o rinn': return array( 'ó rinn' );\r\n\t\t\t\tcase 'o rodagh': return array( 'ó rodagh' );\r\n\t\t\t\tcase 'o ruadhain': return array( 'ó ruadháin' );\r\n\t\t\t\tcase 'o ruaidh': return array( 'ó ruaidh' );\r\n\t\t\t\tcase 'o scolaidhe': return array( 'ó scolaidhe' );\r\n\t\t\t\tcase 'o seaghdha': return array( 'ó séaghdha' );\r\n\t\t\t\tcase 'o seanain': return array( 'shannon','ó seanáin' );\r\n\t\t\t\tcase 'o seighin': return array( 'ó seighin' );\r\n\t\t\t\tcase 'o sioda': return array( 'sheedy','ó síoda' );\r\n\t\t\t\tcase 'o sirideain': return array( 'sheridan','ó sirideáin' );\r\n\t\t\t\tcase 'o suaird': return array( 'ó suaird' );\r\n\t\t\t\tcase 'o suileabhain': return array( 'sullivan','ó súileabháin' );\r\n\t\t\t\tcase 'o tadhgain': return array( 'ó tadhgáin' );\r\n\t\t\t\tcase 'o taidhg': return array( 'ó taidhg' );\r\n\t\t\t\tcase 'o tighearnaigh': return array( 'ó tíghearnaigh' );\r\n\t\t\t\tcase 'o treasaigh': return array( 'ó treasaigh' );\r\n\t\t\t\tcase 'o tuathail': return array( 'ó tuathail' );\r\n\t\t\t\tcase 'o\\'beirne': return array( 'o\\'berne','o\\'byrne' );\r\n\t\t\t\tcase 'o\\'berne': return array( 'o\\'beirne' );\r\n\t\t\t\tcase 'o\\'brian': return array( 'o\\'brien' );\r\n\t\t\t\tcase 'o\\'brien': return array( 'o\\'brian' );\r\n\t\t\t\tcase 'o\\'byrne': return array( 'o\\'beirne' );\r\n\t\t\t\tcase 'o\\'hanegan': return array( 'o\\'hanigan' );\r\n\t\t\t\tcase 'o\\'hanigan': return array( 'o\\'hanegan','o\\'hannagain','o\\'hannagan','o\\'hannegan','o\\'hannigain','o\\'hannigan' );\r\n\t\t\t\tcase 'o\\'hannagain': return array( 'o\\'hanigan' );\r\n\t\t\t\tcase 'o\\'hannagan': return array( 'o\\'hanigan' );\r\n\t\t\t\tcase 'o\\'hannegan': return array( 'o\\'hanigan' );\r\n\t\t\t\tcase 'o\\'hannigain': return array( 'o\\'hanigan' );\r\n\t\t\t\tcase 'o\\'hannigan': return array( 'o\\'hanigan' );\r\n\t\t\t\tcase 'o\\'neal': return array( 'o\\'neill' );\r\n\t\t\t\tcase 'o\\'neill': return array( 'o\\'neal','o\\'niall' );\r\n\t\t\t\tcase 'o\\'niall': return array( 'o\\'neill' );\r\n\t\t\t\tcase 'oberti': return array( 'oberto' );\r\n\t\t\t\tcase 'oberto': return array( 'oberti' );\r\n\t\t\t\tcase 'oeman': return array( 'öman' );\r\n\t\t\t\tcase 'oestberg': return array( 'östberg' );\r\n\t\t\t\tcase 'ognianov': return array( 'ognyanov' );\r\n\t\t\t\tcase 'ognyanov': return array( 'ognianov' );\r\n\t\t\t\tcase 'olesen': return array( 'olsen','olson','olsson' );\r\n\t\t\t\tcase 'oliver': return array( 'oliversen' );\r\n\t\t\t\tcase 'oliversen': return array( 'oliver','oliverson','oliversson','olivier','olvirsson' );\r\n\t\t\t\tcase 'oliverson': return array( 'oliversen' );\r\n\t\t\t\tcase 'oliversson': return array( 'oliversen' );\r\n\t\t\t\tcase 'olivier': return array( 'oliversen' );\r\n\t\t\t\tcase 'olofsdotter': return array( 'olofsson' );\r\n\t\t\t\tcase 'olofsson': return array( 'olofsdotter' );\r\n\t\t\t\tcase 'olsen': return array( 'olesen' );\r\n\t\t\t\tcase 'olson': return array( 'olesen' );\r\n\t\t\t\tcase 'olsson': return array( 'olesen' );\r\n\t\t\t\tcase 'olvirsson': return array( 'oliversen' );\r\n\t\t\t\tcase 'oman': return array( 'öman' );\r\n\t\t\t\tcase 'orban': return array( 'orbán' );\r\n\t\t\t\tcase 'orbán': return array( 'orban' );\r\n\t\t\t\tcase 'orman': return array( 'ormond','ormonde' );\r\n\t\t\t\tcase 'ormond': return array( 'orman' );\r\n\t\t\t\tcase 'ormonde': return array( 'orman' );\r\n\t\t\t\tcase 'osborne': return array( 'osbourne' );\r\n\t\t\t\tcase 'osbourne': return array( 'osborne' );\r\n\t\t\t\tcase 'oster': return array( 'øster' );\r\n\t\t\t\tcase 'ostergaard': return array( 'østergaard' );\r\n\t\t\t\tcase 'ostergard': return array( 'østergård' );\r\n\t\t\t\tcase 'ott': return array( 'otto' );\r\n\t\t\t\tcase 'otto': return array( 'ott' );\r\n\t\t\t\tcase 'ottosen': return array( 'ottosson' );\r\n\t\t\t\tcase 'ottosson': return array( 'ottosen' );\r\n\t\t\t\tcase 'paddon': return array( 'patton' );\r\n\t\t\t\tcase 'padovan': return array( 'padovano' );\r\n\t\t\t\tcase 'padovano': return array( 'padovan' );\r\n\t\t\t\tcase 'pagani': return array( 'pagano' );\r\n\t\t\t\tcase 'pagano': return array( 'pagani' );\r\n\t\t\t\tcase 'page': return array( 'paige' );\r\n\t\t\t\tcase 'paige': return array( 'page' );\r\n\t\t\t\tcase 'pal': return array( 'paul','pál' );\r\n\t\t\t\tcase 'pallesen': return array( 'paulissen','paulson','poulsen' );\r\n\t\t\t\tcase 'palmeiro': return array( 'palmer' );\r\n\t\t\t\tcase 'palmer': return array( 'palmeiro' );\r\n\t\t\t\tcase 'pan': return array( 'phan' );\r\n\t\t\t\tcase 'pander': return array( 'panders' );\r\n\t\t\t\tcase 'panders': return array( 'pander','pender','penders','pennders' );\r\n\t\t\t\tcase 'pape': return array( 'pope' );\r\n\t\t\t\tcase 'paris': return array( 'parris' );\r\n\t\t\t\tcase 'parish': return array( 'parris' );\r\n\t\t\t\tcase 'park': return array( 'pearce' );\r\n\t\t\t\tcase 'parks': return array( 'pearce' );\r\n\t\t\t\tcase 'parris': return array( 'paris','parish','parrish' );\r\n\t\t\t\tcase 'parrish': return array( 'parris' );\r\n\t\t\t\tcase 'parry': return array( 'perry' );\r\n\t\t\t\tcase 'pasternack': return array( 'pasternak' );\r\n\t\t\t\tcase 'pasternak': return array( 'pasternack' );\r\n\t\t\t\tcase 'pasztor': return array( 'pásztor' );\r\n\t\t\t\tcase 'paterson': return array( 'patrickson' );\r\n\t\t\t\tcase 'patrick': return array( 'patrickson' );\r\n\t\t\t\tcase 'patrickson': return array( 'paterson','patrick','patriksson','patterson' );\r\n\t\t\t\tcase 'patriksson': return array( 'patrickson' );\r\n\t\t\t\tcase 'patterson': return array( 'patrickson' );\r\n\t\t\t\tcase 'patton': return array( 'paddon' );\r\n\t\t\t\tcase 'paul': return array( 'pal','pál' );\r\n\t\t\t\tcase 'paulissen': return array( 'pallesen' );\r\n\t\t\t\tcase 'paulson': return array( 'pallesen' );\r\n\t\t\t\tcase 'pavlov': return array( 'pavlović' );\r\n\t\t\t\tcase 'pavlović': return array( 'pavlov' );\r\n\t\t\t\tcase 'pavone': return array( 'pavoni' );\r\n\t\t\t\tcase 'pavoni': return array( 'pavone' );\r\n\t\t\t\tcase 'payton': return array( 'peyton' );\r\n\t\t\t\tcase 'peacock': return array( 'pocock' );\r\n\t\t\t\tcase 'peak': return array( 'peck' );\r\n\t\t\t\tcase 'pearce': return array( 'park','parks','perez','perko','pierce','pérez' );\r\n\t\t\t\tcase 'pearson': return array( 'perkins' );\r\n\t\t\t\tcase 'pechaček': return array( 'pecháček' );\r\n\t\t\t\tcase 'pecháček': return array( 'pechaček' );\r\n\t\t\t\tcase 'peck': return array( 'peak' );\r\n\t\t\t\tcase 'pedersen': return array( 'peeters','peters','petersen','peterson','petersson','petrescu','petrosyan','pettersson' );\r\n\t\t\t\tcase 'peeters': return array( 'pedersen' );\r\n\t\t\t\tcase 'pek': return array( 'pék' );\r\n\t\t\t\tcase 'pelaez': return array( 'peláez' );\r\n\t\t\t\tcase 'peláez': return array( 'pelaez' );\r\n\t\t\t\tcase 'pena': return array( 'peña' );\r\n\t\t\t\tcase 'pender': return array( 'panders' );\r\n\t\t\t\tcase 'penders': return array( 'panders' );\r\n\t\t\t\tcase 'pennders': return array( 'panders' );\r\n\t\t\t\tcase 'pensak': return array( 'penzak' );\r\n\t\t\t\tcase 'penzag': return array( 'penzak' );\r\n\t\t\t\tcase 'penzak': return array( 'pensak','penzag','penzig','penzik' );\r\n\t\t\t\tcase 'penzig': return array( 'penzak' );\r\n\t\t\t\tcase 'penzik': return array( 'penzak' );\r\n\t\t\t\tcase 'perez': return array( 'pearce' );\r\n\t\t\t\tcase 'perkins': return array( 'pearson','persson','pierson' );\r\n\t\t\t\tcase 'perko': return array( 'pearce' );\r\n\t\t\t\tcase 'perrault': return array( 'perreault' );\r\n\t\t\t\tcase 'perreault': return array( 'perrault' );\r\n\t\t\t\tcase 'perry': return array( 'parry' );\r\n\t\t\t\tcase 'persson': return array( 'perkins' );\r\n\t\t\t\tcase 'pesti': return array( 'pesty' );\r\n\t\t\t\tcase 'pesty': return array( 'pesti' );\r\n\t\t\t\tcase 'peter': return array( 'petrić','péter' );\r\n\t\t\t\tcase 'peters': return array( 'pedersen' );\r\n\t\t\t\tcase 'petersen': return array( 'pedersen' );\r\n\t\t\t\tcase 'peterson': return array( 'pedersen' );\r\n\t\t\t\tcase 'petersson': return array( 'pedersen' );\r\n\t\t\t\tcase 'petes': return array( 'pethes' );\r\n\t\t\t\tcase 'pethes': return array( 'petes','petőcs' );\r\n\t\t\t\tcase 'petrescu': return array( 'pedersen' );\r\n\t\t\t\tcase 'petri': return array( 'petrić' );\r\n\t\t\t\tcase 'petrić': return array( 'peter','petri','pietri','péter' );\r\n\t\t\t\tcase 'petrosyan': return array( 'pedersen' );\r\n\t\t\t\tcase 'petrov': return array( 'petrović' );\r\n\t\t\t\tcase 'petrović': return array( 'petrov' );\r\n\t\t\t\tcase 'pettersson': return array( 'pedersen' );\r\n\t\t\t\tcase 'petőcs': return array( 'pethes' );\r\n\t\t\t\tcase 'peyton': return array( 'payton' );\r\n\t\t\t\tcase 'peña': return array( 'pena' );\r\n\t\t\t\tcase 'phan': return array( 'pan' );\r\n\t\t\t\tcase 'phelps': return array( 'philips','phillips' );\r\n\t\t\t\tcase 'philips': return array( 'phelps' );\r\n\t\t\t\tcase 'phillips': return array( 'phelps' );\r\n\t\t\t\tcase 'pierce': return array( 'pearce' );\r\n\t\t\t\tcase 'pierson': return array( 'perkins' );\r\n\t\t\t\tcase 'pietri': return array( 'petrić' );\r\n\t\t\t\tcase 'pocock': return array( 'peacock' );\r\n\t\t\t\tcase 'pokorni': return array( 'pokorny' );\r\n\t\t\t\tcase 'pokorny': return array( 'pokorni' );\r\n\t\t\t\tcase 'pope': return array( 'pape' );\r\n\t\t\t\tcase 'porto': return array( 'puerta' );\r\n\t\t\t\tcase 'pospišil': return array( 'pospíšil' );\r\n\t\t\t\tcase 'pospíšil': return array( 'pospišil' );\r\n\t\t\t\tcase 'poulsen': return array( 'pallesen' );\r\n\t\t\t\tcase 'presley': return array( 'pressley' );\r\n\t\t\t\tcase 'pressley': return array( 'presley' );\r\n\t\t\t\tcase 'price': return array( 'pryce' );\r\n\t\t\t\tcase 'prinsen': return array( 'prinz' );\r\n\t\t\t\tcase 'prinz': return array( 'prinsen' );\r\n\t\t\t\tcase 'prochazka': return array( 'procházka' );\r\n\t\t\t\tcase 'procházka': return array( 'prochazka' );\r\n\t\t\t\tcase 'prohaszka': return array( 'prohászka' );\r\n\t\t\t\tcase 'prohászka': return array( 'prohaszka' );\r\n\t\t\t\tcase 'provenza': return array( 'provenzano' );\r\n\t\t\t\tcase 'provenzano': return array( 'provenza' );\r\n\t\t\t\tcase 'pryce': return array( 'price' );\r\n\t\t\t\tcase 'puerta': return array( 'porto' );\r\n\t\t\t\tcase 'pulkrabek': return array( 'pulkrábek' );\r\n\t\t\t\tcase 'pulkrábek': return array( 'pulkrabek' );\r\n\t\t\t\tcase 'puskas': return array( 'puskás' );\r\n\t\t\t\tcase 'puskás': return array( 'puskas' );\r\n\t\t\t\tcase 'pál': return array( 'pal','paul' );\r\n\t\t\t\tcase 'pásztor': return array( 'pasztor' );\r\n\t\t\t\tcase 'pék': return array( 'pek' );\r\n\t\t\t\tcase 'pérez': return array( 'pearce','perez' );\r\n\t\t\t\tcase 'péter': return array( 'peter','petrić' );\r\n\t\t\t\tcase 'quickley': return array( 'quigley' );\r\n\t\t\t\tcase 'quigley': return array( 'quickley' );\r\n\t\t\t\tcase 'quincey': return array( 'quincy' );\r\n\t\t\t\tcase 'quincy': return array( 'quincey' );\r\n\t\t\t\tcase 'quirk': return array( 'quirke' );\r\n\t\t\t\tcase 'quirke': return array( 'quirk' );\r\n\t\t\t\tcase 'quiros': return array( 'quirós' );\r\n\t\t\t\tcase 'quirós': return array( 'quiros' );\r\n\t\t\t\tcase 'radcliff': return array( 'radclyffe' );\r\n\t\t\t\tcase 'radclyffe': return array( 'radcliff' );\r\n\t\t\t\tcase 'rademacher': return array( 'rademaker','rademakers' );\r\n\t\t\t\tcase 'rademaker': return array( 'rademacher' );\r\n\t\t\t\tcase 'rademakers': return array( 'rademacher' );\r\n\t\t\t\tcase 'rafferty': return array( 'o rabhartaigh','ó rabhartaigh' );\r\n\t\t\t\tcase 'raines': return array( 'rains' );\r\n\t\t\t\tcase 'rains': return array( 'raines' );\r\n\t\t\t\tcase 'ramaaker': return array( 'ramaker','ramakers','ramecker','rameckers' );\r\n\t\t\t\tcase 'ramaker': return array( 'ramaaker' );\r\n\t\t\t\tcase 'ramakers': return array( 'ramaaker' );\r\n\t\t\t\tcase 'ramecker': return array( 'ramaaker' );\r\n\t\t\t\tcase 'rameckers': return array( 'ramaaker' );\r\n\t\t\t\tcase 'ramires': return array( 'ramirez','ramírez','raynerson' );\r\n\t\t\t\tcase 'ramirez': return array( 'ramires','ramírez' );\r\n\t\t\t\tcase 'ramsay': return array( 'ramsey' );\r\n\t\t\t\tcase 'ramsey': return array( 'ramsay' );\r\n\t\t\t\tcase 'ramírez': return array( 'ramires','ramirez' );\r\n\t\t\t\tcase 'randal': return array( 'randall' );\r\n\t\t\t\tcase 'randall': return array( 'randal','randell' );\r\n\t\t\t\tcase 'randell': return array( 'randall' );\r\n\t\t\t\tcase 'rao': return array( 'rowe' );\r\n\t\t\t\tcase 'rask': return array( 'raske' );\r\n\t\t\t\tcase 'raske': return array( 'rask' );\r\n\t\t\t\tcase 'raskob': return array( 'raskop' );\r\n\t\t\t\tcase 'raskop': return array( 'raskob','raskoph' );\r\n\t\t\t\tcase 'raskoph': return array( 'raskop' );\r\n\t\t\t\tcase 'ray': return array( 'rey','roy','rye' );\r\n\t\t\t\tcase 'raynerson': return array( 'ramires' );\r\n\t\t\t\tcase 're': return array( 'ré' );\r\n\t\t\t\tcase 'read': return array( 'reed' );\r\n\t\t\t\tcase 'readdie': return array( 'ready' );\r\n\t\t\t\tcase 'ready': return array( 'readdie' );\r\n\t\t\t\tcase 'reagan': return array( 'regan' );\r\n\t\t\t\tcase 'reece': return array( 'rees','reese','rice' );\r\n\t\t\t\tcase 'reed': return array( 'read','reid' );\r\n\t\t\t\tcase 'rees': return array( 'reece' );\r\n\t\t\t\tcase 'reese': return array( 'reece' );\r\n\t\t\t\tcase 'reeve': return array( 'revie' );\r\n\t\t\t\tcase 'regan': return array( 'o riagain','reagan','ó ríagáin' );\r\n\t\t\t\tcase 'reid': return array( 'reed' );\r\n\t\t\t\tcase 'reier': return array( 'reiher','reyer','rier','royer','ryer' );\r\n\t\t\t\tcase 'reiher': return array( 'reier' );\r\n\t\t\t\tcase 'reijnder': return array( 'reijnders','rijnder','rijnders' );\r\n\t\t\t\tcase 'reijnders': return array( 'reijnder' );\r\n\t\t\t\tcase 'reilly': return array( 'riley' );\r\n\t\t\t\tcase 'reinder': return array( 'reinders' );\r\n\t\t\t\tcase 'reinders': return array( 'reinder','reynder','reynders' );\r\n\t\t\t\tcase 'reiter': return array( 'reuter' );\r\n\t\t\t\tcase 'rendon': return array( 'rendón' );\r\n\t\t\t\tcase 'rendón': return array( 'rendon' );\r\n\t\t\t\tcase 'rennell': return array( 'rennoll','reynell' );\r\n\t\t\t\tcase 'rennold': return array( 'reynolds','rinaldi' );\r\n\t\t\t\tcase 'rennoll': return array( 'rennell' );\r\n\t\t\t\tcase 'reuter': return array( 'reiter' );\r\n\t\t\t\tcase 'revie': return array( 'reeve' );\r\n\t\t\t\tcase 'rey': return array( 'ray' );\r\n\t\t\t\tcase 'reyer': return array( 'reier' );\r\n\t\t\t\tcase 'reynder': return array( 'reinders' );\r\n\t\t\t\tcase 'reynders': return array( 'reinders' );\r\n\t\t\t\tcase 'reynell': return array( 'rennell' );\r\n\t\t\t\tcase 'reynolds': return array( 'rennold' );\r\n\t\t\t\tcase 'rhydderch': return array( 'roderick','rodrigues','rodriguez','rodriquez','rodríguez' );\r\n\t\t\t\tcase 'ribeiro': return array( 'rivero' );\r\n\t\t\t\tcase 'ricci': return array( 'rizzo' );\r\n\t\t\t\tcase 'rice': return array( 'reece' );\r\n\t\t\t\tcase 'richard': return array( 'richards' );\r\n\t\t\t\tcase 'richards': return array( 'richard','richardson','rickard' );\r\n\t\t\t\tcase 'richardson': return array( 'richards' );\r\n\t\t\t\tcase 'rickard': return array( 'richards' );\r\n\t\t\t\tcase 'rider': return array( 'ryder' );\r\n\t\t\t\tcase 'rier': return array( 'reier' );\r\n\t\t\t\tcase 'righi': return array( 'ruiz' );\r\n\t\t\t\tcase 'rigo': return array( 'rigó' );\r\n\t\t\t\tcase 'rigó': return array( 'rigo' );\r\n\t\t\t\tcase 'rijnder': return array( 'reijnder' );\r\n\t\t\t\tcase 'rijnders': return array( 'reijnder' );\r\n\t\t\t\tcase 'riley': return array( 'reilly','ryley' );\r\n\t\t\t\tcase 'rinaldi': return array( 'rennold' );\r\n\t\t\t\tcase 'ritter': return array( 'ryder' );\r\n\t\t\t\tcase 'rivero': return array( 'ribeiro' );\r\n\t\t\t\tcase 'rizzo': return array( 'ricci' );\r\n\t\t\t\tcase 'roach': return array( 'roche' );\r\n\t\t\t\tcase 'robbins': return array( 'robinson' );\r\n\t\t\t\tcase 'robert': return array( 'roberts','robertsen','robertson','robertsson','rupertson','rupertsson' );\r\n\t\t\t\tcase 'roberts': return array( 'robert' );\r\n\t\t\t\tcase 'robertsen': return array( 'robert' );\r\n\t\t\t\tcase 'robertson': return array( 'robert' );\r\n\t\t\t\tcase 'robertsson': return array( 'robert' );\r\n\t\t\t\tcase 'robinson': return array( 'robbins' );\r\n\t\t\t\tcase 'rocchi': return array( 'rocco' );\r\n\t\t\t\tcase 'rocco': return array( 'rocchi' );\r\n\t\t\t\tcase 'roche': return array( 'roach' );\r\n\t\t\t\tcase 'roderick': return array( 'rhydderch' );\r\n\t\t\t\tcase 'rodrigues': return array( 'rhydderch' );\r\n\t\t\t\tcase 'rodriguez': return array( 'rhydderch','rodríguez' );\r\n\t\t\t\tcase 'rodriquez': return array( 'rhydderch' );\r\n\t\t\t\tcase 'rodríguez': return array( 'rhydderch','rodriguez' );\r\n\t\t\t\tcase 'rog': return array( 'róg' );\r\n\t\t\t\tcase 'rogers': return array( 'rogerson' );\r\n\t\t\t\tcase 'rogerson': return array( 'rogers' );\r\n\t\t\t\tcase 'roijacker': return array( 'roijackers' );\r\n\t\t\t\tcase 'roijackers': return array( 'roijacker','roijakker','roijakkers','rooijakker','rooijakkers' );\r\n\t\t\t\tcase 'roijakker': return array( 'roijackers' );\r\n\t\t\t\tcase 'roijakkers': return array( 'roijackers' );\r\n\t\t\t\tcase 'rojas': return array( 'roxas' );\r\n\t\t\t\tcase 'roldan': return array( 'roldán' );\r\n\t\t\t\tcase 'roldán': return array( 'roldan' );\r\n\t\t\t\tcase 'roma': return array( 'rome','romà' );\r\n\t\t\t\tcase 'roma ': return array( 'romà ' );\r\n\t\t\t\tcase 'romagna': return array( 'romagnoli' );\r\n\t\t\t\tcase 'romagnoli': return array( 'romagna' );\r\n\t\t\t\tcase 'romao': return array( 'romão' );\r\n\t\t\t\tcase 'rome': return array( 'roma','romà' );\r\n\t\t\t\tcase 'romeijn': return array( 'romeijnders' );\r\n\t\t\t\tcase 'romeijnders': return array( 'romeijn','romeijnsen','romijn','romijnders','romijnsen' );\r\n\t\t\t\tcase 'romeijnsen': return array( 'romeijnders' );\r\n\t\t\t\tcase 'romijn': return array( 'romeijnders' );\r\n\t\t\t\tcase 'romijnders': return array( 'romeijnders' );\r\n\t\t\t\tcase 'romijnsen': return array( 'romeijnders' );\r\n\t\t\t\tcase 'romà': return array( 'roma','rome' );\r\n\t\t\t\tcase 'romà ': return array( 'roma ' );\r\n\t\t\t\tcase 'romão': return array( 'romao' );\r\n\t\t\t\tcase 'rooijakker': return array( 'roijackers' );\r\n\t\t\t\tcase 'rooijakkers': return array( 'roijackers' );\r\n\t\t\t\tcase 'rose': return array( 'royce' );\r\n\t\t\t\tcase 'rosenberg': return array( 'rosenberger' );\r\n\t\t\t\tcase 'rosenberger': return array( 'rosenberg' );\r\n\t\t\t\tcase 'rossi': return array( 'russo' );\r\n\t\t\t\tcase 'rot': return array( 'roth' );\r\n\t\t\t\tcase 'roth': return array( 'rot' );\r\n\t\t\t\tcase 'rousseau': return array( 'roux' );\r\n\t\t\t\tcase 'roux': return array( 'rousseau' );\r\n\t\t\t\tcase 'rowan': return array( 'ruane' );\r\n\t\t\t\tcase 'rowe': return array( 'rao' );\r\n\t\t\t\tcase 'roxas': return array( 'rojas' );\r\n\t\t\t\tcase 'roy': return array( 'ray' );\r\n\t\t\t\tcase 'royce': return array( 'rose','rozsa','ruiz','ruzsa','rózsa' );\r\n\t\t\t\tcase 'royer': return array( 'reier' );\r\n\t\t\t\tcase 'rozsa': return array( 'royce','rózsa' );\r\n\t\t\t\tcase 'ruane': return array( 'rowan' );\r\n\t\t\t\tcase 'rudaski': return array( 'rudawski' );\r\n\t\t\t\tcase 'rudawski': return array( 'rudaski' );\r\n\t\t\t\tcase 'ruggeri': return array( 'ruzzier' );\r\n\t\t\t\tcase 'ruiz': return array( 'righi','royce' );\r\n\t\t\t\tcase 'rupertson': return array( 'robert' );\r\n\t\t\t\tcase 'rupertsson': return array( 'robert' );\r\n\t\t\t\tcase 'russel': return array( 'russell' );\r\n\t\t\t\tcase 'russell': return array( 'russel' );\r\n\t\t\t\tcase 'russo': return array( 'rossi' );\r\n\t\t\t\tcase 'rutherford': return array( 'rutherfurd' );\r\n\t\t\t\tcase 'rutherfurd': return array( 'rutherford' );\r\n\t\t\t\tcase 'ruzsa': return array( 'royce' );\r\n\t\t\t\tcase 'ruzzier': return array( 'ruggeri' );\r\n\t\t\t\tcase 'ryan': return array( 'o riain','ó riain' );\r\n\t\t\t\tcase 'rybar': return array( 'rybár' );\r\n\t\t\t\tcase 'rybař': return array( 'rybář' );\r\n\t\t\t\tcase 'rybár': return array( 'rybar' );\r\n\t\t\t\tcase 'rybář': return array( 'rybař' );\r\n\t\t\t\tcase 'ryder': return array( 'rider','ritter' );\r\n\t\t\t\tcase 'rye': return array( 'ray' );\r\n\t\t\t\tcase 'ryer': return array( 'reier' );\r\n\t\t\t\tcase 'ryley': return array( 'riley' );\r\n\t\t\t\tcase 'ré': return array( 're' );\r\n\t\t\t\tcase 'róg': return array( 'rog' );\r\n\t\t\t\tcase 'rózsa': return array( 'royce','rozsa' );\r\n\t\t\t\tcase 'saito': return array( 'sato' );\r\n\t\t\t\tcase 'salomon': return array( 'solomon' );\r\n\t\t\t\tcase 'salvage': return array( 'salvaggi' );\r\n\t\t\t\tcase 'salvaggi': return array( 'salvage','selvaggio' );\r\n\t\t\t\tcase 'salvai': return array( 'salvay' );\r\n\t\t\t\tcase 'salvay': return array( 'salvai' );\r\n\t\t\t\tcase 'sams': return array( 'samsa' );\r\n\t\t\t\tcase 'samsa': return array( 'sams' );\r\n\t\t\t\tcase 'samson': return array( 'sansone' );\r\n\t\t\t\tcase 'samuels': return array( 'samuelson' );\r\n\t\t\t\tcase 'samuelson': return array( 'samuels' );\r\n\t\t\t\tcase 'sander': return array( 'sanders' );\r\n\t\t\t\tcase 'sanders': return array( 'sander','sanderson','sandor','saunders','sándor' );\r\n\t\t\t\tcase 'sanderson': return array( 'sanders' );\r\n\t\t\t\tcase 'sandor': return array( 'sanders','sándor' );\r\n\t\t\t\tcase 'sansone': return array( 'samson' );\r\n\t\t\t\tcase 'sargent': return array( 'sergeant' );\r\n\t\t\t\tcase 'sarka': return array( 'szarka' );\r\n\t\t\t\tcase 'sarkoezi': return array( 'sárközi' );\r\n\t\t\t\tcase 'sarkoezy': return array( 'sárközy' );\r\n\t\t\t\tcase 'sarkozi': return array( 'sárközi' );\r\n\t\t\t\tcase 'sarkozy': return array( 'sárközy' );\r\n\t\t\t\tcase 'sarti': return array( 'sarto' );\r\n\t\t\t\tcase 'sarto': return array( 'sarti' );\r\n\t\t\t\tcase 'sas': return array( 'sass' );\r\n\t\t\t\tcase 'sasaki': return array( 'suzuki' );\r\n\t\t\t\tcase 'sass': return array( 'sas' );\r\n\t\t\t\tcase 'sato': return array( 'saito' );\r\n\t\t\t\tcase 'saunders': return array( 'sanders' );\r\n\t\t\t\tcase 'sauvage': return array( 'sauvageau' );\r\n\t\t\t\tcase 'sauvageau': return array( 'sauvage','savage','savege' );\r\n\t\t\t\tcase 'savage': return array( 'sauvageau' );\r\n\t\t\t\tcase 'savege': return array( 'sauvageau' );\r\n\t\t\t\tcase 'schaefer': return array( 'schäfer' );\r\n\t\t\t\tcase 'schafer': return array( 'schäfer' );\r\n\t\t\t\tcase 'schlusser': return array( 'slusser' );\r\n\t\t\t\tcase 'schmid': return array( 'schmidt' );\r\n\t\t\t\tcase 'schmidt': return array( 'schmid','schmitt','smit','smith','smythe' );\r\n\t\t\t\tcase 'schmitt': return array( 'schmidt' );\r\n\t\t\t\tcase 'schmitz': return array( 'smeets','smets','smits' );\r\n\t\t\t\tcase 'schneider': return array( 'schneiders' );\r\n\t\t\t\tcase 'schneiders': return array( 'schneider','sneiders','snider','sniders','snyder','snyders' );\r\n\t\t\t\tcase 'schneijder': return array( 'sneijder','sneijders','snijder','snijders' );\r\n\t\t\t\tcase 'schnoor': return array( 'schnur' );\r\n\t\t\t\tcase 'schnur': return array( 'schnoor' );\r\n\t\t\t\tcase 'schoorel': return array( 'schoorl','schorel' );\r\n\t\t\t\tcase 'schoorl': return array( 'schoorel' );\r\n\t\t\t\tcase 'schorel': return array( 'schoorel' );\r\n\t\t\t\tcase 'schrader': return array( 'schraeder','schroder','schroeder','schräder','schröder' );\r\n\t\t\t\tcase 'schraeder': return array( 'schrader','schräder' );\r\n\t\t\t\tcase 'schroder': return array( 'schrader','schröder' );\r\n\t\t\t\tcase 'schroder ': return array( 'schröder ' );\r\n\t\t\t\tcase 'schroeder': return array( 'schrader','schröder' );\r\n\t\t\t\tcase 'schroeder ': return array( 'schröder ' );\r\n\t\t\t\tcase 'schroeter': return array( 'schröter' );\r\n\t\t\t\tcase 'schroter': return array( 'schröter' );\r\n\t\t\t\tcase 'schräder': return array( 'schrader','schraeder' );\r\n\t\t\t\tcase 'schröder': return array( 'schrader','schroder','schroeder' );\r\n\t\t\t\tcase 'schröder ': return array( 'schroder ','schroeder ' );\r\n\t\t\t\tcase 'schröter': return array( 'schroeter','schroter' );\r\n\t\t\t\tcase 'schuchard': return array( 'schuchardt' );\r\n\t\t\t\tcase 'schuchardt': return array( 'schuchard','schuchert' );\r\n\t\t\t\tcase 'schuchert': return array( 'schuchardt' );\r\n\t\t\t\tcase 'schuhmacher': return array( 'schumacher' );\r\n\t\t\t\tcase 'schuler': return array( 'schuyler' );\r\n\t\t\t\tcase 'schult': return array( 'schulte' );\r\n\t\t\t\tcase 'schulte': return array( 'schult','schultheisz','schultheiß' );\r\n\t\t\t\tcase 'schultes': return array( 'schultheis' );\r\n\t\t\t\tcase 'schultheis': return array( 'schultes','schultheiss','schultz','schultze' );\r\n\t\t\t\tcase 'schultheiss': return array( 'schultheis' );\r\n\t\t\t\tcase 'schultheisz': return array( 'schulte','schultheiß' );\r\n\t\t\t\tcase 'schultheiß': return array( 'schulte','schultheisz' );\r\n\t\t\t\tcase 'schultz': return array( 'schultheis' );\r\n\t\t\t\tcase 'schultze': return array( 'schultheis' );\r\n\t\t\t\tcase 'schulz': return array( 'schulze' );\r\n\t\t\t\tcase 'schulze': return array( 'schulz' );\r\n\t\t\t\tcase 'schumacher': return array( 'schuhmacher' );\r\n\t\t\t\tcase 'schuyler': return array( 'schuler' );\r\n\t\t\t\tcase 'schwangau': return array( 'swango' );\r\n\t\t\t\tcase 'schwarz': return array( 'szwarc' );\r\n\t\t\t\tcase 'schäfer': return array( 'schaefer','schafer' );\r\n\t\t\t\tcase 'scriven': return array( 'scrivener','scrivenor','scrivens' );\r\n\t\t\t\tcase 'scrivener': return array( 'scriven' );\r\n\t\t\t\tcase 'scrivenor': return array( 'scriven' );\r\n\t\t\t\tcase 'scrivens': return array( 'scriven' );\r\n\t\t\t\tcase 'sebastiani': return array( 'sebastino' );\r\n\t\t\t\tcase 'sebastino': return array( 'sebastiani' );\r\n\t\t\t\tcase 'sedlak': return array( 'sedlaček','sedláček' );\r\n\t\t\t\tcase 'sedlaček': return array( 'sedlak','sedláček' );\r\n\t\t\t\tcase 'sedláček': return array( 'sedlak','sedlaček' );\r\n\t\t\t\tcase 'seeger': return array( 'sieger' );\r\n\t\t\t\tcase 'seegers': return array( 'segers' );\r\n\t\t\t\tcase 'segers': return array( 'seegers','seghers' );\r\n\t\t\t\tcase 'seghers': return array( 'segers' );\r\n\t\t\t\tcase 'selby': return array( 'shelby' );\r\n\t\t\t\tcase 'selvaggio': return array( 'salvaggi' );\r\n\t\t\t\tcase 'seppa': return array( 'seppä' );\r\n\t\t\t\tcase 'seppae': return array( 'seppä' );\r\n\t\t\t\tcase 'seppaenen': return array( 'seppänen' );\r\n\t\t\t\tcase 'seppanen': return array( 'seppänen' );\r\n\t\t\t\tcase 'seppä': return array( 'seppa','seppae' );\r\n\t\t\t\tcase 'seppänen': return array( 'seppaenen','seppanen' );\r\n\t\t\t\tcase 'sepulveda': return array( 'sepúlveda' );\r\n\t\t\t\tcase 'sepúlveda': return array( 'sepulveda' );\r\n\t\t\t\tcase 'serafim': return array( 'serafin','serafini' );\r\n\t\t\t\tcase 'serafin': return array( 'serafim' );\r\n\t\t\t\tcase 'serafini': return array( 'serafim' );\r\n\t\t\t\tcase 'seres': return array( 'soeroes','soros','sörös' );\r\n\t\t\t\tcase 'sergeant': return array( 'sargent' );\r\n\t\t\t\tcase 'severin': return array( 'severins','séverin' );\r\n\t\t\t\tcase 'severins': return array( 'severin','sevriens','séverin' );\r\n\t\t\t\tcase 'sevriens': return array( 'severins' );\r\n\t\t\t\tcase 'shannon': return array( 'o seanain','sheenan','ó seanáin' );\r\n\t\t\t\tcase 'sharman': return array( 'sherman' );\r\n\t\t\t\tcase 'sheedy': return array( 'o sioda','ó síoda' );\r\n\t\t\t\tcase 'sheenan': return array( 'shannon' );\r\n\t\t\t\tcase 'shelby': return array( 'selby' );\r\n\t\t\t\tcase 'shepard': return array( 'shepherd' );\r\n\t\t\t\tcase 'shepherd': return array( 'shepard','sheppard' );\r\n\t\t\t\tcase 'sheppard': return array( 'shepherd' );\r\n\t\t\t\tcase 'sheridan': return array( 'o sirideain','ó sirideáin' );\r\n\t\t\t\tcase 'sherman': return array( 'sharman' );\r\n\t\t\t\tcase 'sidney': return array( 'sydney' );\r\n\t\t\t\tcase 'sieger': return array( 'seeger' );\r\n\t\t\t\tcase 'siemon': return array( 'simen','simmon','simon' );\r\n\t\t\t\tcase 'simen': return array( 'siemon' );\r\n\t\t\t\tcase 'simmon': return array( 'siemon' );\r\n\t\t\t\tcase 'simmons': return array( 'simonis','simons','simonsen','simonson','simonsson','symons' );\r\n\t\t\t\tcase 'simms': return array( 'simoes','sims','simões' );\r\n\t\t\t\tcase 'simoes': return array( 'simms','simões' );\r\n\t\t\t\tcase 'simon': return array( 'siemon' );\r\n\t\t\t\tcase 'simoneit': return array( 'simonides' );\r\n\t\t\t\tcase 'simonides': return array( 'simoneit' );\r\n\t\t\t\tcase 'simonis': return array( 'simmons' );\r\n\t\t\t\tcase 'simons': return array( 'simmons' );\r\n\t\t\t\tcase 'simonsen': return array( 'simmons' );\r\n\t\t\t\tcase 'simonson': return array( 'simmons' );\r\n\t\t\t\tcase 'simonsson': return array( 'simmons' );\r\n\t\t\t\tcase 'simpkin': return array( 'simpson' );\r\n\t\t\t\tcase 'simpson': return array( 'simpkin' );\r\n\t\t\t\tcase 'sims': return array( 'simms' );\r\n\t\t\t\tcase 'simões': return array( 'simms','simoes' );\r\n\t\t\t\tcase 'slaski': return array( 'slezak','slezák' );\r\n\t\t\t\tcase 'slezak': return array( 'slaski','slezák' );\r\n\t\t\t\tcase 'slezák': return array( 'slaski','slezak' );\r\n\t\t\t\tcase 'sloan': return array( 'sloane' );\r\n\t\t\t\tcase 'sloane': return array( 'sloan' );\r\n\t\t\t\tcase 'slusser': return array( 'schlusser' );\r\n\t\t\t\tcase 'smeets': return array( 'schmitz' );\r\n\t\t\t\tcase 'smets': return array( 'schmitz' );\r\n\t\t\t\tcase 'smit': return array( 'schmidt' );\r\n\t\t\t\tcase 'smith': return array( 'schmidt' );\r\n\t\t\t\tcase 'smits': return array( 'schmitz' );\r\n\t\t\t\tcase 'smolak': return array( 'smolák' );\r\n\t\t\t\tcase 'smolák': return array( 'smolak' );\r\n\t\t\t\tcase 'smythe': return array( 'schmidt' );\r\n\t\t\t\tcase 'snaaijer': return array( 'snaijer' );\r\n\t\t\t\tcase 'snaijer': return array( 'snaaijer','sneijer','sneijers' );\r\n\t\t\t\tcase 'sneiders': return array( 'schneiders' );\r\n\t\t\t\tcase 'sneijder': return array( 'schneijder' );\r\n\t\t\t\tcase 'sneijders': return array( 'schneijder' );\r\n\t\t\t\tcase 'sneijer': return array( 'snaijer' );\r\n\t\t\t\tcase 'sneijers': return array( 'snaijer' );\r\n\t\t\t\tcase 'snider': return array( 'schneiders' );\r\n\t\t\t\tcase 'sniders': return array( 'schneiders' );\r\n\t\t\t\tcase 'snijder': return array( 'schneijder' );\r\n\t\t\t\tcase 'snijders': return array( 'schneijder' );\r\n\t\t\t\tcase 'snyder': return array( 'schneiders' );\r\n\t\t\t\tcase 'snyders': return array( 'schneiders' );\r\n\t\t\t\tcase 'soerensen': return array( 'sorenson','sörensen' );\r\n\t\t\t\tcase 'soerensson': return array( 'sorenson','sörensson' );\r\n\t\t\t\tcase 'soeroes': return array( 'seres','sörös' );\r\n\t\t\t\tcase 'sokal': return array( 'sokol' );\r\n\t\t\t\tcase 'sokol': return array( 'sokal','sokoll' );\r\n\t\t\t\tcase 'sokoll': return array( 'sokol' );\r\n\t\t\t\tcase 'sokolof': return array( 'sokoloff','sokolofsky','sokolov' );\r\n\t\t\t\tcase 'sokoloff': return array( 'sokolof' );\r\n\t\t\t\tcase 'sokolofsky': return array( 'sokolof' );\r\n\t\t\t\tcase 'sokolov': return array( 'sokolof' );\r\n\t\t\t\tcase 'sokolowski': return array( 'sokolsky' );\r\n\t\t\t\tcase 'sokolsky': return array( 'sokolowski' );\r\n\t\t\t\tcase 'solomon': return array( 'salomon' );\r\n\t\t\t\tcase 'solyom': return array( 'sólyom' );\r\n\t\t\t\tcase 'song': return array( 'sung' );\r\n\t\t\t\tcase 'sorensen': return array( 'sorenson','sörensen','sørensen' );\r\n\t\t\t\tcase 'sorenson': return array( 'soerensen','soerensson','sorensen','sorensson','sörensen','sörensson','sørensen' );\r\n\t\t\t\tcase 'sorensson': return array( 'sorenson','sörensson' );\r\n\t\t\t\tcase 'sorg': return array( 'sorge' );\r\n\t\t\t\tcase 'sorge': return array( 'sorg' );\r\n\t\t\t\tcase 'soros': return array( 'seres','sörös' );\r\n\t\t\t\tcase 'sovany': return array( 'sovány' );\r\n\t\t\t\tcase 'sovány': return array( 'sovany' );\r\n\t\t\t\tcase 'sowka': return array( 'sówka' );\r\n\t\t\t\tcase 'spannagel': return array( 'sponaugle' );\r\n\t\t\t\tcase 'spano': return array( 'spanò' );\r\n\t\t\t\tcase 'spanò': return array( 'spano' );\r\n\t\t\t\tcase 'specht': return array( 'speight' );\r\n\t\t\t\tcase 'speight': return array( 'specht' );\r\n\t\t\t\tcase 'spence': return array( 'spencer' );\r\n\t\t\t\tcase 'spencer': return array( 'spence' );\r\n\t\t\t\tcase 'spijker': return array( 'spiker' );\r\n\t\t\t\tcase 'spiker': return array( 'spijker' );\r\n\t\t\t\tcase 'sponaugle': return array( 'spannagel' );\r\n\t\t\t\tcase 'stacey': return array( 'stacy' );\r\n\t\t\t\tcase 'stack': return array( 'stacks' );\r\n\t\t\t\tcase 'stacks': return array( 'stack' );\r\n\t\t\t\tcase 'stacy': return array( 'stacey' );\r\n\t\t\t\tcase 'stanek': return array( 'stankić' );\r\n\t\t\t\tcase 'stankić': return array( 'stanek' );\r\n\t\t\t\tcase 'starek': return array( 'stárek' );\r\n\t\t\t\tcase 'steen': return array( 'stein' );\r\n\t\t\t\tcase 'steensen': return array( 'steinsson' );\r\n\t\t\t\tcase 'stefanov': return array( 'stefanović','stefansen','stefansson','steffen','steffensen','stefánsson','stephanidis','stephens','stephenson','stevens','stevenson' );\r\n\t\t\t\tcase 'stefanović': return array( 'stefanov' );\r\n\t\t\t\tcase 'stefansen': return array( 'stefanov' );\r\n\t\t\t\tcase 'stefansson': return array( 'stefanov','stefánsson' );\r\n\t\t\t\tcase 'steffen': return array( 'stefanov' );\r\n\t\t\t\tcase 'steffensen': return array( 'stefanov' );\r\n\t\t\t\tcase 'stefánsson': return array( 'stefanov','stefansson' );\r\n\t\t\t\tcase 'stein': return array( 'steen' );\r\n\t\t\t\tcase 'steinsson': return array( 'steensen' );\r\n\t\t\t\tcase 'stephanidis': return array( 'stefanov' );\r\n\t\t\t\tcase 'stephens': return array( 'stefanov' );\r\n\t\t\t\tcase 'stephenson': return array( 'stefanov' );\r\n\t\t\t\tcase 'sterling': return array( 'stirling' );\r\n\t\t\t\tcase 'stevens': return array( 'stefanov' );\r\n\t\t\t\tcase 'stevenson': return array( 'stefanov' );\r\n\t\t\t\tcase 'stewart': return array( 'stuart' );\r\n\t\t\t\tcase 'stirling': return array( 'sterling' );\r\n\t\t\t\tcase 'stuart': return array( 'stewart' );\r\n\t\t\t\tcase 'stárek': return array( 'starek' );\r\n\t\t\t\tcase 'suarez': return array( 'suárez' );\r\n\t\t\t\tcase 'suchy': return array( 'suchý' );\r\n\t\t\t\tcase 'suchý': return array( 'suchy' );\r\n\t\t\t\tcase 'sullivan': return array( 'o suileabhain','ó súileabháin' );\r\n\t\t\t\tcase 'sunden': return array( 'sundén' );\r\n\t\t\t\tcase 'sundén': return array( 'sunden' );\r\n\t\t\t\tcase 'sung': return array( 'song' );\r\n\t\t\t\tcase 'suzuki': return array( 'sasaki' );\r\n\t\t\t\tcase 'suárez': return array( 'suarez' );\r\n\t\t\t\tcase 'sved': return array( 'svéd' );\r\n\t\t\t\tcase 'svenson': return array( 'svensson' );\r\n\t\t\t\tcase 'svensson': return array( 'svenson' );\r\n\t\t\t\tcase 'svéd': return array( 'sved' );\r\n\t\t\t\tcase 'swango': return array( 'schwangau' );\r\n\t\t\t\tcase 'sydney': return array( 'sidney' );\r\n\t\t\t\tcase 'symons': return array( 'simmons' );\r\n\t\t\t\tcase 'szabo': return array( 'szabó' );\r\n\t\t\t\tcase 'szabó': return array( 'szabo' );\r\n\t\t\t\tcase 'szanto': return array( 'szántó' );\r\n\t\t\t\tcase 'szarka': return array( 'sarka' );\r\n\t\t\t\tcase 'szekely': return array( 'székely' );\r\n\t\t\t\tcase 'szep': return array( 'szép' );\r\n\t\t\t\tcase 'szucs': return array( 'szûcs' );\r\n\t\t\t\tcase 'szwarc': return array( 'schwarz' );\r\n\t\t\t\tcase 'szántó': return array( 'szanto' );\r\n\t\t\t\tcase 'székely': return array( 'szekely' );\r\n\t\t\t\tcase 'szép': return array( 'szep' );\r\n\t\t\t\tcase 'szûcs': return array( 'szucs' );\r\n\t\t\t\tcase 'sándor': return array( 'sanders','sandor' );\r\n\t\t\t\tcase 'sárközi': return array( 'sarkoezi','sarkozi' );\r\n\t\t\t\tcase 'sárközy': return array( 'sarkoezy','sarkozy' );\r\n\t\t\t\tcase 'séverin': return array( 'severin','severins' );\r\n\t\t\t\tcase 'sólyom': return array( 'solyom' );\r\n\t\t\t\tcase 'sówka': return array( 'sowka' );\r\n\t\t\t\tcase 'sörensen': return array( 'soerensen','sorensen','sorenson' );\r\n\t\t\t\tcase 'sörensson': return array( 'soerensson','sorenson','sorensson' );\r\n\t\t\t\tcase 'sörös': return array( 'seres','soeroes','soros' );\r\n\t\t\t\tcase 'sørensen': return array( 'sorensen','sorenson' );\r\n\t\t\t\tcase 'taehtinen': return array( 'tähtinen' );\r\n\t\t\t\tcase 'tahtinen': return array( 'tähtinen' );\r\n\t\t\t\tcase 'tailor': return array( 'taylor' );\r\n\t\t\t\tcase 'takacs': return array( 'takács' );\r\n\t\t\t\tcase 'takács': return array( 'takacs' );\r\n\t\t\t\tcase 'tamaro': return array( 'tamàro' );\r\n\t\t\t\tcase 'tamas': return array( 'tamás','thomas' );\r\n\t\t\t\tcase 'tamàro': return array( 'tamaro' );\r\n\t\t\t\tcase 'tamás': return array( 'tamas','thomas' );\r\n\t\t\t\tcase 'tar': return array( 'tarr' );\r\n\t\t\t\tcase 'tarr': return array( 'tar' );\r\n\t\t\t\tcase 'taylor': return array( 'tailor' );\r\n\t\t\t\tcase 'teague': return array( 'tighe' );\r\n\t\t\t\tcase 'tennison': return array( 'tennyson' );\r\n\t\t\t\tcase 'tennyson': return array( 'tennison' );\r\n\t\t\t\tcase 'terrell': return array( 'tirrell','tyrell','tyrrell' );\r\n\t\t\t\tcase 'teunissen': return array( 'tunison' );\r\n\t\t\t\tcase 'theunissen': return array( 'tunison' );\r\n\t\t\t\tcase 'thomas': return array( 'tamas','tamás','tomas','tomàs' );\r\n\t\t\t\tcase 'thompsett': return array( 'thompson' );\r\n\t\t\t\tcase 'thompson': return array( 'thompsett' );\r\n\t\t\t\tcase 'thomson': return array( 'tomasson','tómasson' );\r\n\t\t\t\tcase 'thorirsson': return array( 'þórirsson' );\r\n\t\t\t\tcase 'thorn': return array( 'thorne' );\r\n\t\t\t\tcase 'thorne': return array( 'thorn' );\r\n\t\t\t\tcase 'tifft': return array( 'toft' );\r\n\t\t\t\tcase 'tighe': return array( 'teague' );\r\n\t\t\t\tcase 'timar': return array( 'tímár' );\r\n\t\t\t\tcase 'tirrell': return array( 'terrell' );\r\n\t\t\t\tcase 'tjader': return array( 'tjäder' );\r\n\t\t\t\tcase 'tjaeder': return array( 'tjäder' );\r\n\t\t\t\tcase 'tjäder': return array( 'tjader','tjaeder' );\r\n\t\t\t\tcase 'tod': return array( 'todd' );\r\n\t\t\t\tcase 'todd': return array( 'tod' );\r\n\t\t\t\tcase 'toeroek': return array( 'török' );\r\n\t\t\t\tcase 'toft': return array( 'tifft' );\r\n\t\t\t\tcase 'tomas': return array( 'thomas','tomàs' );\r\n\t\t\t\tcase 'tomasson': return array( 'thomson','tómasson' );\r\n\t\t\t\tcase 'tomàs': return array( 'thomas','tomas' );\r\n\t\t\t\tcase 'tomčić': return array( 'tomčič' );\r\n\t\t\t\tcase 'tomčič': return array( 'tomčić' );\r\n\t\t\t\tcase 'torok': return array( 'török' );\r\n\t\t\t\tcase 'tos': return array( 'tosi' );\r\n\t\t\t\tcase 'tosell': return array( 'toselli' );\r\n\t\t\t\tcase 'toselli': return array( 'tosell' );\r\n\t\t\t\tcase 'toset': return array( 'tosetti' );\r\n\t\t\t\tcase 'tosetti': return array( 'toset' );\r\n\t\t\t\tcase 'tosi': return array( 'tos' );\r\n\t\t\t\tcase 'tot': return array( 'tót' );\r\n\t\t\t\tcase 'toth': return array( 'tóth' );\r\n\t\t\t\tcase 'tracey': return array( 'tracy' );\r\n\t\t\t\tcase 'tracy': return array( 'tracey','treacy' );\r\n\t\t\t\tcase 'tran': return array( 'trần' );\r\n\t\t\t\tcase 'traver': return array( 'travere' );\r\n\t\t\t\tcase 'travere': return array( 'traver','travers','traversa','traverse','traversi','traversini','traverso','travert' );\r\n\t\t\t\tcase 'travers': return array( 'travere' );\r\n\t\t\t\tcase 'traversa': return array( 'travere' );\r\n\t\t\t\tcase 'traverse': return array( 'travere' );\r\n\t\t\t\tcase 'traversi': return array( 'travere' );\r\n\t\t\t\tcase 'traversini': return array( 'travere' );\r\n\t\t\t\tcase 'traverso': return array( 'travere' );\r\n\t\t\t\tcase 'travert': return array( 'travere' );\r\n\t\t\t\tcase 'traves': return array( 'travieso','travis','traviss','trevis' );\r\n\t\t\t\tcase 'travieso': return array( 'traves' );\r\n\t\t\t\tcase 'travis': return array( 'traves' );\r\n\t\t\t\tcase 'traviss': return array( 'traves' );\r\n\t\t\t\tcase 'treacy': return array( 'tracy' );\r\n\t\t\t\tcase 'trevis': return array( 'traves' );\r\n\t\t\t\tcase 'trueman': return array( 'truman' );\r\n\t\t\t\tcase 'truman': return array( 'trueman' );\r\n\t\t\t\tcase 'trần': return array( 'tran' );\r\n\t\t\t\tcase 'tsvetanov': return array( 'tsvetkov' );\r\n\t\t\t\tcase 'tsvetkov': return array( 'tsvetanov' );\r\n\t\t\t\tcase 'tunison': return array( 'teunissen','theunissen' );\r\n\t\t\t\tcase 'tyrell': return array( 'terrell' );\r\n\t\t\t\tcase 'tyrrell': return array( 'terrell' );\r\n\t\t\t\tcase 'tähtinen': return array( 'taehtinen','tahtinen' );\r\n\t\t\t\tcase 'tímár': return array( 'timar' );\r\n\t\t\t\tcase 'tómasson': return array( 'thomson','tomasson' );\r\n\t\t\t\tcase 'tót': return array( 'tot' );\r\n\t\t\t\tcase 'tóth': return array( 'toth' );\r\n\t\t\t\tcase 'török': return array( 'toeroek','torok' );\r\n\t\t\t\tcase 'ungaretti': return array( 'ungaro','ungur' );\r\n\t\t\t\tcase 'ungaro': return array( 'ungaretti' );\r\n\t\t\t\tcase 'ungur': return array( 'ungaretti' );\r\n\t\t\t\tcase 'urena': return array( 'ureña' );\r\n\t\t\t\tcase 'ureña': return array( 'urena' );\r\n\t\t\t\tcase 'vacik': return array( 'vacík','vašek' );\r\n\t\t\t\tcase 'vacík': return array( 'vacik','vašek' );\r\n\t\t\t\tcase 'vaduva': return array( 'vãduva' );\r\n\t\t\t\tcase 'valenta': return array( 'valenti','valentini','valentinov' );\r\n\t\t\t\tcase 'valenti': return array( 'valenta' );\r\n\t\t\t\tcase 'valentini': return array( 'valenta' );\r\n\t\t\t\tcase 'valentinov': return array( 'valenta' );\r\n\t\t\t\tcase 'vamos': return array( 'vámos' );\r\n\t\t\t\tcase 'van daal': return array( 'vandale' );\r\n\t\t\t\tcase 'van daalen': return array( 'vandale' );\r\n\t\t\t\tcase 'van dael': return array( 'vandale' );\r\n\t\t\t\tcase 'van daele': return array( 'vandale' );\r\n\t\t\t\tcase 'van dale': return array( 'vandale' );\r\n\t\t\t\tcase 'van dalen': return array( 'vandale' );\r\n\t\t\t\tcase 'vanchev': return array( 'vankov' );\r\n\t\t\t\tcase 'vandale': return array( 'van daal','van daalen','van dael','van daele','van dale','van dalen' );\r\n\t\t\t\tcase 'vang': return array( 'vång' );\r\n\t\t\t\tcase 'vankov': return array( 'vanchev' );\r\n\t\t\t\tcase 'varga': return array( 'vargha' );\r\n\t\t\t\tcase 'vargha': return array( 'varga' );\r\n\t\t\t\tcase 'vasilescu': return array( 'vasylyk','vasylyshyn' );\r\n\t\t\t\tcase 'vasilev': return array( 'vasilyev' );\r\n\t\t\t\tcase 'vasilyev': return array( 'vasilev' );\r\n\t\t\t\tcase 'vasquez': return array( 'vásquez' );\r\n\t\t\t\tcase 'vastag': return array( 'vastagh' );\r\n\t\t\t\tcase 'vastagh': return array( 'vastag' );\r\n\t\t\t\tcase 'vasylyk': return array( 'vasilescu' );\r\n\t\t\t\tcase 'vasylyshyn': return array( 'vasilescu' );\r\n\t\t\t\tcase 'vaughan': return array( 'vaughn' );\r\n\t\t\t\tcase 'vaughn': return array( 'vaughan' );\r\n\t\t\t\tcase 'vazquez': return array( 'vázquez' );\r\n\t\t\t\tcase 'vašek': return array( 'vacik','vacík' );\r\n\t\t\t\tcase 'venaelaeinen': return array( 'venäläinen' );\r\n\t\t\t\tcase 'venalainen': return array( 'venäläinen' );\r\n\t\t\t\tcase 'vencel': return array( 'venczel' );\r\n\t\t\t\tcase 'venczel': return array( 'vencel' );\r\n\t\t\t\tcase 'venäläinen': return array( 'venaelaeinen','venalainen' );\r\n\t\t\t\tcase 'veres': return array( 'voeroes','voros','vörös' );\r\n\t\t\t\tcase 'vico': return array( 'vigo' );\r\n\t\t\t\tcase 'victor': return array( 'victore' );\r\n\t\t\t\tcase 'victore': return array( 'victor','victors','victorson','victorsson','viktorov' );\r\n\t\t\t\tcase 'victors': return array( 'victore' );\r\n\t\t\t\tcase 'victorson': return array( 'victore' );\r\n\t\t\t\tcase 'victorsson': return array( 'victore' );\r\n\t\t\t\tcase 'vida': return array( 'vieth' );\r\n\t\t\t\tcase 'vieth': return array( 'vida' );\r\n\t\t\t\tcase 'vigo': return array( 'vico' );\r\n\t\t\t\tcase 'viktorov': return array( 'victore' );\r\n\t\t\t\tcase 'vilaro': return array( 'vilaró' );\r\n\t\t\t\tcase 'vilaró': return array( 'vilaro' );\r\n\t\t\t\tcase 'vinci': return array( 'vincze' );\r\n\t\t\t\tcase 'vincze': return array( 'vinci' );\r\n\t\t\t\tcase 'virag': return array( 'virág' );\r\n\t\t\t\tcase 'virág': return array( 'virag' );\r\n\t\t\t\tcase 'vivas': return array( 'vives' );\r\n\t\t\t\tcase 'vives': return array( 'vivas' );\r\n\t\t\t\tcase 'vlasak': return array( 'vlasák' );\r\n\t\t\t\tcase 'vlasák': return array( 'vlasak' );\r\n\t\t\t\tcase 'voeroes': return array( 'veres','vörös' );\r\n\t\t\t\tcase 'vogt': return array( 'voigt' );\r\n\t\t\t\tcase 'vogts': return array( 'voigts' );\r\n\t\t\t\tcase 'voigt': return array( 'vogt' );\r\n\t\t\t\tcase 'voigts': return array( 'vogts' );\r\n\t\t\t\tcase 'voros': return array( 'veres','vörös' );\r\n\t\t\t\tcase 'vosz': return array( 'voß' );\r\n\t\t\t\tcase 'voß': return array( 'vosz' );\r\n\t\t\t\tcase 'vámos': return array( 'vamos' );\r\n\t\t\t\tcase 'vásquez': return array( 'vasquez' );\r\n\t\t\t\tcase 'vázquez': return array( 'vazquez' );\r\n\t\t\t\tcase 'vãduva': return array( 'vaduva' );\r\n\t\t\t\tcase 'vång': return array( 'vang' );\r\n\t\t\t\tcase 'vörös': return array( 'veres','voeroes','voros' );\r\n\t\t\t\tcase 'waegner': return array( 'wagner','wägner' );\r\n\t\t\t\tcase 'waehner': return array( 'wahner','wähner' );\r\n\t\t\t\tcase 'wagner': return array( 'waegner','wegener','wegner','wägner' );\r\n\t\t\t\tcase 'wahner': return array( 'waehner','wehner','weiner','wähner' );\r\n\t\t\t\tcase 'waldfogel': return array( 'waldvogel' );\r\n\t\t\t\tcase 'waldvogel': return array( 'waldfogel' );\r\n\t\t\t\tcase 'wallace': return array( 'wallis' );\r\n\t\t\t\tcase 'wallis': return array( 'wallace' );\r\n\t\t\t\tcase 'walsh': return array( 'welch' );\r\n\t\t\t\tcase 'walter': return array( 'walters' );\r\n\t\t\t\tcase 'walters': return array( 'walter','walterson','waltersson','walther','welter','wolter','wolters' );\r\n\t\t\t\tcase 'walterson': return array( 'walters' );\r\n\t\t\t\tcase 'waltersson': return array( 'walters' );\r\n\t\t\t\tcase 'walther': return array( 'walters' );\r\n\t\t\t\tcase 'warner': return array( 'werner' );\r\n\t\t\t\tcase 'warrick': return array( 'warwick' );\r\n\t\t\t\tcase 'warshawsky': return array( 'warszawski' );\r\n\t\t\t\tcase 'warszawski': return array( 'warshawsky' );\r\n\t\t\t\tcase 'warwick': return array( 'warrick' );\r\n\t\t\t\tcase 'waters': return array( 'wouters' );\r\n\t\t\t\tcase 'watkins': return array( 'watson' );\r\n\t\t\t\tcase 'watson': return array( 'watkins' );\r\n\t\t\t\tcase 'wauters': return array( 'wouters' );\r\n\t\t\t\tcase 'weaver': return array( 'weber' );\r\n\t\t\t\tcase 'weber': return array( 'weaver','weeber' );\r\n\t\t\t\tcase 'weeber': return array( 'weber' );\r\n\t\t\t\tcase 'wegener': return array( 'wagner' );\r\n\t\t\t\tcase 'wegner': return array( 'wagner' );\r\n\t\t\t\tcase 'wehner': return array( 'wahner' );\r\n\t\t\t\tcase 'weigand': return array( 'wiegand' );\r\n\t\t\t\tcase 'weiner': return array( 'wahner' );\r\n\t\t\t\tcase 'weisz': return array( 'weiß' );\r\n\t\t\t\tcase 'weiß': return array( 'weisz' );\r\n\t\t\t\tcase 'welch': return array( 'walsh' );\r\n\t\t\t\tcase 'welter': return array( 'walters' );\r\n\t\t\t\tcase 'wendel': return array( 'wendell' );\r\n\t\t\t\tcase 'wendell': return array( 'wendel' );\r\n\t\t\t\tcase 'werner': return array( 'warner','wernher','wirner','wirnhier','woerner','woernhoer','worner','wornhor','wörner','wörnhör' );\r\n\t\t\t\tcase 'wernher': return array( 'werner' );\r\n\t\t\t\tcase 'whalen': return array( 'whelan' );\r\n\t\t\t\tcase 'whelan': return array( 'whalen' );\r\n\t\t\t\tcase 'wiegand': return array( 'weigand' );\r\n\t\t\t\tcase 'wilkie': return array( 'willis' );\r\n\t\t\t\tcase 'wilkins': return array( 'wilkinson' );\r\n\t\t\t\tcase 'wilkinson': return array( 'wilkins','wilson' );\r\n\t\t\t\tcase 'willems': return array( 'willemse','willemsen','williams','williamson','wilms' );\r\n\t\t\t\tcase 'willemse': return array( 'willems' );\r\n\t\t\t\tcase 'willemsen': return array( 'willems' );\r\n\t\t\t\tcase 'williams': return array( 'willems' );\r\n\t\t\t\tcase 'williamson': return array( 'willems' );\r\n\t\t\t\tcase 'willis': return array( 'wilkie' );\r\n\t\t\t\tcase 'wilms': return array( 'willems' );\r\n\t\t\t\tcase 'wilson': return array( 'wilkinson' );\r\n\t\t\t\tcase 'winograd': return array( 'winogrodzki' );\r\n\t\t\t\tcase 'winogrodzki': return array( 'winograd' );\r\n\t\t\t\tcase 'winter': return array( 'winther' );\r\n\t\t\t\tcase 'winther': return array( 'winter' );\r\n\t\t\t\tcase 'wirner': return array( 'werner' );\r\n\t\t\t\tcase 'wirnhier': return array( 'werner' );\r\n\t\t\t\tcase 'wirt': return array( 'wirth' );\r\n\t\t\t\tcase 'wirth': return array( 'wirt' );\r\n\t\t\t\tcase 'woerner': return array( 'werner','wörner' );\r\n\t\t\t\tcase 'woernhoer': return array( 'werner','wörnhör' );\r\n\t\t\t\tcase 'wojda': return array( 'wojewoda' );\r\n\t\t\t\tcase 'wojewoda': return array( 'wojda' );\r\n\t\t\t\tcase 'wojewodka': return array( 'wojewódka' );\r\n\t\t\t\tcase 'wojewodzki': return array( 'wojewódzki' );\r\n\t\t\t\tcase 'wojewódka': return array( 'wojewodka' );\r\n\t\t\t\tcase 'wojewódzki': return array( 'wojewodzki' );\r\n\t\t\t\tcase 'wolf': return array( 'wolfe','wolff' );\r\n\t\t\t\tcase 'wolfe': return array( 'wolf' );\r\n\t\t\t\tcase 'wolff': return array( 'wolf' );\r\n\t\t\t\tcase 'wolter': return array( 'walters' );\r\n\t\t\t\tcase 'wolters': return array( 'walters' );\r\n\t\t\t\tcase 'woodham': return array( 'wootton' );\r\n\t\t\t\tcase 'wootton': return array( 'woodham' );\r\n\t\t\t\tcase 'worner': return array( 'werner','wörner' );\r\n\t\t\t\tcase 'wornhor': return array( 'werner','wörnhör' );\r\n\t\t\t\tcase 'wouters': return array( 'waters','wauters' );\r\n\t\t\t\tcase 'wyrzyk': return array( 'wyrzykowski' );\r\n\t\t\t\tcase 'wyrzykowski': return array( 'wyrzyk' );\r\n\t\t\t\tcase 'wägner': return array( 'waegner','wagner' );\r\n\t\t\t\tcase 'wähner': return array( 'waehner','wahner' );\r\n\t\t\t\tcase 'wörner': return array( 'werner','woerner','worner' );\r\n\t\t\t\tcase 'wörnhör': return array( 'werner','woernhoer','wornhor' );\r\n\t\t\t\tcase 'yamaguchi': return array( 'yamasaki','yamazaki' );\r\n\t\t\t\tcase 'yamasaki': return array( 'yamaguchi' );\r\n\t\t\t\tcase 'yamazaki': return array( 'yamaguchi' );\r\n\t\t\t\tcase 'yang': return array( 'yeung' );\r\n\t\t\t\tcase 'yeung': return array( 'yang' );\r\n\t\t\t\tcase 'yong': return array( 'young','younge' );\r\n\t\t\t\tcase 'yonker': return array( 'yonkers' );\r\n\t\t\t\tcase 'yonkers': return array( 'yonker' );\r\n\t\t\t\tcase 'young': return array( 'yong' );\r\n\t\t\t\tcase 'younge': return array( 'yong' );\r\n\t\t\t\tcase 'zabala': return array( 'zavala' );\r\n\t\t\t\tcase 'zavala': return array( 'zabala' );\r\n\t\t\t\tcase 'zeegers': return array( 'zegers' );\r\n\t\t\t\tcase 'zegers': return array( 'zeegers' );\r\n\t\t\t\tcase 'zelenka': return array( 'zelenko' );\r\n\t\t\t\tcase 'zelenko': return array( 'zelenka' );\r\n\t\t\t\tcase 'zimmerman': return array( 'zimmermann' );\r\n\t\t\t\tcase 'zimmermann': return array( 'zimmerman' );\r\n\t\t\t\tcase 'zini': return array( 'zino' );\r\n\t\t\t\tcase 'zino': return array( 'zini' );\r\n\t\t\t\tcase 'zoltanfi': return array( 'zoltánfi' );\r\n\t\t\t\tcase 'zoltánfi': return array( 'zoltanfi' );\r\n\t\t\t\tcase 'zuniga': return array( 'zuñiga' );\r\n\t\t\t\tcase 'zuñiga': return array( 'zuniga' );\r\n\t\t\t\tcase 'ádám': return array( 'adam' );\r\n\t\t\t\tcase 'álvarez': return array( 'alvarez' );\r\n\t\t\t\tcase 'ármannsson': return array( 'armannsson' );\r\n\t\t\t\tcase 'åkerman': return array( 'akerman' );\r\n\t\t\t\tcase 'årud': return array( 'arud' );\r\n\t\t\t\tcase 'émile': return array( 'emile' );\r\n\t\t\t\tcase 'ó baoghill': return array( 'o baoghill' );\r\n\t\t\t\tcase 'ó bradáin': return array( 'braden','o bradain' );\r\n\t\t\t\tcase 'ó braoin': return array( 'breen','o braoin' );\r\n\t\t\t\tcase 'ó braonáin': return array( 'brennan','o braonain' );\r\n\t\t\t\tcase 'ó briain': return array( 'bryan','o briain' );\r\n\t\t\t\tcase 'ó broin': return array( 'berne','o broin' );\r\n\t\t\t\tcase 'ó brádaigh': return array( 'o bradaigh' );\r\n\t\t\t\tcase 'ó buachalla': return array( 'o buachalla' );\r\n\t\t\t\tcase 'ó caiside': return array( 'cassidy','o caiside' );\r\n\t\t\t\tcase 'ó caoimh': return array( 'o caoimh' );\r\n\t\t\t\tcase 'ó caoimháin': return array( 'o caoimhain' );\r\n\t\t\t\tcase 'ó caoindealbháin': return array( 'o caoindealbhain' );\r\n\t\t\t\tcase 'ó cathasaigh': return array( 'o cathasaigh' );\r\n\t\t\t\tcase 'ó catháin': return array( 'o cathain' );\r\n\t\t\t\tcase 'ó ceallacháin': return array( 'callaghan','o ceallachain' );\r\n\t\t\t\tcase 'ó ceallaigh': return array( 'o ceallaigh' );\r\n\t\t\t\tcase 'ó cearmada': return array( 'carmody','o cearmada' );\r\n\t\t\t\tcase 'ó ceithearnaigh': return array( 'o ceithearnaigh' );\r\n\t\t\t\tcase 'ó ciardha': return array( 'o ciardha' );\r\n\t\t\t\tcase 'ó cinnéidigh': return array( 'o cinneidigh' );\r\n\t\t\t\tcase 'ó cléirigh': return array( 'o cleirigh' );\r\n\t\t\t\tcase 'ó cnáimhín': return array( 'o cnaimhin' );\r\n\t\t\t\tcase 'ó cochláin': return array( 'coughlan','o cochlain' );\r\n\t\t\t\tcase 'ó coigligh': return array( 'o coigligh' );\r\n\t\t\t\tcase 'ó coileáin': return array( 'o coileain' );\r\n\t\t\t\tcase 'ó conaill': return array( 'connell','o conaill' );\r\n\t\t\t\tcase 'ó conchobhair': return array( 'o conchobhair' );\r\n\t\t\t\tcase 'ó conghalaigh': return array( 'o conghalaigh' );\r\n\t\t\t\tcase 'ó corcráin': return array( 'corcoran','o corcrain' );\r\n\t\t\t\tcase 'ó corraidhín': return array( 'o corraidhin' );\r\n\t\t\t\tcase 'ó cuana': return array( 'cooney','o cuana' );\r\n\t\t\t\tcase 'ó cuidighthigh': return array( 'o cuidighthigh' );\r\n\t\t\t\tcase 'ó cuilinn': return array( 'o cuilinn' );\r\n\t\t\t\tcase 'ó cuinn': return array( 'o cuinn' );\r\n\t\t\t\tcase 'ó damháin': return array( 'o damhain' );\r\n\t\t\t\tcase 'ó deoráin': return array( 'doran','o deorain' );\r\n\t\t\t\tcase 'ó dochartaigh': return array( 'dougherty','o dochartaigh' );\r\n\t\t\t\tcase 'ó doibhilin': return array( 'devlin','o doibhilin' );\r\n\t\t\t\tcase 'ó doirnáin': return array( 'durnin','o doirnain' );\r\n\t\t\t\tcase 'ó domhnaill': return array( 'o domhnaill' );\r\n\t\t\t\tcase 'ó donnchadha': return array( 'o donnchadha' );\r\n\t\t\t\tcase 'ó donndubháin': return array( 'o donndubhain' );\r\n\t\t\t\tcase 'ó donnghaile': return array( 'o donnghaile' );\r\n\t\t\t\tcase 'ó dubhghaill': return array( 'o dubhghaill' );\r\n\t\t\t\tcase 'ó dubhshláin': return array( 'o dubhshlain' );\r\n\t\t\t\tcase 'ó dubhshláine': return array( 'o dubhshlaine' );\r\n\t\t\t\tcase 'ó dubhthaigh': return array( 'o dubhthaigh' );\r\n\t\t\t\tcase 'ó dubháin': return array( 'davin','o dubhain' );\r\n\t\t\t\tcase 'ó dálaigh': return array( 'o dalaigh' );\r\n\t\t\t\tcase 'ó díomasaigh': return array( 'o diomasaigh' );\r\n\t\t\t\tcase 'ó faoláin': return array( 'fylan','o faolain' );\r\n\t\t\t\tcase 'ó fearghail': return array( 'o fearghail' );\r\n\t\t\t\tcase 'ó fionnagáin': return array( 'finnegan','o fionnagain' );\r\n\t\t\t\tcase 'ó fionnáin': return array( 'fannon','o fionnain' );\r\n\t\t\t\tcase 'ó flannagáin': return array( 'flanagon','o flannagain' );\r\n\t\t\t\tcase 'ó floinn': return array( 'flynn','o floinn' );\r\n\t\t\t\tcase 'ó frighil': return array( 'o frighil' );\r\n\t\t\t\tcase 'ó gallchobhair': return array( 'o gallchobhair' );\r\n\t\t\t\tcase 'ó gormáin': return array( 'o gormain' );\r\n\t\t\t\tcase 'ó hallmhuráin': return array( 'o hallmhurain' );\r\n\t\t\t\tcase 'ó hannagáin': return array( 'hanegan','o hannagain' );\r\n\t\t\t\tcase 'ó haodha': return array( 'o haodha' );\r\n\t\t\t\tcase 'ó heachthighearna': return array( 'o heachthighearna' );\r\n\t\t\t\tcase 'ó heaghra': return array( 'o heaghra' );\r\n\t\t\t\tcase 'ó heidhin': return array( 'o heidhin' );\r\n\t\t\t\tcase 'ó heidirsceóil': return array( 'o heidirsceoil' );\r\n\t\t\t\tcase 'ó hifearnáin': return array( 'heffernan','o hifearnain' );\r\n\t\t\t\tcase 'ó huiginn': return array( 'o huiginn' );\r\n\t\t\t\tcase 'ó héideáin': return array( 'o heideain' );\r\n\t\t\t\tcase 'ó héidín': return array( 'o heidin' );\r\n\t\t\t\tcase 'ó hícidhe': return array( 'o hicidhe' );\r\n\t\t\t\tcase 'ó hógáin': return array( 'hogan','o hogain' );\r\n\t\t\t\tcase 'ó laoghaire': return array( 'o laoghaire' );\r\n\t\t\t\tcase 'ó leannáin': return array( 'lannon','o leannain' );\r\n\t\t\t\tcase 'ó loingsigh': return array( 'o loingsigh' );\r\n\t\t\t\tcase 'ó luain': return array( 'o luain' );\r\n\t\t\t\tcase 'ó madaidhín': return array( 'o madaidhin' );\r\n\t\t\t\tcase 'ó manacháin': return array( 'monaghan','o manachain' );\r\n\t\t\t\tcase 'ó maoil eoin': return array( 'malone','o maoil eoin' );\r\n\t\t\t\tcase 'ó maoil riain': return array( 'mulryan','o maoil riain' );\r\n\t\t\t\tcase 'ó maoilsheachlainn': return array( 'o maoilsheachlainn' );\r\n\t\t\t\tcase 'ó maol aodha': return array( 'o maol aodha' );\r\n\t\t\t\tcase 'ó maol dhomhnaigh': return array( 'o maol dhomhnaigh' );\r\n\t\t\t\tcase 'ó maolmhuaidh': return array( 'o maolmhuaidh' );\r\n\t\t\t\tcase 'ó maoláin': return array( 'mullen','o maolain' );\r\n\t\t\t\tcase 'ó maonaigh': return array( 'o maonaigh' );\r\n\t\t\t\tcase 'ó marcaigh': return array( 'o marcaigh' );\r\n\t\t\t\tcase 'ó mathghamhna': return array( 'o mathghamhna' );\r\n\t\t\t\tcase 'ó meadhra': return array( 'o meadhra' );\r\n\t\t\t\tcase 'ó meara': return array( 'o meara' );\r\n\t\t\t\tcase 'ó mocháin': return array( 'o mochain' );\r\n\t\t\t\tcase 'ó muircheartach': return array( 'o muircheartach' );\r\n\t\t\t\tcase 'ó murchadha': return array( 'o murchadha' );\r\n\t\t\t\tcase 'ó máille': return array( 'malley','o maille' );\r\n\t\t\t\tcase 'ó nualláin': return array( 'nolan','o nuallain' );\r\n\t\t\t\tcase 'ó néill': return array( 'neal','o neill' );\r\n\t\t\t\tcase 'ó rabhartaigh': return array( 'o rabhartaigh','rafferty' );\r\n\t\t\t\tcase 'ó raghailligh': return array( 'o raghailligh' );\r\n\t\t\t\tcase 'ó riain': return array( 'o riain','ryan' );\r\n\t\t\t\tcase 'ó rinn': return array( 'o rinn' );\r\n\t\t\t\tcase 'ó rodagh': return array( 'o rodagh' );\r\n\t\t\t\tcase 'ó ruadháin': return array( 'o ruadhain' );\r\n\t\t\t\tcase 'ó ruaidh': return array( 'o ruaidh' );\r\n\t\t\t\tcase 'ó ríagáin': return array( 'o riagain','regan' );\r\n\t\t\t\tcase 'ó scolaidhe': return array( 'o scolaidhe' );\r\n\t\t\t\tcase 'ó seanáin': return array( 'o seanain','shannon' );\r\n\t\t\t\tcase 'ó seighin': return array( 'o seighin' );\r\n\t\t\t\tcase 'ó sirideáin': return array( 'o sirideain','sheridan' );\r\n\t\t\t\tcase 'ó suaird': return array( 'o suaird' );\r\n\t\t\t\tcase 'ó séaghdha': return array( 'o seaghdha' );\r\n\t\t\t\tcase 'ó síoda': return array( 'o sioda','sheedy' );\r\n\t\t\t\tcase 'ó súileabháin': return array( 'o suileabhain','sullivan' );\r\n\t\t\t\tcase 'ó tadhgáin': return array( 'o tadhgain' );\r\n\t\t\t\tcase 'ó taidhg': return array( 'o taidhg' );\r\n\t\t\t\tcase 'ó treasaigh': return array( 'o treasaigh' );\r\n\t\t\t\tcase 'ó tuathail': return array( 'o tuathail' );\r\n\t\t\t\tcase 'ó tíghearnaigh': return array( 'o tighearnaigh' );\r\n\t\t\t\tcase 'öman': return array( 'oeman','oman' );\r\n\t\t\t\tcase 'östberg': return array( 'oestberg','ostberg' );\r\n\t\t\t\tcase 'øster': return array( 'oster' );\r\n\t\t\t\tcase 'østergaard': return array( 'ostergaard' );\r\n\t\t\t\tcase 'østergård': return array( 'ostergard' );\r\n\t\t\t\tcase 'þórirsson': return array( 'thorirsson' );\r\n\t\t\t\tcase 'čermak': return array( 'čermák' );\r\n\t\t\t\tcase 'čermák': return array( 'čermak' );\r\n\t\t\t\tcase 'černik': return array( 'černík' );\r\n\t\t\t\tcase 'černy': return array( 'černý' );\r\n\t\t\t\tcase 'černík': return array( 'černik' );\r\n\t\t\t\tcase 'černý': return array( 'černy' );\r\n\t\t\t\tcase 'červenka': return array( 'červeny' );\r\n\t\t\t\tcase 'červeny': return array( 'červenka' );\r\n\t\t\t\tcase 'čižek': return array( 'čížek' );\r\n\t\t\t\tcase 'čižik': return array( 'čížik' );\r\n\t\t\t\tcase 'čtvrtnik': return array( 'čtvrtník' );\r\n\t\t\t\tcase 'čtvrtník': return array( 'čtvrtnik' );\r\n\t\t\t\tcase 'čížek': return array( 'čižek' );\r\n\t\t\t\tcase 'čížik': return array( 'čižik' );\r\n\t\t\t\tcase 'řeznik': return array( 'řezník' );\r\n\t\t\t\tcase 'řezniček': return array( 'řezníček' );\r\n\t\t\t\tcase 'řezník': return array( 'řeznik' );\r\n\t\t\t\tcase 'řezníček': return array( 'řezniček' );\r\n\t\t\t\tcase 'ślusarczyk': return array( 'ślusarski' );\r\n\t\t\t\tcase 'ślusarski': return array( 'ślusarczyk' );\r\n\t\t\t\tcase 'štěpanek': return array( 'štěpánek' );\r\n\t\t\t\tcase 'štěpánek': return array( 'štěpanek' );\r\n }\r\n\t\t return array();\r\n\t\t}", "function search_split_query($q, $dbwildcard = true)\n{\n if (!isset($q)) {\n return;\n }\n\n $w = array();\n $stripped = DataUtil::formatForStore($q);\n $qwords = preg_split('/ /', $stripped, -1, PREG_SPLIT_NO_EMPTY);\n\n foreach($qwords as $word) {\n if ($dbwildcard) {\n $w[] = '%' . $word . '%';\n } else {\n $w[] = $word;\n }\n }\n\n return $w;\n}", "public function getQueries();", "function createQuery($string) {\n require(\"stopwords.php\");\n \n $exact = '';\n $exact = getInbetween($string);\n\n // For all underscores, all non-alphanumeric characters, and all words that are a stop word...\n $patterns = array('/_+/', '/[^\\*A-Za-z0-9 ]/', '/\\*+/');\n // ... replace with a single space, null, and null (respectively)\n $replace = array(' ', '', '*');\n $query = preg_replace($patterns, $replace, $string);\n $query = trim($query);\n\n if ($query !== '') {\n $query_array = explode(\" \", $query);\n $query_array = array_diff($query_array, $stopwords);\n foreach ($query_array as $key => &$str) {\n if (substr($str, -1) !== '*' && substr($str, -1) !== '~') {\n $str .= '~';\n }\n if (substr($str, 0, 1) === '*') {\n $str = substr($str, 1);\n }\n } \n $query = implode(\"+\", $query_array);\n }\n\n $query .= $exact;\n if ($query === '') {\n return null;\n }\n else {\n return $query;\n }\n}", "function search_split_query($q) {\n if (!isset($q)) {\n return;\n }\n $w = array();\n $stripped = pnVarPrepForStore($q);\n $qwords = preg_split('/ /', $stripped, -1, PREG_SPLIT_NO_EMPTY);\n foreach($qwords as $word) {\n $w[] = '%' . $word . '%';\n }\n return $w;\n}", "public function getQueryPhrases() {\n $xmlQueryPhrases = $this->xmlResponse->xpath('//ans:QueryPhrase');\n $queryPhrases = array();\n foreach ($xmlQueryPhrases as $xmlQueryPhrase) {\n $queryPhrase = strval($xmlQueryPhrase['value']);\n $queryPhrases[] = $queryPhrase;\n }\n return $queryPhrases;\n }", "private function get_phrase_list() {\n return preg_split('/' . $this->query_regx . '/', $this->query, null, PREG_SPLIT_DELIM_CAPTURE);\n }", "function get_keyword_query()\n\t{\n\t\t$keywords = $this->keywords;\n\t\t$keywords = preg_replace(\"/, /\",\",\",$keywords);\n\t\t$keywords = preg_replace(\"/ ,/\",\",\",$keywords);\n\t\t$keywords = explode(\",\",$keywords);\n\t\t$query = \"\";\n\t\tforeach($keywords as $keyword)\n\t\t{\n\t\t\tif(!empty($query))\n\t\t\t\t$query .=\"%7C\";\n\t\t\t$query .= urlencode($keyword);\n\t\t}\n\t\t\n\t\treturn $query;\n\t}", "public function build_search_query_for_searchwords()\n {\n if (is_array($this->sword_array)) {\n $main_query_part = [];\n foreach ($this->sword_array as $key => $val) {\n $s_sword = $this->sword_array[$key]['sword'];\n // Get subQueryPart\n $sub_query_part = [];\n $this->listOfSearchFields = '';\n foreach ($this->tables as $key3 => $val3) {\n $searchfields = $this->tables[$key3]['searchfields'];\n if (is_array($searchfields)) {\n foreach ($searchfields as $key2 => $val2) {\n $this->listOfSearchFields .= $key3 . '.' . $val2 . ',';\n $sub_query_part[] = $key3 . '.' . $val2 . ' LIKE \\'%' . $GLOBALS['TYPO3_DB']->quoteStr($s_sword, $key3) . '%\\'';\n }\n }\n }\n if (!empty($sub_query_part)) {\n $main_query_part[] = $this->sword_array[$key]['oper'];\n $main_query_part[] = '(' . implode(' OR ', $sub_query_part) . ')';\n }\n }\n if (!empty($main_query_part)) {\n // Remove first part anyways.\n unset($main_query_part[0]);\n return implode(' ', $main_query_part);\n }\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get PaymentFilters value An additional test has been added (isset) before returning the property value as this property may have been unset before, due to the fact that this property is removable from the request (nillable=true+minOccurs=0)
public function getPaymentFilters() { return isset($this->PaymentFilters) ? $this->PaymentFilters : null; }
[ "public function getFilterValue();", "public function getFilterValue ()\n {\n return $this->filterValue;\n }", "public function get_filter_value() {\r\n\t\treturn $this->filter_object->get_value();\r\n\t}", "private function getFilterProperty()\n\t{\n\t\tif (!isset($this->propertyFilter))\n\t\t{\n\t\t\t$this->propertyFilter = array();\n\t\t\t$propertyList = \\Bitrix\\Iblock\\SectionPropertyTable::getList(array(\n\t\t\t\t\"select\" => array(\"PROPERTY_ID\", \"PROPERTY.PROPERTY_TYPE\"),\n\t\t\t\t\"filter\" => array(\n\t\t\t\t\t\"=IBLOCK_ID\" => array($this->iblockId, $this->skuIblockId),\n\t\t\t\t\t\"=SMART_FILTER\" => \"Y\",\n\t\t\t\t),\n\t\t\t));\n\t\t\twhile ($link = $propertyList->fetch())\n\t\t\t{\n\t\t\t\tif ($link[\"IBLOCK_SECTION_PROPERTY_PROPERTY_PROPERTY_TYPE\"] === \"N\")\n\t\t\t\t\t$this->propertyFilter[$link[\"PROPERTY_ID\"]] = Storage::NUMERIC;\n\t\t\t\telseif ($link[\"IBLOCK_SECTION_PROPERTY_PROPERTY_PROPERTY_TYPE\"] === \"S\")\n\t\t\t\t\t$this->propertyFilter[$link[\"PROPERTY_ID\"]] = Storage::STRING;\n\t\t\t\telse\n\t\t\t\t\t$this->propertyFilter[$link[\"PROPERTY_ID\"]] = Storage::DICTIONARY;\n\t\t\t}\n\t\t}\n\t\treturn $this->propertyFilter;\n\t}", "public function getValueFilter ()\n {\n return $this->valueFilter;\n }", "public function getPaymentConditions(): ?string\n {\n if (count($this->paymentConditions) == 0) {\n return null;\n }\n return $this->paymentConditions['value'];\n }", "public function getPropertyFilter()\n {\n return $this->readOneof(2);\n }", "public function get_filtering()\r\n\t{\r\n\t\treturn $this->filtering->get_value();\r\n\t}", "public function getPostalCodeFilterValues()\n {\n return isset($this->PostalCodeFilterValues) ? $this->PostalCodeFilterValues : null;\n }", "function getStatusFilterValue()\n {\n return $this->__statusfiltervalue ;\n }", "public function getStatusPayment()\r\n {\r\n return $this->statusPayment;\r\n }", "private function getFilterFormValue() {\n if(App::request()->getHeaders('X-List-Filter-' . $this->id)) {\n App::session()->getUser()->setOption('main.list-filter-' . $this->id, App::request()->getHeaders('X-List-Filter-' . $this->id));\n\n $result = json_decode(App::request()->getHeaders('X-List-Filter-' . $this->id), true);\n }\n elseif(App::session()->getUser()->getOptions('main.list-filter-' . $this->id)) {\n $result = json_decode(App::session()->getUser()->getOptions('main.list-filter-' . $this->id), true);\n }\n else {\n $result = array();\n }\n\n return $result;\n }", "public function getFilterValue(): string;", "public function getPropertyFilter();", "public function getPaymentStatus();", "public function getPaymentTypes()\n {\n return isset($this->PaymentTypes) ? $this->PaymentTypes : null;\n }", "public function getPayment()\n {\n return isset($this->Payment) ? $this->Payment : null;\n }", "public function getPayment()\n {\n return $this->readOneof(6);\n }", "public function getFilters(): ?FiltersConfig\n {\n return $this->get(ConfigUtil::FILTERS);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
execute sql query statement. Used for INSERT and UPDATE mostly. Returns false if query fails
public static function execute_sql($query) { if(self::$mysqli->query($query)) return true; return false; }
[ "private function executeQuery() {\n try {\n $this->statement->execute();\n return true;\n }\n catch (\\PDOException $e) {\n $this->errMessage = $e->getMessage();\n return false;\n }\n }", "public function ExecuteQuery() {\r\n\t\tif (!$this->conexion)\r\n\t\t\t$this->DatabaseConnect();\r\n\r\n\t\t$this->resultado = $this->conexion->query($this->query);\r\n\r\n\t\treturn $this->resultado != false;\r\n\t}", "public static function execute_sql($query) {\n\t\tif(self::$mysqli->query($query)) return true;\n\t\telse echo self::$mysqli->error;\n\t\treturn false;\n\t}", "private function executeSql() {\n if (!$this->result = $this->query($this->sql)) {\n $this->setError(\"Failed to execute SQL:\" . $this->sql . \" error (\" . $this->errno - \") \" . $this->error);\n $this->log->error(\"Failed to execute SQL:\" . $this->sql . \" error (\" . $this->errno - \") \" . $this->error);\n }\n return $this->result;\n }", "public function execute() : bool\n {\n $pdo = $this->getConnection();\n \n $result = $pdo->prepare($this->query)->execute();\n \n $this->disconnect($pdo);\n \n return $result;\n }", "protected abstract function executeSQL($query);", "public function execute($sql);", "function execute($sql){\n\n\t\t$result = pg_query($sql) or false;\n\t\treturn $result;\n\t}", "function exec($query =\"\"){\n\t\t$res = $this->do_query($query);\n\t\tif($res !== false){\n\t\t\treturn mysql_affected_rows($this->db_link);\n\t\t}\n\t\treturn false;\n\t }", "function queryExecute($query) {\r\n\t\t\r\n\t\tif (strlen(trim($query)) < 0 ) {\r\n\t\t\ttrigger_error(\"Database encountered empty query string in queryExecute function\",E_ERROR);\r\n\t\t}\r\n\t\tif( !$this->connected ) \r\n\t\t\t$this->connect();\r\n\t\t\r\n\t\tif($this->socket->query($query) === true) {\r\n\t\t\t$this->recordsUpdated = $this->socket->affected_rows;\r\n\t\t}\r\n\t}", "public function execute($query){\n if( $this->lock ) return FALSE;\n $args = func_get_args();\n array_shift( $args );\n $sql = $this->prep_args( $query, $args );\n $f = $this->_[ __FUNCTION__ ];\n $res = $f( $sql );\n if( $res ) return $res;\n if( $this->txn ) {\n Transaction::block();\n $this->lock = TRUE;\n }\n return $res;\n }", "function query($query)\n\t{\n\t\tif($this->adapter->connection == false) {\n\t\t\tlogger::getInstance()->LogEmail('Not connected');\n\t\t\treturn false;\n\t\t}\n\t\tif($this->debug) Logger::getInstance()->log[]= \"executing: {$query}\";\n\t\t\t\t\n\t\t$result = $this->adapter->query($query);\n\t\t\n\t\tif(!$result)\n\t\t{\n\t\t\t$error = $this->adapter->getError();\n\t\t\tif($error != '' && $this->adapter->connection != false) Logger::Warn(\"Error '{$error}' during execution of query {$query}\");\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$query = trim(strtolower($query));\n\n\t\t$firstpart = substr($query, 0, 6);\n\t\t$this->insertID = false;\n\t\t$this->affected = false;\n\t\t$this->numrows = false;\n\t\tswitch($firstpart)\n\t\t{\n\t\t\t\tcase 'insert':\n\t\t\t\t\t$this->insertID = $this->adapter->getInsertID();\n\t\t\t\tbreak;\n\t\t\t\tcase 'delete':\n\t\t\t\tcase 'replac':\n\t\t\t\tcase 'update':\n\t\t\t\t\t$this->affected = $this->adapter->numAffected();\n\t\t\t\tbreak;\n\t\t\t\tcase 'select':\n\t\t\t\t\t$this->numrows = $this->adapter->numRows();\n\t\t\t\tbreak;\n\t\t}\n\t\tif ($this->insertID != false) { return ($this->insertID); }\n\n\t\treturn true;\n\t\t\n\t}", "public function runDML($query)\n {\n $result = $this->con->query($query);\n if($result){\n return TRUE;\n }else{\n return FALSE;\n }\n }", "public function query() {\n $argc = func_num_args();\n $argv = func_get_args();\n\n if ($argc > 1) {\n $sql = array_shift($argv);\n $query = $this->connection->prepare($sql);\n $query->execute($argv);\n return new MiniDB_Result($query, $this->connection);\n } elseif ($argc == 1) {\n $query = $this->connection->query($argv[0]);\n return new MiniDB_Result($query, $this->connection);\n }\n return FALSE;\n }", "public function executeQuery($query) {\r\n // Make sure the database is connected\r\n $this->connect();\r\n\r\n // The query string is considered given\r\n $queryString = $query;\r\n\r\n // If the given query is of type SqlQuery\r\n if ($query instanceof SqlQuery) {\r\n // Gets the actual query string from the query object\r\n $queryString = $this->_generateQueryString($query);\r\n }\r\n\r\n // Execute the query string\r\n $this->_runQueryString($queryString);\r\n\r\n // Return the number of affected rows\r\n return $this->_mysqli->affected_rows;\r\n }", "abstract protected function executeSQL($sql);", "function execSuccessful() { // Query if execute was successful\r\n\t\tif(!$this->statementSucceed) return false;\r\n\t\treturn ($this->execResult !== false);\r\n\t}", "function run_sql($query) {\n\tglobal $db;\n\t$status = $db->query($query);\n\tif($status == false) {\n\t\tthrow new QueryException(\"Query failed: \".$db->error);\n\t}\n\t$affected_rows = $db->affected_rows;\n\treturn $affected_rows;\n}", "function execSuccessful() { // Query if execute was successful\n\t\tif ($this->execResult === false) {\n\t\t\treturn FALSE;\n\t\t}\n\t\telse {return TRUE;}\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This function change the selling product status
public function change_product_status(){ if ($this->checkLogin('A') == ''){ redirect('admin'); }else { $mode = $this->uri->segment(4,0); $product_id = $this->uri->segment(5,0); $status = ($mode == '0')?'UnPublish':'Publish'; $newdata = array('status' => $status); $condition = array('id' => $product_id); $this->product_model->update_details(PRODUCT,$newdata,$condition); $this->setErrorMessage('success','Product Status Changed Successfully'); redirect('admin/product/display_product_list'); } }
[ "public function change_product_status()\n {\n if ($this->checkLogin('CA') == '') {\n redirect('deals_crm');\n } else {\n $mode = $this->uri->segment(4, 0);\n $product_id = $this->uri->segment(5, 0);\n $status = ($mode == '0')?'UnPublish':'Publish';\n $newdata = array('status' => $status);\n $condition = array('id' => $product_id);\n $this->product_model->update_details(PRODUCT, $newdata, $condition);\n $this->setErrorMessage('success', 'Property Status Changed Successfully');\n redirect('crmadmin/product/display_product_list');\n }\n }", "public function change_product_status()\n {\n if ($this->checkLogin('A') == '') {\n redirect('admin_ror');\n } else {\n $mode = $this->uri->segment(4, 0);\n $product_id = $this->uri->segment(5, 0);\n $status = ($mode == '0') ? 'UnPublish' : 'Publish';\n $newdata = array('status' => $status);\n $condition = array('id' => $product_id);\n $this->product_model->update_details(PRODUCT, $newdata, $condition);\n $this->setErrorMessage('success', 'Property Status Changed Successfully');\n redirect('admin/product/display_product_list');\n }\n }", "public function change_user_product_status()\n {\n if ($this->checkLogin('A') == '') {\n redirect('admin_ror');\n } else {\n $mode = $this->uri->segment(4, 0);\n $product_id = $this->uri->segment(5, 0);\n $status = ($mode == '0') ? 'UnPublish' : 'Publish';\n $newdata = array('status' => $status);\n $condition = array('id' => $product_id);\n $this->product_model->update_details(PRODUCT, $newdata, $condition);\n $this->setErrorMessage('success', 'Rental Status Changed Successfully');\n redirect('admin/product/display_user_product_list');\n }\n }", "function tep_set_product_status($products_id, $status) {\n $OSCOM_Db = Registry::get('Db');\n\n if ($status == '1') {\n return $OSCOM_Db->save('products', [\n 'products_status' => '1',\n 'products_last_modified' => 'now()'\n ], [\n 'products_id' => (int)$products_id\n ]);\n } elseif ($status == '0') {\n return $OSCOM_Db->save('products', [\n 'products_status' => '0',\n 'products_last_modified' => 'now()'\n ], [\n 'products_id' => (int)$products_id\n ]);\n } else {\n return -1;\n }\n }", "function tep_set_product_status($products_id, $status) {\n $products_id = tep_get_prid($products_id);\n if ($status == '1') {\n return tep_db_query(\"update \" . TABLE_PRODUCTS . \" set products_status = '1', products_last_modified = now() where products_id = '\" . (int)$products_id . \"'\");\n } elseif ($status == '0') {\n return tep_db_query(\"update \" . TABLE_PRODUCTS . \" set products_status = '0', products_last_modified = now() where products_id = '\" . (int)$products_id . \"'\");\n } else {\n return -1;\n }\n }", "function changeStatusProduct()\n {\n if ($this->isAdmin() == true) {\n echo json_encode(['status' => 'access']);\n } else {\n $id = $this->input->post('id');\n\n $product_arr = $this->product_model->getProductInfo($id);\n\n $status = $product_arr[0]->status;\n\n if ($status == '0') {\n $statusVal = '1';\n } else {\n $statusVal = '0';\n }\n $productInfo = array(\n 'status' => $statusVal,\n 'updated_by' => $this->vendorId,\n 'updated_on' => date('Y-m-d H:i:s')\n );\n\n $result = $this->product_model->changeStatusProduct(\n $id,\n $productInfo\n );\n\n if ($result > 0) {\n echo json_encode(['status' => true]);\n } else {\n echo json_encode(['status' => false]);\n }\n }\n }", "function set_product_status($products_id, $status) {\n $sql_data_array = array('products_status' => $status,\n 'products_last_modified' => 'now()');\n xtc_db_perform(TABLE_PRODUCTS, $sql_data_array, 'update', \"products_id = '\".$products_id.\"'\"); \n }", "function tep_set_product_status($products_id, $status) {\n if ($status == '1') {\n return tep_db_query(\"update \" . TABLE_PRODUCTS . \" set products_status = '1', products_last_modified = now() where products_id = '\" . (int)$products_id . \"'\");\n } elseif ($status == '0') {\n return tep_db_query(\"update \" . TABLE_PRODUCTS . \" set products_status = '0', products_last_modified = now() where products_id = '\" . (int)$products_id . \"'\");\n } else {\n return -1;\n }\n }", "function wc_update_product_stock_status( $product_id, $status ) {\n\t$product = wc_get_product( $product_id );\n\tif ( $product ) {\n\t\t$product->set_stock_status( $status );\n\t}\n}", "function set_product_status($products_id, $status) {\n\t\tif ($status == '1') {\n\t\t\treturn olc_db_query(\"update \".TABLE_PRODUCTS.\" set products_status = '1', products_last_modified = now() where products_id = '\".$products_id.\"'\");\n\t\t}\n\t\telseif ($status == '0') {\n\t\t\treturn olc_db_query(\"update \".TABLE_PRODUCTS.\" set products_status = '0', products_last_modified = now() where products_id = '\".$products_id.\"'\");\n\t\t} else {\n\t\t\treturn -1;\n\t\t}\n\t}", "function wc_update_product_stock_status( $product_id, $status ) {\n\t$product = wc_get_product( $product_id );\n\n\tif ( $product ) {\n\t\t$product->set_stock_status( $status );\n\t\t$product->save();\n\t}\n}", "public function setProductStatus($val)\n {\n $this->_propDict[\"productStatus\"] = $val;\n return $this;\n }", "public function sync_stock_status(&$product)\n {\n }", "public function setProductStatus($product, $disableStatus)\n {\n if ($disableStatus == 1) {\n $product->setStatus(Status::STATUS_DISABLED);\n } else {\n $product->setStatus(Status::STATUS_ENABLED);\n }\n\n return $product;\n }", "public function reset_update_product_statusAction(){\n\n $start = microtime(true);\n\n if($this->getRequest()->getParam('key') == \"gorhdufzk\"){\n\n $iProducts = Mage::getModel('xcentia_coster/product')\n ->getCollection();\n\n foreach($iProducts as $iProduct) {\n\n $iProduct->setUpdate_product_status(self::STATE_VOID)->save();\n\n }\n\n }else{\n echo \"Wrong key!\";\n }\n\n $time_elapsed_secs = microtime(true) - $start;\n echo \"Done in \".round($time_elapsed_secs).\" seconds!\";\n }", "function tep_set_specials_status($specials_id, $status) {\n\tif (!function_exists('insert_psc_change_history')) {\n\t\trequire_once(DIR_WS_FUNCTIONS.'inventory_functions.php');\n\t}\n\n\t$prod_details = prepared_query::fetch('SELECT p.stock_id, p.products_model, s.status FROM products p JOIN specials s ON p.products_id = s.products_id WHERE s.specials_id = ?', cardinality::ROW, array($specials_id));\n\t$old = $prod_details['status']?'Status On':'Status Off';\n\t$new = $status?'Status On':'Status Off';\n\tinsert_psc_change_history($prod_details['stock_id'], 'Special Update ['.$prod_details['products_model'].']', $old, $new);\n\n\tprepared_query::execute(\"UPDATE specials SET status = :status, date_status_change = NOW() WHERE specials_id = :specials_id\", [':status' => $status, ':specials_id' => $specials_id]);\n}", "private function updateAvailabilityOnSale()\n {\n foreach($this->cart->content() as $item){\n $newAvailability = intval($item->model->availability - $item->qty);\n Product::where('id', $item->model->id)->update(['availability' => $newAvailability]);\n }\n }", "public function product_status_update($product_page_url) {\n\t\t$product_id = $_REQUEST['cid'];\n\t\tif ($_REQUEST['current_status'] == 'Inactive') {\n\t\t\t$product_status = 'Active';\n\t\t} else {\n\t\t\t$product_status = 'Inactive';\n\t\t}\n\t\t$this->db->update('product_tbl', array('product_status' => ($product_status)), \"product_id='\" . $product_id . \"'\");\n\t\t$_SESSION['product_msg'] = messagedisplay('product\\'s Status is updated successfully', 1);\n\t\theader('location: ' . $product_page_url);\n\t\texit();\n\t}", "public function actionChangeWantStatus() {\r\n $current_user = XenForo_Visitor::getInstance()->toArray();\r\n\t\tif (!$current_user['user_id']) { return $this->responseNoPermission(); }\r\n\r\n $product_id = $this->_input->filterSingle(\"product_id\", XenForo_Input::INT);\r\n $data = array(\"owned_status\" => \"WANT\");\r\n $this->getModelFromCache('ProdsTool_Model_PTUtils')->updateOwnedStatus($data, $product_id);\r\n $product = $this->getModelFromCache('ProdsTool_Model_PTUtils')->getProductDetails($product_id);\r\n return $this->responseRedirect(XenForo_ControllerResponse_Redirect::SUCCESS,\r\n XenForo_Link::buildPublicLink(\"pthome/product/\", $product));\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
tabla de movimientos incompletos2
function tabla_mov_incompletos6($id) { $mysqli = conectar_db(); selecciona_db($mysqli); $Consulta = "SELECT a.id, b.nombre, a.monto, a.banco, a.cuenta, a.realizado FROM movimientoDirecto a, empresas b WHERE a.idMov = $id AND b.id = a.empresa ORDER BY a.id ASC"; $pConsulta = consulta_tb($mysqli, $Consulta); if(!$pConsulta){ echo "No se encontrarón resultados para esta consulta."; }else{ while($row=mysqli_fetch_array($pConsulta)){ if($row[5]==1){ $checked = "checked='checked'"; $valorChecked = 1; $desactivado = "disabled"; }else{ $checked = ""; $valorChecked = 0; $desactivado = ""; } echo "<tr> <td><input type='hidden' name='idEnt[]' value='", $row[0] ,"'><label>", $row[1] ,"</label></td> <td><label>", $row[2] ,"</label></td> <td><label>", $row[3] ,"</label></td> <td><label>", $row[4] ,"</label></td> <td><input type='hidden' name='realizadoEnt[]' value='", $valorChecked ,"'><input type='checkbox' onclick='cambiarValorCheck3(); enviarRealizadoActualizado($row[0], \"movimientoDirecto\"); disabled=true' ", $checked ," ", $desactivado ,"></td>"; } } cerrar_db($mysqli); }
[ "function tabla_mov_incompletos_simples($mes, $anio) {\r\n $mysqli = conectar_db();\r\n selecciona_db($mysqli);\r\n\r\n $Consulta = \"SELECT a.id, a.fecha, a.hora, a.origen, a.origen, a.monto, a.tipo FROM movimiento a WHERE a.activo = 1 AND a.tipo = 3 AND a.fecha BETWEEN '$anio-$mes-1' AND '$anio-$mes-31' GROUP BY a.id ORDER BY a.fecha, a.hora ASC\";\r\n \r\n //$Consulta = \"SELECT a.id, a.fecha, a.hora, a.origen, a.origen, a.monto, a.tipo FROM movimiento a, movimientoFinal c, movimientoSimple d WHERE a.activo = 1 AND ((c.idMov = a.id AND c.realizado = 0) OR (d.idMov = a.id AND d.realizado = 0)) AND a.tipo = 3 AND a.fecha BETWEEN '$anio-$mes-1' AND '$anio-$mes-31' GROUP BY a.id ORDER BY a.fecha, a.hora ASC\";\r\n $pConsulta = consulta_tb($mysqli, $Consulta);\r\n //$row=mysqli_fetch_array($pConsulta);\r\n //if(!$row){\r\n //$Consulta = \"SELECT a.id, a.fecha, a.hora, a.origen, a.origen, a.monto, a.tipo FROM movimiento a, movimientoFinal c WHERE a.activo = 1 AND c.idMov = a.id AND c.realizado = 0 AND a.tipo = 3 AND a.fecha BETWEEN '$anio-$mes-1' AND '$anio-$mes-31' GROUP BY a.id ORDER BY a.fecha, a.hora ASC\";\r\n //$pConsulta = consulta_tb($mysqli, $Consulta);\r\n //$row=mysqli_fetch_array($pConsulta);\r\n //if(!$row){\r\n //$Consulta = \"SELECT a.id, a.fecha, a.hora, a.origen, a.origen, a.monto, a.tipo FROM movimiento a, movimientoSimple d WHERE a.activo = 1 AND d.idMov = a.id AND d.realizado = 0 AND a.tipo = 3 AND a.fecha BETWEEN '$anio-$mes-1' AND '$anio-$mes-31' GROUP BY a.id ORDER BY a.fecha, a.hora ASC\";\r\n //$pConsulta = consulta_tb($mysqli, $Consulta);\r\n //$row=mysqli_fetch_array($pConsulta);\r\n //}\r\n //}\r\n\r\n $control = 1;\r\n echo \"<tr><td id='noMov'><b>\",'No.',\"</b></td>\r\n <td class='fechaMov'><b>\",'Fecha',\"</b></td>\r\n <td class='horaMov'><b>\",'Hora',\"</b></td>\r\n <td id='empOrig'><b>\",'Origen',\"</b></td>\r\n <td id='empMov'><b>\",'Empresa',\"</b></td>\r\n <td class='montMov'><b>\",'Monto',\"</b></td>\r\n <td class='botnMov'><b>\",'Detalles',\"</b></td>\r\n <td class='botnMov'><b>\",'Final',\"</b></td></tr>\";\r\n $Consulta = $Consulta;\r\n $pConsulta = consulta_tb($mysqli, $Consulta);\r\n while($row=mysqli_fetch_array($pConsulta)){\r\n $Consulta2 = \"SELECT realizado FROM disperciones WHERE idMov = $row[0]\";\r\n $pConsulta2 = consulta_tb($mysqli, $Consulta2);\r\n if(mysqli_num_rows($pConsulta2)<1){\r\n if($row[6] == 2){\r\n $row[4] = \"<-----NÓMINA----->\";\r\n }else if($row[6] == 3){\r\n $row[4] = \"----->SÍMPLE<-----\";\r\n }\r\n echo \"<tr><td>\", $row[0],\"</td>\r\n <td class='fechaMov'>\", date_format(date_create($row[1]), 'd / m / Y'),\"</td>\r\n <td class='horaMov'>\", $row[2],\"</td>\r\n <td>\", $row[3],\"</td>\r\n <td>\", $row[4],\"</td>\r\n <td class='montMov'>\", $row[5],\"</td>\r\n <td class='botnMov'><input type='button' value='Detalles' onClick='validar(\",$control,\", 3)'></td>\r\n <td class='botnMov'><input type='button' value='Finalizar' onClick='validar2(\",$control,\", 3)'></td></tr>\";\r\n $control++;\r\n }else{\r\n $Consulta2 = \"SELECT realizado FROM disperciones WHERE idMov = $row[0] AND realizado = 0 LIMIT 1\";\r\n $pConsulta2 = consulta_tb($mysqli, $Consulta2);\r\n $Consulta3 = \"SELECT realizado FROM movimientoFinal WHERE idMov = $row[0] AND realizado = 0 LIMIT 1\";\r\n $pConsulta3 = consulta_tb($mysqli, $Consulta3);\r\n if(mysqli_num_rows($pConsulta2)>0 || mysqli_num_rows($pConsulta3)>0){\r\n if($row[6] == 2){\r\n $row[4] = \"<-----NÓMINA----->\";\r\n }else if($row[6] == 3){\r\n $row[4] = \"----->SÍMPLE<-----\";\r\n }\r\n echo \"<tr><td>\", $row[0],\"</td>\r\n <td class='fechaMov'>\", date_format(date_create($row[1]), 'd / m / Y'),\"</td>\r\n <td class='horaMov'>\", $row[2],\"</td>\r\n <td>\", $row[3],\"</td>\r\n <td>\", $row[4],\"</td>\r\n <td class='montMov'>\", $row[5],\"</td>\r\n <td class='botnMov'><input type='button' value='Detalles' onClick='validar(\",$control,\", 3)'></td>\r\n <td class='botnMov'><input type='button' value='Finalizar' onClick='validar2(\",$control,\", 3)'></td></tr>\";\r\n $control++;\r\n }\r\n }\r\n \r\n }\r\n cerrar_db($mysqli);\r\n }", "function tabla_mov_incompletos_simple_modific_dispersiones($id) {\r\n $mysqli = conectar_db();\r\n selecciona_db($mysqli);\r\n \r\n $Consulta = \"SELECT (SELECT b.nombre FROM empresas b WHERE b.id = a.origen), b.dispersor, b.nombre, a.monto, a.banco, a.cuenta, a.cuentaFinal, a.realizado, a.folio, a.pdf, a.id FROM disperciones a, empresas b, movimiento c WHERE a.idMov = $id AND b.id = a.empresa AND c.id = a.idMov AND c.activo = 1 ORDER BY a.id ASC\";\r\n\r\n $pConsulta = consulta_tb($mysqli, $Consulta);\r\n\r\n if(!$pConsulta){\r\n echo \"No se encontrarón resultados para esta consulta.\";\r\n }else{\r\n while($row=mysqli_fetch_array($pConsulta)){\r\n if($row[6]==1){\r\n $checked = \"checked='checked'\";\r\n $valorChecked = 1;\r\n }else{\r\n $checked = \"\";\r\n $valorChecked = 0;\r\n }\r\n if($row[7]==1){\r\n $checked2 = \"checked='checked'\";\r\n $valorChecked2 = 1;\r\n }else{\r\n $checked2 = \"\";\r\n $valorChecked2 = 0;\r\n }\r\n echo \"<tr>\r\n <td><input type='hidden' name='origenDest[]' value='\", $row[0] ,\"'><label>\", $row[0] ,\"</label></td>\r\n <td><input type='hidden' name='dispersora[]' value='\", $row[1] ,\"'><input type='hidden' name='empresaDest[]' value='\", $row[2] ,\"'><label>\", $row[2] ,\"</label></td>\r\n <td><input type='hidden' name='montoDest[]' value='\", $row[3] ,\"'><label>\", $row[3] ,\"</label></td>\r\n <td><input type='hidden' name='bancoDest[]' value='\", $row[4] ,\"'><label>\", $row[4] ,\"</label></td>\r\n <td><input type='hidden' name='cuentaDest[]' value='\", $row[5] ,\"'><label>\", $row[5] ,\"</label></td>\r\n <td><input type='hidden' name='cuentaFinalDest[]' value='\", $valorChecked ,\"'><input type='checkbox' onclick='cambiarValorCheck();' \", $checked ,\"></td>\r\n <td><input type='hidden' name='realizadoDest[]' value='\", $valorChecked2 ,\"'><input type='checkbox' name='checkRealizado[]' onclick='cambiarValorCheck();' \", $checked2 ,\"></td>\r\n <td><input type='text' name='folio[]' value='\", $row[8] ,\"''></td>\";\r\n if($row[9] == \"\"){\r\n echo \"<td class='botnMov'><input type='hidden' name='pdfAntDisp[]' value=''><input type='file' name='pdfDisp[]'></td>\";\r\n }else{\r\n echo \"<td class='botnMov'><input type='hidden' name='pdfAntDisp[]' value='$row[9]'><input type='file' name='pdfDisp[]'><a target=\\\"_blank\\\" href=\\\"$row[9]\\\" title=\\\"\\\">Factura</a></td>\";\r\n }\r\n echo \"<td><input type='checkbox'></td></tr>\";\r\n }\r\n }\r\n cerrar_db($mysqli);\r\n }", "function tabla_mov_incompletos_prestamos_modificar($mes, $anio) {\r\n $mysqli = conectar_db();\r\n selecciona_db($mysqli);\r\n \r\n //$Consulta = \"SELECT a.id, a.fecha, a.hora, a.origen, b.nombre, a.monto, a.tipo FROM movimiento a, empresas b WHERE a.activo = 1 AND a.empresa = b.id AND a.tipo = 3 AND a.fecha BETWEEN '$anio-$mes-1' AND '$anio-$mes-31' GROUP BY a.id ORDER BY a.fecha, a.hora ASC\";\r\n $Consulta = \"SELECT a.id, a.fecha, a.hora, a.origen, a.monto, a.tipo FROM movimiento a WHERE a.activo = 1 AND a.tipo = 4 AND a.fecha BETWEEN '$anio-$mes-1' AND '$anio-$mes-31' GROUP BY a.id ORDER BY a.fecha, a.hora ASC\";\r\n $pConsulta = consulta_tb($mysqli, $Consulta);\r\n /*$row=mysqli_fetch_array($pConsulta);\r\n if(count($row) < 1){\r\n $Consulta = \"SELECT a.id, a.fecha, a.hora, a.origen, b.nombre, a.monto, a.tipo FROM movimiento a, empresas b, movimientoFinal c WHERE a.activo = 1 AND a.empresa = b.id AND c.idMov = a.id AND c.realizado = 0 AND a.tipo = 3 AND a.fecha BETWEEN '$anio-$mes-1' AND '$anio-$mes-31' GROUP BY a.id ORDER BY a.fecha, a.hora ASC\";\r\n $pConsulta = consulta_tb($mysqli, $Consulta);\r\n $row=mysqli_fetch_array($pConsulta);\r\n if(count($row) < 1){\r\n $Consulta = \"SELECT a.id, a.fecha, a.hora, a.origen, b.nombre, a.monto, a.tipo FROM movimiento a, empresas b, movimientoSimple d WHERE a.activo = 1 AND a.empresa = b.id AND d.idMov = a.id AND d.realizado = 0 AND a.tipo = 3 AND a.fecha BETWEEN '$anio-$mes-1' AND '$anio-$mes-31' GROUP BY a.id ORDER BY a.fecha, a.hora ASC\";\r\n $pConsulta = consulta_tb($mysqli, $Consulta);\r\n }\r\n }*/\r\n\r\n if(!$pConsulta){\r\n echo \"No se encontrarón resultados para esta consulta.\";\r\n }else{\r\n $i = 1;\r\n echo \"<tr><td id='noMov'><b>\",'No.',\"</b></td>\r\n <td class='fechaMov'><b>\",'Fecha',\"</b></td>\r\n <td class='horaMov'><b>\",'Hora',\"</b></td>\r\n <td id='empOrig'><b>\",'Origen',\"</b></td>\r\n <td id='empMov'><b>\",'Empresa',\"</b></td>\r\n <td class='montMov'><b>\",'Monto',\"</b></td>\r\n <td class='botnMov'><b>\",'Detalles',\"</b></td></tr>\";\r\n while($row=mysqli_fetch_array($pConsulta)){\r\n if($row[5] == 2){\r\n $row[5] = \"<-----NÓMINA----->\";\r\n }else if($row[5] == 3){\r\n $row[5] = \"----->SÍMPLE<-----\";\r\n }else if($row[5] == 4){\r\n $row[5] = \"----->PRESTAMO<-----\";\r\n }\r\n echo \"<tr><td>\", $row[0],\"</td>\r\n <td class='fechaMov'>\", date_format(date_create($row[1]), 'd / m / Y'),\"</td>\r\n <td class='horaMov'>\", $row[2],\"</td>\r\n <td>\", $row[3],\"</td>\r\n <td>\", $row[5],\"</td>\r\n <td class='montMov'>\", $row[4],\"</td>\r\n <td class='botnMov'><input type='button' value='Detalles' onClick='validar(\",$i,\", 4)'></td></tr>\";\r\n $i++;\r\n }\r\n }\r\n cerrar_db($mysqli);\r\n }", "function tabla_listado_mov_finales($mes, $anio) {\r\n $mysqli = conectar_db();\r\n selecciona_db($mysqli);\r\n \r\n $Consulta = \"SELECT a.id, a.origen, b.empresa, b.tipoTrans, b.monto, b.banco, b.cuenta, b.pdf, a.fecha FROM movimiento a, movimientoFinal b WHERE a.activo = 1 AND b.idMov = a.id AND b.realizado = 1 AND a.fecha BETWEEN '$anio-$mes-1' AND '$anio-$mes-31' ORDER BY a.origen, a.fecha, a.hora ASC\";\r\n\r\n $pConsulta = consulta_tb($mysqli, $Consulta);\r\n\r\n if(!$pConsulta){\r\n echo \"No se encontrarón resultados para esta consulta.\";\r\n }else{\r\n $i = 1;\r\n echo \"<tr><td id='noMov'><b>\",'No.',\"</b></td>\r\n <td class='empOrigen'><b>\",'Cliente',\"</b></td>\r\n <td class='empMov'><b>\",'Destino',\"</b></td>\r\n <td class='empMov'><b>\",'Tipo',\"</b></td>\r\n <td class='montMov'><b>\",'Monto',\"</b></td>\r\n <td class='montMov'><b>\",'Banco',\"</b></td>\r\n <td class='montMov'><b>\",'Cuenta',\"</b></td>\r\n <td class='botnMov'><b>\",'Comprobante',\"</b></td>\r\n <td class='botnMov'><b>\",'Fecha',\"</b></td></tr>\";\r\n while($row=mysqli_fetch_array($pConsulta)){\r\n if($row[6] == 2){\r\n $row[4] = \"<-----NÓMINA----->\";\r\n }else if($row[6] == 3){\r\n $row[4] = \"----->SÍMPLE<-----\";\r\n }\r\n echo \"<tr><td><label>\", $row[0],\"</label></td>\r\n <td><label>\", $row[1],\"</label></td>\r\n <td><label>\", $row[2],\"</label></td>\";\r\n if($row[3] == 0){\r\n $row[3] = \"Transferencia\";\r\n }else if($row[3] == 1){\r\n $row[3] = \"Efectivo\";\r\n }else{\r\n $row[3] = \"Nómina\";\r\n }\r\n echo \"<td><label>\", $row[3],\"</label></td>\r\n <td class='montMov'><label>\", $row[4],\"</label></td>\r\n <td><label>\", $row[5],\"</label></td>\r\n <td><label>\", $row[6],\"</label></td>\";\r\n if($row[7] != \"\"){\r\n echo \"<td><label><a target=\\\"_blank\\\" href=\\\"$row[7]\\\" title=\\\"\\\">Transfer</a></label></td>\";\r\n }else{\r\n echo \"<td><label></label></td>\";\r\n }\r\n echo \"<td class='fechaMov'><label>\", date_format(date_create($row[8]), 'd / m / Y'),\"</label></td></tr>\";\r\n $i++;\r\n }\r\n }\r\n cerrar_db($mysqli);\r\n }", "function retornaEscolhidos($vetorComcadastros, $vetorComIndices){\n $limite = count($vetorComIndices);//limite conta quantos indices tem\n cabeçalhoTabela();//imprime o cabeçalho da tabela\n for($x=0; $x<$limite; $x++){//executa um for que percorre todos os indices do Vetor com os indices\n $y = $vetorComIndices[$x];//$y é igual indice do primeiro cadastro\n echo \"<tr>\";//cria linha na tabela\n echo \"<th scope='row'>$y</th>\";//escreve qual é o indice\n foreach ($vetorComcadastros[$y] as $string){//percorre todos os dados do cadastro com indice $y\n echo \"<td>$string</td>\";//cria uma celula e dentro escreve o dado\n }\n echo \"<td>\",botaoAlterar($y),\"</td>\";//cria uma celula e põe dentro o botão alterar com o indice que ele deve alterar caso clicado\n echo \"<td>\",botaoExcluir($y),\"</td>\";\n echo \"</tr>\";//finaliza a linha\n }\n echo \"</tbody>\";//encerra o corpo da tabela\n echo \"</table>\";//encerra a tabela\n }", "function tabla_mov_incompletos_directos_modificar($mes, $anio) {\r\n $mysqli = conectar_db();\r\n selecciona_db($mysqli);\r\n \r\n $Consulta = \"SELECT a.id, a.fecha, a.hora, a.origen, b.nombre, a.monto FROM movimiento a, empresas b, movimientoFinal c WHERE a.activo = 1 AND a.empresa = b.id AND a.tipo = 1 AND a.fecha BETWEEN '$anio-$mes-1' AND '$anio-$mes-31' GROUP BY a.id ORDER BY a.fecha, a.hora ASC\";\r\n\r\n $pConsulta = consulta_tb($mysqli, $Consulta);\r\n\r\n if(!$pConsulta){\r\n echo \"No se encontrarón resultados para esta consulta.\";\r\n }else{\r\n $i = 1;\r\n echo \"<tr><td id='noMov'><b>\",'No.',\"</b></td>\r\n <td class='fechaMov'><b>\",'Fecha',\"</b></td>\r\n <td class='horaMov'><b>\",'Hora',\"</b></td>\r\n <td id='empOrig'><b>\",'Origen',\"</b></td>\r\n <td id='empMov'><b>\",'Empresa',\"</b></td>\r\n <td class='montMov'><b>\",'Monto',\"</b></td>\r\n <td class='botnMov'><b>\",'Detalles',\"</b></td></tr>\";\r\n while($row=mysqli_fetch_array($pConsulta)){\r\n echo \"<tr><td>\", $row[0],\"</td>\r\n <td class='fechaMov'>\", date_format(date_create($row[1]), 'd / m / Y'),\"</td>\r\n <td class='horaMov'>\", $row[2],\"</td>\r\n <td>\", $row[3],\"</td>\r\n <td><label><--->DIRECTO<---></label></td>\r\n <td class='montMov'>\", $row[5],\"</td>\r\n <td class='botnMov'><input type='button' value='Detalles' onClick='validar(\",$i,\", 1)'></td></tr>\";\r\n $i++;\r\n }\r\n }\r\n cerrar_db($mysqli);\r\n }", "function titulosTablaTendencias(){\n\t\t\tglobal $secciones;\n\t\t\techo \"<tr>\";\n\t\t echo \"<th></th>\";\n\t\t echo \"<th>Puntaje</th>\";\n\t\t for($i = 0; $i < count($secciones); $i++){\n\t\t \techo \"<th>\". $secciones[$i] .\"</th>\";\n\t\t }\n\t\t echo \"</tr>\";\n\t\t}", "function CrearEncabezadoTabla2(&$html_tabla,$titulos){\n\t\n require Application::getLanguageDirectory().'/'.Application::getLanguage().\"/Tableheader.lan\";\n //si la variable titulos esta setiada crea un vector con los titulos\n //sino crea un vector con los indices del vector $registros_tabla\n $m = explode(\",\",$titulos);\n \n //print_r($m);\n // crea el encabezado de la tabla\n $html_tabla .= '\n <thead class=\"thead-primary\">';\n\t\t\t\t \n\n $html_tabla .= \"\n\t\t\t <tr>\n \";\n\n\t/* Crea los encabezados */\n\tfor($i=0;$i < count($m);$i++){\n\t\t\n $html_tabla .= '\n <th>'.$Tableheaders[$m[$i]].'</th>';\t\t\n\n }\n $html_tabla .= \"\n\t\t\t </tr>\n\t\t\t \n\t\t\t</thead> \";\n\t\t\t \n\n}", "function presentarTablaHomologacion($resultadoTHomologacion,$tipo) {\n?>\n <table class=\"contenidotabla\" width=\"100%\" border=\"0\" align=\"center\" cellpadding=\"4 px\" cellspacing=\"0px\" >\n <?\n if($tipo==1){\n $columnas=8;\n }else{\n $columnas=6;\n }\n $this->encabezadoTabla($tipo,$resultadoTHomologacion);\n \n if (is_array($resultadoTHomologacion)) {\n $filas=\"\";\n //recorre los resultados\n $cantidad=0;\n for ($j = 0; $j < count($resultadoTHomologacion); $j++) {\n \n if($resultadoTHomologacion[$j]['ESTADO']=='A'){\n $cantidad++;\n }\n ?>\n <tr onmouseover=\"this.style.background='#F4F4EA'\" onmouseout=\"this.style.background=''\">\n <?\n if ($tipo<>1){\n if($resultadoTHomologacion[$j]['ESTADO']=='A'){\n echo \" <td class='cuadro_plano centrar'>\".$resultadoTHomologacion[$j]['COD_ASI_PPAL'].\"</td>\";\n echo \"<td class='cuadro_plano ' >\".htmlentities($resultadoTHomologacion[$j]['NOM_ASI_PPAL']).\"</td>\";}\n }else{\n if($resultadoTHomologacion[$j]['FEC_REG']==(isset($resultadoTHomologacion[$j+1]['FEC_REG'])?$resultadoTHomologacion[$j+1]['FEC_REG']:''))\n $filas=\" rowspan='2' \";\n else\n $filas=\"\";\n if($resultadoTHomologacion[$j]['FEC_REG']!=(isset($resultadoTHomologacion[$j-1]['FEC_REG'])?$resultadoTHomologacion[$j-1]['FEC_REG']:'')&& $resultadoTHomologacion[$j]['ESTADO']=='A'){\n echo \"<td class='cuadro_plano centrar' \".$filas.\">\".$resultadoTHomologacion[$j]['COD_ASI_PPAL'].\"</td>\";\n echo \"<td class='cuadro_plano '\".$filas.\">\".htmlentities($resultadoTHomologacion[$j]['NOM_ASI_PPAL']).\"</td>\";\n \n }\n }\n \n if ($tipo<>2){\n if($resultadoTHomologacion[$j]['ESTADO']=='A'){\n echo \"<td class='cuadro_plano centrar'>\".$resultadoTHomologacion[$j]['COD_ASI_HOM'].\"</td>\";\n echo \"<td class='cuadro_plano '>\".htmlentities($resultadoTHomologacion[$j]['NOM_ASI_HOM']).\"</td>\";\n \n }\n \n }else{\n if($resultadoTHomologacion[$j]['FEC_REG']==(isset($resultadoTHomologacion[$j+1]['FEC_REG'])?$resultadoTHomologacion[$j+1]['FEC_REG']:''))\n $filas_hom=\" rowspan='2' \";\n else\n $filas_hom=\"\";\n if($resultadoTHomologacion[$j]['FEC_REG']!=(isset($resultadoTHomologacion[$j-1]['FEC_REG'])?$resultadoTHomologacion[$j-1]['FEC_REG']:'')&& $resultadoTHomologacion[$j]['ESTADO']=='A'){\n \n echo \"<td class='cuadro_plano centrar' \".$filas_hom.\">\".$resultadoTHomologacion[$j]['COD_ASI_HOM'].\"</td>\";\n echo \"<td class='cuadro_plano '\".$filas_hom.\">\".htmlentities($resultadoTHomologacion[$j]['NOM_ASI_HOM']).\"</td>\";\n ?>\n <td class='cuadro_plano centrar' <? echo $filas_hom; ?>>Activo</td>\n <td class='cuadro_plano centrar' <? echo $filas_hom;?>><? if($resultadoTHomologacion[$j]['ESTADO']=='A'){echo $this->enlaceDesahabilitar($resultadoTHomologacion[$j]);}\n ?></td>\n <?\n }\n }\n if ($tipo==0 && $resultadoTHomologacion[$j]['ESTADO']=='A'){\n ?>\n <td class='cuadro_plano centrar'>Activo</td>\n <td class='cuadro_plano centrar'><? if($resultadoTHomologacion[$j]['ESTADO']=='A'){echo $this->enlaceDesahabilitar($resultadoTHomologacion[$j]);}\n else {echo $this->enlaceHabilitar($resultadoTHomologacion[$j]);}?></td>\n <?\n }\n if($tipo==1 && $resultadoTHomologacion[$j]['ESTADO']=='A'){\n echo \"<td class='cuadro_plano centrar'>\".htmlentities($resultadoTHomologacion[$j]['PORCENTAJE']).\" %</td>\";\n echo \"<td class='cuadro_plano centrar'>\".htmlentities($resultadoTHomologacion[$j]['REQ_APROBAR']).\"</td>\";\n if($resultadoTHomologacion[$j]['FEC_REG']!=(isset($resultadoTHomologacion[$j-1]['FEC_REG'])?$resultadoTHomologacion[$j-1]['FEC_REG']:'')&& $resultadoTHomologacion[$j]['ESTADO']=='A'){\n \n ?>\n <td class='cuadro_plano centrar' <? echo $filas; ?>>Activo</td>\n <td class='cuadro_plano centrar' <? echo $filas; ?>><? if($resultadoTHomologacion[$j]['ESTADO']=='A'){echo $this->enlaceDesahabilitar($resultadoTHomologacion[$j]);}\n else {echo $this->enlaceHabilitar($resultadoTHomologacion[$j]);}?></td>\n <?\n }\n }\n \n }\n if($cantidad==0){\n echo \"<tr><td class='cuadro_plano centrar' colspan='\".$columnas.\"'>NO EXISTEN HOMOLOGACIONES REGISTRADAS PARA EL PROYECTO CURRICULAR</td></tr>\";\n \n } \n ?>\n </tr>\n <?\n \n }else\n {\n \n echo \"<tr><td class='cuadro_plano centrar' colspan='\".$columnas.\"'>NO EXISTEN HOMOLOGACIONES REGISTRADAS PARA EL PROYECTO CURRICULAR</td></tr>\";\n \n }\n ?>\n </table>\n <?\n }", "public function consolidado_temporalidad($tp_id,$dep_id){\n $tabla='';\n $dep=$this->model_evalregional->get_dpto($dep_id);\n $uni_proy=$this->model_proyecto->list_uni_proy($dep_id,$tp_id);\n\n $vi=0; $vf=0;\n if($this->tmes==1){ $vi = 1;$vf = 3; }\n elseif ($this->tmes==2){ $vi = 4;$vf = 6; }\n elseif ($this->tmes==3){ $vi = 7;$vf = 9; }\n elseif ($this->tmes==4){ $vi = 10;$vf = 12; }\n\n $tabla.='<table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" class=\"tabla\" style=\"width:100%;\">\n <tr style=\"font-size: 11px;\" class=\"modo1\">\n <th>#</th>\n <th>PROGRAMA</th>\n <th>UNIDAD / ESTABLECIMIENTO</th>\n <th>SERVICIO/COMPONENTE</th>\n <th>OPERACI&Oacute;N</th>\n <th>RESULTADO</th>\n <th>INDICADOR</th>\n <th>META</th>\n <th>ENE (P)</th>\n <th>FEB (P)</th>\n <th>MAR (P)</th>\n <th>ABR (P)</th>\n <th>MAY (P)</th>\n <th>JUN (P)</th>\n <th>JUL (P)</th>\n <th>AGO (P)</th>\n <th>SEPT (P)</th>\n <th>OCT (P)</th>\n <th>NOV (P)</th>\n <th>DIC (P)</th>\n <th>ENE (E)</th>\n <th>FEB (E)</th>\n <th>MAR (E)</th>\n <th>ABR (E)</th>\n <th>MAY (E)</th>\n <th>JUN (E)</th>\n <th>JUL (E)</th>\n <th>AGO (E)</th>\n <th>SEPT (E)</th>\n <th>OCT (E)</th>\n <th>NOV (E)</th>\n <th>DIC (E)</th>\n </tr>';\n $nro=0;\n foreach($uni_proy as $row){\n $productos=$this->model_producto->list_ope_proy($row['proy_id']);\n $nro++;\n \n $nro_p=0;\n foreach($productos as $rowp){\n $temp=$this->temporalizacion_productos($rowp['prod_id']);\n $nro_p++;\n $tabla.='<tr style=\"font-size: 11px;\" class=\"modo1\">';\n $tabla.='<td style=\"width: 1%;\">'.$nro_p.'</td>';\n $tabla.='<td style=\"width: 5%;\">'.$row['aper_programa'].' '.$row['aper_proyecto'].' '.$row['aper_actividad'].'</td>';\n $tabla.='<td style=\"width: 10%;\">'.$row['proy_nombre'].'</td>';\n $tabla.='<td style=\"width: 10%;\">'.$rowp['com_componente'].'</td>';\n $tabla.='<td style=\"width: 10%;\">'.$rowp['prod_producto'].'</td>';\n $tabla.='<td style=\"width: 10%;\">'.$rowp['prod_indicador'].'</td>';\n $tabla.='<td style=\"width: 10%;\">'.$rowp['prod_resultado'].'</td>';\n $tabla.='<td style=\"width: 3%;\" align=right>'.$rowp['prod_meta'].'</td>';\n for ($i=1; $i <=12 ; $i++) {\n if($i>=$vi & $i<=$vf){\n $tabla .='<td bgcolor=\"#daf3ef\" title=\"TRIMESTRE VIGENTE\" style=\"width: 3%;\" align=right>'.$temp[1][$i].'</td>';\n }\n else{\n $tabla .='<td bgcolor=\"#e2e2e2\" style=\"width: 3%;\" align=right>'.$temp[1][$i].'</td>';\n }\n }\n\n for ($i=1; $i <=12 ; $i++) {\n if($i>=$vi & $i<=$vf){\n $tabla .='<td bgcolor=\"#daf3ef\" title=\"TRIMESTRE VIGENTE\" style=\"width: 3%;\" align=right>'.$temp[4][$i].'</td>';\n }\n else{\n $tabla .='<td style=\"width: 3%;\" align=right>'.$temp[4][$i].'</td>';\n }\n }\n\n $tabla.='</tr>';\n }\n \n }\n $tabla.='</table>';\n echo $tabla;\n }", "public function ArmeTablaBalanceComprobacion($Titulo,$Condicion,$Condicion2,$Vector) {\r\n \r\n \r\n \r\n $tbl='<table cellspacing=\"1\" cellpadding=\"2\" border=\"1\" align=\"center\" >\r\n <tr> \r\n <th><h3>CUENTA</h3></th>\r\n <th><h3>NOMBRE</h3></th>\r\n <th><h3>SALDO ANTERIOR</h3></th>\r\n <th><h3>DEBITO</h3></th>\r\n <th><h3>CREDITO</h3></th>\r\n <th><h3>NUEVO SALDO</h3></th>\r\n </tr >\r\n </table>\r\n ';\r\n \r\n //Guardo en un Vector los resultados de la consulta por Clase\r\n \r\n \r\n $sql=\"SELECT SUBSTRING(`CuentaPUC`,1,1) AS Clase ,sum(`Debito`) as Debitos, sum(`Credito`) as Creditos, sum(`Neto`) as Neto, (SELECT SUM(`Neto`) as SaldoTotal FROM `librodiario` $Condicion2 SUBSTRING(`CuentaPUC`,1,1)=Clase) AS Total FROM `librodiario` $Condicion GROUP BY SUBSTRING(`CuentaPUC`,1,1)\";\r\n $Consulta=$this->obCon->Query($sql);\r\n $i=0;\r\n $DebitosGeneral=0;\r\n $CreditosGeneral=0;\r\n $TotalDebitos=0;\r\n $TotalCreditos=0;\r\n $Total=0;\r\n while($ClaseCuenta=$this->obCon->FetchArray($Consulta)){\r\n $DebitosGeneral=$DebitosGeneral+$ClaseCuenta[\"Debitos\"];\r\n $CreditosGeneral=$CreditosGeneral+$ClaseCuenta[\"Creditos\"];\r\n $TotalDebitos=$TotalDebitos+$ClaseCuenta[\"Debitos\"];\r\n $TotalCreditos=$TotalCreditos+$ClaseCuenta[\"Creditos\"];\r\n $Total=$Total+$ClaseCuenta[\"Total\"];\r\n $i++;\r\n $Clase=$ClaseCuenta[\"Clase\"];\r\n $NoClasesCuentas[$i]=$ClaseCuenta[\"Clase\"];\r\n $DatosCuenta= $this->obCon->DevuelveValores(\"clasecuenta\", \"PUC\", $Clase);\r\n $Balance[\"ClaseCuenta\"][$Clase][\"Nombre\"]=$DatosCuenta[\"Clase\"];\r\n $Balance[\"ClaseCuenta\"][$Clase][\"Clases\"]=$ClaseCuenta[\"Clase\"];\r\n $Balance[\"ClaseCuenta\"][$Clase][\"Debitos\"]=$ClaseCuenta[\"Debitos\"];\r\n $Balance[\"ClaseCuenta\"][$Clase][\"Creditos\"]=$ClaseCuenta[\"Creditos\"];\r\n $Balance[\"ClaseCuenta\"][$Clase][\"NuevoSaldo\"]=$ClaseCuenta[\"Debitos\"]-$ClaseCuenta[\"Creditos\"]+$ClaseCuenta[\"Total\"];\r\n $Balance[\"ClaseCuenta\"][$Clase][\"SaldoAnterior\"]=$ClaseCuenta[\"Total\"];\r\n }\r\n $Diferencia=$TotalDebitos-$TotalCreditos;\r\n //Guardo en un Vector los resultados de la consulta por Grupo\r\n \r\n $sql=\"SELECT SUBSTRING(`CuentaPUC`,1,2) AS Grupo ,sum(`Debito`) as Debitos, sum(`Credito`) as Creditos,(SELECT SUM(`Neto`) as SaldoTotal FROM `librodiario` $Condicion2 SUBSTRING(`CuentaPUC`,1,2)=Grupo) AS Total FROM `librodiario` $Condicion GROUP BY SUBSTRING(`CuentaPUC`,1,2)\";\r\n $Consulta=$this->obCon->Query($sql);\r\n $i=0;\r\n \r\n while($ClaseCuentaGrupo=$this->obCon->FetchArray($Consulta)){\r\n $i++;\r\n $Grupo=$ClaseCuentaGrupo[\"Grupo\"];\r\n $NoGrupos[$i]=$ClaseCuentaGrupo[\"Grupo\"];\r\n $DatosCuenta= $this->obCon->DevuelveValores(\"gupocuentas\", \"PUC\", $Grupo);\r\n $Balance[\"GrupoCuenta\"][$Grupo][\"Nombre\"]=$DatosCuenta[\"Nombre\"];\r\n $Balance[\"GrupoCuenta\"][$Grupo][\"Grupos\"]=$ClaseCuentaGrupo[\"Grupo\"];\r\n $Balance[\"GrupoCuenta\"][$Grupo][\"Debitos\"]=$ClaseCuentaGrupo[\"Debitos\"];\r\n $Balance[\"GrupoCuenta\"][$Grupo][\"Creditos\"]=$ClaseCuentaGrupo[\"Creditos\"];\r\n $Balance[\"GrupoCuenta\"][$Grupo][\"NuevoSaldo\"]=$ClaseCuentaGrupo[\"Debitos\"]-$ClaseCuentaGrupo[\"Creditos\"]+$ClaseCuentaGrupo[\"Total\"];\r\n $Balance[\"GrupoCuenta\"][$Grupo][\"SaldoAnterior\"]=$ClaseCuentaGrupo[\"Total\"];\r\n }\r\n \r\n //Guardo en un Vector los resultados de la consulta por Cuenta\r\n \r\n $sql=\"SELECT SUBSTRING(`CuentaPUC`,1,4) AS Cuenta ,sum(`Debito`) as Debitos, sum(`Credito`) as Creditos,(SELECT SUM(`Neto`) as SaldoTotal FROM `librodiario` $Condicion2 SUBSTRING(`CuentaPUC`,1,4)=Cuenta) as Total FROM `librodiario` $Condicion GROUP BY SUBSTRING(`CuentaPUC`,1,4)\";\r\n $Consulta=$this->obCon->Query($sql);\r\n $i=0;\r\n \r\n while($ClaseCuentaCuenta=$this->obCon->FetchArray($Consulta)){\r\n $i++;\r\n $Cuenta=$ClaseCuentaCuenta[\"Cuenta\"];\r\n $NoCuentas[$i]=$ClaseCuentaCuenta[\"Cuenta\"];\r\n $DatosCuenta= $this->obCon->DevuelveValores(\"cuentas\", \"idPUC\", $Cuenta);\r\n $Balance[\"Cuenta\"][$Cuenta][\"Nombre\"]=$DatosCuenta[\"Nombre\"];\r\n $Balance[\"Cuenta\"][$Cuenta][\"Cuentas\"]=$ClaseCuentaCuenta[\"Cuenta\"];\r\n $Balance[\"Cuenta\"][$Cuenta][\"Debitos\"]=$ClaseCuentaCuenta[\"Debitos\"];\r\n $Balance[\"Cuenta\"][$Cuenta][\"Creditos\"]=$ClaseCuentaCuenta[\"Creditos\"];\r\n $Balance[\"Cuenta\"][$Cuenta][\"NuevoSaldo\"]=$ClaseCuentaCuenta[\"Debitos\"]-$ClaseCuentaCuenta[\"Creditos\"]+$ClaseCuentaCuenta[\"Total\"];\r\n $Balance[\"Cuenta\"][$Cuenta][\"SaldoAnterior\"]=$ClaseCuentaCuenta[\"Total\"];\r\n }\r\n \r\n //Guardo en un Vector los resultados de la consulta por SubCuenta\r\n \r\n $sql=\"SELECT `CuentaPUC` AS Subcuenta , sum(`Debito`) as Debitos, sum(`Credito`) as Creditos, sum(`Neto`) as NuevoSaldo,(SELECT SUM(`Neto`) as SaldoTotal FROM `librodiario` $Condicion2 `CuentaPUC` = Subcuenta) as Total FROM `librodiario` $Condicion AND LENGTH(`CuentaPUC`)>=5 GROUP BY `CuentaPUC` \";\r\n $Consulta=$this->obCon->Query($sql);\r\n $i=0;\r\n \r\n while($ClaseCuentaSub=$this->obCon->FetchArray($Consulta)){\r\n $i++;\r\n $SubCuenta=$ClaseCuentaSub[\"Subcuenta\"];\r\n $NoSubCuentas[$i]=$ClaseCuentaSub[\"Subcuenta\"];\r\n $sql=\"SELECT Nombre FROM subcuentas WHERE PUC='$SubCuenta' LIMIT 1\";\r\n $Datos= $this->obCon->Query($sql);\r\n $DatosCuenta=$this->obCon->FetchArray($Datos);\r\n //$DatosCuenta= $this->obCon->DevuelveValores(\"subcuentas\", \"PUC\", `$SubCuenta`);\r\n $Balance[\"SubCuenta\"][$SubCuenta][\"Nombre\"]=$DatosCuenta[\"Nombre\"];\r\n $Balance[\"SubCuenta\"][$SubCuenta][\"Subcuenta\"]=$ClaseCuentaSub[\"Subcuenta\"];\r\n $Balance[\"SubCuenta\"][$SubCuenta][\"Debitos\"]=$ClaseCuentaSub[\"Debitos\"];\r\n $Balance[\"SubCuenta\"][$SubCuenta][\"Creditos\"]=$ClaseCuentaSub[\"Creditos\"];\r\n $Balance[\"SubCuenta\"][$SubCuenta][\"NuevoSaldo\"]=$ClaseCuentaSub[\"Debitos\"]-$ClaseCuentaSub[\"Creditos\"]+$ClaseCuentaSub[\"Total\"];\r\n $Balance[\"SubCuenta\"][$SubCuenta][\"SaldoAnterior\"]=$ClaseCuentaSub[\"Total\"];\r\n }\r\n \r\n $h=0;\r\n $tbl.='<table cellspacing=\"1\" cellpadding=\"2\" border=\"0\" align=\"center\" >';\r\n if(isset($NoClasesCuentas)){\r\n foreach($NoClasesCuentas as $ClasesCuentas){\r\n if($Balance[\"ClaseCuenta\"][$ClasesCuentas][\"Creditos\"]>0 or $Balance[\"ClaseCuenta\"][$ClasesCuentas][\"Debitos\"]>0){\r\n if($h==0){\r\n $Back=\"#f2f2f2\";\r\n $h=1;\r\n }else{\r\n $Back=\"white\";\r\n $h=0;\r\n }\r\n $tbl.='<tr align=\"rigth\" style=\"border-bottom: 1px solid #ddd;background-color: '.$Back.';\"> \r\n <td align=\"left\"><strong><h1>'.$Balance[\"ClaseCuenta\"][$ClasesCuentas][\"Clases\"].'</h1></strong></td>\r\n <td align=\"center\"><strong><h1>'.$Balance[\"ClaseCuenta\"][$ClasesCuentas][\"Nombre\"].'</h1></strong></td> \r\n <td><strong><h1>'.number_format($Balance[\"ClaseCuenta\"][$ClasesCuentas][\"SaldoAnterior\"]).'</h1></strong></td> \r\n <td><strong><h1>'.number_format($Balance[\"ClaseCuenta\"][$ClasesCuentas][\"Debitos\"]).'</h1></strong></td>\r\n <td><strong><h1>'.number_format($Balance[\"ClaseCuenta\"][$ClasesCuentas][\"Creditos\"]).'</h1></strong></td>\r\n <td><strong><h1>'.number_format($Balance[\"ClaseCuenta\"][$ClasesCuentas][\"NuevoSaldo\"]).'</h1></strong></td>\r\n </tr >';\r\n \r\n //Consulto los valores dentro del Grupo\r\n \r\n foreach($NoGrupos as $GruposCuentas){\r\n if(substr($Balance[\"GrupoCuenta\"][$GruposCuentas][\"Grupos\"], 0, 1)==$Balance[\"ClaseCuenta\"][$ClasesCuentas][\"Clases\"]){\r\n if($h==0){\r\n $Back=\"#f2f2f2\";\r\n $h=1;\r\n }else{\r\n $Back=\"white\";\r\n $h=0;\r\n }\r\n $tbl.='<tr align=\"rigth\" style=\"border-bottom: 1px solid #ddd;background-color: '.$Back.';\"> \r\n <td align=\"left\"><h2>'.$Balance[\"GrupoCuenta\"][$GruposCuentas][\"Grupos\"].'</h2></td>\r\n <td align=\"center\"><strong>'.$Balance[\"GrupoCuenta\"][$GruposCuentas][\"Nombre\"].'</strong></td>\r\n <td><h2>'.number_format($Balance[\"GrupoCuenta\"][$GruposCuentas][\"SaldoAnterior\"]).'</h2></td>\r\n <td><h2>'.number_format($Balance[\"GrupoCuenta\"][$GruposCuentas][\"Debitos\"]).'</h2></td>\r\n <td><h2>'.number_format($Balance[\"GrupoCuenta\"][$GruposCuentas][\"Creditos\"]).'</h2></td>\r\n <td><h2>'.number_format($Balance[\"GrupoCuenta\"][$GruposCuentas][\"NuevoSaldo\"]).'</h2></td>\r\n </tr >';\r\n \r\n \r\n //Consulto los valores dentro de la Cuenta\r\n \r\n foreach($NoCuentas as $Cuentas){\r\n if(substr($Balance[\"Cuenta\"][$Cuentas][\"Cuentas\"], 0, 2)==$Balance[\"GrupoCuenta\"][$GruposCuentas][\"Grupos\"]){\r\n if($h==0){\r\n $Back=\"#f2f2f2\";\r\n $h=1;\r\n }else{\r\n $Back=\"white\";\r\n $h=0;\r\n }\r\n $tbl.='<tr align=\"rigth\" style=\"border-bottom: 1px solid #ddd;background-color: '.$Back.';\"> \r\n <td align=\"left\"><h3>'.$Balance[\"Cuenta\"][$Cuentas][\"Cuentas\"].'</h3></td>\r\n <td align=\"center\"><strong>'.$Balance[\"Cuenta\"][$Cuentas][\"Nombre\"].'</strong></td>\r\n <td><h3>'.number_format($Balance[\"Cuenta\"][$Cuentas][\"SaldoAnterior\"]).'</h3></td> \r\n <td><h3>'.number_format($Balance[\"Cuenta\"][$Cuentas][\"Debitos\"]).'</h3></td>\r\n <td><h3>'.number_format($Balance[\"Cuenta\"][$Cuentas][\"Creditos\"]).'</h3></td>\r\n <td><h3>'.number_format($Balance[\"Cuenta\"][$Cuentas][\"NuevoSaldo\"]).'</h3></td>\r\n </tr >';\r\n \r\n //Consulto los valores dentro de la Cuenta\r\n \r\n foreach($NoSubCuentas as $SubCuentas){\r\n if(substr($Balance[\"SubCuenta\"][$SubCuentas][\"Subcuenta\"], 0, 4)==$Balance[\"Cuenta\"][$Cuentas][\"Cuentas\"]){\r\n if($h==0){\r\n $Back=\"#f2f2f2\";\r\n $h=1;\r\n }else{\r\n $Back=\"white\";\r\n $h=0;\r\n }\r\n $tbl.='<tr align=\"rigth\" style=\"border-bottom: 1px solid #ddd;background-color: '.$Back.';\"> \r\n <td align=\"left\">'.$Balance[\"SubCuenta\"][$SubCuentas][\"Subcuenta\"].'</td>\r\n <td align=\"center\"><strong>'.$Balance[\"SubCuenta\"][$SubCuentas][\"Nombre\"].'</strong></td>\r\n <td>'.number_format($Balance[\"SubCuenta\"][$SubCuentas][\"SaldoAnterior\"]).'</td>\r\n <td>'.number_format($Balance[\"SubCuenta\"][$SubCuentas][\"Debitos\"]).'</td>\r\n <td>'.number_format($Balance[\"SubCuenta\"][$SubCuentas][\"Creditos\"]).'</td>\r\n <td>'.number_format($Balance[\"SubCuenta\"][$SubCuentas][\"NuevoSaldo\"]).'</td>\r\n </tr >';\r\n }\r\n }\r\n \r\n }\r\n }\r\n }\r\n } \r\n }\r\n }\r\n }\r\n $tbl.='<tr > <td colspan=\"3\" align=\"rigth\"><h2>TOTALES:</h2></td>'\r\n . '<td align=\"rigth\"><h2>'. number_format($DebitosGeneral).\"</h2> </td>\"\r\n . '<td align=\"rigth\"><h2>'. number_format($CreditosGeneral).\"</h2> </td>\"\r\n . \"<td>NA</td>\"\r\n . \"</tr ></table>\";\r\n return($tbl);\r\n}", "public function tablaAmortizacionRenovacion($_capital_prestado_amortizacion_cabeza, $numero_cuotas, $interes_mensual, $valor_cuota, $fecha_corte, $_tasa_interes_amortizacion_cabeza )\r\n {\r\n $resultAmortizacion=array();\r\n \r\n $formato_fecha='Y-m-d';\r\n $capital = $_capital_prestado_amortizacion_cabeza;\r\n $inter_ant= $interes_mensual;\r\n $interes_diario=$inter_ant/30;\r\n $interes= $capital * $inter_ant;\r\n $interes=floor($interes * 100) / 100;\r\n $amortizacion = $valor_cuota - $interes;\r\n $saldo_inicial= $capital - $amortizacion;\r\n $desgravamen=((0.16/1000)*$saldo_inicial)*1.04;\r\n $desgravamen=floor($desgravamen * 100) / 100;\r\n $resultAmortizacion=array();\r\n $interes_concesion=0;\r\n $diferencia_dias=0;\r\n \r\n $interes= 0;\r\n $amortizacion = 0;\r\n $saldo_inicial= $capital;\r\n $fecha=new DateTime($fecha_corte);\r\n $lastday = $fecha->format('Y-m-t');\r\n $elementos_fecha=explode(\"-\", $fecha_corte);\r\n $lastday = explode(\"-\", $lastday);\r\n $lastday=$lastday[2];\r\n $diferencia_dias=$lastday-$elementos_fecha[2];\r\n $fecha_ultimo_dia=$elementos_fecha[0].\"-\".$elementos_fecha[1].\"-\".$lastday;\r\n $fecha= new DateTime($fecha_ultimo_dia);\r\n $fecha=$fecha->format($formato_fecha);\r\n $fecha_corte=$fecha;\r\n $valor = 0;\r\n $desgravamen=0;\r\n $saldo_inicial_ant = $capital;\r\n \r\n for( $i = 0; $i <= $numero_cuotas; $i++) {\r\n \r\n \r\n if($i==0)\r\n {\r\n $elementos_fecha_corte=explode(\"-\", $fecha_corte);\r\n $fecha_corte=$elementos_fecha_corte[0].\"-\".$elementos_fecha_corte[1].\"-\".$elementos_fecha_corte[2];\r\n $fecha=new DateTime($fecha_corte);\r\n $lastday = $fecha->format('Y-m-t');\r\n $lastday = explode(\"-\", $lastday);\r\n $lastday=$lastday[2];\r\n $fecha=$fecha->format($formato_fecha);\r\n $elementos_fecha=explode(\"-\", $fecha);\r\n $fecha_ultimo_dia=$elementos_fecha[0].\"-\".$elementos_fecha[1].\"-\".$lastday;\r\n $fecha= new DateTime($fecha_ultimo_dia);\r\n $fecha=$fecha->format($formato_fecha);\r\n $fecha_corte=$fecha;\r\n $interes_concesion=$interes_diario*$diferencia_dias*$capital;\r\n $interes_concesion=round($interes_concesion,2);\r\n }\r\n if($i!=0)\r\n {\r\n $saldo_inicial_ant = $saldo_inicial_ant - $amortizacion;\r\n $interes= $saldo_inicial_ant * $inter_ant;\r\n $interes=floor($interes * 100) / 100;\r\n if($i==1) $interes+=$interes_concesion;\r\n $amortizacion = $valor_cuota - $interes;\r\n \r\n $desgravamen=((0.16/1000)*$saldo_inicial)*1.04;\r\n $desgravamen=floor($desgravamen * 100) / 100;\r\n $saldo_inicial= $saldo_inicial_ant - $amortizacion;\r\n $elementos_fecha_corte=explode(\"-\", $fecha_corte);\r\n $elementos_fecha_corte[1]++;\r\n $elementos_fecha_corte[2]=15;\r\n if($elementos_fecha_corte[1]>12)\r\n {\r\n $elementos_fecha_corte[1]=1;\r\n $elementos_fecha_corte[0]++;\r\n }\r\n $fecha_corte=$elementos_fecha_corte[0].\"-\".$elementos_fecha_corte[1].\"-\".$elementos_fecha_corte[2];\r\n $fecha=new DateTime($fecha_corte);\r\n $lastday = $fecha->format('Y-m-t');\r\n $lastday = explode(\"-\", $lastday);\r\n $lastday=$lastday[2];\r\n $fecha=$fecha->format($formato_fecha);\r\n $elementos_fecha=explode(\"-\", $fecha);\r\n $fecha_ultimo_dia=$elementos_fecha[0].\"-\".$elementos_fecha[1].\"-\".$lastday;\r\n $fecha= new DateTime($fecha_ultimo_dia);\r\n $fecha=$fecha->format($formato_fecha);\r\n $fecha_corte=$fecha;\r\n if($i==1) $valor=$valor_cuota+$interes_concesion;\r\n else $valor = $valor_cuota;\r\n }\r\n \r\n \r\n \r\n if ($i!=0)\r\n {\r\n $arreglo=array('pagos_trimestrales'=> $i,\r\n 'saldo_inicial'=>$saldo_inicial,\r\n 'interes'=>$interes,\r\n 'amortizacion'=>$amortizacion,\r\n 'pagos'=>$valor,\r\n 'desgravamen'=>$desgravamen,\r\n 'fecha_pago'=>$fecha,\r\n 'interes_concesion'=>$interes_concesion\r\n );\r\n \r\n \r\n array_push($resultAmortizacion, $arreglo);\r\n }\r\n \r\n }\r\n \r\n return $resultAmortizacion;\r\n }", "public function montarTablero(){\n for ($i = 1; $i <= 8; $i++) {\n for ($j = 1; $j <= 8; $j++) {\n $casilla = new Casilla($i, $j);\n $this->casillas[$i][$j] = $casilla;\n if(!empty($this->fichas[$i][$j])){\n\n $this->casillas[$i][$j]->cambioOcupado($this->fichas[$i][$j]);\n\n }\n }\n }\n }", "function mostrarTablaHomologacion() {\n //echo \"<br>cod_proyecto \".$_REQUEST['cod_proyecto'];exit;\n \n if (isset($_REQUEST['cod_proyecto'])?$_REQUEST['cod_proyecto']:''){ \n $cod_proyecto=$_REQUEST['cod_proyecto'];\n //$cod_proyecto=77;\n $resultadoTHomologacionNormal=$this->consultarTablaHomologacion($cod_proyecto,0);\n $resultadoTHomologacionUnion=$this->consultarTablaHomologacion($cod_proyecto,1);\n $resultadoTHomologacionBifurcacion=$this->consultarTablaHomologacion($cod_proyecto,2);\n $this->tituloTabla();\n //var_dump($resultadoTHomologacionNormal);exit;\n $this->presentarTablaHomologacion($resultadoTHomologacionNormal,0);\n $this->presentarTablaHomologacion($resultadoTHomologacionUnion,1);\n $this->presentarTablaHomologacion($resultadoTHomologacionBifurcacion,2);\n }\n \n }", "function CrearEncabezadoTabla($registros_tabla,$titulos)\r\n{\r\n\t//inicializa cadena.\r\n\t$html_tabla = \"\";\r\n\r\n //si la variable titulos esta setiada crea un vector con los titulos\r\n //sino crea un vector con los indices del vector $registros_tabla\r\n if(isset($titulos)){\r\n $m = explode(\",\",$titulos);\r\n }else{\r\n //pasa los titulos a un vector\r\n $m = array_keys($registros_tabla[0]);\r\n }\r\n\r\n // crea el encabezado de la tabla\r\n $html_tabla .= \"<tr>\";\r\n $html_tabla .= \"<th></th>\";\r\n for($i=0;$i < count($m);$i++){\r\n $html_tabla .= \"<th class=\\\"titulofila\\\">\";\r\n $html_tabla.= $m[$i];\r\n $html_tabla .= \"</th>\";\r\n }\r\n $html_tabla .= \"</tr>\";\r\n\r\n\treturn $html_tabla;\r\n\r\n}", "private function crearTablaDatos()\n {\n //Se calcula la probabilidad\n $this->calcularProbabilidad();\n //Se calcula la entropia y entr del msj\n $this->calcularEntropia();\n //Se calculan los bits codigo de cada caracter y bits Msj\n $this->calcularBitsCod();\n }", "public function remplirTabSj() {\n\n try {\n global $bdd;\n $result = $bdd->prepare('select DISTINCT(ins.cne_e) as cne_e \n from inscription ins,nom_module md,modul m,etudiant etd\n where ins.id_m=md.id_m \n and m.id_m=md.id_m \n and etd.id_f=md.id_f\n and etd.cne_e=ins.cne_e\n and ins.etat_v is null\n and m.nom_s=:sj \n and md.id_f=:idf;');\n $result->execute(array('sj' => $this->sj, 'idf' => $this->idf));\n while ($don = $result->fetch()) {\n array_push($this->tabCneSj, $don['cne_e']);\n }\n $result->closeCursor();\n } catch (Exception $e) {\n echo '<script>alert(\"' . $e->getMessage() . '\");</script>';\n $this->pretAdelibrer = FALSE;\n }\n }", "function tablaDatos(){\n\n $editar = $this->Imagenes($this->PrimaryKey,0);\n $imagen = $this->Imagenes($this->PrimaryKey,12);\n $eliminar = $this->Imagenes($this->PrimaryKey,1);\n $sql = \"SELECT L.clientetercerizado,\".$imagen.\",L.nombre,\".$editar.\",\".$eliminar.\" FROM \".$this->Table.\" L where estado='A'\";\n \n $datos = $this->Consulta($sql,1); \n if(count($datos)){\n $_array_formu = array();\n $_array_formu = $this->generateHead($datos);\n $this->CamposHead = ( isset($_array_formu[0]) && is_array($_array_formu[0]) )? $_array_formu[0]: array();\n \n $tablaHtml = '<div class=\"row\">\n <div class=\"col-md-12\">\n <div class=\"panel panel-default\">\n <div class=\"panel-body recargaDatos\" style=\"page-break-after: always;\">\n <div class=\"table-responsive\">';\n $tablaHtml .='';\n \t\t$tablaHtml .= $this->print_table($_array_formu, 5, true, 'table table-striped table-bordered',\"id='tablaDatos'\");\n \t\t$tablaHtml .=' </div>\n </div>\n </div>\n </div>\n </div>\n ';\n }else{\n $tablaHtml = '<div class=\"col-md-8\">\n <div class=\"alert alert-info alert-dismissable\">\n <button class=\"close\" aria-hidden=\"true\" data-dismiss=\"alert\" type=\"button\">×</button>\n <strong>Atenci&oacute;n</strong>\n No se encontraron registros.\n </div>\n </div>';\n }\n \n if($this->_datos=='r') echo $tablaHtml;\n else return $tablaHtml;\n \n }", "public function mostrar_tabla_anuncios(){\n\n\t\t$return = '';\n\t\t$mensaje = array('0' => 'Desactivado', '1' => 'Activo');\n\t\t$cols = array('id', 'clave_interna', 'provincia', 'municipio', 'tipo_venta', 'anuncio_promocionado',\n\t\t\t\t\t 'anuncio_e','paquete','activo','apto');\n\t\t$this->where('ussr',$this->user);\n\n\t\tif($salida = $this->get('anuncios', NULL, $cols)){\n\n\t\t\t$return .= '<table class=\"table table-bordered table-hover\">';\n\n\t\t\t$return .= '<tr>\n\t\t\t\t\t <th>Imagen</th>\n\t\t\t\t\t <th>Clave interna</th>\n\t\t\t\t\t <th>Paquete</th>\n\t\t\t\t\t <th>Provincia</th>\n\t\t\t\t\t <th>Operacion</th>\n\t\t\t\t\t <th>Nº imagenes</th>\n\t\t\t\t\t <th>Idiomas</th>\n\t\t\t\t\t <th>Contratado</th>\n\t\t\t\t\t <th>Anuncio apto</th>\n\t\t\t\t\t <th>Anuncio activo</th>\n\t\t\t\t\t <th>Opciones</th>\n\t\t\t\t\t </tr>';\n\t\t\t//por cada anuncio varias cosas habra que hacer\n\t\t\t$i=1;\t\t \n\t\t\tforeach ($salida as $key => $value) {\n\t\t\n\t\t\t\t$num = $i++;\n\t\t\t\t$id_arr = md5($value['id']);\n\t\t\t\t$imagen = $this->sacar_foto($id_arr, $this->user);\n\n\t\t\t\t$return .='<tr>\n\t\t\t\t\t \t<td>'.$imagen.'</td>\n\t\t\t\t\t <td>'.$value['clave_interna'].'</td>\n\t\t\t\t\t <td>'.$value['paquete'].'</td>\n\t\t\t\t\t <td>'.$value['provincia'].'<br />\n\t\t\t\t\t '.$this->show_municipio($value['municipio']).'</td>\n\t\t\t\t\t <td>'.$value['tipo_venta'].'</td>';\n\n\n\n\t\t\t\t//mostrara numero de imagenes en el anuncio\n\t\t\t\t$return .='<td>';\n\t\t\t\t$return .= $this->num_imagenes_anuncio($value['id']);\n\t\t\t\t$return .='</td>';\n\n\n\t\t\t\t//mostrando idiomas en los que esta el anuncio\n\t\t\t\t$return .='<td>';\n\t\t\t\t$return .= $this->idiomas_del_anuncio($value['id']);\n\t\t\t\t$return .='</td>';\n\n\t\t\t\t//estrella o promocionado\n\t\t\t\t$return .='<td>';\n\t\t\t\tif(!empty($value['anuncio_promocionado']) && ($value['anuncio_promocionado'] == 1)){\n\t\t\t\t\t$return .= 'Anuncio promocionado<br />';\t}\n\t\t\t\tif($value['anuncio_e'] == 1){\n\t\t\t\t\t$return .= 'Anuncio estrella';\t\t\t}\t\n\t\t\t\t\t\n\t\t\t $return .= '</td>';\n\t\t\t $return .= '<td>'.$value['apto'].'</td>';\n\t\t\t $return .= '<td id=\"act-'.$id_arr.'\">'.$mensaje[$value['activo']].'</td>';\n\t\t\t //dropdown de opciones\n\t\t\t $return .= '<td>'.$this->dropdown_tabla_anuncios($id_arr).'</td>';\n\t\t\n\t\t\t\t$return .= '</tr>';\n\n\t\t\t}//fin del foreach\n\n\t\t\t$return .= '</table>';\n\n\n\t\t}else{\n\t\t\t$return .= '<h5 id=\"sec1\">No hay anuncios 1 </h5>';\n\t\t}\n\n\t\treturn $return;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test output for numeric zero date
public function testFilterNoDate() { $value = "0"; $filtered = $this->_filter->filter($value); $this->assertEquals($filtered, ''); }
[ "public function testParseDateZero()\n\t{\n\t\t$this->parser->search = ['date' => '00/00/0000,00/00,00/0000'];\n\t\t$check = $this->parser->parse();\n\t\t$assume = [\n\t\t\t'date' => Func::orOp([Func::isNull(), Func::isNull(), Func::isNull()])\n\t\t];\n\t\treturn $this->assume(__FUNCTION__, $check, $assume, false);\n\t}", "function isDateTimeZeroIta($value): bool\n{\n return $value == '00/00/0000 00:00:00';\n}", "public function testDateTimeAllZeros() {\n\t\t$result = $this->Form->dateTime('Contact.date', [\n\t\t\t'timeFormat' => false,\n\t\t\t'empty' => ['day' => '-', 'month' => '-', 'year' => '-'],\n\t\t\t'value' => '0000-00-00',\n\t\t]);\n\n\t\t$this->assertMatchesRegularExpression('/<option value=\"\">-<\\/option>/', $result);\n\t\t$this->assertDoesNotMatchRegularExpression('/<option value=\"0\" selected=\"selected\">0<\\/option>/', $result);\n\t}", "function dadosVaziosDesconsiderandoZero($dado) {\n if (!is_numeric($dado) && empty($dado))\n return true;\n else\n return false;\n}", "public function convertZeroDolars()\n {\n\n $btcHistoricPrice = factory(BtcHistoricPrice::class)->create();\n\n $btcConverter = app(BtcConverterContract::class);\n\n $actualBtcAmount = $btcConverter\n ->setCurrency('usd')\n ->setDate($btcHistoricPrice->date)\n ->getBtcAmount(0);\n\n\n $this->assertEquals(0, $actualBtcAmount);\n\n }", "public function testFilterEmptyDateTime()\n {\n $value = \"0000-00-00 00:00:00\";\n\n $filtered = $this->_filter->filter($value);\n $this->assertEquals($filtered, 'n/a');\n }", "public function testBadDates()\n {\n $bad_dates = [\n 'bad',\n 'never',\n 0,\n ];\n\n foreach ($bad_dates as $bad_date) {\n $datescan = new Datescan($bad_date);\n $this->assertNull($datescan->getRealDateTime());\n }\n }", "function db_null_date() {\n\t\treturn 0;\n\t}", "public function testIsZero_returnsTrue_ifNumberIsZero()\n\t{\n\t\treturn $this->assertTrue(Num::isZero(0));\n\t}", "public function testANonEmptyFormatParameterMustBePassed(): void\n {\n $this->expectExceptionCode(107);\n\n $input = new vk_form_data\\input\\Input();\n\n $input->get_date_time('key', 'post', false);\n }", "public function testBadDate3()\n {\n new ApproxDate('199807123');\n }", "public function testBadDay()\n {\n new ApproxDate('3/34/89');\n }", "public function testParseDateEmptyWords()\n\t{\n\t\t$this->parser->search = ['date' => 'empty,none, null '];\n\t\t$check = $this->parser->parse();\n\t\t$assume = [ 'date' => Func::orOp([ Func::isNull(), Func::isNull(), Func::isNull() ]) ];\n\t\treturn $this->assume(__FUNCTION__, $check, $assume, false);\n\t}", "private function _dateRuleFails(): bool {\n return is_string($this->currentValue) === false \n || DateTime::createFromFormat('Y-m-d', $this->currentValue) === false \n || @strtotime($this->currentValue) === false\n || (DateTime::createFromFormat('Y-m-d', $this->currentValue))->format('Y-m-d') !== $this->currentValue;\n }", "function validDate($date)\r\n {\r\n return !empty($date);\r\n }", "public function testDBToDateFormat_WithOutValue()\r\n {\r\n $output = DataFormat::DBToDateFormat('');\r\n $this->assertEquals(false, $output, 'Error');\r\n\r\n $output = DataFormat::DBToDateFormat(' ');\r\n $this->assertEquals(false, $output, 'Error');\r\n\r\n $output = DataFormat::DBToDateFormat(null);\r\n $this->assertEquals(false, $output, 'Error');\r\n\r\n $output = DataFormat::DBToDateFormat('241Test');\r\n $this->assertEquals(false, $output, 'Error');\r\n }", "public function test_date_returns_true_when_optional_and_input_null() {\n\t\t$optional = true;\n\n\t\t$result = self::$validator->validate( null, $optional );\n\t\t$this->assertTrue( $result );\n\t}", "public function testDoubleIfZero(){\n\t\t$this->assertEquals(0, \\Grafikart\\Math::double(0));\n\t}", "public function testReadWithDateButNoLogFile()\n {\n $this->logParser->read('1972-01-12');\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Merges the contents of the source workspace into the target workspace.
public function merge();
[ "public function merge($sourceDoc, $overwrite){}", "public function merge()\n\t{\n\t}", "public function merge()\n\t{\n\t\t$this->_originals = $this->_data;\n\t}", "public function merge(ModelsInterface $source);", "public function merge(ControllersInterface $source);", "public function merge_with(&$other)\n {\n }", "public function merge (SolrInputDocument $sourceDoc, $overwrite = null) {}", "public function mergeModifiedFiles();", "public function merge(){\n //Read the assigned template\n $this->docXHandler->setTemplateFile($this->templateFile);\n $this->docXHandler->read();\n\n //Iterate over each of the XML Files to be searched for replacing\n foreach($this->docXHandler->getXMLFilesToBeSearched() AS $filename => $content){\n /**\n * Iterate over each rule and action depending on the type\n * @var SimpleRule $rule\n */\n foreach($this->ruleCollection->getRules() AS $rule){\n $re = \"/(?P<class>[a-zA-Z]{1,})$/\";\n preg_match($re, get_class($rule), $matches);\n switch($matches['class']){\n case 'SimpleRule':\n $content = $this->mergeSimpleRule($content,$rule->getData(),$rule->getTarget());\n break;\n case 'RegexpRule':\n $content = $this->mergeRegexpRule($content,$rule->getData(),$rule->getTarget());\n break;\n }\n $this->docXHandler->setXMLFile($filename,$content);\n }\n }\n }", "private function syncSuites()\n\t{\n\t\t$this->sourceSuites = $this->getSuites($this->sourceProject);\n\t\t$this->destinationSuites = $this->getSuites($this->destinationProject);\n\n\t\t$this->deleteOrphanedSuites();\n\t\t$this->matchSuites();\n\t\t$this->copySuites();\n\t}", "protected function copyTargetsToStagingFolder() {\n $filesystem = new Filesystem();\n foreach ($this->foldersToInclude as $dir) {\n $dir = ltrim($dir, './');\n $dir = ltrim($dir, '/');\n $filesystem->mirror($this->resolveRelativePath($dir), $this->ptname . '/' . $dir);\n }\n foreach ($this->filesToInclude as $file) {\n $file = ltrim($file, './');\n $file = ltrim($file, '/');\n $filesystem->copy($this->resolveRelativePath($file), $this->ptname . '/' . $file);\n }\n }", "public function testCopy_Merge()\n {\n \tif (function_exists('posix_getuid') && posix_getuid() == 0) $this->markTestSkipped(\"Won't test this as root for safety reasons.\");\n \t\n \tmkdir(\"{$this->file}.x\");\n \tfile_put_contents(\"{$this->file}.x/\" . basename($this->file) . \".y\", \"Another file\");\n \t$new = $this->Fs_Node->copy(\"{$this->file}.x\", Fs::MERGE);\n \n $this->assertType('Q\\Fs_Dir', $new);\n $this->assertEquals(\"{$this->file}.x\", (string)$new);\n $this->assertTrue(is_dir(\"{$this->file}.x\"));\n \n $this->assertTrue(file_exists(\"{$this->file}.x/\" . basename($this->file)));\n $this->assertEquals('Test case for Fs_Dir', file_get_contents(\"{$this->file}.x/\" . basename($this->file)));\n\n $this->assertTrue(file_exists(\"{$this->file}.x/\" . basename($this->file) . '.y'));\n $this->assertEquals('Another file', file_get_contents(\"{$this->file}.x/\" . basename($this->file) . '.y'));\n \n \t$this->assertTrue(is_dir($this->file));\n \t$this->assertTrue(file_exists(\"{$this->file}/\" . basename($this->file)));\n\t}", "public static function mergeDirectory($target, $source)\r\n\t{\r\n\t Filewalker::traverse($source, null, function($entry, $fullpath) use ($source, $target) {\r\n\t $newpath = str_replace($source, $target, $fullpath);\r\n\t FileUtil::createDir(Strings::rsubstrTo($newpath, '/'));\r\n\t copy($fullpath, $newpath);\r\n\t });\r\n\t}", "public function copySuites()\n\t{\n\t\tforeach ($this->sourceSuites as &$sourceSuite) {\n\t\t\tif (!isset($sourceSuite['destination_id'])) {\n\t\t\t\t$destinationSuite = $this->addSuite($this->destinationProject, $sourceSuite);\n\t\t\t\t$sourceSuite['destination_id'] = $destinationSuite['id'];\n\t\t\t}\n\t\t}\n\t}", "public abstract function synchronize( Tracker $source, Tracker $target );", "public function merge(IObjects $objects);", "public function startMerge()\n {\n $this->startOperation('merge');\n }", "function page_mergePage($source_id,$target_id) {\t\n\t## okay first delete all entries of the targetpage\n\tpage_deletePageContents($target_id);\n\t\n\t## then copy the contents of source to the target\n\tpage_copyContents($source_id,$target_id);\n}", "public function publishAllAction($sourceWorkspaceName, $targetWorkspaceName) {\n\t\t$sourceWorkspace = $this->workspaceRepository->findOneByName($sourceWorkspaceName);\n\t\t$targetWorkspace = $this->workspaceRepository->findOneByName($targetWorkspaceName);\n\t\tif ($sourceWorkspace === NULL) {\n\t\t\t$this->throwStatus(400, 'Invalid source workspace');\n\t\t}\n\t\tif ($targetWorkspace === NULL) {\n\t\t\t$this->throwStatus(400, 'Invalid target workspace');\n\t\t}\n\t\t$this->publishingService->publishNodes($this->publishingService->getUnpublishedNodes($sourceWorkspace), $targetWorkspace);\n\n\t\t$this->throwStatus(204, sprintf('All changes in workspace %s have been published to %s', $sourceWorkspaceName, $targetWorkspaceName), '');\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
During the scheduled period, the CMK is in the PendingDeletion state and cannot be used to encrypt data, decrypt data, or generate data keys. After a CMK is deleted, it cannot be recovered. Data that is encrypted and data keys that are generated by using the CMK cannot be decrypted. To prevent accidental deletion of CMKs, Key Management Service (KMS) allows you to only schedule key deletion tasks. You cannot directly delete CMKs. If you want to delete a CMK, call the [DisableKey](~~35151~~) operation to disable the CMK. When you call this operation, you must specify a scheduled period between 7 days to 366 days. The scheduled period starts from the time when you submit the request. You can call the [CancelKeyDeletion](~~44197~~) operation to cancel the key deletion task before the scheduled period ends.
public function scheduleKeyDeletionWithOptions($request, $runtime) { Utils::validateModel($request); $query = []; if (!Utils::isUnset($request->keyId)) { $query['KeyId'] = $request->keyId; } if (!Utils::isUnset($request->pendingWindowInDays)) { $query['PendingWindowInDays'] = $request->pendingWindowInDays; } $req = new OpenApiRequest([ 'query' => OpenApiUtilClient::query($query), ]); $params = new Params([ 'action' => 'ScheduleKeyDeletion', 'version' => '2016-01-20', 'protocol' => 'HTTPS', 'pathname' => '/', 'method' => 'POST', 'authType' => 'AK', 'style' => 'RPC', 'reqBodyType' => 'formData', 'bodyType' => 'json', ]); return ScheduleKeyDeletionResponse::fromMap($this->callApi($params, $req, $runtime)); }
[ "public function deleteSchedule();", "public function testCreateAndDeleteKey() {\n // Create Customer Key\n $create_response = Traackr\\AccountMgmt::customerkeyCreate(array('customer_name' => 'some_unknown_customer_for_a_customer_key'));\n $this->assertNotEmpty($create_response);\n $this->assertNotEmpty($create_response['customer_key']);\n $customer_key = $create_response['customer_key'];\n\n // Delete Customer Key\n $delete_response = Traackr\\AccountMgmt::customerkeyDelete(array('customer_key' => $customer_key));\n $this->assertEmpty($delete_response); // delete now returns empty-string (and no exception) upon success\n\n try {\n Traackr\\AccountMgmt::customerkeyDelete(array('customer_key' => $customer_key));\n }\n catch (Traackr\\TraackrApiException $e) {\n $this->assertEquals($e->getMessage(), 'Invalid Customer Key (HTTP 400): Customer key not found');\n $this->assertEquals($e->getCode(), 400);\n }\n }", "function delete() {\n\n $this->caldavBackend->deleteSchedulingObject($this->objectData['principaluri'], $this->objectData['uri']);\n\n }", "public function isScheduledForDeletion();", "public function deleteExpiredReminders();", "function lockr_delete_key($key_name) {\n \\Lockr\\Lockr::key()->delete($key_name);\n}", "public function delete() {\n\t\t$this->validate_csrf_token();\n\n\t\t$this->sql->SQLQueryString = 'DELETE FROM cs_calendar\n\t\t\tWHERE calendar_id = '\n\t\t\t. $this->sql->Escape(__FILE__, __LINE__, $this->data['calendar_id']);\n\n\t\t$this->sql->RunQuery(__FILE__, __LINE__);\n\n\t\t$this->flush_cache();\n\t}", "public function deleteApikey();", "public function cancel() {\n\n\t\t// Delete the schedule options\n\t\tdelete_option( 'hmbkp_schedule_' . $this->get_id() );\n\n\t\t// Clear any existing schedules\n\t\t$this->unschedule();\n\n\t\t// Clear the filesize transient\n\t\t$this->clear_filesize_cache();\n\n\t\t// Delete it's backups\n\t\t$this->delete_backups();\n\n\t}", "public function deleteExpiredApiKeys() {\n return UserApiKey::where('created_at', '<', date('Y-m-d H:i:s', strtotime('-5 day')))->delete();\n }", "public function cron_reset_key() {\n\n\t\t\t$protect = mycred_protect();\n\t\t\tif ( $protect !== false )\n\t\t\t\t$protect->reset_key();\n\n\t\t}", "function wpsbc_action_delete_calendar()\r\n{\r\n\r\n // Verify for nonce\r\n if (empty($_GET['wpsbc_token']) || !wp_verify_nonce($_GET['wpsbc_token'], 'wpsbc_delete_calendar')) {\r\n return;\r\n }\r\n\r\n if (empty($_GET['calendar_id'])) {\r\n return;\r\n }\r\n\r\n $calendar_id = absint($_GET['calendar_id']);\r\n\r\n /**\r\n * Delete the calendar\r\n *\r\n */\r\n $deleted = wpsbc_delete_calendar($calendar_id);\r\n\r\n if (!$deleted) {\r\n return;\r\n }\r\n\r\n /**\r\n * Delete legend items\r\n *\r\n */\r\n $legend_items = wpsbc_get_legend_items(array('calendar_id' => $calendar_id));\r\n\r\n foreach ($legend_items as $legend_item) {\r\n\r\n wpsbc_delete_legend_item($legend_item->get('id'));\r\n\r\n }\r\n\r\n /**\r\n * Delete legend items meta\r\n *\r\n */\r\n foreach ($legend_items as $legend_item) {\r\n\r\n $legend_item_meta = wpsbc_get_legend_item_meta($legend_item->get('id'));\r\n\r\n if (!empty($legend_item_meta)) {\r\n\r\n foreach ($legend_item_meta as $key => $value) {\r\n\r\n wpsbc_delete_legend_item_meta($legend_item->get('id'), $key);\r\n\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n /**\r\n * Delete events\r\n *\r\n */\r\n $events = wpsbc_get_events(array('calendar_id' => $calendar_id));\r\n\r\n foreach ($events as $event) {\r\n\r\n wpsbc_delete_event($event->get('id'));\r\n\r\n }\r\n\r\n /**\r\n * Delete events meta\r\n *\r\n */\r\n foreach ($events as $event) {\r\n\r\n $event_meta = wpsbc_get_legend_item_meta($event->get('id'));\r\n\r\n if (!empty($event_meta)) {\r\n\r\n foreach ($event_meta as $key => $value) {\r\n\r\n wpsbc_delete_event_meta($event->get('id'), $key);\r\n\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n // Redirect to the current page\r\n wp_redirect(add_query_arg(array('page' => 'wpsbc-calendars', 'calendar_status' => 'trash', 'wpsbc_message' => 'calendar_delete_success'), admin_url('admin.php')));\r\n exit;\r\n\r\n}", "public function deleteDisableTheCurrentEnabledSignatureKey()\n {\n\n //the base uri for api requests\n $_queryBuilder = Configuration::$BASEURI;\n\n //prepare query string for API call\n $_queryBuilder = $_queryBuilder.'/v1/iam/signature_keys/enabled';\n\n //validate and preprocess url\n $_queryUrl = APIHelper::cleanUrl($_queryBuilder);\n\n //prepare headers\n $_headers = array (\n 'user-agent' => 'messagemedia-signingkey-sdk-1.1.0'\n );\n\n //set HTTP basic auth parameters\n Request::auth(Configuration::$basicAuthUserName, Configuration::$basicAuthPassword);\n\n //call on-before Http callback\n $_httpRequest = new HttpRequest(HttpMethod::DELETE, $_headers, $_queryUrl);\n if ($this->getHttpCallBack() != null) {\n $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest);\n }\n\n //and invoke the API call request to fetch the response\n $response = Request::delete($_queryUrl, $_headers);\n\n $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body);\n $_httpContext = new HttpContext($_httpRequest, $_httpResponse);\n\n //call on-after Http callback\n if ($this->getHttpCallBack() != null) {\n $this->getHttpCallBack()->callOnAfterRequest($_httpContext);\n }\n\n //handle errors defined at the API level\n $this->validateResponse($_httpResponse, $_httpContext);\n }", "public function preDeleteKeyValueKeyConfig(Object_KeyValue_KeyConfig $config)\n {\n\n }", "public function deleteSchedule()\r\n {\r\n $this->throttle();\r\n $response = $this->rest->delete(\"schedules/{$schedule_id}\");\r\n return $response;\r\n }", "public function cancelBackupSchedule()\n {\n $path_root = $this->replaceUrlTokens('sites/{site_id}/environments/{environment_id}/backups/schedule');\n $params = ['method' => 'delete',];\n for ($day = 0; $day < 7; $day++) {\n $this->request()->request(\"$path_root/$day\", $params);\n }\n }", "public static function customerKeyDelete($p = array()) {\n\n $account = new AccountMgmt();\n\n // Check required parameters\n $account->checkRequiredParams($p, array('customer_key'));\n\n return $account->delete(TraackrApi::$apiBaseUrl.'account_mgmt/customerkey/delete', $p);\n\n }", "public function scheduleForDeletion($entity);", "public function testDeleteInvalidSchedule() {\n\t\t$schedule = new Schedule(null, $this->company->getCompanyId(), $this->VALID_SCHEDULEDAYOFWEEK1, $this->VALID_SCHEDULEENDTIME1, $this->VALID_SCHEDULELOCATIONADDRESS1, $this->VALID_SCHEDULELOCATIONNAME1, $this->VALID_SCHEDULESTARTTIME1);\n\n\t\t$schedule->delete($this->getPDO());\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns category ID based on order
public static function idFromOrder($order) { $return = App::$db-> create('SELECT `id` FROM `gallery_category` WHERE `order` = :order LIMIT 1')-> bind((int) $order, 'order', 'int')-> execute(); return (int) $return[0]['id']; }
[ "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 id()\n\t{\n\t\treturn $this->category;\n\t}", "public function getMainCategory($order)\r\n {\r\n // Get mapped categories\r\n $_userCats = Mage::getModel('mageinn_advusers/mapping')\r\n ->getCollection();\r\n $mapped = array();\r\n foreach ($_userCats as $_cat) {\r\n $mapped[] = $_cat->getCategoryId();\r\n }\r\n \r\n // Get purchased categories\r\n $purchased = array();\r\n $_items = $order->getAllItems();\r\n foreach ($_items as $_item) {\r\n $_cats = $_item->getProduct()->getCategoryIds();\r\n foreach ($_cats as $_cid) {\r\n if(!isset($purchased[$_cid])) {\r\n $purchased[$_cid] = 0;\r\n }\r\n $purchased[$_cid] += $_item->getPrice() * $_item->getQtyOrdered();\r\n }\r\n }\r\n \r\n // Get highest value mapped category\r\n $mainCategory = 0;\r\n $lastHighest = 0;\r\n foreach($purchased as $cid => $value) {\r\n // If category is mapped, proceed\r\n if(in_array($cid, $mapped) && $value > $lastHighest) {\r\n $mainCategory = $cid;\r\n }\r\n }\r\n \r\n return $mainCategory;\r\n }", "public function getIdCategory()\n {\n return $this->idCategory;\n }", "function osc_search_category_id() {\n $categories = osc_search_category();\n $category = array();\n $where = array();\n $mCat = Category::newInstance();\n\n foreach($categories as $cat) {\n if( is_numeric($cat) ) {\n $tmp = $mCat->findByPrimaryKey($cat);\n if(isset($tmp['pk_i_id'])) { $category[] = $tmp['pk_i_id']; }\n } else {\n $slug_cat = explode( \"/\", trim($cat, \"/\") );\n $tmp = $mCat->findBySlug($slug_cat[count($slug_cat)-1]);\n if(isset($tmp['pk_i_id'])) { $category[] = $tmp['pk_i_id']; }\n }\n }\n\n return $category;\n }", "function get_categoryid() {\n \tglobal $conn;\n \n $sql = \"SELECT id FROM itemcategory\";\n $result = $conn->Execute($sql);\n $catpk = $result->fields[0];\n\t//print_r($result);\n\n//\tif (!$catpk) $catpk = 1;\n return $catpk;\n }", "public function getIdCategory()\r\n {\r\n return $this->idCategory;\r\n }", "public function getId()\n {\n return $this->source['category_id'];\n }", "public function getIdCategory()\n {\n return $this->id_category;\n }", "protected function _getCategoryId()\n\t{\n\t\tif ($this->_processor) {\n\t\t\t$categoryId = $this->_processor\n\t\t\t\t->getMetadata(Df_PageCache_Model_Processor_Category::METADATA_CATEGORY_ID);\n\t\t\tif ($categoryId) {\n\t\t\t\treturn $categoryId;\n\t\t\t}\n\t\t}\n\n\t\t//If it is not product page and not category page - we have no any category (not using last visited)\n\t\tif (!$this->_getProductId()) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn $this->_getCookieValue(Df_PageCache_Model_Cookie::COOKIE_CATEGORY_ID, null);\n\t}", "protected function assignProductCategoryId($orderDetails) {\n\n foreach($orderDetails->items as $key => $values) {\n $productId = $values->{'product-id'};\n $productDetails = $this->discountsRepository->findProductsById($productId); \n $orderDetails->items[$key]->category = $productDetails[0]['category']; \n }\n\n return $orderDetails;\n }", "public function getCatId()\n\t{\n\t\treturn $this->categoria_id;\n\t}", "public function getCatid_CatOrder_Next($cid, $order) {\r\n $command = Yii::app()->db->createCommand('SELECT menu_id, menu_sort FROM ' . $this->tableName() . ' WHERE parent_id=:cid AND menu_sort>:order ORDER BY menu_sort ASC');\r\n $command->bindParam(\":cid\", $cid, PDO::PARAM_INT);\r\n $command->bindParam(\":order\", $order, PDO::PARAM_INT);\r\n return $command->queryRow();\r\n }", "public function getCategory_id()\n {\n return $this->category_id;\n }", "public function getCategoryid()\n {\n return $this->categoryid;\n }", "public function getCategoryID()\n {\n return $this->categoryID;\n }", "public function getPriorityCategoryId()\n {\n return $this->getData(DpRedirectInterface::PRIORITY_CATEGORY_ID);\n }", "public function getId_category()\n {\n return $this->id_category;\n }", "function ipress_the_category_id() {\n echo get_the_category()[0]->cat_ID;\n}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Genereate feed for every store.
protected function generateFeed(StoreInterface $store): void { $productsCollection = $this->getProductsCollection($store->getId()); if ($this->hasProgressBar()) { $this->progressBar->setMaxSteps($productsCollection->getSize()); } $data = []; /** @var ProductInterface $product */ foreach ($productsCollection as $product) { if ($this->stockRegistry->getStockStatusBySku($product->getSku()) && $discountAmount = $this->getDiscountPercent($product) ) { $data[] = [ 'id' => (int)$product->getId(), 'code' => $product->getSku(), 'category' => $this->getProductCategoryPath($product, $store), 'brand' => (string)$product->getAttributeText($this->helper->getManufacturerAttribute()), 'old_price' => $this->getPrice($product), 'new_price' => $this->getFinalPrice($product), 'discount' => $discountAmount, 'image' => $this->getProductImage($product), 'url' => $product->getProductUrl(), 'name' => $product->getName() ]; } if ($this->hasProgressBar()) { $this->progressBar->advance(); } } $dir = $this->helper->getFeedPath(); $this->file->checkAndCreateFolder($dir, 0755); try { $media = $this->filesystem->getDirectoryWrite(DirectoryList::PUB); $media->writeFile($this->helper->getFeedPath(true), $this->json->serialize($data)); } catch (\Exception $e) { $this->helper->logger($e->getMessage()); } }
[ "protected function _generateShipmentFeed($store)\n {\n $fromDate = $this->_getConfig()->getLastTimeGenerated($store);\n\n $shipments = Mage::getResourceModel('sales/order_shipment_collection')\n ->addFieldToFilter('created_at', array('from' => $fromDate->toString(Zend_Date::ISO_8601)));\n if ($store) {\n $shipments->addFieldToFilter('store_id', array('eq' => $store->getId()));\n }\n $this->_saveFeedToFile(\n Mage::getModel('googletrustedstore/feed_shipment', $shipments),\n $this->_getConfig()->getFtpShipmentFileName($store)\n );\n }", "public function generateFeedsAll()\n {\n $this->generateFeeds();\n }", "public static function generateRssFeeds()\n {\n $newsmanager = new NewsManager();\n if (count(rex_clang::getAll()) >= 1) {\n foreach (rex_clang::getAll() as $key => $lang) {\n if ($lang->isOnline()) {\n $newsmanager->generateRssFeed($lang);\n }\n }\n }\n }", "public function getStoresFeed()\n {\n $stores = array();\n $languages = array();\n $storeCollection = Mage::getModel('core/store')->getCollection();\n $desc_array = array();\n $CurrencyCodes = Mage::getStoreConfig('currency/options/allow', Mage::app()->getStore()->getId());\n $currencies = explode(',', $CurrencyCodes);\n $allowed_currencies = array();\n foreach ($currencies as $key => $currency) {\n $allowed_currencies[] = $currency;\n }\n\n $store_data = new stdclass();\n $store = Mage::app()->getStore();\n //foreach ($storeCollection as $store) {\n //$store = Mage::app()->getStore();\n //get languages\n //$languages[] = Mage::getStoreConfig('general/locale/code', $store->getId());\n //get allowed countries\n $allowed = explode(\",\", Mage::getStoreConfig('general/country/allow'), Mage::app()->getStore()->getId());\n $countries = array();\n foreach ($allowed as $key => $value) {\n $countriesdata = explode(\",\", $value);\n foreach ($countriesdata as $index => $val) {\n $countries[] = $val;\n }\n }\n\n\n\n /*\n * Get ship to countries\n * */\n $shipto = array();\n $carriers = Mage::getStoreConfig('carriers', Mage::app()->getStore()->getId());\n foreach ($carriers as $carrierCode => $carrierConfig) {\n if ($carrierConfig['active']) {\n if (!empty($carrierConfig['specificcountry'])) {\n $areas = explode(',', $carrierConfig['specificcountry']);\n foreach ($areas as $area) {\n if (!in_array($area, $shipto)) {\n $shipto[] = $area;\n }\n }\n } else {\n $allowed = explode(\",\", Mage::getStoreConfig('general/country/allow'), Mage::app()->getStore()->getId());\n\n foreach ($allowed as $key => $value) {\n $countriesdata = explode(\",\", $value);\n foreach ($countriesdata as $index => $val) {\n if (!in_array($val, $shipto)) {\n $shipto[] = $val;\n }\n }\n }\n }\n }\n }\n\n $store_data->shipping_countries = $shipto;\n $store_data->allowed_countries = $countries;\n\n //get metadata per languages\n $metadata[Mage::getStoreConfig('general/locale/code', $store->getId())]['metadata']['title'] = Mage::getStoreConfig('design/head/default_title', Mage::app()->getStore()->getId());\n\n $keywords = explode(\",\", Mage::getStoreConfig('design/head/default_keywords', Mage::app()->getStore()->getId()));\n $keywordsdata = array();\n foreach ($keywords as $key => $value) {\n $keywordsdata[] = trim($value);\n }\n\n $metadata[Mage::getStoreConfig('general/locale/code', $store->getId())]['metadata']['keywords'] = $keywordsdata;\n $metadata[Mage::getStoreConfig('general/locale/code', $store->getId())]['metadata']['description'] = Mage::getStoreConfig('design/head/default_description', Mage::app()->getStore()->getId());\n //$metadata[Mage::getStoreConfig('general/locale/code', $store->getId())]['description']['long'] = Mage::getStoreConfig('qwindo/settings/long_store_desc', Mage::app()->getStore()->getId());\n //$metadata[Mage::getStoreConfig('general/locale/code', $store->getId())]['description']['short'] = Mage::getStoreConfig('qwindo/settings/short_store_desc', Mage::app()->getStore()->getId());\n\n\n /* $shipping1 = Mage::getStoreConfig('qwindo/shipping/usp1', Mage::app()->getStore()->getId());\n $shipping2 = Mage::getStoreConfig('qwindo/shipping/usp2', Mage::app()->getStore()->getId());\n $shipping3 = Mage::getStoreConfig('qwindo/shipping/usp3', Mage::app()->getStore()->getId());\n $shipping4 = Mage::getStoreConfig('qwindo/shipping/usp4', Mage::app()->getStore()->getId());\n $shipping5 = Mage::getStoreConfig('qwindo/shipping/usp5', Mage::app()->getStore()->getId());\n $shipping_usps = array();\n $i = 1;\n while ($i < 6) {\n $shipping_usp = ${'shipping' . $i};\n if (!empty($shipping_usp)) {\n $shipping_usps[] = $shipping_usp;\n }\n $metadata[Mage::getStoreConfig('general/locale/code', $store)]['usps']['shipping'] = $shipping_usps;\n $i++;\n }\n\n $global1 = Mage::getStoreConfig('qwindo/global/usp1', Mage::app()->getStore()->getId());\n $global2 = Mage::getStoreConfig('qwindo/global/usp2', Mage::app()->getStore()->getId());\n $global3 = Mage::getStoreConfig('qwindo/global/usp3', Mage::app()->getStore()->getId());\n $global4 = Mage::getStoreConfig('qwindo/global/usp4', Mage::app()->getStore()->getId());\n $global5 = Mage::getStoreConfig('qwindo/global/usp5', Mage::app()->getStore()->getId());\n $global_usps = array();\n $i = 1;\n while ($i < 6) {\n $global_usp = ${'global' . $i};\n if (!empty($global_usp)) {\n $global_usps[] = $global_usp;\n }\n $metadata[Mage::getStoreConfig('general/locale/code', $store)]['usps']['global'] = $global_usps;\n $i++;\n }\n\n $stock1 = Mage::getStoreConfig('qwindo/stock/usp1', Mage::app()->getStore()->getId());\n $stock2 = Mage::getStoreConfig('qwindo/stock/usp2', Mage::app()->getStore()->getId());\n $stock_usps = array();\n $i = 1;\n while ($i < 3) {\n $stock_usp = ${'stock' . $i};\n if (!empty($stock_usp)) {\n $stock_usps[] = $stock_usp;\n }\n $metadata[Mage::getStoreConfig('general/locale/code', $store)]['usps']['stock'] = $stock_usps;\n $i++;\n }\n\n */\n\n\n //Get tax calculation method\n switch (Mage::getStoreConfig('tax/calculation/algorithm', Mage::app()->getStore()->getId())) {\n case Mage_Tax_Model_Calculation::CALC_UNIT_BASE:\n $tax_calculation = 'unit';\n break;\n case Mage_Tax_Model_Calculation::CALC_ROW_BASE:\n $tax_calculation = 'row';\n break;\n case Mage_Tax_Model_Calculation::CALC_TOTAL_BASE:\n $tax_calculation = 'total';\n break;\n default:\n $tax_calculation = 'total';\n break;\n }\n\n\n $store_data->languages = $metadata;\n $store_data->allowed_currencies = $allowed_currencies;\n $store_data->stock_updates = Mage::getStoreConfig('qwindo/settings/stock', Mage::app()->getStore()->getId()) ? true : false;\n $store_data->including_tax = Mage::getStoreConfig('tax/calculation/price_includes_tax', Mage::app()->getStore()->getId()) ? true : false;\n $store_data->tax_calculation = $tax_calculation; //total,row or unit\n\n /**\n * Get Shipping tax rule\n * */\n $shipping_tax_id = Mage::getStoreConfig('tax/classes/shipping_tax_class', Mage::app()->getStore()->getId());\n $taxRules = Mage::getModel('tax/sales_order_tax')->getCollection();\n $taxCalculation = Mage::getModel('tax/calculation');\n $request = $taxCalculation->getRateRequest(null, null, null, Mage::app()->getStore());\n $shipping_tax_id = Mage::getStoreConfig('tax/classes/shipping_tax_class', Mage::app()->getStore()->getId());\n $tax_rule = new stdclass();\n $rules = array();\n\n $collection = Mage::getModel('tax/calculation_rule')->getCollection();\n if ($collection->getSize()) {\n $collection->addCustomerTaxClassesToResult()->addProductTaxClassesToResult()->addRatesToResult();\n }\n if ($collection->getSize()) {\n foreach ($collection as $rule) {\n $rule_data = $rule->getData();\n if (in_array($shipping_tax_id, $rule_data['product_tax_classes'])) {\n\n foreach ($rule_data['tax_rates'] as $key => $rate_id) {\n $rate = Mage::getSingleton('tax/calculation_rate')->load($rate_id);\n $rate_info = $rate->getData();\n\n $rules[$rate_info['tax_country_id']] = $rate_info['rate'];\n }\n }\n }\n };\n\n\n $default_tax_id = Mage::getModel('customer/group')->load(0)->getTaxClassId();\n $taxRules = Mage::getModel('tax/sales_order_tax')->getCollection();\n $taxCalculation = Mage::getModel('tax/calculation');\n $request = $taxCalculation->getRateRequest(null, null, null, Mage::app()->getStore());\n $tax_rule = new stdclass();\n $rules = array();\n\n $collection = Mage::getModel('tax/calculation_rule')->getCollection();\n if ($collection->getSize()) {\n $collection->addCustomerTaxClassesToResult()->addProductTaxClassesToResult()->addRatesToResult();\n }\n\n if ($collection->getSize()) {\n\n foreach ($collection as $rule) {\n $rule_data = $rule->getData();\n if (in_array($default_tax_id, $rule_data['customer_tax_classes'])) {\n foreach ($rule_data['tax_rates'] as $key => $rate_id) {\n $rate = Mage::getSingleton('tax/calculation_rate')->load($rate_id);\n $rate_info = $rate->getData();\n if (Mage::getStoreConfig('tax/defaults/country', Mage::app()->getStore()->getId()) == $rate_info['tax_country_id']) {\n $default_tax_name = $rule_data['code'];\n $default_tax_rate = $rate_info['tax_country_id'] = $rate_info['rate'];\n }\n }\n }\n }\n }\n\n\n $tax_rule->id = $shipping_tax_id;\n $tax_rule->name = 'msp-shipping';\n $tax_rule->rules = $rules;\n $store_data->default_tax->name = $default_tax_name;\n $store_data->default_tax->rate = $default_tax_rate;\n $store_data->default_tax->id = $default_tax_id;\n\n $store_data->shipping_tax = $tax_rule;\n $store_data->rounding_policy = 'UP'; //UP, DOWN, CEILING, HALF_UP, HALF_DOWN, HALF_EVEN\n $store_data->require_shipping = true;\n $store_data->base_url = Mage::app()->getStore()->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK);\n //$store_data->logo = Mage::getBaseUrl('media') . 'theme/' . Mage::getStoreConfig('qwindo/settings/store_image', Mage::app()->getStore()->getId());\n $store_data->order_push_url = Mage::getUrl(\"msp/checkout/notification\", array(\"_secure\" => true)); //$store->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK).'msp/standard/notification/';\n /* $store_data->email = Mage::getStoreConfig('trans_email/ident_support/email', Mage::app()->getStore()->getId());\n $store_data->contact_phone = Mage::getStoreConfig('general/store_information/phone', Mage::app()->getStore()->getId());\n $store_data->address = Mage::getStoreConfig('qwindo/address/street', Mage::app()->getStore()->getId());\n $store_data->housenumber = Mage::getStoreConfig('qwindo/address/housenumber', Mage::app()->getStore()->getId());\n $store_data->zipcode = Mage::getStoreConfig('qwindo/address/zipcode', Mage::app()->getStore()->getId());\n $store_data->city = Mage::getStoreConfig('qwindo/address/city', Mage::app()->getStore()->getId()); */\n $store_data->country = Mage::getStoreConfig('general/store_information/merchant_country'); /*\n $store_data->vat_nr = Mage::getStoreConfig('general/store_information/merchant_vat_number', Mage::app()->getStore()->getId());\n $store_data->coc = Mage::getStoreConfig('qwindo/settings/coc', Mage::app()->getStore()->getId());\n $store_data->terms_and_conditions = Mage::getStoreConfig('qwindo/settings/terms', Mage::app()->getStore()->getId());\n $store_data->faq = Mage::getStoreConfig('qwindo/settings/faq', Mage::app()->getStore()->getId());\n $store_data->open = Mage::getStoreConfig('qwindo/settings/open', Mage::app()->getStore()->getId());\n $store_data->closed = Mage::getStoreConfig('qwindo/settings/closed', Mage::app()->getStore()->getId());\n $store_data->days = array(\n \"sunday\" => Mage::getStoreConfig('qwindo/settings/sunday', Mage::app()->getStore()->getId()) ? true : false,\n \"monday\" => Mage::getStoreConfig('qwindo/settings/monday', Mage::app()->getStore()->getId()) ? true : false,\n \"tuesday\" => Mage::getStoreConfig('qwindo/settings/tuesday', Mage::app()->getStore()->getId()) ? true : false,\n \"wednesday\" => Mage::getStoreConfig('qwindo/settings/wednesday', Mage::app()->getStore()->getId()) ? true : false,\n \"thursday\" => Mage::getStoreConfig('qwindo/settings/thursday', Mage::app()->getStore()->getId()) ? true : false,\n \"friday\" => Mage::getStoreConfig('qwindo/settings/friday', Mage::app()->getStore()->getId()) ? true : false,\n \"saturday\" => Mage::getStoreConfig('qwindo/settings/saturday', Mage::app()->getStore()->getId()) ? true : false\n );\n $store_data->social = array(\n \"facebook\" => Mage::getStoreConfig('qwindo/social/facebook', Mage::app()->getStore()->getId()),\n \"twitter\" => Mage::getStoreConfig('qwindo/social/twitter', Mage::app()->getStore()->getId()),\n \"linkedin\" => Mage::getStoreConfig('qwindo/social/linkedin', Mage::app()->getStore()->getId())\n ); */\n //add store data to feed structure\n $stores[] = $store_data;\n //}\n\n return json_encode($store_data);\n }", "public function refreshProductsFeed()\n\t{\n\t\t$stores = $this->getStoresFeedEnabled();\n\t\t$feed = Mage::getModel('quartic/feed');\n\t\tforeach($stores as $storeId) {\n\t\t\t$feed->refreshProductsFeed($storeId);\n\t\t}\n\t}", "public static function getAllFeeds()\n\t{\n\t\treturn static::getStore();\n\t}", "protected function generateForAllStores()\n {\n $urls = [];\n foreach ($this->storeManager->getStores() as $store) {\n $urls[] = $this->createUrlRewrite($store->getStoreId());\n }\n\n return $urls;\n }", "public function exportZirconProductFeed(){\n Mage::app()->setCurrentStore(Mage::getModel('core/store')->load(Mage_Core_Model_App::ADMIN_STORE_ID));\n $errorFile = 'iGo_DataFeed_Zircon_Error.log';\n\t \n try {\n $stores = Mage::getModel('core/store')->getCollection();\n\t\t\t\n foreach ($stores as $store) {\n if($store->getName() != \"Default Store View\"){\n $this->_exportDirectory = Mage::getBaseDir().'/feed/iGo/';\n $this->_exportFileName = str_replace(\".com\",\"\", $store->getName());\n $this->_exportFileName = str_replace(\".\",\"\", $this->_exportFileName);\n $this->_exportFileName = $this->_exportFileName.\".txt\";\n $this->_exportFullFileName = $this->_exportDirectory.$this->_exportFileName;\n $exportFileHandler = fopen($this->_exportFullFileName , 'w'); \n $fileLine = \"sku\\tcode\\tname\\ttype\\tprice\\tsale_price\\tavailability\\tlink\\timage1\\timage2\\tcost\\trelease_date\\tcategory\\tauthor_speaker_editor\\tbrand\\tcustom_design\\ttarget_audience\\tskill_level\\ttechnique\\trating\\tstock_status\\tshort_description\\tdescription\";\n fwrite($exportFileHandler,$fileLine); \n fclose($exportFileHandler);\n \n //load all products\n $products = Mage::getModel('catalog/product')->getCollection()->addAttributeToSelect(array('sku', \n 'name',\n 'format',\n 'price',\n 'special_price',\n 'description', \n 'url_key',\n 'warehouse_avail_date', \n 'technique',\n 'short_description',\n 'description',\n 'type_id',\n 'category_ids',\n 'visibility',\n 'sold_by_length',\n 'image'\n ), 'left')\n ->addAttributeToFilter('status','1')\n ->addStoreFilter($store->getId())\n ->joinTable('cataloginventory/stock_item', 'product_id=entity_id', array(\"stock_status\" => \"is_in_stock\", \"manage_stock\" => \"manage_stock\"))\n ->addAttributeToSelect('stock_status')\n ->addAttributeToSelect('manage_stock')\n ->addAttributeToSelect('vote_count')\n ->addAttributeToSelect('vote_value_sum');\n\n Mage::getSingleton('core/resource_iterator')->walk($products->getSelect(), array(array($this, 'callBackZirconProductFeed')),array('storeName' => $store->getName(), 'storeId' => $store->getId()));\n\n try{\n $filesToSend[$this->_exportFileName] = $this->_exportFullFileName;\n unset($products);\n }\n catch(Exception $e){ \n Mage::log(\"iGo Export Error: \".$e->getMessage(),null, $errorFile);\n $this->sendErrorEmail($e->getMessage());\n } \n }\n }\n\n //Send the files\n try{\n $this->ftpFiles($filesToSend,$errorFile);\n unset($products);\n }\n catch(Exception $e){\n Mage::log(\"iGo Export Error: \".$e->getMessage(),null, $errorFile);\n $this->sendErrorEmail($e->getMessage());\n }\n\n } \n catch (Exception $e) {\n Mage::log(\"iGo Export Error: \".$e->getMessage(),null, $errorFile);\n $this->sendErrorEmail($e->getMessage());\n }\n }", "private function generateStoreGroups()\n {\n $existedStoreGroupCount = count($this->storeGroupsIds);\n $existedWebsitesCount = count($this->websiteIds);\n while ($existedStoreGroupCount < $this->storeGroupsCount) {\n $websiteId = $this->websiteIds[$existedStoreGroupCount % $existedWebsitesCount];\n $storeGroupName = sprintf('Store Group %d - website_id_%d', ++$existedStoreGroupCount, $websiteId);\n $storeGroupCode = sprintf('store_group_%d', $existedStoreGroupCount);\n $storeGroup = clone $this->defaultStoreGroup;\n $storeGroup->addData(\n [\n 'group_id' => null,\n 'website_id' => $websiteId,\n 'name' => $storeGroupName,\n 'code' => $storeGroupCode,\n 'root_category_id' => $this->getStoreCategoryId($storeGroupName),\n ]\n );\n $storeGroup->save();\n $this->storeGroupsIds[] = $storeGroup->getId();\n $this->storeGroupsToWebsites[$storeGroup->getId()] = $websiteId;\n }\n }", "public function genFeed() {\n header(\"Content-type: text/xml\");\n $this->genHead();\n $this->genChannel();\n $this->genBody();\n $this->genBottom();\n }", "public function generateForStoreId($storeId, SLI_Search_Helper_FeedLogger $logger)\n {\n // just to be safe\n Mage::app()->setCurrentStore($storeId);\n\n // Disables Catalog Flat Table for LSC process.\n // Allows all attributes to be obtained from EAV directly as they are not all stored in Flat Tables.\n Mage::app()->getStore()->setConfig('catalog/frontend/flat_catalog_product', 0);\n Mage::app()->getStore()->setConfig('catalog/frontend/flat_catalog_category', 0);\n \n /** @var SLI_Search_Helper_Feed $feedHelper */\n $feedHelper = Mage::helper('sli_search/feed');\n /** @var SLI_Search_Helper_Data $dataHelper */\n $dataHelper = Mage::helper('sli_search/data');\n\n /** @var $xmlWriter SLI_Search_Helper_XmlWriter */\n $xmlWriter = Mage::helper('sli_search/xmlWriter');\n\n /** @var SLI_Search_Model_Generators_GeneratorContext $generatorContext */\n $generatorContext = Mage::getModel('sli_search/generators_GeneratorContext');\n $generatorContext->init($xmlWriter, $logger, $dataHelper->getWriteBatch());\n\n $generators = array(\n Mage::getModel('sli_search/generators_MetaGenerator'),\n Mage::getModel('sli_search/generators_ProductGenerator'),\n Mage::getModel('sli_search/generators_AttributeGenerator'),\n Mage::getModel('sli_search/generators_CategoryGenerator'),\n Mage::getModel('sli_search/generators_PriceGenerator'),\n );\n\n $logger->trace(\"Creating catalog feed.....\");\n\n $feedFilename = $feedHelper->getFeedFile($storeId);\n $xmlWriter->openFeed($feedFilename);\n\n /** @var $generator SLI_Search_Model_Generators_GeneratorInterface */\n foreach ($generators as $generator) {\n $generator->generateForStoreId($storeId, $generatorContext);\n }\n\n $xmlWriter->closeFeed();\n\n $logger->trace(\"Finished creating catalog feed\");\n\n return true;\n }", "function wprss_fetch_insert_all_feed_items( $all = TRUE ) {\n\t\twprss_log( 'Importing from all sources...', __FUNCTION__, WPRSS_LOG_LEVEL_SYSTEM );\n\t\t// Get all feed sources\n\t\t$feed_sources = wprss_get_all_feed_sources();\n\n\t\tif( $feed_sources->have_posts() ) {\n\t\t\t// Start by getting one feed source, we will cycle through them one by one,\n\t\t\t// fetching feed items and adding them to the database in each pass\n\t\t\twhile ( $feed_sources->have_posts() ) {\n\t\t\t\t$feed_sources->the_post();\n\n\t\t\t\t$interval = get_post_meta( get_the_ID(), 'wprss_update_interval', TRUE );\n\t\t\t\t$using_global_interval = ( $interval === wprss_get_default_feed_source_update_interval() || $interval === '' );\n\n\t\t\t\t// Check if fetching from all, or if feed source uses the global interval\n\t\t\t\tif ( $all === TRUE || $using_global_interval ) {\n\t\t\t\t\twp_schedule_single_event( time(), 'wprss_fetch_single_feed_hook', array( get_the_ID() ) );\n\t\t\t\t}\n\t\t\t}\n\t\t\twp_reset_postdata(); // Restore the $post global to the current post in the main query\n\t\t}\n\t}", "public function createProductFeed() {\n\t\t$config = Mage::helper('pepperjam_network/config');\n\n\t\tif (!$config->isProductFeedEnabled()) {\n\t\t\tMage::log(Mage::helper('pepperjam_network')->__('Product feed disabled'), Zend_Log::NOTICE);\n\t\t\treturn;\n\t\t}\n\n\t\t$helper = Mage::helper('pepperjam_network');\n\t\tforeach ($helper->getAllProgramIds() as $programId) {\n\t\t\t$store = $helper->getStoreForProgramId($programId);\n\t\t\tMage::log(\n\t\t\t\tsprintf(static::PRODUCT_LOG_MESSAGE, $programId, $store->getName()),\n\t\t\t\tZend_Log::INFO\n\t\t\t);\n\n\t\t\tMage::getModel('pepperjam_network/feed_product', array(\n\t\t\t\t'store' => $store,\n\t\t\t))->generateFeed();\n\t\t}\n\t}", "public function stores() {\n\t\t$this->out(\"\\n----------------- Importing Stores -----------------\");\n\t\t$stores = array(\n\t\t\t1 => array(\n\t\t\t\t'slug' => 'hyvee',\n\t\t\t\t'name' => 'Hy-Vee',\n\t\t\t),\n\t\t\t2 => array(\n\t\t\t\t'slug' => 'aldi',\n\t\t\t\t'name' => 'Aldi',\n\t\t\t),\n\t\t\t3 => array(\n\t\t\t\t'slug' => 'dahls',\n\t\t\t\t'name' => 'Dahl\\'s',\n\t\t\t),\n\t\t\t4 => array(\n\t\t\t\t'slug' => 'trader-joes',\n\t\t\t\t'name' => 'Trader Joe\\'s',\n\t\t\t),\n\t\t\t5 => array(\n\t\t\t\t'slug' => 'costco',\n\t\t\t\t'name' => 'Costco',\n\t\t\t),\n\t\t\t6 => array(\n\t\t\t\t'slug' => 'sams-club',\n\t\t\t\t'name' => 'Sam\\'s Club',\n\t\t\t),\n\t\t\t7 => array(\n\t\t\t\t'slug' => 'target',\n\t\t\t\t'name' => 'Target',\n\t\t\t),\n\t\t\t8 => array(\n\t\t\t\t'slug' => 'walgreens',\n\t\t\t\t'name' => 'Walgreen\\'s',\n\t\t\t),\n\t\t\t9 => array(\n\t\t\t\t'slug' => 'walmart',\n\t\t\t\t'name' => 'WalMart',\n\t\t\t),\n\t\t\t10 => array(\n\t\t\t\t'slug' => 'whole-foods',\n\t\t\t\t'name' => 'Whole Foods',\n\t\t\t),\n\t\t);\n\n\t\t$store = ClassRegistry::init('Store');\n\t\t$store->saveAll($stores);\n\t}", "function gcm_feeds_tpl(){\n add_feed('whats', 'whats_feeds_render');\n add_feed('concerts', 'concerts_feeds_render');\n add_feed('community', 'community_feeds_render');\n add_feed('events', 'events_feed_render');\n}", "public function all () {\n $websites = Website::all();\n\n foreach ($websites as $website) {\n if ($website->type_of_feed == 'rss') {\n try {\n $rss = \\Feed::loadRss($website->feed_url);\n // retrieve the data and store in the feed database // loop through the items\n foreach ($rss->item as $item) {\n // Skips current iteration if it exists\n if (count(Feed::select('*')->where('post_url', $item->link)->get())) { continue; }\n\n if (isset($item->{'content:encoded'})) {\n $content = $item->{'content:encoded'};\n } else {\n $content = $item->description;\n }\n\n $feed = Feed::create([\n 'website_id' => $website->id,\n 'category_id' => $website->category->id,\n 'post_title' => $item->title,\n 'post_url' => $item->link,\n 'pub_date' => date('Y-m-d H:i:s' ,(int) $item->timestamp),\n 'post_content' => $content,\n 'post_id' => $item->guid,\n 'post_picture' => null,\n ]);\n }\n\n } catch (\\Exception $e) {\n // TODO\n // Find a way to log the errors\n abort(404, \"Rss Feed Stopped Working\");\n // abort(404, $e);\n }\n } elseif ($website->type_of_feed == 'atom') {\n abort(404, 'Atom Feed Not Supported. Check back later');\n // LOL\n try {\n $atom = \\Feed::loadAtom($website->feed_url);\n $entries = $atom->entry; dd($atom);\n // retrieve the data and store in the database // loop through the items\n foreach ($entries as $entry) {\n // Not sure if to validate the rss->item first (skipped for now)\n /* From the database\n $table->string('post_title');\n $table->string('post_url');\n $table->dateTime('pub_date');\n $table->string('post_content')->nullable();\n $table->string('post_id'); // guid\n //\n $table->string('post_picture')->nullable();\n */\n\n // Store the item into the feed database\n // $feed = Feed::create([\n // ''\n // ]);\n } \n } catch (\\Exception $e) {\n abort(404, 'Atom Feed Not working');\n }\n } else {\n abort(404, 'Invalid Feed Type');\n }\n \n }\n return \"Successfully added the Feed <a href=\". url(\"/feed\"). \">View</a>\";\n }", "public function map_all_stores_with_grocessary_post() {\n \n // get store listing for selected retailers.\n $stores = $this->retailermodel->get_all_stores();\n foreach ($stores as $store) {\n $data = array( \n 'StoreId' => $store['Id'], \n 'StoreGroupId' => 1\n );\n \n $this -> db -> insert('stores_storegroups', $data);\n $ids = $this -> db -> insert_id();\n }\n \n }", "public function refreshAll() {\n\n\n $feeds = $this->model->active()->get();\n\n foreach ($feeds as $feed) {\n\n $this->deleteRSS($feed);\n\n $this->getRSS($feed);\n\n }\n\n\n }", "public function runProductFeed(){\n\t\t$feed\t=\tMage::helper('ordergroove/product_feed');\n\t\t$result\t=\t$feed->generate(TRUE);\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
this only lets through posts with category frontpage see: "Show Only One Category on Home Page" cat: 10 is 'frontpage'
function show_front_category( $query ) { if ( $query->is_home() && $query->is_main_query() ) { $query->set( 'cat', '10' ); } }
[ "function tfuse_category_on_front_page()\n {\n if ( !is_front_page() ) return;\n\n global $is_tf_front_page,$homepage_categ;\n $is_tf_front_page = false;\n\n $homepage_category = tfuse_options('homepage_category');\n $homepage_category = explode(\",\",$homepage_category);\n foreach($homepage_category as $homepage)\n {\n $homepage_categ = $homepage;\n }\n\n if($homepage_categ == 'specific')\n {\n $is_tf_front_page = true;\n $archive = 'archive-content.php';\n $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; \n \n $specific = tfuse_options('categories_select_categ');\n\n $ids = explode(\",\",$specific);\n $posts = array(); \n foreach ($ids as $id){\n $posts[] = get_posts(array('category' => $id));\n }\n\n $args = array(\n 'cat' => $specific,\n 'orderby' => 'date',\n 'paged' => $paged\n );\n query_posts($args);\n\n include_once(locate_template($archive));\n \n return;\n }\n elseif($homepage_categ == 'page')\n {\n global $front_page;\n $is_tf_front_page = true;\n $front_page = true;\n $archive = 'page.php';\n $page_id = tfuse_options('home_page');\n\n $args=array(\n 'page_id' => $page_id,\n 'post_type' => 'page',\n 'post_status' => 'publish',\n 'posts_per_page' => 1,\n 'ignore_sticky_posts'=> 1\n );\n query_posts($args);\n include_once(locate_template($archive));\n wp_reset_query();\n return;\n }\n elseif($homepage_categ == 'all')\n {\n $archive = 'archive-content.php';\n\n $is_tf_front_page = true;\n wp_reset_postdata();\n include_once(locate_template($archive));\n return;\n }\n \n }", "function display_home_featured_posts() {\n\t\t\t//$catquery = new WP_Query( 'cat=32&posts_per_page=3' );\n\t\t\t$catquery = new WP_Query( \n\t\t\t\tarray( \n\t\t\t\t\t'category_name' => 'featured-home',\n\t\t\t\t\t'post_type' => 'post',\n\t\t\t\t\t'ignore_sticky_posts' => true,\n\t\t\t\t\t'posts_per_page' => 2,\n\t\t\t\t)\n\t\t\t);\n\t\t\tif ( $catquery->have_posts() ) {\n\t\t\t\t// The loop\n\t\t\t\techo '<div class=\"row\">';\n\t\t\t\twhile ( $catquery->have_posts() ) :\n\t\t\t\t\t$catquery->the_post();\n\t\t\t\t\t?>\n\t\t\t\t\t<?php get_template_part( 'template-parts/content-home-featured' ); ?>\n\t\t\t\t<?php\n\t\t\t\tendwhile;\n\t\t\t\techo '</div>';\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// Nothing found..\n\t\t\t}\n\t\t\t// Reset Post Data\n\t\t\twp_reset_postdata();\n\t\t}", "function exclude_category($query) {\nif ( $query->is_front_page() ) {\n/* to get category id login into wp backend, go to catagories page and hover over category. The url will have the id in it. */\n\t\t\t// category, category id\n$query->set('cat', '-192');\n}\nreturn $query;\n}", "function is_frontpage_posts() {\n\t\treturn (is_home() == true && get_option('show_on_front') == 'posts');\n\t}", "function getFirstCat($post_id) {\n $cont=0;\n foreach((get_the_category()) as $category) {\n if ($cont == 0) {\n $firstCat = $category->cat_name;\n }\n $cont++;\n }\n\techo $firstCat;\n}", "function pm_filter_category_query( $query ) {\n // only modify front-end category archive pages\n if( is_category() && !is_admin() && $query->is_main_query() ) {\n //$query->set( 'posts_per_page','20' );\n $query->set( 'orderby','meta_value_num' );\n $query->set( 'meta_key','wpfp_favorites' );\n $query->set( 'order','DESC' );\n }\n}", "function excludeLatestPostsInCategoryPage($query)\n{\n if (!is_admin() && $query->is_main_query() && $query->is_category()) {\n $category = get_queried_object();\n $ppp = get_option('posts_per_page');\n $offset = 5;\n\n if ($category instanceof WP_Term) {\n if ($query->is_category('briefs') || isMediaCategory($category->slug)) {\n $offset = 0;\n $query->set('posts_per_page', 12);\n }\n\n if ($category->slug == 'opinion' || verifyColumnist($category->name)) {\n $offset = 3;\n }\n }\n\n if ($query->is_paged) {\n $pageOffset = $offset + ($query->query_vars['paged'] - 1) * $ppp;\n\n $query->set('offset', $pageOffset);\n } else {\n $query->set('offset', $offset);\n }\n }\n}", "function cat_loop_homepagina($post_type = 'any', $cat, $posts_page = '3', $orderby = 'title', $order = 'ASC', $css = 'none') {\n\n$args = array(\n\t'post_type' \t\t\t=> $post_type, // any\n\t'category_name'\t\t=> $cat,\n\t'posts_per_page'\t=> $posts_page,\n\t'orderby' \t\t\t\t=> $orderby,\n 'order' \t\t\t\t=> $order,\n\t'orderby' \t\t\t\t=> 'date',\n\t// 'meta_value'\t\t\t=> 1,\n\t// 'meta_key'\t\t\t\t=> $meta_key, // 'ev_homepagina_pas',\n\t// 'orderby’ => 'title', \n\t// 'orderby’ => 'ASC', \n);\n\t\n$loop = new WP_Query( $args );\nif ( $loop->have_posts() ) :\n while ( $loop->have_posts() ) : $loop->the_post();\n?> \n\t\t\n <article>\n\t <div><img src=\"<?php echo get_the_post_thumbnail_url(); ?>\" alt=\"\" width=\"1000\" height=\"562\">\n\t\t <h3><?php if ( the_title() ) : the_title(); endif; ?></h3></div>\n <p class=\"afkappen\"><?php if ( has_excerpt() ) : the_excerpt(); endif; ?></p>\n \t\t\t<?php if( get_field('link_producten_listpagina') ): ?>\n \t\t\t\t<a href=\"<?php the_field('link_producten_listpagina'); ?>\">Lees meer</a>\n\t\t\t<?php endif; ?>\n</article>\n\t\t\t\n<?php\n endwhile;\n wp_reset_postdata();\nelse :\n _e( 'Sorry, no posts matched your criteria.', 'textdomain' );\nendif;\n}", "function exclude_category_from_blog( $query ) {\n\n\t//if( $query->is_main_query() && $query->is_home() ) {\n\t\t$query->set( 'cat', '-2' );\n //}\n\n}", "function _show_in_cat () {\n\t\tif (module('blog')->HIDE_TOTAL_ID) {\n// TODO\n\t\t}\n\t\t$_GET[\"id\"] = intval($_GET[\"id\"]);\n\t\tif (!isset(module('blog')->_blog_cats[$_GET[\"id\"]])) {\n\t\t\treturn _e(\"No such blogs category!\");\n\t\t}\n\t\t// Get posts in selected category\n\t\t$sql = \"SELECT \n\t\t\t\tid AS post_id,\n\t\t\t\tuser_id,\n\t\t\t\tadd_date AS post_date,\n\t\t\t\ttitle AS post_title,\n\t\t\t\tnum_reads,\n\t\t\t\tSUBSTRING(text FROM 1 FOR \".intval(module('blog')->POST_TEXT_PREVIEW_LENGTH).\") AS post_text \n\t\t\tFROM \".db('blog_posts').\" \n\t\t\tWHERE active=1 \n\t\t\t\tAND cat_id=\".intval($_GET[\"id\"]);\n\t\t$order_sql\t= \" ORDER BY add_date DESC \";\n\t\t$path\t\t= \"./?object=\".'blog'.\"&action=\".$_GET[\"action\"].\"&id=\".$_GET[\"id\"];\n\t\tlist($add_sql, $pages, $total) = common()->divide_pages($sql, $path, null, module('blog')->SHOW_IN_CAT_ON_PAGE);\n\t\t// Get contents from db\n\t\t$Q = db()->query($sql. $order_sql. $add_sql);\n\t\twhile ($A = db()->fetch_assoc($Q)) {\n\t\t\t$blog_posts[$A[\"post_id\"]]\t= $A;\n\t\t\t$users_ids[$A[\"user_id\"]]\t= $A[\"user_id\"];\n\t\t}\n\t\t// Get users\n\t\tif (!empty($users_ids)) {\n\t\t\t$this->_users_infos = user($users_ids, array(\"id\",\"name\",\"login\",\"nick\",\"name\",\"email\",\"profile_url\",\"photo_verified\"));\n\t\t\t$this->_users_blog_settings = module('blog')->_get_blog_settings_for_user_ids($users_ids);\n\t\t}\n\t\t// Get comments\n\t\tif (!empty($blog_posts)) {\n\t\t\t$this->_num_comments = module('blog')->_get_num_comments(implode(\",\",array_keys($blog_posts)));\n\t\t}\n\t\t// Process posts\n\t\t$items .= $this->_process_post_items_in_cat($blog_posts);\n\t\t// Process template\n\t\t$replace = array(\n\t\t\t\"items\"\t\t=> $items,\n\t\t\t\"pages\"\t\t=> $pages,\n\t\t\t\"total\"\t\t=> intval($total),\n\t\t\t\"cat_name\"\t=> _prepare_html(module('blog')->_blog_cats[$_GET[\"id\"]]),\n\t\t\t\"back_url\"\t=> \"./?object=\".'blog'.\"&action=show\"._add_get(array(\"page\")),\n\t\t\t\"rss_cat_button\"=> module('blog')->_show_rss_link(\"./?object=\".'blog'.\"&action=rss_for_cat&id=\".$_GET[\"id\"], \"RSS feed for posts inside blog category: \".module('blog')->_blog_cats[$_GET[\"id\"]]),\n\t\t);\n\t\treturn tpl()->parse('blog'.\"/in_cat_main\", $replace);\n\t}", "function kino_film_category_filter( $currentpage ) {\n\t\n\t$terms = get_terms( array(\n\t 'taxonomy' => 'portfolio-category',\n\t 'hide_empty' => true,\n\t 'exclude' => array(321)\n\t) );\n\t\n\t/*\n\t * Note : problème masquage articles brouillons:\n\t * Cf https://wordpress.stackexchange.com/questions/225458/get-terms-showing-link-to-category-even-if-all-posts-are-drafts\n\t * get_terms() doesn't have built-in feature that excludes draft posts because it keeps track of only total posts term is attached to.\n\t \n\t * Workaround: on exclut temporairement \"Kinogeneva 2017\" (id 321)\n\t*/\n\t\n\tif ( $currentpage == 'archive-portfolio' ) {\n\t\t$classeactive = ' selected';\n\t} else {\n\t\t$classeactive = '';\n\t}\n\t\n\t$filter = '<div class=\"row clearfix\">';\n\t$filter .= '<ul class=\"portfolio-filter-tabs bar-styling col-sm-12 clearfix\">';\n\t$filter .= '<li class=\"all'.$classeactive.'\"><a href=\"/films/\">Tout</a></li>';\n\n\tforeach ( $terms as $term) {\n\t\t\n\t\t// ajouter classe \"selected\" si page active\t\n\t\t\n\t\tif ( $currentpage == $term->slug ) {\n\t\t\t$classeactive = ' selected';\n\t\t} else {\n\t\t\t$classeactive = '';\n\t\t}\n\t\t\t\n\t\t$filter .= '<li class=\"'.$classeactive.'\"><a href=\"/lesfilms/' . $term->slug .'\">';\n\t\t\n\t\t$filter .= $term->name ;\n\t\t \n\t $filter .= '</a></li>';\n\t \n\t}\n\t\t\t\n\t$filter .= '</ul></div>';\n\techo $filter;\n}", "function aquamag_categorized_blog() {\n\tif ( false === ( $all_the_cool_cats = get_transient( 'aquamag_categories' ) ) ) {\n\t\t// Create an array of all the categories that are attached to posts.\n\t\t$all_the_cool_cats = get_categories( array(\n\t\t\t'fields' => 'ids',\n\t\t\t'hide_empty' => 1,\n\n\t\t\t// We only need to know if there is more than one category.\n\t\t\t'number' => 2,\n\t\t) );\n\n\t\t// Count the number of categories that are attached to the posts.\n\t\t$all_the_cool_cats = count( $all_the_cool_cats );\n\n\t\tset_transient( 'aquamag_categories', $all_the_cool_cats );\n\t}\n\n\tif ( $all_the_cool_cats > 1 ) {\n\t\t// This blog has more than 1 category so aquamag_categorized_blog should return true.\n\t\treturn true;\n\t} else {\n\t\t// This blog has only 1 category so aquamag_categorized_blog should return false.\n\t\treturn false;\n\t}\n}", "function quizumba_categorized_blog() {\n\tif ( false === ( $all_the_cool_cats = get_transient( 'all_the_cool_cats' ) ) ) {\n\t\t// Create an array of all the categories that are attached to posts.\n\t\t$all_the_cool_cats = get_categories( array(\n\t\t\t'hide_empty' => 1,\n\t\t) );\n\n\t\t// Count the number of categories that are attached to the posts.\n\t\t$all_the_cool_cats = count( $all_the_cool_cats );\n\n\t\tset_transient( 'all_the_cool_cats', $all_the_cool_cats );\n\t}\n\n\tif ( '1' != $all_the_cool_cats ) {\n\t\t// This blog has more than 1 category so quizumba_categorized_blog should return true.\n\t\treturn true;\n\t} else {\n\t\t// This blog has only 1 category so quizumba_categorized_blog should return false.\n\t\treturn false;\n\t}\n}", "function nus_first_category_link() {\n\t\t$cat = get_the_category();\n\t\tif ( ! empty( $cat ) ) {\n\t\t\t$first_cat_string = '<a href=\"'. get_category_link( $cat[0]->term_id ) .'\" title=\"View all news in the '. $cat[0]->name .' category.\">' . $cat[0]->name . '</a>';\n\n\t\t\techo '<span class=\"post-category\">' . $first_cat_string . '</span>';\n\t\t}\n\t}", "function pd_get_category_posts($category_id) {\n\t// num posts allowed to show up alongside\n\t// featured. depends on the current category.\n\t$max_secondary = 0;\n\t// initialize arrays\n\t$featured = $secondary = array();\n\n\t// if featured post on homepage is in the current category,\n\t// then set that one as featured.\n\tforeach( get_the_category( z_get_posts_in_zone( 'feature-feature' )[0]->ID ) as $category ) {\n\t\tif( $category->term_id === $category_id ) {\n\t\t\t$featured = objectToArray( z_get_posts_in_zone( 'feature-feature' ) );\n\t\t}\n\t}\n\n\t// loop through the featured secondary posts and see if\n\t// any match the current category. if they do, set them as\n\t// the in the secondary part of the category page.\n\tforeach( z_get_posts_in_zone( 'feature-list' ) as $article ) {\n\t\tforeach( get_the_category( $article->ID ) as $category ) {\n\t\t\tif( $category->term_id === $category_id ) {\n\t\t\t\t$secondary[] = objectToArray( $article );\n\t\t\t}\n\t\t}\n\t}\n\n\t// whitelisted categories that support the zoninator layout\n\t$whitelist = array('news', 'sports', 'opinion', 'ae');\n\tif(!in_array(get_category($category_id)->slug, $whitelist)) {\n\t\treturn false;\n\t}\n\n\t// if category page is news\n\tif(get_category_by_slug('news')->term_id === $category_id) { // news\n\t\tif( !$featured ) {\n\t\t\t// if featured on homepage is not from category\n\t\t\t// the use the category's featured image.\n\t\t\t$featured = objectToArray( z_get_posts_in_zone( 'zone-news-feature' ) );\n\t\t}\n\t\t$secondary = array_merge( $secondary, objectToArray( z_get_posts_in_zone( 'zone-news-secondary' ) ), objectToArray( z_get_posts_in_zone( 'zone-news-list' ) ) );\n\t\t$max_secondary = 2;\n\t}\n\n\t// if category page is sports\n\tif( get_category_by_slug( 'sports' )->term_id === $category_id ) { // sports\n\t\tif( !$featured ) {\n\t\t\t// if featured on homepage is not from category\n\t\t\t// the use the category's featured image.\n\t\t\t$featured = objectToArray( z_get_posts_in_zone( 'zone-sports-feature' ) );\n\t\t}\n\t\t$secondary = array_merge( $secondary, objectToArray( z_get_posts_in_zone( 'zone-sports-list' ) ));\n\t\t$max_secondary = 2;\n\t}\n\n\t// if category page is opinion\n\tif( get_category_by_slug( 'opinion' )->term_id === $category_id ) { // opinion\n\t\t$featured = wp_get_recent_posts( array( 'numberposts' => 1, 'category' => 10 ) );\n\t\t$secondary = objectToArray( z_get_posts_in_zone( 'zone-opinion-list' ) );\n\t\t$max_secondary = 3;\n\t}\n\n\t// if category page is arts and ent\n\tif( get_category_by_slug( 'ae' )->term_id === $category_id ) { // ae\n\t\tif( !$featured ) {\n\t\t\t// if featured on homepage is not from category\n\t\t\t// the use the category's featured image.\n\t\t\t$featured = objectToArray( z_get_posts_in_zone( 'zone-ae-feature' ) );\n\t\t}\n\t\t$secondary = array_merge( $secondary, objectToArray( z_get_posts_in_zone( 'zone-ae-list' ) ) );\n\t\t$max_secondary = 2;\n\t}\n\n\t// determine the featured post in category\n\t$posts['feature'] = get_post( $featured[0]['ID'], 'ARRAY_A' );\n\t$posts['feature']['photos'] = get_photos( $posts['feature']['ID'], 1 );\n\t\n\t// if the featured article doesn't have a photo,\n\t// return false so category.php will display the\n\t// simple article-list layout.\n\tif(!$posts['feature']['photos']) return false;\n\n\t// since there is a photo, we'll display the featured\n\t// post in the dominant position. therefore, we should\n\t// exclude it from the article list.\n\t$posts['exclude'][0] = $posts['feature']['ID'];\n\t\n\t$posts['secondary'] = array();\n\n\tforeach($secondary as $article) { // sidebar posts\n\t\tif(count($posts['secondary']) < $max_secondary) {\n\t\t\t$posts['secondary'][] = get_post( $article['ID'], 'ARRAY_A' );\n\t\t\t$posts['secondary'][count($posts['secondary']) - 1]['photos'] = get_photos( $article['ID'], 1 );\n\t\t\t$posts['exclude'][] = $article['ID'];\n\t\t}\n\t}\n\treturn $posts;\n}", "function be_exclude_category_from_blog( $query ) {\n\t\n\tif( $query->is_main_query() && $query->is_home() ) {\n\t\t$query->set( 'cat', '-4' );\n\t}\n \n}", "function aa_categorized_blog() {\n\tif (false === ($all_the_cool_cats = get_transient('aa_categories'))) {\n\t\t// Create an array of all the categories that are attached to posts.\n\t\t$all_the_cool_cats = get_categories(array(\n\t\t\t'fields' => 'ids',\n\t\t\t'hide_empty' => 1,\n\n\t\t\t// We only need to know if there is more than one category.\n\t\t\t'number' => 2,\n\t\t));\n\n\t\t// Count the number of categories that are attached to the posts.\n\t\t$all_the_cool_cats = count($all_the_cool_cats);\n\n\t\tset_transient('aa_categories', $all_the_cool_cats);\n\t}\n\n\tif ($all_the_cool_cats > 1) {\n\t\t// This blog has more than 1 category so aa_categorized_blog should return true.\n\t\treturn true;\n\t} else {\n\t\t// This blog has only 1 category so aa_categorized_blog should return false.\n\t\treturn false;\n\t}\n}", "function ajs_spb_categorized_blog() {\n\tif ( false === ( $all_the_cool_cats = get_transient( 'ajs_spb_categories' ) ) ) {\n\t\t// Create an array of all the categories that are attached to posts.\n\t\t$all_the_cool_cats = get_categories( array(\n\t\t\t'fields' => 'ids',\n\t\t\t'hide_empty' => 1,\n\n\t\t\t// We only need to know if there is more than one category.\n\t\t\t'number' => 2,\n\t\t) );\n\n\t\t// Count the number of categories that are attached to the posts.\n\t\t$all_the_cool_cats = count( $all_the_cool_cats );\n\n\t\tset_transient( 'ajs_spb_categories', $all_the_cool_cats );\n\t}\n\n\tif ( $all_the_cool_cats > 1 ) {\n\t\t// This blog has more than 1 category so ajs_spb_categorized_blog should return true.\n\t\treturn true;\n\t} else {\n\t\t// This blog has only 1 category so ajs_spb_categorized_blog should return false.\n\t\treturn false;\n\t}\n}", "function ale_first_category() {\n $cat = ale_get_first_category();\n\tif (!$cat) {\n\t\techo '';\n\t\treturn;\n\t}\n echo '<a href=\"' . ale_get_permalink($cat->cat_ID, true) . '\">' . esc_attr($cat->name) . '</a>';\n}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets value of '_wear_equip_reply' property
public function setWearEquipReply(Down_WearEquipReply $value) { return $this->set(self::_WEAR_EQUIP_REPLY, $value); }
[ "public function getWearEquipReply()\n {\n return $this->get(self::_WEAR_EQUIP_REPLY);\n }", "public function getHeroEquipUpgradeReply()\n {\n return $this->get(self::_HERO_EQUIP_UPGRADE_REPLY);\n }", "public function setHeroEquipUpgradeReply(Down_HeroEquipUpgradeReply $value)\n {\n return $this->set(self::_HERO_EQUIP_UPGRADE_REPLY, $value);\n }", "public function update_reply() {\n\n // Update reply\n (new MidrubBaseUserAppsCollectionChatbotHelpers\\Replies)->update_reply();\n\n }", "public function setReply($var)\n {\n GPBUtil::checkUint32($var);\n $this->reply = $var;\n\n return $this;\n }", "function setReply($Reply, $ReplyName=\"\") {\n if ( $ReplyName ) $this->Reply = $ReplyName .\" <\". $Reply .\">\";\n else $this->Reply = $Reply;\n }", "public function setReply($var)\n {\n GPBUtil::checkString($var, True);\n $this->reply = $var;\n\n return $this;\n }", "public function setEquipped($equipped) {\n $this->equipped = $equipped;\n }", "public function setOpenShopReply(Down_OpenShopReply $value)\n {\n return $this->set(self::_OPEN_SHOP_REPLY, $value);\n }", "public function setBlockReply($blockReply) {\n $this->blockReply = $blockReply;\n }", "public function setAskMagicsoulReply(Down_AskMagicsoulReply $value)\n {\n return $this->set(self::_ASK_MAGICSOUL_REPLY, $value);\n }", "public function setInternalReplyMessage(?string $value): void {\n $this->getBackingStore()->set('internalReplyMessage', $value);\n }", "public function setConsumeItemReply(Down_ConsumeItemReply $value)\n {\n return $this->set(self::_CONSUME_ITEM_REPLY, $value);\n }", "public function setShopConsumeReply(Down_ShopConsumeReply $value)\n {\n return $this->set(self::_SHOP_CONSUME_REPLY, $value);\n }", "function set_reply_address($reply_address)\n {\n $this->set_default_property(self :: PROPERTY_REPLY_ADDRES, $reply_address);\n }", "public function put_enquiry_reply( $aEnquiry_reply ) {\n\n\t\t$this->db->insert('enquiry_replies' , $aEnquiry_reply);\n\n\t}", "public function setCdkeyGiftReply(Down_CdkeyGiftReply $value)\n {\n return $this->set(self::_CDKEY_GIFT_REPLY, $value);\n }", "public function setExcavateReply(Down_ExcavateReply $value)\n {\n return $this->set(self::_EXCAVATE_REPLY, $value);\n }", "function post_reply(Ticket $ticket, $admin_reply, Staff $robot = null)\n\t{\n\t\t\t// We need to override this for the notifications\n\t\tglobal $thisstaff;\n\n\t\tif ($robot) {\n\t\t\t$assignee = $robot;\n\t\t} else {\n\t\t\t$assignee = $ticket->getAssignee();\n\t\t\tif (!$assignee instanceof Staff) {\n // Nobody, or a Team was assigned, and we haven't been told to use a Robot account.\n\t\t\t\t$ticket->logNote(\n\t\t\t\t\t__('AutoAssign Error'),\n\t\t\t\t\t__(\n\t\t\t\t\t\t'Unable to send reply, no assigned Agent on ticket, and no Robot account specified in config.'\n\t\t\t\t\t),\n\t\t\t\t\tself::PLUGIN_NAME,\n\t\t\t\t\tFALSE\n\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\t// This actually bypasses any authentication/validation checks..\n\t\t$thisstaff = $assignee;\n\n // Use the Ticket objects own replaceVars method, which replace\n // any other Ticket variables.\n\t\t$custom_reply = $this->updateVars($ticket, $admin_reply);\n\n\t\t\t// Build an array of values to send to the ticket's postReply function\n\t\t\t// don't send notification to all collaborators.\n\t\t$vars = [\n\t\t\t'response' => $custom_reply\n\t\t];\n\t\t$errors = array();\n\n\t\tif (!$sent = $ticket->postReply($vars, $errors, 5, FALSE)) {\n\t\t\t$ticket->LogNote(__('Error Notification'), __('We were unable to post a reply to the ticket creator.'), self::PLUGIN_NAME, FALSE);\n\t\t}\n}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }